diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a5ecb9f27ee..66c35d1a18e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -28,6 +28,8 @@ jobs: run: npm ci --legacy-peer-deps - name: 🖌️ Lint run: npm run lint + - name: Test + run: npm run test - name: 🔤 Spell Check run: npm run spellcheck - uses: ./.github/workflows/actions/check-translations diff --git a/_templates/README.md b/_templates/README.md index 60a3ebef83d..7f5e1fe828a 100644 --- a/_templates/README.md +++ b/_templates/README.md @@ -26,7 +26,7 @@ Once you've generated your playground, you need to add it to the main markdown f ``` ## Feature -import Feature from '@site/static/usage/v8/button/feature/index.md'; +import Feature from '@site/static/usage/v9/button/feature/index.md'; ``` diff --git a/_templates/playground/new/angular_example_component_ts.md.ejs.t b/_templates/playground/new/angular_example_component_ts.md.ejs.t index 548a45dd57b..348bbb0b8df 100644 --- a/_templates/playground/new/angular_example_component_ts.md.ejs.t +++ b/_templates/playground/new/angular_example_component_ts.md.ejs.t @@ -4,7 +4,7 @@ to: "<%= `static/usage/v${version}/${name}/${path}/angular/example_component_ts. --- ```ts import { Component } from '@angular/core'; -import { <%= pascalComponent %> } from '@ionic/angular/standalone'; +import { <%= pascalComponent %> } from '@ionic/angular'; @Component({ selector: 'app-example', diff --git a/_templates/playground/new/index.js b/_templates/playground/new/index.js index c6f9fb53b6c..c69d04db737 100644 --- a/_templates/playground/new/index.js +++ b/_templates/playground/new/index.js @@ -54,8 +54,8 @@ module.exports = { type: 'select', name: 'version', message: 'Select the Ionic Framework version for the playground', - initial: '8', - choices: ['6', '7', '8'], + initial: '9', + choices: ['6', '7', '8', '9'], }, { type: 'toggle', diff --git a/cspell-wordlist.txt b/cspell-wordlist.txt index 96a53460ab9..13b3252d864 100644 --- a/cspell-wordlist.txt +++ b/cspell-wordlist.txt @@ -33,10 +33,13 @@ autogrow automations autoplay Callout +codemods comparewith composables engageable flexbox +fontawesome +fortawesome frontmatter fullscreen geolocation @@ -58,11 +61,15 @@ preconfigured preflighted proxying quickstart +remixicon retargeted runtimes scroller subcomponent subcomponents +subpath +subpaths +svgs swipeable templating transpiling diff --git a/docs/angular/add-to-existing.md b/docs/angular/add-to-existing.md index d9a41e4e1a1..8a551abfd4e 100644 --- a/docs/angular/add-to-existing.md +++ b/docs/angular/add-to-existing.md @@ -85,22 +85,19 @@ While `core.css` is required, `normalize.css`, `structure.css`, and `typography. Update `src/app/app.config.ts` to include `provideIonicAngular`: ```typescript title="src/app/app.config.ts" -import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZoneChangeDetection } from '@angular/core'; +import { ApplicationConfig, provideBrowserGlobalErrorListeners } from '@angular/core'; import { provideRouter } from '@angular/router'; import { routes } from './app.routes'; -import { provideIonicAngular } from '@ionic/angular/standalone'; +import { provideIonicAngular } from '@ionic/angular'; export const appConfig: ApplicationConfig = { - providers: [ - provideBrowserGlobalErrorListeners(), - provideZoneChangeDetection({ eventCoalescing: true }), - provideRouter(routes), - provideIonicAngular({}), - ], + providers: [provideBrowserGlobalErrorListeners(), provideRouter(routes), provideIonicAngular({})], }; ``` +This reflects the Angular 21 and 22 scaffold, which is zoneless by default. If your existing app is on Angular 18 through 20, it still has `provideZoneChangeDetection({ eventCoalescing: true })`; keep that provider and add `provideIonicAngular({})` alongside it. Refer to [Zoneless Change Detection](/docs/angular/zoneless.md) for details. + ## Using Individual Components After completing the setup above, you can start using Ionic components in your existing Angular app. Here's an example of how to use them: @@ -115,7 +112,7 @@ Then, import the components in `src/app/app.ts`: ```ts title="src/app/app.ts" import { Component } from '@angular/core'; -import { IonButton, IonDatetime } from '@ionic/angular/standalone'; +import { IonButton, IonDatetime } from '@ionic/angular'; @Component({ selector: 'app-root', @@ -210,7 +207,7 @@ Then, update `src/app/app.ts` to include the component imports: ```ts title="src/app/app.ts" import { Component } from '@angular/core'; -import { IonApp, IonRouterOutlet } from '@ionic/angular/standalone'; +import { IonApp, IonRouterOutlet } from '@ionic/angular'; @Component({ selector: 'app-root', @@ -253,7 +250,7 @@ Then, create `src/app/home/home.ts` with the following: ```ts title="src/app/home/home.ts" import { Component } from '@angular/core'; -import { IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone'; +import { IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular'; @Component({ selector: 'app-home', diff --git a/docs/angular/build-options.md b/docs/angular/build-options.md index 857bc28a3cb..3c6bc082c5b 100644 --- a/docs/angular/build-options.md +++ b/docs/angular/build-options.md @@ -5,7 +5,7 @@ import TabItem from '@theme/TabItem'; 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. -While the Standalone approach is newer and makes use of more modern Angular APIs, the Modules approach will continue to be supported in Ionic. Most of the Angular examples on this documentation website use the Modules approach. +The Standalone approach uses modern Angular APIs and is the recommended way to build Ionic applications. The Modules approach, including `IonicModule`, is **deprecated** and will be removed in a future major release. New projects should use the Standalone approach. Existing apps will continue to work but should plan to migrate. Refer to [Migrating from Modules to Standalone](#migrating-from-modules-to-standalone) for migration guidance. ## Standalone @@ -17,7 +17,7 @@ Ionic UI components as Angular standalone components is supported starting in Io Developers can use Ionic components as standalone components to take advantage of treeshaking and newer Angular features. This option involves importing specific Ionic components in the Angular components you want to use them in. Developers can use Ionic standalone components even if their Angular application is NgModule-based. -Refer to the [Standalone Migration Guide](#migrating-from-modules-to-standalone) for instructions on how to update your Ionic app to make use of Ionic standalone components. +Refer to the [Standalone Migration Guide](#migrating-from-modules-to-standalone) for instructions on migrating your Ionic app to the Standalone approach. **Benefits** @@ -29,10 +29,14 @@ Refer to the [Standalone Migration Guide](#migrating-from-modules-to-standalone) 1. Ionic components need to be imported into every Angular component they are used in which can be time consuming to set up. +:::info[Code splitting] +Ionic ships standalone components from a single entry point (`@ionic/angular`). Bundlers such as Webpack and esbuild cannot split code from a single entry point across separate chunks, so the Ionic components you import are included in the main bundle rather than in the chunk for the route or component where they are used. Unused components are still tree-shaken out of the build. +::: + ### Usage with Standalone-based Applications :::warning -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. +All Ionic imports should be imported from the `@ionic/angular` submodule. This includes imports such as components, directives, providers, and types. Importing from `@ionic/angular/lazy` may pull in lazy loaded Ionic code which can interfere with treeshaking. ::: **Bootstrapping and Configuration** @@ -43,7 +47,7 @@ Ionic Angular needs to be configured when the Angular application calls `bootstr import { enableProdMode, importProvidersFrom } from '@angular/core'; import { bootstrapApplication } from '@angular/platform-browser'; import { RouteReuseStrategy, provideRouter } from '@angular/router'; -import { provideIonicAngular, IonicRouteStrategy } from '@ionic/angular/standalone'; +import { provideIonicAngular, IonicRouteStrategy } from '@ionic/angular'; import { routes } from './app/app.routes'; import { AppComponent } from './app/app.component'; @@ -59,11 +63,11 @@ bootstrapApplication(AppComponent, { **Components** -In the example below, we are importing `IonContent` and `IonButton` from `@ionic/angular/standalone` and passing them to `imports` for use in the component template. We would get a compiler error if these components were not imported and provided to the `imports` array. +In the example below, we are importing `IonContent` and `IonButton` from `@ionic/angular` and passing them to `imports` for use in the component template. We would get a compiler error if these components were not imported and provided to the `imports` array. ```typescript title="home.page.ts" import { Component } from '@angular/core'; -import { IonButton, IonContent } from '@ionic/angular/standalone'; +import { IonButton, IonContent } from '@ionic/angular'; @Component({ selector: 'app-home', @@ -87,7 +91,7 @@ For developers using Ionicons 7.2 or newer, passing only the SVG data will cause ```typescript title="home.page.ts" import { Component } from '@angular/core'; -import { IonIcon } from '@ionic/angular/standalone'; +import { IonIcon } from '@ionic/angular'; import { addIcons } from 'ionicons'; import { logoIonic } from 'ionicons/icons'; @@ -153,7 +157,7 @@ Developers who wish to use `routerLink`, `routerAction`, or `routerDirection` on ```typescript title="home.page.ts" import { Component } from '@angular/core'; import { RouterLink } from '@angular/router'; -import { IonButton, IonRouterLink } from '@ionic/angular/standalone'; +import { IonButton, IonRouterLink } from '@ionic/angular'; @Component({ selector: 'app-home', @@ -199,7 +203,7 @@ Ionic Angular's standalone components use ES Modules. As a result, developers us ### Usage with NgModule-based Applications :::warning -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. +All Ionic imports should be imported from the `@ionic/angular` submodule. This includes imports such as components, directives, providers, and types. Importing from `@ionic/angular/lazy` may pull in lazy loaded Ionic code which can interfere with treeshaking. ::: **Bootstrapping and Configuration** @@ -211,7 +215,7 @@ import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { RouteReuseStrategy } from '@angular/router'; -import { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular/standalone'; +import { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular'; import { AppComponent } from './app.component'; import { AppRoutingModule } from './app-routing.module'; @@ -227,11 +231,11 @@ export class AppModule {} **Components** -In the example below, we are importing `IonContent` and `IonButton` from `@ionic/angular/standalone` and passing them to `imports` array in the Angular component's NgModule for use in the component template. We would get a compiler error if these components were not imported and provided to the `imports` array. +In the example below, we are importing `IonContent` and `IonButton` from `@ionic/angular` and passing them to `imports` array in the Angular component's NgModule for use in the component template. We would get a compiler error if these components were not imported and provided to the `imports` array. ```typescript title="home.module.ts" import { NgModule } from '@angular/core'; -import { IonButton, IonContent } from '@ionic/angular/standalone'; +import { IonButton, IonContent } from '@ionic/angular'; import { HomePage } from './home.page'; import { HomePageRoutingModule } from './home-routing.module'; @@ -315,7 +319,7 @@ Developers who wish to use `routerLink`, `routerAction`, or `routerDirection` on ```typescript title="home.module.ts" import { NgModule } from '@angular/core'; import { RouterLink } from '@angular/router'; -import { IonButton, IonRouterLink } from '@ionic/angular/standalone'; +import { IonButton, IonRouterLink } from '@ionic/angular'; import { HomePage } from './home.page'; import { HomePageRoutingModule } from './home-routing.module'; @@ -361,6 +365,10 @@ Ionic Angular's standalone components use ES Modules. As a result, developers us ## Modules +:::warning[Deprecation Notice] +The Modules approach, including `IonicModule`, is **deprecated** and will be removed in a future major release. Existing applications will continue to work during the deprecation period but should migrate using the [Standalone migration guide](#migrating-from-modules-to-standalone). New applications should use the [Standalone](#standalone) approach. +::: + ### Overview Developers can also use the Modules approach by importing `IonicModule` and calling `IonicModule.forRoot()` in the `imports` array in `app.module.ts`. This registers a version of Ionic where Ionic components will be lazily loaded at runtime. @@ -382,7 +390,7 @@ In the example below, we are using `IonicModule` to create a lazily loaded versi import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; -import { IonicModule } from '@ionic/angular'; +import { IonicModule } from '@ionic/angular/lazy'; import { AppComponent } from './app.component'; @@ -399,7 +407,7 @@ export class AppModule {} :::tip Try our automated utility for migrating to standalone! -See https://github.com/ionic-team/ionic-angular-standalone-codemods for instructions on how to get started. All issues related to the migration utility should be filed on the linked repo. +Refer to the [standalone migration codemods](https://github.com/ionic-team/ionic-angular-standalone-codemods) for instructions on how to get started. All issues related to the migration utility should be filed on the linked repo. ::: The Standalone option is newer than the Modules option, so developers may wish to switch during the development of their application. This guide details the steps needed to migrate. @@ -416,14 +424,14 @@ Follow these steps if your Angular application is already using the standalone a 2. Run `npm install ionicons@latest` to ensure you are running the latest version of Ionicons. Ionicons v7.2 brings usability improvements that reduce the code boilerplate needed to use icons with standalone components. -3. Remove the `IonicModule` call in `main.ts` in favor of `provideIonicAngular` imported from `@ionic/angular/standalone`. Any config passed to `IonicModule.forRoot` can be passed as an object to this new function. +3. Remove the `IonicModule` call in `main.ts` in favor of `provideIonicAngular` imported from `@ionic/angular`. Any config passed to `IonicModule.forRoot` can be passed as an object to this new function. ```diff title="main.ts" import { enableProdMode, importProvidersFrom } from '@angular/core'; import { bootstrapApplication } from '@angular/platform-browser'; import { RouteReuseStrategy, provideRouter } from '@angular/router'; -- import { IonicModule, IonicRouteStrategy } from '@ionic/angular'; -+ import { provideIonicAngular, IonicRouteStrategy } from '@ionic/angular/standalone'; +- import { IonicModule, IonicRouteStrategy } from '@ionic/angular/lazy'; ++ import { provideIonicAngular, IonicRouteStrategy } from '@ionic/angular'; import { routes } from './app/app.routes'; import { AppComponent } from './app/app.component'; @@ -446,18 +454,18 @@ bootstrapApplication(AppComponent, { 4. Remove any references to `IonicModule` found elsewhere in your application. -5. Update any existing imports from `@ionic/angular` to import from `@ionic/angular/standalone` instead. +5. Update any existing imports from `@ionic/angular/lazy` to import from `@ionic/angular` instead. ```diff -- import { Platform } from '@ionic/angular'; -+ import { Platform } from '@ionic/angular/standalone'; +- import { Platform } from '@ionic/angular/lazy'; ++ import { Platform } from '@ionic/angular'; ``` 6. Add imports for each Ionic component in the Angular component where they are used. Be sure to pass the imports to the `imports` array on your Angular component. ```diff title="app.component.ts" import { Component } from '@angular/core'; -+ import { IonApp, IonRouterOutlet } from '@ionic/angular/standalone'; ++ import { IonApp, IonRouterOutlet } from '@ionic/angular'; @Component({ selector: 'app-root', @@ -475,7 +483,7 @@ export class AppComponent { ```diff title="test.component.ts" import { Component } from '@angular/core'; -+ import { IonIcon } from '@ionic/angular/standalone'; ++ import { IonIcon } from '@ionic/angular'; + import { addIcons } from 'ionicons'; + import { alarm, logoIonic } from 'ionicons/icons'; @@ -507,8 +515,8 @@ export class TestComponent { ```diff title="test.component.ts" import { Component } from '@angular/core'; -- import { IonButton } from '@ionic/angular/standalone'; -+ import { IonButton, IonRouterLink } from '@ionic/angular/standalone'; +- import { IonButton } from '@ionic/angular'; ++ import { IonButton, IonRouterLink } from '@ionic/angular'; @Component({ selector: 'app-root', @@ -523,11 +531,11 @@ import { Component } from '@angular/core'; export class TestComponent {} ``` -10. If you are using VSCode it is recommended to ignore the `@ionic/angular/common` and `@ionic/angular` module specifiers for import recommendations. +10. If you are using VSCode it is recommended to ignore the `@ionic/angular/common` and `@ionic/angular/lazy` module specifiers for import recommendations. ```json title=".vscode/settings.json" { - "typescript.preferences.autoImportFileExcludePatterns": ["@ionic/angular/common", "@ionic/angular"] + "typescript.preferences.autoImportFileExcludePatterns": ["@ionic/angular/common", "@ionic/angular/lazy"] } ``` @@ -539,14 +547,14 @@ Follow these steps if your Angular application is still using the NgModule archi 2. Run `npm install ionicons@latest` to ensure you are running the latest version of Ionicons. Ionicons v7.2 brings usability improvements that reduce the code boilerplate needed to use icons with standalone components. -3. Remove the `IonicModule` call in `app.module.ts` in favor of `provideIonicAngular` imported from `@ionic/angular/standalone`. Any config passed to `IonicModule.forRoot` can be passed as an object to this new function. +3. Remove the `IonicModule` call in `app.module.ts` in favor of `provideIonicAngular` imported from `@ionic/angular`. Any config passed to `IonicModule.forRoot` can be passed as an object to this new function. ```diff title="app.module.ts" import { enableProdMode, importProvidersFrom } from '@angular/core'; import { bootstrapApplication } from '@angular/platform-browser'; import { RouteReuseStrategy, provideRouter } from '@angular/router'; -- import { IonicModule, IonicRouteStrategy } from '@ionic/angular'; -+ import { provideIonicAngular, IonicRouteStrategy } from '@ionic/angular/standalone'; +- import { IonicModule, IonicRouteStrategy } from '@ionic/angular/lazy'; ++ import { provideIonicAngular, IonicRouteStrategy } from '@ionic/angular'; import { routes } from './app/app.routes'; import { AppComponent } from './app/app.component'; @@ -572,11 +580,11 @@ export class AppModule {} 4. Remove any references to `IonicModule` found elsewhere in your application. -5. Update any existing imports from `@ionic/angular` to import from `@ionic/angular/standalone` instead. +5. Update any existing imports from `@ionic/angular/lazy` to import from `@ionic/angular` instead. ```diff -- import { Platform } from '@ionic/angular'; -+ import { Platform } from '@ionic/angular/standalone'; +- import { Platform } from '@ionic/angular/lazy'; ++ import { Platform } from '@ionic/angular'; ``` 6. Add imports for each Ionic component in the NgModule for the Angular component where they are used. Be sure to pass the components to the `imports` array on the module. @@ -585,8 +593,8 @@ export class AppModule {} import { enableProdMode, importProvidersFrom } from '@angular/core'; import { bootstrapApplication } from '@angular/platform-browser'; import { RouteReuseStrategy, provideRouter } from '@angular/router'; -- import { provideIonicAngular, IonicRouteStrategy } from '@ionic/angular/standalone'; -+ import { provideIonicAngular, IonicRouteStrategy, IonApp, IonRouterOutlet } from '@ionic/angular/standalone'; +- import { provideIonicAngular, IonicRouteStrategy } from '@ionic/angular'; ++ import { provideIonicAngular, IonicRouteStrategy, IonApp, IonRouterOutlet } from '@ionic/angular'; import { routes } from './app/app.routes'; import { AppComponent } from './app/app.component'; @@ -614,7 +622,7 @@ import { HomePage } from './home.page'; import { HomePageRoutingModule } from './home-routing.module'; -+ import { IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone'; ++ import { IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular'; @NgModule({ imports: [ @@ -653,7 +661,7 @@ export class TestComponent { ```diff title="test.module.ts" import { NgModule } from '@angular/core'; import { TestComponent } from './test.component'; -+ import { IonIcon } from '@ionic/angular/standalone'; ++ import { IonIcon } from '@ionic/angular'; @NgModule({ imports: [ @@ -679,8 +687,8 @@ export class TestComponentModule {} ```diff title="test.module.ts" import { NgModule } from '@angular/core'; import { TestComponent } from './test.component'; -- import { IonButton } from '@ionic/angular/standalone'; -+ import { IonButton, IonRouterLink } from '@ionic/angular/standalone'; +- import { IonButton } from '@ionic/angular'; ++ import { IonButton, IonRouterLink } from '@ionic/angular'; @NgModule({ imports: [ @@ -691,10 +699,10 @@ import { TestComponent } from './test.component'; }) ``` -10. If you are using VSCode it is recommended to ignore the `@ionic/angular/common` and `@ionic/angular` module specifiers for import recommendations. +10. If you are using VSCode it is recommended to ignore the `@ionic/angular/common` and `@ionic/angular/lazy` module specifiers for import recommendations. ```json title=".vscode/settings.json" { - "typescript.preferences.autoImportFileExcludePatterns": ["@ionic/angular/common", "@ionic/angular"] + "typescript.preferences.autoImportFileExcludePatterns": ["@ionic/angular/common", "@ionic/angular/lazy"] } ``` diff --git a/docs/angular/injection-tokens.md b/docs/angular/injection-tokens.md index c7c775fd69c..2367036ab74 100644 --- a/docs/angular/injection-tokens.md +++ b/docs/angular/injection-tokens.md @@ -34,7 +34,7 @@ To use the `IonModalToken`, inject it into your component's constructor: ```tsx import { Component, inject } from '@angular/core'; -import { IonButton, IonContent, IonHeader, IonModalToken, IonTitle, IonToolbar } from '@ionic/angular/standalone'; +import { IonButton, IonContent, IonHeader, IonModalToken, IonTitle, IonToolbar } from '@ionic/angular'; @Component({ selector: 'app-modal', @@ -66,7 +66,7 @@ You can use the injected modal reference to listen to modal lifecycle events: ```tsx import { Component, inject, OnInit } from '@angular/core'; -import { IonButton, IonContent, IonHeader, IonModalToken, IonTitle, IonToolbar } from '@ionic/angular/standalone'; +import { IonButton, IonContent, IonHeader, IonModalToken, IonTitle, IonToolbar } from '@ionic/angular'; @Component({ selector: 'app-modal', @@ -108,7 +108,7 @@ The injected modal reference provides access to all modal properties and methods ```tsx import { Component, inject, OnInit } from '@angular/core'; -import { IonButton, IonContent, IonHeader, IonModalToken, IonTitle, IonToolbar } from '@ionic/angular/standalone'; +import { IonButton, IonContent, IonHeader, IonModalToken, IonTitle, IonToolbar } from '@ionic/angular'; @Component({ selector: 'app-modal', @@ -149,7 +149,7 @@ When opening a modal that uses the injection token, you can pass the component d ```tsx import { Component, inject } from '@angular/core'; -import { IonContent, IonButton, ModalController } from '@ionic/angular/standalone'; +import { IonContent, IonButton, ModalController } from '@ionic/angular'; import { ModalComponent } from './modal.component'; @Component({ diff --git a/docs/angular/navigation.md b/docs/angular/navigation.md index 964a4e0c05f..3d96837883d 100644 --- a/docs/angular/navigation.md +++ b/docs/angular/navigation.md @@ -201,7 +201,9 @@ To get started with standalone components [visit Angular's official docs](https: ## Live Example -If you would prefer to get hands on with the concepts and code described above, please checkout our [live example](https://stackblitz.com/edit/ionic-angular-routing?file=src/app/app-routing.module.ts) of the topics above on StackBlitz. +import NavigationPlayground from '@site/static/usage/v9/navigation/index.md'; + + ## Linear Routing versus Non-Linear Routing diff --git a/docs/angular/overlays.md b/docs/angular/overlays.md index 15863b5c022..911063b5362 100644 --- a/docs/angular/overlays.md +++ b/docs/angular/overlays.md @@ -19,7 +19,7 @@ Overlays can be created programmatically using their respective controllers: ```typescript import { Component } from '@angular/core'; -import { ModalController } from '@ionic/angular/standalone'; +import { ModalController } from '@ionic/angular'; import { MyModalComponent } from './my-modal.component'; @Component({ @@ -61,7 +61,7 @@ To use a custom injector, pass it to the `create()` method: ```typescript import { Component, Injector } from '@angular/core'; -import { ModalController } from '@ionic/angular/standalone'; +import { ModalController } from '@ionic/angular'; import { MyModalComponent } from './my-modal.component'; import { MyRouteService } from './my-route.service'; @@ -104,7 +104,7 @@ You can also create a custom injector with specific providers: ```typescript import { Component, Injector } from '@angular/core'; -import { ModalController } from '@ionic/angular/standalone'; +import { ModalController } from '@ionic/angular'; import { MyModalComponent } from './my-modal.component'; import { MyService } from './my.service'; @@ -140,7 +140,7 @@ A common use case is providing the Angular CDK `Dir` directive to overlays for b ```typescript import { Component, Injector } from '@angular/core'; import { Dir } from '@angular/cdk/bidi'; -import { ModalController } from '@ionic/angular/standalone'; +import { ModalController } from '@ionic/angular'; import { MyModalComponent } from './my-modal.component'; @Component({ @@ -166,7 +166,7 @@ The `PopoverController` supports the same `injector` option: ```typescript import { Component, Injector } from '@angular/core'; -import { PopoverController } from '@ionic/angular/standalone'; +import { PopoverController } from '@ionic/angular'; import { MyPopoverComponent } from './my-popover.component'; @Component({ @@ -194,10 +194,10 @@ Ionic Angular exports its own `ModalOptions` and `PopoverOptions` types that ext - `ModalOptions` - Extends core `ModalOptions` with the `injector` property - `PopoverOptions` - Extends core `PopoverOptions` with the `injector` property -These types are exported from `@ionic/angular` and `@ionic/angular/standalone`: +These types are exported from `@ionic/angular` and `@ionic/angular/lazy`: ```typescript -import type { ModalOptions, PopoverOptions } from '@ionic/angular/standalone'; +import type { ModalOptions, PopoverOptions } from '@ionic/angular'; ``` ## Docs for Overlays in Ionic diff --git a/docs/angular/overview.md b/docs/angular/overview.md index 6605cdbfd3a..7cf13ffcdb8 100644 --- a/docs/angular/overview.md +++ b/docs/angular/overview.md @@ -18,7 +18,7 @@ import DocsCards from '@components/global/DocsCards'; ## Angular Version Support -Ionic Angular v8 supports Angular versions 16 and above. For detailed information on supported versions and our support policy, refer to the [Ionic Angular Support Policy](/docs/reference/support#ionic-angular). +Ionic Angular v9 supports Angular versions 18 through 22. For detailed information on supported versions and our support policy, refer to the [Ionic Angular Support Policy](/docs/reference/support#ionic-angular). ## Angular Tooling diff --git a/docs/angular/platform.md b/docs/angular/platform.md index 3cd0d7833f3..7aa72bba712 100644 --- a/docs/angular/platform.md +++ b/docs/angular/platform.md @@ -28,7 +28,7 @@ The Platform service can be used to get information about your current device. Y ```tsx -import { Platform } from '@ionic/angular'; +import { Platform } from '@ionic/angular/lazy'; @Component({...}) export class MyPage { @@ -42,7 +42,7 @@ export class MyPage { ```tsx -import { Platform } from '@ionic/angular/standalone'; +import { Platform } from '@ionic/angular'; @Component({...}) export class MyPage { @@ -95,8 +95,22 @@ Below is a table listing all the possible platform values along with correspondi The function used to detect a specific platform can be overridden by providing an alternative function in the global [Ionic config](../developing/config). Each function takes `window` as a parameter and returns a boolean. -```tsx -import { IonicModule } from '@ionic/angular'; + + + +```tsx title="app.module.ts" +/* + * IonicModule is deprecated and will be removed in a future major version. + * Refer to the "Angular (Standalone)" tab to use `provideIonicAngular()` instead. + */ +import { IonicModule } from '@ionic/angular/lazy'; @NgModule({ ... @@ -119,6 +133,33 @@ import { IonicModule } from '@ionic/angular'; }) ``` + + + +```ts title="main.ts" +import { provideIonicAngular } from '@ionic/angular'; + +bootstrapApplication(AppComponent, { + providers: [ + ..., + provideIonicAngular({ + platform: { + /** The default `desktop` function returns false for devices with a touchscreen. + * This is not always wanted, so this function tests the User Agent instead. + **/ + 'desktop': (win) => { + const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(win.navigator.userAgent); + return !isMobile; + } + }, + }) + ] +}) +``` + + + + ```ts type PlatformConfig = { android?: ((win: Window) => boolean) | undefined; diff --git a/docs/angular/quickstart.md b/docs/angular/quickstart.md index f937ed99ee6..e2c74442b9b 100644 --- a/docs/angular/quickstart.md +++ b/docs/angular/quickstart.md @@ -83,7 +83,7 @@ The root of your app is defined in `app.component.ts`: ```ts title="src/app/app.component.ts" import { Component } from '@angular/core'; -import { IonApp, IonRouterOutlet } from '@ionic/angular/standalone'; +import { IonApp, IonRouterOutlet } from '@ionic/angular'; @Component({ selector: 'app-root', @@ -133,7 +133,7 @@ The Home page component, defined in `home.page.ts`, imports the Ionic components ```ts title="src/app/home/home.page.ts" import { Component } from '@angular/core'; -import { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone'; +import { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular'; @Component({ selector: 'app-home', @@ -193,7 +193,7 @@ You can enhance your Home page with more Ionic UI components. For example, add a Then, import the `IonButton` component in `home.page.ts`: ```ts title="src/app/home/home.page.ts" -import { IonButton, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone'; +import { IonButton, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular'; @Component({ // ...existing config... @@ -227,7 +227,7 @@ In `new.page.html`, you can add a [Back Button](/docs/api/back-button.md) to the And import `IonBackButton` and `IonButtons` in `new.page.ts`: ```ts title="src/app/new/new.page.ts" -import { IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone'; +import { IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular'; @Component({ // ...existing config... @@ -277,7 +277,7 @@ You'll also need to import and register these icons in `new.page.ts`: ```ts title="src/app/new/new.page.ts" // ...existing imports... -import { IonBackButton, IonButtons, IonContent, IonHeader, IonIcon, IonTitle, IonToolbar } from '@ionic/angular/standalone'; +import { IonBackButton, IonButtons, IonContent, IonHeader, IonIcon, IonTitle, IonToolbar } from '@ionic/angular'; import { addIcons } from 'ionicons'; import { heart, logoIonic } from 'ionicons/icons'; @@ -346,7 +346,7 @@ import { IonLabel, IonTitle, IonToolbar, -} from '@ionic/angular/standalone'; +} from '@ionic/angular'; import { addIcons } from 'ionicons'; import { heart, logoIonic } from 'ionicons/icons'; diff --git a/docs/angular/slides.md b/docs/angular/slides.md index 5ce50aa09d9..efb46441f4b 100644 --- a/docs/angular/slides.md +++ b/docs/angular/slides.md @@ -155,7 +155,7 @@ We can install the `IonicSlides` module by importing and passing it to the `modu ```typescript // home.page.ts -import { IonicSlides } from '@ionic/angular'; +import { IonicSlides } from '@ionic/angular/lazy'; @Component({ ... @@ -171,7 +171,7 @@ export class HomePage { ```typescript // home.page.ts -import { IonicSlides } from '@ionic/angular/standalone'; +import { IonicSlides } from '@ionic/angular'; @Component({ ... diff --git a/docs/angular/virtual-scroll.md b/docs/angular/virtual-scroll.md index 77e73ae36a1..0ee3289bf3d 100644 --- a/docs/angular/virtual-scroll.md +++ b/docs/angular/virtual-scroll.md @@ -19,7 +19,7 @@ This provides a collection of different utilities, but we'll focus on `Scrolling When we want to use the CDK Scroller, we'll need to import the module in our component. For example, in a tabs starter project, we can add our import to the `tabs1.module.ts` file. ```diff - import { IonicModule } from '@ionic/angular'; + import { IonicModule } from '@ionic/angular/lazy'; import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; diff --git a/docs/angular/your-first-app.md b/docs/angular/your-first-app.md index f445e23054b..e21a9458f36 100644 --- a/docs/angular/your-first-app.md +++ b/docs/angular/your-first-app.md @@ -78,7 +78,7 @@ ionic start photo-gallery tabs --type=angular :::note -When prompted to choose between `NgModules` and `Standalone`, opt for `NgModules` as this tutorial follows the `NgModules` approach. +When prompted to choose between `NgModules` and `Standalone`, choose `Standalone` as this tutorial follows the standalone components approach. ::: @@ -109,17 +109,25 @@ npm install @ionic/pwa-elements Next, import `@ionic/pwa-elements` by editing `src/main.ts`. ```ts -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { AppModule } from './app/app.module'; +import { bootstrapApplication } from '@angular/platform-browser'; +import { RouteReuseStrategy, provideRouter, withPreloading, PreloadAllModules } from '@angular/router'; +import { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular'; // CHANGE: Add the following import import { defineCustomElements } from '@ionic/pwa-elements/loader'; -// CHANGE: Call the element loader before the `bootstrapModule` call +import { routes } from './app/app.routes'; +import { AppComponent } from './app/app.component'; + +// CHANGE: Call the element loader before the `bootstrapApplication` call defineCustomElements(window); -platformBrowserDynamic() - .bootstrapModule(AppModule) - .catch((err) => console.log(err)); +bootstrapApplication(AppComponent, { + providers: [ + { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }, + provideIonicAngular(), + provideRouter(routes, withPreloading(PreloadAllModules)), + ], +}).catch((err) => console.error(err)); ``` That’s it! Now for the fun part - let’s run the app. diff --git a/docs/angular/your-first-app/2-taking-photos.md b/docs/angular/your-first-app/2-taking-photos.md index 5d3b3dec862..92ffeeb2b36 100644 --- a/docs/angular/your-first-app/2-taking-photos.md +++ b/docs/angular/your-first-app/2-taking-photos.md @@ -61,7 +61,23 @@ Notice the magic here: there's no platform-specific code (web, iOS, or Android)! Next, in `tab2.page.ts`, import the `PhotoService` class and add a method to call its `addNewToGallery` method. ```ts -import { Component } from '@angular/core'; +import { Component, inject } from '@angular/core'; +// CHANGE: Import the Ionic standalone components used on this page +import { + IonHeader, + IonToolbar, + IonTitle, + IonContent, + IonGrid, + IonRow, + IonCol, + IonFab, + IonFabButton, + IonIcon, +} from '@ionic/angular'; +// CHANGE: Register the camera icon used by the FAB +import { addIcons } from 'ionicons'; +import { camera } from 'ionicons/icons'; // CHANGE: Import the PhotoService import { PhotoService } from '../services/photo.service'; @@ -69,19 +85,29 @@ import { PhotoService } from '../services/photo.service'; selector: 'app-tab2', templateUrl: 'tab2.page.html', styleUrls: ['tab2.page.scss'], - standalone: false, + // CHANGE: Add the standalone component imports + imports: [IonHeader, IonToolbar, IonTitle, IonContent, IonGrid, IonRow, IonCol, IonFab, IonFabButton, IonIcon], }) export class Tab2Page { - // CHANGE: Update constructor to include `photoService` - constructor(public photoService: PhotoService) {} + // CHANGE: Inject the PhotoService + public photoService = inject(PhotoService); - // CHANGE: Add `addNewToGallery()` method + constructor() { + // CHANGE: Register the icons this page uses + addIcons({ camera }); + } + + // CHANGE: Add `addPhotoToGallery()` method addPhotoToGallery() { this.photoService.addNewToGallery(); } } ``` +:::note +In a standalone app there is no global icon registry, so each icon you reference by name (like `camera`) must be registered with `addIcons`. Import the specific Ionic components a page uses from `@ionic/angular` and list them in the component's `imports` array. +::: + Then, open `tab2.page.html` and call the `addPhotoToGallery()` method when the FAB is tapped/clicked: ```html @@ -131,12 +157,12 @@ export interface UserPhoto { } ``` -Above the `addNewToGallery()` method, define an array of `UserPhoto`, which will contain a reference to each photo captured with the Camera. +Above the `addNewToGallery()` method, define a [signal](https://angular.dev/guide/signals) that holds an array of `UserPhoto`, which will contain a reference to each photo captured with the Camera. A signal is used so that the gallery view updates automatically when photos change - important in a zoneless app, where mutating a plain array would not trigger a re-render. ```ts export class PhotoService { - // CHANGE: Add the `photos` array - public photos: UserPhoto[] = []; + // CHANGE: Add the `photos` signal + public photos = signal([]); public async addNewToGallery() { // ...existing code... @@ -144,7 +170,7 @@ export class PhotoService { } ``` -Over in the `addNewToGallery` method, add the newly captured photo to the beginning of the `photos` array. +Over in the `addNewToGallery` method, add the newly captured photo to the beginning of the `photos` signal. Reading and updating a signal is done by calling it: `this.photos()` returns the current value, and `this.photos.update()` sets a new one. ```ts // CHANGE: Update `addNewToGallery()` method @@ -156,25 +182,28 @@ public async addNewToGallery() { quality: 100 }); - // CHANGE: Add the new photo to the photos array - this.photos.unshift({ - filepath: "soon...", - webviewPath: capturedPhoto.webPath! - }); + // CHANGE: Add the new photo to the front of the photos signal + this.photos.update((photos) => [ + { + filepath: 'soon...', + webviewPath: capturedPhoto.webPath!, + }, + ...photos, + ]); } ``` `photo.service.ts` should now look like this: ```ts -import { Injectable } from '@angular/core'; +import { Injectable, signal } from '@angular/core'; import { Camera, CameraResultType, CameraSource } from '@capacitor/camera'; @Injectable({ providedIn: 'root', }) export class PhotoService { - public photos: UserPhoto[] = []; + public photos = signal([]); public async addNewToGallery() { // Take a photo @@ -184,10 +213,13 @@ export class PhotoService { quality: 100, }); - this.photos.unshift({ - filepath: 'soon...', - webviewPath: capturedPhoto.webPath!, - }); + this.photos.update((photos) => [ + { + filepath: 'soon...', + webviewPath: capturedPhoto.webPath!, + }, + ...photos, + ]); } } @@ -197,7 +229,7 @@ export interface UserPhoto { } ``` -Next, switch to `tab2.page.html` to display the images. We'll add a [Grid component](../../api/grid.md) to ensure the photos display neatly as they're added to the gallery. Inside the grid, loop through each photo in the `PhotoService`'s `photos` array. For each item, add an [Image component](../../api/img.md) and set its `src` property to the photo's path. +Next, switch to `tab2.page.html` to display the images. We'll add a [Grid component](../../api/grid.md) so the photos display neatly as they're added to the gallery. Inside the grid, loop through each photo in the `PhotoService`'s `photos` signal with the built-in [`@for`](https://angular.dev/guide/templates/control-flow#for-block-repeaters) block - calling `photoService.photos()` reads the signal's current value. For each item, add an `` element and set its `src` property to the photo's path. ```html @@ -216,10 +248,12 @@ Next, switch to `tab2.page.html` to display the images. We'll add a [Grid compon - - - + + @for (photo of photoService.photos(); track photo.filepath; let position = $index) { + + + } diff --git a/docs/angular/your-first-app/3-saving-photos.md b/docs/angular/your-first-app/3-saving-photos.md index 4212757730d..2986081b7f4 100644 --- a/docs/angular/your-first-app/3-saving-photos.md +++ b/docs/angular/your-first-app/3-saving-photos.md @@ -46,14 +46,14 @@ export interface UserPhoto { We can use this new method immediately in `addNewToGallery()`. ```ts -import { Injectable } from '@angular/core'; +import { Injectable, signal } from '@angular/core'; import { Camera, CameraResultType, CameraSource, Photo } from '@capacitor/camera'; @Injectable({ providedIn: 'root', }) export class PhotoService { - public photos: UserPhoto[] = []; + public photos = signal([]); // CHANGE: Update the `addNewToGallery()` method public async addNewToGallery() { @@ -68,8 +68,8 @@ export class PhotoService { // Save the picture and add it to photo collection const savedImageFile = await this.savePicture(capturedPhoto); - // CHANGE: Update argument to unshift array method - this.photos.unshift(savedImageFile); + // CHANGE: Add the saved photo to the front of the photos signal + this.photos.update((photos) => [savedImageFile, ...photos]); } private async savePicture(photo: Photo) { @@ -150,7 +150,7 @@ export interface UserPhoto { `photo.service.ts` should now look like this: ```ts -import { Injectable } from '@angular/core'; +import { Injectable, signal } from '@angular/core'; import { Camera, CameraResultType, CameraSource } from '@capacitor/camera'; import type { Photo } from '@capacitor/camera'; import { Filesystem, Directory } from '@capacitor/filesystem'; @@ -159,7 +159,7 @@ import { Filesystem, Directory } from '@capacitor/filesystem'; providedIn: 'root', }) export class PhotoService { - public photos: UserPhoto[] = []; + public photos = signal([]); public async addNewToGallery() { // Take a photo @@ -172,7 +172,7 @@ export class PhotoService { // Save the picture and add it to photo collection const savedImageFile = await this.savePicture(capturedPhoto); - this.photos.unshift(savedImageFile); + this.photos.update((photos) => [savedImageFile, ...photos]); } private async savePicture(photo: Photo) { diff --git a/docs/angular/your-first-app/4-loading-photos.md b/docs/angular/your-first-app/4-loading-photos.md index d8c58c39f7d..1855f976c54 100644 --- a/docs/angular/your-first-app/4-loading-photos.md +++ b/docs/angular/your-first-app/4-loading-photos.md @@ -21,7 +21,7 @@ Open `photo.service.ts` and begin by defining a new property in the `PhotoServic ```ts export class PhotoService { - public photos: UserPhoto[] = []; + public photos = signal([]); // CHANGE: Add a key for photo storage private PHOTO_STORAGE: string = 'photos'; @@ -57,12 +57,12 @@ export class PhotoService { const savedImageFile = await this.savePicture(capturedPhoto); - this.photos.unshift(savedImageFile); + this.photos.update((photos) => [savedImageFile, ...photos]); // CHANGE: Add method to cache all photo data for future retrieval Preferences.set({ key: this.PHOTO_STORAGE, - value: JSON.stringify(this.photos), + value: JSON.stringify(this.photos()), }); } @@ -85,7 +85,7 @@ export class PhotoService { public async loadSaved() { // Retrieve cached photo array data const { value: photoList } = await Preferences.get({ key: this.PHOTO_STORAGE }); - this.photos = (photoList ? JSON.parse(photoList) : []) as UserPhoto[]; + this.photos.set((photoList ? JSON.parse(photoList) : []) as UserPhoto[]); } } ``` @@ -100,10 +100,10 @@ export class PhotoService { public async loadSaved() { // Retrieve cached photo array data const { value: photoList } = await Preferences.get({ key: this.PHOTO_STORAGE }); - this.photos = (photoList ? JSON.parse(photoList) : []) as UserPhoto[]; + const photos = (photoList ? JSON.parse(photoList) : []) as UserPhoto[]; // CHANGE: Display the photo by reading into base64 format - for (let photo of this.photos) { + for (const photo of photos) { // Read each saved photo's data from the Filesystem const readFile = await Filesystem.readFile({ path: photo.filepath, @@ -113,6 +113,9 @@ export class PhotoService { // Web platform only: Load the photo as base64 data photo.webviewPath = `data:image/jpeg;base64,${readFile.data}`; } + + // CHANGE: Set the signal so the gallery view updates + this.photos.set(photos); } } ``` @@ -120,7 +123,7 @@ export class PhotoService { `photo.service.ts` should now look like this: ```ts -import { Injectable } from '@angular/core'; +import { Injectable, signal } from '@angular/core'; import { Camera, CameraResultType, CameraSource } from '@capacitor/camera'; import type { Photo } from '@capacitor/camera'; import { Filesystem, Directory } from '@capacitor/filesystem'; @@ -130,7 +133,7 @@ import { Preferences } from '@capacitor/preferences'; providedIn: 'root', }) export class PhotoService { - public photos: UserPhoto[] = []; + public photos = signal([]); private PHOTO_STORAGE: string = 'photos'; @@ -145,11 +148,11 @@ export class PhotoService { // Save the picture and add it to photo collection const savedImageFile = await this.savePicture(capturedPhoto); - this.photos.unshift(savedImageFile); + this.photos.update((photos) => [savedImageFile, ...photos]); Preferences.set({ key: this.PHOTO_STORAGE, - value: JSON.stringify(this.photos), + value: JSON.stringify(this.photos()), }); } @@ -189,9 +192,9 @@ export class PhotoService { public async loadSaved() { // Retrieve cached photo array data const { value: photoList } = await Preferences.get({ key: this.PHOTO_STORAGE }); - this.photos = (photoList ? JSON.parse(photoList) : []) as UserPhoto[]; + const photos = (photoList ? JSON.parse(photoList) : []) as UserPhoto[]; - for (let photo of this.photos) { + for (const photo of photos) { // Read each saved photo's data from the Filesystem const readFile = await Filesystem.readFile({ path: photo.filepath, @@ -201,6 +204,8 @@ export class PhotoService { // Web platform only: Load the photo as base64 data photo.webviewPath = `data:image/jpeg;base64,${readFile.data}`; } + + this.photos.set(photos); } } @@ -215,17 +220,35 @@ Our `PhotoService` can now load the saved images, but we'll need to update `tab2 Update `tab2.page.ts` to look like the following: ```ts -import { Component } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; +import { + IonHeader, + IonToolbar, + IonTitle, + IonContent, + IonGrid, + IonRow, + IonCol, + IonFab, + IonFabButton, + IonIcon, +} from '@ionic/angular'; +import { addIcons } from 'ionicons'; +import { camera } from 'ionicons/icons'; import { PhotoService } from '../services/photo.service'; @Component({ selector: 'app-tab2', templateUrl: 'tab2.page.html', styleUrls: ['tab2.page.scss'], - standalone: false, + imports: [IonHeader, IonToolbar, IonTitle, IonContent, IonGrid, IonRow, IonCol, IonFab, IonFabButton, IonIcon], }) -export class Tab2Page { - constructor(public photoService: PhotoService) {} +export class Tab2Page implements OnInit { + public photoService = inject(PhotoService); + + constructor() { + addIcons({ camera }); + } // CHANGE: Add call to `loadSaved()` when navigating to the Photos tab async ngOnInit() { diff --git a/docs/angular/your-first-app/5-adding-mobile.md b/docs/angular/your-first-app/5-adding-mobile.md index aee2ab86be9..ce7c3480d17 100644 --- a/docs/angular/your-first-app/5-adding-mobile.md +++ b/docs/angular/your-first-app/5-adding-mobile.md @@ -22,7 +22,7 @@ Import the Ionic [Platform API](../platform.md) into `photo.service.ts`, which i Add `Platform` to the imports at the top of the file and a new property `platform` to the `PhotoService` class. We'll also need to update the constructor to set the user's platform. ```ts -import { Injectable } from '@angular/core'; +import { Injectable, inject, signal } from '@angular/core'; import { Camera, CameraResultType, CameraSource } from '@capacitor/camera'; import type { Photo } from '@capacitor/camera'; import { Filesystem, Directory } from '@capacitor/filesystem'; @@ -34,17 +34,12 @@ import { Platform } from '@ionic/angular'; providedIn: 'root', }) export class PhotoService { - public photos: UserPhoto[] = []; + public photos = signal([]); private PHOTO_STORAGE: string = 'photos'; - // CHANGE: Add a property to track the app's running platform - private platform: Platform; - - // CHANGE: Update constructor to set `platform` - constructor(platform: Platform) { - this.platform = platform; - } + // CHANGE: Inject the Platform API to track the app's running platform + private platform = inject(Platform); // ...existing code... } @@ -96,7 +91,7 @@ private async savePicture(photo: Photo) { When running on mobile, set `filepath` to the result of the `writeFile()` operation - `savedFile.uri`. When setting the `webviewPath`, use the special `Capacitor.convertFileSrc()` method ([details on the File Protocol](../../core-concepts/webview.md#file-protocol)). To use this method, we'll need to import Capacitor into `photo.service.ts`. ```ts -import { Injectable } from '@angular/core'; +import { Injectable, inject, signal } from '@angular/core'; import { Camera, CameraResultType, CameraSource } from '@capacitor/camera'; import type { Photo } from '@capacitor/camera'; import { Filesystem, Directory } from '@capacitor/filesystem'; @@ -159,12 +154,12 @@ Next, add a new bit of logic in the `loadSaved()` method. On mobile, we can dire // CHANGE: Update `loadSaved()` method public async loadSaved() { const { value: photoList } = await Preferences.get({ key: this.PHOTO_STORAGE }); - this.photos = (photoList ? JSON.parse(photoList) : []) as UserPhoto[]; + const photos = (photoList ? JSON.parse(photoList) : []) as UserPhoto[]; // CHANGE: Add platform check // If running on the web... if (!this.platform.is('hybrid')) { - for (let photo of this.photos) { + for (const photo of photos) { const readFile = await Filesystem.readFile({ path: photo.filepath, directory: Directory.Data @@ -174,6 +169,9 @@ public async loadSaved() { photo.webviewPath = `data:image/jpeg;base64,${readFile.data}`; } } + + // CHANGE: Set the signal so the gallery view updates + this.photos.set(photos); } ``` @@ -182,7 +180,7 @@ Our Photo Gallery now consists of one codebase that runs on the web, Android, an `photos.service.ts` should now look like this: ```ts -import { Injectable } from '@angular/core'; +import { Injectable, inject, signal } from '@angular/core'; import { Camera, CameraResultType, CameraSource } from '@capacitor/camera'; import type { Photo } from '@capacitor/camera'; import { Filesystem, Directory } from '@capacitor/filesystem'; @@ -194,15 +192,11 @@ import { Capacitor } from '@capacitor/core'; providedIn: 'root', }) export class PhotoService { - public photos: UserPhoto[] = []; + public photos = signal([]); private PHOTO_STORAGE: string = 'photos'; - private platform: Platform; - - constructor(platform: Platform) { - this.platform = platform; - } + private platform = inject(Platform); public async addNewToGallery() { // Take a photo @@ -214,11 +208,11 @@ export class PhotoService { const savedImageFile = await this.savePicture(capturedPhoto); - this.photos.unshift(savedImageFile); + this.photos.update((photos) => [savedImageFile, ...photos]); Preferences.set({ key: this.PHOTO_STORAGE, - value: JSON.stringify(this.photos), + value: JSON.stringify(this.photos()), }); } @@ -279,11 +273,11 @@ export class PhotoService { public async loadSaved() { // Retrieve cached photo array data const { value: photoList } = await Preferences.get({ key: this.PHOTO_STORAGE }); - this.photos = (photoList ? JSON.parse(photoList) : []) as UserPhoto[]; + const photos = (photoList ? JSON.parse(photoList) : []) as UserPhoto[]; // If running on the web... if (!this.platform.is('hybrid')) { - for (let photo of this.photos) { + for (const photo of photos) { const readFile = await Filesystem.readFile({ path: photo.filepath, directory: Directory.Data, @@ -292,6 +286,8 @@ export class PhotoService { photo.webviewPath = `data:image/jpeg;base64,${readFile.data}`; } } + + this.photos.set(photos); } } diff --git a/docs/angular/your-first-app/7-live-reload.md b/docs/angular/your-first-app/7-live-reload.md index 1d24eecd741..7a697854dcc 100644 --- a/docs/angular/your-first-app/7-live-reload.md +++ b/docs/angular/your-first-app/7-live-reload.md @@ -38,7 +38,7 @@ With Live Reload running and the app open on your device, let’s implement phot In `photo.service.ts`, add the `deletePhoto()` method. The selected photo is removed from the `photos` array first. Then, we use the Capacitor Preferences API to update the cached version of the `photos` array. Finally, we delete the actual photo file itself using the Filesystem API. ```ts -import { Injectable } from '@angular/core'; +import { Injectable, inject, signal } from '@angular/core'; import { Camera, CameraResultType, CameraSource } from '@capacitor/camera'; import type { Photo } from '@capacitor/camera'; import { Filesystem, Directory } from '@capacitor/filesystem'; @@ -54,13 +54,13 @@ export class PhotoService { // CHANGE: Add `deletePhoto()` method public async deletePhoto(photo: UserPhoto, position: number) { - // Remove this photo from the Photos reference data array - this.photos.splice(position, 1); + // Remove this photo from the photos signal + this.photos.update((photos) => photos.filter((_, index) => index !== position)); // Update photos array cache by overwriting the existing photo array Preferences.set({ key: this.PHOTO_STORAGE, - value: JSON.stringify(this.photos), + value: JSON.stringify(this.photos()), }); // Delete photo file from filesystem @@ -82,24 +82,51 @@ export interface UserPhoto { Next, in `tab2.page.ts`, implement the `showActionSheet()` method. We're adding two options: "Delete", which calls `PhotoService.deletePhoto()`, and "Cancel". The cancel button will automatically close the action sheet when assigned the "cancel" role. ```ts -import { Component } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; +import { + IonHeader, + IonToolbar, + IonTitle, + IonContent, + IonGrid, + IonRow, + IonCol, + IonFab, + IonFabButton, + IonIcon, + // CHANGE: Add import + ActionSheetController, +} from '@ionic/angular'; +import { addIcons } from 'ionicons'; +// CHANGE: Register the `trash` and `close` icons used by the action sheet +import { camera, trash, close } from 'ionicons/icons'; // Change: Add import import type { UserPhoto } from '../services/photo.service'; import { PhotoService } from '../services/photo.service'; -// CHANGE: Add import -import { ActionSheetController } from '@ionic/angular'; @Component({ selector: 'app-tab2', templateUrl: 'tab2.page.html', styleUrls: ['tab2.page.scss'], - standalone: false, + imports: [IonHeader, IonToolbar, IonTitle, IonContent, IonGrid, IonRow, IonCol, IonFab, IonFabButton, IonIcon], }) -export class Tab2Page { - // CHANGE: Update constructor - constructor(public photoService: PhotoService, public actionSheetController: ActionSheetController) {} +export class Tab2Page implements OnInit { + public photoService = inject(PhotoService); + // CHANGE: Inject the ActionSheetController + private actionSheetController = inject(ActionSheetController); + + constructor() { + // CHANGE: Register the icons this page uses + addIcons({ camera, trash, close }); + } - // ...existing code... + async ngOnInit() { + await this.photoService.loadSaved(); + } + + addPhotoToGallery() { + this.photoService.addNewToGallery(); + } // CHANGE: Add `showActionSheet()` method public async showActionSheet(photo: UserPhoto, position: number) { @@ -129,7 +156,7 @@ export class Tab2Page { } ``` -Open `tab2.page.html` and add a new click handler to each `` element. When the app user taps on a photo in our gallery, we’ll display an [Action Sheet](../../api/action-sheet.md) dialog with the option to either delete the selected photo or cancel (close) the dialog. +Open `tab2.page.html` and wrap each image in a ` + } @@ -162,10 +193,31 @@ Open `tab2.page.html` and add a new click handler to each `` element. W ``` +Add the following CSS to `tab2.page.scss` to style the gallery buttons and images: + +```css +ion-col > button { + display: block; + width: 100%; + background: none; + border: none; + padding: 0; + margin: 0; + cursor: pointer; + font: inherit; +} + +button img { + display: block; + width: 100%; + height: auto; +} +``` + Tap on a photo again and choose the “Delete” option. The photo is deleted! Implemented much faster using Live Reload. 💪 :::note -Remember, you can find the [complete source code for this app](https://github.com/ionic-team/photo-gallery-capacitor-ng) on GitHub. +Remember, you can find the [complete source code for this app](https://github.com/ionic-team/tutorial-photo-gallery-angular) on GitHub. ::: In the final portion of this tutorial, we’ll walk you through the basics of the Appflow product used to build and deploy your application to users' devices. diff --git a/docs/angular/zoneless.md b/docs/angular/zoneless.md new file mode 100644 index 00000000000..bbcb5031ab5 --- /dev/null +++ b/docs/angular/zoneless.md @@ -0,0 +1,154 @@ +--- +title: Zoneless Change Detection +sidebar_label: Zoneless +--- + + + Zoneless Change Detection with Ionic and Angular + + + +Angular 21 made [zoneless change detection](https://angular.dev/guide/zoneless) the default, removing the dependency on Zone.js. This guide covers what you need to know to run an Ionic Angular app without Zone.js. + +With Zone.js, Angular automatically re-renders after almost any asynchronous task. Without it, Angular only re-renders when you explicitly tell it the view is out of date. Most of your app keeps working unchanged, but a few patterns that relied on Zone.js need a small adjustment. + +## What keeps working automatically + +You do not need to change these. Angular schedules change detection for them in a zoneless app: + +- Template event bindings: `(click)`, `(ionChange)`, `(ionInput)`, and every other `(event)` handler. +- Host listeners (`@HostListener`), including the ones Ionic's form value accessors use, so `[(ngModel)]` and reactive forms stay in sync. +- Signal updates that are read in a template. +- The `async` pipe. +- Ionic page lifecycle hooks (`ionViewWillEnter`, `ionViewDidEnter`, `ionViewWillLeave`, `ionViewDidLeave`) that set state synchronously. Ionic notifies Angular after each hook runs. +- Navigation, route transitions, and tab switching. + +:::note[Angular 22] +Angular 22 also makes `OnPush` the default change detection strategy. Under `OnPush`, synchronous state set as a plain field (including in the lifecycle hooks above) no longer re-renders on its own, even though Ionic notifies Angular. Signals still update the view. For the migration path, refer to the [OnPush Change Detection section of the Ionic 9 upgrade guide](/docs/updating/9-0.md#onpush-change-detection-on-angular-22). +::: + +## What needs a notification + +When you update component state from an asynchronous callback that Angular did not wrap, nothing schedules a re-render. The state changes, but the view does not update. This applies to any Angular code, not only Ionic, and the common sources in an Ionic app are: + +- Awaiting an overlay result, such as `await modal.onWillDismiss()` or `loading.onDidDismiss().then(...)`. +- Asynchronous work started inside a lifecycle hook, for example a `setTimeout` or `fetch` in `ionViewWillEnter`. +- `Platform` event subscriptions (`backButton`, `resize`, `pause`, `resume`, keyboard events) and `Platform.ready()`. +- Any `setTimeout`, `setInterval`, or RxJS subscription that assigns to a component field. + +You can notify Angular in two ways: write to a [signal](https://angular.dev/guide/signals) that the template reads, or inject `ChangeDetectorRef` and call `markForCheck()` after the update. We recommend signals because they work the same with or without Zone.js. + +### Signals (recommended) + +Writing a signal that a template reads schedules change detection automatically, so there is nothing extra to remember after the update. + +```ts +import { Component, inject, signal } from '@angular/core'; +import { ModalController } from '@ionic/angular'; +import { PickerModal } from './picker.modal'; + +@Component({ + selector: 'app-home', + template: ` + Pick a value +

Selected: {{ selected() }}

+ `, +}) +export class HomePage { + private modalCtrl = inject(ModalController); + readonly selected = signal(undefined); + + async pick() { + const modal = await this.modalCtrl.create({ component: PickerModal }); + await modal.present(); + + const { data } = await modal.onWillDismiss(); + // Writing the signal updates the view automatically. + this.selected.set(data); + } +} +``` + +### `ChangeDetectorRef.markForCheck()` + +If you are not using signals for a particular piece of state, inject `ChangeDetectorRef` and call `markForCheck()` after the asynchronous update. It is a no-op-or-better under Zone.js, so it is safe to leave in place if you later re-enable zones. + +```ts +import { ChangeDetectorRef, Component, inject } from '@angular/core'; + +@Component({ + selector: 'app-list', + template: `@for (item of items; track item) { {{ item }} }`, +}) +export class ListPage { + private cdr = inject(ChangeDetectorRef); + items: string[] = []; + + ionViewWillEnter() { + // Asynchronous work inside a lifecycle hook still needs a notification. + setTimeout(() => { + this.items = ['A', 'B', 'C']; + this.cdr.markForCheck(); + }, 1000); + } +} +``` + +## Common Ionic patterns + +These apply the two approaches above to patterns you are likely to hit in an Ionic app. + +### Inline overlays with dynamic content + +Content projected into an inline `ion-modal` or `ion-popover` follows the same rule. If you populate it asynchronously, update a signal or call `markForCheck()`: + +```ts +@Component({ + selector: 'app-inline', + template: ` + + + + @for (item of items(); track item) { + {{ item }} + } + + + + `, +}) +export class InlinePage { + readonly items = signal([]); + + open(popover: IonPopover) { + popover.present(); + setTimeout(() => this.items.set(['A', 'B', 'C', 'D']), 1000); + } +} +``` + +Inline overlays also expose their events as outputs (for example `ionModalDidDismiss`), which you can convert to a signal with [`toSignal`](https://angular.dev/api/core/rxjs-interop/toSignal) if you prefer a reactive style. + +### Platform events + +`Platform` exposes its events as RxJS subjects. Update a signal inside the subscription so the view reflects the change: + +```ts +export class AppComponent { + private platform = inject(Platform); + readonly isLandscape = signal(false); + + constructor() { + this.platform.resize.subscribe(() => { + this.isLandscape.set(this.platform.isLandscape()); + }); + } +} +``` + +## Staying on Zone.js + +If you are not ready to adopt zoneless change detection, you can opt back into Zone.js with `provideZoneChangeDetection()`. Refer to the [Keeping Zone.js section of the Ionic 9 upgrade guide](/docs/updating/9-0.md#keeping-zonejs) for the exact configuration. diff --git a/docs/api/accordion-group.md b/docs/api/accordion-group.md index 0000f6774c5..79783a6d71e 100644 --- a/docs/api/accordion-group.md +++ b/docs/api/accordion-group.md @@ -1,12 +1,12 @@ --- title: "ion-accordion-group" --- -import Props from '@ionic-internal/component-api/v8/accordion-group/props.md'; -import Events from '@ionic-internal/component-api/v8/accordion-group/events.md'; -import Methods from '@ionic-internal/component-api/v8/accordion-group/methods.md'; -import Parts from '@ionic-internal/component-api/v8/accordion-group/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/accordion-group/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/accordion-group/slots.md'; +import Props from '@ionic-internal/component-api/v9/accordion-group/props.md'; +import Events from '@ionic-internal/component-api/v9/accordion-group/events.md'; +import Methods from '@ionic-internal/component-api/v9/accordion-group/methods.md'; +import Parts from '@ionic-internal/component-api/v9/accordion-group/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/accordion-group/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/accordion-group/slots.md'; import EncapsulationPill from '@components/page/api/EncapsulationPill'; diff --git a/docs/api/accordion.md b/docs/api/accordion.md index 728d5378b9f..9040bed140f 100644 --- a/docs/api/accordion.md +++ b/docs/api/accordion.md @@ -1,12 +1,12 @@ --- title: "ion-accordion" --- -import Props from '@ionic-internal/component-api/v8/accordion/props.md'; -import Events from '@ionic-internal/component-api/v8/accordion/events.md'; -import Methods from '@ionic-internal/component-api/v8/accordion/methods.md'; -import Parts from '@ionic-internal/component-api/v8/accordion/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/accordion/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/accordion/slots.md'; +import Props from '@ionic-internal/component-api/v9/accordion/props.md'; +import Events from '@ionic-internal/component-api/v9/accordion/events.md'; +import Methods from '@ionic-internal/component-api/v9/accordion/methods.md'; +import Parts from '@ionic-internal/component-api/v9/accordion/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/accordion/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/accordion/slots.md'; ion-accordion: Accordion Components: How to Build & Examples @@ -22,7 +22,7 @@ Accordions provide collapsible sections in your content to reduce vertical space ## Basic Usage -import Basic from '@site/static/usage/v8/accordion/basic/index.md'; +import Basic from '@site/static/usage/v9/accordion/basic/index.md'; @@ -30,7 +30,7 @@ import Basic from '@site/static/usage/v8/accordion/basic/index.md'; Which accordion is open is controlled by setting the `value` property on `ion-accordion-group`. Setting this property allows developers to programmatically expand or collapse certain accordions. -import Toggle from '@site/static/usage/v8/accordion/toggle/index.md'; +import Toggle from '@site/static/usage/v9/accordion/toggle/index.md'; @@ -44,7 +44,7 @@ When using other components that emit `ionChange` inside of Accordion it is reco Developers can listen for the `ionChange` event to be notified when accordions expand or collapse. -import ListenChanges from '@site/static/usage/v8/accordion/listen-changes/index.md'; +import ListenChanges from '@site/static/usage/v9/accordion/listen-changes/index.md'; @@ -52,7 +52,7 @@ import ListenChanges from '@site/static/usage/v8/accordion/listen-changes/index. Developers can allow multiple accordions to be open at once with the `multiple` property. -import Multiple from '@site/static/usage/v8/accordion/multiple/index.md'; +import Multiple from '@site/static/usage/v9/accordion/multiple/index.md'; @@ -62,7 +62,7 @@ import Multiple from '@site/static/usage/v8/accordion/multiple/index.md'; Individual accordions can be disabled with the `disabled` property on `ion-accordion`. -import DisableIndividual from '@site/static/usage/v8/accordion/disable/individual/index.md'; +import DisableIndividual from '@site/static/usage/v9/accordion/disable/individual/index.md'; @@ -70,7 +70,7 @@ import DisableIndividual from '@site/static/usage/v8/accordion/disable/individua The accordion group can be disabled with the `disabled` property on `ion-accordion-group`. -import DisableGroup from '@site/static/usage/v8/accordion/disable/group/index.md'; +import DisableGroup from '@site/static/usage/v9/accordion/disable/group/index.md'; @@ -80,7 +80,7 @@ import DisableGroup from '@site/static/usage/v8/accordion/disable/group/index.md Individual accordions can be disabled with the `readonly` property on `ion-accordion`. -import ReadonlyIndividual from '@site/static/usage/v8/accordion/readonly/individual/index.md'; +import ReadonlyIndividual from '@site/static/usage/v9/accordion/readonly/individual/index.md'; @@ -88,7 +88,7 @@ import ReadonlyIndividual from '@site/static/usage/v8/accordion/readonly/individ The accordion group can be disabled with the `readonly` property on `ion-accordion-group`. -import ReadonlyGroup from '@site/static/usage/v8/accordion/readonly/group/index.md'; +import ReadonlyGroup from '@site/static/usage/v9/accordion/readonly/group/index.md'; @@ -112,7 +112,7 @@ There are two built in expansion styles: `compact` and `inset`. This expansion s When `expand="inset"`, the accordion group is given a border radius. On `md` mode, the entire accordion will shift down when it is opened. -import ExpansionStyles from '@site/static/usage/v8/accordion/customization/expansion-styles/index.md'; +import ExpansionStyles from '@site/static/usage/v9/accordion/customization/expansion-styles/index.md'; @@ -136,7 +136,7 @@ ion-accordion.accordion-expanded ion-item[slot="header"] { } ``` -import AdvancedExpansionStyles from '@site/static/usage/v8/accordion/customization/advanced-expansion-styles/index.md'; +import AdvancedExpansionStyles from '@site/static/usage/v9/accordion/customization/advanced-expansion-styles/index.md'; @@ -148,7 +148,7 @@ If you would like to manage the icon yourself or use an icon that is not an `ion Regardless of which option you choose, the icon will automatically be rotated when you expand or collapse the accordion. -import Icons from '@site/static/usage/v8/accordion/customization/icons/index.md'; +import Icons from '@site/static/usage/v9/accordion/customization/icons/index.md'; @@ -156,7 +156,7 @@ import Icons from '@site/static/usage/v8/accordion/customization/icons/index.md' Since `ion-accordion` acts as a shell around the header and content elements, you can easily theme the accordion however you would like. You can theme the header by targeting the slotted `ion-item`. Since you are using `ion-item`, you also have access to all of the [ion-item CSS Variables](./item#css-custom-properties) and [ion-item Shadow Parts](./item#css-shadow-parts). Theming the content is also easily achieved by targeting the element that is in the `content` slot. -import Theming from '@site/static/usage/v8/accordion/customization/theming/index.md'; +import Theming from '@site/static/usage/v9/accordion/customization/theming/index.md'; @@ -166,7 +166,7 @@ import Theming from '@site/static/usage/v8/accordion/customization/theming/index By default, animations are enabled when expanding or collapsing an accordion item. Animations will be automatically disabled when the `prefers-reduced-motion` media query is supported and set to `reduce`. For browsers that do not support this, animations can be disabled by setting the `animated` config in your Ionic Framework app. -import AccessibilityAnimations from '@site/static/usage/v8/accordion/accessibility/animations/index.md'; +import AccessibilityAnimations from '@site/static/usage/v9/accordion/accessibility/animations/index.md'; @@ -190,11 +190,11 @@ When used inside an `ion-accordion-group`, `ion-accordion` has full keyboard sup The accordion animation works by knowing the height of the `content` slot when the animation starts. The accordion expects that this height will remain consistent throughout the animation. As a result, developers should avoid performing any operation that may change the height of the content during the animation. -For example, using [ion-img](./img) may cause layout shifts as it lazily loads images. This means that as the animation plays, `ion-img` will load the image data, and the dimensions of `ion-img` will change to account for the loaded image data. This can result in the height of the `content` slot changing. Developers have a few options for avoiding this: +For example, lazily loading images may cause layout shifts as they load. As the animation plays, a lazily loaded image (such as a native `` with `loading="lazy"`) loads its data and changes its dimensions to fit, which can change the height of the `content` slot. Developers have a few options for avoiding this: -1. Use an `img` element without any lazy loading. `ion-img` always uses lazy loading, but `img` does not use lazy loading by default. This is the simplest option and works well if you have small images that do not significantly benefit from lazy loading. +1. Load images eagerly by omitting `loading="lazy"`. An `` does not lazy load by default, so the image loads up front instead of during the animation. This is the simplest option and works well if you have small images that do not significantly benefit from lazy loading. -2. Set a minimum width and height on `ion-img`. If you need to use lazy loading and know the dimensions of the images ahead of time (such as if you are loading icons of the same size), you can set the `ion-img` to have a minimum width or height using CSS. This gives developers the benefit of lazy loading while avoiding layout shifts. This works when using an `img` element with `loading="lazy"` too! +2. Reserve space for the image ahead of time. If you need lazy loading and know the dimensions of the images (such as loading icons of the same size), set a width and height on the `` using its attributes or CSS. This gives you the benefit of lazy loading while avoiding layout shifts. 3. If neither of these options are applicable, developers may want to consider disabling animations altogether by using the `animated` property on [ion-accordion-group](./accordion-group). diff --git a/docs/api/action-sheet.md b/docs/api/action-sheet.md index 1ff6ff2a26f..13eebe6934e 100644 --- a/docs/api/action-sheet.md +++ b/docs/api/action-sheet.md @@ -4,12 +4,12 @@ title: "ion-action-sheet" import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -import Props from '@ionic-internal/component-api/v8/action-sheet/props.md'; -import Events from '@ionic-internal/component-api/v8/action-sheet/events.md'; -import Methods from '@ionic-internal/component-api/v8/action-sheet/methods.md'; -import Parts from '@ionic-internal/component-api/v8/action-sheet/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/action-sheet/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/action-sheet/slots.md'; +import Props from '@ionic-internal/component-api/v9/action-sheet/props.md'; +import Events from '@ionic-internal/component-api/v9/action-sheet/events.md'; +import Methods from '@ionic-internal/component-api/v9/action-sheet/methods.md'; +import Parts from '@ionic-internal/component-api/v9/action-sheet/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/action-sheet/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/action-sheet/slots.md'; ion-action-sheet: Action Sheet Dialog for iOS and Android @@ -27,7 +27,7 @@ An Action Sheet is a dialog that displays a set of options. It appears on top of `ion-action-sheet` can be used by writing the component directly in your template. This reduces the number of handlers you need to wire up in order to present the Action Sheet. -import Trigger from '@site/static/usage/v8/action-sheet/inline/trigger/index.md'; +import Trigger from '@site/static/usage/v9/action-sheet/inline/trigger/index.md'; @@ -37,7 +37,7 @@ The `isOpen` property on `ion-action-sheet` allows developers to control the pre `isOpen` uses a one-way data binding, meaning it will not automatically be set to `false` when the Action Sheet is dismissed. Developers should listen for the `ionActionSheetDidDismiss` or `didDismiss` event and set `isOpen` to `false`. The reason for this is it prevents the internals of `ion-action-sheet` from being tightly coupled with the state of the application. With a one way data binding, the Action Sheet only needs to concern itself with the boolean value that the reactive variable provides. With a two way data binding, the Action Sheet needs to concern itself with both the boolean value as well as the existence of the reactive variable itself. This can lead to non-deterministic behaviors and make applications harder to debug. -import IsOpen from '@site/static/usage/v8/action-sheet/inline/isOpen/index.md'; +import IsOpen from '@site/static/usage/v9/action-sheet/inline/isOpen/index.md'; @@ -45,7 +45,7 @@ import IsOpen from '@site/static/usage/v8/action-sheet/inline/isOpen/index.md'; The `actionSheetController` can be used in situations where more control is needed over when the Action Sheet is presented and dismissed. -import Controller from '@site/static/usage/v8/action-sheet/controller/index.md'; +import Controller from '@site/static/usage/v9/action-sheet/controller/index.md'; @@ -59,7 +59,7 @@ A button can also be passed data via the `data` property on `ActionSheetButton`. When the `didDismiss` event is fired, the `data` and `role` fields of the event detail can be used to gather information about how the Action Sheet was dismissed. -import RoleInfo from '@site/static/usage/v8/action-sheet/role-info-on-dismiss/index.md'; +import RoleInfo from '@site/static/usage/v9/action-sheet/role-info-on-dismiss/index.md'; @@ -83,7 +83,7 @@ We recommend passing a custom class to `cssClass` in the `create` method and usi } ``` -import Styling from '@site/static/usage/v8/action-sheet/theming/styling/index.md'; +import Styling from '@site/static/usage/v9/action-sheet/theming/styling/index.md'; @@ -91,7 +91,7 @@ import Styling from '@site/static/usage/v8/action-sheet/theming/styling/index.md Any of the defined [CSS Custom Properties](#css-custom-properties-1) can be used to style the Action Sheet without needing to target individual elements. -import CssCustomProperties from '@site/static/usage/v8/action-sheet/theming/css-properties/index.md'; +import CssCustomProperties from '@site/static/usage/v9/action-sheet/theming/css-properties/index.md'; diff --git a/docs/api/alert.md b/docs/api/alert.md index 2a2310fb3c2..ec64807640d 100644 --- a/docs/api/alert.md +++ b/docs/api/alert.md @@ -4,12 +4,12 @@ title: "ion-alert" import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -import Props from '@ionic-internal/component-api/v8/alert/props.md'; -import Events from '@ionic-internal/component-api/v8/alert/events.md'; -import Methods from '@ionic-internal/component-api/v8/alert/methods.md'; -import Parts from '@ionic-internal/component-api/v8/alert/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/alert/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/alert/slots.md'; +import Props from '@ionic-internal/component-api/v9/alert/props.md'; +import Events from '@ionic-internal/component-api/v9/alert/events.md'; +import Methods from '@ionic-internal/component-api/v9/alert/methods.md'; +import Parts from '@ionic-internal/component-api/v9/alert/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/alert/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/alert/slots.md'; ion-alert: Ionic Alert Buttons with Custom Message Prompts @@ -26,7 +26,7 @@ An Alert is a dialog that presents users with information or collects informatio `ion-alert` can be used by writing the component directly in your template. This reduces the number of handlers you need to wire up in order to present the Alert. -import Trigger from '@site/static/usage/v8/alert/presenting/trigger/index.md'; +import Trigger from '@site/static/usage/v9/alert/presenting/trigger/index.md'; @@ -36,7 +36,7 @@ The `isOpen` property on `ion-alert` allows developers to control the presentati `isOpen` uses a one-way data binding, meaning it will not automatically be set to `false` when the Alert is dismissed. Developers should listen for the `ionAlertDidDismiss` or `didDismiss` event and set `isOpen` to `false`. The reason for this is it prevents the internals of `ion-alert` from being tightly coupled with the state of the application. With a one way data binding, the Alert only needs to concern itself with the boolean value that the reactive variable provides. With a two way data binding, the Alert needs to concern itself with both the boolean value as well as the existence of the reactive variable itself. This can lead to non-deterministic behaviors and make applications harder to debug. -import IsOpen from '@site/static/usage/v8/alert/presenting/isOpen/index.md'; +import IsOpen from '@site/static/usage/v9/alert/presenting/isOpen/index.md'; @@ -44,7 +44,7 @@ import IsOpen from '@site/static/usage/v8/alert/presenting/isOpen/index.md'; The `alertController` can be used in situations where more control is needed over when the Alert is presented and dismissed. -import Controller from '@site/static/usage/v8/alert/presenting/controller/index.md'; +import Controller from '@site/static/usage/v9/alert/presenting/controller/index.md'; @@ -54,7 +54,7 @@ In the array of `buttons`, each button includes properties for its `text`, and o Optionally, a `role` property can be added to a button, such as `cancel`. If a `cancel` role is on one of the buttons, then if the alert is dismissed by tapping the backdrop, then it will fire the handler from the button with a cancel role. -import Buttons from '@site/static/usage/v8/alert/buttons/index.md'; +import Buttons from '@site/static/usage/v9/alert/buttons/index.md'; @@ -65,13 +65,13 @@ Alerts can also include several different inputs whose data can be passed back t ### Text Inputs Example -import TextInputs from '@site/static/usage/v8/alert/inputs/text-inputs/index.md'; +import TextInputs from '@site/static/usage/v9/alert/inputs/text-inputs/index.md'; ### Radio Example -import Radios from '@site/static/usage/v8/alert/inputs/radios/index.md'; +import Radios from '@site/static/usage/v9/alert/inputs/radios/index.md'; @@ -101,7 +101,7 @@ Any of the defined [CSS Custom Properties](#css-custom-properties) can be used t } ``` -import Customization from '@site/static/usage/v8/alert/customization/index.md'; +import Customization from '@site/static/usage/v9/alert/customization/index.md'; diff --git a/docs/api/app.md b/docs/api/app.md index 5e20f74cd20..227ddfd8ad3 100644 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -1,12 +1,12 @@ --- title: "ion-app" --- -import Props from '@ionic-internal/component-api/v8/app/props.md'; -import Events from '@ionic-internal/component-api/v8/app/events.md'; -import Methods from '@ionic-internal/component-api/v8/app/methods.md'; -import Parts from '@ionic-internal/component-api/v8/app/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/app/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/app/slots.md'; +import Props from '@ionic-internal/component-api/v9/app/props.md'; +import Events from '@ionic-internal/component-api/v9/app/events.md'; +import Methods from '@ionic-internal/component-api/v9/app/methods.md'; +import Parts from '@ionic-internal/component-api/v9/app/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/app/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/app/slots.md'; ion-app: Container Element for an Ionic Application @@ -30,7 +30,7 @@ Using `ion-app` enables the following behaviors: Ionic offers focus utilities for components with the `ion-focusable` class. These utilities automatically manage focus for components when certain keyboard keys, like Tab, are pressed. Components can also be programmatically focused in response to user actions using the `setFocus` method from `ion-app`. -import SetFocus from '@site/static/usage/v8/app/set-focus/index.md'; +import SetFocus from '@site/static/usage/v9/app/set-focus/index.md'; diff --git a/docs/api/avatar.md b/docs/api/avatar.md index ab9f52f3d93..2f25ffed025 100644 --- a/docs/api/avatar.md +++ b/docs/api/avatar.md @@ -2,12 +2,12 @@ title: "ion-avatar" --- -import Props from '@ionic-internal/component-api/v8/avatar/props.md'; -import Events from '@ionic-internal/component-api/v8/avatar/events.md'; -import Methods from '@ionic-internal/component-api/v8/avatar/methods.md'; -import Parts from '@ionic-internal/component-api/v8/avatar/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/avatar/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/avatar/slots.md'; +import Props from '@ionic-internal/component-api/v9/avatar/props.md'; +import Events from '@ionic-internal/component-api/v9/avatar/events.md'; +import Methods from '@ionic-internal/component-api/v9/avatar/methods.md'; +import Parts from '@ionic-internal/component-api/v9/avatar/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/avatar/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/avatar/slots.md'; ion-avatar: Circular Application Avatar Icon Component @@ -24,19 +24,19 @@ Avatars can be used by themselves or inside of any element. If placed inside of ## Basic Usage -import Basic from '@site/static/usage/v8/avatar/basic/index.md'; +import Basic from '@site/static/usage/v9/avatar/basic/index.md'; ## Chip Avatar -import Chip from '@site/static/usage/v8/avatar/chip/index.md'; +import Chip from '@site/static/usage/v9/avatar/chip/index.md'; ## Item Avatar -import Item from '@site/static/usage/v8/avatar/item/index.md'; +import Item from '@site/static/usage/v9/avatar/item/index.md'; @@ -44,7 +44,7 @@ import Item from '@site/static/usage/v8/avatar/item/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/avatar/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/avatar/theming/css-properties/index.md'; diff --git a/docs/api/back-button.md b/docs/api/back-button.md index 2e9b2a2ab0c..6165b426ea4 100644 --- a/docs/api/back-button.md +++ b/docs/api/back-button.md @@ -1,12 +1,12 @@ --- title: "ion-back-button" --- -import Props from '@ionic-internal/component-api/v8/back-button/props.md'; -import Events from '@ionic-internal/component-api/v8/back-button/events.md'; -import Methods from '@ionic-internal/component-api/v8/back-button/methods.md'; -import Parts from '@ionic-internal/component-api/v8/back-button/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/back-button/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/back-button/slots.md'; +import Props from '@ionic-internal/component-api/v9/back-button/props.md'; +import Events from '@ionic-internal/component-api/v9/back-button/events.md'; +import Methods from '@ionic-internal/component-api/v9/back-button/methods.md'; +import Parts from '@ionic-internal/component-api/v9/back-button/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/back-button/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/back-button/slots.md'; ion-back-button: Custom Menu Back Button for Applications @@ -22,7 +22,7 @@ The back button navigates back in the app's history when clicked. It is only dis ## Basic Usage -import Basic from '@site/static/usage/v8/back-button/basic/index.md'; +import Basic from '@site/static/usage/v9/back-button/basic/index.md'; @@ -30,7 +30,7 @@ import Basic from '@site/static/usage/v8/back-button/basic/index.md'; By default, the back button will display the text `"Back"` with a `"chevron-back"` icon on `ios`, and an `"arrow-back-sharp"` icon on `md`. This can be customized per back button component by setting the `icon` or `text` properties. Alternatively, it can be set globally using the `backButtonIcon` or `backButtonText` properties in the global config. Refer to the [Config docs](../developing/config) for more information. -import Custom from '@site/static/usage/v8/back-button/custom/index.md'; +import Custom from '@site/static/usage/v9/back-button/custom/index.md'; diff --git a/docs/api/backdrop.md b/docs/api/backdrop.md index 5d9ce676078..dffb3ce393d 100644 --- a/docs/api/backdrop.md +++ b/docs/api/backdrop.md @@ -1,12 +1,12 @@ --- title: "ion-backdrop" --- -import Props from '@ionic-internal/component-api/v8/backdrop/props.md'; -import Events from '@ionic-internal/component-api/v8/backdrop/events.md'; -import Methods from '@ionic-internal/component-api/v8/backdrop/methods.md'; -import Parts from '@ionic-internal/component-api/v8/backdrop/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/backdrop/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/backdrop/slots.md'; +import Props from '@ionic-internal/component-api/v9/backdrop/props.md'; +import Events from '@ionic-internal/component-api/v9/backdrop/events.md'; +import Methods from '@ionic-internal/component-api/v9/backdrop/methods.md'; +import Parts from '@ionic-internal/component-api/v9/backdrop/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/backdrop/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/backdrop/slots.md'; import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -18,7 +18,7 @@ Backdrops are full screen components that overlay other components. They are use The backdrop prevents clicking or tapping on the content behind it. It is transparent by default, so the below demo includes CSS to make it visible. -import Basic from '@site/static/usage/v8/backdrop/basic/index.md'; +import Basic from '@site/static/usage/v9/backdrop/basic/index.md'; @@ -28,7 +28,7 @@ The backdrop can be customized by assigning CSS properties directly to the backd Content can be displayed above the backdrop by setting a `z-index` on the content, higher than the backdrop (defaults to `2`). -import Styling from '@site/static/usage/v8/backdrop/styling/index.md'; +import Styling from '@site/static/usage/v9/backdrop/styling/index.md'; diff --git a/docs/api/badge.md b/docs/api/badge.md index 6a4e6671919..62e1c5034d9 100644 --- a/docs/api/badge.md +++ b/docs/api/badge.md @@ -1,12 +1,12 @@ --- title: "ion-badge" --- -import Props from '@ionic-internal/component-api/v8/badge/props.md'; -import Events from '@ionic-internal/component-api/v8/badge/events.md'; -import Methods from '@ionic-internal/component-api/v8/badge/methods.md'; -import Parts from '@ionic-internal/component-api/v8/badge/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/badge/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/badge/slots.md'; +import Props from '@ionic-internal/component-api/v9/badge/props.md'; +import Events from '@ionic-internal/component-api/v9/badge/events.md'; +import Methods from '@ionic-internal/component-api/v9/badge/methods.md'; +import Parts from '@ionic-internal/component-api/v9/badge/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/badge/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/badge/slots.md'; ion-badge: iOS & Android App Notification Badge Icons @@ -21,7 +21,7 @@ Badges are inline block elements that usually appear near another element. Typic ## Basic Usage -import Basic from '@site/static/usage/v8/badge/basic/index.md'; +import Basic from '@site/static/usage/v9/badge/basic/index.md'; @@ -33,7 +33,7 @@ Badges can be added inside a tab button, often used to indicate notifications or Empty badges are only available for `md` mode. ::: -import InsideTabBar from '@site/static/usage/v8/badge/inside-tab-bar/index.md'; +import InsideTabBar from '@site/static/usage/v9/badge/inside-tab-bar/index.md'; @@ -41,13 +41,13 @@ import InsideTabBar from '@site/static/usage/v8/badge/inside-tab-bar/index.md'; ### Colors -import Colors from '@site/static/usage/v8/badge/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/badge/theming/colors/index.md'; ### CSS Properties -import CSSProps from '@site/static/usage/v8/badge/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/badge/theming/css-properties/index.md'; diff --git a/docs/api/breadcrumb.md b/docs/api/breadcrumb.md index 6332ab89163..b33712a34bb 100644 --- a/docs/api/breadcrumb.md +++ b/docs/api/breadcrumb.md @@ -1,12 +1,12 @@ --- title: "ion-breadcrumb" --- -import Props from '@ionic-internal/component-api/v8/breadcrumb/props.md'; -import Events from '@ionic-internal/component-api/v8/breadcrumb/events.md'; -import Methods from '@ionic-internal/component-api/v8/breadcrumb/methods.md'; -import Parts from '@ionic-internal/component-api/v8/breadcrumb/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/breadcrumb/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/breadcrumb/slots.md'; +import Props from '@ionic-internal/component-api/v9/breadcrumb/props.md'; +import Events from '@ionic-internal/component-api/v9/breadcrumb/events.md'; +import Methods from '@ionic-internal/component-api/v9/breadcrumb/methods.md'; +import Parts from '@ionic-internal/component-api/v9/breadcrumb/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/breadcrumb/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/breadcrumb/slots.md'; import EncapsulationPill from '@components/page/api/EncapsulationPill'; diff --git a/docs/api/breadcrumbs.md b/docs/api/breadcrumbs.md index da1c92e04fe..313de4f38aa 100644 --- a/docs/api/breadcrumbs.md +++ b/docs/api/breadcrumbs.md @@ -1,12 +1,12 @@ --- title: "ion-breadcrumbs" --- -import Props from '@ionic-internal/component-api/v8/breadcrumbs/props.md'; -import Events from '@ionic-internal/component-api/v8/breadcrumbs/events.md'; -import Methods from '@ionic-internal/component-api/v8/breadcrumbs/methods.md'; -import Parts from '@ionic-internal/component-api/v8/breadcrumbs/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/breadcrumbs/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/breadcrumbs/slots.md'; +import Props from '@ionic-internal/component-api/v9/breadcrumbs/props.md'; +import Events from '@ionic-internal/component-api/v9/breadcrumbs/events.md'; +import Methods from '@ionic-internal/component-api/v9/breadcrumbs/methods.md'; +import Parts from '@ionic-internal/component-api/v9/breadcrumbs/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/breadcrumbs/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/breadcrumbs/slots.md'; @@ -18,7 +18,7 @@ Breadcrumbs are navigation items that are used to indicate where a user is on an ## Basic Usage -import Basic from '@site/static/usage/v8/breadcrumbs/basic/index.md'; +import Basic from '@site/static/usage/v9/breadcrumbs/basic/index.md'; @@ -26,13 +26,13 @@ import Basic from '@site/static/usage/v8/breadcrumbs/basic/index.md'; ### Icons on Items -import IconsOnItems from '@site/static/usage/v8/breadcrumbs/icons/icons-on-items/index.md'; +import IconsOnItems from '@site/static/usage/v9/breadcrumbs/icons/icons-on-items/index.md'; ### Custom Separators -import CustomSeparators from '@site/static/usage/v8/breadcrumbs/icons/custom-separators/index.md'; +import CustomSeparators from '@site/static/usage/v9/breadcrumbs/icons/custom-separators/index.md'; @@ -42,7 +42,7 @@ import CustomSeparators from '@site/static/usage/v8/breadcrumbs/icons/custom-sep If there are more items than the value of `maxItems`, the breadcrumbs will be collapsed. By default, only the first and last items will be shown. -import MaxItems from '@site/static/usage/v8/breadcrumbs/collapsing-items/max-items/index.md'; +import MaxItems from '@site/static/usage/v9/breadcrumbs/collapsing-items/max-items/index.md'; @@ -50,7 +50,7 @@ import MaxItems from '@site/static/usage/v8/breadcrumbs/collapsing-items/max-ite Once the items are collapsed, the number of items to show can be controlled by the `itemsBeforeCollapse` and `itemsAfterCollapse` properties. -import ItemsBeforeAfter from '@site/static/usage/v8/breadcrumbs/collapsing-items/items-before-after/index.md'; +import ItemsBeforeAfter from '@site/static/usage/v9/breadcrumbs/collapsing-items/items-before-after/index.md'; @@ -58,7 +58,7 @@ import ItemsBeforeAfter from '@site/static/usage/v8/breadcrumbs/collapsing-items Clicking the collapsed indicator will fire the `ionCollapsedClick` event. This can be used to, for example, expand the breadcrumbs. -import ExpandOnClick from '@site/static/usage/v8/breadcrumbs/collapsing-items/expand-on-click/index.md'; +import ExpandOnClick from '@site/static/usage/v9/breadcrumbs/collapsing-items/expand-on-click/index.md'; @@ -66,7 +66,7 @@ import ExpandOnClick from '@site/static/usage/v8/breadcrumbs/collapsing-items/ex The `ionCollapsedClick` event can also be used to present an overlay (in this case, an `ion-popover`) showing the hidden breadcrumbs. -import PopoverOnClick from '@site/static/usage/v8/breadcrumbs/collapsing-items/popover-on-click/index.md'; +import PopoverOnClick from '@site/static/usage/v9/breadcrumbs/collapsing-items/popover-on-click/index.md'; @@ -74,13 +74,13 @@ import PopoverOnClick from '@site/static/usage/v8/breadcrumbs/collapsing-items/p ### Colors -import Colors from '@site/static/usage/v8/breadcrumbs/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/breadcrumbs/theming/colors/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/breadcrumbs/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/breadcrumbs/theming/css-properties/index.md'; diff --git a/docs/api/button.md b/docs/api/button.md index bd0e00afb37..cd960a1788d 100644 --- a/docs/api/button.md +++ b/docs/api/button.md @@ -1,12 +1,12 @@ --- title: "ion-button" --- -import Props from '@ionic-internal/component-api/v8/button/props.md'; -import Events from '@ionic-internal/component-api/v8/button/events.md'; -import Methods from '@ionic-internal/component-api/v8/button/methods.md'; -import Parts from '@ionic-internal/component-api/v8/button/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/button/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/button/slots.md'; +import Props from '@ionic-internal/component-api/v9/button/props.md'; +import Events from '@ionic-internal/component-api/v9/button/events.md'; +import Methods from '@ionic-internal/component-api/v9/button/methods.md'; +import Parts from '@ionic-internal/component-api/v9/button/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/button/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/button/slots.md'; ion-button: Style Buttons with Custom CSS Properties @@ -21,7 +21,7 @@ Buttons provide a clickable element, which can be used in forms, or anywhere tha ## Basic Usage -import Basic from '@site/static/usage/v8/button/basic/index.md'; +import Basic from '@site/static/usage/v9/button/basic/index.md'; @@ -29,7 +29,7 @@ import Basic from '@site/static/usage/v8/button/basic/index.md'; This property lets you specify how wide the button should be. By default, buttons have `display: inline-block`, but setting this property will change the button to a full-width element with `display: block`. -import Expand from '@site/static/usage/v8/button/expand/index.md'; +import Expand from '@site/static/usage/v9/button/expand/index.md'; @@ -37,7 +37,7 @@ import Expand from '@site/static/usage/v8/button/expand/index.md'; This property lets you specify the shape of the button. By default, buttons are rectangular with a small border radius, but setting this to `"round"` will change the button to a rounded element. -import Shape from '@site/static/usage/v8/button/shape/index.md'; +import Shape from '@site/static/usage/v9/button/shape/index.md'; @@ -46,7 +46,7 @@ import Shape from '@site/static/usage/v8/button/shape/index.md'; This property determines the background and border color of the button. By default, buttons have a solid background unless the button is inside of a toolbar, in which case it has a transparent background. -import Fill from '@site/static/usage/v8/button/fill/index.md'; +import Fill from '@site/static/usage/v9/button/fill/index.md'; @@ -54,13 +54,13 @@ import Fill from '@site/static/usage/v8/button/fill/index.md'; This property specifies the size of the button. Setting this property will change the height and padding of a button. -import Size from '@site/static/usage/v8/button/size/index.md'; +import Size from '@site/static/usage/v9/button/size/index.md'; ## Icons -import Icons from '@site/static/usage/v8/button/icons/index.md'; +import Icons from '@site/static/usage/v9/button/icons/index.md'; @@ -68,13 +68,13 @@ import Icons from '@site/static/usage/v8/button/icons/index.md'; ### Colors -import Colors from '@site/static/usage/v8/button/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/button/theming/colors/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/button/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/button/theming/css-properties/index.md'; @@ -92,7 +92,7 @@ The button text does not automatically wrap to the next line when the text is to The `max-width` style is set on the button below for demo purposes only. Text wrapping will work with a dynamic button width. ::: -import TextWrapping from '@site/static/usage/v8/button/text-wrapping/index.md'; +import TextWrapping from '@site/static/usage/v9/button/text-wrapping/index.md'; diff --git a/docs/api/buttons.md b/docs/api/buttons.md index a3b7778d1ce..847c13a6a99 100644 --- a/docs/api/buttons.md +++ b/docs/api/buttons.md @@ -1,12 +1,12 @@ --- title: "ion-buttons" --- -import Props from '@ionic-internal/component-api/v8/buttons/props.md'; -import Events from '@ionic-internal/component-api/v8/buttons/events.md'; -import Methods from '@ionic-internal/component-api/v8/buttons/methods.md'; -import Parts from '@ionic-internal/component-api/v8/buttons/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/buttons/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/buttons/slots.md'; +import Props from '@ionic-internal/component-api/v9/buttons/props.md'; +import Events from '@ionic-internal/component-api/v9/buttons/events.md'; +import Methods from '@ionic-internal/component-api/v9/buttons/methods.md'; +import Parts from '@ionic-internal/component-api/v9/buttons/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/buttons/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/buttons/slots.md'; ion-buttons: Toolbar Element with Named Slots for Buttons @@ -22,7 +22,7 @@ The Buttons component is a container element. It should be used inside of a [too ## Basic Usage -import Basic from '@site/static/usage/v8/buttons/basic/index.md'; +import Basic from '@site/static/usage/v9/buttons/basic/index.md'; @@ -38,7 +38,7 @@ Buttons can be positioned inside of the toolbar using a named slot. The below ch | `secondary` | Positions element to the `left` of the content in `ios` mode, and directly to the `right` in `md` mode. | | `primary` | Positions element to the `right` of the content in `ios` mode, and to the far `right` in `md` mode. | -import Placement from '@site/static/usage/v8/buttons/placement/index.md'; +import Placement from '@site/static/usage/v9/buttons/placement/index.md'; @@ -47,7 +47,7 @@ import Placement from '@site/static/usage/v8/buttons/placement/index.md'; A button in a toolbar is styled to be clear by default, but this can be changed using the [`fill`](./button#fill) property on the button. The properties included on [back button](./back-button) and [menu button](./menu-button) in this example are for display purposes; refer to their respective documentation for proper usage. -import Types from '@site/static/usage/v8/buttons/types/index.md'; +import Types from '@site/static/usage/v9/buttons/types/index.md'; @@ -63,7 +63,7 @@ This feature is only available for iOS. ::: {/* Reuse the playground from the Title directory */} -import CollapsibleLargeTitleButtons from '@site/static/usage/v8/title/collapsible-large-title/buttons/index.md'; +import CollapsibleLargeTitleButtons from '@site/static/usage/v9/title/collapsible-large-title/buttons/index.md'; diff --git a/docs/api/card-content.md b/docs/api/card-content.md index db48b3519bf..439091a666d 100644 --- a/docs/api/card-content.md +++ b/docs/api/card-content.md @@ -1,12 +1,12 @@ --- title: "ion-card-content" --- -import Props from '@ionic-internal/component-api/v8/card-content/props.md'; -import Events from '@ionic-internal/component-api/v8/card-content/events.md'; -import Methods from '@ionic-internal/component-api/v8/card-content/methods.md'; -import Parts from '@ionic-internal/component-api/v8/card-content/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/card-content/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/card-content/slots.md'; +import Props from '@ionic-internal/component-api/v9/card-content/props.md'; +import Events from '@ionic-internal/component-api/v9/card-content/events.md'; +import Methods from '@ionic-internal/component-api/v9/card-content/methods.md'; +import Parts from '@ionic-internal/component-api/v9/card-content/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/card-content/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/card-content/slots.md'; import EncapsulationPill from '@components/page/api/EncapsulationPill'; diff --git a/docs/api/card-header.md b/docs/api/card-header.md index a030e19e044..fdd7abece06 100644 --- a/docs/api/card-header.md +++ b/docs/api/card-header.md @@ -1,12 +1,12 @@ --- title: "ion-card-header" --- -import Props from '@ionic-internal/component-api/v8/card-header/props.md'; -import Events from '@ionic-internal/component-api/v8/card-header/events.md'; -import Methods from '@ionic-internal/component-api/v8/card-header/methods.md'; -import Parts from '@ionic-internal/component-api/v8/card-header/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/card-header/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/card-header/slots.md'; +import Props from '@ionic-internal/component-api/v9/card-header/props.md'; +import Events from '@ionic-internal/component-api/v9/card-header/events.md'; +import Methods from '@ionic-internal/component-api/v9/card-header/methods.md'; +import Parts from '@ionic-internal/component-api/v9/card-header/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/card-header/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/card-header/slots.md'; import EncapsulationPill from '@components/page/api/EncapsulationPill'; diff --git a/docs/api/card-subtitle.md b/docs/api/card-subtitle.md index 0cf067bbe34..c15dd5d1403 100644 --- a/docs/api/card-subtitle.md +++ b/docs/api/card-subtitle.md @@ -1,12 +1,12 @@ --- title: "ion-card-subtitle" --- -import Props from '@ionic-internal/component-api/v8/card-subtitle/props.md'; -import Events from '@ionic-internal/component-api/v8/card-subtitle/events.md'; -import Methods from '@ionic-internal/component-api/v8/card-subtitle/methods.md'; -import Parts from '@ionic-internal/component-api/v8/card-subtitle/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/card-subtitle/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/card-subtitle/slots.md'; +import Props from '@ionic-internal/component-api/v9/card-subtitle/props.md'; +import Events from '@ionic-internal/component-api/v9/card-subtitle/events.md'; +import Methods from '@ionic-internal/component-api/v9/card-subtitle/methods.md'; +import Parts from '@ionic-internal/component-api/v9/card-subtitle/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/card-subtitle/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/card-subtitle/slots.md'; import EncapsulationPill from '@components/page/api/EncapsulationPill'; diff --git a/docs/api/card-title.md b/docs/api/card-title.md index c077486a8e5..c2bfeca3a4f 100644 --- a/docs/api/card-title.md +++ b/docs/api/card-title.md @@ -1,12 +1,12 @@ --- title: "ion-card-title" --- -import Props from '@ionic-internal/component-api/v8/card-title/props.md'; -import Events from '@ionic-internal/component-api/v8/card-title/events.md'; -import Methods from '@ionic-internal/component-api/v8/card-title/methods.md'; -import Parts from '@ionic-internal/component-api/v8/card-title/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/card-title/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/card-title/slots.md'; +import Props from '@ionic-internal/component-api/v9/card-title/props.md'; +import Events from '@ionic-internal/component-api/v9/card-title/events.md'; +import Methods from '@ionic-internal/component-api/v9/card-title/methods.md'; +import Parts from '@ionic-internal/component-api/v9/card-title/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/card-title/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/card-title/slots.md'; import EncapsulationPill from '@components/page/api/EncapsulationPill'; diff --git a/docs/api/card.md b/docs/api/card.md index ab8189925c8..0d1c1785f93 100644 --- a/docs/api/card.md +++ b/docs/api/card.md @@ -1,12 +1,12 @@ --- title: "ion-card" --- -import Props from '@ionic-internal/component-api/v8/card/props.md'; -import Events from '@ionic-internal/component-api/v8/card/events.md'; -import Methods from '@ionic-internal/component-api/v8/card/methods.md'; -import Parts from '@ionic-internal/component-api/v8/card/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/card/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/card/slots.md'; +import Props from '@ionic-internal/component-api/v9/card/props.md'; +import Events from '@ionic-internal/component-api/v9/card/events.md'; +import Methods from '@ionic-internal/component-api/v9/card/methods.md'; +import Parts from '@ionic-internal/component-api/v9/card/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/card/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/card/slots.md'; import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -27,28 +27,28 @@ and [card content](./card-content). ## Basic Usage -import Basic from '@site/static/usage/v8/card/basic/index.md'; +import Basic from '@site/static/usage/v9/card/basic/index.md'; ## Media Cards -import Media from '@site/static/usage/v8/card/media/index.md'; +import Media from '@site/static/usage/v9/card/media/index.md'; ## Card Buttons -import Buttons from '@site/static/usage/v8/card/buttons/index.md'; +import Buttons from '@site/static/usage/v9/card/buttons/index.md'; ## List Card -import List from '@site/static/usage/v8/card/list/index.md'; +import List from '@site/static/usage/v9/card/list/index.md'; @@ -57,13 +57,13 @@ import List from '@site/static/usage/v8/card/list/index.md'; ### Colors -import Colors from '@site/static/usage/v8/card/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/card/theming/colors/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/card/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/card/theming/css-properties/index.md'; diff --git a/docs/api/checkbox.md b/docs/api/checkbox.md index ddc9331f50e..5b712b5ac9b 100644 --- a/docs/api/checkbox.md +++ b/docs/api/checkbox.md @@ -2,12 +2,12 @@ title: "ion-checkbox" --- -import Props from '@ionic-internal/component-api/v8/checkbox/props.md'; -import Events from '@ionic-internal/component-api/v8/checkbox/events.md'; -import Methods from '@ionic-internal/component-api/v8/checkbox/methods.md'; -import Parts from '@ionic-internal/component-api/v8/checkbox/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/checkbox/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/checkbox/slots.md'; +import Props from '@ionic-internal/component-api/v9/checkbox/props.md'; +import Events from '@ionic-internal/component-api/v9/checkbox/events.md'; +import Methods from '@ionic-internal/component-api/v9/checkbox/methods.md'; +import Parts from '@ionic-internal/component-api/v9/checkbox/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/checkbox/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/checkbox/slots.md'; ion-checkbox: Ionic App Checkbox to Select Multiple Options @@ -23,7 +23,7 @@ Checkboxes allow the selection of multiple options from a set of options. They a ## Basic Usage -import Basic from '@site/static/usage/v8/checkbox/basic/index.md'; +import Basic from '@site/static/usage/v9/checkbox/basic/index.md'; @@ -31,7 +31,7 @@ import Basic from '@site/static/usage/v8/checkbox/basic/index.md'; Developers can use the `labelPlacement` property to control how the label is placed relative to the control. This property mirrors the flexbox `flex-direction` property. -import LabelPlacement from '@site/static/usage/v8/checkbox/label-placement/index.md'; +import LabelPlacement from '@site/static/usage/v9/checkbox/label-placement/index.md'; @@ -43,7 +43,7 @@ Developers can use the `alignment` property to control how the label and control Stacked checkboxes can be aligned using the `alignment` property. This can be useful when the label and control need to be centered horizontally. ::: -import Alignment from '@site/static/usage/v8/checkbox/alignment/index.md'; +import Alignment from '@site/static/usage/v9/checkbox/alignment/index.md'; @@ -51,7 +51,7 @@ import Alignment from '@site/static/usage/v8/checkbox/alignment/index.md'; Developers can use the `justify` property to control how the label and control are packed on a line. This property mirrors the flexbox `justify-content` property. -import Justify from '@site/static/usage/v8/checkbox/justify/index.md'; +import Justify from '@site/static/usage/v9/checkbox/justify/index.md'; @@ -62,7 +62,7 @@ import Justify from '@site/static/usage/v8/checkbox/justify/index.md'; ## Indeterminate Checkboxes -import Indeterminate from '@site/static/usage/v8/checkbox/indeterminate/index.md'; +import Indeterminate from '@site/static/usage/v9/checkbox/indeterminate/index.md'; @@ -70,7 +70,7 @@ import Indeterminate from '@site/static/usage/v8/checkbox/indeterminate/index.md Checkbox labels can sometimes be accompanied with links. These links can provide more information related to the checkbox. However, clicking the link should not check the checkbox. To achieve this, we can use [stopPropagation](https://developer.mozilla.org/en-US/docs/Web/API/Event/stopPropagation) to prevent the click event from bubbling. When using this approach, the rest of the label still remains clickable. -import LabelLink from '@site/static/usage/v8/checkbox/label-link/index.md'; +import LabelLink from '@site/static/usage/v9/checkbox/label-link/index.md'; @@ -80,7 +80,7 @@ Helper and error text can be used inside of a checkbox with the `helperText` and In Angular, this is done automatically through form validation. In JavaScript, React and Vue, the class needs to be manually added based on your own validation. -import HelperError from '@site/static/usage/v8/checkbox/helper-error/index.md'; +import HelperError from '@site/static/usage/v9/checkbox/helper-error/index.md'; @@ -88,7 +88,7 @@ import HelperError from '@site/static/usage/v8/checkbox/helper-error/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/checkbox/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/checkbox/theming/css-properties/index.md'; diff --git a/docs/api/chip.md b/docs/api/chip.md index 3dfcbc3c540..88911a49893 100644 --- a/docs/api/chip.md +++ b/docs/api/chip.md @@ -1,12 +1,12 @@ --- title: "ion-chip" --- -import Props from '@ionic-internal/component-api/v8/chip/props.md'; -import Events from '@ionic-internal/component-api/v8/chip/events.md'; -import Methods from '@ionic-internal/component-api/v8/chip/methods.md'; -import Parts from '@ionic-internal/component-api/v8/chip/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/chip/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/chip/slots.md'; +import Props from '@ionic-internal/component-api/v9/chip/props.md'; +import Events from '@ionic-internal/component-api/v9/chip/events.md'; +import Methods from '@ionic-internal/component-api/v9/chip/methods.md'; +import Parts from '@ionic-internal/component-api/v9/chip/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/chip/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/chip/slots.md'; ion-chip: Text, Icon and Avatar for Ionic Framework Apps @@ -21,13 +21,13 @@ Chips represent complex entities in small blocks, such as a contact. A chip can ## Basic Usage -import Basic from '@site/static/usage/v8/chip/basic/index.md'; +import Basic from '@site/static/usage/v9/chip/basic/index.md'; ## Slotting Components and Icons -import SlotExample from '@site/static/usage/v8/chip/slots/index.md'; +import SlotExample from '@site/static/usage/v9/chip/slots/index.md'; @@ -35,13 +35,13 @@ import SlotExample from '@site/static/usage/v8/chip/slots/index.md'; ### Colors -import Colors from '@site/static/usage/v8/chip/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/chip/theming/colors/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/chip/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/chip/theming/css-properties/index.md'; diff --git a/docs/api/col.md b/docs/api/col.md index 52bf4a43a79..1d41cc82580 100644 --- a/docs/api/col.md +++ b/docs/api/col.md @@ -1,12 +1,12 @@ --- title: "ion-col" --- -import Props from '@ionic-internal/component-api/v8/col/props.md'; -import Events from '@ionic-internal/component-api/v8/col/events.md'; -import Methods from '@ionic-internal/component-api/v8/col/methods.md'; -import Parts from '@ionic-internal/component-api/v8/col/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/col/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/col/slots.md'; +import Props from '@ionic-internal/component-api/v9/col/props.md'; +import Events from '@ionic-internal/component-api/v9/col/events.md'; +import Methods from '@ionic-internal/component-api/v9/col/methods.md'; +import Parts from '@ionic-internal/component-api/v9/col/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/col/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/col/slots.md'; ion-col: Column Component Padding and Other Properties diff --git a/docs/api/content.md b/docs/api/content.md index c6b8ca6f290..43ad7e4bc61 100644 --- a/docs/api/content.md +++ b/docs/api/content.md @@ -1,12 +1,12 @@ --- title: "ion-content" --- -import Props from '@ionic-internal/component-api/v8/content/props.md'; -import Events from '@ionic-internal/component-api/v8/content/events.md'; -import Methods from '@ionic-internal/component-api/v8/content/methods.md'; -import Parts from '@ionic-internal/component-api/v8/content/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/content/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/content/slots.md'; +import Props from '@ionic-internal/component-api/v9/content/props.md'; +import Events from '@ionic-internal/component-api/v9/content/events.md'; +import Methods from '@ionic-internal/component-api/v9/content/methods.md'; +import Parts from '@ionic-internal/component-api/v9/content/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/content/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/content/slots.md'; ion-content: Scrollable Component for Ionic App Content @@ -27,7 +27,7 @@ Content, along with many other Ionic components, can be customized to modify its ## Basic Usage -import Basic from '@site/static/usage/v8/content/basic/index.md'; +import Basic from '@site/static/usage/v9/content/basic/index.md'; @@ -36,7 +36,7 @@ import Basic from '@site/static/usage/v8/content/basic/index.md'; Content can be the only top-level component in a page, or it can be used alongside a [header](./header), [footer](./footer), or both. When used with a header or footer, it will adjust its size to fill the remaining height. -import HeaderFooter from '@site/static/usage/v8/content/header-footer/index.md'; +import HeaderFooter from '@site/static/usage/v9/content/header-footer/index.md'; @@ -45,7 +45,7 @@ import HeaderFooter from '@site/static/usage/v8/content/header-footer/index.md'; By default, content fills the space between a [header](./header) and [footer](./footer) but does not go behind them. In certain cases, it may be desired to have the content scroll behind the header and footer, such as when the `translucent` property is set on either of them, or `opacity` is set on the toolbar. This can be achieved by setting the `fullscreen` property on the content to `true`. -import Fullscreen from '@site/static/usage/v8/content/fullscreen/index.md'; +import Fullscreen from '@site/static/usage/v9/content/fullscreen/index.md'; @@ -56,7 +56,7 @@ To place elements outside of the scrollable area, assign them to the `fixed` slo The `fixedSlotPlacement` property is used to determine if content in the `fixed` slot is placed before or after the main content in the DOM. When set to `before`, fixed slot content will be placed before the main content and will therefore receive keyboard focus before the main content receives keyboard focus. This can be useful when the main content contains an infinitely-scrolling list, preventing a [FAB](./fab) or other fixed content from being reachable by pressing the tab key. -import Fixed from '@site/static/usage/v8/content/fixed/index.md'; +import Fixed from '@site/static/usage/v9/content/fixed/index.md'; @@ -64,7 +64,7 @@ import Fixed from '@site/static/usage/v8/content/fixed/index.md'; Content provides [methods](#methods) that can be called to scroll the content to the bottom, top, or to a specific point. They can be passed a `duration` in order to smoothly transition instead of instantly changing the position. -import ScrollMethods from '@site/static/usage/v8/content/scroll-methods/index.md'; +import ScrollMethods from '@site/static/usage/v9/content/scroll-methods/index.md'; @@ -72,7 +72,7 @@ import ScrollMethods from '@site/static/usage/v8/content/scroll-methods/index.md Scroll events are disabled by default for content due to performance. However, they can be enabled by setting `scrollEvents` to `true`. This is necessary before listening to any of the scroll [events](#events). -import ScrollEvents from '@site/static/usage/v8/content/scroll-events/index.md'; +import ScrollEvents from '@site/static/usage/v9/content/scroll-events/index.md'; @@ -81,19 +81,19 @@ import ScrollEvents from '@site/static/usage/v8/content/scroll-events/index.md'; ### Colors -import Colors from '@site/static/usage/v8/content/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/content/theming/colors/index.md'; ### CSS Shadow Parts -import CSSParts from '@site/static/usage/v8/content/theming/css-shadow-parts/index.md'; +import CSSParts from '@site/static/usage/v9/content/theming/css-shadow-parts/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/content/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/content/theming/css-properties/index.md'; @@ -117,7 +117,7 @@ ion-content::part(scroll) { } ``` -import SafeArea from '@site/static/usage/v8/content/theming/safe-area/index.md'; +import SafeArea from '@site/static/usage/v9/content/theming/safe-area/index.md'; diff --git a/docs/api/datetime-button.md b/docs/api/datetime-button.md index 87f7c245f82..47ac470f16d 100644 --- a/docs/api/datetime-button.md +++ b/docs/api/datetime-button.md @@ -1,12 +1,12 @@ --- title: "ion-datetime-button" --- -import Props from '@ionic-internal/component-api/v8/datetime-button/props.md'; -import Events from '@ionic-internal/component-api/v8/datetime-button/events.md'; -import Methods from '@ionic-internal/component-api/v8/datetime-button/methods.md'; -import Parts from '@ionic-internal/component-api/v8/datetime-button/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/datetime-button/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/datetime-button/slots.md'; +import Props from '@ionic-internal/component-api/v9/datetime-button/props.md'; +import Events from '@ionic-internal/component-api/v9/datetime-button/events.md'; +import Methods from '@ionic-internal/component-api/v9/datetime-button/methods.md'; +import Parts from '@ionic-internal/component-api/v9/datetime-button/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/datetime-button/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/datetime-button/slots.md'; ion-datetime-button: Ionic Input for Datetime Picker @@ -23,11 +23,11 @@ Datetime Button links with a [Datetime](./datetime) component to display the for Datetime Button should be used when space is constrained. This component displays buttons which show the current date and time values. When the buttons are tapped, the date or time pickers open in the overlay. -When using Datetime Button with a JavaScript framework such as Angular, React, or Vue be sure to use the [keepContentsMounted property on ion-modal](./modal#keepcontentsmounted) or the [keepContentsMounted property on ion-popover](./popover#keepcontentsmounted). This allows the linked datetime instance to be mounted even if the overlay has not been presented yet. +When using Datetime Button with a JavaScript framework such as Angular, React, or Vue be sure to use the [keepContentsMounted property on ion-modal](./modal#prop-keep-contents-mounted) or the [keepContentsMounted property on ion-popover](./popover#prop-keep-contents-mounted). This allows the linked datetime instance to be mounted even if the overlay has not been presented yet. ## Basic Usage -import Basic from '@site/static/usage/v8/datetime-button/basic/index.md'; +import Basic from '@site/static/usage/v9/datetime-button/basic/index.md'; @@ -39,7 +39,7 @@ The localized text on `ion-datetime-button` is determined by the `locale` proper You can customize the format of the date and time in a Datetime Button by providing `formatOptions` on the associated Datetime instance. Refer to [Datetime Format Options](./datetime#format-options) for more details. -import FormatOptions from '@site/static/usage/v8/datetime-button/format-options/index.md'; +import FormatOptions from '@site/static/usage/v9/datetime-button/format-options/index.md'; diff --git a/docs/api/datetime.md b/docs/api/datetime.md index 4db2603d794..00c770971e9 100644 --- a/docs/api/datetime.md +++ b/docs/api/datetime.md @@ -1,50 +1,50 @@ --- title: "ion-datetime" --- -import Props from '@ionic-internal/component-api/v8/datetime/props.md'; -import Events from '@ionic-internal/component-api/v8/datetime/events.md'; -import Methods from '@ionic-internal/component-api/v8/datetime/methods.md'; -import Parts from '@ionic-internal/component-api/v8/datetime/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/datetime/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/datetime/slots.md'; +import Props from '@ionic-internal/component-api/v9/datetime/props.md'; +import Events from '@ionic-internal/component-api/v9/datetime/events.md'; +import Methods from '@ionic-internal/component-api/v9/datetime/methods.md'; +import Parts from '@ionic-internal/component-api/v9/datetime/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/datetime/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/datetime/slots.md'; -import Basic from '@site/static/usage/v8/datetime/basic/index.md'; +import Basic from '@site/static/usage/v9/datetime/basic/index.md'; -import MaxMin from '@site/static/usage/v8/datetime/date-constraints/max-min/index.md'; -import Values from '@site/static/usage/v8/datetime/date-constraints/values/index.md'; -import Advanced from '@site/static/usage/v8/datetime/date-constraints/advanced/index.md'; +import MaxMin from '@site/static/usage/v9/datetime/date-constraints/max-min/index.md'; +import Values from '@site/static/usage/v9/datetime/date-constraints/values/index.md'; +import Advanced from '@site/static/usage/v9/datetime/date-constraints/advanced/index.md'; -import FormatOptions from '@site/static/usage/v8/datetime/format-options/index.md'; +import FormatOptions from '@site/static/usage/v9/datetime/format-options/index.md'; -import CustomLocale from '@site/static/usage/v8/datetime/localization/custom-locale/index.md'; -import HourCycle from '@site/static/usage/v8/datetime/localization/hour-cycle/index.md'; -import FirstDayOfWeek from '@site/static/usage/v8/datetime/localization/first-day-of-week/index.md'; -import LocaleExtensionTags from '@site/static/usage/v8/datetime/localization/locale-extension-tags/index.md'; -import TimeLabel from '@site/static/usage/v8/datetime/localization/time-label/index.md'; +import CustomLocale from '@site/static/usage/v9/datetime/localization/custom-locale/index.md'; +import HourCycle from '@site/static/usage/v9/datetime/localization/hour-cycle/index.md'; +import FirstDayOfWeek from '@site/static/usage/v9/datetime/localization/first-day-of-week/index.md'; +import LocaleExtensionTags from '@site/static/usage/v9/datetime/localization/locale-extension-tags/index.md'; +import TimeLabel from '@site/static/usage/v9/datetime/localization/time-label/index.md'; -import MonthAndYear from '@site/static/usage/v8/datetime/presentation/month-and-year/index.md'; -import Time from '@site/static/usage/v8/datetime/presentation/time/index.md'; -import Date from '@site/static/usage/v8/datetime/presentation/date/index.md'; +import MonthAndYear from '@site/static/usage/v9/datetime/presentation/month-and-year/index.md'; +import Time from '@site/static/usage/v9/datetime/presentation/time/index.md'; +import Date from '@site/static/usage/v9/datetime/presentation/date/index.md'; -import ShowingDefaultTitle from '@site/static/usage/v8/datetime/title/showing-default-title/index.md'; -import CustomizingTitle from '@site/static/usage/v8/datetime/title/customizing-title/index.md'; +import ShowingDefaultTitle from '@site/static/usage/v9/datetime/title/showing-default-title/index.md'; +import CustomizingTitle from '@site/static/usage/v9/datetime/title/customizing-title/index.md'; -import ShowingConfirmationButtons from '@site/static/usage/v8/datetime/buttons/showing-confirmation-buttons/index.md'; -import CustomizingButtons from '@site/static/usage/v8/datetime/buttons/customizing-buttons/index.md'; -import CustomizingButtonTexts from '@site/static/usage/v8/datetime/buttons/customizing-button-texts/index.md'; +import ShowingConfirmationButtons from '@site/static/usage/v9/datetime/buttons/showing-confirmation-buttons/index.md'; +import CustomizingButtons from '@site/static/usage/v9/datetime/buttons/customizing-buttons/index.md'; +import CustomizingButtonTexts from '@site/static/usage/v9/datetime/buttons/customizing-button-texts/index.md'; -import HighlightedDatesArray from '@site/static/usage/v8/datetime/highlightedDates/array/index.md'; -import HighlightedDatesCallback from '@site/static/usage/v8/datetime/highlightedDates/callback/index.md'; +import HighlightedDatesArray from '@site/static/usage/v9/datetime/highlightedDates/array/index.md'; +import HighlightedDatesCallback from '@site/static/usage/v9/datetime/highlightedDates/callback/index.md'; -import ShowAdjacentDays from '@site/static/usage/v8/datetime/show-adjacent-days/index.md'; +import ShowAdjacentDays from '@site/static/usage/v9/datetime/show-adjacent-days/index.md'; -import MultipleDateSelection from '@site/static/usage/v8/datetime/multiple/index.md'; +import MultipleDateSelection from '@site/static/usage/v9/datetime/multiple/index.md'; -import GlobalTheming from '@site/static/usage/v8/datetime/styling/global-theming/index.md'; -import CalendarHeaderStyling from '@site/static/usage/v8/datetime/styling/calendar-header/index.md'; -import CalendarDaysStyling from '@site/static/usage/v8/datetime/styling/calendar-days/index.md'; -import DatetimeHeaderStyling from '@site/static/usage/v8/datetime/styling/datetime-header/index.md'; -import WheelStyling from '@site/static/usage/v8/datetime/styling/wheel-styling/index.md'; +import GlobalTheming from '@site/static/usage/v9/datetime/styling/global-theming/index.md'; +import CalendarHeaderStyling from '@site/static/usage/v9/datetime/styling/calendar-header/index.md'; +import CalendarDaysStyling from '@site/static/usage/v9/datetime/styling/calendar-days/index.md'; +import DatetimeHeaderStyling from '@site/static/usage/v9/datetime/styling/datetime-header/index.md'; +import WheelStyling from '@site/static/usage/v9/datetime/styling/wheel-styling/index.md'; ion-datetime: Ionic API Input for Datetime Format Picker @@ -248,7 +248,7 @@ Certain `presentation` options have both grid and wheel styles that developers c The example below shows the wheel picker with `presentation="date-time"`. -import Wheel from '@site/static/usage/v8/datetime/presentation/wheel/index.md'; +import Wheel from '@site/static/usage/v9/datetime/presentation/wheel/index.md'; diff --git a/docs/api/fab-button.md b/docs/api/fab-button.md index fdb0cae91a4..d49ed3bf385 100644 --- a/docs/api/fab-button.md +++ b/docs/api/fab-button.md @@ -1,12 +1,12 @@ --- title: "ion-fab-button" --- -import Props from '@ionic-internal/component-api/v8/fab-button/props.md'; -import Events from '@ionic-internal/component-api/v8/fab-button/events.md'; -import Methods from '@ionic-internal/component-api/v8/fab-button/methods.md'; -import Parts from '@ionic-internal/component-api/v8/fab-button/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/fab-button/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/fab-button/slots.md'; +import Props from '@ionic-internal/component-api/v9/fab-button/props.md'; +import Events from '@ionic-internal/component-api/v9/fab-button/events.md'; +import Methods from '@ionic-internal/component-api/v9/fab-button/methods.md'; +import Parts from '@ionic-internal/component-api/v9/fab-button/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/fab-button/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/fab-button/slots.md'; ion-fab-button: Ionic FAB Button Icon for Primary Action diff --git a/docs/api/fab-list.md b/docs/api/fab-list.md index 997a495b1d8..870b6277aca 100644 --- a/docs/api/fab-list.md +++ b/docs/api/fab-list.md @@ -1,12 +1,12 @@ --- title: "ion-fab-list" --- -import Props from '@ionic-internal/component-api/v8/fab-list/props.md'; -import Events from '@ionic-internal/component-api/v8/fab-list/events.md'; -import Methods from '@ionic-internal/component-api/v8/fab-list/methods.md'; -import Parts from '@ionic-internal/component-api/v8/fab-list/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/fab-list/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/fab-list/slots.md'; +import Props from '@ionic-internal/component-api/v9/fab-list/props.md'; +import Events from '@ionic-internal/component-api/v9/fab-list/events.md'; +import Methods from '@ionic-internal/component-api/v9/fab-list/methods.md'; +import Parts from '@ionic-internal/component-api/v9/fab-list/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/fab-list/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/fab-list/slots.md'; import EncapsulationPill from '@components/page/api/EncapsulationPill'; diff --git a/docs/api/fab.md b/docs/api/fab.md index 068a068364c..c8887d82629 100644 --- a/docs/api/fab.md +++ b/docs/api/fab.md @@ -1,12 +1,12 @@ --- title: "ion-fab" --- -import Props from '@ionic-internal/component-api/v8/fab/props.md'; -import Events from '@ionic-internal/component-api/v8/fab/events.md'; -import Methods from '@ionic-internal/component-api/v8/fab/methods.md'; -import Parts from '@ionic-internal/component-api/v8/fab/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/fab/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/fab/slots.md'; +import Props from '@ionic-internal/component-api/v9/fab/props.md'; +import Events from '@ionic-internal/component-api/v9/fab/events.md'; +import Methods from '@ionic-internal/component-api/v9/fab/methods.md'; +import Parts from '@ionic-internal/component-api/v9/fab/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/fab/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/fab/slots.md'; ion-fab: Ionic Floating Action Button for Android and iOS @@ -21,7 +21,7 @@ Fabs are container elements that contain one or more [fab buttons](./fab-button) ## Basic Usage -import BasicUsage from '@site/static/usage/v8/fab/basic/index.md'; +import BasicUsage from '@site/static/usage/v9/fab/basic/index.md'; @@ -29,7 +29,7 @@ import BasicUsage from '@site/static/usage/v8/fab/basic/index.md'; The `side` property of the [fab list](./fab-list) component controls where it appears relative to the main fab button. A single fab can have multiple fab lists as long as they all have different values for `side`. -import ListSide from '@site/static/usage/v8/fab/list-side/index.md'; +import ListSide from '@site/static/usage/v9/fab/list-side/index.md'; @@ -37,7 +37,7 @@ import ListSide from '@site/static/usage/v8/fab/list-side/index.md'; In order to place the fab in a fixed position, it should be assigned to the `fixed` slot of the outer [content](./content) component. Use the `vertical` and `horizontal` props to control the alignment of the fab in the viewport. The `edge` prop will cause the fab button to overlap with the app's header or footer. -import Positioning from '@site/static/usage/v8/fab/positioning/index.md'; +import Positioning from '@site/static/usage/v9/fab/positioning/index.md'; @@ -63,7 +63,7 @@ ion-fab { If there is an `ion-header` (for a fab with `vertical` set to `"top"`) or `ion-footer` (for a fab with `vertical` set to `"bottom"`), no CSS adjustment is needed because the fab gets positioned relative to the header or footer. -import SafeArea from '@site/static/usage/v8/fab/safe-area/index.md'; +import SafeArea from '@site/static/usage/v9/fab/safe-area/index.md'; @@ -73,7 +73,7 @@ In scenarios where a view contains many interactive elements, such as an infinit By setting the `fixedSlotPlacement` property on [Content](./content) to `before`, the FAB will be placed before the main content in the DOM. This ensures that the FAB receives keyboard focus before other interactive elements receive focus, making it easier for users to access the FAB. -import BeforeContent from '@site/static/usage/v8/fab/before-content/index.md'; +import BeforeContent from '@site/static/usage/v9/fab/before-content/index.md'; @@ -81,7 +81,7 @@ import BeforeContent from '@site/static/usage/v8/fab/before-content/index.md'; Setting the `size` property of the main fab button to `"small"` will render it at a mini size. Note that this property will not have an effect when used with the inner fab buttons. -import ButtonSizing from '@site/static/usage/v8/fab/button-sizing/index.md'; +import ButtonSizing from '@site/static/usage/v9/fab/button-sizing/index.md'; @@ -89,19 +89,19 @@ import ButtonSizing from '@site/static/usage/v8/fab/button-sizing/index.md'; ### Colors -import Colors from '@site/static/usage/v8/fab/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/fab/theming/colors/index.md'; ### CSS Custom Properties -import CSSCustomProperties from '@site/static/usage/v8/fab/theming/css-custom-properties/index.md'; +import CSSCustomProperties from '@site/static/usage/v9/fab/theming/css-custom-properties/index.md'; ### CSS Shadow Parts -import CSSShadowParts from '@site/static/usage/v8/fab/theming/css-shadow-parts/index.md'; +import CSSShadowParts from '@site/static/usage/v9/fab/theming/css-shadow-parts/index.md'; diff --git a/docs/api/footer.md b/docs/api/footer.md index 09542f9f850..0361a31255f 100644 --- a/docs/api/footer.md +++ b/docs/api/footer.md @@ -1,12 +1,12 @@ --- title: "ion-footer" --- -import Props from '@ionic-internal/component-api/v8/footer/props.md'; -import Events from '@ionic-internal/component-api/v8/footer/events.md'; -import Methods from '@ionic-internal/component-api/v8/footer/methods.md'; -import Parts from '@ionic-internal/component-api/v8/footer/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/footer/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/footer/slots.md'; +import Props from '@ionic-internal/component-api/v9/footer/props.md'; +import Events from '@ionic-internal/component-api/v9/footer/events.md'; +import Methods from '@ionic-internal/component-api/v9/footer/methods.md'; +import Parts from '@ionic-internal/component-api/v9/footer/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/footer/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/footer/slots.md'; ion-footer: Page Footer | Ionic App Footer Root Component @@ -20,7 +20,7 @@ Footer is a root component of a page that aligns itself to the bottom of the pag ## Basic Usage -import Basic from '@site/static/usage/v8/footer/basic/index.md'; +import Basic from '@site/static/usage/v9/footer/basic/index.md'; @@ -29,7 +29,7 @@ import Basic from '@site/static/usage/v8/footer/basic/index.md'; Footers can match the transparency found in native iOS applications by setting the `translucent` property. In order for the content to scroll behind the footer, the `fullscreen` property needs to be set on the content. This effect will only apply when the mode is `"ios"` and the device supports [backdrop-filter](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#browser_compatibility). -import Translucent from '@site/static/usage/v8/footer/translucent/index.md'; +import Translucent from '@site/static/usage/v9/footer/translucent/index.md'; @@ -38,7 +38,7 @@ import Translucent from '@site/static/usage/v8/footer/translucent/index.md'; Many native iOS applications have a fade effect on the toolbar. This can be achieved by setting the `collapse` property on the footer to `"fade"`. When the content is scrolled to the end, the background and border on the footer will fade away. This effect will only apply when the mode is `"ios"`. -import Fade from '@site/static/usage/v8/footer/fade/index.md'; +import Fade from '@site/static/usage/v9/footer/fade/index.md'; @@ -47,7 +47,7 @@ import Fade from '@site/static/usage/v8/footer/fade/index.md'; A fade footer requires a scroll container to work properly. When using a virtual scrolling solution, a custom scroll target needs to be provided. Scrolling on the content needs to be disabled and the `.ion-content-scroll-host` class needs to be added to the element responsible for scrolling. -import CustomScrollTarget from '@site/static/usage/v8/footer/custom-scroll-target/index.md'; +import CustomScrollTarget from '@site/static/usage/v9/footer/custom-scroll-target/index.md'; @@ -55,7 +55,7 @@ import CustomScrollTarget from '@site/static/usage/v8/footer/custom-scroll-targe In `"md"` mode, the footer will have a `box-shadow` on the top. In `"ios"` mode, it will receive a `border` on the top. These can be removed by adding the `.ion-no-border` class to the footer. -import NoBorder from '@site/static/usage/v8/footer/no-border/index.md'; +import NoBorder from '@site/static/usage/v9/footer/no-border/index.md'; diff --git a/docs/api/grid.md b/docs/api/grid.md index 691e71b4a59..d138f25ad4f 100644 --- a/docs/api/grid.md +++ b/docs/api/grid.md @@ -1,12 +1,12 @@ --- title: "ion-grid" --- -import Props from '@ionic-internal/component-api/v8/grid/props.md'; -import Events from '@ionic-internal/component-api/v8/grid/events.md'; -import Methods from '@ionic-internal/component-api/v8/grid/methods.md'; -import Parts from '@ionic-internal/component-api/v8/grid/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/grid/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/grid/slots.md'; +import Props from '@ionic-internal/component-api/v9/grid/props.md'; +import Events from '@ionic-internal/component-api/v9/grid/events.md'; +import Methods from '@ionic-internal/component-api/v9/grid/methods.md'; +import Parts from '@ionic-internal/component-api/v9/grid/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/grid/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/grid/slots.md'; ion-grid: Display Grids for Mobile-First Custom App Layout @@ -54,7 +54,7 @@ The default breakpoints for the grid and the corresponding properties are define By default, columns will take up equal width inside of a row for all devices and screen sizes. -import Basic from '@site/static/usage/v8/grid/basic/index.md'; +import Basic from '@site/static/usage/v9/grid/basic/index.md'; @@ -71,7 +71,7 @@ Grids take up 100% width of their container. By adding the `fixed` property to t | lg | 960px | Set grid width to 960px when (min-width: 992px) | | xl | 1140px | Set grid width to 1140px when (min-width: 1200px) | -import Fixed from '@site/static/usage/v8/grid/fixed/index.md'; +import Fixed from '@site/static/usage/v9/grid/fixed/index.md'; @@ -84,7 +84,7 @@ Columns can be set to specific sizes to take up a certain number out of the tota By setting the `size` to `"auto"` the column can size itself based on the natural width of its content. This is necessary when setting a column to an absolute width, such as a specific number of pixels. The columns next to the auto-width column will resize to fill the row. -import SizeAuto from '@site/static/usage/v8/grid/size-auto/index.md'; +import SizeAuto from '@site/static/usage/v9/grid/size-auto/index.md'; @@ -93,7 +93,7 @@ import SizeAuto from '@site/static/usage/v8/grid/size-auto/index.md'; Set the `size` of a column and the others will automatically resize around it. If a size is specified on all of the columns and it doesn't add up to the total number of columns, there will be empty space after the columns. -import Size from '@site/static/usage/v8/grid/size/index.md'; +import Size from '@site/static/usage/v9/grid/size/index.md'; @@ -101,7 +101,7 @@ import Size from '@site/static/usage/v8/grid/size/index.md'; The `size` property will change the column width for all [breakpoints](#default-breakpoints). Column also provides several size properties with the breakpoint name appended to the end of "size". These properties can be used to change the width of the column based on the screen size. Open the below example in StackBlitz and resize the screen to observe how the column widths change. -import SizeResponsive from '@site/static/usage/v8/grid/size-responsive/index.md'; +import SizeResponsive from '@site/static/usage/v9/grid/size-responsive/index.md'; @@ -114,7 +114,7 @@ Columns can be offset to shift to the right by a certain number of columns out o Columns can be moved to the right by using the `offset` property. This property increases the left margin of the column by the number of specified columns. It also shifts the columns to the right of it, if any exist. -import Offset from '@site/static/usage/v8/grid/offset/index.md'; +import Offset from '@site/static/usage/v9/grid/offset/index.md'; @@ -122,7 +122,7 @@ import Offset from '@site/static/usage/v8/grid/offset/index.md'; The `offset` property will change the column's left margin for all [breakpoints](#default-breakpoints). Column also provides several offset properties with the breakpoint name appended to the end of "offset". These properties can be used to change the offset of the column based on the screen size. Open the below example in StackBlitz and resize the screen to observe how the column offsets change. -import OffsetResponsive from '@site/static/usage/v8/grid/offset-responsive/index.md'; +import OffsetResponsive from '@site/static/usage/v9/grid/offset-responsive/index.md'; @@ -135,7 +135,7 @@ Columns can be pushed to to the right or pulled to the left by a certain number Reorder the columns by adding the `push` and `pull` properties. These properties adjust the `left` and `right` of the columns by the specified number of columns making it easy to reorder columns. This will cause columns to overlap if they are shifted to where another column is positioned. -import PushPull from '@site/static/usage/v8/grid/push-pull/index.md'; +import PushPull from '@site/static/usage/v9/grid/push-pull/index.md'; @@ -143,7 +143,7 @@ import PushPull from '@site/static/usage/v8/grid/push-pull/index.md'; The `push` and `pull` properties will change the column's position for all [breakpoints](#default-breakpoints). Column also provides several `push` and `pull` properties with the breakpoint name appended to the end of "push" / "pull". These properties can be used to change the position of the column based on the screen size. Open the below example in StackBlitz and resize the screen to observe how the column positions change. -import PushPullResponsive from '@site/static/usage/v8/grid/push-pull-responsive/index.md'; +import PushPullResponsive from '@site/static/usage/v9/grid/push-pull-responsive/index.md'; @@ -153,7 +153,7 @@ import PushPullResponsive from '@site/static/usage/v8/grid/push-pull-responsive/ All columns can be vertically aligned inside of a row by adding different classes to the row. For a list of available classes, refer to [css utilities](/layout/css-utilities#flex-container-properties). -import VerticalAlignment from '@site/static/usage/v8/grid/vertical-alignment/index.md'; +import VerticalAlignment from '@site/static/usage/v9/grid/vertical-alignment/index.md'; @@ -162,7 +162,7 @@ import VerticalAlignment from '@site/static/usage/v8/grid/vertical-alignment/ind All columns can be horizontally aligned inside of a row by adding different classes to the row. For a list of available classes, refer to [css utilities](/layout/css-utilities.md#flex-container-properties). -import HorizontalAlignment from '@site/static/usage/v8/grid/horizontal-alignment/index.md'; +import HorizontalAlignment from '@site/static/usage/v9/grid/horizontal-alignment/index.md'; @@ -174,7 +174,7 @@ Using our built-in CSS variables, it’s possible to customize the predefined gr The width of a fixed grid can be set for all breakpoints with the `--ion-grid-width` CSS variable. To override individual breakpoints, use the `--ion-grid-width-{breakpoint}` CSS variables. The default value for each of the breakpoints can be found in the [Fixed Grid](#fixed-grid) section. Open the below example in StackBlitz and resize the screen to observe how the grid width changes. -import Width from '@site/static/usage/v8/grid/customizing/width/index.md'; +import Width from '@site/static/usage/v9/grid/customizing/width/index.md'; @@ -182,7 +182,7 @@ import Width from '@site/static/usage/v8/grid/customizing/width/index.md'; The number of grid columns can be modified with the `--ion-grid-columns` CSS variable. By default there are 12 grid columns, but this can be changed to any positive integer and be used to calculate the width of each individual column. -import ColumnNumber from '@site/static/usage/v8/grid/customizing/column-number/index.md'; +import ColumnNumber from '@site/static/usage/v9/grid/customizing/column-number/index.md'; @@ -192,7 +192,7 @@ The padding on the grid container can be set for all breakpoints with the `--ion The padding on the columns can be set for all breakpoints with the `--ion-grid-column-padding` CSS variable. To override individual breakpoints, use the `--ion-grid-column-padding-{breakpoint}` CSS variables. -import Padding from '@site/static/usage/v8/grid/customizing/padding/index.md'; +import Padding from '@site/static/usage/v9/grid/customizing/padding/index.md'; diff --git a/docs/api/header.md b/docs/api/header.md index 972075f3721..a88d5be1551 100644 --- a/docs/api/header.md +++ b/docs/api/header.md @@ -1,12 +1,12 @@ --- title: "ion-header" --- -import Props from '@ionic-internal/component-api/v8/header/props.md'; -import Events from '@ionic-internal/component-api/v8/header/events.md'; -import Methods from '@ionic-internal/component-api/v8/header/methods.md'; -import Parts from '@ionic-internal/component-api/v8/header/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/header/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/header/slots.md'; +import Props from '@ionic-internal/component-api/v9/header/props.md'; +import Events from '@ionic-internal/component-api/v9/header/events.md'; +import Methods from '@ionic-internal/component-api/v9/header/methods.md'; +import Parts from '@ionic-internal/component-api/v9/header/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/header/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/header/slots.md'; ion-header: Header Parent Component for Ionic Framework Apps @@ -21,7 +21,7 @@ Header is a root component of a page that aligns itself to the top of the page. ## Basic Usage -import Basic from '@site/static/usage/v8/header/basic/index.md'; +import Basic from '@site/static/usage/v9/header/basic/index.md'; @@ -30,7 +30,7 @@ import Basic from '@site/static/usage/v8/header/basic/index.md'; Headers can match the transparency found in native iOS applications by setting the `translucent` property. In order for the content to scroll behind the header, the `fullscreen` property needs to be set on the content. This effect will only apply when the mode is `"ios"` and the device supports [backdrop-filter](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#browser_compatibility). -import Translucent from '@site/static/usage/v8/header/translucent/index.md'; +import Translucent from '@site/static/usage/v9/header/translucent/index.md'; @@ -39,7 +39,7 @@ import Translucent from '@site/static/usage/v8/header/translucent/index.md'; Ionic provides the functionality found in native iOS applications to show a large toolbar title and then collapse it to a small title when scrolling. This can be done by adding two headers, one above the content and one inside of the content, and then setting the `collapse` property to `"condense"` on the header inside of the content. This effect will only apply when the mode is "ios". -import Condense from '@site/static/usage/v8/header/condense/index.md'; +import Condense from '@site/static/usage/v9/header/condense/index.md'; @@ -50,7 +50,7 @@ Many native iOS applications have a fade effect on the toolbar. This can be achi This functionality can be combined with a [Condensed Header](#condensed-header) as well. The `collapse` property with a value set to `"fade"` should be on the header outside of the content. -import Fade from '@site/static/usage/v8/header/fade/index.md'; +import Fade from '@site/static/usage/v9/header/fade/index.md'; @@ -59,7 +59,7 @@ import Fade from '@site/static/usage/v8/header/fade/index.md'; A fade header requires a scroll container to work properly. When using a virtual scrolling solution, a custom scroll target needs to be provided. Scrolling on the content needs to be disabled and the `.ion-content-scroll-host` class needs to be added to the element responsible for scrolling. -import CustomScrollTarget from '@site/static/usage/v8/header/custom-scroll-target/index.md'; +import CustomScrollTarget from '@site/static/usage/v9/header/custom-scroll-target/index.md'; @@ -68,7 +68,7 @@ import CustomScrollTarget from '@site/static/usage/v8/header/custom-scroll-targe In `"md"` mode, the header will have a `box-shadow` on the bottom. In `"ios"` mode, it will receive a `border` on the bottom. These can be removed by adding the `.ion-no-border` class to the header. -import NoBorder from '@site/static/usage/v8/header/no-border/index.md'; +import NoBorder from '@site/static/usage/v9/header/no-border/index.md'; diff --git a/docs/api/icon.md b/docs/api/icon.md index 9550800360e..7965382bae8 100644 --- a/docs/api/icon.md +++ b/docs/api/icon.md @@ -10,36 +10,70 @@ title: 'ion-icon' /> -Icon is a simple component made available through the Ionicons library, which comes pre-packaged by default with all Ionic Framework applications. It can be used to display any icon from the Ionicons set, or a custom SVG. It also has support for styling such as size and color. +Icon is a universal container for displaying icons. While Ionicons is included by default with all Ionic Framework applications, the component can display Ionicons, custom SVGs, font-based icon libraries, and other icon systems. It provides consistent styling and sizing regardless of where an icon comes from. -For a list of all available icons, refer to ionic.io/ionicons. For more information including styling and custom SVG usage, refer to the Usage page. +For Ionicons documentation, refer to ionic.io/ionicons. ## Basic Usage -import Basic from '@site/static/usage/v8/icon/basic/index.md'; +import Basic from '@site/static/usage/v9/icon/basic/index.md'; +## Font Icons + +Font-based icons from libraries such as Font Awesome, Bootstrap Icons, Remix Icons, and Phosphor Icons can be displayed by slotting them into Icon. + +import FontIcons from '@site/static/usage/v9/icon/font-icons/index.md'; + + + +## Custom SVGs + +Custom SVGs can be displayed with Icon in two ways: by loading an external SVG file using the `src` property or by slotting SVG content directly into the component. + +import CustomSVGs from '@site/static/usage/v9/icon/custom-svgs/index.md'; + + ## Accessibility Icons that are purely decorative content should have aria-hidden="true". This will not visually hide the icon, but it will hide the element from assistive technology. ```html + -``` + + +``` If the icon is interactive, it should have alternate text defined by adding an aria-label. ```html + + + + + + ``` Alternatively, if the icon is inside of another element that it is describing, that element should have the aria-label added to it, and the icon should be hidden using aria-hidden. ```html + + + + + + ``` diff --git a/docs/api/img.md b/docs/api/img.md index bc812a8ca0b..afdd962abdb 100644 --- a/docs/api/img.md +++ b/docs/api/img.md @@ -2,28 +2,31 @@ title: "ion-img" --- -import Props from '@ionic-internal/component-api/v8/img/props.md'; -import Events from '@ionic-internal/component-api/v8/img/events.md'; -import Methods from '@ionic-internal/component-api/v8/img/methods.md'; -import Parts from '@ionic-internal/component-api/v8/img/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/img/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/img/slots.md'; +import Props from '@ionic-internal/component-api/v9/img/props.md'; +import Events from '@ionic-internal/component-api/v9/img/events.md'; +import Methods from '@ionic-internal/component-api/v9/img/methods.md'; +import Parts from '@ionic-internal/component-api/v9/img/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/img/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/img/slots.md'; ion-img: Img Tag to Lazy Load Images in Viewport - + import EncapsulationPill from '@components/page/api/EncapsulationPill'; +:::warning[Deprecated] +`ion-img` is deprecated and will be removed in Ionic 10. Use a native `` tag with [loading="lazy"](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img#loading) instead. Refer to the [migration guide](../updating/9-0.md#img) for details on replacing events and styling. +::: Img is a tag that will lazily load an image whenever the tag is in the viewport. This is extremely useful when generating a large list as images are only loaded when they're visible. The component uses [Intersection Observer](https://caniuse.com/#feat=intersectionobserver) internally, which is supported in most modern browsers, but falls back to a `setTimeout` when it is not supported. ## Basic Usage -import Basic from '@site/static/usage/v8/img/basic/index.md'; +import Basic from '@site/static/usage/v9/img/basic/index.md'; @@ -43,4 +46,4 @@ import Basic from '@site/static/usage/v8/img/basic/index.md'; ## Slots - \ No newline at end of file + diff --git a/docs/api/infinite-scroll-content.md b/docs/api/infinite-scroll-content.md index fc8aa9cb281..b476ba31e53 100644 --- a/docs/api/infinite-scroll-content.md +++ b/docs/api/infinite-scroll-content.md @@ -2,12 +2,12 @@ title: "ion-infinite-scroll-content" --- -import Props from '@ionic-internal/component-api/v8/infinite-scroll-content/props.md'; -import Events from '@ionic-internal/component-api/v8/infinite-scroll-content/events.md'; -import Methods from '@ionic-internal/component-api/v8/infinite-scroll-content/methods.md'; -import Parts from '@ionic-internal/component-api/v8/infinite-scroll-content/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/infinite-scroll-content/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/infinite-scroll-content/slots.md'; +import Props from '@ionic-internal/component-api/v9/infinite-scroll-content/props.md'; +import Events from '@ionic-internal/component-api/v9/infinite-scroll-content/events.md'; +import Methods from '@ionic-internal/component-api/v9/infinite-scroll-content/methods.md'; +import Parts from '@ionic-internal/component-api/v9/infinite-scroll-content/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/infinite-scroll-content/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/infinite-scroll-content/slots.md'; import EncapsulationPill from '@components/page/api/EncapsulationPill'; diff --git a/docs/api/infinite-scroll.md b/docs/api/infinite-scroll.md index 5a8d29dc832..1a006452132 100644 --- a/docs/api/infinite-scroll.md +++ b/docs/api/infinite-scroll.md @@ -2,12 +2,12 @@ title: "ion-infinite-scroll" --- -import Props from '@ionic-internal/component-api/v8/infinite-scroll/props.md'; -import Events from '@ionic-internal/component-api/v8/infinite-scroll/events.md'; -import Methods from '@ionic-internal/component-api/v8/infinite-scroll/methods.md'; -import Parts from '@ionic-internal/component-api/v8/infinite-scroll/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/infinite-scroll/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/infinite-scroll/slots.md'; +import Props from '@ionic-internal/component-api/v9/infinite-scroll/props.md'; +import Events from '@ionic-internal/component-api/v9/infinite-scroll/events.md'; +import Methods from '@ionic-internal/component-api/v9/infinite-scroll/methods.md'; +import Parts from '@ionic-internal/component-api/v9/infinite-scroll/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/infinite-scroll/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/infinite-scroll/slots.md'; ion-infinite-scroll: Infinite Scroller Action Component @@ -23,7 +23,7 @@ The expression assigned to the `ionInfinite` event is called when the user reach ## Basic Usage -import Basic from '@site/static/usage/v8/infinite-scroll/basic/index.md'; +import Basic from '@site/static/usage/v9/infinite-scroll/basic/index.md'; @@ -31,7 +31,7 @@ import Basic from '@site/static/usage/v8/infinite-scroll/basic/index.md'; The `ion-infinite-scroll-content` is responsible for the visual display of the infinite scroll interaction. By default this component changes its look depending on the infinite scroll's state. It displays a spinner that looks best based on the platform the user is on. Both the spinner and loading text can be customized by setting properties on the `ion-infinite-scroll-content` component. -import InfiniteScrollContent from '@site/static/usage/v8/infinite-scroll/infinite-scroll-content/index.md'; +import InfiniteScrollContent from '@site/static/usage/v9/infinite-scroll/infinite-scroll-content/index.md'; @@ -39,7 +39,7 @@ import InfiniteScrollContent from '@site/static/usage/v8/infinite-scroll/infinit Separating the `ion-infinite-scroll` and `ion-infinite-scroll-content` components allows developers to create their own content components, if desired. This content can contain anything, from an SVG element to elements with unique CSS animations. -import CustomContent from '@site/static/usage/v8/infinite-scroll/custom-infinite-scroll-content/index.md'; +import CustomContent from '@site/static/usage/v9/infinite-scroll/custom-infinite-scroll-content/index.md'; diff --git a/docs/api/input-otp.md b/docs/api/input-otp.md index ebec290e117..524b2454082 100644 --- a/docs/api/input-otp.md +++ b/docs/api/input-otp.md @@ -1,12 +1,12 @@ --- title: "ion-input-otp" --- -import Props from '@ionic-internal/component-api/v8/input-otp/props.md'; -import Events from '@ionic-internal/component-api/v8/input-otp/events.md'; -import Methods from '@ionic-internal/component-api/v8/input-otp/methods.md'; -import Parts from '@ionic-internal/component-api/v8/input-otp/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/input-otp/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/input-otp/slots.md'; +import Props from '@ionic-internal/component-api/v9/input-otp/props.md'; +import Events from '@ionic-internal/component-api/v9/input-otp/events.md'; +import Methods from '@ionic-internal/component-api/v9/input-otp/methods.md'; +import Parts from '@ionic-internal/component-api/v9/input-otp/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/input-otp/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/input-otp/slots.md'; ion-input-otp: One-Time Password Input Component @@ -23,7 +23,7 @@ The Input OTP component is a specialized input component designed for entering o The component provides 4 input boxes by default, which is a common length for many verification codes. The number of input boxes can be customized using the `length` property. -import Basic from '@site/static/usage/v8/input-otp/basic/index.md'; +import Basic from '@site/static/usage/v9/input-otp/basic/index.md'; @@ -41,7 +41,7 @@ The `type` property automatically sets both the `inputmode` and `pattern` attrib Refer to the [Pattern](#pattern) section for more details on pattern validation and customization. -import Type from '@site/static/usage/v8/input-otp/type/index.md'; +import Type from '@site/static/usage/v9/input-otp/type/index.md'; @@ -49,7 +49,7 @@ import Type from '@site/static/usage/v8/input-otp/type/index.md'; The `shape` property controls the border radius of the input boxes, creating rounded or sharp corners. -import Shape from '@site/static/usage/v8/input-otp/shape/index.md'; +import Shape from '@site/static/usage/v9/input-otp/shape/index.md'; @@ -57,7 +57,7 @@ import Shape from '@site/static/usage/v8/input-otp/shape/index.md'; The `fill` property controls the background style of the input boxes, offering bordered or filled backgrounds. -import Fill from '@site/static/usage/v8/input-otp/fill/index.md'; +import Fill from '@site/static/usage/v9/input-otp/fill/index.md'; @@ -65,7 +65,7 @@ import Fill from '@site/static/usage/v8/input-otp/fill/index.md'; The `size` property provides different size options for the input boxes. -import Size from '@site/static/usage/v8/input-otp/size/index.md'; +import Size from '@site/static/usage/v9/input-otp/size/index.md'; @@ -78,7 +78,7 @@ The `separators` property adds visual dividers between one or more of the input The numbers represent the index after which a separator should appear. For example, `"1,3"` displays a separator after the first and third input box. This can be used to create visually distinct groupings of input boxes, but it will still have one value. -import Separators from '@site/static/usage/v8/input-otp/separators/index.md'; +import Separators from '@site/static/usage/v9/input-otp/separators/index.md'; @@ -92,7 +92,7 @@ The component supports various states for automatic styling of input boxes: - `ion-invalid` styles only display when touched (`ion-touched`) - `ion-valid` styles only display when focused (`has-focus`) -import States from '@site/static/usage/v8/input-otp/states/index.md'; +import States from '@site/static/usage/v9/input-otp/states/index.md'; @@ -110,7 +110,7 @@ When using a custom `pattern`, remember that the `type` property controls which - Use `type="text"` for patterns that include letters to show the alphanumeric keyboard ::: -import Pattern from '@site/static/usage/v8/input-otp/pattern/index.md'; +import Pattern from '@site/static/usage/v9/input-otp/pattern/index.md'; @@ -124,7 +124,7 @@ The `color` property changes the color palette for input boxes. For `outline` fi The `color` property does *not* change the text color of the input OTP. For that, use the [`--color` CSS property](#css-custom-properties-1). ::: -import Colors from '@site/static/usage/v8/input-otp/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/input-otp/theming/colors/index.md'; @@ -132,7 +132,7 @@ import Colors from '@site/static/usage/v8/input-otp/theming/colors/index.md'; Input OTP uses scoped encapsulation, which means it will automatically scope its CSS by appending each of the styles with an additional class at runtime. Overriding scoped selectors in CSS requires a [higher specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity) selector. Targeting the `ion-input-otp` for customization will not work; therefore we recommend adding a class and customizing it that way. Due to certain styles being applied based on the `fill`, you may need to override properties on the fills separately. -import CSSProps from '@site/static/usage/v8/input-otp/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/input-otp/theming/css-properties/index.md'; diff --git a/docs/api/input-password-toggle.md b/docs/api/input-password-toggle.md index 7813203667a..51dbf429302 100644 --- a/docs/api/input-password-toggle.md +++ b/docs/api/input-password-toggle.md @@ -1,12 +1,12 @@ --- title: "ion-input-password-toggle" --- -import Props from '@ionic-internal/component-api/v8/input-password-toggle/props.md'; -import Events from '@ionic-internal/component-api/v8/input-password-toggle/events.md'; -import Methods from '@ionic-internal/component-api/v8/input-password-toggle/methods.md'; -import Parts from '@ionic-internal/component-api/v8/input-password-toggle/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/input-password-toggle/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/input-password-toggle/slots.md'; +import Props from '@ionic-internal/component-api/v9/input-password-toggle/props.md'; +import Events from '@ionic-internal/component-api/v9/input-password-toggle/events.md'; +import Methods from '@ionic-internal/component-api/v9/input-password-toggle/methods.md'; +import Parts from '@ionic-internal/component-api/v9/input-password-toggle/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/input-password-toggle/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/input-password-toggle/slots.md'; ion-input-password-toggle: Toggle the visibility of a password in Input @@ -29,7 +29,7 @@ Using any other `type` will cause a warning to be logged. ::: -import Basic from '@site/static/usage/v8/input-password-toggle/basic/index.md'; +import Basic from '@site/static/usage/v9/input-password-toggle/basic/index.md'; diff --git a/docs/api/input.md b/docs/api/input.md index 42f2d88c303..e436e7b54db 100644 --- a/docs/api/input.md +++ b/docs/api/input.md @@ -1,12 +1,12 @@ --- title: "ion-input" --- -import Props from '@ionic-internal/component-api/v8/input/props.md'; -import Events from '@ionic-internal/component-api/v8/input/events.md'; -import Methods from '@ionic-internal/component-api/v8/input/methods.md'; -import Parts from '@ionic-internal/component-api/v8/input/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/input/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/input/slots.md'; +import Props from '@ionic-internal/component-api/v9/input/props.md'; +import Events from '@ionic-internal/component-api/v9/input/events.md'; +import Methods from '@ionic-internal/component-api/v9/input/methods.md'; +import Parts from '@ionic-internal/component-api/v9/input/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/input/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/input/slots.md'; ion-input: Custom Input With Styling and CSS Properties @@ -23,7 +23,7 @@ The input component is a wrapper to the HTML input element with custom styling a ## Basic Usage -import Basic from '@site/static/usage/v8/input/basic/index.md'; +import Basic from '@site/static/usage/v9/input/basic/index.md'; @@ -32,7 +32,7 @@ import Basic from '@site/static/usage/v8/input/basic/index.md'; The input component is meant for text type inputs only, such as `"text"`, `"password"`, `"email"`, `"number"`, `"search"`, `"tel"`, and `"url"`. It supports all standard text input events including `keyup`, `keydown`, `keypress`, and more. The default `type` is `"text"`. -import Types from '@site/static/usage/v8/input/types/index.md'; +import Types from '@site/static/usage/v9/input/types/index.md'; @@ -48,7 +48,7 @@ Labels should be used to describe the input. They can be used visually, and they Labels will take up the width of their content by default. Developers can use the `labelPlacement` property to control how the label is placed relative to the control. -import LabelPlacement from '@site/static/usage/v8/input/label-placement/index.md'; +import LabelPlacement from '@site/static/usage/v9/input/label-placement/index.md'; @@ -58,7 +58,7 @@ While plaintext labels should be passed in via the `label` property, if custom H 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. -import LabelSlot from '@site/static/usage/v8/input/label-slot/index.md'; +import LabelSlot from '@site/static/usage/v9/input/label-slot/index.md'; @@ -66,7 +66,7 @@ import LabelSlot from '@site/static/usage/v8/input/label-slot/index.md'; If no visible label is needed, developers should still supply an `aria-label` so the input is accessible to screen readers. -import NoVisibleLabel from '@site/static/usage/v8/input/no-visible-label/index.md'; +import NoVisibleLabel from '@site/static/usage/v9/input/no-visible-label/index.md'; @@ -74,7 +74,7 @@ import NoVisibleLabel from '@site/static/usage/v8/input/no-visible-label/index.m Inputs offer two options for clearing the input based on how you interact with it. The first way is by adding the `clearInput` property which will show a clear button when the input has a `value`. The second way is the `clearOnEdit` property which will clear the input after it has been blurred and then typed in again. Inputs with a `type` set to `"password"` will have `clearOnEdit` enabled by default. -import Clear from '@site/static/usage/v8/input/clear/index.md'; +import Clear from '@site/static/usage/v9/input/clear/index.md'; @@ -89,7 +89,7 @@ Filled inputs can be used on iOS by setting the input's `mode` to `md`. Inputs that use `fill` should not be used in an `ion-item` due to styling conflicts between the components. ::: -import Fill from '@site/static/usage/v8/input/fill/index.md'; +import Fill from '@site/static/usage/v9/input/fill/index.md'; @@ -100,7 +100,7 @@ Helper and error text can be used inside of an input with the `helperText` and ` In Angular, this is done automatically through form validation. In JavaScript, React and Vue, the class needs to be manually added based on your own validation. -import HelperError from '@site/static/usage/v8/input/helper-error/index.md'; +import HelperError from '@site/static/usage/v9/input/helper-error/index.md'; @@ -110,13 +110,13 @@ The input counter is text that displays under an input to notify the user of how The `counter` and `counterFormatter` properties on `ion-item` were [deprecated in Ionic 7](/docs/api/input#using-the-modern-syntax) and should be used directly on `ion-input` instead. -import Counter from '@site/static/usage/v8/input/counter/index.md'; +import Counter from '@site/static/usage/v9/input/counter/index.md'; Inputs with a counter add a border between the input and the counter, therefore they should not be placed inside of an `ion-item` which adds an additional border under the item. The `ion-padding-start` class can be added to align the counter inputs with inputs inside of items. -import CounterAlignment from '@site/static/usage/v8/input/counter-alignment/index.md'; +import CounterAlignment from '@site/static/usage/v9/input/counter-alignment/index.md'; @@ -126,7 +126,7 @@ Developers can use the `ionInput` event to update the input value in response to When storing the value in a state variable, we recommend updating both the state variable and the `ion-input` component value. This ensures that the state variable and the `ion-input` component value remain in sync. -import FilteringData from '@site/static/usage/v8/input/filtering/index.md'; +import FilteringData from '@site/static/usage/v9/input/filtering/index.md'; @@ -140,7 +140,7 @@ To get started with Maskito, install the library: npm install @maskito/core @maskito/{angular,react,vue} ``` -import Masking from '@site/static/usage/v8/input/mask/index.md'; +import Masking from '@site/static/usage/v9/input/mask/index.md'; @@ -162,7 +162,7 @@ In most cases, [Icon](./icon.md) components placed in these slots should have `a 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. ::: -import StartEndSlots from '@site/static/usage/v8/input/start-end-slots/index.md'; +import StartEndSlots from '@site/static/usage/v9/input/start-end-slots/index.md'; @@ -176,7 +176,7 @@ Setting the `color` property changes the color palette for each input. On `ios` The `color` property does *not* change the text color of the input. For that, use the [`--color` CSS property](#css-custom-properties-1). ::: -import Colors from '@site/static/usage/v8/input/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/input/theming/colors/index.md'; @@ -184,7 +184,7 @@ import Colors from '@site/static/usage/v8/input/theming/colors/index.md'; Input uses scoped encapsulation, which means it will automatically scope its CSS by appending each of the styles with an additional class at runtime. Overriding scoped selectors in CSS requires a [higher specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity) selector. Targeting the `ion-input` for customization will not work; therefore we recommend adding a class and customizing it that way. -import CSSProps from '@site/static/usage/v8/input/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/input/theming/css-properties/index.md'; diff --git a/docs/api/item-divider.md b/docs/api/item-divider.md index 6de7f9fe8fc..572a5282b28 100644 --- a/docs/api/item-divider.md +++ b/docs/api/item-divider.md @@ -1,12 +1,12 @@ --- title: "ion-item-divider" --- -import Props from '@ionic-internal/component-api/v8/item-divider/props.md'; -import Events from '@ionic-internal/component-api/v8/item-divider/events.md'; -import Methods from '@ionic-internal/component-api/v8/item-divider/methods.md'; -import Parts from '@ionic-internal/component-api/v8/item-divider/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/item-divider/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/item-divider/slots.md'; +import Props from '@ionic-internal/component-api/v9/item-divider/props.md'; +import Events from '@ionic-internal/component-api/v9/item-divider/events.md'; +import Methods from '@ionic-internal/component-api/v9/item-divider/methods.md'; +import Parts from '@ionic-internal/component-api/v9/item-divider/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/item-divider/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/item-divider/slots.md'; ion-item-divider: Item Divider Block Element for Ionic Apps @@ -23,7 +23,7 @@ Item dividers are block elements that can be used to separate [items](./item) in ## Basic Usage -import Basic from '@site/static/usage/v8/item-divider/basic/index.md'; +import Basic from '@site/static/usage/v9/item-divider/basic/index.md'; @@ -32,14 +32,14 @@ import Basic from '@site/static/usage/v8/item-divider/basic/index.md'; ### Colors -import Colors from '@site/static/usage/v8/item-divider/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/item-divider/theming/colors/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/item-divider/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/item-divider/theming/css-properties/index.md'; diff --git a/docs/api/item-group.md b/docs/api/item-group.md index 6943a72c3ec..34e64a4719b 100644 --- a/docs/api/item-group.md +++ b/docs/api/item-group.md @@ -1,12 +1,12 @@ --- title: "ion-item-group" --- -import Props from '@ionic-internal/component-api/v8/item-group/props.md'; -import Events from '@ionic-internal/component-api/v8/item-group/events.md'; -import Methods from '@ionic-internal/component-api/v8/item-group/methods.md'; -import Parts from '@ionic-internal/component-api/v8/item-group/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/item-group/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/item-group/slots.md'; +import Props from '@ionic-internal/component-api/v9/item-group/props.md'; +import Events from '@ionic-internal/component-api/v9/item-group/events.md'; +import Methods from '@ionic-internal/component-api/v9/item-group/methods.md'; +import Parts from '@ionic-internal/component-api/v9/item-group/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/item-group/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/item-group/slots.md'; ion-item-group: Group Items to Divide into Multiple Sections @@ -20,13 +20,13 @@ Item groups are containers that organize similar [items](./item) together. They ## Basic Usage -import Basic from '@site/static/usage/v8/item-group/basic/index.md'; +import Basic from '@site/static/usage/v9/item-group/basic/index.md'; ## Sliding Items -import SlidingItems from '@site/static/usage/v8/item-group/sliding-items/index.md'; +import SlidingItems from '@site/static/usage/v9/item-group/sliding-items/index.md'; diff --git a/docs/api/item-option.md b/docs/api/item-option.md index 93c0f281f7c..c7d74feba2a 100644 --- a/docs/api/item-option.md +++ b/docs/api/item-option.md @@ -1,12 +1,12 @@ --- title: "ion-item-option" --- -import Props from '@ionic-internal/component-api/v8/item-option/props.md'; -import Events from '@ionic-internal/component-api/v8/item-option/events.md'; -import Methods from '@ionic-internal/component-api/v8/item-option/methods.md'; -import Parts from '@ionic-internal/component-api/v8/item-option/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/item-option/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/item-option/slots.md'; +import Props from '@ionic-internal/component-api/v9/item-option/props.md'; +import Events from '@ionic-internal/component-api/v9/item-option/events.md'; +import Methods from '@ionic-internal/component-api/v9/item-option/methods.md'; +import Parts from '@ionic-internal/component-api/v9/item-option/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/item-option/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/item-option/slots.md'; ion-item-option: Option Button for Sliding Item in Ionic diff --git a/docs/api/item-options.md b/docs/api/item-options.md index a71125d606a..bdde6314b33 100644 --- a/docs/api/item-options.md +++ b/docs/api/item-options.md @@ -1,12 +1,12 @@ --- title: "ion-item-options" --- -import Props from '@ionic-internal/component-api/v8/item-options/props.md'; -import Events from '@ionic-internal/component-api/v8/item-options/events.md'; -import Methods from '@ionic-internal/component-api/v8/item-options/methods.md'; -import Parts from '@ionic-internal/component-api/v8/item-options/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/item-options/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/item-options/slots.md'; +import Props from '@ionic-internal/component-api/v9/item-options/props.md'; +import Events from '@ionic-internal/component-api/v9/item-options/events.md'; +import Methods from '@ionic-internal/component-api/v9/item-options/methods.md'; +import Parts from '@ionic-internal/component-api/v9/item-options/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/item-options/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/item-options/slots.md'; ion-item-options: Option Button Components for Ionic Apps diff --git a/docs/api/item-sliding.md b/docs/api/item-sliding.md index 3d8b9a1f61d..7c1fbf28ed0 100644 --- a/docs/api/item-sliding.md +++ b/docs/api/item-sliding.md @@ -1,12 +1,12 @@ --- title: "ion-item-sliding" --- -import Props from '@ionic-internal/component-api/v8/item-sliding/props.md'; -import Events from '@ionic-internal/component-api/v8/item-sliding/events.md'; -import Methods from '@ionic-internal/component-api/v8/item-sliding/methods.md'; -import Parts from '@ionic-internal/component-api/v8/item-sliding/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/item-sliding/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/item-sliding/slots.md'; +import Props from '@ionic-internal/component-api/v9/item-sliding/props.md'; +import Events from '@ionic-internal/component-api/v9/item-sliding/events.md'; +import Methods from '@ionic-internal/component-api/v9/item-sliding/methods.md'; +import Parts from '@ionic-internal/component-api/v9/item-sliding/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/item-sliding/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/item-sliding/slots.md'; ion-item-sliding: Slide Buttons | Slide Right to Left @@ -23,7 +23,7 @@ A sliding item contains an item that can be dragged to reveal option buttons. It Sliding item options are placed on the `"end"` side of the item by default. This means that options are revealed when the item is swiped from end to start, i.e. from right to left in LTR, but from left to right in RTL. To place them on the opposite side, so that they are revealed when swiping in the opposite direction, set the side attribute to `"start"` on the [item options](./item-options) element. Up to two item options can be used at the same time in order to reveal two different sets of options depending on the swiping direction. -import Basic from '@site/static/usage/v8/item-sliding/basic/index.md'; +import Basic from '@site/static/usage/v9/item-sliding/basic/index.md'; @@ -32,7 +32,7 @@ import Basic from '@site/static/usage/v8/item-sliding/basic/index.md'; When an icon is placed alongside text in the [item option](./item-option), it will display the icon on top of the text by default. The slot on the icon can be changed to any of the available [item option slots](./item-option#slots) to change its position. -import Icons from '@site/static/usage/v8/item-sliding/icons/index.md'; +import Icons from '@site/static/usage/v9/item-sliding/icons/index.md'; @@ -41,7 +41,7 @@ import Icons from '@site/static/usage/v8/item-sliding/icons/index.md'; Options can be expanded to take up the full width of the parent `ion-item` if you swipe past a certain point. This can be combined with the `ionSwipe` event on the [item options](./item-options) to call a method when the item is fully swiped. -import Expandable from '@site/static/usage/v8/item-sliding/expandable/index.md'; +import Expandable from '@site/static/usage/v9/item-sliding/expandable/index.md'; diff --git a/docs/api/item.md b/docs/api/item.md index 55af3f19ad1..708728c1508 100644 --- a/docs/api/item.md +++ b/docs/api/item.md @@ -1,15 +1,17 @@ --- title: "ion-item" --- -import Props from '@ionic-internal/component-api/v8/item/props.md'; -import Events from '@ionic-internal/component-api/v8/item/events.md'; -import Methods from '@ionic-internal/component-api/v8/item/methods.md'; -import Parts from '@ionic-internal/component-api/v8/item/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/item/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/item/slots.md'; +import Props from '@ionic-internal/component-api/v9/item/props.md'; +import Events from '@ionic-internal/component-api/v9/item/events.md'; +import Methods from '@ionic-internal/component-api/v9/item/methods.md'; +import Parts from '@ionic-internal/component-api/v9/item/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/item/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/item/slots.md'; import useBaseUrl from '@docusaurus/useBaseUrl'; import BestPracticeFigure from '@components/global/BestPracticeFigure'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; ion-item: Input, Edit, or Delete iOS and Android Item Elements @@ -27,7 +29,7 @@ Items are elements that can contain text, icons, avatars, images, inputs, and an Items left align text and wrap when the text is wider than the item. We can modify this behavior using the CSS Utilities provided by Ionic Framework, such as using `.ion-text-nowrap` in the below example. Refer to the [CSS Utilities Documentation](/docs/layout/css-utilities) for more classes that can be added to an item to transform the text. -import Basic from '@site/static/usage/v8/item/basic/index.md'; +import Basic from '@site/static/usage/v9/item/basic/index.md'; @@ -52,7 +54,7 @@ If a visual is required to interact with the item, such as an icon button, then In the example below, we are creating two lists with supporting visuals. The first list uses icons, and the second list uses avatars. The visuals are decorative, so they all have `aria-hidden="true"`. Additionally, they are presented consistently in the `start` slot. -import SupportingVisuals from '@site/static/usage/v8/item/content-types/supporting-visuals/index.md'; +import SupportingVisuals from '@site/static/usage/v9/item/content-types/supporting-visuals/index.md'; @@ -74,7 +76,7 @@ The "Allow Notifications" label on the toggle has additional text underneath it Below that list is another list containing a textarea with a [Note](./note) containing long text underneath. The textarea was placed in its own list to make it apparent that the long text is associated with the textarea and not any other fields. -import Text from '@site/static/usage/v8/item/content-types/text/index.md'; +import Text from '@site/static/usage/v9/item/content-types/text/index.md'; @@ -102,7 +104,7 @@ In the example below, we are creating two lists with different kinds of metadata The second list mimics the iOS Mail app to show an inbox. This list makes use of custom metadata including an "unread message" indicator in the "start" slot as well as a timestamp and custom detail icon in the "end" slot. The "unread message" indicator is highlighted in blue to draw the user's attention to the unread messages, while the timestamp is more subtle. -import Metadata from '@site/static/usage/v8/item/content-types/metadata/index.md'; +import Metadata from '@site/static/usage/v9/item/content-types/metadata/index.md'; @@ -122,7 +124,7 @@ Developers should avoid creating +## Routing + +Items support client-side navigation using the `routerLink` property. Setting `routerLink` renders the item as an anchor and navigates to the specified route when tapped. The `routerDirection` property controls the transition animation direction, and `routerAnimation` accepts a custom animation builder. + + + + + +In Angular, `routerLink` is a directive provided by `@angular/router`. When used on Ionic components, also import `IonRouterLink` from `@ionic/angular` to enable `routerDirection` and `routerAnimation` support. + +```html + + + Go to Home + + + Go Back to Home + + +``` + +```typescript +import { Component } from '@angular/core'; +import { IonItem, IonLabel, IonList, IonRouterLink } from '@ionic/angular'; +import { RouterLink } from '@angular/router'; + +@Component({ + selector: 'app-example', + templateUrl: 'example.component.html', + imports: [IonItem, IonLabel, IonList, RouterLink, IonRouterLink], +}) +export class ExampleComponent {} +``` + + + + + +In JavaScript, set the `router-link` attribute on `ion-item` to navigate using [ion-router](./router). + +```html + + + Go to Home + + + Go Back to Home + + +``` + + + + + +In React, `IonItem` accepts a `routerLink` prop that triggers client-side navigation via Ionic's React Router integration. + +```tsx +import { IonItem, IonLabel, IonList } from '@ionic/react'; + +function Example() { + return ( + + + Go to Home + + + Go Back to Home + + + ); +} +export default Example; +``` + + + + + +In Vue, use the `router-link` attribute on `ion-item`. The `router-direction` and `router-animation` attributes are also available for controlling the transition. + +```html + + + +``` + + + + + + ## Detail Arrows By default [clickable items](#clickable-items) will display a right arrow icon on `ios` mode. To hide the right arrow icon on clickable elements, set the `detail` property to `false`. To show the right arrow icon on an item that doesn't display it naturally, set the `detail` property to `true`. -import DetailArrows from '@site/static/usage/v8/item/detail-arrows/index.md'; +import DetailArrows from '@site/static/usage/v9/item/detail-arrows/index.md'; @@ -182,7 +287,7 @@ import DetailArrows from '@site/static/usage/v8/item/detail-arrows/index.md'; Items show an inset bottom border by default. The border has padding on the left and does not appear under any content that is slotted in the `"start"` slot. The `lines` property can be modified to `"full"` or `"none"` which will show a full width border or no border, respectively. -import Lines from '@site/static/usage/v8/item/lines/index.md'; +import Lines from '@site/static/usage/v9/item/lines/index.md'; @@ -190,13 +295,13 @@ import Lines from '@site/static/usage/v8/item/lines/index.md'; Buttons are styled smaller inside of items than when they are outside of them. To make the button size match buttons outside of an item, set the `size` attribute to `"default"`. -import Buttons from '@site/static/usage/v8/item/buttons/index.md'; +import Buttons from '@site/static/usage/v9/item/buttons/index.md'; ## Item Inputs -import Inputs from '@site/static/usage/v8/item/inputs/index.md'; +import Inputs from '@site/static/usage/v9/item/inputs/index.md'; @@ -204,19 +309,19 @@ import Inputs from '@site/static/usage/v8/item/inputs/index.md'; ### Colors -import Colors from '@site/static/usage/v8/item/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/item/theming/colors/index.md'; ### CSS Shadow Parts -import CSSParts from '@site/static/usage/v8/item/theming/css-shadow-parts/index.md'; +import CSSParts from '@site/static/usage/v9/item/theming/css-shadow-parts/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/item/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/item/theming/css-properties/index.md'; @@ -276,4 +381,4 @@ When an `` renders a native `` element, the keyboard interactions f ## Slots - + \ No newline at end of file diff --git a/docs/api/label.md b/docs/api/label.md index 216bd24305d..919751c4fbd 100644 --- a/docs/api/label.md +++ b/docs/api/label.md @@ -1,12 +1,12 @@ --- title: "ion-label" --- -import Props from '@ionic-internal/component-api/v8/label/props.md'; -import Events from '@ionic-internal/component-api/v8/label/events.md'; -import Methods from '@ionic-internal/component-api/v8/label/methods.md'; -import Parts from '@ionic-internal/component-api/v8/label/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/label/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/label/slots.md'; +import Props from '@ionic-internal/component-api/v9/label/props.md'; +import Events from '@ionic-internal/component-api/v9/label/events.md'; +import Methods from '@ionic-internal/component-api/v9/label/methods.md'; +import Parts from '@ionic-internal/component-api/v9/label/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/label/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/label/slots.md'; ion-label: Item Label Color and Properties for Applications @@ -23,13 +23,13 @@ The position of the label inside of an item can be inline, fixed, stacked, or fl ## Basic Usage -import Basic from '@site/static/usage/v8/label/basic/index.md'; +import Basic from '@site/static/usage/v9/label/basic/index.md'; ## Item Labels -import Item from '@site/static/usage/v8/label/item/index.md'; +import Item from '@site/static/usage/v9/label/item/index.md'; @@ -37,7 +37,7 @@ import Item from '@site/static/usage/v8/label/item/index.md'; ### Colors -import Colors from '@site/static/usage/v8/label/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/label/theming/colors/index.md'; diff --git a/docs/api/list-header.md b/docs/api/list-header.md index aa6e8d5f5b0..0c7d274895c 100644 --- a/docs/api/list-header.md +++ b/docs/api/list-header.md @@ -1,12 +1,12 @@ --- title: "ion-list-header" --- -import Props from '@ionic-internal/component-api/v8/list-header/props.md'; -import Events from '@ionic-internal/component-api/v8/list-header/events.md'; -import Methods from '@ionic-internal/component-api/v8/list-header/methods.md'; -import Parts from '@ionic-internal/component-api/v8/list-header/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/list-header/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/list-header/slots.md'; +import Props from '@ionic-internal/component-api/v9/list-header/props.md'; +import Events from '@ionic-internal/component-api/v9/list-header/events.md'; +import Methods from '@ionic-internal/component-api/v9/list-header/methods.md'; +import Parts from '@ionic-internal/component-api/v9/list-header/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/list-header/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/list-header/slots.md'; import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -17,7 +17,7 @@ List headers are block elements that are used to describe the contents of a [lis ## Basic Usage -import Basic from '@site/static/usage/v8/list-header/basic/index.md'; +import Basic from '@site/static/usage/v9/list-header/basic/index.md'; @@ -26,7 +26,7 @@ import Basic from '@site/static/usage/v8/list-header/basic/index.md'; A [button](./button) placed in a list header can be useful for showing part of a list and redirecting to the full list with the button. -import Buttons from '@site/static/usage/v8/list-header/buttons/index.md'; +import Buttons from '@site/static/usage/v9/list-header/buttons/index.md'; @@ -35,7 +35,7 @@ import Buttons from '@site/static/usage/v8/list-header/buttons/index.md'; List headers do not show a bottom border by default. The `lines` property can be modified to `"full"` or `"inset"` which will show a full width border or an inset border with left padding, respectively. -import Lines from '@site/static/usage/v8/list-header/lines/index.md'; +import Lines from '@site/static/usage/v9/list-header/lines/index.md'; @@ -43,13 +43,13 @@ import Lines from '@site/static/usage/v8/list-header/lines/index.md'; ### Colors -import Colors from '@site/static/usage/v8/list-header/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/list-header/theming/colors/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/list-header/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/list-header/theming/css-properties/index.md'; diff --git a/docs/api/list.md b/docs/api/list.md index bd5fa7d9ab8..8d1974a463a 100644 --- a/docs/api/list.md +++ b/docs/api/list.md @@ -1,12 +1,12 @@ --- title: "ion-list" --- -import Props from '@ionic-internal/component-api/v8/list/props.md'; -import Events from '@ionic-internal/component-api/v8/list/events.md'; -import Methods from '@ionic-internal/component-api/v8/list/methods.md'; -import Parts from '@ionic-internal/component-api/v8/list/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/list/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/list/slots.md'; +import Props from '@ionic-internal/component-api/v9/list/props.md'; +import Events from '@ionic-internal/component-api/v9/list/events.md'; +import Methods from '@ionic-internal/component-api/v9/list/methods.md'; +import Parts from '@ionic-internal/component-api/v9/list/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/list/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/list/slots.md'; ion-list: Item List View Component for iOS and Android Apps @@ -23,7 +23,7 @@ Lists support several interactions including swiping items to reveal options, dr ## Basic Usage -import Basic from '@site/static/usage/v8/list/basic/index.md'; +import Basic from '@site/static/usage/v9/list/basic/index.md'; @@ -32,7 +32,7 @@ import Basic from '@site/static/usage/v8/list/basic/index.md'; Adding the `inset` property to a list will apply margin around the list. In `ios` mode it will also add rounded corners to the list. -import Inset from '@site/static/usage/v8/list/inset/index.md'; +import Inset from '@site/static/usage/v9/list/inset/index.md'; @@ -41,7 +41,7 @@ import Inset from '@site/static/usage/v8/list/inset/index.md'; Adding the `lines` property to a list will adjust the bottom borders of all of the items in the list. Setting it to `"full"` will display full width borders, `"inset"` will display borders adjusted with left padding, and `"none"` will show no borders. If the `lines` property is set on an item in a list, that will take priority over the property on the list. -import Lines from '@site/static/usage/v8/list/lines/index.md'; +import Lines from '@site/static/usage/v9/list/lines/index.md'; diff --git a/docs/api/loading.md b/docs/api/loading.md index 6302e217dc0..13f45bb3ff0 100644 --- a/docs/api/loading.md +++ b/docs/api/loading.md @@ -1,12 +1,12 @@ --- title: "ion-loading" --- -import Props from '@ionic-internal/component-api/v8/loading/props.md'; -import Events from '@ionic-internal/component-api/v8/loading/events.md'; -import Methods from '@ionic-internal/component-api/v8/loading/methods.md'; -import Parts from '@ionic-internal/component-api/v8/loading/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/loading/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/loading/slots.md'; +import Props from '@ionic-internal/component-api/v9/loading/props.md'; +import Events from '@ionic-internal/component-api/v9/loading/events.md'; +import Methods from '@ionic-internal/component-api/v9/loading/methods.md'; +import Parts from '@ionic-internal/component-api/v9/loading/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/loading/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/loading/slots.md'; ion-loading: Loading | Application Loading Indicator Overlay @@ -28,13 +28,13 @@ Alternatively, developers can configure the loading indicator to dismiss automat ### Inline (Recommended) -import Inline from '@site/static/usage/v8/loading/inline/index.md'; +import Inline from '@site/static/usage/v9/loading/inline/index.md'; ### Controller -import Controller from '@site/static/usage/v8/loading/controller/index.md'; +import Controller from '@site/static/usage/v9/loading/controller/index.md'; @@ -42,9 +42,9 @@ import Controller from '@site/static/usage/v8/loading/controller/index.md'; ### Spinners -The spinner that is used can be customized using the `spinner` property. Refer to the [spinner property documentation](#spinner) for a full list of options. +The spinner that is used can be customized using the `spinner` property. Refer to the [spinner property documentation](#prop-spinner) for a full list of options. -import Spinners from '@site/static/usage/v8/loading/spinners/index.md'; +import Spinners from '@site/static/usage/v9/loading/spinners/index.md'; @@ -54,7 +54,7 @@ Loading uses scoped encapsulation, which means it will automatically scope its C We recommend passing a custom class and using that to add custom styles to the host and inner elements. -import Theming from '@site/static/usage/v8/loading/theming/index.md'; +import Theming from '@site/static/usage/v9/loading/theming/index.md'; diff --git a/docs/api/menu-button.md b/docs/api/menu-button.md index 6a7373a0325..c3dd50501c4 100644 --- a/docs/api/menu-button.md +++ b/docs/api/menu-button.md @@ -1,12 +1,12 @@ --- title: "ion-menu-button" --- -import Props from '@ionic-internal/component-api/v8/menu-button/props.md'; -import Events from '@ionic-internal/component-api/v8/menu-button/events.md'; -import Methods from '@ionic-internal/component-api/v8/menu-button/methods.md'; -import Parts from '@ionic-internal/component-api/v8/menu-button/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/menu-button/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/menu-button/slots.md'; +import Props from '@ionic-internal/component-api/v9/menu-button/props.md'; +import Events from '@ionic-internal/component-api/v9/menu-button/events.md'; +import Methods from '@ionic-internal/component-api/v9/menu-button/methods.md'; +import Parts from '@ionic-internal/component-api/v9/menu-button/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/menu-button/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/menu-button/slots.md'; ion-menu-button: Menu Button to Open an App Menu on a Page diff --git a/docs/api/menu-toggle.md b/docs/api/menu-toggle.md index 486b9a1cc3c..cd26df4cf55 100644 --- a/docs/api/menu-toggle.md +++ b/docs/api/menu-toggle.md @@ -1,12 +1,12 @@ --- title: "ion-menu-toggle" --- -import Props from '@ionic-internal/component-api/v8/menu-toggle/props.md'; -import Events from '@ionic-internal/component-api/v8/menu-toggle/events.md'; -import Methods from '@ionic-internal/component-api/v8/menu-toggle/methods.md'; -import Parts from '@ionic-internal/component-api/v8/menu-toggle/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/menu-toggle/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/menu-toggle/slots.md'; +import Props from '@ionic-internal/component-api/v9/menu-toggle/props.md'; +import Events from '@ionic-internal/component-api/v9/menu-toggle/events.md'; +import Methods from '@ionic-internal/component-api/v9/menu-toggle/methods.md'; +import Parts from '@ionic-internal/component-api/v9/menu-toggle/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/menu-toggle/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/menu-toggle/slots.md'; ion-menu-toggle: MenuToggle Component to Open/Close Menus diff --git a/docs/api/menu.md b/docs/api/menu.md index 37f68e0e3a9..5f7c9f5d116 100644 --- a/docs/api/menu.md +++ b/docs/api/menu.md @@ -1,12 +1,12 @@ --- title: "ion-menu" --- -import Props from '@ionic-internal/component-api/v8/menu/props.md'; -import Events from '@ionic-internal/component-api/v8/menu/events.md'; -import Methods from '@ionic-internal/component-api/v8/menu/methods.md'; -import Parts from '@ionic-internal/component-api/v8/menu/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/menu/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/menu/slots.md'; +import Props from '@ionic-internal/component-api/v9/menu/props.md'; +import Events from '@ionic-internal/component-api/v9/menu/events.md'; +import Methods from '@ionic-internal/component-api/v9/menu/methods.md'; +import Parts from '@ionic-internal/component-api/v9/menu/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/menu/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/menu/slots.md'; ion-menu: API Framework Docs for Types of Menu Components @@ -24,7 +24,7 @@ The menu element should be a sibling to the root content element. There can be a ## Basic Usage -import Basic from '@site/static/usage/v8/menu/basic/index.md'; +import Basic from '@site/static/usage/v9/menu/basic/index.md'; @@ -33,7 +33,7 @@ import Basic from '@site/static/usage/v8/menu/basic/index.md'; The [menu toggle](./menu-toggle) component can be used to create custom button that can open or close the menu. -import MenuToggle from '@site/static/usage/v8/menu/toggle/index.md'; +import MenuToggle from '@site/static/usage/v9/menu/toggle/index.md'; @@ -42,7 +42,7 @@ import MenuToggle from '@site/static/usage/v8/menu/toggle/index.md'; The `type` property can be used to customize how menus display in your application. -import MenuType from '@site/static/usage/v8/menu/type/index.md'; +import MenuType from '@site/static/usage/v9/menu/type/index.md'; @@ -53,7 +53,7 @@ Menus are displayed on the `"start"` side by default. In apps that use left-to-r If menus on both sides are needed in an app, the menu can be opened by passing the `side` value to the `open` method on `MenuController`. If a side is not provided, the menu on the `"start"` side will be opened. Refer to the [multiple menus](#multiple-menus) section below for an example using `MenuController`. -import Sides from '@site/static/usage/v8/menu/sides/index.md'; +import Sides from '@site/static/usage/v9/menu/sides/index.md'; @@ -62,7 +62,7 @@ import Sides from '@site/static/usage/v8/menu/sides/index.md'; When multiple menus exist on the same side, we need refer to them by ID instead of side. Otherwise, the wrong menu may be activated. -import Multiple from '@site/static/usage/v8/menu/multiple/index.md'; +import Multiple from '@site/static/usage/v9/menu/multiple/index.md'; @@ -71,7 +71,7 @@ import Multiple from '@site/static/usage/v8/menu/multiple/index.md'; ### CSS Shadow Parts -import Theming from '@site/static/usage/v8/menu/theming/index.md'; +import Theming from '@site/static/usage/v9/menu/theming/index.md'; diff --git a/docs/api/modal.md b/docs/api/modal.md index 2b3868b8190..732151008de 100644 --- a/docs/api/modal.md +++ b/docs/api/modal.md @@ -1,12 +1,12 @@ --- title: "ion-modal" --- -import Props from '@ionic-internal/component-api/v8/modal/props.md'; -import Events from '@ionic-internal/component-api/v8/modal/events.md'; -import Methods from '@ionic-internal/component-api/v8/modal/methods.md'; -import Parts from '@ionic-internal/component-api/v8/modal/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/modal/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/modal/slots.md'; +import Props from '@ionic-internal/component-api/v9/modal/props.md'; +import Events from '@ionic-internal/component-api/v9/modal/events.md'; +import Methods from '@ionic-internal/component-api/v9/modal/methods.md'; +import Parts from '@ionic-internal/component-api/v9/modal/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/modal/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/modal/slots.md'; ion-modal: Ionic Mobile App Custom Modal API Component @@ -25,7 +25,7 @@ A Modal is a dialog that appears on top of the app's content, and must be dismis When using `ion-modal` with Angular, React, or Vue, the component you pass in will be destroyed when the modal is dismissed. As this functionality is provided by the JavaScript framework, using `ion-modal` without a JavaScript framework will not destroy the component you passed in. If this is a needed functionality, we recommend using the `modalController` instead. -import InlineModalTriggerExample from '@site/static/usage/v8/modal/inline/basic/index.md'; +import InlineModalTriggerExample from '@site/static/usage/v9/modal/inline/basic/index.md'; @@ -35,7 +35,7 @@ The `isOpen` property on `ion-modal` allows developers to control the presentati `isOpen` uses a one-way data binding, meaning it will not automatically be set to `false` when the modal is dismissed. Developers should listen for the `ionModalDidDismiss` or `didDismiss` event and set `isOpen` to `false`. The reason for this is it prevents the internals of `ion-modal` from being tightly coupled with the state of the application. With a one way data binding, the modal only needs to concern itself with the boolean value that the reactive variable provides. With a two way data binding, the modal needs to concern itself with both the boolean value as well as the existence of the reactive variable itself. This can lead to non-deterministic behaviors and make applications harder to debug. -import InlineModalIsOpenExample from '@site/static/usage/v8/modal/inline/is-open/index.md'; +import InlineModalIsOpenExample from '@site/static/usage/v9/modal/inline/is-open/index.md'; @@ -43,7 +43,7 @@ import InlineModalIsOpenExample from '@site/static/usage/v8/modal/inline/is-open With the `modalController` developers can present an `ion-modal` programmatically. Developers will have complete control over when a modal is presented and dismissed. -import ControllerExample from '@site/static/usage/v8/modal/controller/index.md'; +import ControllerExample from '@site/static/usage/v9/modal/controller/index.md'; @@ -63,7 +63,7 @@ Developers can set `canDismiss` to a boolean value. If `canDismiss` is `true`, t Setting a boolean value should be used when you need to require a particular action to be taken prior to a modal being dismissed. For example, if developers want to require that a "Terms of Use" checkbox is checked prior to closing the modal, they could set `canDismiss` to `false` initially and update it to `true` when the checkbox is checked. -import CanDismissBooleanExample from '@site/static/usage/v8/modal/can-dismiss/boolean/index.md'; +import CanDismissBooleanExample from '@site/static/usage/v9/modal/can-dismiss/boolean/index.md'; @@ -75,7 +75,7 @@ Setting a callback function should be used when you have complex dismissing crit Note that setting a callback function will cause the swipe gesture to be interrupted when using a card or sheet modal. This is because Ionic does not know what your callback function will resolve to ahead of time. -import CanDismissFunctionExample from '@site/static/usage/v8/modal/can-dismiss/function/index.md'; +import CanDismissFunctionExample from '@site/static/usage/v9/modal/can-dismiss/function/index.md'; @@ -83,7 +83,7 @@ import CanDismissFunctionExample from '@site/static/usage/v8/modal/can-dismiss/f Developers may want to prevent users from swiping to close a card or sheet modal. This can be done by setting a callback function for `canDismiss` and checking if the `role` is not `gesture`. -import CanDismissPreventSwipeToCloseExample from '@site/static/usage/v8/modal/can-dismiss/prevent-swipe-to-close/index.md'; +import CanDismissPreventSwipeToCloseExample from '@site/static/usage/v9/modal/can-dismiss/prevent-swipe-to-close/index.md'; @@ -95,7 +95,7 @@ To achieve this customization, child components can employ various techniques su Here's a simplified example illustrating how a child component can interact with a parent component to modify the `canDismiss` callback: -import CanDismissChildStateExample from '@site/static/usage/v8/modal/can-dismiss/child-state/index.md'; +import CanDismissChildStateExample from '@site/static/usage/v9/modal/can-dismiss/child-state/index.md'; @@ -111,7 +111,7 @@ The `canDismiss` property can be used to control whether or not the card modal c The card display style is only available on iOS. ::: -import CardExample from '@site/static/usage/v8/modal/card/basic/index.md'; +import CardExample from '@site/static/usage/v9/modal/card/basic/index.md'; @@ -129,13 +129,13 @@ The `initialBreakpoint` property is required so that the sheet modal knows which The `backdropBreakpoint` property can be used to customize the point at which the `ion-backdrop` will begin to fade in. This is useful when creating interfaces that have content underneath the sheet that should remain interactive. A common use case is a sheet modal that overlays a map where the map is interactive until the sheet is fully expanded. -import SheetExample from '@site/static/usage/v8/modal/sheet/basic/index.md'; +import SheetExample from '@site/static/usage/v9/modal/sheet/basic/index.md'; ### Interacting with background content -import SheetBackgroundContentExample from '@site/static/usage/v8/modal/sheet/background-content/index.md'; +import SheetBackgroundContentExample from '@site/static/usage/v9/modal/sheet/background-content/index.md'; @@ -145,7 +145,7 @@ Developers should use the `--height` CSS Variable to change the height of the sh The following example shows how to get a sheet modal that is automatically sized based on its content. Note that by keeping the maximum breakpoint at `1` we ensure that the entire modal is accessible in the viewport. -import SheetAutoHeightExample from '@site/static/usage/v8/modal/sheet/auto-height/index.md'; +import SheetAutoHeightExample from '@site/static/usage/v9/modal/sheet/auto-height/index.md'; @@ -153,7 +153,7 @@ import SheetAutoHeightExample from '@site/static/usage/v8/modal/sheet/auto-heigh Sheet modals can optionally render a handle indicator used for dragging the sheet between breakpoints. The `handleBehavior` property can be used to configure the behavior of when the handle is activated by the user. -import SheetHandleBehaviorExample from '@site/static/usage/v8/modal/sheet/handle-behavior/index.md'; +import SheetHandleBehaviorExample from '@site/static/usage/v9/modal/sheet/handle-behavior/index.md'; @@ -161,7 +161,7 @@ import SheetHandleBehaviorExample from '@site/static/usage/v8/modal/sheet/handle Sheet modals can be configured to allow scrolling content at all breakpoints, making them ideal for displaying content larger than the viewport. By setting the `expandToScroll` property to `false`, the content remains scrollable at every breakpoint. Otherwise, by default, scrolling is only enabled when the sheet modal is fully expanded. -import SheetScrollingContentExample from '@site/static/usage/v8/modal/sheet/expand-to-scroll/index.md'; +import SheetScrollingContentExample from '@site/static/usage/v9/modal/sheet/expand-to-scroll/index.md'; @@ -185,7 +185,7 @@ ion-modal.stack-modal { } ``` -import ThemeExample from '@site/static/usage/v8/modal/styling/theming/index.md'; +import ThemeExample from '@site/static/usage/v9/modal/styling/theming/index.md'; @@ -193,7 +193,7 @@ import ThemeExample from '@site/static/usage/v8/modal/styling/theming/index.md'; The enter and leave animations can be customized by using our animation builder and assigning animations to `enterAnimation` and `leaveAnimation`. -import AnimationsExample from '@site/static/usage/v8/modal/styling/animations/index.md'; +import AnimationsExample from '@site/static/usage/v9/modal/styling/animations/index.md'; @@ -201,7 +201,7 @@ import AnimationsExample from '@site/static/usage/v8/modal/styling/animations/in While `ion-modal` is most often used for full-page views, cards, or sheets, it is also possible to use it for custom dialogs. This is useful if developers need an interface that is more complex than what components such as [ion-alert](./alert) or [ion-loading](./loading) provide. -import CustomDialogs from '@site/static/usage/v8/modal/custom-dialogs/index.md'; +import CustomDialogs from '@site/static/usage/v9/modal/custom-dialogs/index.md'; @@ -218,7 +218,7 @@ The `ionDragStart` event is emitted as soon as the user begins a dragging gestur The `ionDragEnd` event is emitted when the user completes the dragging gesture by releasing the modal. Like the move event, it includes the final [`ModalDragEventDetail`](#modaldrageventdetail) object. This event is commonly used to finalize state changes once the modal has come to a rest. -import DragStartEndEvents from '@site/static/usage/v8/modal/drag-start-end-events/index.md'; +import DragStartEndEvents from '@site/static/usage/v9/modal/drag-start-end-events/index.md'; @@ -226,7 +226,7 @@ import DragStartEndEvents from '@site/static/usage/v8/modal/drag-start-end-event The `ionDragMove` event is emitted continuously while the user is actively dragging the modal. This event provides a [`ModalDragEventDetail`](#modaldrageventdetail) object containing real-time data, essential for creating highly responsive UI updates that react instantly to the user's touch. For example, the `progress` value can be used to dynamically darken a header's opacity as the modal is dragged upward. -import DragMoveEvent from '@site/static/usage/v8/modal/drag-move-event/index.md'; +import DragMoveEvent from '@site/static/usage/v9/modal/drag-move-event/index.md'; @@ -321,6 +321,24 @@ interface ModalDragEventDetail { * snap to upon release. */ snapBreakpoint?: number; + /** + * Whether the modal is attempting to dismiss when the drag gesture + * ends. + * + * In a sheet modal, this is `true` when the modal will snap to a + * breakpoint of 0. In a card modal, it is `true` when the gesture + * passed the threshold required to close the modal. + * + * If a `canDismiss` callback is set, it can still cancel the dismiss + * after this event is emitted. Listen for `ionModalDidDismiss` to + * confirm that the modal closed. + * + * This property is only included on `ionDragEnd`. + * + * This can be used to react as soon as the user releases the modal, + * such as dismissing the keyboard while the modal animates away. + */ + isDismissing?: boolean; } ``` @@ -363,7 +381,7 @@ When the backdrop is disabled, users will be able to interact with elements outs The content of an inline `ion-modal` is unmounted when closed. If this content is expensive to render, developers can use the `keepContentsMounted` property to mount the content as soon as the modal is mounted. This can help optimize the responsiveness of your application as the inner contents will have already been mounted when the modal opens. -import Mount from '@site/static/usage/v8/modal/performance/mount/index.md'; +import Mount from '@site/static/usage/v9/modal/performance/mount/index.md'; diff --git a/docs/api/nav-link.md b/docs/api/nav-link.md index e939bfbf3aa..aeaf3d55d9a 100644 --- a/docs/api/nav-link.md +++ b/docs/api/nav-link.md @@ -1,12 +1,12 @@ --- title: "ion-nav-link" --- -import Props from '@ionic-internal/component-api/v8/nav-link/props.md'; -import Events from '@ionic-internal/component-api/v8/nav-link/events.md'; -import Methods from '@ionic-internal/component-api/v8/nav-link/methods.md'; -import Parts from '@ionic-internal/component-api/v8/nav-link/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/nav-link/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/nav-link/slots.md'; +import Props from '@ionic-internal/component-api/v9/nav-link/props.md'; +import Events from '@ionic-internal/component-api/v9/nav-link/events.md'; +import Methods from '@ionic-internal/component-api/v9/nav-link/methods.md'; +import Parts from '@ionic-internal/component-api/v9/nav-link/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/nav-link/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/nav-link/slots.md'; ion-nav-link: Navigation Links to a Specified Component diff --git a/docs/api/nav.md b/docs/api/nav.md index b57c4874a88..e48898367a6 100644 --- a/docs/api/nav.md +++ b/docs/api/nav.md @@ -1,12 +1,12 @@ --- title: "ion-nav" --- -import Props from '@ionic-internal/component-api/v8/nav/props.md'; -import Events from '@ionic-internal/component-api/v8/nav/events.md'; -import Methods from '@ionic-internal/component-api/v8/nav/methods.md'; -import Parts from '@ionic-internal/component-api/v8/nav/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/nav/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/nav/slots.md'; +import Props from '@ionic-internal/component-api/v9/nav/props.md'; +import Events from '@ionic-internal/component-api/v9/nav/events.md'; +import Methods from '@ionic-internal/component-api/v9/nav/methods.md'; +import Parts from '@ionic-internal/component-api/v9/nav/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/nav/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/nav/slots.md'; ion-nav: Nav View Component for Ionic Framework Apps @@ -29,7 +29,7 @@ Unlike Router Outlet, Nav is not tied to a particular router. This means that if NavLink is a simplified API when interacting with Nav. Developers can customize the component, pass along component properties, modify the direction of the route animation or define a custom animation when navigating. -import NavLinkExample from '@site/static/usage/v8/nav/nav-link/index.md'; +import NavLinkExample from '@site/static/usage/v9/nav/nav-link/index.md'; @@ -43,7 +43,7 @@ The example below uses a reference to Nav and the public method APIs to push and ::: -import ModalNavigationExample from '@site/static/usage/v8/nav/modal-navigation/index.md'; +import ModalNavigationExample from '@site/static/usage/v9/nav/modal-navigation/index.md'; diff --git a/docs/api/note.md b/docs/api/note.md index 41bfcb48844..74a2cc899ee 100644 --- a/docs/api/note.md +++ b/docs/api/note.md @@ -1,12 +1,12 @@ --- title: "ion-note" --- -import Props from '@ionic-internal/component-api/v8/note/props.md'; -import Events from '@ionic-internal/component-api/v8/note/events.md'; -import Methods from '@ionic-internal/component-api/v8/note/methods.md'; -import Parts from '@ionic-internal/component-api/v8/note/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/note/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/note/slots.md'; +import Props from '@ionic-internal/component-api/v9/note/props.md'; +import Events from '@ionic-internal/component-api/v9/note/events.md'; +import Methods from '@ionic-internal/component-api/v9/note/methods.md'; +import Parts from '@ionic-internal/component-api/v9/note/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/note/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/note/slots.md'; ion-note: Note Text Elements for iOS and Android Ionic Apps @@ -21,13 +21,13 @@ Notes are text elements generally used as subtitles that provide more informatio ## Basic Usage -import Basic from '@site/static/usage/v8/note/basic/index.md'; +import Basic from '@site/static/usage/v9/note/basic/index.md'; ## Item Notes -import Item from '@site/static/usage/v8/note/item/index.md'; +import Item from '@site/static/usage/v9/note/item/index.md'; @@ -35,13 +35,13 @@ import Item from '@site/static/usage/v8/note/item/index.md'; ### Colors -import Colors from '@site/static/usage/v8/note/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/note/theming/colors/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/note/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/note/theming/css-properties/index.md'; diff --git a/docs/api/picker-column-option.md b/docs/api/picker-column-option.md index ea1f428b45a..7a43a9d058e 100644 --- a/docs/api/picker-column-option.md +++ b/docs/api/picker-column-option.md @@ -1,12 +1,12 @@ --- title: "ion-picker-column-option" --- -import Props from '@ionic-internal/component-api/v8/picker-column-option/props.md'; -import Events from '@ionic-internal/component-api/v8/picker-column-option/events.md'; -import Methods from '@ionic-internal/component-api/v8/picker-column-option/methods.md'; -import Parts from '@ionic-internal/component-api/v8/picker-column-option/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/picker-column-option/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/picker-column-option/slots.md'; +import Props from '@ionic-internal/component-api/v9/picker-column-option/props.md'; +import Events from '@ionic-internal/component-api/v9/picker-column-option/events.md'; +import Methods from '@ionic-internal/component-api/v9/picker-column-option/methods.md'; +import Parts from '@ionic-internal/component-api/v9/picker-column-option/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/picker-column-option/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/picker-column-option/slots.md'; ion-picker-column-option: The individual options within a column in a picker. diff --git a/docs/api/picker-column.md b/docs/api/picker-column.md index 48280cdd380..51fc1740293 100644 --- a/docs/api/picker-column.md +++ b/docs/api/picker-column.md @@ -1,12 +1,12 @@ --- title: "ion-picker-column" --- -import Props from '@ionic-internal/component-api/v8/picker-column/props.md'; -import Events from '@ionic-internal/component-api/v8/picker-column/events.md'; -import Methods from '@ionic-internal/component-api/v8/picker-column/methods.md'; -import Parts from '@ionic-internal/component-api/v8/picker-column/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/picker-column/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/picker-column/slots.md'; +import Props from '@ionic-internal/component-api/v9/picker-column/props.md'; +import Events from '@ionic-internal/component-api/v9/picker-column/events.md'; +import Methods from '@ionic-internal/component-api/v9/picker-column/methods.md'; +import Parts from '@ionic-internal/component-api/v9/picker-column/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/picker-column/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/picker-column/slots.md'; ion-picker-column: Individual columns within a picker diff --git a/docs/api/picker.md b/docs/api/picker.md index 888ec7e5286..5fd224eca6d 100644 --- a/docs/api/picker.md +++ b/docs/api/picker.md @@ -1,12 +1,12 @@ --- title: "ion-picker" --- -import Props from '@ionic-internal/component-api/v8/picker/props.md'; -import Events from '@ionic-internal/component-api/v8/picker/events.md'; -import Methods from '@ionic-internal/component-api/v8/picker/methods.md'; -import Parts from '@ionic-internal/component-api/v8/picker/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/picker/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/picker/slots.md'; +import Props from '@ionic-internal/component-api/v9/picker/props.md'; +import Events from '@ionic-internal/component-api/v9/picker/events.md'; +import Methods from '@ionic-internal/component-api/v9/picker/methods.md'; +import Parts from '@ionic-internal/component-api/v9/picker/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/picker/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/picker/slots.md'; ion-picker: Display a list of options in columns @@ -19,7 +19,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill'; A Picker displays one or more columns with options for users to choose from. -import Basic from '@site/static/usage/v8/picker/basic/index.md'; +import Basic from '@site/static/usage/v9/picker/basic/index.md'; @@ -27,7 +27,7 @@ import Basic from '@site/static/usage/v8/picker/basic/index.md'; Use the `prefix` and `suffix` slots to add additional content to the picker. -import PrefixSuffix from '@site/static/usage/v8/picker/prefix-suffix/index.md'; +import PrefixSuffix from '@site/static/usage/v9/picker/prefix-suffix/index.md'; @@ -37,7 +37,7 @@ import PrefixSuffix from '@site/static/usage/v8/picker/prefix-suffix/index.md'; The picker highlight and fade can be customized using CSS variables on `ion-picker`. Developers can customize the individual appearance of `ion-picker-column-options` by targeting them directly and using host level styling. -import CSSProps from '@site/static/usage/v8/picker/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/picker/theming/css-properties/index.md'; @@ -45,7 +45,7 @@ import CSSProps from '@site/static/usage/v8/picker/theming/css-properties/index. Pickers can be displayed inside of overlays, such as `ion-modal` to create a picker experience with confirmation or cancellation buttons. -import ModalExample from '@site/static/usage/v8/picker/modal/index.md'; +import ModalExample from '@site/static/usage/v9/picker/modal/index.md'; diff --git a/docs/api/popover.md b/docs/api/popover.md index fe0dd4c7738..1db68e5f4a9 100644 --- a/docs/api/popover.md +++ b/docs/api/popover.md @@ -1,12 +1,12 @@ --- title: "ion-popover" --- -import Props from '@ionic-internal/component-api/v8/popover/props.md'; -import Events from '@ionic-internal/component-api/v8/popover/events.md'; -import Methods from '@ionic-internal/component-api/v8/popover/methods.md'; -import Parts from '@ionic-internal/component-api/v8/popover/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/popover/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/popover/slots.md'; +import Props from '@ionic-internal/component-api/v9/popover/props.md'; +import Events from '@ionic-internal/component-api/v9/popover/events.md'; +import Methods from '@ionic-internal/component-api/v9/popover/methods.md'; +import Parts from '@ionic-internal/component-api/v9/popover/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/popover/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/popover/slots.md'; ion-popover: iOS / Android Popover UI Dialog Component @@ -54,7 +54,7 @@ A trigger for an inline `ion-popover` is the element that will open a popover wh Triggers are not applicable when using the `popoverController` because the `ion-popover` is not created ahead of time. ::: -import InlineTrigger from '@site/static/usage/v8/popover/presenting/inline-trigger/index.md'; +import InlineTrigger from '@site/static/usage/v9/popover/presenting/inline-trigger/index.md'; @@ -65,7 +65,7 @@ Inline popovers can also be opened by setting the `isOpen` property to `true`. T `isOpen` uses a one-way data binding, meaning it will not automatically be set to `false` when the popover is dismissed. Developers should listen for the `ionPopoverDidDismiss` or `didDismiss` event and set `isOpen` to `false`. The reason for this is it prevents the internals of `ion-popover` from being tightly coupled with the state of the application. With a one way data binding, the popover only needs to concern itself with the boolean value that the reactive variable provides. With a two way data binding, the popover needs to concern itself with both the boolean value as well as the existence of the reactive variable itself. This can lead to non-deterministic behaviors and make applications harder to debug. -import IsOpenTrigger from '@site/static/usage/v8/popover/presenting/inline-isopen/index.md'; +import IsOpenTrigger from '@site/static/usage/v9/popover/presenting/inline-isopen/index.md'; @@ -83,7 +83,7 @@ Instead of a controller, React has a hook called `useIonPopover` which behaves i ### Usage -import ControllerExample from '@site/static/usage/v8/popover/presenting/controller/index.md'; +import ControllerExample from '@site/static/usage/v9/popover/presenting/controller/index.md'; @@ -96,7 +96,7 @@ Popovers are presented at the root of your application so they overlay your enti If you are building an Ionic Angular app, the styles need to be added to a global stylesheet file. ::: -import Styling from '@site/static/usage/v8/popover/customization/styling/index.md'; +import Styling from '@site/static/usage/v9/popover/customization/styling/index.md'; @@ -117,7 +117,7 @@ The `alignment` property allows you to line up an edge of your popover with a co ### Side and Alignment Demo -import Positioning from '@site/static/usage/v8/popover/customization/positioning/index.md'; +import Positioning from '@site/static/usage/v9/popover/customization/positioning/index.md'; @@ -131,7 +131,7 @@ When making dropdown menus, you may want to have the width of the popover match If you are using the `popoverController`, you must provide an event via the `event` option and Ionic Framework will use `event.target` as the reference element. Refer to the [controller demo](#controller-popovers) for an example of this pattern. -import Sizing from '@site/static/usage/v8/popover/customization/sizing/index.md'; +import Sizing from '@site/static/usage/v9/popover/customization/sizing/index.md'; @@ -145,7 +145,7 @@ You can use the `dismissOnSelect` property to automatically close the popover wh Nested popovers cannot be created when using the `popoverController` because the popover is automatically added to the root of your application when the `create` method is called. ::: -import NestedPopover from '@site/static/usage/v8/popover/nested/index.md'; +import NestedPopover from '@site/static/usage/v9/popover/nested/index.md'; @@ -225,7 +225,7 @@ type PositionAlign = 'start' | 'center' | 'end'; The content of an inline `ion-popover` is unmounted when closed. If this content is expensive to render, developers can use the `keepContentsMounted` property to mount the content as soon as the popover is mounted. This can help optimize the responsiveness of your application as the inner contents will have already been mounted when the popover opens. -import Mount from '@site/static/usage/v8/popover/performance/mount/index.md'; +import Mount from '@site/static/usage/v9/popover/performance/mount/index.md'; diff --git a/docs/api/progress-bar.md b/docs/api/progress-bar.md index 69ff4b5447d..b9df1588d38 100644 --- a/docs/api/progress-bar.md +++ b/docs/api/progress-bar.md @@ -1,12 +1,12 @@ --- title: "ion-progress-bar" --- -import Props from '@ionic-internal/component-api/v8/progress-bar/props.md'; -import Events from '@ionic-internal/component-api/v8/progress-bar/events.md'; -import Methods from '@ionic-internal/component-api/v8/progress-bar/methods.md'; -import Parts from '@ionic-internal/component-api/v8/progress-bar/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/progress-bar/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/progress-bar/slots.md'; +import Props from '@ionic-internal/component-api/v9/progress-bar/props.md'; +import Events from '@ionic-internal/component-api/v9/progress-bar/events.md'; +import Methods from '@ionic-internal/component-api/v9/progress-bar/methods.md'; +import Parts from '@ionic-internal/component-api/v9/progress-bar/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/progress-bar/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/progress-bar/slots.md'; ion-progress-bar: App Progress Bar for Loading Indicator @@ -24,7 +24,7 @@ Progress bars inform users about the status of ongoing processes, such as loadin Determinate is the default type. It should be used when the percentage of an operation is known. The progress is represented by setting the `value` property. This can be used to show the progress increasing from 0 to 100% of the track. -import Determinate from '@site/static/usage/v8/progress-bar/determinate/index.md'; +import Determinate from '@site/static/usage/v9/progress-bar/determinate/index.md'; @@ -32,7 +32,7 @@ import Determinate from '@site/static/usage/v8/progress-bar/determinate/index.md If the `buffer` property is set, a buffer stream will show with animated circles to indicate activity. The value of the `buffer` property will also be represented by how much visible track there is. If the value of `buffer` is less than the `value` property, there will be no visible track. If `buffer` is equal to `1` then the buffer stream will be hidden. -import Buffer from '@site/static/usage/v8/progress-bar/buffer/index.md'; +import Buffer from '@site/static/usage/v9/progress-bar/buffer/index.md'; @@ -41,7 +41,7 @@ import Buffer from '@site/static/usage/v8/progress-bar/buffer/index.md'; The indeterminate type should be used when it is unknown how long the process will take. The progress bar is not tied to the `value`, instead it continually slides along the track until the process is complete. -import Indeterminate from '@site/static/usage/v8/progress-bar/indeterminate/index.md'; +import Indeterminate from '@site/static/usage/v9/progress-bar/indeterminate/index.md'; @@ -49,7 +49,7 @@ import Indeterminate from '@site/static/usage/v8/progress-bar/indeterminate/inde ## Progress Bars in Toolbars {/* Reuse the playground from the Toolbar directory */} -import Toolbar from '@site/static/usage/v8/toolbar/progress-bars/index.md'; +import Toolbar from '@site/static/usage/v9/toolbar/progress-bars/index.md'; @@ -58,21 +58,21 @@ import Toolbar from '@site/static/usage/v8/toolbar/progress-bars/index.md'; ### Colors -import Colors from '@site/static/usage/v8/progress-bar/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/progress-bar/theming/colors/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/progress-bar/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/progress-bar/theming/css-properties/index.md'; ### CSS Shadow Parts -import CSSParts from '@site/static/usage/v8/progress-bar/theming/css-shadow-parts/index.md'; +import CSSParts from '@site/static/usage/v9/progress-bar/theming/css-shadow-parts/index.md'; diff --git a/docs/api/radio-group.md b/docs/api/radio-group.md index 697db3a8814..1d7007191e2 100644 --- a/docs/api/radio-group.md +++ b/docs/api/radio-group.md @@ -1,12 +1,12 @@ --- title: "ion-radio-group" --- -import Props from '@ionic-internal/component-api/v8/radio-group/props.md'; -import Events from '@ionic-internal/component-api/v8/radio-group/events.md'; -import Methods from '@ionic-internal/component-api/v8/radio-group/methods.md'; -import Parts from '@ionic-internal/component-api/v8/radio-group/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/radio-group/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/radio-group/slots.md'; +import Props from '@ionic-internal/component-api/v9/radio-group/props.md'; +import Events from '@ionic-internal/component-api/v9/radio-group/events.md'; +import Methods from '@ionic-internal/component-api/v9/radio-group/methods.md'; +import Parts from '@ionic-internal/component-api/v9/radio-group/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/radio-group/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/radio-group/slots.md'; ion-radio-group: Radio Button Group Usage for Ionic Apps diff --git a/docs/api/radio.md b/docs/api/radio.md index 62a86923dda..c9d4a715b48 100644 --- a/docs/api/radio.md +++ b/docs/api/radio.md @@ -1,12 +1,12 @@ --- title: "ion-radio" --- -import Props from '@ionic-internal/component-api/v8/radio/props.md'; -import Events from '@ionic-internal/component-api/v8/radio/events.md'; -import Methods from '@ionic-internal/component-api/v8/radio/methods.md'; -import Parts from '@ionic-internal/component-api/v8/radio/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/radio/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/radio/slots.md'; +import Props from '@ionic-internal/component-api/v9/radio/props.md'; +import Events from '@ionic-internal/component-api/v9/radio/events.md'; +import Methods from '@ionic-internal/component-api/v9/radio/methods.md'; +import Parts from '@ionic-internal/component-api/v9/radio/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/radio/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/radio/slots.md'; ion-radio: Radio Component for iOS and Android @@ -24,7 +24,7 @@ When radios are inside of a radio group, only one radio will be checked at any t ## Basic Usage -import Basic from '@site/static/usage/v8/radio/basic/index.md'; +import Basic from '@site/static/usage/v9/radio/basic/index.md'; @@ -32,7 +32,7 @@ import Basic from '@site/static/usage/v8/radio/basic/index.md'; Developers can use the `labelPlacement` property to control how the label is placed relative to the control. This property mirrors the flexbox `flex-direction` property. -import LabelPlacement from '@site/static/usage/v8/radio/label-placement/index.md'; +import LabelPlacement from '@site/static/usage/v9/radio/label-placement/index.md'; @@ -40,7 +40,7 @@ import LabelPlacement from '@site/static/usage/v8/radio/label-placement/index.md Regardless of label placement, long text will not wrap by default. If the width of the radio is constrained, overflowing text will be truncated with an ellipsis. You can enable text wrapping by adding the `ion-text-wrap` class to a wrapper around the radio text or styling the `label` shadow part using the `::part()` selector. -import LabelWrap from '@site/static/usage/v8/radio/label-wrap/index.md'; +import LabelWrap from '@site/static/usage/v9/radio/label-wrap/index.md'; @@ -48,7 +48,7 @@ import LabelWrap from '@site/static/usage/v8/radio/label-wrap/index.md'; 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. -import UsingComparewith from '@site/static/usage/v8/radio/using-comparewith/index.md'; +import UsingComparewith from '@site/static/usage/v9/radio/using-comparewith/index.md'; @@ -60,7 +60,7 @@ Developers can use the `alignment` property to control how the label and control Stacked radios can be aligned using the `alignment` property. This can be useful when the label and control need to be centered horizontally. ::: -import Alignment from '@site/static/usage/v8/radio/alignment/index.md'; +import Alignment from '@site/static/usage/v9/radio/alignment/index.md'; @@ -68,7 +68,7 @@ import Alignment from '@site/static/usage/v8/radio/alignment/index.md'; Developers can use the `justify` property to control how the label and control are packed on a line. This property mirrors the flexbox `justify-content` property. -import Justify from '@site/static/usage/v8/radio/justify/index.md'; +import Justify from '@site/static/usage/v9/radio/justify/index.md'; @@ -80,7 +80,7 @@ import Justify from '@site/static/usage/v8/radio/justify/index.md'; By default, once a radio is selected it cannot be deselected; pressing it again will keep it selected. This behavior can be modified by using the `allowEmptySelection` property on the parent radio group, which enables the radios to be deselected. -import EmptySelection from '@site/static/usage/v8/radio/empty-selection/index.md'; +import EmptySelection from '@site/static/usage/v9/radio/empty-selection/index.md'; @@ -90,7 +90,7 @@ Helper and error text can be used inside of a radio group with the `helperText` In Angular, this is done automatically through form validation. In JavaScript, React and Vue, the class needs to be manually added based on your own validation. -import HelperError from '@site/static/usage/v8/radio/helper-error/index.md'; +import HelperError from '@site/static/usage/v9/radio/helper-error/index.md'; @@ -99,19 +99,19 @@ import HelperError from '@site/static/usage/v8/radio/helper-error/index.md'; ### Colors -import Colors from '@site/static/usage/v8/radio/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/radio/theming/colors/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/radio/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/radio/theming/css-properties/index.md'; ### CSS Shadow Parts -import CSSParts from '@site/static/usage/v8/radio/theming/css-shadow-parts/index.md'; +import CSSParts from '@site/static/usage/v9/radio/theming/css-shadow-parts/index.md'; diff --git a/docs/api/range.md b/docs/api/range.md index 0a949acd1d0..3be1f6e6ea5 100644 --- a/docs/api/range.md +++ b/docs/api/range.md @@ -1,12 +1,12 @@ --- title: "ion-range" --- -import Props from '@ionic-internal/component-api/v8/range/props.md'; -import Events from '@ionic-internal/component-api/v8/range/events.md'; -import Methods from '@ionic-internal/component-api/v8/range/methods.md'; -import Parts from '@ionic-internal/component-api/v8/range/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/range/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/range/slots.md'; +import Props from '@ionic-internal/component-api/v9/range/props.md'; +import Events from '@ionic-internal/component-api/v9/range/events.md'; +import Methods from '@ionic-internal/component-api/v9/range/methods.md'; +import Parts from '@ionic-internal/component-api/v9/range/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/range/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/range/slots.md'; ion-range: Range Slider Knob Controls with Labels @@ -34,7 +34,7 @@ Labels should be used to describe the range. They can be used visually, and they The below demo shows how to use the `labelPlacement` property to change the position of the label relative to the range. While the `label` property is used here, `labelPlacement` can also be used with the `label` slot. -import LabelsPlayground from '@site/static/usage/v8/range/labels/index.md'; +import LabelsPlayground from '@site/static/usage/v9/range/labels/index.md'; @@ -42,7 +42,7 @@ import LabelsPlayground from '@site/static/usage/v8/range/labels/index.md'; While plaintext labels should be passed in via the `label` property, if custom HTML is needed, it can be passed through the `label` slot instead. -import LabelSlotPlayground from '@site/static/usage/v8/range/label-slot/index.md'; +import LabelSlotPlayground from '@site/static/usage/v9/range/label-slot/index.md'; @@ -50,7 +50,7 @@ import LabelSlotPlayground from '@site/static/usage/v8/range/label-slot/index.md If no visible label is needed, developers should still supply an `aria-label` so the range is accessible to screen readers. -import NoVisibleLabel from '@site/static/usage/v8/range/no-visible-label/index.md'; +import NoVisibleLabel from '@site/static/usage/v9/range/no-visible-label/index.md'; @@ -60,7 +60,7 @@ Decorative elements can be passed into the `start` or `end` slots of the range. If the directionality of the document is set to left to right, the contents slotted to the `start` position will display to the left of the range, where as contents slotted to the `end` position will display to the right of the range. In right to left (rtl) directionality, the contents slotted to the `start` position will display to the right of the range, where as contents slotted to the `end` position will display to the left of the range. -import DecorationsPlayground from '@site/static/usage/v8/range/slots/index.md'; +import DecorationsPlayground from '@site/static/usage/v9/range/slots/index.md'; @@ -68,7 +68,7 @@ import DecorationsPlayground from '@site/static/usage/v8/range/slots/index.md'; Dual knobs introduce two knob controls that users can use to select a value at a lower and upper bounds. When selected, the Range will emit an `ionChange` event with a [RangeValue](#rangevalue), containing the upper and lower values selected. -import DualKnobs from '@site/static/usage/v8/range/dual-knobs/index.md'; +import DualKnobs from '@site/static/usage/v9/range/dual-knobs/index.md'; @@ -78,7 +78,7 @@ The `pin` attribute will display the value of the Range above the knob when drag With the `pinFormatter` function, developers can customize the formatting of the range value to the user. -import Pins from '@site/static/usage/v8/range/pins/index.md'; +import Pins from '@site/static/usage/v9/range/pins/index.md'; @@ -88,7 +88,7 @@ Ticks show indications for each available value on the Range. In order to use ti With snapping enabled, the Range knob will snap to the nearest available value as the knob is dragged and released. -import SnappingTicks from '@site/static/usage/v8/range/snapping-ticks/index.md'; +import SnappingTicks from '@site/static/usage/v9/range/snapping-ticks/index.md'; @@ -98,7 +98,7 @@ import SnappingTicks from '@site/static/usage/v8/range/snapping-ticks/index.md'; The `ionChange` event emits as the Range knob value changes. -import IonChangeEvent from '@site/static/usage/v8/range/ion-change-event/index.md'; +import IonChangeEvent from '@site/static/usage/v9/range/ion-change-event/index.md'; @@ -106,7 +106,7 @@ import IonChangeEvent from '@site/static/usage/v8/range/ion-change-event/index.m The `ionKnobMoveStart` event emits when the Range knob begins dragging, whether through mouse drag, touch gesture or keyboard interaction. Inversely, `ionKnobMoveEnd` emits when the Range knob is released. Both events emit with the `RangeValue` type and work in combination with the `dualKnobs` property. -import IonKnobMoveEvent from '@site/static/usage/v8/range/ion-knob-move-event/index.md'; +import IonKnobMoveEvent from '@site/static/usage/v9/range/ion-knob-move-event/index.md'; @@ -116,7 +116,7 @@ import IonKnobMoveEvent from '@site/static/usage/v8/range/ion-knob-move-event/in Range includes [CSS Variables](#css-custom-properties) to quickly theme and customize the appearance of the Range component to match your application's design. -import CSSProps from '@site/static/usage/v8/range/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/range/theming/css-properties/index.md'; @@ -126,7 +126,7 @@ Range includes [CSS Shadow Parts](#css-shadow-parts) to allow complete customiza When `dualKnobs` is enabled, additional Shadow Parts are exposed to allow each knob to be styled independently. These are available in two forms: **static identity parts** (`A` and `B`) and **dynamic position parts** (`lower` and `upper`). The A and B parts always refer to the same physical knobs, even if the knobs cross. In contrast, the lower and upper parts reflect the current value position and automatically swap if the knobs cross. This allows styling by consistent identity or by relative value within the range. -import CSSParts from '@site/static/usage/v8/range/theming/css-shadow-parts/index.md'; +import CSSParts from '@site/static/usage/v9/range/theming/css-shadow-parts/index.md'; diff --git a/docs/api/refresher-content.md b/docs/api/refresher-content.md index 68bb621ee1f..f0e954f8090 100644 --- a/docs/api/refresher-content.md +++ b/docs/api/refresher-content.md @@ -1,12 +1,12 @@ --- title: "ion-refresher-content" --- -import Props from '@ionic-internal/component-api/v8/refresher-content/props.md'; -import Events from '@ionic-internal/component-api/v8/refresher-content/events.md'; -import Methods from '@ionic-internal/component-api/v8/refresher-content/methods.md'; -import Parts from '@ionic-internal/component-api/v8/refresher-content/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/refresher-content/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/refresher-content/slots.md'; +import Props from '@ionic-internal/component-api/v9/refresher-content/props.md'; +import Events from '@ionic-internal/component-api/v9/refresher-content/events.md'; +import Methods from '@ionic-internal/component-api/v9/refresher-content/methods.md'; +import Parts from '@ionic-internal/component-api/v9/refresher-content/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/refresher-content/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/refresher-content/slots.md'; import EncapsulationPill from '@components/page/api/EncapsulationPill'; diff --git a/docs/api/refresher.md b/docs/api/refresher.md index a9a8d97ca55..28020329f6a 100644 --- a/docs/api/refresher.md +++ b/docs/api/refresher.md @@ -1,12 +1,12 @@ --- title: "ion-refresher" --- -import Props from '@ionic-internal/component-api/v8/refresher/props.md'; -import Events from '@ionic-internal/component-api/v8/refresher/events.md'; -import Methods from '@ionic-internal/component-api/v8/refresher/methods.md'; -import Parts from '@ionic-internal/component-api/v8/refresher/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/refresher/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/refresher/slots.md'; +import Props from '@ionic-internal/component-api/v9/refresher/props.md'; +import Events from '@ionic-internal/component-api/v9/refresher/events.md'; +import Methods from '@ionic-internal/component-api/v9/refresher/methods.md'; +import Parts from '@ionic-internal/component-api/v9/refresher/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/refresher/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/refresher/slots.md'; ion-refresher: Pull-to-Refresh Page Content on Ionic Apps @@ -23,7 +23,7 @@ Data should be modified during the refresher's output events. Once the async ope ## Basic Usage -import Basic from '@site/static/usage/v8/refresher/basic/index.md'; +import Basic from '@site/static/usage/v9/refresher/basic/index.md'; @@ -34,7 +34,7 @@ The refresher has several properties for customizing the pull gesture. Set the ` These properties do not apply when the [native refresher](#native-refreshers) is enabled. -import PullProperties from '@site/static/usage/v8/refresher/pull-properties/index.md'; +import PullProperties from '@site/static/usage/v9/refresher/pull-properties/index.md'; @@ -45,7 +45,7 @@ The default icon, spinner, and text can be customized on the [refresher content] Setting `pullingIcon` will disable the [native refresher](#native-refreshers). -import CustomContent from '@site/static/usage/v8/refresher/custom-content/index.md'; +import CustomContent from '@site/static/usage/v9/refresher/custom-content/index.md'; @@ -89,7 +89,7 @@ Developers should apply the following CSS to the scrollable container. This CSS } ``` -import CustomScrollTarget from '@site/static/usage/v8/refresher/custom-scroll-target/index.md'; +import CustomScrollTarget from '@site/static/usage/v9/refresher/custom-scroll-target/index.md'; @@ -98,7 +98,7 @@ import CustomScrollTarget from '@site/static/usage/v8/refresher/custom-scroll-ta While the refresher can be used with any type of content, a common use case in native apps is to display a list of data that gets updated on refresh. In the below example, the app generates a list of data and then appends data to the top of the list when the refresh is completed. In a real app, the data would be received and updated after sending a request via a network or database call. -import Advanced from '@site/static/usage/v8/refresher/advanced/index.md'; +import Advanced from '@site/static/usage/v9/refresher/advanced/index.md'; @@ -110,7 +110,7 @@ The `ionPullStart` event is emitted when the user begins a pull gesture. This ev The `ionPullEnd` event is emitted when the refresher returns to an inactive state, with a reason property of `'complete'` or `'cancel'` indicating whether the refresh operation completed successfully or was canceled. -import PullStartEndEvents from '@site/static/usage/v8/refresher/pull-start-end-events/index.md'; +import PullStartEndEvents from '@site/static/usage/v9/refresher/pull-start-end-events/index.md'; diff --git a/docs/api/reorder-group.md b/docs/api/reorder-group.md index bfc5b8957fb..45bd36f2a04 100644 --- a/docs/api/reorder-group.md +++ b/docs/api/reorder-group.md @@ -1,12 +1,12 @@ --- title: "ion-reorder-group" --- -import Props from '@ionic-internal/component-api/v8/reorder-group/props.md'; -import Events from '@ionic-internal/component-api/v8/reorder-group/events.md'; -import Methods from '@ionic-internal/component-api/v8/reorder-group/methods.md'; -import Parts from '@ionic-internal/component-api/v8/reorder-group/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/reorder-group/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/reorder-group/slots.md'; +import Props from '@ionic-internal/component-api/v9/reorder-group/props.md'; +import Events from '@ionic-internal/component-api/v9/reorder-group/events.md'; +import Methods from '@ionic-internal/component-api/v9/reorder-group/methods.md'; +import Parts from '@ionic-internal/component-api/v9/reorder-group/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/reorder-group/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/reorder-group/slots.md'; ion-reorder-group: Wrapper Component for Reorder Items diff --git a/docs/api/reorder.md b/docs/api/reorder.md index 5f771c9badf..5c9755fb098 100644 --- a/docs/api/reorder.md +++ b/docs/api/reorder.md @@ -1,12 +1,12 @@ --- title: "ion-reorder" --- -import Props from '@ionic-internal/component-api/v8/reorder/props.md'; -import Events from '@ionic-internal/component-api/v8/reorder/events.md'; -import Methods from '@ionic-internal/component-api/v8/reorder/methods.md'; -import Parts from '@ionic-internal/component-api/v8/reorder/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/reorder/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/reorder/slots.md'; +import Props from '@ionic-internal/component-api/v9/reorder/props.md'; +import Events from '@ionic-internal/component-api/v9/reorder/events.md'; +import Methods from '@ionic-internal/component-api/v9/reorder/methods.md'; +import Parts from '@ionic-internal/component-api/v9/reorder/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/reorder/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/reorder/slots.md'; ion-reorder: Drag and Drop Icon to Reorder Items @@ -27,7 +27,7 @@ The reorder is the anchor used to drag and drop the items. Once the reorder is c The most basic example of a reorder is slotting it inside of an item. By default, the reorder functionality is disabled for a reorder group. It can be enabled by setting the `disabled` property on the reorder group to `false`. The reorder icon can then be used to drag and drop the items and reorder them. -import Basic from '@site/static/usage/v8/reorder/basic/index.md'; +import Basic from '@site/static/usage/v9/reorder/basic/index.md'; @@ -36,7 +36,7 @@ import Basic from '@site/static/usage/v8/reorder/basic/index.md'; In some cases, it may be desired to have the option to toggle the reorder functionality. This can be done by making the `disabled` property reactive, based on a function or variable. -import TogglingDisabled from '@site/static/usage/v8/reorder/toggling-disabled/index.md'; +import TogglingDisabled from '@site/static/usage/v9/reorder/toggling-disabled/index.md'; @@ -45,7 +45,7 @@ import TogglingDisabled from '@site/static/usage/v8/reorder/toggling-disabled/in The reorder component uses a reorder icon with three lines on iOS and two lines on Material Design. This can be customized by adding an [Icon](https://ionic.io/ionicons) component inside of the reorder with any of the available Ionicons. -import CustomIcon from '@site/static/usage/v8/reorder/custom-icon/index.md'; +import CustomIcon from '@site/static/usage/v9/reorder/custom-icon/index.md'; @@ -54,7 +54,7 @@ import CustomIcon from '@site/static/usage/v8/reorder/custom-icon/index.md'; Reorder can also be used as a wrapper around an item, making the item itself the anchor. Click anywhere on an item below and drag it to reorder the list. -import Wrapper from '@site/static/usage/v8/reorder/wrapper/index.md'; +import Wrapper from '@site/static/usage/v9/reorder/wrapper/index.md'; @@ -69,7 +69,7 @@ In some cases, it may be necessary for an app to reorder both the array and the Regardless of the approach taken, a stable identity should be provided to reorder items if provided in a loop. This means using `track` for Angular, and `key` for React and Vue. -import UpdatingData from '@site/static/usage/v8/reorder/updating-data/index.md'; +import UpdatingData from '@site/static/usage/v9/reorder/updating-data/index.md'; @@ -81,7 +81,7 @@ The `ionReorderStart` event is emitted when the user begins a reorder gesture. T The `ionReorderEnd` event is emitted when the user completes the reorder gesture. This occurs when the user releases the item they are dragging, for example by lifting their finger on a touch screen or releasing the mouse button. The event includes the `from` and `to` indices of the item, as well as the `complete` method that should be called to finalize the reorder operation. The `from` index will always be the position of the item when the gesture started, while the `to` index will be its final position. This event will fire even if no items have changed position, in which case the `from` and `to` indices will be the same. -import ReorderStartEndEvents from '@site/static/usage/v8/reorder/reorder-start-end-events/index.md'; +import ReorderStartEndEvents from '@site/static/usage/v9/reorder/reorder-start-end-events/index.md'; @@ -93,7 +93,7 @@ The `ionReorderMove` event is emitted continuously during the reorder gesture as Do not call the `complete` method during the `ionReorderMove` event as it can break the gesture. ::: -import ReorderMoveEvent from '@site/static/usage/v8/reorder/reorder-move-event/index.md'; +import ReorderMoveEvent from '@site/static/usage/v9/reorder/reorder-move-event/index.md'; @@ -101,7 +101,7 @@ import ReorderMoveEvent from '@site/static/usage/v8/reorder/reorder-move-event/i Reorder requires a scroll container to work properly. When using a virtual scrolling solution, a custom scroll target needs to be provided. Scrolling on the content needs to be disabled and the `.ion-content-scroll-host` class needs to be added to the element responsible for scrolling. -import CustomScrollTarget from '@site/static/usage/v8/reorder/custom-scroll-target/index.md'; +import CustomScrollTarget from '@site/static/usage/v9/reorder/custom-scroll-target/index.md'; diff --git a/docs/api/ripple-effect.md b/docs/api/ripple-effect.md index 92339eb6351..46a6d83400c 100644 --- a/docs/api/ripple-effect.md +++ b/docs/api/ripple-effect.md @@ -1,12 +1,12 @@ --- title: "ion-ripple-effect" --- -import Props from '@ionic-internal/component-api/v8/ripple-effect/props.md'; -import Events from '@ionic-internal/component-api/v8/ripple-effect/events.md'; -import Methods from '@ionic-internal/component-api/v8/ripple-effect/methods.md'; -import Parts from '@ionic-internal/component-api/v8/ripple-effect/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/ripple-effect/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/ripple-effect/slots.md'; +import Props from '@ionic-internal/component-api/v9/ripple-effect/props.md'; +import Events from '@ionic-internal/component-api/v9/ripple-effect/events.md'; +import Methods from '@ionic-internal/component-api/v9/ripple-effect/methods.md'; +import Parts from '@ionic-internal/component-api/v9/ripple-effect/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/ripple-effect/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/ripple-effect/slots.md'; import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -25,7 +25,7 @@ It's important to set [relative positioning](https://developer.mozilla.org/en-US ## Basic Usage -import Basic from '@site/static/usage/v8/ripple-effect/basic/index.md'; +import Basic from '@site/static/usage/v9/ripple-effect/basic/index.md'; @@ -34,7 +34,7 @@ import Basic from '@site/static/usage/v8/ripple-effect/basic/index.md'; There are two types of ripple effects: `"bounded"` and `"unbounded"`. The default type, `"bounded"`, will expand the ripple effect from the click position outwards. To add a ripple effect that always starts in the center of the element and expands in a circle, set the type to `"unbounded"`. -import Type from '@site/static/usage/v8/ripple-effect/type/index.md'; +import Type from '@site/static/usage/v9/ripple-effect/type/index.md'; @@ -43,7 +43,7 @@ import Type from '@site/static/usage/v8/ripple-effect/type/index.md'; The ripple can be customized to a different color through CSS. By default the ripple color is set to inherit the text color, which is generally the body color. This can be changed by setting the CSS `color` on the parent or the ripple effect itself. -import Customizing from '@site/static/usage/v8/ripple-effect/customizing/index.md'; +import Customizing from '@site/static/usage/v9/ripple-effect/customizing/index.md'; diff --git a/docs/api/route-redirect.md b/docs/api/route-redirect.md index 29bdb84b388..ec82a56c925 100644 --- a/docs/api/route-redirect.md +++ b/docs/api/route-redirect.md @@ -2,12 +2,12 @@ title: "ion-route-redirect" --- -import Props from '@ionic-internal/component-api/v8/route-redirect/props.md'; -import Events from '@ionic-internal/component-api/v8/route-redirect/events.md'; -import Methods from '@ionic-internal/component-api/v8/route-redirect/methods.md'; -import Parts from '@ionic-internal/component-api/v8/route-redirect/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/route-redirect/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/route-redirect/slots.md'; +import Props from '@ionic-internal/component-api/v9/route-redirect/props.md'; +import Events from '@ionic-internal/component-api/v9/route-redirect/events.md'; +import Methods from '@ionic-internal/component-api/v9/route-redirect/methods.md'; +import Parts from '@ionic-internal/component-api/v9/route-redirect/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/route-redirect/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/route-redirect/slots.md'; ion-route-redirect: Redirect 'from' a URL 'to' Another URL diff --git a/docs/api/route.md b/docs/api/route.md index 068ea064bcf..b89114dfdfe 100644 --- a/docs/api/route.md +++ b/docs/api/route.md @@ -4,12 +4,12 @@ title: "ion-route" import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -import Props from '@ionic-internal/component-api/v8/route/props.md'; -import Events from '@ionic-internal/component-api/v8/route/events.md'; -import Methods from '@ionic-internal/component-api/v8/route/methods.md'; -import Parts from '@ionic-internal/component-api/v8/route/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/route/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/route/slots.md'; +import Props from '@ionic-internal/component-api/v9/route/props.md'; +import Events from '@ionic-internal/component-api/v9/route/events.md'; +import Methods from '@ionic-internal/component-api/v9/route/methods.md'; +import Parts from '@ionic-internal/component-api/v9/route/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/route/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/route/slots.md'; ion-route: API Route Component for Ionic Framework Apps diff --git a/docs/api/router-link.md b/docs/api/router-link.md index ec16b6be447..2c411bb90ec 100644 --- a/docs/api/router-link.md +++ b/docs/api/router-link.md @@ -2,12 +2,12 @@ title: "ion-router-link" --- -import Props from '@ionic-internal/component-api/v8/router-link/props.md'; -import Events from '@ionic-internal/component-api/v8/router-link/events.md'; -import Methods from '@ionic-internal/component-api/v8/router-link/methods.md'; -import Parts from '@ionic-internal/component-api/v8/router-link/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/router-link/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/router-link/slots.md'; +import Props from '@ionic-internal/component-api/v9/router-link/props.md'; +import Events from '@ionic-internal/component-api/v9/router-link/events.md'; +import Methods from '@ionic-internal/component-api/v9/router-link/methods.md'; +import Parts from '@ionic-internal/component-api/v9/router-link/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/router-link/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/router-link/slots.md'; ion-router-link: Navigate To a Specified Link diff --git a/docs/api/router-outlet.md b/docs/api/router-outlet.md index d16075a5f56..39749f8cbde 100644 --- a/docs/api/router-outlet.md +++ b/docs/api/router-outlet.md @@ -2,12 +2,12 @@ title: "ion-router-outlet" --- -import Props from '@ionic-internal/component-api/v8/router-outlet/props.md'; -import Events from '@ionic-internal/component-api/v8/router-outlet/events.md'; -import Methods from '@ionic-internal/component-api/v8/router-outlet/methods.md'; -import Parts from '@ionic-internal/component-api/v8/router-outlet/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/router-outlet/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/router-outlet/slots.md'; +import Props from '@ionic-internal/component-api/v9/router-outlet/props.md'; +import Events from '@ionic-internal/component-api/v9/router-outlet/events.md'; +import Methods from '@ionic-internal/component-api/v9/router-outlet/methods.md'; +import Parts from '@ionic-internal/component-api/v9/router-outlet/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/router-outlet/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/router-outlet/slots.md'; diff --git a/docs/api/router.md b/docs/api/router.md index 14019626cf7..2d7d230e6bd 100644 --- a/docs/api/router.md +++ b/docs/api/router.md @@ -2,16 +2,16 @@ title: "ion-router" --- -import Props from '@ionic-internal/component-api/v8/router/props.md'; -import Events from '@ionic-internal/component-api/v8/router/events.md'; -import Methods from '@ionic-internal/component-api/v8/router/methods.md'; -import Parts from '@ionic-internal/component-api/v8/router/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/router/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/router/slots.md'; +import Props from '@ionic-internal/component-api/v9/router/props.md'; +import Events from '@ionic-internal/component-api/v9/router/events.md'; +import Methods from '@ionic-internal/component-api/v9/router/methods.md'; +import Parts from '@ionic-internal/component-api/v9/router/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/router/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/router/slots.md'; ion-router: Router Component to Coordinate URL Navigation - + import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -28,18 +28,28 @@ The router is a component for handling routing inside vanilla and Stencil JavaSc Apps should have a single `ion-router` component in the codebase. This component controls all interactions with the browser history and it aggregates updates through an event system. -`ion-router` is just a URL coordinator for the navigation outlets of ionic: `ion-nav`, `ion-tabs`, and `ion-router-outlet`. +`ion-router` is just a URL coordinator for the navigation outlets of ionic: `ion-tabs` and `ion-router-outlet`. -That means the `ion-router` never touches the DOM, it does NOT show the components or emit any kind of lifecycle events, it just tells `ion-nav`, `ion-tabs`, and `ion-router-outlet` what and when to "show" based on the browser's URL. +That means the `ion-router` never touches the DOM, it does NOT show the components or emit any kind of lifecycle events, it just tells `ion-tabs` and `ion-router-outlet` what and when to "show" based on the browser's URL. -In order to configure this relationship between components (to load/select) and URLs, `ion-router` uses a declarative syntax using JSX/HTML to define a tree of routes. +To configure this relationship between components (to load/select) and URLs, `ion-router` uses a declarative syntax using JSX/HTML to define a tree of routes. ## Basic Usage -import BasicExample from '@site/static/usage/v8/router/basic/index.md'; +import BasicExample from '@site/static/usage/v9/router/basic/index.md'; +## Using ion-nav within a Routed Page + +`ion-router` and [`ion-nav`](./nav.md) are separate systems. `ion-router` coordinates URL-based navigation through `ion-router-outlet`, while `ion-nav` manages a local stack that is independent of the URL. `ion-nav` does not integrate with `ion-router`: placing an `ion-nav` inside an `ion-router` does not turn it into a routed outlet, and pushing or popping views on an `ion-nav` never changes the URL. + +The two can still be composed. A routed page rendered by `ion-router-outlet` can host its own `ion-nav` for local, URL-less navigation within that page. In the example below, navigating to `/details` updates the URL, but stepping through the `ion-nav` inside that page does not. + +import NavWithinPageExample from '@site/static/usage/v9/router/nav-within-page/index.md'; + + + ## Interfaces ### RouterEventDetail diff --git a/docs/api/row.md b/docs/api/row.md index ef9ddbe8d61..939fd07909e 100644 --- a/docs/api/row.md +++ b/docs/api/row.md @@ -1,12 +1,12 @@ --- title: "ion-row" --- -import Props from '@ionic-internal/component-api/v8/row/props.md'; -import Events from '@ionic-internal/component-api/v8/row/events.md'; -import Methods from '@ionic-internal/component-api/v8/row/methods.md'; -import Parts from '@ionic-internal/component-api/v8/row/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/row/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/row/slots.md'; +import Props from '@ionic-internal/component-api/v9/row/props.md'; +import Events from '@ionic-internal/component-api/v9/row/events.md'; +import Methods from '@ionic-internal/component-api/v9/row/methods.md'; +import Parts from '@ionic-internal/component-api/v9/row/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/row/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/row/slots.md'; ion-row: Horizontal Row Components of the Grid System diff --git a/docs/api/searchbar.md b/docs/api/searchbar.md index f5c64142ca3..96bef6400cb 100644 --- a/docs/api/searchbar.md +++ b/docs/api/searchbar.md @@ -1,12 +1,12 @@ --- title: "ion-searchbar" --- -import Props from '@ionic-internal/component-api/v8/searchbar/props.md'; -import Events from '@ionic-internal/component-api/v8/searchbar/events.md'; -import Methods from '@ionic-internal/component-api/v8/searchbar/methods.md'; -import Parts from '@ionic-internal/component-api/v8/searchbar/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/searchbar/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/searchbar/slots.md'; +import Props from '@ionic-internal/component-api/v9/searchbar/props.md'; +import Events from '@ionic-internal/component-api/v9/searchbar/events.md'; +import Methods from '@ionic-internal/component-api/v9/searchbar/methods.md'; +import Parts from '@ionic-internal/component-api/v9/searchbar/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/searchbar/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/searchbar/slots.md'; ion-searchbar: Search Bar for Searching a Collection @@ -22,7 +22,7 @@ Searchbars represent a text field that can be used to search through a collectio ## Basic Usage -import Basic from '@site/static/usage/v8/searchbar/basic/index.md'; +import Basic from '@site/static/usage/v9/searchbar/basic/index.md'; @@ -31,7 +31,7 @@ import Basic from '@site/static/usage/v8/searchbar/basic/index.md'; A search icon is displayed to the left of the input field in a searchbar. It can be customized to any [Ionicon](https://ionic.io/ionicons/). -import SearchIcon from '@site/static/usage/v8/searchbar/search-icon/index.md'; +import SearchIcon from '@site/static/usage/v9/searchbar/search-icon/index.md'; @@ -40,7 +40,7 @@ import SearchIcon from '@site/static/usage/v8/searchbar/search-icon/index.md'; A clear button is displayed when a searchbar has a value or upon entering input in the searchbar's text field. Clicking on the clear button will erase the text field and the input will remain focused. By default, the clear button is set to show when focusing the searchbar, but it can be set to always show or never show. The icon inside of the clear button can also be customized to any [Ionicon](https://ionic.io/ionicons/). -import ClearButton from '@site/static/usage/v8/searchbar/clear-button/index.md'; +import ClearButton from '@site/static/usage/v9/searchbar/clear-button/index.md'; @@ -49,7 +49,7 @@ import ClearButton from '@site/static/usage/v8/searchbar/clear-button/index.md'; A cancel button can be enabled which will clear the input and lose the focus upon click. By default, cancel buttons are set to never show, but they can be set to always show or only show when focusing the searchbar. The cancel button is displayed as text in `ios` mode, and as an icon in `md` mode. Both the text and icon can be customized using different properties, with the icon accepting any [Ionicon](https://ionic.io/ionicons/). -import CancelButton from '@site/static/usage/v8/searchbar/cancel-button/index.md'; +import CancelButton from '@site/static/usage/v9/searchbar/cancel-button/index.md'; @@ -59,7 +59,7 @@ import CancelButton from '@site/static/usage/v8/searchbar/cancel-button/index.md Searchbars are styled to look native when placed inside of a toolbar. In iOS, searchbars should be placed in their own toolbar, under a toolbar that contains the page title. In Material Design, searchbars are either persistently displayed in their own toolbar, or expand over a toolbar containing the page title. {/* Reuse the playground from the Toolbar directory */} -import Toolbar from '@site/static/usage/v8/toolbar/searchbars/index.md'; +import Toolbar from '@site/static/usage/v9/toolbar/searchbars/index.md'; @@ -68,7 +68,7 @@ import Toolbar from '@site/static/usage/v8/toolbar/searchbars/index.md'; A debounce can be set on the searchbar in order to delay triggering the `ionInput` event. This is useful when querying data, as it can be used to wait to make a request instead of requesting the data each time a character is entered in the input. -import Debounce from '@site/static/usage/v8/searchbar/debounce/index.md'; +import Debounce from '@site/static/usage/v9/searchbar/debounce/index.md'; @@ -77,7 +77,7 @@ import Debounce from '@site/static/usage/v8/searchbar/debounce/index.md'; ### Colors -import Colors from '@site/static/usage/v8/searchbar/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/searchbar/theming/colors/index.md'; @@ -85,7 +85,7 @@ import Colors from '@site/static/usage/v8/searchbar/theming/colors/index.md'; Searchbar uses scoped encapsulation, which means it will automatically scope its CSS by appending each of the styles with an additional class at runtime. Overriding scoped selectors in CSS requires a [higher specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity) selector. Targeting the `ion-searchbar` for customization will not work, therefore we recommend adding a class and customizing it that way. -import CSSProps from '@site/static/usage/v8/searchbar/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/searchbar/theming/css-properties/index.md'; diff --git a/docs/api/segment-button.md b/docs/api/segment-button.md index 475d0f23597..177340110dd 100644 --- a/docs/api/segment-button.md +++ b/docs/api/segment-button.md @@ -1,12 +1,12 @@ --- title: "ion-segment-button" --- -import Props from '@ionic-internal/component-api/v8/segment-button/props.md'; -import Events from '@ionic-internal/component-api/v8/segment-button/events.md'; -import Methods from '@ionic-internal/component-api/v8/segment-button/methods.md'; -import Parts from '@ionic-internal/component-api/v8/segment-button/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/segment-button/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/segment-button/slots.md'; +import Props from '@ionic-internal/component-api/v9/segment-button/props.md'; +import Events from '@ionic-internal/component-api/v9/segment-button/events.md'; +import Methods from '@ionic-internal/component-api/v9/segment-button/methods.md'; +import Parts from '@ionic-internal/component-api/v9/segment-button/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/segment-button/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/segment-button/slots.md'; ion-segment-button | Segment Button Icon and Segment Value @@ -23,7 +23,7 @@ Segment buttons are groups of related buttons inside of a [segment](segment.md). ## Basic Usage -import Basic from '@site/static/usage/v8/segment-button/basic/index.md'; +import Basic from '@site/static/usage/v9/segment-button/basic/index.md'; @@ -32,7 +32,7 @@ import Basic from '@site/static/usage/v8/segment-button/basic/index.md'; The `layout` property is set to `"icon-top"` by default. When a segment button has both an icon and a label, it will display the icon on top of the label. This behavior can be changed by setting the `layout` property to `"icon-bottom"`, `"icon-start"`, or `"icon-end"` which will show the icon below the label, to the start of the label (left in LTR and right in RTL) or to the end of the label (right in LTR and left in RTL), respectively. -import Layout from '@site/static/usage/v8/segment-button/layout/index.md'; +import Layout from '@site/static/usage/v9/segment-button/layout/index.md'; @@ -40,14 +40,14 @@ import Layout from '@site/static/usage/v8/segment-button/layout/index.md'; ## Theming ### CSS Shadow Parts -import CSSParts from '@site/static/usage/v8/segment-button/theming/css-shadow-parts/index.md'; +import CSSParts from '@site/static/usage/v9/segment-button/theming/css-shadow-parts/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/segment-button/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/segment-button/theming/css-properties/index.md'; diff --git a/docs/api/segment-content.md b/docs/api/segment-content.md index 4875520eaef..126a1648db8 100644 --- a/docs/api/segment-content.md +++ b/docs/api/segment-content.md @@ -2,12 +2,12 @@ title: "ion-segment-content" --- -import Props from '@ionic-internal/component-api/v8/segment-content/props.md'; -import Events from '@ionic-internal/component-api/v8/segment-content/events.md'; -import Methods from '@ionic-internal/component-api/v8/segment-content/methods.md'; -import Parts from '@ionic-internal/component-api/v8/segment-content/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/segment-content/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/segment-content/slots.md'; +import Props from '@ionic-internal/component-api/v9/segment-content/props.md'; +import Events from '@ionic-internal/component-api/v9/segment-content/events.md'; +import Methods from '@ionic-internal/component-api/v9/segment-content/methods.md'; +import Parts from '@ionic-internal/component-api/v9/segment-content/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/segment-content/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/segment-content/slots.md'; ion-segment-content: Display control element for swipeable segments @@ -29,7 +29,7 @@ Each `ion-segment-content` needs a unique `id` attribute. This will be used to l {/* Reuse swipeable segments playground */} -import Swipeable from '@site/static/usage/v8/segment/swipeable/index.md'; +import Swipeable from '@site/static/usage/v9/segment/swipeable/index.md'; diff --git a/docs/api/segment-view.md b/docs/api/segment-view.md index ddf804b7ff7..a9696bcf51b 100644 --- a/docs/api/segment-view.md +++ b/docs/api/segment-view.md @@ -2,12 +2,12 @@ title: "ion-segment-view" --- -import Props from '@ionic-internal/component-api/v8/segment-view/props.md'; -import Events from '@ionic-internal/component-api/v8/segment-view/events.md'; -import Methods from '@ionic-internal/component-api/v8/segment-view/methods.md'; -import Parts from '@ionic-internal/component-api/v8/segment-view/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/segment-view/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/segment-view/slots.md'; +import Props from '@ionic-internal/component-api/v9/segment-view/props.md'; +import Events from '@ionic-internal/component-api/v9/segment-view/events.md'; +import Methods from '@ionic-internal/component-api/v9/segment-view/methods.md'; +import Parts from '@ionic-internal/component-api/v9/segment-view/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/segment-view/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/segment-view/slots.md'; ion-segment-view: Controller element for swipeable segments diff --git a/docs/api/segment.md b/docs/api/segment.md index 0e932eecc97..ba919e42542 100644 --- a/docs/api/segment.md +++ b/docs/api/segment.md @@ -1,12 +1,12 @@ --- title: "ion-segment" --- -import Props from '@ionic-internal/component-api/v8/segment/props.md'; -import Events from '@ionic-internal/component-api/v8/segment/events.md'; -import Methods from '@ionic-internal/component-api/v8/segment/methods.md'; -import Parts from '@ionic-internal/component-api/v8/segment/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/segment/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/segment/slots.md'; +import Props from '@ionic-internal/component-api/v9/segment/props.md'; +import Events from '@ionic-internal/component-api/v9/segment/events.md'; +import Methods from '@ionic-internal/component-api/v9/segment/methods.md'; +import Parts from '@ionic-internal/component-api/v9/segment/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/segment/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/segment/slots.md'; ion-segment: API Documentation for Segmented Controls @@ -27,7 +27,7 @@ Their functionality is similar to tabs, where selecting one will deselect all ot Segments consist of [segment buttons](./segment-button) with a `value` property on each button. Set the `value` property on the segment to match the value of a button to select that button. Segments can also be disabled to prevent users from interacting with them. -import Basic from '@site/static/usage/v8/segment/basic/index.md'; +import Basic from '@site/static/usage/v9/segment/basic/index.md'; @@ -36,7 +36,7 @@ import Basic from '@site/static/usage/v8/segment/basic/index.md'; Segments are not scrollable by default. Each segment button has a fixed width, and the width is determined by dividing the number of segment buttons by the screen width. This ensures that each segment button can be displayed on the screen without having to scroll. As a result, some segment buttons with longer labels may get cut off. To avoid this we recommend either using a shorter label or switching to a scrollable segment by setting the `scrollable` property to `true`. This will cause the segment to scroll horizontally, but will allow each segment button to have a variable width. -import Scrollable from '@site/static/usage/v8/segment/scrollable/index.md'; +import Scrollable from '@site/static/usage/v9/segment/scrollable/index.md'; @@ -44,7 +44,7 @@ import Scrollable from '@site/static/usage/v8/segment/scrollable/index.md'; ## Segments in Toolbars {/* Reuse the playground from the Toolbar directory */} -import Toolbar from '@site/static/usage/v8/toolbar/segments/index.md'; +import Toolbar from '@site/static/usage/v9/toolbar/segments/index.md'; @@ -61,7 +61,7 @@ If no initial `value` is assigned to the `ion-segment` when using swipeable segm Segment buttons cannot be disabled when used with swipeable segments. ::: -import Swipeable from '@site/static/usage/v8/segment/swipeable/index.md'; +import Swipeable from '@site/static/usage/v9/segment/swipeable/index.md'; @@ -69,13 +69,13 @@ import Swipeable from '@site/static/usage/v8/segment/swipeable/index.md'; ### Colors -import Colors from '@site/static/usage/v8/segment/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/segment/theming/colors/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/segment/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/segment/theming/css-properties/index.md'; diff --git a/docs/api/select-option.md b/docs/api/select-option.md index dfca6b8d536..79a28f0aa2b 100644 --- a/docs/api/select-option.md +++ b/docs/api/select-option.md @@ -1,12 +1,12 @@ --- title: "ion-select-option" --- -import Props from '@ionic-internal/component-api/v8/select-option/props.md'; -import Events from '@ionic-internal/component-api/v8/select-option/events.md'; -import Methods from '@ionic-internal/component-api/v8/select-option/methods.md'; -import Parts from '@ionic-internal/component-api/v8/select-option/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/select-option/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/select-option/slots.md'; +import Props from '@ionic-internal/component-api/v9/select-option/props.md'; +import Events from '@ionic-internal/component-api/v9/select-option/events.md'; +import Methods from '@ionic-internal/component-api/v9/select-option/methods.md'; +import Parts from '@ionic-internal/component-api/v9/select-option/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/select-option/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/select-option/slots.md'; ion-select-option: Option For a Select Dialog diff --git a/docs/api/select.md b/docs/api/select.md index 957431c8409..b9b10135d0f 100644 --- a/docs/api/select.md +++ b/docs/api/select.md @@ -1,12 +1,12 @@ --- title: "ion-select" --- -import Props from '@ionic-internal/component-api/v8/select/props.md'; -import Events from '@ionic-internal/component-api/v8/select/events.md'; -import Methods from '@ionic-internal/component-api/v8/select/methods.md'; -import Parts from '@ionic-internal/component-api/v8/select/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/select/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/select/slots.md'; +import Props from '@ionic-internal/component-api/v9/select/props.md'; +import Events from '@ionic-internal/component-api/v9/select/events.md'; +import Methods from '@ionic-internal/component-api/v9/select/methods.md'; +import Parts from '@ionic-internal/component-api/v9/select/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/select/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/select/slots.md'; ion-select: Select One or Multiple Value Boxes or Placeholders @@ -38,7 +38,7 @@ Select has several options for supplying a label for the component: Labels will take up the width of their content by default. Developers can use the `labelPlacement` property to control how the label is placed relative to the control. While the `label` property is used here, `labelPlacement` can also be used with the `label` slot. -import LabelPlacement from '@site/static/usage/v8/select/label-placement/index.md'; +import LabelPlacement from '@site/static/usage/v9/select/label-placement/index.md'; @@ -46,7 +46,7 @@ import LabelPlacement from '@site/static/usage/v8/select/label-placement/index.m While plaintext labels should be passed in via the `label` property, if custom HTML is needed, it can be passed through the `label` slot instead. -import LabelSlot from '@site/static/usage/v8/select/label-slot/index.md'; +import LabelSlot from '@site/static/usage/v9/select/label-slot/index.md'; @@ -54,7 +54,7 @@ import LabelSlot from '@site/static/usage/v8/select/label-slot/index.md'; If no visible label is needed, developers should still supply an `aria-label` so the select is accessible to screen readers. -import NoVisibleLabel from '@site/static/usage/v8/select/no-visible-label/index.md'; +import NoVisibleLabel from '@site/static/usage/v9/select/no-visible-label/index.md'; @@ -64,7 +64,7 @@ By default, the select allows the user to select only one option. The alert inte Keyboard interactions for single selection are described in the [Keyboard Interactions](#single-selection-1) section below. -import SingleSelectionExample from '@site/static/usage/v8/select/basic/single-selection/index.md'; +import SingleSelectionExample from '@site/static/usage/v9/select/basic/single-selection/index.md'; @@ -80,7 +80,7 @@ The `action-sheet` interface is not supported with multiple selection. Keyboard interactions for multiple selection are described in the [Keyboard Interactions](#multiple-selection-1) section below. -import MultipleSelectionExample from '@site/static/usage/v8/select/basic/multiple-selection/index.md'; +import MultipleSelectionExample from '@site/static/usage/v9/select/basic/multiple-selection/index.md'; @@ -90,26 +90,26 @@ By default, select uses [ion-alert](alert.md) to open up the overlay of options ### Alert -import AlertExample from '@site/static/usage/v8/select/basic/single-selection/index.md'; +import AlertExample from '@site/static/usage/v9/select/basic/single-selection/index.md'; ### Action Sheet -import ActionSheetExample from '@site/static/usage/v8/select/interfaces/action-sheet/index.md'; +import ActionSheetExample from '@site/static/usage/v9/select/interfaces/action-sheet/index.md'; ### Popover -import PopoverExample from '@site/static/usage/v8/select/interfaces/popover/index.md'; +import PopoverExample from '@site/static/usage/v9/select/interfaces/popover/index.md'; ### Modal -import ModalExample from '@site/static/usage/v8/select/interfaces/modal/index.md'; +import ModalExample from '@site/static/usage/v9/select/interfaces/modal/index.md'; @@ -117,7 +117,7 @@ import ModalExample from '@site/static/usage/v8/select/interfaces/modal/index.md The main ways of handling user interaction with the select are the `ionChange`, `ionDismiss`, and `ionCancel` events. Refer to [Events](#events) for more details on these and other events that select fires. -import RespondingToInteractionExample from '@site/static/usage/v8/select/basic/responding-to-interaction/index.md'; +import RespondingToInteractionExample from '@site/static/usage/v9/select/basic/responding-to-interaction/index.md'; @@ -129,13 +129,13 @@ By default, the select uses strict equality (`===`) to determine if an option is ### Using compareWith -import UsingCompareWithExample from '@site/static/usage/v8/select/objects-as-values/using-comparewith/index.md'; +import UsingCompareWithExample from '@site/static/usage/v9/select/objects-as-values/using-comparewith/index.md'; ### Object Values and Multiple Selection -import ObjectValuesAndMultipleSelectionExample from '@site/static/usage/v8/select/objects-as-values/multiple-selection/index.md'; +import ObjectValuesAndMultipleSelectionExample from '@site/static/usage/v9/select/objects-as-values/multiple-selection/index.md'; @@ -143,7 +143,7 @@ import ObjectValuesAndMultipleSelectionExample from '@site/static/usage/v8/selec Developers can use the `justify` property to control how the label and control are packed on a line. -import JustifyExample from '@site/static/usage/v8/select/justify/index.md'; +import JustifyExample from '@site/static/usage/v9/select/justify/index.md'; @@ -157,7 +157,7 @@ Filled selects can be used on iOS by setting the select's `mode` to `md`. Selects that use `fill` should not be used in an `ion-item` due to styling conflicts between the components. ::: -import FillExample from '@site/static/usage/v8/select/fill/index.md'; +import FillExample from '@site/static/usage/v9/select/fill/index.md'; @@ -170,7 +170,7 @@ The `action-sheet` and `popover` interfaces do not have an `OK` button, clicking The `modal` interface has a single `Close` button in the header. This button is only responsible for dismissing the modal. Any selections made will persist after clicking this button or if the modal is dismissed using an alternative method. -import ButtonTextExample from '@site/static/usage/v8/select/customization/button-text/index.md'; +import ButtonTextExample from '@site/static/usage/v9/select/customization/button-text/index.md'; @@ -183,7 +183,7 @@ for the properties that each interface accepts. Note: `interfaceOptions` will not override `inputs` or `buttons` with the `alert` interface. -import InterfaceOptionsExample from '@site/static/usage/v8/select/customization/interface-options/index.md'; +import InterfaceOptionsExample from '@site/static/usage/v9/select/customization/interface-options/index.md'; @@ -197,10 +197,26 @@ In most cases, [Icon](./icon.md) components placed in these slots should have `a 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. ::: -import StartEndSlots from '@site/static/usage/v8/select/start-end-slots/index.md'; +import StartEndSlots from '@site/static/usage/v9/select/start-end-slots/index.md'; +## Rich Content Options + +:::important +Rich content in select options is disabled by default. Set [`innerHTMLTemplatesEnabled`](/docs/developing/config.md#ionicconfig) to `true` in your [global Ionic config](/docs/developing/config.md#global-config). Markup inside options is treated as plain text when it is disabled. Refer to [Security](/docs/techniques/security.md) for sanitization guidance when enabling custom HTML. +::: + +In addition to single text labels, [Select Options](./select-option.md) can include HTML rich content in the select interface. Elements added inside of an option without a named slot will go into the default slot. The `start` and `end` slots will place elements on either side of the default slot. The `description` attribute can be used for additional supporting text displayed under the label. + +This is separate from [Start and End Slots](#start-and-end-slots) on `ion-select`, which decorate the closed field. The rich content options display in the interface after opening the select. + +When an option is selected, the closed field shows the option's text content as plain text only. HTML markup is stripped, and the `start` and `end` slots and the `description` attribute are not included in the selected display. + +import RichContentOptions from '@site/static/usage/v9/select/rich-content-options/index.md'; + + + ## Customization 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. @@ -211,7 +227,7 @@ As mentioned, the `ion-select` element consists only of the value(s), or placeho Alternatively, depending on the [browser support](https://caniuse.com/#feat=mdn-css_selectors_part) needed, CSS shadow parts can be used to style the select. Notice that by using `::part`, any CSS property on the element can be targeted. -import StylingSelectExample from '@site/static/usage/v8/select/customization/styling-select/index.md'; +import StylingSelectExample from '@site/static/usage/v9/select/customization/styling-select/index.md'; @@ -231,7 +247,7 @@ However, the Select Option does set a class for easier styling and allows for th The icon that displays next to the select text can be set to any [Ionicon](https://ionic.io/ionicons) using the `toggleIcon` and/or `expandedIcon` properties. -import CustomToggleIconsExample from '@site/static/usage/v8/select/customization/custom-toggle-icons/index.md'; +import CustomToggleIconsExample from '@site/static/usage/v9/select/customization/custom-toggle-icons/index.md'; @@ -241,7 +257,7 @@ By default, when the select is open, the toggle icon will automatically rotate o The below example also uses a [custom `toggleIcon`](#custom-toggle-icons) to better demonstrate the flip behavior on `ios`, since the default icon is vertically symmetrical. -import IconFlipBehaviorExample from '@site/static/usage/v8/select/customization/icon-flip-behavior/index.md'; +import IconFlipBehaviorExample from '@site/static/usage/v9/select/customization/icon-flip-behavior/index.md'; @@ -249,7 +265,7 @@ import IconFlipBehaviorExample from '@site/static/usage/v8/select/customization/ Typeahead or autocomplete functionality can be built using existing Ionic components. We recommend using an `ion-modal` to make the best use of the available screen space. -import TypeaheadExample from '@site/static/usage/v8/select/typeahead/index.md'; +import TypeaheadExample from '@site/static/usage/v9/select/typeahead/index.md'; @@ -259,7 +275,7 @@ Helper and error text can be used inside of a select with the `helperText` and ` In Angular, this is done automatically through form validation. In JavaScript, React and Vue, the class needs to be manually added based on your own validation. -import HelperError from '@site/static/usage/v8/select/helper-error/index.md'; +import HelperError from '@site/static/usage/v9/select/helper-error/index.md'; diff --git a/docs/api/skeleton-text.md b/docs/api/skeleton-text.md index 435b08f24e1..4dd87c5a27b 100644 --- a/docs/api/skeleton-text.md +++ b/docs/api/skeleton-text.md @@ -1,12 +1,12 @@ --- title: "ion-skeleton-text" --- -import Props from '@ionic-internal/component-api/v8/skeleton-text/props.md'; -import Events from '@ionic-internal/component-api/v8/skeleton-text/events.md'; -import Methods from '@ionic-internal/component-api/v8/skeleton-text/methods.md'; -import Parts from '@ionic-internal/component-api/v8/skeleton-text/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/skeleton-text/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/skeleton-text/slots.md'; +import Props from '@ionic-internal/component-api/v9/skeleton-text/props.md'; +import Events from '@ionic-internal/component-api/v9/skeleton-text/events.md'; +import Methods from '@ionic-internal/component-api/v9/skeleton-text/methods.md'; +import Parts from '@ionic-internal/component-api/v9/skeleton-text/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/skeleton-text/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/skeleton-text/slots.md'; ion-skeleton-text: Skeleton Loading Placeholder for Text @@ -23,7 +23,7 @@ Skeleton Text is a component for rendering placeholder content. The element will ## Basic Usage -import Basic from '@site/static/usage/v8/skeleton-text/basic/index.md'; +import Basic from '@site/static/usage/v9/skeleton-text/basic/index.md'; @@ -31,7 +31,7 @@ import Basic from '@site/static/usage/v8/skeleton-text/basic/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/skeleton-text/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/skeleton-text/theming/css-properties/index.md'; diff --git a/docs/api/spinner.md b/docs/api/spinner.md index d63a67aff4a..3adfd5743e6 100644 --- a/docs/api/spinner.md +++ b/docs/api/spinner.md @@ -1,12 +1,12 @@ --- title: "ion-spinner" --- -import Props from '@ionic-internal/component-api/v8/spinner/props.md'; -import Events from '@ionic-internal/component-api/v8/spinner/events.md'; -import Methods from '@ionic-internal/component-api/v8/spinner/methods.md'; -import Parts from '@ionic-internal/component-api/v8/spinner/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/spinner/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/spinner/slots.md'; +import Props from '@ionic-internal/component-api/v9/spinner/props.md'; +import Events from '@ionic-internal/component-api/v9/spinner/events.md'; +import Methods from '@ionic-internal/component-api/v9/spinner/methods.md'; +import Parts from '@ionic-internal/component-api/v9/spinner/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/spinner/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/spinner/slots.md'; ion-spinner: Animated Spinner Icon Components and Properties @@ -25,7 +25,7 @@ The Spinner component provides a variety of animated SVG spinners. Spinners are The default spinner is based on the mode. When the mode is `ios` the spinner will be `"lines"`, and when the mode is `md` the spinner will be `"circular"`. If the `name` property is set, then that spinner will be used instead of the mode specific spinner. -import Basic from '@site/static/usage/v8/spinner/basic/index.md'; +import Basic from '@site/static/usage/v9/spinner/basic/index.md'; @@ -33,7 +33,7 @@ import Basic from '@site/static/usage/v8/spinner/basic/index.md'; ### Colors -import Colors from '@site/static/usage/v8/spinner/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/spinner/theming/colors/index.md'; @@ -41,13 +41,13 @@ import Colors from '@site/static/usage/v8/spinner/theming/colors/index.md'; You may use custom CSS to style the spinner. For example, you can resize the spinner by setting the width and height. -import Resizing from '@site/static/usage/v8/spinner/theming/resizing/index.md'; +import Resizing from '@site/static/usage/v9/spinner/theming/resizing/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/spinner/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/spinner/theming/css-properties/index.md'; diff --git a/docs/api/split-pane.md b/docs/api/split-pane.md index 6b967dc47fc..0be1adf123c 100644 --- a/docs/api/split-pane.md +++ b/docs/api/split-pane.md @@ -2,12 +2,12 @@ title: "ion-split-pane" --- -import Props from '@ionic-internal/component-api/v8/split-pane/props.md'; -import Events from '@ionic-internal/component-api/v8/split-pane/events.md'; -import Methods from '@ionic-internal/component-api/v8/split-pane/methods.md'; -import Parts from '@ionic-internal/component-api/v8/split-pane/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/split-pane/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/split-pane/slots.md'; +import Props from '@ionic-internal/component-api/v9/split-pane/props.md'; +import Events from '@ionic-internal/component-api/v9/split-pane/events.md'; +import Methods from '@ionic-internal/component-api/v9/split-pane/methods.md'; +import Parts from '@ionic-internal/component-api/v9/split-pane/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/split-pane/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/split-pane/slots.md'; ion-split-pane: Split Plane for Menus and Multi-View Layouts @@ -29,7 +29,7 @@ If the device's screen width is below a certain size, the split pane will collap This demo sets the `when` property to `'xs'` so the split pane always shows up. Your Ionic application does not need this if you want the split pane to collapse on smaller viewports. Refer to [Setting Breakpoints](#setting-breakpoints) for more information. ::: -import Basic from '@site/static/usage/v8/split-pane/basic/index.md'; +import Basic from '@site/static/usage/v9/split-pane/basic/index.md'; @@ -58,7 +58,7 @@ By default, the split pane will expand when the screen is larger than 992px. To ### CSS Custom Properties -import CSSProperties from '@site/static/usage/v8/split-pane/theming/css-properties/index.md'; +import CSSProperties from '@site/static/usage/v9/split-pane/theming/css-properties/index.md'; diff --git a/docs/api/tab-bar.md b/docs/api/tab-bar.md index 4d5372db084..40a2083742a 100644 --- a/docs/api/tab-bar.md +++ b/docs/api/tab-bar.md @@ -4,12 +4,12 @@ title: "ion-tab-bar" import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -import Props from '@ionic-internal/component-api/v8/tab-bar/props.md'; -import Events from '@ionic-internal/component-api/v8/tab-bar/events.md'; -import Methods from '@ionic-internal/component-api/v8/tab-bar/methods.md'; -import Parts from '@ionic-internal/component-api/v8/tab-bar/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/tab-bar/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/tab-bar/slots.md'; +import Props from '@ionic-internal/component-api/v9/tab-bar/props.md'; +import Events from '@ionic-internal/component-api/v9/tab-bar/events.md'; +import Methods from '@ionic-internal/component-api/v9/tab-bar/methods.md'; +import Parts from '@ionic-internal/component-api/v9/tab-bar/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/tab-bar/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/tab-bar/slots.md'; ion-tab-bar: Tab Bar Component with CSS Custom Properties @@ -148,7 +148,7 @@ Badges can be added inside a tab button, often used to indicate notifications or Empty badges are only available for `md` mode. ::: -import InsideTabBar from '@site/static/usage/v8/badge/inside-tab-bar/index.md'; +import InsideTabBar from '@site/static/usage/v9/badge/inside-tab-bar/index.md'; diff --git a/docs/api/tab-button.md b/docs/api/tab-button.md index d2b2a56e875..a384eb624b9 100644 --- a/docs/api/tab-button.md +++ b/docs/api/tab-button.md @@ -4,12 +4,12 @@ title: "ion-tab-button" import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -import Props from '@ionic-internal/component-api/v8/tab-button/props.md'; -import Events from '@ionic-internal/component-api/v8/tab-button/events.md'; -import Methods from '@ionic-internal/component-api/v8/tab-button/methods.md'; -import Parts from '@ionic-internal/component-api/v8/tab-button/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/tab-button/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/tab-button/slots.md'; +import Props from '@ionic-internal/component-api/v9/tab-button/props.md'; +import Events from '@ionic-internal/component-api/v9/tab-button/events.md'; +import Methods from '@ionic-internal/component-api/v9/tab-button/methods.md'; +import Parts from '@ionic-internal/component-api/v9/tab-button/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/tab-button/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/tab-button/slots.md'; diff --git a/docs/api/tab.md b/docs/api/tab.md index 4e7af5e0116..00bad5cc2ce 100644 --- a/docs/api/tab.md +++ b/docs/api/tab.md @@ -2,12 +2,12 @@ title: "ion-tab" --- -import Props from '@ionic-internal/component-api/v8/tab/props.md'; -import Events from '@ionic-internal/component-api/v8/tab/events.md'; -import Methods from '@ionic-internal/component-api/v8/tab/methods.md'; -import Parts from '@ionic-internal/component-api/v8/tab/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/tab/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/tab/slots.md'; +import Props from '@ionic-internal/component-api/v9/tab/props.md'; +import Events from '@ionic-internal/component-api/v9/tab/events.md'; +import Methods from '@ionic-internal/component-api/v9/tab/methods.md'; +import Parts from '@ionic-internal/component-api/v9/tab/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/tab/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/tab/slots.md'; ion-tab: Ionic Framework Application Component diff --git a/docs/api/tabs.md b/docs/api/tabs.md index 90de2ec32f9..0732bae66a3 100644 --- a/docs/api/tabs.md +++ b/docs/api/tabs.md @@ -1,12 +1,12 @@ --- title: "ion-tabs" --- -import Props from '@ionic-internal/component-api/v8/tabs/props.md'; -import Events from '@ionic-internal/component-api/v8/tabs/events.md'; -import Methods from '@ionic-internal/component-api/v8/tabs/methods.md'; -import Parts from '@ionic-internal/component-api/v8/tabs/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/tabs/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/tabs/slots.md'; +import Props from '@ionic-internal/component-api/v9/tabs/props.md'; +import Events from '@ionic-internal/component-api/v9/tabs/events.md'; +import Methods from '@ionic-internal/component-api/v9/tabs/methods.md'; +import Parts from '@ionic-internal/component-api/v9/tabs/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/tabs/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/tabs/slots.md'; ion-tabs: Tab-Based Component for App Top-Level Navigation @@ -30,7 +30,7 @@ The `ion-tab-bar` needs a slot defined in order to be projected to the right pla Tabs can be used to display different content without the need to change the URL. This is useful when the tabs are not used for navigation, but rather to display different content. -import Basic from '@site/static/usage/v8/tabs/basic/index.md'; +import Basic from '@site/static/usage/v9/tabs/basic/index.md'; @@ -38,7 +38,7 @@ import Basic from '@site/static/usage/v8/tabs/basic/index.md'; Tabs can be used with the Ionic router to implement tab-based navigation. The tab bar and active tab will automatically resolve based on the URL. This is the most common pattern for tabs navigation. -import Router from '@site/static/usage/v8/tabs/router/index.md'; +import Router from '@site/static/usage/v9/tabs/router/index.md'; @@ -52,7 +52,7 @@ Ionic has guides on best practices for routing patterns with tabs. Check out the Tabs can be selected programmatically using the `select` method. This is useful when tab changes need to be triggered from application logic, such as in response to a button click or after completing a form. The following example demonstrates using a button to call the `select` method to navigate to a different tab. -import SelectMethod from '@site/static/usage/v8/tabs/select-method/index.md'; +import SelectMethod from '@site/static/usage/v9/tabs/select-method/index.md'; diff --git a/docs/api/text.md b/docs/api/text.md index c716f1b76b9..b056b04bf08 100644 --- a/docs/api/text.md +++ b/docs/api/text.md @@ -1,12 +1,12 @@ --- title: "ion-text" --- -import Props from '@ionic-internal/component-api/v8/text/props.md'; -import Events from '@ionic-internal/component-api/v8/text/events.md'; -import Methods from '@ionic-internal/component-api/v8/text/methods.md'; -import Parts from '@ionic-internal/component-api/v8/text/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/text/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/text/slots.md'; +import Props from '@ionic-internal/component-api/v9/text/props.md'; +import Events from '@ionic-internal/component-api/v9/text/events.md'; +import Methods from '@ionic-internal/component-api/v9/text/methods.md'; +import Parts from '@ionic-internal/component-api/v9/text/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/text/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/text/slots.md'; ion-text: Ionic App Component to Style or Change Text Color @@ -21,7 +21,7 @@ The text component is a simple component that can be used to style the text colo ## Basic Usage -import Basic from '@site/static/usage/v8/text/basic/index.md'; +import Basic from '@site/static/usage/v9/text/basic/index.md'; diff --git a/docs/api/textarea.md b/docs/api/textarea.md index 3de8cf4a76d..25692e9787a 100644 --- a/docs/api/textarea.md +++ b/docs/api/textarea.md @@ -1,12 +1,12 @@ --- title: "ion-textarea" --- -import Props from '@ionic-internal/component-api/v8/textarea/props.md'; -import Events from '@ionic-internal/component-api/v8/textarea/events.md'; -import Methods from '@ionic-internal/component-api/v8/textarea/methods.md'; -import Parts from '@ionic-internal/component-api/v8/textarea/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/textarea/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/textarea/slots.md'; +import Props from '@ionic-internal/component-api/v9/textarea/props.md'; +import Events from '@ionic-internal/component-api/v9/textarea/events.md'; +import Methods from '@ionic-internal/component-api/v9/textarea/methods.md'; +import Parts from '@ionic-internal/component-api/v9/textarea/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/textarea/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/textarea/slots.md'; Ionic Textarea Component and CSS Properties for Multi-Line Input @@ -25,7 +25,7 @@ The textarea component accepts the [native textarea attributes](https://develope ## Basic Usage -import BasicPlayground from '@site/static/usage/v8/textarea/basic/index.md'; +import BasicPlayground from '@site/static/usage/v9/textarea/basic/index.md'; @@ -41,7 +41,7 @@ Labels should be used to describe the textarea. They can be used visually, and t Labels will take up the width of their content by default. Developers can use the `labelPlacement` property to control how the label is placed relative to the control. -import LabelPlacement from '@site/static/usage/v8/textarea/label-placement/index.md'; +import LabelPlacement from '@site/static/usage/v9/textarea/label-placement/index.md'; @@ -51,7 +51,7 @@ While plaintext labels should be passed in via the `label` property, if custom H 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. -import LabelSlot from '@site/static/usage/v8/textarea/label-slot/index.md'; +import LabelSlot from '@site/static/usage/v9/textarea/label-slot/index.md'; @@ -59,7 +59,7 @@ import LabelSlot from '@site/static/usage/v8/textarea/label-slot/index.md'; If no visible label is needed, developers should still supply an `aria-label` so the textarea is accessible to screen readers. -import NoVisibleLabel from '@site/static/usage/v8/textarea/no-visible-label/index.md'; +import NoVisibleLabel from '@site/static/usage/v9/textarea/no-visible-label/index.md'; @@ -73,7 +73,7 @@ Filled textareas can be used on iOS by setting the textarea's `mode` to `md`. Textareas that use `fill` should not be used in an `ion-item` due to styling conflicts between the components. ::: -import Fill from '@site/static/usage/v8/textarea/fill/index.md'; +import Fill from '@site/static/usage/v9/textarea/fill/index.md'; @@ -83,7 +83,7 @@ Helper and error text can be used inside of a textarea with the `helperText` and In Angular, this is done automatically through form validation. In JavaScript, React and Vue, the class needs to be manually added based on your own validation. -import HelperError from '@site/static/usage/v8/textarea/helper-error/index.md'; +import HelperError from '@site/static/usage/v9/textarea/helper-error/index.md'; @@ -91,7 +91,7 @@ import HelperError from '@site/static/usage/v8/textarea/helper-error/index.md'; The textarea counter is text that displays under a textarea to notify the user of how many characters have been entered out of the total that the textarea will accept. When adding counter, the default behavior is to format the value that gets displayed as `inputLength` / `maxLength`. This behavior can be customized by passing in a formatter function to the `counterFormatter` property. -import Counter from '@site/static/usage/v8/textarea/counter/index.md'; +import Counter from '@site/static/usage/v9/textarea/counter/index.md'; @@ -99,7 +99,7 @@ import Counter from '@site/static/usage/v8/textarea/counter/index.md'; When the `autoGrow` property is set to `true`, the textarea will grow and shrink based on its contents. -import AutogrowPlayground from '@site/static/usage/v8/textarea/autogrow/index.md'; +import AutogrowPlayground from '@site/static/usage/v9/textarea/autogrow/index.md'; @@ -107,7 +107,7 @@ import AutogrowPlayground from '@site/static/usage/v8/textarea/autogrow/index.md Setting the `clearOnEdit` property to `true` will clear the textarea after it has been blurred and then typed in again. -import ClearOnEditPlayground from '@site/static/usage/v8/textarea/clear-on-edit/index.md'; +import ClearOnEditPlayground from '@site/static/usage/v9/textarea/clear-on-edit/index.md'; @@ -123,13 +123,13 @@ In most cases, [Icon](./icon.md) components placed in these slots should have `a 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. ::: -import StartEndSlots from '@site/static/usage/v8/textarea/start-end-slots/index.md'; +import StartEndSlots from '@site/static/usage/v9/textarea/start-end-slots/index.md'; ## Theming -import ThemingPlayground from '@site/static/usage/v8/textarea/theming/index.md'; +import ThemingPlayground from '@site/static/usage/v9/textarea/theming/index.md'; diff --git a/docs/api/thumbnail.md b/docs/api/thumbnail.md index 094acf35469..d6e64c6009b 100644 --- a/docs/api/thumbnail.md +++ b/docs/api/thumbnail.md @@ -2,12 +2,12 @@ title: "ion-thumbnail" --- -import Props from '@ionic-internal/component-api/v8/thumbnail/props.md'; -import Events from '@ionic-internal/component-api/v8/thumbnail/events.md'; -import Methods from '@ionic-internal/component-api/v8/thumbnail/methods.md'; -import Parts from '@ionic-internal/component-api/v8/thumbnail/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/thumbnail/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/thumbnail/slots.md'; +import Props from '@ionic-internal/component-api/v9/thumbnail/props.md'; +import Events from '@ionic-internal/component-api/v9/thumbnail/events.md'; +import Methods from '@ionic-internal/component-api/v9/thumbnail/methods.md'; +import Parts from '@ionic-internal/component-api/v9/thumbnail/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/thumbnail/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/thumbnail/slots.md'; ion-thumbnail: Thumbnail App Component for Images or Icons @@ -24,13 +24,13 @@ Thumbnails can be used by themselves or inside of any element. If placed inside ## Basic Usage -import Basic from '@site/static/usage/v8/thumbnail/basic/index.md'; +import Basic from '@site/static/usage/v9/thumbnail/basic/index.md'; ## Item Thumbnails -import Item from '@site/static/usage/v8/thumbnail/item/index.md'; +import Item from '@site/static/usage/v9/thumbnail/item/index.md'; @@ -38,7 +38,7 @@ import Item from '@site/static/usage/v8/thumbnail/item/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/thumbnail/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/thumbnail/theming/css-properties/index.md'; diff --git a/docs/api/title.md b/docs/api/title.md index d93cc7a0471..bbe9130ab50 100644 --- a/docs/api/title.md +++ b/docs/api/title.md @@ -1,12 +1,12 @@ --- title: "ion-title" --- -import Props from '@ionic-internal/component-api/v8/title/props.md'; -import Events from '@ionic-internal/component-api/v8/title/events.md'; -import Methods from '@ionic-internal/component-api/v8/title/methods.md'; -import Parts from '@ionic-internal/component-api/v8/title/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/title/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/title/slots.md'; +import Props from '@ionic-internal/component-api/v9/title/props.md'; +import Events from '@ionic-internal/component-api/v9/title/events.md'; +import Methods from '@ionic-internal/component-api/v9/title/methods.md'; +import Parts from '@ionic-internal/component-api/v9/title/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/title/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/title/slots.md'; ion-title: Ionic Framework App Title Component for Toolbars @@ -22,7 +22,7 @@ Title is a text component that sets the title for a [toolbar](./toolbar). It can ## Basic -import Basic from '@site/static/usage/v8/title/basic/index.md'; +import Basic from '@site/static/usage/v9/title/basic/index.md'; @@ -36,7 +36,7 @@ This feature is only available for iOS. ::: -import CollapsibleLargeTitle from '@site/static/usage/v8/title/collapsible-large-title/basic/index.md'; +import CollapsibleLargeTitle from '@site/static/usage/v9/title/collapsible-large-title/basic/index.md'; @@ -45,7 +45,7 @@ import CollapsibleLargeTitle from '@site/static/usage/v8/title/collapsible-large The [buttons](./buttons.md) component can be used with the [`collapse`](./buttons.md#collapse) property to additionally display in the header as the toolbar is collapsed. -import CollapsibleLargeTitleButtons from '@site/static/usage/v8/title/collapsible-large-title/buttons/index.md'; +import CollapsibleLargeTitleButtons from '@site/static/usage/v9/title/collapsible-large-title/buttons/index.md'; @@ -73,7 +73,7 @@ When styling the text color of the large title, you should target the large titl ### CSS Custom Properties -import CSSCustomProperties from '@site/static/usage/v8/title/theming/css-properties/index.md'; +import CSSCustomProperties from '@site/static/usage/v9/title/theming/css-properties/index.md'; diff --git a/docs/api/toast.md b/docs/api/toast.md index c9df2deeaa0..ffe4fb0042c 100644 --- a/docs/api/toast.md +++ b/docs/api/toast.md @@ -4,12 +4,12 @@ title: "ion-toast" import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -import Props from '@ionic-internal/component-api/v8/toast/props.md'; -import Events from '@ionic-internal/component-api/v8/toast/events.md'; -import Methods from '@ionic-internal/component-api/v8/toast/methods.md'; -import Parts from '@ionic-internal/component-api/v8/toast/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/toast/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/toast/slots.md'; +import Props from '@ionic-internal/component-api/v9/toast/props.md'; +import Events from '@ionic-internal/component-api/v9/toast/events.md'; +import Methods from '@ionic-internal/component-api/v9/toast/methods.md'; +import Parts from '@ionic-internal/component-api/v9/toast/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/toast/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/toast/slots.md'; ion-toast: A Dismissible App Notification Alert Component @@ -26,7 +26,7 @@ A Toast is a subtle notification commonly used in modern applications. It can be `ion-toast` can be used by writing the component directly in your template. This reduces the number of handlers you need to wire up in order to present the toast. -import InlineToastTriggerExample from '@site/static/usage/v8/toast/inline/basic/index.md'; +import InlineToastTriggerExample from '@site/static/usage/v9/toast/inline/basic/index.md'; @@ -36,13 +36,13 @@ The `isOpen` property on `ion-toast` allows developers to control the presentati `isOpen` uses a one-way data binding, meaning it will not automatically be set to `false` when the toast is dismissed. Developers should listen for the `ionToastDidDismiss` or `didDismiss` event and set `isOpen` to `false`. The reason for this is it prevents the internals of `ion-toast` from being tightly coupled with the state of the application. With a one way data binding, the toast only needs to concern itself with the boolean value that the reactive variable provides. With a two way data binding, the toast needs to concern itself with both the boolean value as well as the existence of the reactive variable itself. This can lead to non-deterministic behaviors and make applications harder to debug. -import InlineToastIsOpenExample from '@site/static/usage/v8/toast/inline/is-open/index.md'; +import InlineToastIsOpenExample from '@site/static/usage/v9/toast/inline/is-open/index.md'; ## Controller Toasts -import ControllerExample from '@site/static/usage/v8/toast/presenting/controller/index.md'; +import ControllerExample from '@site/static/usage/v9/toast/presenting/controller/index.md'; @@ -56,7 +56,7 @@ Pressing the hardware back button does not dismiss toasts since they are not sup The following example demonstrates how to use the `buttons` property to add a button that automatically dismisses the toast when clicked, as well as how to collect the `role` of the dismiss event. -import ButtonsPlayground from '@site/static/usage/v8/toast/buttons/index.md'; +import ButtonsPlayground from '@site/static/usage/v9/toast/buttons/index.md'; @@ -68,7 +68,7 @@ Toasts can be positioned at the top, bottom or middle of the viewport. The posit If a toast is presented alongside navigation elements such as a header, footer, or [FAB](./fab.md), the toast may overlap these elements by default. This can be fixed using the `positionAnchor` property, which takes either an element reference or an ID. The toast will be positioned relative to the chosen element, appearing below it when using `position="top"` or above it when using `position="bottom"`. When using `position="middle"`, the `positionAnchor` property is ignored. -import PositionAnchor from '@site/static/usage/v8/toast/position-anchor/index.md'; +import PositionAnchor from '@site/static/usage/v9/toast/position-anchor/index.md'; @@ -76,7 +76,7 @@ import PositionAnchor from '@site/static/usage/v8/toast/position-anchor/index.md 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. -import SwipeGesture from '@site/static/usage/v8/toast/swipe-gesture/index.md'; +import SwipeGesture from '@site/static/usage/v9/toast/swipe-gesture/index.md'; @@ -84,7 +84,7 @@ import SwipeGesture from '@site/static/usage/v8/toast/swipe-gesture/index.md'; 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. -import StackedPlayground from '@site/static/usage/v8/toast/layout/index.md'; +import StackedPlayground from '@site/static/usage/v9/toast/layout/index.md'; @@ -92,13 +92,13 @@ import StackedPlayground from '@site/static/usage/v8/toast/layout/index.md'; An icon can be added next to the content inside of the toast. In general, icons in toasts should be used to add additional style or context, not to grab the user's attention or elevate the priority of the toast. If you wish to convey a higher priority message to the user or guarantee a response, we recommend using an [Alert](alert.md) instead. -import IconPlayground from '@site/static/usage/v8/toast/icon/index.md'; +import IconPlayground from '@site/static/usage/v9/toast/icon/index.md'; ## Theming -import ThemingPlayground from '@site/static/usage/v8/toast/theming/index.md'; +import ThemingPlayground from '@site/static/usage/v9/toast/theming/index.md'; diff --git a/docs/api/toggle.md b/docs/api/toggle.md index ad2ebe3554e..9e8314c0dcc 100644 --- a/docs/api/toggle.md +++ b/docs/api/toggle.md @@ -1,12 +1,12 @@ --- title: "ion-toggle" --- -import Props from '@ionic-internal/component-api/v8/toggle/props.md'; -import Events from '@ionic-internal/component-api/v8/toggle/events.md'; -import Methods from '@ionic-internal/component-api/v8/toggle/methods.md'; -import Parts from '@ionic-internal/component-api/v8/toggle/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/toggle/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/toggle/slots.md'; +import Props from '@ionic-internal/component-api/v9/toggle/props.md'; +import Events from '@ionic-internal/component-api/v9/toggle/events.md'; +import Methods from '@ionic-internal/component-api/v9/toggle/methods.md'; +import Parts from '@ionic-internal/component-api/v9/toggle/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/toggle/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/toggle/slots.md'; ion-toggle: Custom Toggle Button for Ionic Applications @@ -22,7 +22,7 @@ Toggles are switches that change the state of a single option. They can be switc ## Basic Usage -import Basic from '@site/static/usage/v8/toggle/basic/index.md'; +import Basic from '@site/static/usage/v9/toggle/basic/index.md'; @@ -31,7 +31,7 @@ import Basic from '@site/static/usage/v8/toggle/basic/index.md'; Toggles can enable on/off labels by setting the `enableOnOffLabels` property. This is important for accessibility as it makes it easier to differentiate between a checked and unchecked toggle. -import OnOff from '@site/static/usage/v8/toggle/on-off/index.md'; +import OnOff from '@site/static/usage/v9/toggle/on-off/index.md'; @@ -40,7 +40,7 @@ import OnOff from '@site/static/usage/v8/toggle/on-off/index.md'; Toggles can also be used in a list view by using the [Item](./item) and [List](./list) components. -import List from '@site/static/usage/v8/toggle/list/index.md'; +import List from '@site/static/usage/v9/toggle/list/index.md'; @@ -49,7 +49,7 @@ import List from '@site/static/usage/v8/toggle/list/index.md'; Developers can use the `labelPlacement` property to control how the label is placed relative to the control. -import LabelPlacement from '@site/static/usage/v8/toggle/label-placement/index.md'; +import LabelPlacement from '@site/static/usage/v9/toggle/label-placement/index.md'; @@ -61,7 +61,7 @@ Developers can use the `alignment` property to control how the label and control Stacked toggles can be aligned using the `alignment` property. This can be useful when the label and control need to be centered horizontally. ::: -import Alignment from '@site/static/usage/v8/toggle/alignment/index.md'; +import Alignment from '@site/static/usage/v9/toggle/alignment/index.md'; @@ -69,7 +69,7 @@ import Alignment from '@site/static/usage/v8/toggle/alignment/index.md'; Developers can use the `justify` property to control how the label and control are packed on a line. -import Justify from '@site/static/usage/v8/toggle/justify/index.md'; +import Justify from '@site/static/usage/v9/toggle/justify/index.md'; @@ -79,7 +79,7 @@ Helper and error text can be used inside of a toggle with the `helperText` and ` In Angular, this is done automatically through form validation. In JavaScript, React and Vue, the class needs to be manually added based on your own validation. -import HelperError from '@site/static/usage/v8/toggle/helper-error/index.md'; +import HelperError from '@site/static/usage/v9/toggle/helper-error/index.md'; @@ -87,7 +87,7 @@ import HelperError from '@site/static/usage/v8/toggle/helper-error/index.md'; ### Colors -import Colors from '@site/static/usage/v8/toggle/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/toggle/theming/colors/index.md'; @@ -95,7 +95,7 @@ import Colors from '@site/static/usage/v8/toggle/theming/colors/index.md'; CSS custom properties can be combined with standard CSS to target different parts of a toggle. We can modify the `width` and `height` of the toggle directly to change the size of the track, while using the `--handle-width` and `--handle-height` custom properties to customize the handle size. -import CSSProps from '@site/static/usage/v8/toggle/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/toggle/theming/css-properties/index.md'; @@ -103,7 +103,7 @@ import CSSProps from '@site/static/usage/v8/toggle/theming/css-properties/index. We can further customize toggle by targeting specific shadow parts that are exposed. Any CSS property on these parts can be styled and they can also be combined with CSS custom properties. -import CSSParts from '@site/static/usage/v8/toggle/theming/css-shadow-parts/index.md'; +import CSSParts from '@site/static/usage/v9/toggle/theming/css-shadow-parts/index.md'; diff --git a/docs/api/toolbar.md b/docs/api/toolbar.md index aa0d499a5eb..4987a6a5f2e 100644 --- a/docs/api/toolbar.md +++ b/docs/api/toolbar.md @@ -1,12 +1,12 @@ --- title: "ion-toolbar" --- -import Props from '@ionic-internal/component-api/v8/toolbar/props.md'; -import Events from '@ionic-internal/component-api/v8/toolbar/events.md'; -import Methods from '@ionic-internal/component-api/v8/toolbar/methods.md'; -import Parts from '@ionic-internal/component-api/v8/toolbar/parts.md'; -import CustomProps from '@ionic-internal/component-api/v8/toolbar/custom-props.mdx'; -import Slots from '@ionic-internal/component-api/v8/toolbar/slots.md'; +import Props from '@ionic-internal/component-api/v9/toolbar/props.md'; +import Events from '@ionic-internal/component-api/v9/toolbar/events.md'; +import Methods from '@ionic-internal/component-api/v9/toolbar/methods.md'; +import Parts from '@ionic-internal/component-api/v9/toolbar/parts.md'; +import CustomProps from '@ionic-internal/component-api/v9/toolbar/custom-props.mdx'; +import Slots from '@ionic-internal/component-api/v9/toolbar/slots.md'; ion-toolbar: Customize App Menu Toolbar Buttons and Icons @@ -27,7 +27,7 @@ Toolbars can contain several different components including titles, buttons, ico It is recommended to put a toolbar inside of a [header](./header) or [footer](./footer) for proper positioning. When a toolbar is placed in a header it will appear fixed at the top of the content. When it is placed in a footer it will appear fixed at the bottom. Fullscreen content will scroll behind a toolbar in a header or footer. A [title](./title) component can be used to display text inside of the toolbar. -import Basic from '@site/static/usage/v8/toolbar/basic/index.md'; +import Basic from '@site/static/usage/v9/toolbar/basic/index.md'; @@ -38,7 +38,7 @@ Buttons placed in a toolbar should be placed inside of the [buttons](./buttons) The buttons component can wrap a standard [button](./button), [back button](./back-button), [menu button](./menu-button), or several of any of them. A button in a toolbar is styled to be clear by default, but this can be changed using the [`fill`](./button#fill) property on the button. The properties included on back button and menu button in this example are for display purposes; refer to their respective documentation for proper usage. -import Buttons from '@site/static/usage/v8/toolbar/buttons/index.md'; +import Buttons from '@site/static/usage/v9/toolbar/buttons/index.md'; @@ -47,7 +47,7 @@ import Buttons from '@site/static/usage/v8/toolbar/buttons/index.md'; A [searchbar](./searchbar) can be placed inside of a toolbar to search through the content. It should be the only child component of the toolbar, and will take up the full width and height. -import Searchbars from '@site/static/usage/v8/toolbar/searchbars/index.md'; +import Searchbars from '@site/static/usage/v9/toolbar/searchbars/index.md'; @@ -56,7 +56,7 @@ import Searchbars from '@site/static/usage/v8/toolbar/searchbars/index.md'; [Segments](./segment) are generally used in toolbars to toggle between two different content views on the same page. They can be placed in a toolbar with other components, such as buttons, but should not be placed alongside a title. -import Segments from '@site/static/usage/v8/toolbar/segments/index.md'; +import Segments from '@site/static/usage/v9/toolbar/segments/index.md'; @@ -65,7 +65,7 @@ import Segments from '@site/static/usage/v8/toolbar/segments/index.md'; A [progress bar](./progress-bar) is used as a loading indicator to show an ongoing process in an app. Progress bars can be placed with any other components inside of a toolbar as they will align with the bottom of the toolbar. -import ProgressBars from '@site/static/usage/v8/toolbar/progress-bars/index.md'; +import ProgressBars from '@site/static/usage/v9/toolbar/progress-bars/index.md'; @@ -74,13 +74,13 @@ import ProgressBars from '@site/static/usage/v8/toolbar/progress-bars/index.md'; ### Colors -import Colors from '@site/static/usage/v8/toolbar/theming/colors/index.md'; +import Colors from '@site/static/usage/v9/toolbar/theming/colors/index.md'; ### CSS Custom Properties -import CSSProps from '@site/static/usage/v8/toolbar/theming/css-properties/index.md'; +import CSSProps from '@site/static/usage/v9/toolbar/theming/css-properties/index.md'; diff --git a/docs/components.md b/docs/components.md index a437db16c89..112e0bd0848 100644 --- a/docs/components.md +++ b/docs/components.md @@ -85,7 +85,7 @@ Ionic apps are made of high-level building blocks called Components, which allow -

Inputs provides a way for users to enter data in your app.

+

Inputs provide a way for users to enter data in your app.

diff --git a/docs/developing/config.md b/docs/developing/config.md index 6cce3de4a1d..80f448e6c2d 100644 --- a/docs/developing/config.md +++ b/docs/developing/config.md @@ -55,7 +55,7 @@ import PerPlatformOverridesExample from '@site/docs/developing/config/per-platfo In some cases, you may need to access the current Ionic mode programmatically within your application logic. This can be useful for applying conditional behavior, fetching specific assets, or performing other actions based on the active styling mode. -import IonicMode from '@site/static/usage/v8/config/mode/index.md'; +import IonicMode from '@site/static/usage/v9/config/mode/index.md'; @@ -83,7 +83,7 @@ Ionic Angular provides a `Config` provider for accessing the Ionic Config. ```ts -import { Config } from '@ionic/angular'; +import { Config } from '@ionic/angular/lazy'; @Component(...) class AppComponent { @@ -97,7 +97,7 @@ class AppComponent { ```ts -import { Config } from '@ionic/angular/standalone'; +import { Config } from '@ionic/angular'; @Component(...) class AppComponent { @@ -130,7 +130,7 @@ class AppComponent { ```ts -import { Config } from '@ionic/angular'; +import { Config } from '@ionic/angular/lazy'; @Component(...) class AppComponent { @@ -144,7 +144,7 @@ class AppComponent { ```ts -import { Config } from '@ionic/angular/standalone'; +import { Config } from '@ionic/angular'; @Component(...) class AppComponent { @@ -180,7 +180,7 @@ Below are the config options that Ionic uses. | `backButtonDefaultHref` | `string` | Overrides the default value for the `defaultHref` property in all `` components. | | `backButtonIcon` | `string` | Overrides the default icon in all `` components. | | `backButtonText` | `string` | Overrides the default text in all `` components. | -| `innerHTMLTemplatesEnabled` | `boolean` | Relevant Components: `ion-alert`, `ion-infinite-scroll-content`, `ion-loading`, `ion-refresher-content`, `ion-toast`. If `true`, content passed to the relevant components will be parsed as HTML instead of plaintext. Defaults to `false`. | +| `innerHTMLTemplatesEnabled` | `boolean` | Relevant Components: `ion-alert`, `ion-infinite-scroll-content`, `ion-loading`, `ion-refresher-content`, `ion-select-option`, `ion-toast`. If `true`, content passed to the relevant components will be parsed as HTML instead of plaintext. Defaults to `false`. | | `hardwareBackButton` | `boolean` | If `true`, Ionic will respond to the hardware back button in an Android device. | | `infiniteLoadingSpinner` | `SpinnerTypes` | Overrides the default spinner type in all `` components. | | `loadingEnter` | `AnimationBuilder` | Provides a custom enter animation for all `ion-loading`, overriding the default "animation". | @@ -193,8 +193,6 @@ Below are the config options that Ionic uses. | `modalLeave` | `AnimationBuilder` | Provides a custom leave animation for all `ion-modal`, overriding the default "animation". | | `mode` | `Mode` | The mode determines which platform styles to use for the whole application. | | `navAnimation` | `AnimationBuilder` | Overrides the default "animation" of all `ion-nav` and `ion-router-outlet` across the whole application. | -| `pickerEnter` | `AnimationBuilder` | Provides a custom enter animation for all `ion-picker`, overriding the default "animation". | -| `pickerLeave` | `AnimationBuilder` | Provides a custom leave animation for all `ion-picker`, overriding the default "animation". | | `platform` | [`PlatformConfig`](/docs/angular/platform#customizing-platform-detection-methods) | Overrides the default platform detection methods. | | `popoverEnter` | `AnimationBuilder` | Provides a custom enter animation for all `ion-popover`, overriding the default "animation". | | `popoverLeave` | `AnimationBuilder` | Provides a custom leave animation for all `ion-popover`, overriding the default "animation". | diff --git a/docs/developing/config/global/index.md b/docs/developing/config/global/index.md index 19d3494dd66..6c71cd6f1f3 100644 --- a/docs/developing/config/global/index.md +++ b/docs/developing/config/global/index.md @@ -27,7 +27,11 @@ window.Ionic = { ```tsx title="app.module.ts" -import { IonicModule } from '@ionic/angular'; +/* + * IonicModule is deprecated and will be removed in a future major version. + * Refer to the "Angular (Standalone)" tab to use `provideIonicAngular()` instead. + */ +import { IonicModule } from '@ionic/angular/lazy'; @NgModule({ ... @@ -45,7 +49,7 @@ import { IonicModule } from '@ionic/angular'; ```ts title="main.ts" -import { provideIonicAngular } from '@ionic/angular/standalone'; +import { provideIonicAngular } from '@ionic/angular'; bootstrapApplication(AppComponent, { providers: [ diff --git a/docs/developing/config/per-component/index.md b/docs/developing/config/per-component/index.md index 83546ca0cd7..b5d291464f7 100644 --- a/docs/developing/config/per-component/index.md +++ b/docs/developing/config/per-component/index.md @@ -47,7 +47,11 @@ window.Ionic = { **Not recommended** ```ts -import { IonicModule } from '@ionic/angular'; +/* + * IonicModule is deprecated and will be removed in a future major version. + * Refer to the "Angular (Standalone)" tab to use `provideIonicAngular()` instead. + */ +import { IonicModule } from '@ionic/angular/lazy'; @NgModule({ ... @@ -84,7 +88,7 @@ class MyComponent { **Not recommended** ```ts -import { provideIonicAngular } from '@ionic/angular/standalone'; +import { provideIonicAngular } from '@ionic/angular'; bootstrapApplication(AppComponent, { providers: [ diff --git a/docs/developing/config/per-platform-fallback/index.md b/docs/developing/config/per-platform-fallback/index.md index a3bbd7fa45a..c5dbe5e65db 100644 --- a/docs/developing/config/per-platform-fallback/index.md +++ b/docs/developing/config/per-platform-fallback/index.md @@ -14,7 +14,11 @@ import TabItem from '@theme/TabItem'; ```ts title="app.module.ts" -import { isPlatform, IonicModule } from '@ionic/angular'; +/* + * IonicModule is deprecated and will be removed in a future major version. + * Refer to the "Angular (Standalone)" tab to use `provideIonicAngular()` instead. + */ +import { isPlatform, IonicModule } from '@ionic/angular/lazy'; const getConfig = () => { if (isPlatform('hybrid')) { @@ -40,7 +44,7 @@ const getConfig = () => { ```ts title="main.ts" -import { isPlatform, provideIonicAngular } from '@ionic/angular/standalone'; +import { isPlatform, provideIonicAngular } from '@ionic/angular'; const getConfig = () => { if (isPlatform('hybrid')) { diff --git a/docs/developing/config/per-platform-overrides/index.md b/docs/developing/config/per-platform-overrides/index.md index 6ee558f9e41..d379bd7bb59 100644 --- a/docs/developing/config/per-platform-overrides/index.md +++ b/docs/developing/config/per-platform-overrides/index.md @@ -14,7 +14,11 @@ import TabItem from '@theme/TabItem'; ```ts title="app.module.ts" -import { isPlatform, IonicModule } from '@ionic/angular'; +/* + * IonicModule is deprecated and will be removed in a future major version. + * Refer to the "Angular (Standalone)" tab to use `provideIonicAngular()` instead. + */ +import { isPlatform, IonicModule } from '@ionic/angular/lazy'; const getConfig = () => { let config = { @@ -43,7 +47,7 @@ const getConfig = () => { ```ts title="main.ts" -import { isPlatform, provideIonicAngular } from '@ionic/angular/standalone'; +import { isPlatform, provideIonicAngular } from '@ionic/angular'; const getConfig = () => { let config = { diff --git a/docs/developing/config/per-platform/index.md b/docs/developing/config/per-platform/index.md index 6379dd7a25e..00f66e27ddf 100644 --- a/docs/developing/config/per-platform/index.md +++ b/docs/developing/config/per-platform/index.md @@ -20,7 +20,11 @@ Refer to the [Angular Platform Documentation](../angular/platform) for the types ::: ```ts title="app.module.ts" -import { isPlatform, IonicModule } from '@ionic/angular'; +/* + * IonicModule is deprecated and will be removed in a future major version. + * Refer to the "Angular (Standalone)" tab to use `provideIonicAngular()` instead. + */ +import { isPlatform, IonicModule } from '@ionic/angular/lazy'; @NgModule({ ... @@ -43,7 +47,7 @@ Refer to the [Angular Platform Documentation](../angular/platform) for the types ::: ```ts title="main.ts" -import { isPlatform, provideIonicAngular } from '@ionic/angular/standalone'; +import { isPlatform, provideIonicAngular } from '@ionic/angular'; bootstrapApplication(AppComponent, { providers: [ diff --git a/docs/developing/hardware-back-button.md b/docs/developing/hardware-back-button.md index cc5d731dc9f..ad4801de2c0 100644 --- a/docs/developing/hardware-back-button.md +++ b/docs/developing/hardware-back-button.md @@ -78,7 +78,7 @@ document.addEventListener('ionBackButton', (event) => { ```tsx -import { Platform } from '@ionic/angular'; +import { Platform } from '@ionic/angular/lazy'; ... @@ -93,7 +93,7 @@ constructor(private platform: Platform) { ```tsx -import { Platform } from '@ionic/angular/standalone'; +import { Platform } from '@ionic/angular'; ... @@ -170,7 +170,7 @@ document.addEventListener('ionBackButton', (event) => { ```tsx -import { Platform } from '@ionic/angular'; +import { Platform } from '@ionic/angular/lazy'; ... @@ -191,7 +191,7 @@ constructor(private platform: Platform) { ```tsx -import { Platform } from '@ionic/angular/standalone'; +import { Platform } from '@ionic/angular'; ... @@ -311,7 +311,7 @@ document.addEventListener('ionBackButton', (event: BackButtonEvent) => { ```tsx import { Optional } from '@angular/core'; -import { IonRouterOutlet, Platform } from '@ionic/angular'; +import { IonRouterOutlet, Platform } from '@ionic/angular/lazy'; import { App } from '@capacitor/app'; ... @@ -333,7 +333,7 @@ constructor( ```tsx import { Optional } from '@angular/core'; -import { IonRouterOutlet, Platform } from '@ionic/angular/standalone'; +import { IonRouterOutlet, Platform } from '@ionic/angular'; import { App } from '@capacitor/app'; ... diff --git a/docs/developing/keyboard.md b/docs/developing/keyboard.md index 03d1346956a..ed454b8c1f9 100644 --- a/docs/developing/keyboard.md +++ b/docs/developing/keyboard.md @@ -27,7 +27,7 @@ For a list of accepted values, refer to the
@@ -103,7 +103,7 @@ window.addEventListener('ionKeyboardDidHide', () => { ```tsx -import { Platform } from '@ionic/angular'; +import { Platform } from '@ionic/angular/lazy'; ... @@ -122,7 +122,7 @@ constructor(private platform: Platform) { ```tsx -import { Platform } from '@ionic/angular/standalone'; +import { Platform } from '@ionic/angular'; ... diff --git a/docs/developing/managing-focus.md b/docs/developing/managing-focus.md index 9859ed2fb78..3535bbbfb75 100644 --- a/docs/developing/managing-focus.md +++ b/docs/developing/managing-focus.md @@ -37,7 +37,7 @@ There are platform restrictions you should be aware of when using the `setFocus` The example below demonstrates how to use the `setFocus` API to request focus on an input when the user clicks a button. -import Basic from '@site/static/usage/v8/input/set-focus/index.md'; +import Basic from '@site/static/usage/v9/input/set-focus/index.md'; @@ -65,6 +65,7 @@ import { IonInput } from '@ionic/angular'; @Component({ selector: 'app-example', + imports: [IonInput], templateUrl: './example.component.html', }) export class ExampleComponent { @@ -171,6 +172,7 @@ import { IonInput } from '@ionic/angular'; @Component({ selector: 'app-example', + imports: [IonInput], templateUrl: './example.component.html', }) export class ExampleComponent { diff --git a/docs/layout/dynamic-font-scaling.md b/docs/layout/dynamic-font-scaling.md index 9ff1d86ecc6..4f15b160796 100644 --- a/docs/layout/dynamic-font-scaling.md +++ b/docs/layout/dynamic-font-scaling.md @@ -12,7 +12,7 @@ If you are testing on Chrome for Android, make sure ["Accessibility Page Zoom"]( Follow the [Changing the Font Size on a Device](#changing-the-font-size-on-a-device) guide to set your preferred font size, and watch the text in the demo below grow or shrink according to your preferences. -import DynamicFontScaling from '@site/static/usage/v8/layout/dynamic-font-scaling/index.md'; +import DynamicFontScaling from '@site/static/usage/v9/layout/dynamic-font-scaling/index.md'; diff --git a/docs/layout/structure.md b/docs/layout/structure.md index 2b0bdf51de9..3201c7644f6 100644 --- a/docs/layout/structure.md +++ b/docs/layout/structure.md @@ -21,7 +21,7 @@ Ionic Framework provides several different layouts that can be used to structure The most simple layout available consists of a [header](../api/header.md) and [content](../api/content.md). Most pages in an app generally have both of these, but a header is not required in order to use content. -import Header from '@site/static/usage/v8/header/basic/index.md'; +import Header from '@site/static/usage/v9/header/basic/index.md';
@@ -29,7 +29,7 @@ import Header from '@site/static/usage/v8/header/basic/index.md'; While a toolbar in a header appears above the content, a footer appears below the content. A header and a footer can also be used together on the same page. -import Footer from '@site/static/usage/v8/footer/basic/index.md'; +import Footer from '@site/static/usage/v9/footer/basic/index.md';