Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(mdx): use mdx exts for c-d folders #3456

Merged
merged 19 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion _templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If you need a component for multiple versions of Ionic Framework, you (currently

## Usage

Once you've generated your playground, you need to add it to the main markdown file in the docs (e.g. [docs/api/button.md](../docs/api/button.md)) by doing something similar to the following example:
Once you've generated your playground, you need to add it to the main markdown file in the docs (e.g. [docs/api/button.md](../docs/api/button.mdx)) by doing something similar to the following example:

```
## Feature
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/angular/performance.md → docs/angular/performance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ For more information on how Angular manages change propagation with `ngFor` see

## From the Community

<!-- cspell:disable -->
{/* cspell:disable */}

[High Performance Animations in Ionic](https://www.joshmorony.com/high-performance-animations-in-ionic/) - Josh Morony

Expand All @@ -66,7 +66,7 @@ For more information on how Angular manages change propagation with `ngFor` see

[Ionic Framework is Fast (But Your Code Might Not Be)](https://www.joshmorony.com/ionic-framework-is-fast-but-your-code-might-not-be/) - Josh Morony

<!-- cspell:enable -->
{/* cspell:enable */}

:::note
Do you have a guide you'd like to share? Click the _Edit this page_ button below.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/api/buttons.md → docs/api/buttons.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ This feature is only available for iOS.

:::

<!-- Reuse the playground from the Title directory -->
{/* Reuse the playground from the Title directory */}
import CollapsibleLargeTitleButtons from '@site/static/usage/v8/title/collapsible-large-title/buttons/index.md';

<CollapsibleLargeTitleButtons />
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 2 additions & 4 deletions docs/api/datetime-button.md → docs/api/datetime-button.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ import FormatOptions from '@site/static/usage/v8/datetime-button/format-options/

`ion-datetime-button` must be associated with a mounted `ion-datetime` instance. As a result, [Inline Modals](./modal#inline-modals-recommended) and [Inline Popovers](./popover#inline-popovers) with the `keepContentsMounted` property set to `true` must be used.

<!--
## Customization
{/* ## Customization

TODO

Expand All @@ -58,8 +57,7 @@ TODO

### Theming

TODO
-->
TODO */}

## Properties
<Props />
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/api/grid.md → docs/api/grid.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
<EncapsulationPill type="shadow" />


The grid is a powerful mobile-first flexbox system for building custom layouts. It is composed of three units — a grid, [row(s)](row.md) and [column(s)](col.md). Columns will expand to fill the row, and will resize to fit additional columns. It is based on a 12 column layout with different breakpoints based on the screen size. The number of columns can be customized using CSS.
The grid is a powerful mobile-first flexbox system for building custom layouts. It is composed of three units — a grid, [row(s)](row.mdx) and [column(s)](col.mdx). Columns will expand to fill the row, and will resize to fit additional columns. It is based on a 12 column layout with different breakpoints based on the screen size. The number of columns can be customized using CSS.

## Overview

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';

The `ion-infinite-scroll-content` component is the default child used by the `ion-infinite-scroll`. It displays an infinite scroll spinner that looks best based on the platform and changes the look depending on the infinite scroll's state. The default spinner can be changed and text can be added by setting the `loadingSpinner` and `loadingText` properties.

For more information as well as usage, see the [Infinite Scroll Documentation](./infinite-scroll.md#infinite-scroll-content).
For more information as well as usage, see the [Infinite Scroll Documentation](./infinite-scroll.mdx#infinite-scroll-content).

## Properties
<Props />
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/api/input.md → docs/api/input.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ The `start` and `end` slots can be used to place icons, buttons, or prefix/suffi
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.

:::note
In most cases, [Icon](./icon.md) components placed in these slots should have `aria-hidden="true"`. See the [Icon accessibility docs](https://ionicframework.com/docs/api/icon#accessibility) for more information.
In most cases, [Icon](./icon.mdx) components placed in these slots should have `aria-hidden="true"`. See the [Icon accessibility docs](https://ionicframework.com/docs/api/icon#accessibility) for more information.

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.
If slot content is meant to be interacted with, it should be wrapped in an interactive element such as a [Button](./button.mdx). This ensures that the content can be tabbed to.
:::

import StartEndSlots from '@site/static/usage/v7/input/start-end-slots/index.md';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 2 additions & 8 deletions docs/api/item.md → docs/api/item.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -178,21 +178,15 @@ import DetailArrows from '@site/static/usage/v8/item/detail-arrows/index.md';

<DetailArrows />


<!--

TODO add this functionality back as a css variable
{/* TODO add this functionality back as a css variable

This feature is not enabled by default on clickable items for the `md` mode, but it can be enabled by setting the following CSS variable:

```css
--item-detail-push-show: true;
```

See the [theming documentation](/docs/theming/css-variables) for more information.

-->

See the [theming documentation](/docs/theming/css-variables) for more information. */}

## Item Lines

Expand Down
2 changes: 1 addition & 1 deletion docs/api/label.md → docs/api/label.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';

<EncapsulationPill type="scoped" />

Label is an element used primarily to add text content to [Item](./item.md) components. Label can also be used inside of form control components such as [Input](./input.md) or [Radio](./radio.md) when specifying the visible label, but it is not required.
Label is an element used primarily to add text content to [Item](./item.mdx) components. Label can also be used inside of form control components such as [Input](./input.mdx) or [Radio](./radio.mdx) when specifying the visible label, but it is not required.

The position of the label inside of an item can be inline, fixed, stacked, or floating.

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/api/progress-bar.md → docs/api/progress-bar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import Indeterminate from '@site/static/usage/v8/progress-bar/indeterminate/inde

## Progress Bars in Toolbars

<!-- Reuse the playground from the Toolbar directory -->
{/* Reuse the playground from the Toolbar directory */}
import Toolbar from '@site/static/usage/v8/toolbar/progress-bars/index.md';

<Toolbar />
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/api/route-redirect.md → docs/api/route-redirect.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
A route redirect can only be used with an `ion-router` as a direct child of it.

:::note
Note: this component should only be used with vanilla and Stencil JavaScript projects. For Angular projects, use [`ion-router-outlet`](router-outlet.md) and the Angular router.
Note: this component should only be used with vanilla and Stencil JavaScript projects. For Angular projects, use [`ion-router-outlet`](router-outlet.mdx) and the Angular router.
:::


Expand Down
2 changes: 1 addition & 1 deletion docs/api/route.md → docs/api/route.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
The route component takes a component and renders it when the Browser URL matches the url property.

:::note
Note: this component should only be used with vanilla and Stencil JavaScript projects. For Angular projects, use [`ion-router-outlet`](router-outlet.md) and the Angular router.
Note: this component should only be used with vanilla and Stencil JavaScript projects. For Angular projects, use [`ion-router-outlet`](router-outlet.mdx) and the Angular router.
:::


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/api/searchbar.md → docs/api/searchbar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,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 -->
{/* Reuse the playground from the Toolbar directory */}
import Toolbar from '@site/static/usage/v8/toolbar/searchbars/index.md';

<Toolbar />
Expand Down
2 changes: 1 addition & 1 deletion docs/api/segment-button.md → docs/api/segment-button.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
<EncapsulationPill type="shadow" />


Segment buttons are groups of related buttons inside of a [segment](segment.md). They are displayed in a horizontal row. A segment button can be selected by default by setting the `value` of the segment to the `value` of the segment button. Only one segment button can be selected at a time.
Segment buttons are groups of related buttons inside of a [segment](segment.mdx). They are displayed in a horizontal row. A segment button can be selected by default by setting the `value` of the segment to the `value` of the segment button. Only one segment button can be selected at a time.


## Basic Usage
Expand Down
2 changes: 1 addition & 1 deletion docs/api/segment.md → docs/api/segment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import Scrollable from '@site/static/usage/v8/segment/scrollable/index.md';

## Segments in Toolbars

<!-- Reuse the playground from the Toolbar directory -->
{/* Reuse the playground from the Toolbar directory */}
import Toolbar from '@site/static/usage/v8/toolbar/segments/index.md';

<Toolbar />
Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions docs/api/select.md → docs/api/select.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ import MultipleSelectionExample from '@site/static/usage/v8/select/basic/multipl

## Interfaces

By default, select uses [ion-alert](alert.md) to open up the overlay of options in an alert. The interface can be changed to use [ion-action-sheet](action-sheet.md) or [ion-popover](popover.md) by passing `action-sheet` or `popover`, respectively, to the `interface` property. Read on to the other sections for the limitations of the different interfaces.
By default, select uses [ion-alert](alert.mdx) to open up the overlay of options in an alert. The interface can be changed to use [ion-action-sheet](action-sheet.mdx) or [ion-popover](popover.mdx) by passing `action-sheet` or `popover`, respectively, to the `interface` property. Read on to the other sections for the limitations of the different interfaces.

### Alert

Expand Down Expand Up @@ -165,7 +165,7 @@ import ButtonTextExample from '@site/static/usage/v8/select/customization/button

Since select uses the alert, action sheet and popover interfaces, options can be passed to these components through the `interfaceOptions` property. This can be used to pass a custom header, subheader, css class, and more.

See the [ion-alert docs](alert.md), [ion-action-sheet docs](action-sheet.md), and [ion-popover docs](popover.md) for the properties that each interface accepts.
See the [ion-alert docs](alert.mdx), [ion-action-sheet docs](action-sheet.mdx), and [ion-popover docs](popover.mdx) for the properties that each interface accepts.

Note: `interfaceOptions` will not override `inputs` or `buttons` with the `alert` interface.

Expand All @@ -178,9 +178,9 @@ import InterfaceOptionsExample from '@site/static/usage/v8/select/customization/
The `start` and `end` slots can be used to place icons, buttons, or prefix/suffix text on either side of the select. If the slot content is clicked, the select will not open.

:::note
In most cases, [Icon](./icon.md) components placed in these slots should have `aria-hidden="true"`. See the [Icon accessibility docs](https://ionicframework.com/docs/api/icon#accessibility) for more information.
In most cases, [Icon](./icon.mdx) components placed in these slots should have `aria-hidden="true"`. See the [Icon accessibility docs](https://ionicframework.com/docs/api/icon#accessibility) for more information.

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.
If slot content is meant to be interacted with, it should be wrapped in an interactive element such as a [Button](./button.mdx). This ensures that the content can be tabbed to.
:::

import StartEndSlots from '@site/static/usage/v7/select/start-end-slots/index.md';
Expand All @@ -205,11 +205,11 @@ import StylingSelectExample from '@site/static/usage/v8/select/customization/sty

Customizing the interface dialog should be done by following the Customization section in that interface's documentation:

- [Alert Customization](alert.md#customization)
- [Action Sheet Customization](action-sheet.md#customization)
- [Popover Customization](popover.md#customization)
- [Alert Customization](alert.mdx#customization)
- [Action Sheet Customization](action-sheet.mdx#customization)
- [Popover Customization](popover.mdx#customization)

However, the Select Option does set a class for easier styling and allows for the ability to pass a class to the overlay option, see the [Select Options documentation](select-option.md) for usage examples of customizing options.
However, the Select Option does set a class for easier styling and allows for the ability to pass a class to the overlay option, see the [Select Options documentation](select-option.mdx) for usage examples of customizing options.

### Custom Toggle Icons

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/api/tab-bar.md → docs/api/tab-bar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
<EncapsulationPill type="shadow" />


The tab bar is a UI component that contains a set of [tab buttons](tab-button.md). A tab bar must be provided inside of [tabs](tabs.md) to communicate with each [tab](tab.md).
The tab bar is a UI component that contains a set of [tab buttons](tab-button.mdx). A tab bar must be provided inside of [tabs](tabs.mdx) to communicate with each [tab](tab.mdx).



Expand Down
4 changes: 2 additions & 2 deletions docs/api/tab-button.md → docs/api/tab-button.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
<EncapsulationPill type="shadow" />


A tab button is a UI component that is placed inside of a [tab bar](tab-bar.md). The tab button can specify the layout of the icon and label and connect to a [tab view](tab.md).
A tab button is a UI component that is placed inside of a [tab bar](tab-bar.mdx). The tab button can specify the layout of the icon and label and connect to a [tab view](tab.mdx).

See the [tabs documentation](tabs.md) for more details on configuring tabs.
See the [tabs documentation](tabs.mdx) for more details on configuring tabs.



Expand Down
4 changes: 2 additions & 2 deletions docs/api/tab.md → docs/api/tab.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
<EncapsulationPill type="shadow" />


The tab component is a child component of [tabs](tabs.md). Each tab can contain a top level navigation stack for an app or a single view. An app can have many tabs, all with their own independent navigation.
The tab component is a child component of [tabs](tabs.mdx). Each tab can contain a top level navigation stack for an app or a single view. An app can have many tabs, all with their own independent navigation.

:::note
Note: This component should only be used with vanilla JavaScript projects. For Angular, React, and Vue apps you do not need to use `ion-tab` to declare your tab components.
:::


See the [tabs documentation](tabs.md) for more details on configuring tabs.
See the [tabs documentation](tabs.mdx) for more details on configuring tabs.



Expand Down
2 changes: 1 addition & 1 deletion docs/api/tabs.md → docs/api/tabs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
<EncapsulationPill type="shadow" />

Tabs are a top level navigation component to implement a tab-based navigation.
The component is a container of individual [Tab](tab.md) components.
The component is a container of individual [Tab](tab.mdx) components.

The `ion-tabs` component does not have any styling and works as a router outlet in order to handle navigation. It does not provide any UI feedback or mechanism to switch between tabs. In order to do so, an `ion-tab-bar` should be provided as a direct child of `ion-tabs`.

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/api/textarea.md → docs/api/textarea.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ The `start` and `end` slots can be used to place icons, buttons, or prefix/suffi
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.

:::note
In most cases, [Icon](./icon.md) components placed in these slots should have `aria-hidden="true"`. See the [Icon accessibility docs](https://ionicframework.com/docs/api/icon#accessibility) for more information.
In most cases, [Icon](./icon.mdx) components placed in these slots should have `aria-hidden="true"`. See the [Icon accessibility docs](https://ionicframework.com/docs/api/icon#accessibility) for more information.

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.
If slot content is meant to be interacted with, it should be wrapped in an interactive element such as a [Button](./button.mdx). This ensures that the content can be tabbed to.
:::

import StartEndSlots from '@site/static/usage/v7/textarea/start-end-slots/index.md';
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/api/title.md → docs/api/title.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import CollapsibleLargeTitle from '@site/static/usage/v8/title/collapsible-large

### Collapsible Buttons

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.
The [buttons](./buttons.mdx) component can be used with the [`collapse`](./buttons.mdx#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';
Expand Down
4 changes: 2 additions & 2 deletions docs/api/toast.md → docs/api/toast.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Toasts can be positioned at the top, bottom or middle of the viewport. The posit

### Relative Positioning

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.
If a toast is presented alongside navigation elements such as a header, footer, or [FAB](./fab.mdx), 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';

Expand All @@ -90,7 +90,7 @@ import StackedPlayground from '@site/static/usage/v8/toast/layout/index.md';

## Icons

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.
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.mdx) instead.

import IconPlayground from '@site/static/usage/v8/toast/icon/index.md';

Expand Down
File renamed without changes.
File renamed without changes.
Loading