diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f893380efb0..fe7788994ab 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,9 +11,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -env: - NODE_VERSION: 24 - jobs: # Needs no dependencies, so it reports in seconds rather than queueing behind # npm ci and lint. @@ -38,7 +35,7 @@ jobs: - name: ⚙️ Use Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: ${{ env.NODE_VERSION }} + node-version-file: .nvmrc cache: npm - name: 🕸️ Install Dependencies run: npm ci @@ -91,7 +88,7 @@ jobs: - name: ⚙️ Use Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: ${{ env.NODE_VERSION }} + node-version-file: .nvmrc cache: npm - name: 🕸️ Install Dependencies run: npm ci diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000000..a45fd52cc58 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +24 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/.remarkrc.mjs b/.remarkrc.mjs new file mode 100644 index 00000000000..cd939f2f88a --- /dev/null +++ b/.remarkrc.mjs @@ -0,0 +1,147 @@ +/** + * Remark plugins that `npm run lint` runs on docs pages through the + * `mdx/remark` rule in `eslint.config.mjs`. + */ + +import path from 'node:path'; + +import remarkFrontmatter from 'remark-frontmatter'; + +// Schemes such as https: and mailto:, in-page anchors, and protocol-relative URLs. +const NOT_A_PAGE_LINK = /^([a-z][a-z\d+.-]*:|#|\/\/)/i; + +// A page on this site by its full URL. A versioned URL such as `/docs/v3/` or +// `/docs/v8/` opens that version rather than the current one, so it is allowed. +const DOCS_SITE_URL = /^https?:\/\/(www\.)?ionicframework\.com\/docs(?!\/v\d+(\/|$|[?#]))(\/|$|[?#])/i; + +const pathOf = (url) => url.split(/[?#]/)[0]; + +/** + * A Markdown link to a doc must be its relative file path with the extension, + * such as `./accordion.mdx`. Docusaurus resolves it to the page in the same + * version and fails the build if the file is missing, and editors can follow + * it. Without the extension it is a URL that Docusaurus cannot map to a file, + * and a leading `/` is read from the repo root by editors and GitHub. A full + * `ionicframework.com/docs` URL always opens the current version, so a reader + * on an older version lands on the wrong page. + * + * A JSX `href` or `to` never goes through that resolver, so it must be an + * absolute URL path without the extension, such as `/api/accordion`. A relative + * one resolves against the page's URL instead, and on an older version's page + * one without the version prefix, such as `/v8/`, leads to the current docs. + */ +const checkMarkdownLink = (url) => { + if (DOCS_SITE_URL.test(url) && !/\.[a-z\d]+$/i.test(pathOf(url).replace(/\/$/, ''))) { + return `Link to \`${url}\` by the doc's relative file path, such as \`../api/modal.mdx\`. A full URL always opens the current version.`; + } + if (url === '' || NOT_A_PAGE_LINK.test(url)) return null; + const path = pathOf(url); + if (/\.mdx?$/.test(path)) { + return path.startsWith('/') + ? `Link to \`${url}\` by its relative file path, such as \`./accordion.mdx\`. Editors and GitHub read a leading \`/\` from the repo root.` + : null; + } + // Another extension is a static file, such as an image or a download. + if (/\.[a-z\d]+$/i.test(path)) return null; + return `\`${url}\` is a URL, not a file. Link to the doc's relative file path with its extension, such as \`./accordion.mdx\`, so the build checks the page exists in this version.`; +}; + +// `version` is the older version a page belongs to, such as `v8`, or undefined +// for the current docs. +const checkJsxLink = (url, version) => { + if (url === '' || NOT_A_PAGE_LINK.test(url)) return null; + const path = pathOf(url); + const example = version ? `/${version}/api/accordion` : '/api/accordion'; + if (/\.mdx?$/.test(path)) { + return `A JSX link is a URL, not a file. Drop the extension from \`${url}\`, such as \`${example}\`.`; + } + if (!path.startsWith('/')) { + return `Make \`${url}\` an absolute URL path, such as \`${example}\`. A relative link resolves against the page's URL.`; + } + if (version && !new RegExp(`^/${version}(/|$)`).test(path)) { + return `Start \`${url}\` with \`/${version}/\`, such as \`${example}\`. Without it, the link leads to the current docs.`; + } + return null; +}; + +// Matches both separators, since the lint also runs on Windows. +const versionOf = (filePath) => filePath.match(/[\\/]versioned_docs[\\/]version-([^\\/]+)[\\/]/)?.[1]; + +function docLinks() { + return (tree, file) => { + const report = (reason, node) => { + const message = file.message(reason, node); + message.source = 'ionic-docs'; + message.ruleId = 'doc-links'; + }; + const version = versionOf(file.path); + const visit = (node) => { + if (node.type === 'link' || node.type === 'definition') { + const reason = checkMarkdownLink(node.url); + if (reason) report(reason, node); + } else if (node.type === 'mdxJsxFlowElement' || node.type === 'mdxJsxTextElement') { + for (const attribute of node.attributes) { + if (!['href', 'to'].includes(attribute.name) || typeof attribute.value !== 'string') continue; + const reason = checkJsxLink(attribute.value, version); + if (reason) report(reason, node); + } + } + node.children?.forEach(visit); + }; + visit(tree); + }; +} + +/** + * Every page needs a `description` in its frontmatter. Docusaurus uses it for + * the meta description, link previews, and llms.txt. Without it, Docusaurus + * builds one from the opening text of the page, which can pick up an import, a + * heading id comment, or the first line of a code sample. + * + * A `` in `` only sets the meta tag, so it does + * not count. Docusaurus skips files and folders starting with `_`, so those + * partials are not pages and need no description. + */ +function pageDescription() { + return (tree, file) => { + const report = (reason, place) => { + const message = file.message(reason, place); + message.source = 'ionic-docs'; + message.ruleId = 'page-description'; + }; + // Only the path inside the repo counts, so a checkout under a `_` folder, + // such as a self-hosted runner's `_work/`, is still checked. + const repoPath = file.path ? path.relative(file.cwd, file.path) : ''; + if (repoPath.split(/[\\/]/).some((segment) => segment.startsWith('_'))) return; + + const frontmatter = tree.children[0]?.type === 'yaml' ? tree.children[0].value : ''; + // An empty quoted string, such as `description: ''`, is no description. + if (!/^description:[ \t]*(?!(['"])\1[ \t]*$)\S/m.test(frontmatter)) { + report( + 'Add a `description` to the frontmatter. Without it, Docusaurus builds one from the opening text of the page.', + { line: 1, column: 1 } + ); + } + + for (const node of tree.children) { + // Also matches `` from `@docusaurus/Head`. + if (node.type !== 'mdxJsxFlowElement' || node.name?.toLowerCase() !== 'head') continue; + for (const child of node.children) { + const isDescription = child.name === 'meta' && child.attributes?.some((a) => a.name === 'name' && a.value === 'description'); + if (isDescription) { + report( + 'Move this description to the frontmatter `description`. Docusaurus does not read it from ``, so link previews and llms.txt use the opening text of the page instead.', + child + ); + } + } + } + }; +} + +export default { + // remark-frontmatter parses the frontmatter as YAML, as Docusaurus does. + // Without it, the lint reads it as Markdown, and a `<` in a description + // becomes an unclosed JSX tag. + plugins: [remarkFrontmatter, docLinks, pageDescription], +}; diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a009111539f..79b826a483f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -177,8 +177,8 @@ Ionic's documentation is built using [Docusaurus](https://docusaurus.io/). The c - `components/` - components used across the site - `global/` - components used globally - `page/` - components used on a single page or in a limited scope - - `styles/` - global styles and variables - - `components/` - styles split out into the components they target + - `css/` - global styles, refer to its [README](src/css/README.md) + - `theme/` - overrides for the markup Docusaurus's theme renders - `theme/` - Docusaurus theme components that have been swizzled - `static/` - `code/` - StackBlitz project templates used by the playgrounds @@ -200,6 +200,10 @@ The content of the Ionic docs is written as [Markdown](https://commonmark.org/) `/docs` maps to `docs/index.mdx` through `slug: /` in its frontmatter. Older versions live in `versioned_docs/` and are served under their version, such as `/docs/v8/`. +Every page needs a `description` in its frontmatter. Docusaurus uses it for the meta description, link previews, and llms.txt, and `npm run lint` flags a page without one. Files and folders whose names start with `_` are not pages, so use that prefix for a file that other pages only import, such as `developing/config/_global.mdx`. + +The frontmatter `title` names the page everywhere: its heading, the sidebar, cards, and link previews. To show a longer title only in search results and the browser tab, put it in ``, such as `ion-button: Style Buttons with Custom CSS Properties`. A description in `` has no such use, since Docusaurus only reads it from the frontmatter. + Versions listed in [`versions.json`](versions.json) are actively maintained. If your change also applies to one of them, make the same change in its `versioned_docs/version-/` folder. Versions listed in [`versionsArchived.json`](versionsArchived.json) are frozen deployments that are no longer built, so changes to their folders never reach the site. Markdown links resolve within their own version, but JSX paths such as `` and `useBaseUrl` do not. In an older version, prefix them with the version, such as ``. @@ -218,6 +222,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: @@ -225,6 +231,8 @@ Use Markdown for links and headings whenever possible. When you need JSX, such a - [``](https://docusaurus.io/docs/docusaurus-core#link) from `@docusaurus/Link` instead of ``. It handles the base URL and locale, and opens external URLs in a new tab with `rel="noopener noreferrer"`. - [``](https://docusaurus.io/docs/api/misc/@docusaurus/eslint-plugin/prefer-docusaurus-heading) from `@theme/Heading` instead of `

` to `

`. +Link to another doc by its relative file path, with the extension, such as `[Accordion](./accordion.mdx)` or `[Config](../developing/config.mdx)`. Docusaurus resolves it to the page in the same version, the build fails if the file doesn't exist, and editors can follow it to the file. A JSX prop such as `href` skips that step, so use the URL path without `/docs` or an extension instead: `/api/accordion`, or `/v8/api/accordion` on a v8 page. In either form, don't link to a doc by its full `ionicframework.com/docs` URL, which always opens the current version. `npm run lint` flags a link that doesn't follow this, though it only catches a full URL in a Markdown link. + The build only checks links and anchors that go through Markdown or these components. A raw `` to a page that doesn't exist builds without errors, and a raw heading's `id` can't be used as a link target. Markup inside code samples is exempt, since it's example code rather than part of the page. CI fails on a raw `` or heading anywhere else. To check before pushing, run: diff --git a/_templates/playground/new/vue.md.ejs.t b/_templates/playground/new/vue.md.ejs.t index 5867eb38b95..312faaf6088 100644 --- a/_templates/playground/new/vue.md.ejs.t +++ b/_templates/playground/new/vue.md.ejs.t @@ -8,14 +8,14 @@ to: "<%= `static/usage/v${version}/${name}/${path}/vue.md` %>" <% if (css){ -%> <% } -%> ``` diff --git a/docs/angular/add-to-existing.mdx b/docs/angular/add-to-existing.mdx index 2ef3d723578..5cd84231b1b 100644 --- a/docs/angular/add-to-existing.mdx +++ b/docs/angular/add-to-existing.mdx @@ -1,5 +1,6 @@ --- title: Add to Existing Angular Project +description: 'Learn how to add Ionic Angular to your existing Angular project. Step-by-step guide for integrating Ionic components and features into an existing Angular application.' sidebar_label: Add to Existing --- @@ -8,13 +9,9 @@ import DocsCards from '@components/global/DocsCards'; Add Ionic Angular to Existing Project: Integration Guide - -This guide covers how to add Ionic Angular to an existing Angular project. If you're looking to start a new project from scratch, check out the [Ionic Angular Quickstart](/angular/quickstart.mdx) guide. For an overview of how Ionic Angular works with Angular, including version support and tooling, check out the [Ionic Angular Overview](/angular/overview.mdx). +This guide covers how to add Ionic Angular to an existing Angular project. If you're looking to start a new project from scratch, check out the [Ionic Angular Quickstart](./quickstart.mdx) guide. For an overview of how Ionic Angular works with Angular, including version support and tooling, check out the [Ionic Angular Overview](./overview.mdx). :::tip @@ -76,7 +73,7 @@ Replace the existing `styles` array in `angular.json` with the following: :::info -While `core.css` is required, `normalize.css`, `structure.css`, and `typography.css` are recommended but not required. They normalize cross-browser differences, ensure proper scrolling behavior, and provide consistent typography and form styling. Without them, you may need to handle these concerns yourself. For more details, refer to [Global Stylesheets](/layout/global-stylesheets.mdx). +While `core.css` is required, `normalize.css`, `structure.css`, and `typography.css` are recommended but not required. They normalize cross-browser differences, ensure proper scrolling behavior, and provide consistent typography and form styling. Without them, you may need to handle these concerns yourself. For more details, refer to [Global Stylesheets](../layout/global-stylesheets.mdx). ::: @@ -96,7 +93,7 @@ export const appConfig: ApplicationConfig = { }; ``` -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](/angular/zoneless.mdx) for details. +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](./zoneless.mdx) for details. ## Using Individual Components {/* #using-individual-components */} @@ -123,7 +120,7 @@ import { IonButton, IonDatetime } from '@ionic/angular'; export class App {} ``` -Visit the [components](/components.mdx) page for all of the available Ionic components. +Visit the [components](../components.mdx) page for all of the available Ionic components. ## Using Ionic Pages {/* #using-ionic-pages */} @@ -172,7 +169,7 @@ Replace the existing `styles` array in `angular.json` with the following: ] ``` -These stylesheets set up the overall page structure and provide [CSS utilities](/layout/css-utilities.mdx) for faster development. Some stylesheets are optional. For details on which stylesheets are required, check out [Global Stylesheets](/layout/global-stylesheets.mdx). +These stylesheets set up the overall page structure and provide [CSS utilities](../layout/css-utilities.mdx) for faster development. Some stylesheets are optional. For details on which stylesheets are required, check out [Global Stylesheets](../layout/global-stylesheets.mdx). #### 2. Set up Theming {/* #2-set-up-theming */} @@ -191,7 +188,7 @@ Create a `src/theme/variables.css` file with the following content: @import '@ionic/angular/css/palettes/dark.system.css'; ``` -This file enables [dark mode support](/theming/dark-mode.mdx) for your Ionic app when the system is set to prefer a dark appearance. You can customize the theming behavior by uncommenting different dark palette imports or adding custom CSS variables. +This file enables [dark mode support](../theming/dark-mode.mdx) for your Ionic app when the system is set to prefer a dark appearance. You can customize the theming behavior by uncommenting different dark palette imports or adding custom CSS variables. #### 3. Update the App Component {/* #3-update-the-app-component */} @@ -322,7 +319,7 @@ Now that you have Ionic Angular integrated into your project, check out: - +

Discover how to handle routing and navigation in Ionic Angular apps using the Angular Router.

