diff --git a/.prettierrc.js b/.prettierrc.js index 2b532afe4ce..0ddee095558 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -8,4 +8,13 @@ module.exports = { ...ionicConfig, // Override the trailingComma setting to avoid trailing commas in function arguments and JSX props. trailingComma: 'es5', + overrides: [ + ...ionicConfig.overrides, + { + files: ['*.md', '*.mdx'], + // GitHub alerts such as `> [!NOTE]` need the marker on its own line. + excludeFiles: ['CONTRIBUTING.md'], + options: { proseWrap: 'never' }, + }, + ], }; diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a009111539f..a0938dbe5bc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -218,6 +218,8 @@ Content ::: ``` +Keep the blank lines after the opening marker, before the closing `:::`, and after it. `npm run lint` puts each paragraph on one line, so without them it merges the markers into the surrounding text and the admonition renders as plain text. + ### Links and Headings Use Markdown for links and headings whenever possible. When you need JSX, such as inside a component prop or in `src/`, use the Docusaurus components instead of raw HTML: diff --git a/docs/angular/lifecycle.mdx b/docs/angular/lifecycle.mdx index 4032209defe..4450d54e4ed 100644 --- a/docs/angular/lifecycle.mdx +++ b/docs/angular/lifecycle.mdx @@ -19,10 +19,10 @@ This guide covers how the page life cycle works in an app built with Ionic and A Ionic embraces the life cycle events provided by Angular. The two Angular events you will find using the most are: -| Event Name | Description | -| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ngOnInit` | Fired once during component initialization. This event can be used to initialize local members and make calls into services that only need to be done once. | -| `ngOnDestroy` | Fired right before Angular destroys the view. Useful for cleanup like unsubscribing from observables. | +| Event Name | Description | +| --- | --- | +| `ngOnInit` | Fired once during component initialization. This event can be used to initialize local members and make calls into services that only need to be done once. | +| `ngOnDestroy` | Fired right before Angular destroys the view. Useful for cleanup like unsubscribing from observables. | For more info on the Angular Component Life Cycle events, visit their [component lifecycle docs](https://angular.io/guide/lifecycle-hooks). diff --git a/docs/angular/platform.mdx b/docs/angular/platform.mdx index ad013cff64e..d11ebf80db4 100644 --- a/docs/angular/platform.mdx +++ b/docs/angular/platform.mdx @@ -59,15 +59,15 @@ export class MyPage { ### `is` {/* #is */} -| | | -| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| | | +| --- | --- | | **Description** | Depending on the platform the user is on, `is(platformName)` will return true or false. Note that the same app can return true for more than one platform name. For example, an app running from an iPad would return true for the platform names: `mobile`, `ios`, `ipad`, and `tablet`. Additionally, if the app was running from Cordova then `cordova` would be true. | -| **Signature** | `is(platformName: Platforms) => boolean` | +| **Signature** | `is(platformName: Platforms) => boolean` | #### Parameters {/* #parameters */} -| Name | Type | Description | -| -------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| Name | Type | Description | +| --- | --- | --- | | `platformName` | `Platforms` | Name of the platform. Available options are android, capacitor, cordova, desktop, electron, hybrid, ios, ipad, iphone, mobile, phablet, pwa, tablet | #### Platforms {/* #platforms */} @@ -181,24 +181,24 @@ type PlatformConfig = { ### `platforms` {/* #platforms-1 */} -| | | -| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| | | +| --- | --- | | **Description** | Depending on what device you are on, `platforms` can return multiple values. Each possible value is a hierarchy of platforms. For example, on an iPhone, it would return `mobile`, `ios`, and `iphone`. | -| **Signature** | `platforms() => string[]` | +| **Signature** | `platforms() => string[]` | ### `ready` {/* #ready */} -| | | -| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| | | +| --- | --- | | **Description** | Returns a promise when the platform is ready and native functionality can be called. If the app is running from within a web browser, then the promise will resolve when the DOM is ready. When the app is running from an application engine such as Cordova, then the promise will resolve when Cordova triggers the `deviceready` event. The resolved value is the `readySource`, which states the platform that was used.

For example, when Cordova is ready, the resolved ready source is `cordova`. The default ready source value will be `dom`. The `readySource` is useful if different logic should run depending on the platform the app is running from. For example, only Capacitor and Cordova can execute the status bar plugin, so the web should not run status bar plugin logic. | -| **Signature** | `ready() => Promise` | +| **Signature** | `ready() => Promise` | ### `isRTL` {/* #isrtl */} -| | | -| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| | | +| --- | --- | | **Description** | Returns if this app is using right-to-left language direction or not. We recommend the app's `index.html` file already has the correct `dir` attribute value set, such as `` or ``. [W3C: Structural markup and right-to-left text in HTML](http://www.w3.org/International/questions/qa-html-dir) | -| **Signature** | `isRTL() => boolean` | +| **Signature** | `isRTL() => boolean` | ### `isLandscape` {/* #islandscape */} diff --git a/docs/angular/pwa.mdx b/docs/angular/pwa.mdx index 94e8293a772..007acd39449 100644 --- a/docs/angular/pwa.mdx +++ b/docs/angular/pwa.mdx @@ -15,8 +15,7 @@ sidebar_label: Progressive Web Apps The two main requirements of a PWA are a [Service Worker](https://developers.google.com/web/fundamentals/primers/service-workers/) and a [Web Manifest](https://developers.google.com/web/fundamentals/web-app-manifest/). While it's possible to add both of these to an app manually, the Angular team has an `@angular/pwa` package that can be used to automate this. -The `@angular/pwa` package will automatically add a service worker and an app manifest to the app. -To add this package to the app, run: +The `@angular/pwa` package will automatically add a service worker and an app manifest to the app. To add this package to the app, run: ```shell ng add @angular/pwa diff --git a/docs/angular/quickstart.mdx b/docs/angular/quickstart.mdx index 46d9e8f73cc..57be3bedf34 100644 --- a/docs/angular/quickstart.mdx +++ b/docs/angular/quickstart.mdx @@ -20,8 +20,7 @@ If you're looking for a high-level overview of what Ionic Angular is and how it ## Prerequisites {/* #prerequisites */} -Before you begin, make sure you have Node.js and npm installed on your machine. -You can check by running: +Before you begin, make sure you have Node.js and npm installed on your machine. You can check by running: ```shell node -v diff --git a/docs/angular/slides.mdx b/docs/angular/slides.mdx index 92cdb76ed1b..f0999333e5f 100644 --- a/docs/angular/slides.mdx +++ b/docs/angular/slides.mdx @@ -224,11 +224,11 @@ To set these options as properties directly on `` we would do Below is a full list of property changes when going from `ion-slides` to Swiper Element: -| Name | Notes | -| ------- | --------------------------------------------------------------------------------------------------------------------------------------- | -| options | Set each option as a property directly on the `` component. | -| mode | For different styles based upon the mode, you can target the slides with `.ios swiper-container` or `.md swiper-container` in your CSS. | -| pager | Use the `pagination` property instead. | +| Name | Notes | +| --- | --- | +| options | Set each option as a property directly on the `` component. | +| mode | For different styles based upon the mode, you can target the slides with `.ios swiper-container` or `.md swiper-container` in your CSS. | +| pager | Use the `pagination` property instead. | :::note diff --git a/docs/angular/testing.mdx b/docs/angular/testing.mdx index 1ef845389ad..772638118ef 100644 --- a/docs/angular/testing.mdx +++ b/docs/angular/testing.mdx @@ -25,7 +25,9 @@ The generated `package.json` includes scripts for running them: | `npm run test:e2e` | Runs the end-to-end tests, starting the dev server for them. | :::note + Playwright downloads its browsers separately from the npm package. Run `npx playwright install` once before running the end-to-end tests for the first time. + ::: ## Testing Principles {/* #testing-principles */} @@ -404,7 +406,9 @@ export class TabsPage { ``` :::note + Ionic keeps pages in the navigation stack, and tabs that have been visited, in the DOM after navigating away from them, hiding them instead of removing them. Use `filter({ visible: true })` when the same element, such as `ion-title`, can appear on more than one page. + ::: #### Testing Scripts {/* #testing-scripts */} diff --git a/docs/api/accordion.mdx b/docs/api/accordion.mdx index 02bdc9e78db..7ab8d8928d3 100644 --- a/docs/api/accordion.mdx +++ b/docs/api/accordion.mdx @@ -179,15 +179,15 @@ import AccessibilityAnimations from '@site/static/usage/v9/accordion/accessibili When used inside an `ion-accordion-group`, `ion-accordion` has full keyboard support for interacting with the component. The following table details what each key does: -| Key | Description | -| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Space or Enter | When focus is on the accordion header, the accordion will collapse or expand depending on the state of the component. | -| Tab | Moves focus to the next focusable element. | -| Shift + Tab | Moves focus to the previous focusable element. | -| Down Arrow | - When focus is on an accordion header, moves focus to the next accordion header.
- When focus is on the last accordion header, moves focus to the first accordion header. | -| Up Arrow | - When focus is on an accordion header, moves focus to the previous accordion header.
- When focus is on the first accordion header, moves focus to the last accordion header. | -| Home | When focus is on an accordion header, moves focus to the first accordion header. | -| End | When focus is on an accordion header, moves focus to the last accordion header. | +| Key | Description | +| --- | --- | +| Space or Enter | When focus is on the accordion header, the accordion will collapse or expand depending on the state of the component. | +| Tab | Moves focus to the next focusable element. | +| Shift + Tab | Moves focus to the previous focusable element. | +| Down Arrow | - When focus is on an accordion header, moves focus to the next accordion header.
- When focus is on the last accordion header, moves focus to the first accordion header. | +| Up Arrow | - When focus is on an accordion header, moves focus to the previous accordion header.
- When focus is on the first accordion header, moves focus to the last accordion header. | +| Home | When focus is on an accordion header, moves focus to the first accordion header. | +| End | When focus is on an accordion header, moves focus to the last accordion header. | ## Performance {/* #performance */} diff --git a/docs/api/buttons.mdx b/docs/api/buttons.mdx index f3223336b38..5f9f8de81eb 100644 --- a/docs/api/buttons.mdx +++ b/docs/api/buttons.mdx @@ -33,12 +33,12 @@ import Basic from '@site/static/usage/v9/buttons/basic/index.mdx'; Buttons can be positioned inside of the toolbar using a named slot. The below chart has a description of each slot. -| Slot | Description | -| ----------- | ------------------------------------------------------------------------------------------------------- | -| `start` | Positions to the `left` of the content in LTR, and to the `right` in RTL. | -| `end` | Positions to the `right` of the content in LTR, and to the `left` in RTL. | +| Slot | Description | +| --- | --- | +| `start` | Positions to the `left` of the content in LTR, and to the `right` in RTL. | +| `end` | Positions to the `right` of the content in LTR, and to the `left` in RTL. | | `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. | +| `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/v9/buttons/placement/index.mdx'; @@ -63,6 +63,7 @@ This feature is only available for iOS. ::: {/* Reuse the playground from the Title directory */} + import CollapsibleLargeTitleButtons from '@site/static/usage/v9/title/collapsible-large-title/buttons/index.mdx'; diff --git a/docs/api/card.mdx b/docs/api/card.mdx index a1e7b6efe17..9913ba0a9ff 100644 --- a/docs/api/card.mdx +++ b/docs/api/card.mdx @@ -21,11 +21,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill'; -Cards are containers that display content such as text, images, buttons, and lists. -A card can be a single component, but is often made up of a header, title, subtitle, -and content. Cards are broken up into several components to accommodate this structure: -[card header](./card-header), [card title](./card-title), [card subtitle](./card-subtitle), -and [card content](./card-content). +Cards are containers that display content such as text, images, buttons, and lists. A card can be a single component, but is often made up of a header, title, subtitle, and content. Cards are broken up into several components to accommodate this structure: [card header](./card-header), [card title](./card-title), [card subtitle](./card-subtitle), and [card content](./card-content). ## Basic Usage {/* #basic-usage */} diff --git a/docs/api/content.mdx b/docs/api/content.mdx index 8d0360e1dd4..4169cab4db6 100644 --- a/docs/api/content.mdx +++ b/docs/api/content.mdx @@ -21,9 +21,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill'; -The content component provides an easy to use content area with some useful methods -to control the scrollable area. There should only be one content in a single -view. +The content component provides an easy to use content area with some useful methods to control the scrollable area. There should only be one content in a single view. Content, along with many other Ionic components, can be customized to modify its padding, margin, and more using the global styles provided in the [CSS Utilities](/layout/css-utilities.mdx) or by individually styling it using CSS and the available [CSS Custom Properties](#css-custom-properties). diff --git a/docs/api/datetime.mdx b/docs/api/datetime.mdx index 34bf3bee2b3..ed9d8ba4977 100644 --- a/docs/api/datetime.mdx +++ b/docs/api/datetime.mdx @@ -63,21 +63,13 @@ Datetimes present a calendar interface and time wheel, making it easy for users ## Overview {/* #overview */} -Historically, handling datetime values within JavaScript, or even within HTML -inputs, has always been a challenge. Specifically, JavaScript's `Date` object is -notoriously difficult to correctly parse apart datetime strings or to format -datetime values. Even worse is how different browsers and JavaScript versions -parse various datetime strings differently, especially per locale. +Historically, handling datetime values within JavaScript, or even within HTML inputs, has always been a challenge. Specifically, JavaScript's `Date` object is notoriously difficult to correctly parse apart datetime strings or to format datetime values. Even worse is how different browsers and JavaScript versions parse various datetime strings differently, especially per locale. -Fortunately, Ionic Framework's datetime input has been designed so developers can avoid -the common pitfalls, allowing developers to easily manipulate datetime values and give the user a simple datetime picker for a great user experience. +Fortunately, Ionic Framework's datetime input has been designed so developers can avoid the common pitfalls, allowing developers to easily manipulate datetime values and give the user a simple datetime picker for a great user experience. ### ISO 8601 Datetime Format: `YYYY-MM-DDTHH:mmZ` {/* #iso-8601-datetime-format-yyyy-mm-ddthhmmz */} -Ionic Framework uses the [ISO 8601 datetime format](https://www.w3.org/TR/NOTE-datetime) -for its value. The value is simply a string, rather than using JavaScript's -`Date` object. Using the ISO datetime format makes it easy to serialize -and parse within JSON objects and databases. +Ionic Framework uses the [ISO 8601 datetime format](https://www.w3.org/TR/NOTE-datetime) for its value. The value is simply a string, rather than using JavaScript's `Date` object. Using the ISO datetime format makes it easy to serialize and parse within JSON objects and databases. Below are some examples of ISO 8601 formats that can be used with `ion-datetime`: @@ -91,11 +83,7 @@ Below are some examples of ISO 8601 formats that can be used with `ion-datetime` | Timezone Offset | `YYYY-MM-DDTHH:mm:ssTZD` | `1994-12-15T13:47:20+05:00` | | Hour and Minute | `HH:mm` | `13:47` | -Note that the year is always four-digits, milliseconds (if it's added) is always -three-digits, and all others are always two-digits. So the number representing -January always has a leading zero, such as `01`. Additionally, the hour is -always in the 24-hour format, so `00` is `12am` on a 12-hour clock, `13` means -`1pm`, and `23` means `11pm`. +Note that the year is always four-digits, milliseconds (if it's added) is always three-digits, and all others are always two-digits. So the number representing January always has a leading zero, such as `01`. Additionally, the hour is always in the 24-hour format, so `00` is `12am` on a 12-hour clock, `13` means `1pm`, and `23` means `11pm`. :::note @@ -135,8 +123,7 @@ The following example allows minutes to be selected in increments of 15. It also ### Advanced Date Constraints {/* #advanced-date-constraints */} -With the `isDateEnabled` property, developers can customize the `ion-datetime` to disable a specific day, range of dates, weekends or any custom rule using an ISO 8601 date string. -The `isDateEnabled` property accepts a function returning a boolean, indicating if a date is enabled. The function is called for each rendered calendar day, for the previous, current and next month. Custom implementations should be optimized for performance to avoid jank. +With the `isDateEnabled` property, developers can customize the `ion-datetime` to disable a specific day, range of dates, weekends or any custom rule using an ISO 8601 date string. The `isDateEnabled` property accepts a function returning a boolean, indicating if a date is enabled. The function is called for each rendered calendar day, for the previous, current and next month. Custom implementations should be optimized for performance to avoid jank. The following example shows how to disable all weekend dates. For more advanced date manipulation, we recommend using a date utility such as `date-fns`. @@ -166,12 +153,12 @@ The time label is not automatically localized. Refer to [Time Label](#time-label There are 4 primary hour cycle types: -| Hour cycle type | Description | -| --------------- | -------------------------------------------------------------------------------------------------------------- | -| `'h12'` | Hour system using 1–12; corresponds to 'h' in patterns. The 12 hour clock, with midnight starting at 12:00 am. | -| `'h23'` | Hour system using 0–23; corresponds to 'H' in patterns. The 24 hour clock, with midnight starting at 0:00. | -| `'h11'` | Hour system using 0–11; corresponds to 'K' in patterns. The 12 hour clock, with midnight starting at 0:00 am. | -| `'h24'` | Hour system using 1–24; corresponds to 'k' in pattern. The 24 hour clock, with midnight starting at 24:00. | +| Hour cycle type | Description | +| --- | --- | +| `'h12'` | Hour system using 1–12; corresponds to 'h' in patterns. The 12 hour clock, with midnight starting at 12:00 am. | +| `'h23'` | Hour system using 0–23; corresponds to 'H' in patterns. The 24 hour clock, with midnight starting at 0:00. | +| `'h11'` | Hour system using 0–11; corresponds to 'K' in patterns. The 12 hour clock, with midnight starting at 0:00 am. | +| `'h24'` | Hour system using 1–24; corresponds to 'k' in pattern. The 24 hour clock, with midnight starting at 24:00. | :::note @@ -458,15 +445,7 @@ See https://date-fns.org/docs/format for a list of all the valid format tokens. ## Advanced Datetime Validation and Manipulation {/* #advanced-datetime-validation-and-manipulation */} -The datetime picker provides the simplicity of selecting an exact format, and -persists the datetime values as a string using the standardized [ISO 8601 -datetime format](https://www.w3.org/TR/NOTE-datetime). However, it's important -to note that `ion-datetime` does not attempt to solve all situations when -validating and manipulating datetime values. If datetime values need to be -parsed from a certain format, or manipulated (such as adding 5 days to a date, -subtracting 30 minutes, etc.), or even formatting data to a specific locale, -then we highly recommend using [date-fns](https://date-fns.org) to work with -dates in JavaScript. +The datetime picker provides the simplicity of selecting an exact format, and persists the datetime values as a string using the standardized [ISO 8601 datetime format](https://www.w3.org/TR/NOTE-datetime). However, it's important to note that `ion-datetime` does not attempt to solve all situations when validating and manipulating datetime values. If datetime values need to be parsed from a certain format, or manipulated (such as adding 5 days to a date, subtracting 30 minutes, etc.), or even formatting data to a specific locale, then we highly recommend using [date-fns](https://date-fns.org) to work with dates in JavaScript. ## Accessibility {/* #accessibility */} diff --git a/docs/api/grid.mdx b/docs/api/grid.mdx index f6a2a5b0352..e15f7bfd12b 100644 --- a/docs/api/grid.mdx +++ b/docs/api/grid.mdx @@ -25,32 +25,28 @@ The grid is a powerful mobile-first flexbox system for building custom layouts. ## Overview {/* #overview */} -- Grids act as a container for all rows and columns. Grids take up the full width of their container, - but adding the `fixed` property will set the width based on the screen size, refer to [Fixed Grid](#fixed-grid) below. +- Grids act as a container for all rows and columns. Grids take up the full width of their container, but adding the `fixed` property will set the width based on the screen size, refer to [Fixed Grid](#fixed-grid) below. - Rows are horizontal groups of columns that line the columns up properly. - Content should be placed within columns, and only columns may be immediate children of rows. -- The `size` property indicates the number of columns to use out of the default 12 per row. - So, `size="4"` can be added to a column in order to take up 1/3 of the grid, or 4 of the 12 columns. +- The `size` property indicates the number of columns to use out of the default 12 per row. So, `size="4"` can be added to a column in order to take up 1/3 of the grid, or 4 of the 12 columns. - Columns without a value for size will automatically have equal widths. For example, four columns will each automatically be 25% wide. - Column widths are set as a percentage, so they’re always fluid and sized relative to their parent element. -- There is padding between individual columns. However, the padding can be removed from the grid and - columns by adding the `ion-no-padding` class to the grid. Refer to the [CSS Utilities](../layout/css-utilities) for more styles that can be applied to the grid. +- There is padding between individual columns. However, the padding can be removed from the grid and columns by adding the `ion-no-padding` class to the grid. Refer to the [CSS Utilities](../layout/css-utilities) for more styles that can be applied to the grid. - There are five grid tiers, one for each responsive breakpoint: all breakpoints (extra small), small, medium, large, and extra large. -- Grid tiers are based on minimum widths, meaning they apply to their tier and all those larger than them - (e.g., `size-sm="4"` applies to small, medium, large, and extra large devices). +- Grid tiers are based on minimum widths, meaning they apply to their tier and all those larger than them (e.g., `size-sm="4"` applies to small, medium, large, and extra large devices). - Grids can be customized via CSS variables. Refer to [Customizing the Grid](#customizing-the-grid). ## Default Breakpoints {/* #default-breakpoints */} The default breakpoints for the grid and the corresponding properties are defined in the table below. Breakpoint values can not be customized at this time. For more information on why they can't be customized, refer to [Variables in Media Queries](../theming/advanced#variables-in-media-queries). -| Name | Value | Width Property | Offset Property | Push Property | Pull Property | Description | -| ---- | ------ | -------------- | --------------- | ------------- | ------------- | ------------------------------------ | -| xs | 0 | `size` | `offset` | `push` | `pull` | Set columns when (min-width: 0) | -| sm | 576px | `sizeSm` | `offsetSm` | `pushSm` | `pullSm` | Set columns when (min-width: 576px) | -| md | 768px | `sizeMd` | `offsetMd` | `pushMd` | `pullMd` | Set columns when (min-width: 768px) | -| lg | 992px | `sizeLg` | `offsetLg` | `pushLg` | `pullLg` | Set columns when (min-width: 992px) | -| xl | 1200px | `sizeXl` | `offsetXl` | `pushXl` | `pullXl` | Set columns when (min-width: 1200px) | +| Name | Value | Width Property | Offset Property | Push Property | Pull Property | Description | +| --- | --- | --- | --- | --- | --- | --- | +| xs | 0 | `size` | `offset` | `push` | `pull` | Set columns when (min-width: 0) | +| sm | 576px | `sizeSm` | `offsetSm` | `pushSm` | `pullSm` | Set columns when (min-width: 576px) | +| md | 768px | `sizeMd` | `offsetMd` | `pushMd` | `pullMd` | Set columns when (min-width: 768px) | +| lg | 992px | `sizeLg` | `offsetLg` | `pushLg` | `pullLg` | Set columns when (min-width: 992px) | +| xl | 1200px | `sizeXl` | `offsetXl` | `pushXl` | `pullXl` | Set columns when (min-width: 1200px) | ## Basic Usage {/* #basic-usage */} diff --git a/docs/api/input-otp.mdx b/docs/api/input-otp.mdx index 537f49b1976..80cd9dd0a6b 100644 --- a/docs/api/input-otp.mdx +++ b/docs/api/input-otp.mdx @@ -157,14 +157,14 @@ The keyboard navigation for Input OTP follows the [ARIA Authoring Practices Guid These keyboard interactions apply to all `ion-input-otp` elements when the component is not disabled. -| Key | Description | -| ------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Tab | When first tabbing into the component, focus moves to the first empty box. If all boxes are filled, focus moves to the last box. Once inside the component, tabbing moves to the next focusable element on the page. | -| Shift + Tab | When tabbing backwards into the component, focus moves to the first empty box. If all boxes are filled, focus moves to the last box. Once inside the component, shift tabbing focus moves to the previous focusable element on the page. | -| ArrowRight | Moves focus to the next input box, stopping at the first empty box. In RTL mode, moves focus back to any previous box that contains a value. | -| ArrowLeft | Moves focus back to any previous box that contains a value. In RTL mode, moves focus to the next input box, stopping at the first empty box. | -| Any character matching the `pattern` property | Fills the current box and automatically moves focus to the next empty box. If all boxes are filled, focus remains on the last box. If the current box has a value, override the value with the entered character. In RTL mode, input fills boxes from right to left. | -| Backspace | In an empty box: moves focus back one box and clears its value.
In a box with a value: clears that value.
With values in boxes to the right: shifts them all one position to the left. In RTL mode, with values in boxes to the left: shifts them all one position to the right. | +| Key | Description | +| --- | --- | +| Tab | When first tabbing into the component, focus moves to the first empty box. If all boxes are filled, focus moves to the last box. Once inside the component, tabbing moves to the next focusable element on the page. | +| Shift + Tab | When tabbing backwards into the component, focus moves to the first empty box. If all boxes are filled, focus moves to the last box. Once inside the component, shift tabbing focus moves to the previous focusable element on the page. | +| ArrowRight | Moves focus to the next input box, stopping at the first empty box. In RTL mode, moves focus back to any previous box that contains a value. | +| ArrowLeft | Moves focus back to any previous box that contains a value. In RTL mode, moves focus to the next input box, stopping at the first empty box. | +| Any character matching the `pattern` property | Fills the current box and automatically moves focus to the next empty box. If all boxes are filled, focus remains on the last box. If the current box has a value, override the value with the entered character. In RTL mode, input fills boxes from right to left. | +| Backspace | In an empty box: moves focus back one box and clears its value.
In a box with a value: clears that value.
With values in boxes to the right: shifts them all one position to the left. In RTL mode, with values in boxes to the left: shifts them all one position to the right. | | Ctrl + V
Cmd + V | Pastes content starting from the first box, regardless of which box is currently focused. All existing values are cleared before pasting. For example, if you have "1234" in all boxes and paste "56", the result will be "56" in the first two boxes with the remaining boxes empty. If the pasted content is longer than the available boxes, the extra characters are ignored. | ## Properties {/* #properties */} diff --git a/docs/api/item-options.mdx b/docs/api/item-options.mdx index 0bc7baba791..efea362064b 100644 --- a/docs/api/item-options.mdx +++ b/docs/api/item-options.mdx @@ -25,10 +25,10 @@ Refer to the [item sliding](./item-sliding) documentation for more information. ## Side Description {/* #side-description */} -| Side | Position | Swipe Direction | -| ------- | --------------------------------------------------------------- | ----------------------------------------------------------------- | +| Side | Position | Swipe Direction | +| --- | --- | --- | | `start` | To the `left` of the content in LTR, and to the `right` in RTL. | From `left` to `right` in LTR, and from `right` to `left` in RTL. | -| `end` | To the `right` of the content in LTR, and to the `left` in RTL. | From `right` to `left` in LTR, and from `left` to `right` in RTL. | +| `end` | To the `right` of the content in LTR, and to the `left` in RTL. | From `right` to `left` in LTR, and from `left` to `right` in RTL. | ## Properties {/* #properties */} diff --git a/docs/api/item.mdx b/docs/api/item.mdx index 77133929321..539aee3bd1f 100644 --- a/docs/api/item.mdx +++ b/docs/api/item.mdx @@ -465,10 +465,10 @@ An `` has the following keyboard interactions when any of these condit When an `` renders a native `