diff --git a/docs/angular/build-options.mdx b/docs/angular/build-options.mdx index 243efaaf45a..0eae09cec7c 100644 --- a/docs/angular/build-options.mdx +++ b/docs/angular/build-options.mdx @@ -1,3 +1,7 @@ +--- +description: 'Choose between standalone components and NgModules when using Ionic in an Angular app, with the benefits and downsides of each approach.' +--- + import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; @@ -10,7 +14,9 @@ The Standalone approach uses modern Angular APIs and is the recommended way to b ## Standalone {/* #standalone */} :::info + Ionic UI components as Angular standalone components is supported starting in Ionic v7.5. + ::: ### Overview {/* #overview */} @@ -30,18 +36,22 @@ Ionic のスタンドアロンコンポーネントを利用するために、Io 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 {/* #usage-with-standalone-based-applications */} :::warning + 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** -Ionic Angular needs to be configured when the Angular application calls `bootstrapApplication` using the `provideIonicAngular` function. Developers can pass any [IonicConfig](../developing/config#ionicconfig) values as an object in this function. Note that `provideIonicAngular` needs to be called even if no custom config is passed. +Ionic Angular needs to be configured when the Angular application calls `bootstrapApplication` using the `provideIonicAngular` function. Developers can pass any [IonicConfig](../developing/config.mdx#ionicconfig) values as an object in this function. Note that `provideIonicAngular` needs to be called even if no custom config is passed. ```typescript title="main.ts" import { enableProdMode, importProvidersFrom } from '@angular/core'; @@ -203,12 +213,14 @@ Ionic Angular's standalone components use ES Modules. As a result, developers us ### Usage with NgModule-based Applications {/* #usage-with-ngmodule-based-applications */} :::warning + 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** -Ionic Angular needs to be configured in the `providers` array of `app.module.ts` using the `provideIonicAngular` function. Developers can pass any [IonicConfig](../developing/config#ionicconfig) values as an object in this function. Note that `provideIonicAngular` needs to be called even if no custom config is passed. +Ionic Angular needs to be configured in the `providers` array of `app.module.ts` using the `provideIonicAngular` function. Developers can pass any [IonicConfig](../developing/config.mdx#ionicconfig) values as an object in this function. Note that `provideIonicAngular` needs to be called even if no custom config is passed. ```typescript title="app.module.ts" import { NgModule } from '@angular/core'; @@ -366,7 +378,9 @@ Ionic Angular's standalone components use ES Modules. As a result, developers us ## Modules {/* #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 {/* #overview-1 */} @@ -405,9 +419,11 @@ export class AppModule {} ## Migrating from Modules to Standalone {/* #migrating-from-modules-to-standalone */} :::tip + Try our automated utility for migrating to standalone! 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. diff --git a/docs/angular/injection-tokens.mdx b/docs/angular/injection-tokens.mdx index 653f5bcadf7..5e2c909d405 100644 --- a/docs/angular/injection-tokens.mdx +++ b/docs/angular/injection-tokens.mdx @@ -1,14 +1,11 @@ --- title: Angular Injection Tokens +description: "Learn how to use Ionic's Angular injection tokens to access Ionic elements through Angular's dependency injection system for more streamlined component interactions." sidebar_label: Injection Tokens --- Angular Injection Tokens | Access Ionic Elements via Dependency Injection - Ionic provides Angular injection tokens that allow you to access Ionic elements through Angular's dependency injection system. This provides a more Angular-idiomatic way to interact with Ionic components programmatically. diff --git a/docs/angular/lifecycle.mdx b/docs/angular/lifecycle.mdx index 634d820ce20..ac6a53344da 100644 --- a/docs/angular/lifecycle.mdx +++ b/docs/angular/lifecycle.mdx @@ -1,14 +1,11 @@ --- title: Ionic PageのLife Cycle +description: 'This guide covers how the page life cycle works in an Ionic app built with Angular. Learn how Ionic embraces life cycle events provided by Angular components.' sidebar_label: ライフサイクル --- AngularのページコンポーネントのLife Cycle - すべてのイベントのドキュメンテーション - このガイドでは、Ionic と Angular を使用して構築されたアプリでの Page Life Cycle のしくみについて説明します。(追記:Life Cycle とは、表示をはじめてから破棄するまでを指します。この間の特定のタイミングに設定されているイベントを Life Cycle Events といいます) @@ -19,10 +16,10 @@ sidebar_label: ライフサイクル Ionic は Angular が提供するライフサイクルイベントを取り入れています。最もよく使う 2 つの Angular イベントは次のとおりです。 -| イベント名 | 説明 | -| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ngOnInit` | コンポーネントの初期化中に発生します。このイベントを使用して、ローカルメンバーを初期化し、一度だけ実行する必要がある Service を呼び出すことができます。 | -| `ngOnDestroy` | Angular がビューを破棄する直前に発生します。 observables の unsubscribe などのクリーンアップに役立ちます。 | +| イベント名 | 説明 | +| --- | --- | +| `ngOnInit` | コンポーネントの初期化中に発生します。このイベントを使用して、ローカルメンバーを初期化し、一度だけ実行する必要がある Service を呼び出すことができます。 | +| `ngOnDestroy` | Angular がビューを破棄する直前に発生します。 observables の unsubscribe などのクリーンアップに役立ちます。 | Angular のコンポーネントライフサイクルイベントの詳細については、[コンポーネントライフサイクルのドキュメント](https://angular.jp/guide/lifecycle-hooks)をご覧ください。 @@ -32,7 +29,7 @@ If your pages keep state in plain fields rather than signals, the component host On **Angular 18 through 21** this only affects you if you set `OnPush` on those components yourself, because a component that does not declare a strategy is eager. -**Angular 22** makes `OnPush` the default for components that do not declare one, so refer to [Change detection on Angular 22](/angular/zoneless.mdx#change-detection-on-angular-22) for what your app shell has to declare. +**Angular 22** makes `OnPush` the default for components that do not declare one, so refer to [Change detection on Angular 22](./zoneless.mdx#change-detection-on-angular-22) for what your app shell has to declare. ::: diff --git a/docs/angular/navigation.mdx b/docs/angular/navigation.mdx index 607dae3cd13..119f18d930e 100644 --- a/docs/angular/navigation.mdx +++ b/docs/angular/navigation.mdx @@ -1,5 +1,6 @@ --- title: Angular ナビゲーション +description: 'この Angular ナビゲーションガイドでは、Ionic と Angular で構築したアプリのルーティングの仕組み、基本的なルーティング、リダイレクトについて説明します。' sidebar_label: ナビゲーション/ルーティング --- @@ -7,10 +8,6 @@ import useBaseUrl from '@docusaurus/useBaseUrl'; Angular ナビゲーション: Angular アプリのルーティングとリダイレクト - このガイドでは、Ionic と Angular を使用して構築されたアプリでのルーティングのしくみについて説明します。 @@ -168,7 +165,9 @@ import { LoginComponent } from './login.component'; ``` :::note + 一部のコードを省略して紹介しています + ::: ここでは、`RouterModule` のインポートとともに、典型的な `Angular Module` の設定がありますが、`RouterModule` では `forChild` によってコンポーネントを使用することを宣言しています。この設定では、ビルドを実行するときに、`App Component`(Root)、 `login Component` 、および `detail Component` において別々のチャンクを作成します。 @@ -194,7 +193,9 @@ export class AppRoutingModule {} ``` :::tip + If you are using `routerLink`, `routerDirection`, or `routerAction` be sure to also import the `IonRouterLink` directive for Ionic components or the `IonRouterLinkWithHref` directive for `
` elements. An example of this is available in the [Ionic Angular Build Options docs](./build-options.mdx#migrating-from-modules-to-standalone). + ::: To get started with standalone components [visit Angular's official docs](https://angular.io/guide/standalone-components). diff --git a/docs/angular/overlays.mdx b/docs/angular/overlays.mdx index f54ca939391..cd38fc5b976 100644 --- a/docs/angular/overlays.mdx +++ b/docs/angular/overlays.mdx @@ -1,14 +1,11 @@ --- title: Overlay Components +description: 'Learn how to use overlay components like modals and popovers in Ionic Angular, including passing custom injectors for dependency injection.' sidebar_label: Overlays --- Angular Overlay Components: Modals, Popovers with Custom Injectors - Ionic provides overlay components such as modals and popovers that display content on top of your application. In Angular, these overlays can be created using controllers like `ModalController` and `PopoverController`. @@ -216,10 +213,10 @@ import type { ModalOptions, PopoverOptions } from '@ionic/angular'; 完全なドキュメントと使用例については、Ionic の各オーバーレイのドキュメントページを参照してください: -- [Action Sheet](https://ionicframework.com/docs/api/action-sheet) -- [Alert](https://ionicframework.com/docs/api/alert) -- [Loading](https://ionicframework.com/docs/api/loading) -- [Modal](https://ionicframework.com/docs/api/modal) -- [Picker](https://ionicframework.com/docs/api/picker) -- [Popover](https://ionicframework.com/docs/api/popover) -- [Toast](https://ionicframework.com/docs/api/toast) +- [Action Sheet](../api/action-sheet.mdx) +- [Alert](../api/alert.mdx) +- [Loading](../api/loading.mdx) +- [Modal](../api/modal.mdx) +- [Picker](../api/picker.mdx) +- [Popover](../api/popover.mdx) +- [Toast](../api/toast.mdx) diff --git a/docs/angular/overview.mdx b/docs/angular/overview.mdx index 13a1e2cf6ce..301f3a637fb 100644 --- a/docs/angular/overview.mdx +++ b/docs/angular/overview.mdx @@ -1,14 +1,11 @@ --- title: Ionic Angular の概要 +description: '@ionic/angular combines the Ionic experience with the tooling and APIs tailored to Angular Developers. Learn more about version support in our Angular Overview.' sidebar_label: 概要 --- Ionic Angular Overview | Angular Version Support and Tooling - import DocsCard from '@components/global/DocsCard'; @@ -18,7 +15,7 @@ import DocsCards from '@components/global/DocsCards'; ## Angular バージョンサポート {/* #angular-version-support */} -Ionic Angular v9 は Angular バージョン 18 から 22 をサポートしています。サポートされているバージョンおよびサポートポリシーの詳細については、[Ionic Angular サポートポリシー](/reference/support.mdx#ionic-angular)を参照してください。 +Ionic Angular v9 は Angular バージョン 18 から 22 をサポートしています。サポートされているバージョンおよびサポートポリシーの詳細については、[Ionic Angular サポートポリシー](../reference/support.mdx#ionic-angular)を参照してください。 ## Angular Tooling {/* #angular-tooling */} @@ -44,7 +41,7 @@ $ ionic serve █ - +

Quickly set up your first Ionic Angular app and learn the basics of the framework and CLI.

@@ -52,7 +49,7 @@ $ ionic serve █

Learn more about Angular's core concepts, tools, and best practices from the official Angular documentation.

- +

Discover how to handle routing and navigation in Ionic Angular apps using the Angular Router.

diff --git a/docs/angular/performance.mdx b/docs/angular/performance.mdx index 6eae244d4c3..411809dc5e1 100644 --- a/docs/angular/performance.mdx +++ b/docs/angular/performance.mdx @@ -1,14 +1,11 @@ --- title: Angularのパフォーマンス +description: 'Learn how Angular manages change propagation using ngFor with Ionic Components. Read for more information about Angular performance on Ionic apps.' sidebar_label: パフォーマンス --- Angular Performance: Manage App Component Change with ngFor - ## \*ngFor with Ionic Components {/* #ngfor-with-ionic-components */} @@ -69,5 +66,7 @@ In this example, we have an array of objects called `items`. Each object contain {/* cspell:enable */} :::note + Do you have a guide you'd like to share? Click the _Edit this page_ button below. + ::: diff --git a/docs/angular/platform.mdx b/docs/angular/platform.mdx index 677adf8a777..c6a920fa5ad 100644 --- a/docs/angular/platform.mdx +++ b/docs/angular/platform.mdx @@ -1,5 +1,6 @@ --- title: Platform +description: 'Ionic Platform service can be used to get information about your current device. With this information you can completely customize your app to fit any device.' --- import Tabs from '@theme/Tabs'; @@ -7,10 +8,6 @@ import TabItem from '@theme/TabItem'; Platform | Ionic Platform to Customize Apps to Fit Any Device - プラットフォームサービスは、現在のデバイスに関する情報を取得するために使用できます。`platforms` メソッドを利用することでデバイスに関連付けられているすべてのプラットフォームを取得できます。例えば、アプリがタブレットから表示されているかどうか(モバイルデバイスまたはブラウザ上にある場合)、および正確なプラットフォーム(iOS、Android など)などです。右から左への言語の向きなどを使用すれば、デバイスの向きもわかります。この情報を使用して、あらゆるデバイスに合わせてアプリを完全にカスタマイズできます。 @@ -59,15 +56,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 */} @@ -93,7 +90,7 @@ export class MyPage { #### Customizing Platform Detection Functions {/* #customizing-platform-detection-functions */} -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. +The function used to detect a specific platform can be overridden by providing an alternative function in the global [Ionic config](../developing/config.mdx). Each function takes `window` as a parameter and returns a boolean. 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 f04664c1b2a..370c9349d48 100644 --- a/docs/angular/pwa.mdx +++ b/docs/angular/pwa.mdx @@ -1,22 +1,18 @@ --- title: AngularでのPWA +description: "When Making an Angular app a Progressive Web App, the two main requirements are a Service Worker and a Web Manifest. Read to learn more in Ionic's PWA tutorial." sidebar_label: Progressive Web Apps --- Make Progressive Web Apps (PWA) in Angular - Ionic Tutorial - ## Making your Angular app a PWA {/* #making-your-angular-app-a-pwa */} 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 @@ -25,11 +21,15 @@ ng add @angular/pwa Once this package has been added run `ionic build --prod` and the `www` directory will be ready to deploy as a PWA. :::note + By default, the `@angular/pwa` package comes with the Angular logo for the app icons. Be sure to update the manifest to use the correct app name and also replace the icons. + ::: :::note + Features like Service Workers and many JavaScript APIs (such as geolocation) require the app be hosted in a secure context. When deploying an app through a hosting service, be aware that HTTPS will be required to take full advantage of Service Workers. + ::: ## Service Worker configuration {/* #service-worker-configuration */} @@ -77,7 +77,9 @@ npm install -g firebase-tools ``` :::note + If it's the first time you use firebase-tools, login to your Google account with `firebase login` command. + ::: With the Firebase CLI installed, run `firebase init` within your Ionic project. The CLI prompts: @@ -91,7 +93,9 @@ Create a new Firebase project or select an existing one. **"What do you want to use as your public directory?"** Enter "www". :::note + Answering this next question will ensure that routing, hard reload, and deep linking work in the app: + ::: **Configure as a single-page app (rewrite all urls to /index.html)?"** Enter "Yes". diff --git a/docs/angular/quickstart.mdx b/docs/angular/quickstart.mdx index fdf66675f91..fe52c50c306 100644 --- a/docs/angular/quickstart.mdx +++ b/docs/angular/quickstart.mdx @@ -1,14 +1,11 @@ --- title: Ionic Angular Quickstart +description: 'Ionic Angularクイックスタートでは、Ionic固有の機能を含むAngularとIonicの基本をカバーします。Ionic CLIを使用してAngularアプリを構築する方法を学びます。' sidebar_label: Quickstart --- Ionic CLIを使用したIonic Angularクイックスタート: Angularの基本 - import DocsCard from '@components/global/DocsCard'; @@ -16,7 +13,7 @@ import DocsCards from '@components/global/DocsCards'; ようこそ!このガイドでは、Ionic Angular 開発の基本を説明します。開発環境のセットアップ、シンプルなプロジェクトの生成、プロジェクト構造の探索、Ionic コンポーネントの動作方法を学びます。最初の実際のアプリを構築する前に Ionic Angular に慣れるのに最適です。 -Ionic Angular が何であるか、そして Angular エコシステムにどのように適合するかの概要について知りたい場合は、[Ionic Angular 概要](overview)を参照してください。 +Ionic Angular が何であるか、そして Angular エコシステムにどのように適合するかの概要について知りたい場合は、[Ionic Angular 概要](./overview.mdx)を参照してください。 ## 前提条件 {/* #prerequisites */} @@ -32,7 +29,7 @@ npm -v ## Ionic CLI でプロジェクトを作成 {/* #create-a-project-with-the-ionic-cli */} -まず、最新の[Ionic CLI](../cli)をインストールします: +まず、最新の[Ionic CLI](../cli.mdx)をインストールします: ```shell npm install -g @ionic/cli @@ -72,7 +69,9 @@ Your new app's directory will look like this: ``` :::info + 以下の例のすべてのファイルパスは、プロジェクトのルートディレクトリを基準にしています。 + ::: アプリの構造を理解するために、これらのファイルを見ていきましょう。 @@ -172,15 +171,17 @@ And the template, in the `home.page.html` file, uses those components: ``` -これにより、ヘッダーとスクロール可能なコンテンツエリアを持つページが作成されます。2 つ目のヘッダーは、コンテンツの先頭にあるときに iOS デバイスで表示される[折りたたみ可能な大きなタイトル](/api/title.mdx#collapsible-large-titles)を示し、その後スクロールすると最初のヘッダーに小さいタイトルを表示するように縮小されます。 +これにより、ヘッダーとスクロール可能なコンテンツエリアを持つページが作成されます。2 つ目のヘッダーは、コンテンツの先頭にあるときに iOS デバイスで表示される[折りたたみ可能な大きなタイトル](../api/title.mdx#collapsible-large-titles)を示し、その後スクロールすると最初のヘッダーに小さいタイトルを表示するように縮小されます。 :::tip[詳細を学ぶ] -Ionic のレイアウトコンポーネントに関する詳細情報は、[Header](/api/header.mdx)、[Toolbar](/api/toolbar.mdx)、[Title](/api/title.mdx)、および[Content](/api/content.mdx)のドキュメントを参照してください。 + +Ionic のレイアウトコンポーネントに関する詳細情報は、[Header](../api/header.mdx)、[Toolbar](../api/toolbar.mdx)、[Title](../api/title.mdx)、および[Content](../api/content.mdx)のドキュメントを参照してください。 + ::: ## Ionic コンポーネントを追加 {/* #add-an-ionic-component */} -より多くの Ionic UI コンポーネントで Home ページを強化できます。たとえば、`ion-content`の最後に[Button](/api/button.mdx)を追加します: +より多くの Ionic UI コンポーネントで Home ページを強化できます。たとえば、`ion-content`の最後に[Button](../api/button.mdx)を追加します: ```html title="src/app/home/home.page.html" @@ -211,7 +212,7 @@ ionic generate page new A route will be automatically added to `app.routes.ts`. -In `new.page.html`, you can add a [Back Button](/api/back-button.mdx) to the [Toolbar](/api/toolbar.mdx): +In `new.page.html`, you can add a [Back Button](../api/back-button.mdx) to the [Toolbar](../api/toolbar.mdx): ```html title="src/app/new/new.page.html" @@ -257,7 +258,9 @@ import { RouterLink } from '@angular/router'; ``` :::info -ナビゲーションは、Angular の Router サービスを使用して行うこともできます。詳細については、[Angular ナビゲーションのドキュメント](/angular/navigation.mdx#navigating-to-different-routes)を参照してください。 + +ナビゲーションは、Angular の Router サービスを使用して行うこともできます。詳細については、[Angular ナビゲーションのドキュメント](./navigation.mdx#navigating-to-different-routes)を参照してください。 + ::: ## 新しいページにアイコンを追加 {/* #add-icons-to-the-new-page */} @@ -301,7 +304,7 @@ export class NewPage implements OnInit { または、`app.component.ts`でアイコンを登録して、アプリ全体で使用することもできます。 -詳細については、[Icon のドキュメント](/api/icon.mdx)および[Ionicons のドキュメント](https://ionic.io/ionicons/)を参照してください。 +詳細については、[Icon のドキュメント](../api/icon.mdx)および[Ionicons のドキュメント](https://ionic.io/ionicons/)を参照してください。 ## コンポーネントメソッドを呼び出す {/* #call-component-methods */} @@ -387,7 +390,7 @@ Ionic コンポーネントのメソッドを呼び出すには: 1. コンポーネントの`ViewChild`参照を作成します 2. コンポーネントインスタンスでメソッドを直接呼び出します -各コンポーネントの利用可能なメソッドは、API ドキュメントの[Methods](/api/content.mdx#methods)セクションで見つけることができます。 +各コンポーネントの利用可能なメソッドは、API ドキュメントの[Methods](../api/content.mdx#methods)セクションで見つけることができます。 ## デバイスで実行 {/* #run-on-a-device */} @@ -414,7 +417,7 @@ ionic cap open android - +

Ionic Angularとネイティブデバイス機能を使用して実際のPhoto Galleryアプリを構築します。

@@ -422,7 +425,7 @@ ionic cap open android

公式Angularドキュメントから、Angularのコアコンセプト、ツール、ベストプラクティスについて詳しく学びます。

- +

Angular Routerを使用してIonic Angularアプリでルーティングとナビゲーションを処理する方法を発見します。

diff --git a/docs/angular/slides.mdx b/docs/angular/slides.mdx index 4aac4d23da9..c6701bef595 100644 --- a/docs/angular/slides.mdx +++ b/docs/angular/slides.mdx @@ -1,5 +1,6 @@ --- title: Migrating from ion-slides to Swiper.js +description: 'Read this guide to learn how to get Swiper.js for Angular set up in your Ionic Framework application for a modern touch slider component.' --- import Tabs from '@theme/Tabs'; @@ -7,14 +8,12 @@ import TabItem from '@theme/TabItem'; Set Up Swiper.js for Angular Slides [Example] | Ionic - :::warning[`ion-slides`を探していますか?] + `ion-slides`は v6.0.0 で非推奨となり、v7.0.0 で削除されました。Swiper.js ライブラリを直接使用することをお勧めします。移行プロセスは以下に詳しく説明されています。 + ::: We recommend [Swiper.js](http://swiperjs.com/) if you need a modern touch slider component. Swiper 9 introduced [Swiper Element](https://swiperjs.com/element) as a replacement for its Angular component, so this guide will go over how to get Swiper Element set up in your Ionic Framework application. It will also go over any migration information you may need to move from `ion-slides` to Swiper Element. @@ -191,7 +190,9 @@ export class HomePage { ``` :::note + If you are using the Core version of Swiper and have installed additional modules, ensure that `IonicSlides` is the last module in the array. This will let it automatically customize the settings of modules such as Pagination, Scrollbar, Zoom, and more. + ::: ## Properties {/* #properties */} @@ -220,14 +221,16 @@ 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 + Swiper Element で利用可能なすべてのプロパティは、[Swiper API パラメータドキュメント](https://swiperjs.com/swiper-api#parameters)に記載されています。 + ::: ## Events {/* #events */} @@ -276,7 +279,9 @@ Below is a full list of event name changes when going from `ion-slides` to Swipe | `ionSlidesDidLoad` | `swiperinit` | :::note + Swiper Element で利用可能なすべてのイベントは[Swiper API イベントドキュメント](https://swiperjs.com/swiper-api#events)で確認でき、小文字で「`swiper`」という言葉を接頭辞で付けてください。 + ::: ## Methods {/* #methods */} @@ -328,7 +333,9 @@ Below is a full list of method changes when going from `ion-slides` to Swiper El | `stopAutoplay()` | Use the `autoplay` property instead. | :::note + Swiper インスタンスで利用可能なすべてのメソッドとプロパティは、[Swiper API のメソッドおよびプロパティドキュメント](https://swiperjs.com/swiper-api#methods-and-properties)で確認できます。 + ::: ## Effects {/* #effects */} @@ -340,7 +347,9 @@ Effects such as Cube or Fade can be used in Swiper Element with no additional im ``` :::note + Swiper のエフェクトについての詳細は、[Swiper API フェードエフェクトドキュメント](https://swiperjs.com/swiper-api#fade-effect)をご参照ください。 + ::: ## Wrap Up {/* #wrap-up */} diff --git a/docs/angular/storage.mdx b/docs/angular/storage.mdx index d963dc1c9ff..eea87f0d885 100644 --- a/docs/angular/storage.mdx +++ b/docs/angular/storage.mdx @@ -1,14 +1,11 @@ --- title: データストレージ +description: 'A variety of options are available for storing data within Ionic apps made using Angular. Choose the options that best fit your storage needs.' sidebar_label: ストレージ --- Angularアプリのデータストレージの選択肢 - Ionic Documentation - Ionic アプリケーション内でデータを保存するには、さまざまなオプションが利用可能です。アプリケーションのニーズに最も適したオプションを選択することが最善です。単一のアプリケーションが複数のオプションにまたがる要件を持つ場合もあります。 diff --git a/docs/angular/testing.mdx b/docs/angular/testing.mdx index 1ef845389ad..230d0c645e9 100644 --- a/docs/angular/testing.mdx +++ b/docs/angular/testing.mdx @@ -1,13 +1,10 @@ --- title: Testing +description: 'Angular apps created using Ionic are automatically set up for unit and end-to-end testing. Read to learn more about testing tools for Ionic components.' --- Angular Unit and End-to-End Testing for Ionic App Components - When an `@ionic/angular` application is generated using the Ionic CLI, it is automatically set up for unit testing and end-to-end testing of the application: @@ -25,7 +22,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 +403,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/angular/virtual-scroll.mdx b/docs/angular/virtual-scroll.mdx index a80a95438d3..a0adbd0b64a 100644 --- a/docs/angular/virtual-scroll.mdx +++ b/docs/angular/virtual-scroll.mdx @@ -1,3 +1,7 @@ +--- +description: 'ion-virtual-scroll was removed in Ionic 7. Learn how to render long lists in Angular with virtual scrolling from the @angular/cdk package.' +--- + # 仮想スクロール :::warning[`ion-virtual-scroll`をお探しですか?] diff --git a/docs/angular/your-first-app.mdx b/docs/angular/your-first-app.mdx index 93254ec7788..1b4b05d0e17 100644 --- a/docs/angular/your-first-app.mdx +++ b/docs/angular/your-first-app.mdx @@ -1,14 +1,11 @@ --- title: 'はじめてのIonicアプリ: Angular' +description: 'このAngularチュートリアルでは、現実的なアプリを段階的に作成することで、Ionicアプリ開発の基礎を学びます。Angularで最初のIonicアプリを実行する方法を学びます。' sidebar_label: はじめてのアプリ --- Angularで最初のIonicモバイルアプリを構築 | Ionic Capacitor Camera - Ionic の素晴らしいところは、1 つのコードベースで、使い慣れた Web ツールと言語を使用して任意のプラットフォーム用にビルドできることです。現実的なアプリを段階的に作成しながら、Ionic アプリ開発の基礎を学びましょう。 @@ -32,7 +29,7 @@ Ionic の素晴らしいところは、1 つのコードベースで、使い慣 - Ionic Framework の[UI コンポーネント](../components.mdx)を使用して、Web、iOS、Android で実行される 1 つの Angular ベースのコードベース。 - Ionic の公式ネイティブアプリランタイムである[Capacitor](https://capacitorjs.com)を使用して、ネイティブ iOS および Android モバイルアプリとしてデプロイ。 -- Capacitor の[Camera](/native/camera.mdx)、[Filesystem](/native/filesystem.mdx)、[Preferences](/native/preferences.mdx) API によって提供される Photo Gallery 機能。 +- Capacitor の[Camera](../native/camera.mdx)、[Filesystem](../native/filesystem.mdx)、[Preferences](../native/preferences.mdx) API によって提供される Photo Gallery 機能。 このガイドで参照されている[完全なアプリコード](https://github.com/ionic-team/tutorial-photo-gallery-angular)を GitHub で見つけてください。 @@ -51,7 +48,9 @@ Ionic の素晴らしいところは、1 つのコードベースで、使い慣 コマンドラインターミナルで以下を実行して、Ionic CLI(`ionic`)、デバイスやシミュレーター/エミュレーターでネイティブバイナリを実行するために使用される`native-run`、ネイティブアプリのアイコンとスプラッシュスクリーンを生成するために使用される`cordova-res`をインストールします: :::note + Visual Studio Code でターミナルを開くには、Terminal -> New Terminal に移動します。 + ::: ```shell @@ -59,9 +58,11 @@ npm install -g @ionic/cli native-run cordova-res ``` :::note + `-g`オプションは*グローバルにインストール*を意味します。パッケージをグローバルにインストールすると、`EACCES`権限エラーが発生する可能性があります。 npm を管理者権限なしでグローバルに操作できるように設定することを検討してください。詳細は [権限エラーの解決](../developing/tips.mdx#resolving-permission-errors) を参照してください。 + ::: ## アプリの作成 {/* #create-an-app */} @@ -94,7 +95,7 @@ npm install @capacitor/camera @capacitor/preferences @capacitor/filesystem ### PWA Elements {/* #pwa-elements */} -[Camera API](/native/camera.mdx)を含む一部の Capacitor プラグインは、Ionic の[PWA Elements ライブラリ](https://github.com/ionic-team/pwa-elements)を介して Web ベースの機能と UI を提供します。 +[Camera API](../native/camera.mdx)を含む一部の Capacitor プラグインは、Ionic の[PWA Elements ライブラリ](https://github.com/ionic-team/pwa-elements)を介して Web ベースの機能と UI を提供します。 これは別の依存関係なので、次にインストールします: diff --git a/docs/angular/your-first-app/2-taking-photos.mdx b/docs/angular/your-first-app/2-taking-photos.mdx index 64e4783b130..4ef0798c67a 100644 --- a/docs/angular/your-first-app/2-taking-photos.mdx +++ b/docs/angular/your-first-app/2-taking-photos.mdx @@ -1,17 +1,14 @@ --- title: Taking Photos with the Camera +description: "Add the ability to take photos with your device's camera using the Ionic Capacitor Camera API for mobile iOS, Android, and the web. Learn how here." sidebar_label: カメラ撮影 --- Take Photos with Camera API for iOS, Android & Web with Angular | Ionic Capacitor Camera - -Now for the fun part - adding the ability to take photos with the device’s camera using the Capacitor [Camera API](/native/camera.mdx). We’ll begin with building it for the web, then make some small tweaks to make it work on mobile (iOS and Android). +Now for the fun part - adding the ability to take photos with the device’s camera using the Capacitor [Camera API](../../native/camera.mdx). We’ll begin with building it for the web, then make some small tweaks to make it work on mobile (iOS and Android). ## Photo Service {/* #photo-service */} diff --git a/docs/angular/your-first-app/3-saving-photos.mdx b/docs/angular/your-first-app/3-saving-photos.mdx index 93d23ab29d1..6be60b43e5f 100644 --- a/docs/angular/your-first-app/3-saving-photos.mdx +++ b/docs/angular/your-first-app/3-saving-photos.mdx @@ -1,14 +1,11 @@ --- title: Saving Photos to the Filesystem +description: 'We’re now able to take multiple photos and display them in a photo gallery. Learn how to save these photos to the filesystem using the Ionic Capacitor Filesystem API.' sidebar_label: 写真の保存 --- Saving Photos to the Filesystem with Angular | Ionic Capacitor Camera - We’re now able to take multiple photos and display them in a photo gallery on the second tab of our app. These photos, however, are not currently being stored permanently, so when the app is closed, they will be deleted. @@ -87,7 +84,7 @@ export interface UserPhoto { } ``` -We'll use the Capacitor [Filesystem API](/native/filesystem.mdx) to save the photo. First, convert the photo to base64 format. +We'll use the Capacitor [Filesystem API](../../native/filesystem.mdx) to save the photo. First, convert the photo to base64 format. Then, pass the data to the Filesystem's `writeFile` method. Recall that we display photos by setting the image's source path (`src`) to the `webviewPath` property. So, set the `webviewPath` and return the new `Photo` object. diff --git a/docs/angular/your-first-app/4-loading-photos.mdx b/docs/angular/your-first-app/4-loading-photos.mdx index 89d95dfc225..90d9a2a52d6 100644 --- a/docs/angular/your-first-app/4-loading-photos.mdx +++ b/docs/angular/your-first-app/4-loading-photos.mdx @@ -1,19 +1,16 @@ --- title: Loading Photos from the Filesystem +description: 'We’ve implemented photo taking and saving to the filesystem, now learn how Ionic leverages Capacitor Preferences API for loading our photos in a key-value store.' sidebar_label: 写真の読み込み --- Loading Photos from the Filesystem with Angular | Ionic Capacitor Camera - We’ve implemented photo taking and saving to the filesystem. There’s one last piece of functionality missing: the photos are stored in the filesystem, but we need a way to save pointers to each file so that they can be displayed again in the photo gallery. -Fortunately, this is easy: we’ll leverage the Capacitor [Preferences API](/native/preferences.mdx) to store our array of Photos in a key-value store. +Fortunately, this is easy: we’ll leverage the Capacitor [Preferences API](../../native/preferences.mdx) to store our array of Photos in a key-value store. ## Preferences API {/* #preferences-api */} diff --git a/docs/angular/your-first-app/5-adding-mobile.mdx b/docs/angular/your-first-app/5-adding-mobile.mdx index 0ae243b1900..f4b3d590700 100644 --- a/docs/angular/your-first-app/5-adding-mobile.mdx +++ b/docs/angular/your-first-app/5-adding-mobile.mdx @@ -1,14 +1,11 @@ --- title: Adding Mobile +description: 'Learn how to add mobile support to your Ionic Capacitor photo gallery app, enabling it to run on iOS, Android, and the web using one codebase.' strip_number_prefixes: false --- モバイルデバイス機能の追加 with Angular | Ionic Capacitor Camera - Our photo gallery app won’t be complete until it runs on iOS, Android, and the web - all using one codebase. All it takes is some small logic changes to support mobile platforms, installing some native tooling, then running the app on a device. Let’s go! diff --git a/docs/angular/your-first-app/6-deploying-mobile.mdx b/docs/angular/your-first-app/6-deploying-mobile.mdx index 126a0ce792a..d76a6e8b702 100644 --- a/docs/angular/your-first-app/6-deploying-mobile.mdx +++ b/docs/angular/your-first-app/6-deploying-mobile.mdx @@ -1,14 +1,11 @@ --- title: Deploying to iOS and Android +description: 'Deploying to iOS and Android is easy with Capacitor setup for Ionic Framework apps. Read to learn more about deployment in our Ionic Documentation.' sidebar_label: モバイルへのデプロイ --- Adding Mobile Support with Angular | Ionic Capacitor Camera - Since we added Capacitor to our project when it was first created, there’s only a handful of steps remaining until the Photo Gallery app is on our device! @@ -47,7 +44,9 @@ ionic cap sync ## iOS Deployment {/* #ios-deployment */} :::important + To build an iOS app, you’ll need a Mac computer. + ::: Capacitor iOS apps are configured and managed through Xcode (Apple’s iOS/Mac IDE), with dependencies managed by [CocoaPods](https://cocoapods.org/). Before running this app on an iOS device, there's a couple of steps to complete. diff --git a/docs/angular/your-first-app/7-live-reload.mdx b/docs/angular/your-first-app/7-live-reload.mdx index d1eb0a8fc74..1e89bbb3a1a 100644 --- a/docs/angular/your-first-app/7-live-reload.mdx +++ b/docs/angular/your-first-app/7-live-reload.mdx @@ -1,14 +1,11 @@ --- title: アプリ開発を高速化するためのライブリロード +description: 'Use the Ionic CLI’s Live Reload functionality to boost your productivity when building Ionic apps. Learn how you can utilize rapid app development.' sidebar_label: ライブリロード --- Rapid App Development with Live Reload with Angular | Ionic Capacitor Camera - ここまでで、どこでも動作するクロスプラットフォームアプリを簡単に開発できることがわかりました。開発の速度はかなり速いですが、もっと速くできる方法があると言ったらどう思いますか? diff --git a/docs/angular/your-first-app/8-distribute.mdx b/docs/angular/your-first-app/8-distribute.mdx index 603144e8994..727653779c6 100644 --- a/docs/angular/your-first-app/8-distribute.mdx +++ b/docs/angular/your-first-app/8-distribute.mdx @@ -1,14 +1,11 @@ --- title: Build and Distribute your App +description: 'Learn how to build and deploy your Ionic app using Appflow. Discover how to create builds, push live updates, and distribute your app to users.' sidebar_label: Distribute --- Build and Deploy your App with Angular | Ionic Capacitor Camera - 最初のアプリを作成したので、皆が使えるように配布したくなるでしょう。アプリケーションのビルドとデプロイの仕組みはかなり面倒な場合があります。そこで[Appflow](https://ionic.io/docs/appflow/)の出番です。Appflow を使うと、ウェブおよびネイティブビルドの生成、ライブアプリの更新のプッシュ、アプリストアへの公開、そしてこのプロセス全体の自動化を効果的に行うことができます。[Appflow クイックスタートガイド](https://ionic.io/docs/appflow/quickstart)を参照してください。 diff --git a/docs/angular/zoneless.mdx b/docs/angular/zoneless.mdx index dfe025eadc3..9cd28939c2e 100644 --- a/docs/angular/zoneless.mdx +++ b/docs/angular/zoneless.mdx @@ -1,14 +1,11 @@ --- title: Zoneless Change Detection +description: "Run Ionic Angular apps without Zone.js. Learn the change detection contract for overlays, lifecycle hooks, and platform events when using Angular's 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. @@ -28,7 +25,7 @@ You do not need to change these. Angular schedules change detection for them in :::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. Refer to [Change detection on Angular 22](#change-detection-on-angular-22) for what this means for your app shell, and to the [OnPush Change Detection section of the Ionic 9 upgrade guide](/updating/9-0.mdx#onpush-change-detection-on-angular-22) for the migration steps. +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. Refer to [Change detection on Angular 22](#change-detection-on-angular-22) for what this means for your app shell, and to the [OnPush Change Detection section of the Ionic 9 upgrade guide](../updating/9-0.mdx#onpush-change-detection-on-angular-22) for the migration steps. ::: @@ -174,4 +171,4 @@ Hosting an `ion-nav` is fine either way, because its pages are attached as root ## Staying on Zone.js {/* #staying-on-zonejs */} -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](/updating/9-0.mdx#keeping-zonejs) for the exact configuration. +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](../updating/9-0.mdx#keeping-zonejs) for the exact configuration. diff --git a/docs/api.mdx b/docs/api.mdx index f53fe84a7cb..c2820bdbd55 100644 --- a/docs/api.mdx +++ b/docs/api.mdx @@ -1,17 +1,14 @@ --- title: APIインデックス +description: 'Ionic Docs API Indexの各コンポーネントは、1つまたは複数のカスタム要素で構成され、それぞれがメソッド、イベント、CSSカスタムプロパティを公開します。' --- import APIList from '@components/page/api/APIList'; API Index | API カスタム要素の Ionic Docs API Index - -各 Ionic の [コンポーネント](/components.mdx) は、1 つ以上の [カスタム要素](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) から構成されます。各カスタム要素は順番に、プロパティ、メソッド、イベント、および CSS カスタムプロパティを公開できます。 +各 Ionic の [コンポーネント](./components.mdx) は、1 つ以上の [カスタム要素](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) から構成されます。各カスタム要素は順番に、プロパティ、メソッド、イベント、および CSS カスタムプロパティを公開できます。 diff --git a/docs/api/accordion-group.mdx b/docs/api/accordion-group.mdx index 496d5b381a1..a8ca4cb2f27 100644 --- a/docs/api/accordion-group.mdx +++ b/docs/api/accordion-group.mdx @@ -1,4 +1,5 @@ --- +description: 'ion-accordion-group is a container for accordions that manages their expanded state and provides keyboard navigation between them.' title: 'ion-accordion-group' --- @@ -15,7 +16,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill'; アコーディオン・グループは、アコーディオンインスタンスのためのコンテナです。これは、アコーディオンの状態を管理し、キーボードナビゲーションを提供します。 -詳細については、[アコーディオン](./accordion)のドキュメントを参照してください。 +詳細については、[アコーディオン](./accordion.mdx)のドキュメントを参照してください。 ## Interfaces {/* #interfaces */} diff --git a/docs/api/accordion.mdx b/docs/api/accordion.mdx index b36996894fa..d7976512492 100644 --- a/docs/api/accordion.mdx +++ b/docs/api/accordion.mdx @@ -1,5 +1,6 @@ --- title: 'ion-accordion' +description: 'Ion-accordion components provide collapsible sections in content to reduce vertical space and organize information. Learn how to build one and explore examples.' --- import Props from '@ionic-internal/component-api/v9/accordion/props.mdx'; @@ -11,10 +12,6 @@ import Slots from '@ionic-internal/component-api/v9/accordion/slots.mdx'; ion-accordion: アコーディオンコンポーネント: 作り方と例 - import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -40,9 +37,11 @@ import Toggle from '@site/static/usage/v9/accordion/toggle/index.mdx'; ## アコーディオンの状態変化を監視 {/* #listen-for-accordion-state-changes */} :::caution -[Input](./input) や [Textarea](./textarea) などの他のコンポーネントが発する `ionChange` イベントのほとんどはバブル化されます。その結果、アコーディオンの中で関連コンポーネントが使用されている場合、これらのイベントはバブルアップし、アコーディオングループの `ionChange` リスナーを発火させます。 + +[Input](./input.mdx) や [Textarea](./textarea.mdx) などの他のコンポーネントが発する `ionChange` イベントのほとんどはバブル化されます。その結果、アコーディオンの中で関連コンポーネントが使用されている場合、これらのイベントはバブルアップし、アコーディオングループの `ionChange` リスナーを発火させます。 アコーディオンの内部で `ionChange` を発する他のコンポーネントを使用する場合は、アコーディオングループの `ionChange` コールバックに、コールバックに渡されたイベントの `target` キーをチェックさせ、`ionChange` がアコーディオングループからのものであり、子孫からのものでないことを確認することをお勧めします。 + ::: 開発者は `ionChange` イベントをリッスンして、アコーディオンが展開または折りたたまれたときに通知を受けることができます。 @@ -157,7 +156,7 @@ import Icons from '@site/static/usage/v9/accordion/customization/icons/index.mdx ### テーマ {/* #theming */} -`ion-accordion` はヘッダーとコンテンツ要素を囲むシェルとして機能するので、アコーディオンを簡単に好きなようにテーマ化することができます。ヘッダーのテーマは、スロットの `ion-item` をターゲットにすることで行うことができます。 `ion-item` を使用しているので、 [ion-item CSS Variables](./item#css-custom-properties) と [ion-item Shadow Parts](./item#css-shadow-parts) にもすべてアクセスすることができます。コンテンツのテイムも、`content` slotにある要素をターゲットにすることで簡単に実現できます。 +`ion-accordion` はヘッダーとコンテンツ要素を囲むシェルとして機能するので、アコーディオンを簡単に好きなようにテーマ化することができます。ヘッダーのテーマは、スロットの `ion-item` をターゲットにすることで行うことができます。 `ion-item` を使用しているので、 [ion-item CSS Variables](./item.mdx#css-custom-properties) と [ion-item Shadow Parts](./item.mdx#css-shadow-parts) にもすべてアクセスすることができます。コンテンツのテイムも、`content` slotにある要素をターゲットにすることで簡単に実現できます。 import Theming from '@site/static/usage/v9/accordion/customization/theming/index.mdx'; @@ -177,15 +176,15 @@ import AccessibilityAnimations from '@site/static/usage/v9/accordion/accessibili `ion-accordion-group` の中で使用する場合、`ion-accordion` はキーボードによる操作を完全にサポートしています。次の表は、それぞれのキーが何をするのかの詳細です。 -| 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 */} @@ -199,7 +198,7 @@ import AccessibilityAnimations from '@site/static/usage/v9/accordion/accessibili 2. あらかじめ画像用の領域を確保します。遅延読み込みが必要で画像の寸法がわかっている場合(同じサイズのアイコンを読み込む場合など)、属性または CSS を使用して `` の幅と高さを設定します。これにより、レイアウトのずれを防ぎながら遅延読み込みを利用できます。 -3. これらの解決方法を選択できない場合、開発者は [ion-accordion-group](./accordion-group) の `animated` プロパティを使用してアニメーションを完全に無効にすることを検討することができます。 +3. これらの解決方法を選択できない場合、開発者は [ion-accordion-group](./accordion-group.mdx) の `animated` プロパティを使用してアニメーションを完全に無効にすることを検討することができます。 ## プロパティ {/* #properties */} diff --git a/docs/api/action-sheet.mdx b/docs/api/action-sheet.mdx index 6fb3b295dd4..26e1be62541 100644 --- a/docs/api/action-sheet.mdx +++ b/docs/api/action-sheet.mdx @@ -1,5 +1,6 @@ --- title: 'ion-action-sheet' +description: 'アクションシートはアプリのコンテンツの上に一連のオプションを表示するダイアログで、手動で解除する必要があります。iOSとAndroidのデバイスでの使用方法については、こちらをご覧ください。' --- import Tabs from '@theme/Tabs'; @@ -14,10 +15,6 @@ import Slots from '@ionic-internal/component-api/v9/action-sheet/slots.mdx'; ion-action-sheet: Action Sheet Dialog for iOS and Android - import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -102,7 +99,7 @@ import CssCustomProperties from '@site/static/usage/v9/action-sheet/theming/css- ### Screen Readers {/* #screen-readers */} -アクションシートは、スクリーンリーダーにとって [アクセシブル](../reference/glossary#a11y) であるためにariaプロパティを設定しますが、これらのプロパティは、十分な説明になっていなかったり、アクションシートがアプリでどのように使用されているかに合っていなかったりする場合、オーバーライドすることができます。 +アクションシートは、スクリーンリーダーにとって [アクセシブル](../reference/glossary.mdx#a11y) であるためにariaプロパティを設定しますが、これらのプロパティは、十分な説明になっていなかったり、アクションシートがアプリでどのように使用されているかに合っていなかったりする場合、オーバーライドすることができます。 #### Role {/* #role */} diff --git a/docs/api/alert.mdx b/docs/api/alert.mdx index f3f7522bf8b..ad4d44cf22b 100644 --- a/docs/api/alert.mdx +++ b/docs/api/alert.mdx @@ -1,5 +1,6 @@ --- title: 'ion-alert' +description: 'ion-alertダイアログは、Inputを使用して情報を提示または収集します。カスタムアラートボタンメッセージは、アプリのコンテンツの上に表示され、手動で解除する必要があります。' --- import Tabs from '@theme/Tabs'; @@ -14,10 +15,6 @@ import Slots from '@ionic-internal/component-api/v9/alert/slots.mdx'; ion-alert: Ionic Alert Buttons with Custom Message Prompts - import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -109,14 +106,16 @@ import Customization from '@site/static/usage/v9/alert/customization/index.mdx'; :::note + IonicのAngularアプリを構築する場合、スタイルはグローバルなスタイルシートファイルに追加する必要があります。 + ::: ## アクセシビリティ {/* #accessibility */} ### Screen Readers {/* #screen-readers */} -アラートは、スクリーンリーダーにとって[アクセシブル](../reference/glossary#a11y)であるために、ariaプロパティを設定しますが、これらのプロパティは、十分な説明がない場合、またはアラートがアプリでどのように使用されているかと一致しない場合は、オーバーライドすることができます。 +アラートは、スクリーンリーダーにとって[アクセシブル](../reference/glossary.mdx#a11y)であるために、ariaプロパティを設定しますが、これらのプロパティは、十分な説明がない場合、またはアラートがアプリでどのように使用されているかと一致しない場合は、オーバーライドすることができます。 #### Role {/* #role */} diff --git a/docs/api/app.mdx b/docs/api/app.mdx index c2bcb9fe6d7..ea3791ac738 100644 --- a/docs/api/app.mdx +++ b/docs/api/app.mdx @@ -1,5 +1,6 @@ --- title: 'ion-app' +description: 'ion-appは、Ionicアプリケーションのためのコンテナ要素です。アプリは、メニュー、ヘッダー、コンテンツ、フッターなど、多くのIonicコンポーネントを持つことができます。詳しくはこちらをご覧ください。' --- import Props from '@ionic-internal/component-api/v9/app/props.mdx'; @@ -11,10 +12,6 @@ import Slots from '@ionic-internal/component-api/v9/app/slots.mdx'; ion-app: Container Element for an Ionic Application - import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -23,8 +20,8 @@ AppはIonicアプリケーションのコンテナ要素です。1つのプロ `ion-app`を使用すると、以下の動作が可能になります。 -- [キーボードライフサイクルイベント](../developing/keyboard#keyboard-lifecycle-events) は、ネイティブプラグインを必要なくなります。 -- Android 端末のハードウェアバックボタンの動作をカスタマイズするための [Hardware Back Button Listeners](../developing/hardware-back-button) を使えます +- [キーボードライフサイクルイベント](../developing/keyboard.mdx#keyboard-lifecycle-events) は、ネイティブプラグインを必要なくなります。 +- Android 端末のハードウェアバックボタンの動作をカスタマイズするための [Hardware Back Button Listeners](../developing/hardware-back-button.mdx) を使えます - Capacitor や Cordova でステータスバーをサポートし、ステータスバーをタップすることでビューの最上部にスクロールできるようになります。 - テキスト入力が画面上のキーボードにかからないように、コンテンツをスクロールさせるスクロールアシストユーティリティが使えます。 - Material Design モードでのボタン操作時の[Ripple effect](./ripple-effect.mdx) が使えます。 diff --git a/docs/api/avatar.mdx b/docs/api/avatar.mdx index 09f86ae4111..02fdaaf6a20 100644 --- a/docs/api/avatar.mdx +++ b/docs/api/avatar.mdx @@ -1,5 +1,6 @@ --- title: 'ion-avatar' +description: 'Ion-avatarsは画像やアイコンを包む円形のアプリケーション部品です。人物や物体を表現することができ、単体でも、要素の中に入れてもかまいません。' --- import Props from '@ionic-internal/component-api/v9/avatar/props.mdx'; @@ -11,10 +12,6 @@ import Slots from '@ionic-internal/component-api/v9/avatar/slots.mdx'; ion-avatar: Circular Application Avatar Icon Component - import EncapsulationPill from '@components/page/api/EncapsulationPill'; diff --git a/docs/api/back-button.mdx b/docs/api/back-button.mdx index d548779f2e7..dc961b8a386 100644 --- a/docs/api/back-button.mdx +++ b/docs/api/back-button.mdx @@ -1,5 +1,6 @@ --- title: 'ion-back-button' +description: 'ion-back-buttonは、Android、iOS、およびProgressive Web Apps用のカスタムメニューアイコンです。Ionic Frameworkのコンポーネントを使用して、簡単にアプリケーションを構築できます。' --- import Props from '@ionic-internal/component-api/v9/back-button/props.mdx'; @@ -11,10 +12,6 @@ import Slots from '@ionic-internal/component-api/v9/back-button/slots.mdx'; ion-back-button: Custom Menu Back Button for Applications - import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -31,7 +28,7 @@ import Basic from '@site/static/usage/v9/back-button/basic/index.mdx'; ## カスタムのBack Button {/* #custom-back-button */} -デフォルトでは、戻るボタンは`ios`では`"chevron-back"`アイコン付きで`"Back"`のテキストを表示し、`md`では`"arrow-back-sharp"`アイコンを表示します。これは、各戻るボタンコンポーネントごとに`icon`または`text`プロパティを設定することでカスタマイズ可能です。あるいは、グローバル設定で`backButtonIcon`または`backButtonText`プロパティを使用してグローバルに設定することもできます。詳細は[Configドキュメント](../developing/config)を参照してください。 +デフォルトでは、戻るボタンは`ios`では`"chevron-back"`アイコン付きで`"Back"`のテキストを表示し、`md`では`"arrow-back-sharp"`アイコンを表示します。これは、各戻るボタンコンポーネントごとに`icon`または`text`プロパティを設定することでカスタマイズ可能です。あるいは、グローバル設定で`backButtonIcon`または`backButtonText`プロパティを使用してグローバルに設定することもできます。詳細は[Configドキュメント](../developing/config.mdx)を参照してください。 import Custom from '@site/static/usage/v9/back-button/custom/index.mdx'; diff --git a/docs/api/backdrop.mdx b/docs/api/backdrop.mdx index 12f83355a9f..14c7f35a2e0 100644 --- a/docs/api/backdrop.mdx +++ b/docs/api/backdrop.mdx @@ -1,5 +1,6 @@ --- title: 'ion-backdrop' +description: 'ion-backdrop is a full screen overlay that sits behind components that transition in on top of content, and can be tapped to dismiss them.' --- import Props from '@ionic-internal/component-api/v9/backdrop/props.mdx'; diff --git a/docs/api/badge.mdx b/docs/api/badge.mdx index 02b3d282e11..b30c0bc6687 100644 --- a/docs/api/badge.mdx +++ b/docs/api/badge.mdx @@ -1,5 +1,6 @@ --- title: 'ion-badge' +description: 'BadgesはiOS/Androidアプリで他の要素の近くに表示されるインラインブロック要素で、アイテムの数を示す通知として使用します。' --- import Props from '@ionic-internal/component-api/v9/badge/props.mdx'; @@ -11,10 +12,6 @@ import Slots from '@ionic-internal/component-api/v9/badge/slots.mdx'; ion-badge: iOS & Android App Notification Badge Icons - import EncapsulationPill from '@components/page/api/EncapsulationPill'; diff --git a/docs/api/breadcrumb.mdx b/docs/api/breadcrumb.mdx index 8039f39fff2..69b0ed27f1c 100644 --- a/docs/api/breadcrumb.mdx +++ b/docs/api/breadcrumb.mdx @@ -1,4 +1,5 @@ --- +description: 'ion-breadcrumb is a single navigation item inside ion-breadcrumbs. It can link elsewhere in an app or be plain text, with an optional icon.' title: 'ion-breadcrumb' --- @@ -15,7 +16,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill'; Breadcrumbは、Breadcrumbsコンポーネントの子であり、単一のナビゲーションアイテムです。Breadcrumbは、アプリ内の他の場所にリンクすることも、プレーンテキストにすることもできます。Breadcrumbsは、次のBreadcrumbとの間にセパレータを持ち、オプションでアイコンを含むことができます。 -詳細は[Breadcrumbs](./breadcrumbs)のドキュメントを参照してください。 +詳細は[Breadcrumbs](./breadcrumbs.mdx)のドキュメントを参照してください。 ## Interfaces {/* #interfaces */} diff --git a/docs/api/breadcrumbs.mdx b/docs/api/breadcrumbs.mdx index f05f26687cb..d55f6f5c36b 100644 --- a/docs/api/breadcrumbs.mdx +++ b/docs/api/breadcrumbs.mdx @@ -1,5 +1,6 @@ --- title: 'ion-breadcrumbs' +description: 'ion-breadcrumbs shows where a user is in an app or site with hierarchical pages, and can collapse items when there are more than fit.' --- import Props from '@ionic-internal/component-api/v9/breadcrumbs/props.mdx'; diff --git a/docs/api/button.mdx b/docs/api/button.mdx index 44399ba9f01..00730bcb256 100644 --- a/docs/api/button.mdx +++ b/docs/api/button.mdx @@ -1,5 +1,6 @@ --- title: 'ion-button' +description: 'ion-button は、標準的なボタン機能が必要な場所で使用するためのクリック可能な要素を提供します。カスタム CSS プロパティを使用して、ボタン要素をデザインし、スタイルを設定します。' --- import Props from '@ionic-internal/component-api/v9/button/props.mdx'; @@ -11,10 +12,6 @@ import Slots from '@ionic-internal/component-api/v9/button/slots.mdx'; ion-button: Style Buttons with Custom CSS Properties - import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -92,7 +89,9 @@ import CSSProps from '@site/static/usage/v9/button/theming/css-properties/index. テキストが長すぎて収まらない場合、ボタンテキストは自動的に次の行に折り返されません。テキストを折り返すには、`ion-text-wrap`クラスを追加して、`white-space`プロパティを`"normal"`に設定します。これは将来のメジャーリリースでデフォルトになる予定である。 :::info + max-width`スタイルは、デモのためだけに下のボタンに設定されています。テキストラッピングは動的なボタン幅で動作します。 + ::: import TextWrapping from '@site/static/usage/v9/button/text-wrapping/index.mdx'; diff --git a/docs/api/buttons.mdx b/docs/api/buttons.mdx index e7d67d5d692..b57403dc773 100644 --- a/docs/api/buttons.mdx +++ b/docs/api/buttons.mdx @@ -1,5 +1,6 @@ --- title: 'ion-buttons' +description: 'Buttonsコンポーネントは、コンテナ要素です。ツールバーに配置されるボタンはion-buttons要素の中にあるべきで、名前付きスロットを使って配置することができます。' --- import Props from '@ionic-internal/component-api/v9/buttons/props.mdx'; @@ -11,17 +12,13 @@ import Slots from '@ionic-internal/component-api/v9/buttons/slots.mdx'; ion-buttons: Toolbar Element with Named Slots for Buttons - import EncapsulationPill from '@components/page/api/EncapsulationPill'; -Buttonsコンポーネントは、コンテナ要素です。 [ツールバー](./toolbar) の内部で使用し、標準の[ボタン](./button)、[メニューボタン](./menu-button)、[戻るボタン](./back-button)を含むいくつかのタイプのボタンを含めることができる。 +Buttonsコンポーネントは、コンテナ要素です。 [ツールバー](./toolbar.mdx) の内部で使用し、標準の[ボタン](./button.mdx)、[メニューボタン](./menu-button.mdx)、[戻るボタン](./back-button.mdx)を含むいくつかのタイプのボタンを含めることができる。 ## 基本的な使い方 {/* #basic-usage */} @@ -33,12 +30,12 @@ import Basic from '@site/static/usage/v9/buttons/basic/index.mdx'; ツールバー内のボタンは、スロットという名前を使って配置することができます。下図は各スロットの説明です。 -| 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'; @@ -46,7 +43,7 @@ import Placement from '@site/static/usage/v9/buttons/placement/index.mdx'; ## Buttonsのタイプ {/* #types-of-buttons */} -ツールバー内のボタンはデフォルトでクリアスタイルに設定されていますが、ボタンの[`fill`](./button#fill)プロパティを使用して変更することができます。この例で[戻るボタン](./back-button)および[メニューボタン](./menu-button)に含まれるプロパティは表示目的のためのものであり、正しい使用方法についてはそれぞれのドキュメントを参照してください。 +ツールバー内のボタンはデフォルトでクリアスタイルに設定されていますが、ボタンの[`fill`](./button.mdx#fill)プロパティを使用して変更することができます。この例で[戻るボタン](./back-button.mdx)および[メニューボタン](./menu-button.mdx)に含まれるプロパティは表示目的のためのものであり、正しい使用方法についてはそれぞれのドキュメントを参照してください。 import Types from '@site/static/usage/v9/buttons/types/index.mdx'; @@ -54,7 +51,7 @@ import Types from '@site/static/usage/v9/buttons/types/index.mdx'; ## 折りたたみ可能なボタン {/* #collapsible-buttons */} -ボタンに `collapse` プロパティを設定すると、ヘッダーが折りたたまれたときにボタンが折りたたまれます。これは通常、[折りたたみ可能な大きなタイトル](./title#collapsible-large-titles)と共に使用します。 +ボタンに `collapse` プロパティを設定すると、ヘッダーが折りたたまれたときにボタンが折りたたまれます。これは通常、[折りたたみ可能な大きなタイトル](./title.mdx#collapsible-large-titles)と共に使用します。 :::info @@ -63,6 +60,7 @@ import Types from '@site/static/usage/v9/buttons/types/index.mdx'; ::: {/* 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-content.mdx b/docs/api/card-content.mdx index 8e2b802962c..7aef79c81a0 100644 --- a/docs/api/card-content.mdx +++ b/docs/api/card-content.mdx @@ -1,4 +1,5 @@ --- +description: 'ion-card-content adds padding around the content of an ion-card. Place any text content for a card inside of it.' title: 'ion-card-content' --- @@ -13,7 +14,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill'; カードコンテンツは、カードの子コンポーネントで、そのコンテンツの周りにパディングを追加します。カードのテキストコンテンツは、カードコンテンツの中に配置することが推奨されます。 -詳細は[Card](./card)のドキュメントを参照してください。 +詳細は[Card](./card.mdx)のドキュメントを参照してください。 ## プロパティ {/* #properties */} diff --git a/docs/api/card-header.mdx b/docs/api/card-header.mdx index d5c6da06c2b..0436141330e 100644 --- a/docs/api/card-header.mdx +++ b/docs/api/card-header.mdx @@ -1,4 +1,5 @@ --- +description: 'ion-card-header goes before the card content in an ion-card, and can contain a card title and a card subtitle.' title: 'ion-card-header' --- @@ -13,9 +14,9 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill'; -カードヘッダは、カードの子コンポーネントで、カードコンテンツの前に配置する必要があります。[カードタイトル](./card-title)と[カードサブタイトル](./card-subtitle)を含むことができます。 +カードヘッダは、カードの子コンポーネントで、カードコンテンツの前に配置する必要があります。[カードタイトル](./card-title.mdx)と[カードサブタイトル](./card-subtitle.mdx)を含むことができます。 -詳細は[Card](./card)のドキュメントを参照してください。 +詳細は[Card](./card.mdx)のドキュメントを参照してください。 ## プロパティ {/* #properties */} diff --git a/docs/api/card-subtitle.mdx b/docs/api/card-subtitle.mdx index d68b3950670..70e1e8ac00c 100644 --- a/docs/api/card-subtitle.mdx +++ b/docs/api/card-subtitle.mdx @@ -1,4 +1,5 @@ --- +description: 'ion-card-subtitle displays the subtitle of an ion-card, and is placed inside of an ion-card-header.' title: 'ion-card-subtitle' --- @@ -13,9 +14,9 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill'; -カードサブタイトルは、[カードヘッダ](./card-header)の内側に配置されるべき、cardの子コンポーネントです。 +カードサブタイトルは、[カードヘッダ](./card-header.mdx)の内側に配置されるべき、cardの子コンポーネントです。 -詳細は[Card](./card)のドキュメントを参照してください。 +詳細は[Card](./card.mdx)のドキュメントを参照してください。 ## プロパティ {/* #properties */} diff --git a/docs/api/card-title.mdx b/docs/api/card-title.mdx index 3282e5afe06..df7e14ec220 100644 --- a/docs/api/card-title.mdx +++ b/docs/api/card-title.mdx @@ -1,5 +1,6 @@ --- title: 'ion-card-title' +description: 'ion-card-titleは、ion-cardの子コンポーネントです。カードタイトルのプロパティの詳細と、このコンポーネントがIonic Frameworkアプリでどのように使用されるかについては、こちらをご覧ください。' --- import Props from '@ionic-internal/component-api/v9/card-title/props.mdx'; @@ -13,17 +14,13 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill'; ion-card-title: Ionic App Card Title Component - -Card titleはcardの子コンポーネントで、[card header](./card-header)の内側に配置する必要があります。 +Card titleはcardの子コンポーネントで、[card header](./card-header.mdx)の内側に配置する必要があります。 -詳細は[Card](./card)のドキュメントを参照してください。 +詳細は[Card](./card.mdx)のドキュメントを参照してください。 ## プロパティ {/* #properties */} diff --git a/docs/api/card.mdx b/docs/api/card.mdx index 66ec5fd3be8..061ad6946ec 100644 --- a/docs/api/card.mdx +++ b/docs/api/card.mdx @@ -1,5 +1,6 @@ --- title: 'ion-card' +description: 'ion-card UIコンポーネントは、より詳細な情報へのエントリーポイントです。カードは単一のコンポーネントであることも、いくつかのヘッダ、タイトル、サブタイトル、コンテンツから構成されることもあります。' --- import Props from '@ionic-internal/component-api/v9/card/props.mdx'; @@ -13,10 +14,6 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill'; ion-card: Card UI Components for Ionic Framework API - @@ -25,7 +22,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill'; カードは1つのコンポーネントで構成することもできますが、 多くの場合、ヘッダー、タイトル、サブタイトル、コンテンツで構成されます。 カードはこの構造に対応するため、いくつかのコンポーネントに分割されます。 -[カードヘッダ](./card-header)、[カードタイトル](./card-title)、[カードサブタイトル](./card-subtitle)、[カードコンテンツ](./card-content)。 +[カードヘッダ](./card-header.mdx)、[カードタイトル](./card-title.mdx)、[カードサブタイトル](./card-subtitle.mdx)、[カードコンテンツ](./card-content.mdx)。 ## 基本的な使い方 {/* #basic-usage */} diff --git a/docs/api/checkbox.mdx b/docs/api/checkbox.mdx index a5569a29747..4023c0ce80d 100644 --- a/docs/api/checkbox.mdx +++ b/docs/api/checkbox.mdx @@ -1,5 +1,6 @@ --- title: 'ion-checkbox' +description: 'ion-checkboxは、セットから複数の選択肢を選択でき、アクティブにするとチェックされた(ticked)ように表示されます。Ionicアプリのチェックボックスコンポーネントについて説明します。' --- import Props from '@ionic-internal/component-api/v9/checkbox/props.mdx'; @@ -11,10 +12,6 @@ import Slots from '@ionic-internal/component-api/v9/checkbox/slots.mdx'; ion-checkbox: Ionic App Checkbox to Select Multiple Options - import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -42,7 +39,9 @@ import LabelPlacement from '@site/static/usage/v9/checkbox/label-placement/index Developers can use the `alignment` property to control how the label and control are aligned on the cross axis. This property mirrors the flexbox `align-items` property. :::note + 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/v9/checkbox/alignment/index.mdx'; @@ -58,7 +57,9 @@ import Justify from '@site/static/usage/v9/checkbox/justify/index.mdx'; :::note + `ion-item`は、 `justify` がどのように機能するかを強調するためにデモで使用されているだけです。 `justify` が正しく機能するために必須ではありません。 + ::: ## Indeterminate Checkboxes {/* #indeterminate-checkboxes */} diff --git a/docs/api/chip.mdx b/docs/api/chip.mdx index f58f735025a..7e40101e030 100644 --- a/docs/api/chip.mdx +++ b/docs/api/chip.mdx @@ -1,5 +1,6 @@ --- title: 'ion-chip' +description: 'ion-chipは、複雑な実体をコンタクトのような小さなブロックに表現します。1つのチップには、名前、アバター、テキスト、アイコンなど、複数の異なる要素を含めることができます。' --- import Props from '@ionic-internal/component-api/v9/chip/props.mdx'; @@ -11,10 +12,6 @@ import Slots from '@ionic-internal/component-api/v9/chip/slots.mdx'; ion-chip: Text, Icon and Avatar for Ionic Framework Apps - import EncapsulationPill from '@components/page/api/EncapsulationPill'; diff --git a/docs/api/col.mdx b/docs/api/col.mdx index 0ac8dfc9c57..43dbf7e4626 100644 --- a/docs/api/col.mdx +++ b/docs/api/col.mdx @@ -1,5 +1,6 @@ --- title: 'ion-col' +description: 'ion-colは、rowの内側に入るカラムコンポーネントです。グリッド内のコンテンツは、カラムの中に入ります。列のパディング、サイズ、その他のプロパティについては、こちらをご覧ください。' --- import Props from '@ionic-internal/component-api/v9/col/props.mdx'; @@ -11,23 +12,19 @@ import Slots from '@ionic-internal/component-api/v9/col/slots.mdx'; ion-col: Column Component Padding and Other Properties - import EncapsulationPill from '@components/page/api/EncapsulationPill'; -Columnは、[Grid](./grid) システムのセルラーコンポーネントで、[row](./row)の内部に配置されます。列は行を埋めるように拡張されます。グリッド内のすべてのコンテンツは、カラムの内部に配置する必要があります。 +Columnは、[Grid](./grid.mdx) システムのセルラーコンポーネントで、[row](./row.mdx)の内部に配置されます。列は行を埋めるように拡張されます。グリッド内のすべてのコンテンツは、カラムの内部に配置する必要があります。 -詳細は[grid](./grid)のドキュメントを参照してください。 +詳細は[grid](./grid.mdx)のドキュメントを参照してください。 ## Column Alignment {/* #column-alignment */} -デフォルトでは、カラムは行の高さ全体を埋めるように引き伸ばされます。カラムは[フレックスアイテム](https://developer.mozilla.org/en-US/docs/Glossary/Flex_Item)なので、この動作をカスタマイズするために、カラムに適用できるいくつかの[CSSクラス](/layout/css-utilities.mdx#flex-item-properties) があります。 +デフォルトでは、カラムは行の高さ全体を埋めるように引き伸ばされます。カラムは[フレックスアイテム](https://developer.mozilla.org/en-US/docs/Glossary/Flex_Item)なので、この動作をカスタマイズするために、カラムに適用できるいくつかの[CSSクラス](../layout/css-utilities.mdx#flex-item-properties) があります。 ## プロパティ {/* #properties */} diff --git a/docs/api/content.mdx b/docs/api/content.mdx index ac92cb23178..6af872b0767 100644 --- a/docs/api/content.mdx +++ b/docs/api/content.mdx @@ -1,5 +1,6 @@ --- title: 'ion-content' +description: 'ion-contentは、スクロール可能な領域を制御する便利なメソッドを備えた、使いやすいコンテンツ領域を提供します。このIonicアプリ用CSSコンポーネントの詳細については、こちらをご覧ください。' --- import Props from '@ionic-internal/component-api/v9/content/props.mdx'; @@ -11,10 +12,6 @@ import Slots from '@ionic-internal/component-api/v9/content/slots.mdx'; ion-content: Scrollable Component for Ionic App Content - import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -25,7 +22,7 @@ Contentコンポーネントは、スクロール可能領域を制御するい 使いやすいコンテンツ領域を提供します。 1つのビューに表示できるコンテンツは1つだけです。 -Contentは、他の多くのIonicコンポーネントと同様に、 [CSS Utilities](/layout/css-utilities.mdx) で提供されるグローバルスタイルを使用するか、CSSおよび使用可能な [CSS Custom Properties](#css-custom-properties) を使用して個別にスタイル設定することによって、`padding` や `margin` などを変更するようにカスタマイズできます。 +Contentは、他の多くのIonicコンポーネントと同様に、 [CSS Utilities](../layout/css-utilities.mdx) で提供されるグローバルスタイルを使用するか、CSSおよび使用可能な [CSS Custom Properties](#css-custom-properties) を使用して個別にスタイル設定することによって、`padding` や `margin` などを変更するようにカスタマイズできます。 ## 基本的な使い方 {/* #basic-usage */} @@ -35,7 +32,7 @@ import Basic from '@site/static/usage/v9/content/basic/index.mdx'; ## Header & Footer {/* #header--footer */} -コンテンツは、ページ内の唯一のトップレベル・コンポーネントとすることも、[ヘッダー](./header)、[フッター](./footer)、またはその両方と一緒に使用することも可能です。ヘッダーやフッターと一緒に使用すると、残りの高さを埋めるようにサイズが調整されます。 +コンテンツは、ページ内の唯一のトップレベル・コンポーネントとすることも、[ヘッダー](./header.mdx)、[フッター](./footer.mdx)、またはその両方と一緒に使用することも可能です。ヘッダーやフッターと一緒に使用すると、残りの高さを埋めるようにサイズが調整されます。 import HeaderFooter from '@site/static/usage/v9/content/header-footer/index.mdx'; @@ -43,7 +40,7 @@ import HeaderFooter from '@site/static/usage/v9/content/header-footer/index.mdx' ## Fullscreen Content {/* #fullscreen-content */} -デフォルトでは、コンテンツは [ヘッダー](./header)と [フッター](./footer)の間のスペースを埋めますが、それらの背景にまわることはありません。例えば、ヘッダーとフッターのどちらかに `translucent` プロパティを設定した場合や、ツールバーに `opacity` を設定した場合など、特定のケースでは、コンテンツをヘッダーとフッターの後ろにスクロールさせることが望まれるかもしれない。これは、コンテンツの `fullscreen` プロパティを `true` に設定することで実現することができます。 +デフォルトでは、コンテンツは [ヘッダー](./header.mdx)と [フッター](./footer.mdx)の間のスペースを埋めますが、それらの背景にまわることはありません。例えば、ヘッダーとフッターのどちらかに `translucent` プロパティを設定した場合や、ツールバーに `opacity` を設定した場合など、特定のケースでは、コンテンツをヘッダーとフッターの後ろにスクロールさせることが望まれるかもしれない。これは、コンテンツの `fullscreen` プロパティを `true` に設定することで実現することができます。 import Fullscreen from '@site/static/usage/v9/content/fullscreen/index.mdx'; @@ -53,7 +50,7 @@ import Fullscreen from '@site/static/usage/v9/content/fullscreen/index.mdx'; スクロール可能な領域の外側に要素を配置するには、`fixed`スロットに割り当てます。そうすることで、その要素はコンテンツの左上に[絶対位置](https://developer.mozilla.org/en-US/docs/Web/CSS/position#absolute_positioning)されます。要素の位置を変えるには、CSSの[top, right, bottom, left](https://developer.mozilla.org/en-US/docs/Web/CSS/position)プロパティを使ってスタイルを設定することができます。 -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. +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.mdx) or other fixed content from being reachable by pressing the tab key. import Fixed from '@site/static/usage/v9/content/fixed/index.mdx'; @@ -97,7 +94,7 @@ import CSSProps from '@site/static/usage/v9/content/theming/css-properties/index ### Safe Area Padding {/* #safe-area-padding */} -The content component will not automatically apply padding to any of its sides to account for the [safe area](/theming/advanced.mdx#safe-area-padding). This is because the content component is often used in conjunction with other components that apply their own padding, such as [headers](./header) and [footers](./footer). However, if the content component is being used on its own, it may be desired to apply padding to the safe area. This can be done through CSS by using the `--ion-safe-area-(dir)` variables described in [Application Variables](../theming/advanced.mdx#application-variables). +The content component will not automatically apply padding to any of its sides to account for the [safe area](../theming/advanced.mdx#safe-area-padding). This is because the content component is often used in conjunction with other components that apply their own padding, such as [headers](./header.mdx) and [footers](./footer.mdx). However, if the content component is being used on its own, it may be desired to apply padding to the safe area. This can be done through CSS by using the `--ion-safe-area-(dir)` variables described in [Application Variables](../theming/advanced.mdx#application-variables). The most common use case for this is to apply padding to the top of the content to account for the status bar. This can be done by setting the `padding-top` property to the value of the `--ion-safe-area-top` variable. diff --git a/docs/api/datetime-button.mdx b/docs/api/datetime-button.mdx index b3976c60223..db399b7c0fc 100644 --- a/docs/api/datetime-button.mdx +++ b/docs/api/datetime-button.mdx @@ -1,5 +1,6 @@ --- title: 'ion-datetime-button' +description: 'Datetime button links with a datetime instance to easily a datetime in a popover, modal, and more.' --- import Props from '@ionic-internal/component-api/v9/datetime-button/props.mdx'; @@ -11,23 +12,19 @@ import Slots from '@ionic-internal/component-api/v9/datetime-button/slots.mdx'; ion-datetime-button: Ionic Input for Datetime Picker - import EncapsulationPill from '@components/page/api/EncapsulationPill'; -Datetimeボタンは、[Datetime](./datetime) コンポーネントとリンクし、フォーマットされた日付と時刻を表示します。また、モーダルやポップオーバーなどで日時を表示するためのボタンも用意されています。 +Datetimeボタンは、[Datetime](./datetime.mdx) コンポーネントとリンクし、フォーマットされた日付と時刻を表示します。また、モーダルやポップオーバーなどで日時を表示するためのボタンも用意されています。 ## 概要 {/* #overview */} Datetimeボタンは、スペースに制約がある場合に使用する必要があります。このコンポーネントは、現在の日付と時刻の値を表示するボタンを表示します。ボタンがタップされると、日付や時刻のピッカーがオーバーレイで表示されます。 -Angular、React、Vue などの JavaScript フレームワークで Datetime Button を使用する場合は、[ion-modal の keepContentsMounted プロパティ](./modal#prop-keep-contents-mounted)または [ion-popover の keepContentsMounted プロパティ](./popover#prop-keep-contents-mounted)を使用してください。これにより、オーバーレイがまだ表示されていない場合でも、関連付けられた datetime インスタンスがマウントされます。 +Angular、React、Vue などの JavaScript フレームワークで Datetime Button を使用する場合は、[ion-modal の keepContentsMounted プロパティ](./modal.mdx#prop-keep-contents-mounted)または [ion-popover の keepContentsMounted プロパティ](./popover.mdx#prop-keep-contents-mounted)を使用してください。これにより、オーバーレイがまだ表示されていない場合でも、関連付けられた datetime インスタンスがマウントされます。 ## 基本的な使い方 {/* #basic-usage */} @@ -37,11 +34,11 @@ import Basic from '@site/static/usage/v9/datetime-button/basic/index.mdx'; ## ローカライゼーション {/* #localization */} -`ion-datetime-button`上のローカライズされたテキストは、関連する`ion-datetime`インスタンスの`locale`プロパティによって決まります。詳細は[日時ローカライゼーション](./datetime#localization)を参照してください。 +`ion-datetime-button`上のローカライズされたテキストは、関連する`ion-datetime`インスタンスの`locale`プロパティによって決まります。詳細は[日時ローカライゼーション](./datetime.mdx#localization)を参照してください。 ## Format Options {/* #format-options */} -Datetime ボタンの日時の形式は、関連する Datetime インスタンスで `formatOptions` を指定することでカスタマイズできます。詳細は [Datetime フォーマットオプション](./datetime#format-options) を参照してください。 +Datetime ボタンの日時の形式は、関連する Datetime インスタンスで `formatOptions` を指定することでカスタマイズできます。詳細は [Datetime フォーマットオプション](./datetime.mdx#format-options) を参照してください。 import FormatOptions from '@site/static/usage/v9/datetime-button/format-options/index.mdx'; @@ -49,7 +46,7 @@ import FormatOptions from '@site/static/usage/v9/datetime-button/format-options/ ## モーダルやポップオーバーと使う {/* #usage-with-modals-and-popovers */} -`ion-datetime-button` は、マウントされた `ion-datetime` インスタンスと関連付ける必要があります。そのため、[Inline Modals](./modal#inline-modals-recommended) と [Inline Popovers](./popover#inline-popovers) は `keepContentsMounted` プロパティを `true` に設定して使用しなければなりません。 +`ion-datetime-button` は、マウントされた `ion-datetime` インスタンスと関連付ける必要があります。そのため、[Inline Modals](./modal.mdx#inline-modals-recommended) と [Inline Popovers](./popover.mdx#inline-popovers) は `keepContentsMounted` プロパティを `true` に設定して使用しなければなりません。 ## プロパティ {/* #properties */} diff --git a/docs/api/datetime.mdx b/docs/api/datetime.mdx index 4c3b0cbbf74..d0f682decf1 100644 --- a/docs/api/datetime.mdx +++ b/docs/api/datetime.mdx @@ -1,5 +1,6 @@ --- title: 'ion-datetime' +description: 'Datetimeは、日付や時刻を選択するためのピッカーインターフェイスを提供します。IonicのAPI Datetime入力コンポーネントは、好みの形式を簡単に表示し、値を管理します。' --- import Props from '@ionic-internal/component-api/v9/datetime/props.mdx'; @@ -49,10 +50,6 @@ import WheelStyling from '@site/static/usage/v9/datetime/styling/wheel-styling/i ion-datetime: Ionic API Input for Datetime Format Picker - import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -97,7 +94,9 @@ JSON オブジェクトやデータベース内でのシリアライズやパー 12 時間表示の時計では「00」は「午前 12 時」、「13」は「午後 1 時」、「23」は「午後 11 時」を意味します。 :::note + 秒、ミリ秒、タイムゾーンは ISO 8601 datetime フォーマットで指定できますが、 `ion-datetime` は秒、ミリ秒、タイムゾーンを選択するためのインターフェイスを提供しません。秒、ミリ秒、タイムゾーンの値を指定しても無視されます。 + ::: ## 基本的な使い方 {/* #basic-usage */} @@ -106,7 +105,7 @@ JSON オブジェクトやデータベース内でのシリアライズやパー ## 日付ボタンと使う {/* #usage-with-datetime-button */} -モーダルやポップオーバーなどのオーバーレイで日付時刻を表示する必要がある場合は、 [ion-datetime-button](./datetime-button) を使用することをお勧めします。スペースに制約がある場合は、 `ion-datetime-button` を使用する必要があります。このコンポーネントは、現在の日付と時刻の値を表示するボタンを表示します。ボタンがタップされると、日付と時刻のピッカーがオーバーレイで表示されます。 +モーダルやポップオーバーなどのオーバーレイで日付時刻を表示する必要がある場合は、 [ion-datetime-button](./datetime-button.mdx) を使用することをお勧めします。スペースに制約がある場合は、 `ion-datetime-button` を使用する必要があります。このコンポーネントは、現在の日付と時刻の値を表示するボタンを表示します。ボタンがタップされると、日付と時刻のピッカーがオーバーレイで表示されます。 ## 非同期に値を設定する {/* #setting-values-asynchronously */} @@ -152,7 +151,9 @@ Ionic Framework では、[Intl.DatetimeFormat](https://developer.mozilla.org/en- :::note + 時間ラベルは自動的にローカライズされません。詳細は [時間ラベル](#time-label) を参照してください。 + ::: ### 時間サイクル {/* #hour-cycle */} @@ -169,7 +170,9 @@ Ionic Framework では、[Intl.DatetimeFormat](https://developer.mozilla.org/en- | `'h24'` | 1〜24 を使用する時間方式。パターンの `k` に対応し、24:00 から始まります。 | :::note + ソース: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle + ::: どの時間のサイクルを使用するか、もっとコントロールする必要があるシナリオがあるかもしれません。このような場合には、 `hourCycle` プロパティが役に立ちます。 @@ -199,7 +202,9 @@ Ionic Framework では、[Intl.DatetimeFormat](https://developer.mozilla.org/en- :::note + アプリで使用する前に、`Intl.Locale` の[ブラウザー互換性表](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale#browser_compatibility)を必ず確認してください。 + ::: ## プレゼンテーション {/* #presentation */} @@ -261,7 +266,9 @@ import Wheel from '@site/static/usage/v9/datetime/presentation/wheel/index.mdx'; `showAdjacentDays`が有効な場合、カレンダービューは常に 6 行表示されるため、グリッドを埋めるために必要に応じて前月または翌月の日が表示されます。例えば、ある月が週の初日に始まり、5 行目で終わるとしても、6 行目を完成させるために翌月の日が最後に表示されます。 :::note + このプロパティは、`presentation="date"` かつ `preferWheel="false"` の場合にのみサポートされます。 + ::: @@ -271,7 +278,9 @@ import Wheel from '@site/static/usage/v9/datetime/presentation/wheel/index.mdx'; `multiple`プロパティが`true`に設定されている場合、カレンダーピッカーから複数の日付を選択することができます。選択した日付をクリックすると選択が解除されます。 :::note + このプロパティは、`presentation="date"` かつ `preferWheel="false"` の場合にのみサポートされます。 + ::: @@ -326,12 +335,14 @@ Datetime はタイムゾーンを [操作したり設定したりしません](# `highlightedDates`プロパティを使用すると、開発者は特定の日付をカスタムテキストや背景色でスタイル設定することができます。このプロパティは、日付とその色の配列として定義するか、ISO 文字列を受け取って使用する色を返すコールバックとして定義することができます。 -色を指定する場合は、有効な CSS カラーフォーマットを使用できます。これには、16 進コード、赤・緑・青・透明度を指定する関数、[カラーバリエーション](../theming/colors)などが含まれます。 +色を指定する場合は、有効な CSS カラーフォーマットを使用できます。これには、16 進コード、赤・緑・青・透明度を指定する関数、[カラーバリエーション](../theming/colors.mdx)などが含まれます。 一貫したユーザーエクスペリエンスを維持するため、選択された日付のスタイルは常にカスタムハイライトよりも優先されます。 :::note + このプロパティは、`preferWheel="false"` かつ `presentation` が `"date"`、`"date-time"`、`"time-date"` のいずれかの場合にのみサポートされます。 + ::: ### 配列を利用 {/* #using-array */} @@ -350,7 +361,7 @@ Datetime はタイムゾーンを [操作したり設定したりしません](# ### グローバルテーマ {/* #global-theming */} -Ionic の強力なテーマシステムを使用すると、特定のテーマに合わせてアプリ全体を簡単に変更することができます。この例では、[Color Creator](../theming/colors#new-color-creator) と [Stepped Color Generator](../theming/themes#stepped-color-generator) を使用して、 `ion-datetime` で使用できるローズ色のパレットを作成しました。 +Ionic の強力なテーマシステムを使用すると、特定のテーマに合わせてアプリ全体を簡単に変更することができます。この例では、[Color Creator](../theming/colors.mdx#new-color-creator) と [Stepped Color Generator](../theming/themes.mdx#stepped-color-generator) を使用して、 `ion-datetime` で使用できるローズ色のパレットを作成しました。 この方法の利点は、`ion-datetime`だけでなく、すべてのコンポーネントが自動的にこのテーマを利用できることです。 @@ -361,7 +372,9 @@ Ionic の強力なテーマシステムを使用すると、特定のテーマ The datetime header manages the content for the `title` slot and the selected date. :::note + `preferWheel` が `true` の場合、選択した日付は表示されません。 + ::: @@ -379,7 +392,9 @@ The header can be styled using CSS shadow parts. The calendar days in a grid-style `ion-datetime` can be styled using CSS shadow parts. :::note + The example below selects the day 2 days ago, unless that day is in the previous month, then it selects a day 2 days in the future. This is done for demo purposes in order to show how to apply custom styling to all days, the current day, and the selected day. + ::: @@ -478,7 +493,7 @@ JavaScript で日付を扱うために [date-fns](https://date-fns.org) を使 #### 時刻、月、年のホイール {/* #time-month-and-year-wheels */} -Datetime のホイールピッカーは内部で [Picker](./picker) を使用しています。ホイールピッカーのアクセシビリティ機能の詳細は [Picker アクセシビリティ](./picker#accessibility) を参照してください。 +Datetime のホイールピッカーは内部で [Picker](./picker.mdx) を使用しています。ホイールピッカーのアクセシビリティ機能の詳細は [Picker アクセシビリティ](./picker.mdx#accessibility) を参照してください。 ## Interfaces {/* #interfaces */} diff --git a/docs/api/fab-button.mdx b/docs/api/fab-button.mdx index 328f71aedfd..588ec7cca9e 100644 --- a/docs/api/fab-button.mdx +++ b/docs/api/fab-button.mdx @@ -1,5 +1,6 @@ --- title: 'ion-fab-button' +description: 'フローティング・アクション・ボタン(FAB)は、アプリ内の主要なアクションを表します。アイコンは円形で、ボタンを押すと、関連するアクションを開くことができます。' --- import Props from '@ionic-internal/component-api/v9/fab-button/props.mdx'; @@ -11,10 +12,6 @@ import Slots from '@ionic-internal/component-api/v9/fab-button/slots.mdx'; ion-fab-button: Ionic FAB Button Icon for Primary Action - import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -23,9 +20,9 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill'; フローティングアクションボタン(FAB)は、アプリケーションの主要なアクションを表します。デフォルトでは、円形の形をしています。ボタンが押されると、関連するアクションがさらに開かれることもあります。 -その名が示すように、FABは一般的に固定された位置でコンテンツの上に浮かんでいます。これは、FABボタンを[fab](./fab)コンポーネントで包むことで実現されます。もしボタンがfabで包まれていない場合は、コンテンツと一緒にスクロールします。 +その名が示すように、FABは一般的に固定された位置でコンテンツの上に浮かんでいます。これは、FABボタンを[fab](./fab.mdx)コンポーネントで包むことで実現されます。もしボタンがfabで包まれていない場合は、コンテンツと一緒にスクロールします。 -使用例については、[fab ドキュメント](./fab) を参照してください。 +使用例については、[fab ドキュメント](./fab.mdx) を参照してください。 ## プロパティ {/* #properties */} diff --git a/docs/api/fab-list.mdx b/docs/api/fab-list.mdx index 9fb733abb4a..185d8ee1d5f 100644 --- a/docs/api/fab-list.mdx +++ b/docs/api/fab-list.mdx @@ -1,4 +1,5 @@ --- +description: 'ion-fab-list holds the fab buttons for actions related to the main fab button. It opens on click and can show its buttons on any side.' title: 'ion-fab-list' --- @@ -15,7 +16,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill'; `ion-fab-list` 要素は、複数のfab buttonのコンテナです。この一連のfab buttonには、メインのfab buttonに関連するアクションが含まれ、メインのfab buttonをクリックすると表示されます。ボタンを表示する方向を指定するためには、 `side` プロパティを'start', 'end', 'top', 'bottom' に設定します。 -使用例については、[fab ドキュメント](./fab) を参照してください。 +使用例については、[fab ドキュメント](./fab.mdx) を参照してください。 ## プロパティ {/* #properties */} diff --git a/docs/api/fab.mdx b/docs/api/fab.mdx index 0b1af7a1c07..65e87761530 100644 --- a/docs/api/fab.mdx +++ b/docs/api/fab.mdx @@ -1,5 +1,6 @@ --- title: 'ion-fab' +description: 'Fabs(フローティングアクションボタン)は、1つまたは複数のFabボタンを含むコンテナ要素です。Ionic FrameworkでAndroidおよびiOSアプリを作成する際にion-fabを使用します。' --- import Props from '@ionic-internal/component-api/v9/fab/props.mdx'; @@ -11,17 +12,13 @@ import Slots from '@ionic-internal/component-api/v9/fab/slots.mdx'; ion-fab: Ionic Floating Action Button for Android and iOS - import EncapsulationPill from '@components/page/api/EncapsulationPill'; -Fabは、1つ以上の[fabボタン](./fab-button)を含むコンテナ要素です。それらはコンテンツと一緒にスクロールしない固定位置に配置されるべきです。Fabは1つのメインFabボタンを持つべきです。また、メインファブボタンがクリックされたときに表示される関連ボタンを含む1つ以上の[fabリスト](./fab-list)を含むことができます。 +Fabは、1つ以上の[fabボタン](./fab-button.mdx)を含むコンテナ要素です。それらはコンテンツと一緒にスクロールしない固定位置に配置されるべきです。Fabは1つのメインFabボタンを持つべきです。また、メインファブボタンがクリックされたときに表示される関連ボタンを含む1つ以上の[fabリスト](./fab-list.mdx)を含むことができます。 ## 基本的な使い方 {/* #basic-usage */} @@ -31,7 +28,7 @@ import BasicUsage from '@site/static/usage/v9/fab/basic/index.mdx'; ## List Side {/* #list-side */} -[fabリスト](./fab-list)コンポーネントの`side`プロパティは、メインfabボタンと相対的に表示される場所を制御します。一つのfabは、`side`の値が全て異なる限り、複数のfabリストを持つことができます。 +[fabリスト](./fab-list.mdx)コンポーネントの`side`プロパティは、メインfabボタンと相対的に表示される場所を制御します。一つのfabは、`side`の値が全て異なる限り、複数のfabリストを持つことができます。 import ListSide from '@site/static/usage/v9/fab/list-side/index.mdx'; @@ -39,7 +36,7 @@ import ListSide from '@site/static/usage/v9/fab/list-side/index.mdx'; ## ポジション {/* #positioning */} -fabを固定位置に配置するためには、外側の [content](./content) コンポーネントの `fixed` スロットに割り当てる必要があります。vertical`とhorizontal`のプロップを使用して、ビューポートでのfabの配置を制御します。edge`プロップは、アプリのヘッダーやフッターにfabボタンが重なるようにします。 +fabを固定位置に配置するためには、外側の [content](./content.mdx) コンポーネントの `fixed` スロットに割り当てる必要があります。vertical`とhorizontal`のプロップを使用して、ビューポートでのfabの配置を制御します。edge`プロップは、アプリのヘッダーやフッターにfabボタンが重なるようにします。 import Positioning from '@site/static/usage/v9/fab/positioning/index.mdx'; @@ -47,7 +44,7 @@ import Positioning from '@site/static/usage/v9/fab/positioning/index.mdx'; ### セーフエリア {/* #safe-area */} -`ion-header`コンポーネントや`ion-footer`コンポーネントがない場合、fabはデバイスのノッチやステータスバー、その他のデバイスUIで覆われている可能性があります。このような場合、上下の [safe area](/theming/advanced.mdx#safe-area-padding) は考慮されません。これは [`--ion-safe-area-(dir)`変数](/theming/advanced.mdx#application-variables) を使って調整することができます。 +`ion-header`コンポーネントや`ion-footer`コンポーネントがない場合、fabはデバイスのノッチやステータスバー、その他のデバイスUIで覆われている可能性があります。このような場合、上下の [safe area](../theming/advanced.mdx#safe-area-padding) は考慮されません。これは [`--ion-safe-area-(dir)`変数](../theming/advanced.mdx#application-variables) を使って調整することができます。 `vertical`を`"top"`に設定したfabを `ion-header` なしで使用する場合は、上マージンを設定する必要があります: @@ -75,7 +72,7 @@ import SafeArea from '@site/static/usage/v9/fab/safe-area/index.mdx'; 無限にスクロールするリストなど、ビューに多くのインタラクティブ要素が含まれるシナリオでは、フローティングアクションボタン(FAB)がDOM内のすべてのアイテムの下に配置されていると、ユーザーがフローティングアクションボタンに移動するのが難しい場合があります。 -[Content](./content)の `fixedSlotPlacement` プロパティを `before` に設定することで、FABはDOM内のメインコンテンツの前に配置されます。これにより、他のインタラクティブ要素がフォーカスを受ける前にFABがキーボードフォーカスを受けるようになり、ユーザがFABにアクセスしやすくなります。 +[Content](./content.mdx)の `fixedSlotPlacement` プロパティを `before` に設定することで、FABはDOM内のメインコンテンツの前に配置されます。これにより、他のインタラクティブ要素がフォーカスを受ける前にFABがキーボードフォーカスを受けるようになり、ユーザがFABにアクセスしやすくなります。 import BeforeContent from '@site/static/usage/v9/fab/before-content/index.mdx'; diff --git a/docs/api/footer.mdx b/docs/api/footer.mdx index 1dc54c4d98a..94351a30444 100644 --- a/docs/api/footer.mdx +++ b/docs/api/footer.mdx @@ -1,5 +1,6 @@ --- title: 'ion-footer' +description: 'footerはページの下部に配置されるルートコンポーネントのことです。Ionicのfooterはion-toolbarのラッパーとして、コンテンツ領域が正しいサイズであることを確認することができます。' --- import Props from '@ionic-internal/component-api/v9/footer/props.mdx'; @@ -11,15 +12,11 @@ import Slots from '@ionic-internal/component-api/v9/footer/slots.mdx'; ion-footer: Page Footer | Ionic App Footer Root Component - import EncapsulationPill from '@components/page/api/EncapsulationPill'; -フッターは、ページの下部に配置されるページのルートコンポーネントです。1つ以上の [ツールバー](./toolbar) のラッパーとして使用することが推奨されますが、あらゆる要素をラップするために使用することができます。ツールバーがフッターの中で使用される場合、コンテンツは正しいサイズに調整され、フッターはデバイスセーフエリアを考慮したものになります。 +フッターは、ページの下部に配置されるページのルートコンポーネントです。1つ以上の [ツールバー](./toolbar.mdx) のラッパーとして使用することが推奨されますが、あらゆる要素をラップするために使用することができます。ツールバーがフッターの中で使用される場合、コンテンツは正しいサイズに調整され、フッターはデバイスセーフエリアを考慮したものになります。 ## 基本的な使い方 {/* #basic-usage */} diff --git a/docs/api/grid.mdx b/docs/api/grid.mdx index ef0cf8f16e6..cbff21e686c 100644 --- a/docs/api/grid.mdx +++ b/docs/api/grid.mdx @@ -1,5 +1,6 @@ --- title: 'ion-grid' +description: 'Ion-Gridは、12カラムのレイアウトと画面サイズに応じて異なるブレークポイントを持つカスタムアプリケーションの表示レイアウトを構築するためのモバイルファーストのフレックスボックスシステムです。' --- import Props from '@ionic-internal/component-api/v9/grid/props.mdx'; @@ -11,10 +12,6 @@ import Slots from '@ionic-internal/component-api/v9/grid/slots.mdx'; ion-grid: Display Grids for Mobile-First Custom App Layout - import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -34,7 +31,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill'; - サイズが設定されていない列は、自動的に等しい幅になります。例えば、4 列がある場合、それぞれ自動的に 25%の幅になります。 - 列の幅はパーセンテージで設定されるため、常に可変であり、親要素に対して相対的にサイズが調整されます。 - 個々の列の間にはパディングがあります。ただし、グリッドと列に`ion-no-padding`クラスを追加することで - パディングを削除することができます。グリッドに適用できるその他のスタイルについては、[CSS ユーティリティ](../layout/css-utilities)を参照してください。 + パディングを削除することができます。グリッドに適用できるその他のスタイルについては、[CSS ユーティリティ](../layout/css-utilities.mdx)を参照してください。 - グリッドには、5 つのグリッド階層があります。それぞれのレスポンシブブレークポイントに対応しています:すべてのブレークポイント(超小)、小、中、大、超大です。 - グリッド階層は最小幅を基準にしており、その階層およびそれ以上の大きさの階層に適用されます (例:`size-sm="4"`は小、中、大、超大のデバイスに適用されます)。 @@ -42,15 +39,15 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill'; ## デフォルトのブレイキング・ポイント {/* #default-breakpoints */} -グリッドのデフォルトのブレークポイントと、それに対応するプロパティは以下の表で定義されています。現時点ではブレークポイントの値をカスタマイズすることはできません。カスタマイズできない理由については、[メディアクエリの変数](../theming/advanced#variables-in-media-queries)を参照してください。 +グリッドのデフォルトのブレークポイントと、それに対応するプロパティは以下の表で定義されています。現時点ではブレークポイントの値をカスタマイズすることはできません。カスタマイズできない理由については、[メディアクエリの変数](../theming/advanced.mdx#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 */} @@ -148,7 +145,7 @@ import PushPullResponsive from '@site/static/usage/v9/grid/push-pull-responsive/ ### 垂直方向のアライメント {/* #vertical-alignment */} -すべての列は、行に異なるクラスを追加することで垂直に整列させることができます。使用可能なクラスのリストは[CSS ユーティリティ](/layout/css-utilities#flex-container-properties)を参照してください。 +すべての列は、行に異なるクラスを追加することで垂直に整列させることができます。使用可能なクラスのリストは[CSS ユーティリティ](../layout/css-utilities.mdx#flex-container-properties)を参照してください。 import VerticalAlignment from '@site/static/usage/v9/grid/vertical-alignment/index.mdx'; @@ -156,7 +153,7 @@ import VerticalAlignment from '@site/static/usage/v9/grid/vertical-alignment/ind ### 水平アライメント {/* #horizontal-alignment */} -すべての列は、行に異なるクラスを追加することで水平方向に整列させることができます。使用可能なクラスのリストは[CSS ユーティリティ](/layout/css-utilities.mdx#flex-container-properties)を参照してください。 +すべての列は、行に異なるクラスを追加することで水平方向に整列させることができます。使用可能なクラスのリストは[CSS ユーティリティ](../layout/css-utilities.mdx#flex-container-properties)を参照してください。 import HorizontalAlignment from '@site/static/usage/v9/grid/horizontal-alignment/index.mdx'; diff --git a/docs/api/header.mdx b/docs/api/header.mdx index 1ed80f2cdec..c69ba99ac92 100644 --- a/docs/api/header.mdx +++ b/docs/api/header.mdx @@ -1,5 +1,6 @@ --- title: 'ion-header' +description: 'ion-headerは、ツールバーを保持する親コンポーネントです。ion-headerは、ページの3つのルート要素のうちの1つである必要があることに注意することが重要です。' --- import Props from '@ionic-internal/component-api/v9/header/props.mdx'; @@ -11,15 +12,11 @@ import Slots from '@ionic-internal/component-api/v9/header/slots.mdx'; ion-header: Header Parent Component for Ionic Framework Apps - import EncapsulationPill from '@components/page/api/EncapsulationPill'; -ヘッダーは、ページの上部に配置されるページのルートコンポーネントです。1つ以上の[ツールバー](./toolbar)のラッパーとして使用することが推奨されていますが、あらゆる要素をラップするために使用することができます。ツールバーがヘッダー内で使用される場合、コンテンツは正しいサイズになるように調整され、ヘッダーはデバイスセーフ領域を考慮します。 +ヘッダーは、ページの上部に配置されるページのルートコンポーネントです。1つ以上の[ツールバー](./toolbar.mdx)のラッパーとして使用することが推奨されていますが、あらゆる要素をラップするために使用することができます。ツールバーがヘッダー内で使用される場合、コンテンツは正しいサイズになるように調整され、ヘッダーはデバイスセーフ領域を考慮します。 ## 基本的な使い方 {/* #basic-usage */} diff --git a/docs/api/icon.mdx b/docs/api/icon.mdx index 35ec225ab96..d64a7d693f8 100644 --- a/docs/api/icon.mdx +++ b/docs/api/icon.mdx @@ -1,13 +1,10 @@ --- title: 'ion-icon' +description: 'Ion-icon is a component for displaying premium designed icons with support for SVG and web font.' --- ion-icon: Icon Component for Ionic Framework Apps - Icon は、アイコンを表示するための汎用コンテナです。[Ionicons](https://ionic.io/ionicons) はすべての Ionic Framework アプリケーションにデフォルトで含まれていますが、このコンポーネントでは Ionicons、カスタム SVG、フォントベースのアイコンライブラリ、そのほかのアイコンシステムも表示できます。アイコンの提供元にかかわらず、一貫したスタイルとサイズを提供します。 diff --git a/docs/api/img.mdx b/docs/api/img.mdx index b20bdbbaff1..caba885387a 100644 --- a/docs/api/img.mdx +++ b/docs/api/img.mdx @@ -1,5 +1,6 @@ --- title: 'ion-img' +description: 'ion-img コンポーネントは、画像がビューポートに入ると遅延読み込みを行います。遅延読み込みを指定したネイティブの img タグが推奨されるため、ion-img は非推奨です。' --- import Props from '@ionic-internal/component-api/v9/img/props.mdx'; @@ -11,10 +12,6 @@ import Slots from '@ionic-internal/component-api/v9/img/slots.mdx'; ion-img: Img Tag to Lazy Load Images in Viewport - import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -22,7 +19,9 @@ 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.mdx#img) for details on replacing events and styling. + ::: Img は、タグがビューポートに表示されているときに画像をLazy Loadするタグです。これは、画像が表示されているときにのみロードされるため、巨大なリストを生成する場合に非常に便利です。このコンポーネントは [Intersection Observer](https://caniuse.com/#feat=intersectionobserver) を内部的に使用します。Intersection Observerは、最近のほとんどのブラウザでサポートされていますが、サポートされていない場合は `setTimeout` で処理されます。 diff --git a/docs/api/infinite-scroll-content.mdx b/docs/api/infinite-scroll-content.mdx index fa4ddfedd78..115457321e0 100644 --- a/docs/api/infinite-scroll-content.mdx +++ b/docs/api/infinite-scroll-content.mdx @@ -1,5 +1,6 @@ --- title: 'ion-infinite-scroll-content' +description: 'ion-infinite-scroll-content is the default child of ion-infinite-scroll. It shows a platform-specific spinner while more content loads.' --- import Props from '@ionic-internal/component-api/v9/infinite-scroll-content/props.mdx'; diff --git a/docs/api/infinite-scroll.mdx b/docs/api/infinite-scroll.mdx index 4578ca86f9c..0dce6f01688 100644 --- a/docs/api/infinite-scroll.mdx +++ b/docs/api/infinite-scroll.mdx @@ -1,5 +1,6 @@ --- title: 'ion-infinite-scroll' +description: 'ion-infinite-scrollコンポーネントは、ユーザーがページの下部または上部から指定された距離だけスクロールしたときに実行されるアクションを呼び出します。' --- import Props from '@ionic-internal/component-api/v9/infinite-scroll/props.mdx'; @@ -11,10 +12,6 @@ import Slots from '@ionic-internal/component-api/v9/infinite-scroll/slots.mdx'; ion-infinite-scroll: Infinite Scroller Action Component - import EncapsulationPill from '@components/page/api/EncapsulationPill'; diff --git a/docs/api/input-otp.mdx b/docs/api/input-otp.mdx index 4fdb6fe6bae..9e3f1e6b856 100644 --- a/docs/api/input-otp.mdx +++ b/docs/api/input-otp.mdx @@ -1,5 +1,6 @@ --- title: 'ion-input-otp' +description: 'ion-input-otp は、ワンタイムパスワード (OTP) を入力するためのコンポーネントで、複数の入力ボックスと自動フォーカス管理をサポートしています。' --- import Props from '@ionic-internal/component-api/v9/input-otp/props.mdx'; @@ -11,10 +12,6 @@ import Slots from '@ionic-internal/component-api/v9/input-otp/slots.mdx'; ion-input-otp: ワンタイムパスワード入力コンポーネント - import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -113,6 +110,7 @@ import States from '@site/static/usage/v9/input-otp/states/index.mdx'; このコンポーネントは、指定されたパターンにマッチしない文字の入力を防ぎます。開発者は、特定の入力要件に一致する独自のパターン文字列を提供することで、これらのデフォルトをオーバーライドできます。 :::tip + カスタム `pattern` を使用する場合、`type` プロパティがモバイルデバイスに表示されるキーボードを制御することを覚えておいてください: - 数字のみのパターンには `type="number"` を使い、数字キーボードを表示します。 @@ -130,7 +128,9 @@ import Pattern from '@site/static/usage/v9/input-otp/pattern/index.mdx'; `color`プロパティは入力ボックスのカラーパレットを変更します。アウトライン塗りつぶしの場合、このプロパティはキャレットカラー、ハイライトカラー、ボーダーカラーを変更します。 `solid` 塗りつぶしの場合、このプロパティはキャレットカラーとハイライトカラーを変更します。 :::note + 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/v9/input-otp/theming/colors/index.mdx'; @@ -153,14 +153,14 @@ Input OTPのキーボードナビゲーションは、[ARIA Authoring Practices コンポーネントが無効になっていない場合、これらのキーボード操作はすべての `ion-input-otp` 要素に適用されます。 -| 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/input-password-toggle.mdx b/docs/api/input-password-toggle.mdx index 4c8e0c63999..6db4cf86054 100644 --- a/docs/api/input-password-toggle.mdx +++ b/docs/api/input-password-toggle.mdx @@ -1,5 +1,6 @@ --- title: 'ion-input-password-toggle' +description: 'ion-input-password-toggle is a companion component to ion-input. It allows users to toggle the visibility of text in a password input.' --- import Props from '@ionic-internal/component-api/v9/input-password-toggle/props.mdx'; @@ -11,23 +12,19 @@ import Slots from '@ionic-internal/component-api/v9/input-password-toggle/slots. ion-input-password-toggle: Toggle the visibility of a password in Input - import EncapsulationPill from '@components/page/api/EncapsulationPill'; -The InputPasswordToggle component is a companion component to [Input](./input). It allows users to toggle the visibility of text in a password input. +The InputPasswordToggle component is a companion component to [Input](./input.mdx). It allows users to toggle the visibility of text in a password input. ## Basic Usage {/* #basic-usage */} :::info -InputPasswordToggle must be used with an [Input](./input) that has its [`type`](./input.mdx#prop-type) property set to either `'text'` or `'password'`. +InputPasswordToggle must be used with an [Input](./input.mdx) that has its [`type`](./input.mdx#prop-type) property set to either `'text'` or `'password'`. Using any other `type` will cause a warning to be logged. diff --git a/docs/api/input.mdx b/docs/api/input.mdx index 8b8796d13cc..72abbe286c2 100644 --- a/docs/api/input.mdx +++ b/docs/api/input.mdx @@ -1,5 +1,6 @@ --- title: 'ion-input' +description: 'ion-inputは、HTMLのinput要素のラッパーで、カスタムな値型のスタイルと機能を備えています。デスクトップでも動作し、モバイルではキーボードと統合されます。' --- import Props from '@ionic-internal/component-api/v9/input/props.mdx'; @@ -11,10 +12,6 @@ import Slots from '@ionic-internal/component-api/v9/input/slots.mdx'; ion-input: Custom Input With Styling and CSS Properties - import EncapsulationPill from '@components/page/api/EncapsulationPill'; @@ -86,7 +83,9 @@ Material Design では、Inputに塗りつぶしのスタイルが用意され Filled inputs をiOSで使うためには、inputの `mode` を `md` に設定する必要があります。 :::warning + コンポーネント間のスタイリングの競合のため、`fill`を使用する入力は`ion-item`内で使用すべきではありません。 + ::: import Fill from '@site/static/usage/v9/input/fill/index.mdx'; @@ -156,9 +155,11 @@ Please submit bug reports with Maskito to the [Maskito Github repository](https: この機能は [Web Component slots](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots) のシミュレート版に依存しているため、実験的なものであることに注意してください。そのため、シミュレートされた動作はネイティブのスロットの動作と完全に一致するとは限りません。 :::note -ほとんどの場合、これらのスロットに配置された[Icon](./icon.mdx)コンポーネントは`aria-hidden="true"`を持つべきです。詳細については、[Iconアクセシビリティのドキュメント](https://ionicframework.com/docs/api/icon#accessibility)を参照してください。 + +ほとんどの場合、これらのスロットに配置された[Icon](./icon.mdx)コンポーネントは`aria-hidden="true"`を持つべきです。詳細については、[Iconアクセシビリティのドキュメント](./icon.mdx#accessibility)を参照してください。 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/v9/input/start-end-slots/index.mdx'; @@ -172,7 +173,9 @@ import StartEndSlots from '@site/static/usage/v9/input/start-end-slots/index.mdx `color`プロパティを設定すると、各Inputのカラーパレットが変更されます。 `ios`モードでは、このプロパティはキャレットカラーを変更します。 `md`モードでは、このプロパティはキャレットカラーとハイライト/アンダーラインカラーを変更します。 :::note + 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/v9/input/theming/colors/index.mdx'; diff --git a/docs/api/item-divider.mdx b/docs/api/item-divider.mdx index 39ce786403d..6c6779d0627 100644 --- a/docs/api/item-divider.mdx +++ b/docs/api/item-divider.mdx @@ -1,5 +1,6 @@ --- title: 'ion-item-divider' +description: 'Item Dividersは、リスト内のアイテムを区切るために使用するブロック要素です。リストヘッダーに似ていますが、項目のグループの間に挟みます。' --- import Props from '@ionic-internal/component-api/v9/item-divider/props.mdx'; @@ -11,17 +12,13 @@ import Slots from '@ionic-internal/component-api/v9/item-divider/slots.mdx'; ion-item-divider: Item Divider Block Element for Ionic Apps - import EncapsulationPill from '@components/page/api/EncapsulationPill'; -アイテムディバイダは、リスト内の [アイテム](./item) を区切るために使用できるブロック要素です。リストヘッダーと似ていますが、リストの一番上に置くだけでなく、アイテムのグループの間に置く必要があります。 +アイテムディバイダは、リスト内の [アイテム](./item.mdx) を区切るために使用できるブロック要素です。リストヘッダーと似ていますが、リストの一番上に置くだけでなく、アイテムのグループの間に置く必要があります。 ## 基本的な使い方 {/* #basic-usage */} diff --git a/docs/api/item-group.mdx b/docs/api/item-group.mdx index 1827a3044e2..ea6afa8f512 100644 --- a/docs/api/item-group.mdx +++ b/docs/api/item-group.mdx @@ -1,5 +1,6 @@ --- title: 'ion-item-group' +description: 'ion-item-groupには、アイテムを複数のセクションに分割するためのアイテムディバイダを含めることができます。' --- import Props from '@ionic-internal/component-api/v9/item-group/props.mdx'; @@ -11,15 +12,11 @@ import Slots from '@ionic-internal/component-api/v9/item-group/slots.mdx'; ion-item-group: Group Items to Divide into Multiple Sections - import EncapsulationPill from '@components/page/api/EncapsulationPill'; -アイテムグループとは、類似の[アイテム](./item)をまとめて整理するためのコンテナです。アイテムグループには、アイテムを複数のセクションに分けるための[アイテムディバイダー](./item-divider)を含めることができます。また、[スライドアイテム](./item-sliding)をグループ化するために使用することができます。 +アイテムグループとは、類似の[アイテム](./item.mdx)をまとめて整理するためのコンテナです。アイテムグループには、アイテムを複数のセクションに分けるための[アイテムディバイダー](./item-divider.mdx)を含めることができます。また、[スライドアイテム](./item-sliding.mdx)をグループ化するために使用することができます。 ## 基本的な使い方 {/* #basic-usage */} diff --git a/docs/api/item-option.mdx b/docs/api/item-option.mdx index 6d581897318..95d84ba6c64 100644 --- a/docs/api/item-option.mdx +++ b/docs/api/item-option.mdx @@ -1,5 +1,6 @@ --- title: 'ion-item-option' +description: 'ion-item-optionはion-item-slidingのオプションボタンで、ion-item-optionsの中に配置する必要があります。プロパティの詳細については、こちらをご覧ください。' --- import Props from '@ionic-internal/component-api/v9/item-option/props.mdx'; @@ -11,19 +12,15 @@ import Slots from '@ionic-internal/component-api/v9/item-option/slots.mdx'; ion-item-option: Option Button for Sliding Item in Ionic - import EncapsulationPill from '@components/page/api/EncapsulationPill'; -アイテムオプションコンポーネントは、スライドアイテムのためのボタンです。[アイテムオプション](./item-options)の中に配置する必要があります。`ionSwipe`イベントと `expandable` プロパティを組み合わせることで、アイテムの完全なスワイプアクションを作成することができます。 +アイテムオプションコンポーネントは、スライドアイテムのためのボタンです。[アイテムオプション](./item-options.mdx)の中に配置する必要があります。`ionSwipe`イベントと `expandable` プロパティを組み合わせることで、アイテムの完全なスワイプアクションを作成することができます。 -詳細については、[item sliding](./item-sliding)のドキュメントを参照してください。 +詳細については、[item sliding](./item-sliding.mdx)のドキュメントを参照してください。 ## プロパティ {/* #properties */} diff --git a/docs/api/item-options.mdx b/docs/api/item-options.mdx index 4f2ea42edc4..5030880a960 100644 --- a/docs/api/item-options.mdx +++ b/docs/api/item-options.mdx @@ -1,5 +1,6 @@ --- title: 'ion-item-options' +description: 'ion-item-optionsはion-item-slidingのためのものです。このオプションボタンは、開始側と終了側のどちらにも配置することができます。Ionicアプリでの使用については、こちらをご覧ください。' --- import Props from '@ionic-internal/component-api/v9/item-options/props.mdx'; @@ -11,24 +12,20 @@ import Slots from '@ionic-internal/component-api/v9/item-options/slots.mdx'; ion-item-options: Option Button Components for Ionic Apps - import EncapsulationPill from '@components/page/api/EncapsulationPill'; -アイテムオプションコンポーネントは、スライドアイテムの[アイテムオプション](./item-option)ボタンのためのコンテナです。これらのボタンは、[startまたはend](#side-description)のいずれかに配置することができます。 +アイテムオプションコンポーネントは、スライドアイテムの[アイテムオプション](./item-option.mdx)ボタンのためのコンテナです。これらのボタンは、[startまたはend](#side-description)のいずれかに配置することができます。 -詳細については、[item sliding](./item-sliding)のドキュメントを参照してください。 +詳細については、[item sliding](./item-sliding.mdx)のドキュメントを参照してください。 ## 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 */} diff --git a/docs/api/item-sliding.mdx b/docs/api/item-sliding.mdx index f61dd53682e..eff4721c3dc 100644 --- a/docs/api/item-sliding.mdx +++ b/docs/api/item-sliding.mdx @@ -1,5 +1,6 @@ --- title: 'ion-item-sliding' +description: 'ion-item-sliding コンポーネントには、ドラッグしてボタンを表示するアイテムが含まれています。スライドしたアイテムが左から右にスワイプされると、オプションが表示されます。' --- import Props from '@ionic-internal/component-api/v9/item-sliding/props.mdx'; @@ -11,19 +12,15 @@ import Slots from '@ionic-internal/component-api/v9/item-sliding/slots.mdx'; ion-item-sliding: Slide Buttons | Slide Right to Left - import EncapsulationPill from '@components/page/api/EncapsulationPill'; -スライドアイテムには、ドラッグしてオプションボタンを表示させることができるアイテムが含まれています。子要素として [item](./item) コンポーネントが必要です。表示させるオプションはすべて [item options](./item-options) 要素に記述する必要があります。 +スライドアイテムには、ドラッグしてオプションボタンを表示させることができるアイテムが含まれています。子要素として [item](./item.mdx) コンポーネントが必要です。表示させるオプションはすべて [item options](./item-options.mdx) 要素に記述する必要があります。 ## 基本的な使い方 {/* #basic-usage */} -スライドアイテムのオプションは、デフォルトではアイテムの `"end"` 側に配置されます。つまり、LTRでは右から左へ、RTLでは左から右へスワイプすると、オプションが表示されます。反対側に配置し、反対方向にスワイプしたときに表示されるようにするには、 [item options](./item-options) 要素の side 属性を `"start"` に設定します。アイテムオプションは最大2つまで同時に使用することができ、スワイプの方向によって2つの異なるオプションを表示させることができます。 +スライドアイテムのオプションは、デフォルトではアイテムの `"end"` 側に配置されます。つまり、LTRでは右から左へ、RTLでは左から右へスワイプすると、オプションが表示されます。反対側に配置し、反対方向にスワイプしたときに表示されるようにするには、 [item options](./item-options.mdx) 要素の side 属性を `"start"` に設定します。アイテムオプションは最大2つまで同時に使用することができ、スワイプの方向によって2つの異なるオプションを表示させることができます。 import Basic from '@site/static/usage/v9/item-sliding/basic/index.mdx'; @@ -31,7 +28,7 @@ import Basic from '@site/static/usage/v9/item-sliding/basic/index.mdx'; ## Icon Options {/* #icon-options */} -[アイテムオプション](./item-option) でアイコンをテキストと一緒に配置すると、デフォルトでテキストの上にアイコンを表示します。アイコンのスロットは、利用可能な [アイテムオプションスロット](./item-option#slots) に変更することで位置を変更することが可能です。 +[アイテムオプション](./item-option.mdx) でアイコンをテキストと一緒に配置すると、デフォルトでテキストの上にアイコンを表示します。アイコンのスロットは、利用可能な [アイテムオプションスロット](./item-option.mdx#slots) に変更することで位置を変更することが可能です。 import Icons from '@site/static/usage/v9/item-sliding/icons/index.mdx'; @@ -39,7 +36,7 @@ import Icons from '@site/static/usage/v9/item-sliding/icons/index.mdx'; ## 拡張可能なオプション {/* #expandable-options */} -オプションは、スワイプがあるポイントを超えると、親となる `ion-item` の幅いっぱいに展開されます。これは、[item options](./item-options) の `ionSwipe` イベントと組み合わせることで、アイテムが完全にスワイプされたときにメソッドを呼び出すことができます。 +オプションは、スワイプがあるポイントを超えると、親となる `ion-item` の幅いっぱいに展開されます。これは、[item options](./item-options.mdx) の `ionSwipe` イベントと組み合わせることで、アイテムが完全にスワイプされたときにメソッドを呼び出すことができます。 import Expandable from '@site/static/usage/v9/item-sliding/expandable/index.mdx'; diff --git a/docs/api/item.mdx b/docs/api/item.mdx index fa670ba4ff1..c0d11589fea 100644 --- a/docs/api/item.mdx +++ b/docs/api/item.mdx @@ -1,5 +1,6 @@ --- title: 'ion-item' +description: 'iOS/Android用ion-item要素は、テキスト、アイコン、画像、その他のカスタム要素を含みます。これらはリストに配置され、入力、削除、編集などが可能です。' --- import Props from '@ionic-internal/component-api/v9/item/props.mdx'; @@ -17,21 +18,17 @@ import TabItem from '@theme/TabItem'; ion-item: Input, Edit, or Delete iOS and Android Item Elements - import EncapsulationPill from '@components/page/api/EncapsulationPill'; -アイテムは、テキスト、アイコン、アバター、画像、Input、その他のネイティブまたはカスタム要素を含むことができる要素です。アイテムは他のアイテムと一緒に[リスト](./list)の行としてのみ使用してください。アイテムはスワイプ、削除、並び替え、編集などができます。 +アイテムは、テキスト、アイコン、アバター、画像、Input、その他のネイティブまたはカスタム要素を含むことができる要素です。アイテムは他のアイテムと一緒に[リスト](./list.mdx)の行としてのみ使用してください。アイテムはスワイプ、削除、並び替え、編集などができます。 ## 基本的な使い方 {/* #basic-usage */} -アイテムはテキストを左揃えにし、テキストがアイテムより広い場合は折り返されます。この動作は、Ionic Frameworkが提供するCSSユーティリティを使用して変更することができます。以下の例では`.ion-text-nowrap`を使用しています。アイテム内のテキストを変換するために追加できる他のクラスについては、[CSSユーティリティのドキュメント](/layout/css-utilities.mdx)を参照してください。 +アイテムはテキストを左揃えにし、テキストがアイテムより広い場合は折り返されます。この動作は、Ionic Frameworkが提供するCSSユーティリティを使用して変更することができます。以下の例では`.ion-text-nowrap`を使用しています。アイテム内のテキストを変換するために追加できる他のクラスについては、[CSSユーティリティのドキュメント](../layout/css-utilities.mdx)を参照してください。 import Basic from '@site/static/usage/v9/item/basic/index.mdx'; @@ -43,7 +40,7 @@ import Basic from '@site/static/usage/v9/item/basic/index.mdx'; ### 補助ビジュアル {/* #supporting-visuals */} -補助ビジュアル 補助ビジュアルはアイテムの装飾アイコンやその他の飾りです。サポーティングビジュアルの一般的な例は、[アバター](./avatar)、 [アイコン](./icon)、[サムネイル](./thumbnail)です。このコンテンツはアイテムの意図を理解するために必要ではないので、通常`aria-hidden="true"`を使ってスクリーンリーダーから隠されます。 +補助ビジュアル 補助ビジュアルはアイテムの装飾アイコンやその他の飾りです。サポーティングビジュアルの一般的な例は、[アバター](./avatar.mdx)、 [アイコン](./icon.mdx)、[サムネイル](./thumbnail.mdx)です。このコンテンツはアイテムの意図を理解するために必要ではないので、通常`aria-hidden="true"`を使ってスクリーンリーダーから隠されます。 アイコン・ボタンのように、アイテムとのインタラクションにビジュアルが必要な場合、そのビジュアルはサポート・ビジュアルではなく、 [アクション](#actions) となります。 @@ -103,7 +100,7 @@ import SupportingVisuals from '@site/static/usage/v9/item/content-types/supporti トグルの "Allow Notifications"ラベルの下には、ユーザーが通知を無効にできることを示すテキストが追加されています。このテキストは短いので、アイテムの内側に配置されています。 -そのリストの下には、 [Note](./note) の下に長いテキストを含むtextareaを含む別のリストがあります。textareaは、長いテキストが他のフィールドではなく、textareaに関連付けられていることを明らかにするために、それ自身のリストに配置されました。 +そのリストの下には、 [Note](./note.mdx) の下に長いテキストを含むtextareaを含む別のリストがあります。textareaは、長いテキストが他のフィールドではなく、textareaに関連付けられていることを明らかにするために、それ自身のリストに配置されました。 import Text from '@site/static/usage/v9/item/content-types/text/index.mdx'; @@ -111,7 +108,7 @@ import Text from '@site/static/usage/v9/item/content-types/text/index.mdx'; ### メタデータ {/* #metadata */} -メタデータは、ステータステキストやカウントのようなアイテムの追加コンテキストを提供します。[バッジ](./badge)や[注記](./note)のようなコンポーネントは、メタデータを表示する素晴らしい方法です。 +メタデータは、ステータステキストやカウントのようなアイテムの追加コンテキストを提供します。[バッジ](./badge.mdx)や[注記](./note.mdx)のようなコンポーネントは、メタデータを表示する素晴らしい方法です。 -以下の例では、異なる種類のメタデータを持つ2つのリストを作成している。最初のリストは[Note](./note)を使って、それぞれのToDoリストにいくつのタスクがあるかを表示している。 +以下の例では、異なる種類のメタデータを持つ2つのリストを作成している。最初のリストは[Note](./note.mdx)を使って、それぞれのToDoリストにいくつのタスクがあるかを表示している。 つ目のリストは、iOSのメールアプリを真似て受信トレイを表示しています。このリストでは、"開始"スロットに "未読メッセージ"インジケータ、"終了"スロットにタイムスタンプとカスタム詳細アイコンを含むカスタムメタデータを使用しています。"未読メッセージ"インジケータは、未読メッセージにユーザーの注意を引くために青くハイライトされ、タイムスタンプはより控えめです。 @@ -323,7 +320,7 @@ export class ExampleComponent {} -JavaScript では、`ion-item` に `router-link` 属性を設定し、[ion-router](./router) を使用して移動します。 +JavaScript では、`ion-item` に `router-link` 属性を設定し、[ion-router](./router.mdx) を使用して移動します。 ```html @@ -441,10 +438,10 @@ import CSSProps from '@site/static/usage/v9/item/theming/css-properties/index.md 以下のガイドラインは、リスト項目を理解しやすく、使いやすくするのに役立ちます。 -1. アイテムは [Lists](./list) の中だけで使用してください。 +1. アイテムは [Lists](./list.mdx) の中だけで使用してください。 2. リスト内のアイテムは、一貫したフォーマットで表示されるべきです。例えば、アイテムに装飾的なアイコンを表示する場合、アイコンはアイテム間で同じように配置されるべきです。 3. アイテムは決して[入れ子になったインタラクティヴ](https://dequeuniversity.com/rules/axe/4.4/nested-interactive)をレンダリングすべきではありません。入れ子になったインタラクティブ要素が使用されている場合、スクリーンリーダーは正しいインタラクティブ要素を選択することができません。例えば、`button="true"`を持つ`ion-item`の中にボタンを置くことは避けてください。 -4. [コンテンツタイプ](#content-types)を正しく使用してください。Item コンポーネントは、[リスト](./list)内の行として設計されており、汎用コンテナとして使用すべきではありません。 +4. [コンテンツタイプ](#content-types)を正しく使用してください。Item コンポーネントは、[リスト](./list.mdx)内の行として設計されており、汎用コンテナとして使用すべきではありません。 ## アクセシビリティ {/* #accessibility */} @@ -465,10 +462,10 @@ An `` has the following keyboard interactions when any of these condit When an `` renders a native `