From 719f570a4b16af039a802b875d68d135305c340c Mon Sep 17 00:00:00 2001 From: rdlabo Date: Fri, 20 Nov 2026 16:19:36 +0900 Subject: [PATCH] Document theme-specific markup and preferred overlay actions --- projects/docs/preview/markup.ts | 18 + projects/docs/src/app/docs/guide-article.ts | 10 +- projects/docs/src/app/docs/markup-preview.ts | 9 +- .../app/generated/guide-content.generated.ts | 314 ++++++++++++++++-- projects/docs/src/guides/de/special-markup.md | 122 ++++++- projects/docs/src/guides/en/special-markup.md | 120 ++++++- projects/docs/src/guides/fr/special-markup.md | 122 ++++++- projects/docs/src/guides/ja/special-markup.md | 117 ++++++- scripts/site-contract.test.ts | 6 +- scripts/standard-setup.ts | 30 +- 10 files changed, 800 insertions(+), 68 deletions(-) diff --git a/projects/docs/preview/markup.ts b/projects/docs/preview/markup.ts index c74c4b7..415ab92 100644 --- a/projects/docs/preview/markup.ts +++ b/projects/docs/preview/markup.ts @@ -1,3 +1,12 @@ +import { defineCustomElement as defineToggle } from '@ionic/core/components/ion-toggle.js'; +import { defineCustomElement as defineSearchbar } from '@ionic/core/components/ion-searchbar.js'; +import { defineCustomElement as defineTitle } from '@ionic/core/components/ion-title.js'; +import { defineCustomElement as defineHeader } from '@ionic/core/components/ion-header.js'; +import { defineCustomElement as defineText } from '@ionic/core/components/ion-text.js'; +import { defineCustomElement as defineTabButton } from '@ionic/core/components/ion-tab-button.js'; +import { defineCustomElement as defineTabBar } from '@ionic/core/components/ion-tab-bar.js'; +import { defineCustomElement as defineAlert } from '@ionic/core/components/ion-alert.js'; +import { defineCustomElement as defineActionSheet } from '@ionic/core/components/ion-action-sheet.js'; import { addIcons } from 'ionicons'; import { mailOutline, chatbubblesOutline } from 'ionicons/icons'; import { defineCustomElement as defineButtons } from '@ionic/core/components/ion-buttons.js'; @@ -30,3 +39,12 @@ defineSegment(); defineSegmentButton(); defineContent(); defineToolbar(); +defineAlert(); +defineActionSheet(); +defineTabBar(); +defineTabButton(); +defineText(); +defineHeader(); +defineTitle(); +defineSearchbar(); +defineToggle(); diff --git a/projects/docs/src/app/docs/guide-article.ts b/projects/docs/src/app/docs/guide-article.ts index 04a938f..3e08972 100644 --- a/projects/docs/src/app/docs/guide-article.ts +++ b/projects/docs/src/app/docs/guide-article.ts @@ -9,10 +9,10 @@ import { guideCopyForLocale } from '../../../../../shared/guide-navigation'; export interface GuideContent { readonly title: string; readonly description: string; - readonly html: string; + readonly html?: string; readonly headings: readonly { readonly id: string; readonly text: string }[]; readonly editUrl: string; - readonly previewSections?: readonly { readonly intro: string; readonly code: string; readonly label: string; readonly themes: 'all' | 'ios' | 'md' }[]; + readonly previewSections?: readonly { readonly tallPreview?: boolean; readonly intro: string; readonly code: string; readonly label: string; readonly themes: 'all' | 'ios' | 'ios26' | 'md' }[]; } @Component({ @@ -48,11 +48,11 @@ export interface GuideContent { @if (guide().previewSections; as sections) { @for (section of sections; track $index) {
- -
+ +
} } @else { -
+
}

Edit this page on GitHub diff --git a/projects/docs/src/app/docs/markup-preview.ts b/projects/docs/src/app/docs/markup-preview.ts index fef6a63..6848fb2 100644 --- a/projects/docs/src/app/docs/markup-preview.ts +++ b/projects/docs/src/app/docs/markup-preview.ts @@ -7,12 +7,12 @@ import { DomSanitizer } from '@angular/platform-browser';

@for (platform of platforms; track platform.id) { - }
- +
`, styles: ` @@ -25,11 +25,12 @@ import { DomSanitizer } from '@angular/platform-browser'; `, }) export class MarkupPreview { + readonly tallPreview = input(false); readonly example = input.required(); - readonly themes = input.required<'all' | 'ios' | 'md'>(); + readonly themes = input.required<'all' | 'ios' | 'ios26' | 'md'>(); readonly label = input.required(); protected readonly platforms = [{ id: 'ios', name: 'iOS 27' }, { id: 'ios26', name: 'iOS 26' }, { id: 'md', name: 'MD3' }] as const; - protected readonly selected = linkedSignal<(typeof this.platforms)[number]>(() => this.themes() === 'md' ? this.platforms[2] : this.platforms[0]); + protected readonly selected = linkedSignal<(typeof this.platforms)[number]>(() => this.platforms.find(platform => platform.id === this.themes()) ?? this.platforms[0]); readonly #sanitizer = inject(DomSanitizer); protected readonly url = computed(() => this.#sanitizer.bypassSecurityTrustResourceUrl( `/assets/theme-preview/markup-${this.example()}-${this.selected().id}.html`, diff --git a/projects/docs/src/app/generated/guide-content.generated.ts b/projects/docs/src/app/generated/guide-content.generated.ts index d59d3f9..265e81b 100644 --- a/projects/docs/src/app/generated/guide-content.generated.ts +++ b/projects/docs/src/app/generated/guide-content.generated.ts @@ -19,44 +19,97 @@ export const GUIDE_CONTENT = { }, { intro: - '

Toolbar badges

Place a badge inside its toolbar button. An empty badge marks unread activity.

', - code: '
<ion-toolbar>\n  <ion-buttons slot="end">\n    <ion-button title="Unread mail">\n      <ion-icon slot="icon-only" name="mail-outline"></ion-icon>\n      <ion-badge></ion-badge>\n    </ion-button>\n    <ion-button title="Messages">\n      <ion-icon slot="icon-only" name="chatbubbles-outline"></ion-icon>\n      <ion-badge>3</ion-badge>\n    </ion-button>\n  </ion-buttons>\n</ion-toolbar>\n
', + '

Preferred overlay actions

Set the role on a button in the overlay’s buttons array. Use preferred for the recommended action, destructive for a destructive action and cancel to cancel. A button without a role uses the default style. The theme highlights preferred without invoking it automatically. Choosing Save in this example dismisses the overlay with the role preferred.

On iOS, the preferred button has a filled background in both overlays. MD3 fills the preferred alert button and emphasizes the action sheet row with its text color and weight.

', + code: '
<ion-button id="open-alert">Alert</ion-button>\n<ion-alert trigger="open-alert" header="Save changes?"></ion-alert>\n\n<ion-button id="open-sheet">Action sheet</ion-button>\n<ion-action-sheet trigger="open-sheet" header="Changes"></ion-action-sheet>\n\n<script type="module">\n  const buttons = [\n    { text: \'Save\', role: \'preferred\' },\n    { text: \'Discard\', role: \'destructive\' },\n    { text: \'Cancel\', role: \'cancel\' },\n  ];\n  document.querySelector(\'ion-alert\').buttons = buttons;\n  document.querySelector(\'ion-action-sheet\').buttons = buttons;\n</script>\n
', + tallPreview: true, + label: 'Preferred overlay actions', + themes: 'all', + }, + { + intro: + '

Toolbar badges

Place a badge inside its toolbar button. An empty badge marks unread activity.

', + code: '
<ion-toolbar>\n  <ion-buttons slot="end">\n    <ion-button title="Unread mail">\n      <ion-icon slot="icon-only" name="mail-outline"></ion-icon>\n      <ion-badge></ion-badge>\n    </ion-button>\n    <ion-button title="Messages">\n      <ion-icon slot="icon-only" name="chatbubbles-outline"></ion-icon>\n      <ion-badge>3</ion-badge>\n    </ion-button>\n  </ion-buttons>\n</ion-toolbar>\n
', label: 'Toolbar badges', themes: 'all', }, { intro: - '

Two-line list items

Place the note immediately after the label to display a second line inside an inset group.

', - code: '
<ion-content color="light">\n  <ion-list inset="true">\n    <ion-item-group>\n      <ion-item>\n        <ion-label>Network</ion-label>\n        <ion-note>Wi-Fi and mobile data</ion-note>\n      </ion-item>\n    </ion-item-group>\n  </ion-list>\n</ion-content>\n
', + '

Two-line list items

Place the note immediately after the label to display a second line inside an inset group.

', + code: '
<ion-content color="light">\n  <ion-list inset="true">\n    <ion-item-group>\n      <ion-item>\n        <ion-label>Network</ion-label>\n        <ion-note>Wi-Fi and mobile data</ion-note>\n      </ion-item>\n    </ion-item-group>\n  </ion-list>\n</ion-content>\n
', label: 'Two-line list items', themes: 'all', }, { intro: - '

Full-width segments

Select a segment. The segment-style-glass class applies the glass style on iOS 26 and 27.

', - code: '
<ion-segment class="segment-style-glass" value="photos">\n  <ion-segment-button value="photos">Photos</ion-segment-button>\n  <ion-segment-button value="albums">Albums</ion-segment-button>\n</ion-segment>\n
', + '

Full-width segments

Select a segment. The segment-style-glass class applies the glass style on iOS 26 and 27.

Use segment-expand to give the buttons equal widths. On iOS 27 this also keeps the segment compact inside a toolbar.

', + code: '
<ion-segment class="segment-style-glass segment-expand" value="photos">\n  <ion-segment-button value="photos">Photos</ion-segment-button>\n  <ion-segment-button value="albums">Albums</ion-segment-button>\n</ion-segment>\n
', label: 'Full-width segments', themes: 'ios', }, { intro: - '

Square buttons

The button-square class changes the corner shape on MD3. Compare it with the default button.

', - code: '
<ion-button>Default</ion-button> <ion-button class="button-square">Square</ion-button>\n

Apply the themes to your app with the Ionic setup guide.

', + '

Square buttons

The button-square class changes the corner shape on MD3. Compare it with the default button.

', + code: '
<ion-button>Default</ion-button> <ion-button class="button-square">Square</ion-button>\n
', label: 'Square buttons', themes: 'md', }, + { + intro: + '

Tab bar position

Set tab-bar-position-start, tab-bar-position-center or tab-bar-position-end on the bar. Start and end follow the reading direction. The classes work in both the top and bottom slots.

', + code: '
<ion-tab-bar slot="bottom" class="tab-bar-position-start">\n  <ion-tab-button tab="home">Home</ion-tab-button>\n  <ion-tab-button tab="library">Library</ion-tab-button>\n</ion-tab-bar>\n
', + label: 'Tab bar position', + themes: 'ios', + }, + { + intro: + '

Inset-list section headers

Place an item-group-header group before the group of list items to introduce a section with an icon, title and description.

', + code: '
<ion-content color="light">\n  <ion-list inset="true">\n    <ion-item-group class="item-group-header">\n      <ion-item>\n        <ion-label>\n          <ion-icon name="mail-outline"></ion-icon>\n          <h2>Mail</h2>\n          <ion-text>Manage your accounts.</ion-text>\n        </ion-label>\n      </ion-item>\n    </ion-item-group>\n  </ion-list>\n</ion-content>\n
', + label: 'Inset-list section headers', + themes: 'all', + }, + { + intro: + '

Classic search bar in a collapsing header

Place searchbar-classic inside the collapsing header. Give its toolbar a color for the field background. Scroll the example to collapse the large title and search field together.

', + code: '
<div class="ion-page">\n  <ion-header translucent="true">\n    <ion-toolbar color="light"><ion-title>Library</ion-title></ion-toolbar>\n  </ion-header>\n  <ion-content fullscreen="true" color="light">\n    <ion-header collapse="condense">\n      <ion-toolbar color="light"><ion-title size="large">Library</ion-title></ion-toolbar>\n      <ion-toolbar color="light"><ion-searchbar class="searchbar-classic"></ion-searchbar></ion-toolbar>\n    </ion-header>\n    <div style="min-height: 100vh">Albums</div>\n  </ion-content>\n</div>\n
', + tallPreview: true, + label: 'Classic search bar in a collapsing header', + themes: 'ios', + }, + { + intro: + '

Search-bar toolbars

On iOS 26, toolbar-searchbar aligns the search field with buttons in the start or end slot.

', + code: '
<ion-toolbar class="toolbar-searchbar">\n  <ion-buttons slot="start"><ion-button>Cancel</ion-button></ion-buttons>\n  <ion-searchbar></ion-searchbar>\n</ion-toolbar>\n
', + label: 'Search-bar toolbars', + themes: 'ios26', + }, + { + intro: + '

Android Settings controls

MD3 toggles have no on/off symbols by default. Enable them with the Ionic enableOnOffLabels property.

', + code: '
<ion-toggle enable-on-off-labels="true">Notifications</ion-toggle>\n

Device-specific layouts

On iPad with the iOS 27 theme, setting expandToScroll to false on a sheet modal lets its content scroll at the current breakpoint and leaves a gap below the sheet. Drag the handle to resize it.

For the iPhone Duo hinge and vertical rail, see Device layout and split panes.

Apply the themes to your app with the Ionic setup guide.

', + label: 'Android Settings controls', + themes: 'md', + }, ], title: 'Special markup and classes', description: 'Preview Ionic markup with the iOS 26, iOS 27 and Material Design 3 themes. Switch themes above each example to compare the same HTML.', - html: '

Disable the theme for a component

\n

To use the standard Ionic appearance on a component, add ios-theme-disabled for iOS 26 and 27 or md3-disabled for MD3.

\n
<ion-button>Themed</ion-button>\n<ion-button class="ios-theme-disabled md3-disabled">Standard Ionic</ion-button>\n

Submit buttons

\n

Use type="submit" to submit a form or button-submit to give another action the same appearance. On iOS 26, set the text and border highlight for each button color. For example, color="danger" uses --ion-color-danger-brightness.

\n
<style>\n  :root {\n    --ion-color-primary-brightness: #96feff;\n    --ion-color-danger-brightness: #ffe3e5;\n  }\n</style>\n\n<ion-button type="submit" fill="solid" color="primary">Submit</ion-button>\n<ion-button class="button-submit" fill="solid" color="danger">Delete</ion-button>\n

Toolbar badges

\n

Place a badge inside its toolbar button. An empty badge marks unread activity.

\n

\n
<ion-toolbar>\n  <ion-buttons slot="end">\n    <ion-button title="Unread mail">\n      <ion-icon slot="icon-only" name="mail-outline"></ion-icon>\n      <ion-badge></ion-badge>\n    </ion-button>\n    <ion-button title="Messages">\n      <ion-icon slot="icon-only" name="chatbubbles-outline"></ion-icon>\n      <ion-badge>3</ion-badge>\n    </ion-button>\n  </ion-buttons>\n</ion-toolbar>\n

Two-line list items

\n

Place the note immediately after the label to display a second line inside an inset group.

\n
<ion-content color="light">\n  <ion-list inset="true">\n    <ion-item-group>\n      <ion-item>\n        <ion-label>Network</ion-label>\n        <ion-note>Wi-Fi and mobile data</ion-note>\n      </ion-item>\n    </ion-item-group>\n  </ion-list>\n</ion-content>\n

Full-width segments

\n

Select a segment. The segment-style-glass class applies the glass style on iOS 26 and 27.

\n
<ion-segment class="segment-style-glass" value="photos">\n  <ion-segment-button value="photos">Photos</ion-segment-button>\n  <ion-segment-button value="albums">Albums</ion-segment-button>\n</ion-segment>\n

Square buttons

\n

The button-square class changes the corner shape on MD3. Compare it with the default button.

\n
<ion-button>Default</ion-button> <ion-button class="button-square">Square</ion-button>\n

Apply the themes to your app with the Ionic setup guide.

\n', headings: [ { id: 'disable-the-theme-for-a-component', text: 'Disable the theme for a component' }, { id: 'submit-buttons', text: 'Submit buttons' }, + { id: 'preferred-overlay-actions', text: 'Preferred overlay actions' }, { id: 'toolbar-badges', text: 'Toolbar badges' }, { id: 'two-line-list-items', text: 'Two-line list items' }, { id: 'full-width-segments', text: 'Full-width segments' }, { id: 'square-buttons', text: 'Square buttons' }, + { id: 'tab-bar-position', text: 'Tab bar position' }, + { id: 'inset-list-section-headers', text: 'Inset-list section headers' }, + { + id: 'classic-search-bar-in-a-collapsing-header', + text: 'Classic search bar in a collapsing header', + }, + { id: 'search-bar-toolbars', text: 'Search-bar toolbars' }, + { id: 'android-settings-controls', text: 'Android Settings controls' }, + { id: 'device-specific-layouts', text: 'Device-specific layouts' }, ], editUrl: 'https://github.com/webview-native-ui/docs/edit/main/projects/docs/src/guides/en/special-markup.md', @@ -79,43 +132,90 @@ export const GUIDE_CONTENT = { }, { intro: - '

ツールバーボタンのバッジ

アイコンとバッジをボタンの直下に並べます。封筒の右上に未読の点、吹き出しの右上にメッセージの件数が表示されます。

', - code: '
<ion-toolbar>\n  <ion-buttons slot="end">\n    <ion-button title="Unread mail">\n      <ion-icon slot="icon-only" name="mail-outline"></ion-icon>\n      <ion-badge></ion-badge>\n    </ion-button>\n    <ion-button title="Messages">\n      <ion-icon slot="icon-only" name="chatbubbles-outline"></ion-icon>\n      <ion-badge>3</ion-badge>\n    </ion-button>\n  </ion-buttons>\n</ion-toolbar>\n
', + '

オーバーレイの推奨アクション

各ボタンの役割は、オーバーレイの buttons 配列で指定します。推奨する操作には preferred、削除などの取り消せない操作には destructive、キャンセルには cancel を使います。省略すると通常のボタンになります。preferred は操作を強調する指定です。この例で「Save」を押して閉じると、返されるロールは preferred になります。

iOS ではどちらも推奨ボタンが塗りつぶされます。MD3 ではアラートの推奨ボタンが塗りつぶされ、アクションシートでは文字の色と太さで強調されます。

', + code: '
<ion-button id="open-alert">Alert</ion-button>\n<ion-alert trigger="open-alert" header="Save changes?"></ion-alert>\n\n<ion-button id="open-sheet">Action sheet</ion-button>\n<ion-action-sheet trigger="open-sheet" header="Changes"></ion-action-sheet>\n\n<script type="module">\n  const buttons = [\n    { text: \'Save\', role: \'preferred\' },\n    { text: \'Discard\', role: \'destructive\' },\n    { text: \'Cancel\', role: \'cancel\' },\n  ];\n  document.querySelector(\'ion-alert\').buttons = buttons;\n  document.querySelector(\'ion-action-sheet\').buttons = buttons;\n</script>\n
', + tallPreview: true, + label: 'オーバーレイの推奨アクション', + themes: 'all', + }, + { + intro: + '

ツールバーボタンのバッジ

アイコンとバッジをボタンの直下に並べます。封筒の右上に未読の点、吹き出しの右上にメッセージの件数が表示されます。

', + code: '
<ion-toolbar>\n  <ion-buttons slot="end">\n    <ion-button title="Unread mail">\n      <ion-icon slot="icon-only" name="mail-outline"></ion-icon>\n      <ion-badge></ion-badge>\n    </ion-button>\n    <ion-button title="Messages">\n      <ion-icon slot="icon-only" name="chatbubbles-outline"></ion-icon>\n      <ion-badge>3</ion-badge>\n    </ion-button>\n  </ion-buttons>\n</ion-toolbar>\n
', label: 'ツールバーボタンのバッジ', themes: 'all', }, { intro: - '

2行のリスト項目

インセットリスト内でラベルの直後に注記を置くと、項目名の下に説明が表示されます。

', - code: '
<ion-content color="light">\n  <ion-list inset="true">\n    <ion-item-group>\n      <ion-item>\n        <ion-label>Network</ion-label>\n        <ion-note>Wi-Fi and mobile data</ion-note>\n      </ion-item>\n    </ion-item-group>\n  </ion-list>\n</ion-content>\n
', + '

2行のリスト項目

インセットリスト内でラベルの直後に注記を置くと、項目名の下に説明が表示されます。

', + code: '
<ion-content color="light">\n  <ion-list inset="true">\n    <ion-item-group>\n      <ion-item>\n        <ion-label>Network</ion-label>\n        <ion-note>Wi-Fi and mobile data</ion-note>\n      </ion-item>\n    </ion-item-group>\n  </ion-list>\n</ion-content>\n
', label: '2行のリスト項目', themes: 'all', }, { intro: - '

全幅のセグメント

タブを選んで表示を切り替えてください。iOS 26・27ではsegment-style-glassで選択部分にガラスの表現を適用できます。

', - code: '
<ion-segment class="segment-style-glass" value="photos">\n  <ion-segment-button value="photos">Photos</ion-segment-button>\n  <ion-segment-button value="albums">Albums</ion-segment-button>\n</ion-segment>\n
', + '

全幅のセグメント

タブを選んで表示を切り替えてください。iOS 26・27ではsegment-style-glassで選択部分にガラスの表現を適用できます。

各ボタンを等幅にするには segment-expand を使います。iOS 27 ではツールバー内でもコンパクトな高さになります。

', + code: '
<ion-segment class="segment-style-glass segment-expand" value="photos">\n  <ion-segment-button value="photos">Photos</ion-segment-button>\n  <ion-segment-button value="albums">Albums</ion-segment-button>\n</ion-segment>\n
', label: '全幅のセグメント', themes: 'ios', }, { intro: - '

角を立てたボタン

MD3ではbutton-squareでボタンの角を立てられます。標準のボタンと並べて比較できます。

', - code: '
<ion-button>Default</ion-button> <ion-button class="button-square">Square</ion-button>\n

アプリへのテーマの適用はIonicアプリに導入するを参照してください。

', + '

角を立てたボタン

MD3ではbutton-squareでボタンの角を立てられます。標準のボタンと並べて比較できます。

', + code: '
<ion-button>Default</ion-button> <ion-button class="button-square">Square</ion-button>\n
', label: '角を立てたボタン', themes: 'md', }, + { + intro: + '

タブバーの配置

タブバーに tab-bar-position-start、tab-bar-position-center、tab-bar-position-end のいずれかを付けます。開始端と終了端は文字の向きに従います。上部・下部どちらのタブバーにも使えます。

', + code: '
<ion-tab-bar slot="bottom" class="tab-bar-position-start">\n  <ion-tab-button tab="home">Home</ion-tab-button>\n  <ion-tab-button tab="library">Library</ion-tab-button>\n</ion-tab-bar>\n
', + label: 'タブバーの配置', + themes: 'ios', + }, + { + intro: + '

インセットリストの見出し

項目のグループの前に item-group-header を付けたグループを置くと、アイコン、タイトル、説明をまとめて表示できます。

', + code: '
<ion-content color="light">\n  <ion-list inset="true">\n    <ion-item-group class="item-group-header">\n      <ion-item>\n        <ion-label>\n          <ion-icon name="mail-outline"></ion-icon>\n          <h2>Mail</h2>\n          <ion-text>Manage your accounts.</ion-text>\n        </ion-label>\n      </ion-item>\n    </ion-item-group>\n  </ion-list>\n</ion-content>\n
', + label: 'インセットリストの見出し', + themes: 'all', + }, + { + intro: + '

大見出しと一緒に折りたたむ検索バー

折りたたみヘッダー内の検索バーに searchbar-classic を付けます。ツールバーに色を指定すると、検索欄の背景に反映されます。例をスクロールすると、大見出しと検索欄が一緒に折りたたまれます。

', + code: '
<div class="ion-page">\n  <ion-header translucent="true">\n    <ion-toolbar color="light"><ion-title>Library</ion-title></ion-toolbar>\n  </ion-header>\n  <ion-content fullscreen="true" color="light">\n    <ion-header collapse="condense">\n      <ion-toolbar color="light"><ion-title size="large">Library</ion-title></ion-toolbar>\n      <ion-toolbar color="light"><ion-searchbar class="searchbar-classic"></ion-searchbar></ion-toolbar>\n    </ion-header>\n    <div style="min-height: 100vh">Albums</div>\n  </ion-content>\n</div>\n
', + tallPreview: true, + label: '大見出しと一緒に折りたたむ検索バー', + themes: 'ios', + }, + { + intro: + '

検索バーとツールバーボタン

iOS 26 では、ツールバーに toolbar-searchbar を付けると、検索欄とその両端のボタンの位置がそろいます。

', + code: '
<ion-toolbar class="toolbar-searchbar">\n  <ion-buttons slot="start"><ion-button>Cancel</ion-button></ion-buttons>\n  <ion-searchbar></ion-searchbar>\n</ion-toolbar>\n
', + label: '検索バーとツールバーボタン', + themes: 'ios26', + }, + { + intro: + '

Android 設定画面のトグル

MD3 のトグルは標準でオン・オフの記号を表示しません。記号を表示するには Ionic の enableOnOffLabels を有効にします。

', + code: '
<ion-toggle enable-on-off-labels="true">Notifications</ion-toggle>\n

端末ごとのレイアウト

iPad の iOS 27 テーマでは、シートモーダルの expandToScroll を false にすると、シートの下に余白ができ、現在の高さのまま内容をスクロールできます。高さを変えるにはハンドルをドラッグします。

iPhone Duo のヒンジと縦レールについては端末レイアウトと分割ペインを参照してください。

アプリへのテーマの適用はIonicアプリに導入するを参照してください。

', + label: 'Android 設定画面のトグル', + themes: 'md', + }, ], title: '特別なマークアップとクラス', description: '同じHTMLをiOS 26、iOS 27、Material Design 3で表示します。各例の上部でテーマを切り替えて、形や配置、操作感を比べられます。', - html: '

コンポーネントごとにテーマを無効にする

\n

Ionic標準の外観を使いたいコンポーネントに、iOS 26・27では ios-theme-disabled、MD3では md3-disabled を付けます。

\n
<ion-button>Themed</ion-button>\n<ion-button class="ios-theme-disabled md3-disabled">Standard Ionic</ion-button>\n

送信ボタン

\n

フォームの送信には type="submit" を使います。ほかの操作にも同じ外観を使うには button-submit を付けます。iOS 26では文字と縁のハイライトをボタンの色ごとに指定できます。例えば color="danger" には --ion-color-danger-brightness を設定します。

\n
<style>\n  :root {\n    --ion-color-primary-brightness: #96feff;\n    --ion-color-danger-brightness: #ffe3e5;\n  }\n</style>\n\n<ion-button type="submit" fill="solid" color="primary">Submit</ion-button>\n<ion-button class="button-submit" fill="solid" color="danger">Delete</ion-button>\n

ツールバーボタンのバッジ

\n

アイコンとバッジをボタンの直下に並べます。封筒の右上に未読の点、吹き出しの右上にメッセージの件数が表示されます。

\n

\n
<ion-toolbar>\n  <ion-buttons slot="end">\n    <ion-button title="Unread mail">\n      <ion-icon slot="icon-only" name="mail-outline"></ion-icon>\n      <ion-badge></ion-badge>\n    </ion-button>\n    <ion-button title="Messages">\n      <ion-icon slot="icon-only" name="chatbubbles-outline"></ion-icon>\n      <ion-badge>3</ion-badge>\n    </ion-button>\n  </ion-buttons>\n</ion-toolbar>\n

2行のリスト項目

\n

インセットリスト内でラベルの直後に注記を置くと、項目名の下に説明が表示されます。

\n
<ion-content color="light">\n  <ion-list inset="true">\n    <ion-item-group>\n      <ion-item>\n        <ion-label>Network</ion-label>\n        <ion-note>Wi-Fi and mobile data</ion-note>\n      </ion-item>\n    </ion-item-group>\n  </ion-list>\n</ion-content>\n

全幅のセグメント

\n

タブを選んで表示を切り替えてください。iOS 26・27ではsegment-style-glassで選択部分にガラスの表現を適用できます。

\n
<ion-segment class="segment-style-glass" value="photos">\n  <ion-segment-button value="photos">Photos</ion-segment-button>\n  <ion-segment-button value="albums">Albums</ion-segment-button>\n</ion-segment>\n

角を立てたボタン

\n

MD3ではbutton-squareでボタンの角を立てられます。標準のボタンと並べて比較できます。

\n
<ion-button>Default</ion-button> <ion-button class="button-square">Square</ion-button>\n

アプリへのテーマの適用はIonicアプリに導入するを参照してください。

\n', headings: [ { id: '%E3%82%B3%E3%83%B3%E3%83%9D%E3%83%BC%E3%83%8D%E3%83%B3%E3%83%88%E3%81%94%E3%81%A8%E3%81%AB%E3%83%86%E3%83%BC%E3%83%9E%E3%82%92%E7%84%A1%E5%8A%B9%E3%81%AB%E3%81%99%E3%82%8B', text: 'コンポーネントごとにテーマを無効にする', }, { id: '%E9%80%81%E4%BF%A1%E3%83%9C%E3%82%BF%E3%83%B3', text: '送信ボタン' }, + { + id: '%E3%82%AA%E3%83%BC%E3%83%90%E3%83%BC%E3%83%AC%E3%82%A4%E3%81%AE%E6%8E%A8%E5%A5%A8%E3%82%A2%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3', + text: 'オーバーレイの推奨アクション', + }, { id: '%E3%83%84%E3%83%BC%E3%83%AB%E3%83%90%E3%83%BC%E3%83%9C%E3%82%BF%E3%83%B3%E3%81%AE%E3%83%90%E3%83%83%E3%82%B8', text: 'ツールバーボタンのバッジ', @@ -132,6 +232,30 @@ export const GUIDE_CONTENT = { id: '%E8%A7%92%E3%82%92%E7%AB%8B%E3%81%A6%E3%81%9F%E3%83%9C%E3%82%BF%E3%83%B3', text: '角を立てたボタン', }, + { + id: '%E3%82%BF%E3%83%96%E3%83%90%E3%83%BC%E3%81%AE%E9%85%8D%E7%BD%AE', + text: 'タブバーの配置', + }, + { + id: '%E3%82%A4%E3%83%B3%E3%82%BB%E3%83%83%E3%83%88%E3%83%AA%E3%82%B9%E3%83%88%E3%81%AE%E8%A6%8B%E5%87%BA%E3%81%97', + text: 'インセットリストの見出し', + }, + { + id: '%E5%A4%A7%E8%A6%8B%E5%87%BA%E3%81%97%E3%81%A8%E4%B8%80%E7%B7%92%E3%81%AB%E6%8A%98%E3%82%8A%E3%81%9F%E3%81%9F%E3%82%80%E6%A4%9C%E7%B4%A2%E3%83%90%E3%83%BC', + text: '大見出しと一緒に折りたたむ検索バー', + }, + { + id: '%E6%A4%9C%E7%B4%A2%E3%83%90%E3%83%BC%E3%81%A8%E3%83%84%E3%83%BC%E3%83%AB%E3%83%90%E3%83%BC%E3%83%9C%E3%82%BF%E3%83%B3', + text: '検索バーとツールバーボタン', + }, + { + id: 'android-%E8%A8%AD%E5%AE%9A%E7%94%BB%E9%9D%A2%E3%81%AE%E3%83%88%E3%82%B0%E3%83%AB', + text: 'Android 設定画面のトグル', + }, + { + id: '%E7%AB%AF%E6%9C%AB%E3%81%94%E3%81%A8%E3%81%AE%E3%83%AC%E3%82%A4%E3%82%A2%E3%82%A6%E3%83%88', + text: '端末ごとのレイアウト', + }, ], editUrl: 'https://github.com/webview-native-ui/docs/edit/main/projects/docs/src/guides/ja/special-markup.md', @@ -154,43 +278,90 @@ export const GUIDE_CONTENT = { }, { intro: - '

Badges de barre d’outils

Placez le badge dans le bouton. Un badge vide indique une notification non lue.

', - code: '
<ion-toolbar>\n  <ion-buttons slot="end">\n    <ion-button title="Unread mail">\n      <ion-icon slot="icon-only" name="mail-outline"></ion-icon>\n      <ion-badge></ion-badge>\n    </ion-button>\n    <ion-button title="Messages">\n      <ion-icon slot="icon-only" name="chatbubbles-outline"></ion-icon>\n      <ion-badge>3</ion-badge>\n    </ion-button>\n  </ion-buttons>\n</ion-toolbar>\n
', + '

Actions recommandées dans les overlays

Définissez le rôle de chaque bouton dans le tableau buttons : preferred pour l’action recommandée, destructive pour une action destructive et cancel pour annuler. Sans rôle, le bouton conserve son style normal. Le rôle preferred met l’action en évidence sans la déclencher automatiquement. Dans cet exemple, sélectionner « Save » ferme la fenêtre avec le rôle preferred.

Sur iOS, le bouton recommandé a un fond plein dans les deux composants. Sur MD3, il a un fond plein dans une alerte ; dans une feuille d’actions, la couleur et la graisse du texte le distinguent.

', + code: '
<ion-button id="open-alert">Alert</ion-button>\n<ion-alert trigger="open-alert" header="Save changes?"></ion-alert>\n\n<ion-button id="open-sheet">Action sheet</ion-button>\n<ion-action-sheet trigger="open-sheet" header="Changes"></ion-action-sheet>\n\n<script type="module">\n  const buttons = [\n    { text: \'Save\', role: \'preferred\' },\n    { text: \'Discard\', role: \'destructive\' },\n    { text: \'Cancel\', role: \'cancel\' },\n  ];\n  document.querySelector(\'ion-alert\').buttons = buttons;\n  document.querySelector(\'ion-action-sheet\').buttons = buttons;\n</script>\n
', + tallPreview: true, + label: 'Actions recommandées dans les overlays', + themes: 'all', + }, + { + intro: + '

Badges de barre d’outils

Placez le badge dans le bouton. Un badge vide indique une notification non lue.

', + code: '
<ion-toolbar>\n  <ion-buttons slot="end">\n    <ion-button title="Unread mail">\n      <ion-icon slot="icon-only" name="mail-outline"></ion-icon>\n      <ion-badge></ion-badge>\n    </ion-button>\n    <ion-button title="Messages">\n      <ion-icon slot="icon-only" name="chatbubbles-outline"></ion-icon>\n      <ion-badge>3</ion-badge>\n    </ion-button>\n  </ion-buttons>\n</ion-toolbar>\n
', label: 'Badges de barre d’outils', themes: 'all', }, { intro: - '

Éléments de liste sur deux lignes

Placez la note après le libellé pour afficher une seconde ligne.

', - code: '
<ion-content color="light">\n  <ion-list inset="true">\n    <ion-item-group>\n      <ion-item>\n        <ion-label>Network</ion-label>\n        <ion-note>Wi-Fi and mobile data</ion-note>\n      </ion-item>\n    </ion-item-group>\n  </ion-list>\n</ion-content>\n
', + '

Éléments de liste sur deux lignes

Placez la note après le libellé pour afficher une seconde ligne.

', + code: '
<ion-content color="light">\n  <ion-list inset="true">\n    <ion-item-group>\n      <ion-item>\n        <ion-label>Network</ion-label>\n        <ion-note>Wi-Fi and mobile data</ion-note>\n      </ion-item>\n    </ion-item-group>\n  </ion-list>\n</ion-content>\n
', label: 'Éléments de liste sur deux lignes', themes: 'all', }, { intro: - '

Segments pleine largeur

Sélectionnez un segment. La classe segment-style-glass active le style verre sous iOS 26 et 27.

', - code: '
<ion-segment class="segment-style-glass" value="photos">\n  <ion-segment-button value="photos">Photos</ion-segment-button>\n  <ion-segment-button value="albums">Albums</ion-segment-button>\n</ion-segment>\n
', + '

Segments pleine largeur

Sélectionnez un segment. La classe segment-style-glass active le style verre sous iOS 26 et 27.

Utilisez segment-expand pour donner la même largeur aux boutons. Sous iOS 27, le segment reste également compact dans une barre d’outils.

', + code: '
<ion-segment class="segment-style-glass segment-expand" value="photos">\n  <ion-segment-button value="photos">Photos</ion-segment-button>\n  <ion-segment-button value="albums">Albums</ion-segment-button>\n</ion-segment>\n
', label: 'Segments pleine largeur', themes: 'ios', }, { intro: - '

Boutons carrés

La classe button-square modifie les angles sous MD3. Comparez avec le bouton standard.

', - code: '
<ion-button>Default</ion-button> <ion-button class="button-square">Square</ion-button>\n

Pour appliquer les thèmes, consultez le guide Ionic.

', + '

Boutons carrés

La classe button-square modifie les angles sous MD3. Comparez avec le bouton standard.

', + code: '
<ion-button>Default</ion-button> <ion-button class="button-square">Square</ion-button>\n
', label: 'Boutons carrés', themes: 'md', }, + { + intro: + '

Position de la barre d’onglets

Appliquez tab-bar-position-start, tab-bar-position-center ou tab-bar-position-end à la barre. Le début et la fin suivent le sens de lecture, en haut comme en bas.

', + code: '
<ion-tab-bar slot="bottom" class="tab-bar-position-start">\n  <ion-tab-button tab="home">Home</ion-tab-button>\n  <ion-tab-button tab="library">Library</ion-tab-button>\n</ion-tab-bar>\n
', + label: 'Position de la barre d’onglets', + themes: 'ios', + }, + { + intro: + '

En-têtes des listes en retrait

Placez un groupe item-group-header avant les éléments de liste pour présenter la section avec une icône, un titre et une description.

', + code: '
<ion-content color="light">\n  <ion-list inset="true">\n    <ion-item-group class="item-group-header">\n      <ion-item>\n        <ion-label>\n          <ion-icon name="mail-outline"></ion-icon>\n          <h2>Mail</h2>\n          <ion-text>Manage your accounts.</ion-text>\n        </ion-label>\n      </ion-item>\n    </ion-item-group>\n  </ion-list>\n</ion-content>\n
', + label: 'En-têtes des listes en retrait', + themes: 'all', + }, + { + intro: + '

Recherche sous un grand titre repliable

Placez searchbar-classic dans l’en-tête repliable et donnez une couleur à sa barre d’outils pour définir le fond du champ. Faites défiler pour replier le titre et le champ ensemble.

', + code: '
<div class="ion-page">\n  <ion-header translucent="true">\n    <ion-toolbar color="light"><ion-title>Library</ion-title></ion-toolbar>\n  </ion-header>\n  <ion-content fullscreen="true" color="light">\n    <ion-header collapse="condense">\n      <ion-toolbar color="light"><ion-title size="large">Library</ion-title></ion-toolbar>\n      <ion-toolbar color="light"><ion-searchbar class="searchbar-classic"></ion-searchbar></ion-toolbar>\n    </ion-header>\n    <div style="min-height: 100vh">Albums</div>\n  </ion-content>\n</div>\n
', + tallPreview: true, + label: 'Recherche sous un grand titre repliable', + themes: 'ios', + }, + { + intro: + '

Barre d’outils avec recherche

Sous iOS 26, toolbar-searchbar aligne le champ de recherche avec les boutons placés au début ou à la fin.

', + code: '
<ion-toolbar class="toolbar-searchbar">\n  <ion-buttons slot="start"><ion-button>Cancel</ion-button></ion-buttons>\n  <ion-searchbar></ion-searchbar>\n</ion-toolbar>\n
', + label: 'Barre d’outils avec recherche', + themes: 'ios26', + }, + { + intro: + '

Interrupteurs des paramètres Android

Les interrupteurs MD3 masquent les symboles marche/arrêt par défaut. Activez la propriété Ionic enableOnOffLabels pour les afficher.

', + code: '
<ion-toggle enable-on-off-labels="true">Notifications</ion-toggle>\n

Dispositions propres aux appareils

Sur iPad avec le thème iOS 27, régler expandToScroll sur false permet de faire défiler le contenu sans agrandir la fenêtre modale et laisse un espace sous celle-ci. Faites glisser la poignée pour ajuster sa hauteur.

Pour la charnière et le rail de l’iPhone Duo, consultez Disposition et panneaux.

Pour appliquer les thèmes, consultez le guide Ionic.

', + label: 'Interrupteurs des paramètres Android', + themes: 'md', + }, ], title: 'Balisage et classes spécifiques', description: 'Comparez le même HTML avec les thèmes iOS 26, iOS 27 et Material Design 3. Changez de thème au-dessus de chaque exemple.', - html: '

Désactiver le thème pour un composant

\n

Pour conserver l’apparence Ionic standard d’un composant, ajoutez-lui ios-theme-disabled pour iOS 26 et 27 ou md3-disabled pour MD3.

\n
<ion-button>Themed</ion-button>\n<ion-button class="ios-theme-disabled md3-disabled">Standard Ionic</ion-button>\n

Boutons de soumission

\n

Utilisez type="submit" pour envoyer un formulaire ou button-submit pour donner la même apparence à une autre action. Sous iOS 26, la couleur du texte et du liseré lumineux se règle pour chaque couleur de bouton. Par exemple, color="danger" utilise --ion-color-danger-brightness.

\n
<style>\n  :root {\n    --ion-color-primary-brightness: #96feff;\n    --ion-color-danger-brightness: #ffe3e5;\n  }\n</style>\n\n<ion-button type="submit" fill="solid" color="primary">Submit</ion-button>\n<ion-button class="button-submit" fill="solid" color="danger">Delete</ion-button>\n

Badges de barre d’outils

\n

Placez le badge dans le bouton. Un badge vide indique une notification non lue.

\n

\n
<ion-toolbar>\n  <ion-buttons slot="end">\n    <ion-button title="Unread mail">\n      <ion-icon slot="icon-only" name="mail-outline"></ion-icon>\n      <ion-badge></ion-badge>\n    </ion-button>\n    <ion-button title="Messages">\n      <ion-icon slot="icon-only" name="chatbubbles-outline"></ion-icon>\n      <ion-badge>3</ion-badge>\n    </ion-button>\n  </ion-buttons>\n</ion-toolbar>\n

Éléments de liste sur deux lignes

\n

Placez la note après le libellé pour afficher une seconde ligne.

\n
<ion-content color="light">\n  <ion-list inset="true">\n    <ion-item-group>\n      <ion-item>\n        <ion-label>Network</ion-label>\n        <ion-note>Wi-Fi and mobile data</ion-note>\n      </ion-item>\n    </ion-item-group>\n  </ion-list>\n</ion-content>\n

Segments pleine largeur

\n

Sélectionnez un segment. La classe segment-style-glass active le style verre sous iOS 26 et 27.

\n
<ion-segment class="segment-style-glass" value="photos">\n  <ion-segment-button value="photos">Photos</ion-segment-button>\n  <ion-segment-button value="albums">Albums</ion-segment-button>\n</ion-segment>\n

Boutons carrés

\n

La classe button-square modifie les angles sous MD3. Comparez avec le bouton standard.

\n
<ion-button>Default</ion-button> <ion-button class="button-square">Square</ion-button>\n

Pour appliquer les thèmes, consultez le guide Ionic.

\n', headings: [ { id: 'd%C3%A9sactiver-le-th%C3%A8me-pour-un-composant', text: 'Désactiver le thème pour un composant', }, { id: 'boutons-de-soumission', text: 'Boutons de soumission' }, + { + id: 'actions-recommand%C3%A9es-dans-les-overlays', + text: 'Actions recommandées dans les overlays', + }, { id: 'badges-de-barre-d%E2%80%99outils', text: 'Badges de barre d’outils' }, { id: '%C3%A9l%C3%A9ments-de-liste-sur-deux-lignes', @@ -198,6 +369,18 @@ export const GUIDE_CONTENT = { }, { id: 'segments-pleine-largeur', text: 'Segments pleine largeur' }, { id: 'boutons-carr%C3%A9s', text: 'Boutons carrés' }, + { id: 'position-de-la-barre-d%E2%80%99onglets', text: 'Position de la barre d’onglets' }, + { id: 'en-t%C3%AAtes-des-listes-en-retrait', text: 'En-têtes des listes en retrait' }, + { + id: 'recherche-sous-un-grand-titre-repliable', + text: 'Recherche sous un grand titre repliable', + }, + { id: 'barre-d%E2%80%99outils-avec-recherche', text: 'Barre d’outils avec recherche' }, + { + id: 'interrupteurs-des-param%C3%A8tres-android', + text: 'Interrupteurs des paramètres Android', + }, + { id: 'dispositions-propres-aux-appareils', text: 'Dispositions propres aux appareils' }, ], editUrl: 'https://github.com/webview-native-ui/docs/edit/main/projects/docs/src/guides/fr/special-markup.md', @@ -220,47 +403,106 @@ export const GUIDE_CONTENT = { }, { intro: - '

Badges in der Werkzeugleiste

Platzieren Sie das Badge im Button. Ein leeres Badge kennzeichnet ungelesene Nachrichten.

', - code: '
<ion-toolbar>\n  <ion-buttons slot="end">\n    <ion-button title="Unread mail">\n      <ion-icon slot="icon-only" name="mail-outline"></ion-icon>\n      <ion-badge></ion-badge>\n    </ion-button>\n    <ion-button title="Messages">\n      <ion-icon slot="icon-only" name="chatbubbles-outline"></ion-icon>\n      <ion-badge>3</ion-badge>\n    </ion-button>\n  </ion-buttons>\n</ion-toolbar>\n
', + '

Empfohlene Aktionen in Overlays

Geben Sie die Rolle im Array buttons an: preferred für die empfohlene Aktion, destructive für eine destruktive Aktion und cancel zum Abbrechen. Ohne Rolle gilt der Standardstil. Die Hervorhebung mit preferred löst die Aktion nicht automatisch aus. Wenn Sie im Beispiel „Save“ wählen, schließt sich das Overlay mit der Rolle preferred.

Unter iOS ist die empfohlene Aktion in beiden Komponenten farbig hinterlegt. MD3 verwendet im Alert einen gefüllten Button und hebt die Zeile im Action Sheet durch Textfarbe und Schriftstärke hervor.

', + code: '
<ion-button id="open-alert">Alert</ion-button>\n<ion-alert trigger="open-alert" header="Save changes?"></ion-alert>\n\n<ion-button id="open-sheet">Action sheet</ion-button>\n<ion-action-sheet trigger="open-sheet" header="Changes"></ion-action-sheet>\n\n<script type="module">\n  const buttons = [\n    { text: \'Save\', role: \'preferred\' },\n    { text: \'Discard\', role: \'destructive\' },\n    { text: \'Cancel\', role: \'cancel\' },\n  ];\n  document.querySelector(\'ion-alert\').buttons = buttons;\n  document.querySelector(\'ion-action-sheet\').buttons = buttons;\n</script>\n
', + tallPreview: true, + label: 'Empfohlene Aktionen in Overlays', + themes: 'all', + }, + { + intro: + '

Badges in der Werkzeugleiste

Platzieren Sie das Badge im Button. Ein leeres Badge kennzeichnet ungelesene Nachrichten.

', + code: '
<ion-toolbar>\n  <ion-buttons slot="end">\n    <ion-button title="Unread mail">\n      <ion-icon slot="icon-only" name="mail-outline"></ion-icon>\n      <ion-badge></ion-badge>\n    </ion-button>\n    <ion-button title="Messages">\n      <ion-icon slot="icon-only" name="chatbubbles-outline"></ion-icon>\n      <ion-badge>3</ion-badge>\n    </ion-button>\n  </ion-buttons>\n</ion-toolbar>\n
', label: 'Badges in der Werkzeugleiste', themes: 'all', }, { intro: - '

Zweizeilige Listeneinträge

Platzieren Sie die Notiz direkt hinter dem Label, um eine zweite Zeile anzuzeigen.

', - code: '
<ion-content color="light">\n  <ion-list inset="true">\n    <ion-item-group>\n      <ion-item>\n        <ion-label>Network</ion-label>\n        <ion-note>Wi-Fi and mobile data</ion-note>\n      </ion-item>\n    </ion-item-group>\n  </ion-list>\n</ion-content>\n
', + '

Zweizeilige Listeneinträge

Platzieren Sie die Notiz direkt hinter dem Label, um eine zweite Zeile anzuzeigen.

', + code: '
<ion-content color="light">\n  <ion-list inset="true">\n    <ion-item-group>\n      <ion-item>\n        <ion-label>Network</ion-label>\n        <ion-note>Wi-Fi and mobile data</ion-note>\n      </ion-item>\n    </ion-item-group>\n  </ion-list>\n</ion-content>\n
', label: 'Zweizeilige Listeneinträge', themes: 'all', }, { intro: - '

Segmente in voller Breite

Wählen Sie ein Segment aus. Unter iOS 26 und 27 aktiviert segment-style-glass die Glasoptik.

', - code: '
<ion-segment class="segment-style-glass" value="photos">\n  <ion-segment-button value="photos">Photos</ion-segment-button>\n  <ion-segment-button value="albums">Albums</ion-segment-button>\n</ion-segment>\n
', + '

Segmente in voller Breite

Wählen Sie ein Segment aus. Unter iOS 26 und 27 aktiviert segment-style-glass die Glasoptik.

Mit segment-expand werden die Schaltflächen gleich breit. Unter iOS 27 bleibt das Segment damit auch in einer Werkzeugleiste kompakt.

', + code: '
<ion-segment class="segment-style-glass segment-expand" value="photos">\n  <ion-segment-button value="photos">Photos</ion-segment-button>\n  <ion-segment-button value="albums">Albums</ion-segment-button>\n</ion-segment>\n
', label: 'Segmente in voller Breite', themes: 'ios', }, { intro: - '

Eckige Schaltflächen

Unter MD3 verändert button-square die Ecken. Vergleichen Sie die Form mit dem Standardbutton.

', - code: '
<ion-button>Default</ion-button> <ion-button class="button-square">Square</ion-button>\n

Die Themes lassen sich mit der Ionic-Anleitung einrichten.

', + '

Eckige Schaltflächen

Unter MD3 verändert button-square die Ecken. Vergleichen Sie die Form mit dem Standardbutton.

', + code: '
<ion-button>Default</ion-button> <ion-button class="button-square">Square</ion-button>\n
', label: 'Eckige Schaltflächen', themes: 'md', }, + { + intro: + '

Position der Tableiste

Setzen Sie tab-bar-position-start, tab-bar-position-center oder tab-bar-position-end auf die Leiste. Anfang und Ende folgen der Leserichtung. Das gilt für Leisten am oberen und unteren Rand.

', + code: '
<ion-tab-bar slot="bottom" class="tab-bar-position-start">\n  <ion-tab-button tab="home">Home</ion-tab-button>\n  <ion-tab-button tab="library">Library</ion-tab-button>\n</ion-tab-bar>\n
', + label: 'Position der Tableiste', + themes: 'ios', + }, + { + intro: + '

Abschnittsköpfe in eingerückten Listen

Setzen Sie eine Gruppe mit item-group-header vor die Listeneinträge, um den Abschnitt mit Symbol, Titel und Beschreibung einzuleiten.

', + code: '
<ion-content color="light">\n  <ion-list inset="true">\n    <ion-item-group class="item-group-header">\n      <ion-item>\n        <ion-label>\n          <ion-icon name="mail-outline"></ion-icon>\n          <h2>Mail</h2>\n          <ion-text>Manage your accounts.</ion-text>\n        </ion-label>\n      </ion-item>\n    </ion-item-group>\n  </ion-list>\n</ion-content>\n
', + label: 'Abschnittsköpfe in eingerückten Listen', + themes: 'all', + }, + { + intro: + '

Suchleiste unter einem einklappbaren Titel

Setzen Sie searchbar-classic im einklappbaren Kopfbereich ein. Die Farbe der Werkzeugleiste bestimmt den Feldhintergrund. Beim Scrollen klappen Titel und Suchfeld gemeinsam ein.

', + code: '
<div class="ion-page">\n  <ion-header translucent="true">\n    <ion-toolbar color="light"><ion-title>Library</ion-title></ion-toolbar>\n  </ion-header>\n  <ion-content fullscreen="true" color="light">\n    <ion-header collapse="condense">\n      <ion-toolbar color="light"><ion-title size="large">Library</ion-title></ion-toolbar>\n      <ion-toolbar color="light"><ion-searchbar class="searchbar-classic"></ion-searchbar></ion-toolbar>\n    </ion-header>\n    <div style="min-height: 100vh">Albums</div>\n  </ion-content>\n</div>\n
', + tallPreview: true, + label: 'Suchleiste unter einem einklappbaren Titel', + themes: 'ios', + }, + { + intro: + '

Werkzeugleiste mit Suchfeld

Unter iOS 26 richtet toolbar-searchbar das Suchfeld an den Schaltflächen am Anfang oder Ende der Werkzeugleiste aus.

', + code: '
<ion-toolbar class="toolbar-searchbar">\n  <ion-buttons slot="start"><ion-button>Cancel</ion-button></ion-buttons>\n  <ion-searchbar></ion-searchbar>\n</ion-toolbar>\n
', + label: 'Werkzeugleiste mit Suchfeld', + themes: 'ios26', + }, + { + intro: + '

Schalter in den Android-Einstellungen

MD3-Schalter zeigen standardmäßig keine Ein/Aus-Symbole. Mit der Ionic-Eigenschaft enableOnOffLabels blenden Sie diese ein.

', + code: '
<ion-toggle enable-on-off-labels="true">Notifications</ion-toggle>\n

Gerätespezifische Layouts

Auf dem iPad mit dem iOS-27-Theme lässt sich der Inhalt eines modalen Sheets bei gleicher Höhe scrollen, wenn expandToScroll auf false steht. Unter dem Sheet bleibt ein Abstand. Ziehen Sie den Griff, um die Höhe zu ändern.

Scharnier und Navigationsleiste des iPhone Duo sind unter Gerätelayout und geteilte Ansichten beschrieben.

Die Themes lassen sich mit der Ionic-Anleitung einrichten.

', + label: 'Schalter in den Android-Einstellungen', + themes: 'md', + }, ], title: 'Spezielles Markup und Klassen', description: 'Vergleichen Sie dasselbe HTML mit den Themes für iOS 26, iOS 27 und Material Design 3. Wechseln Sie das Theme über dem jeweiligen Beispiel.', - html: '

Das Theme für eine Komponente deaktivieren

\n

Für das Ionic-Standarddesign einer Komponente fügen Sie ihr unter iOS 26 und 27 ios-theme-disabled und unter MD3 md3-disabled hinzu.

\n
<ion-button>Themed</ion-button>\n<ion-button class="ios-theme-disabled md3-disabled">Standard Ionic</ion-button>\n

Senden-Schaltflächen

\n

Verwenden Sie type="submit" zum Absenden eines Formulars oder button-submit für eine andere Aktion mit demselben Aussehen. Unter iOS 26 lässt sich die Glanzfarbe für Text und Rand je nach Schaltflächenfarbe festlegen. Für color="danger" verwenden Sie --ion-color-danger-brightness.

\n
<style>\n  :root {\n    --ion-color-primary-brightness: #96feff;\n    --ion-color-danger-brightness: #ffe3e5;\n  }\n</style>\n\n<ion-button type="submit" fill="solid" color="primary">Submit</ion-button>\n<ion-button class="button-submit" fill="solid" color="danger">Delete</ion-button>\n

Badges in der Werkzeugleiste

\n

Platzieren Sie das Badge im Button. Ein leeres Badge kennzeichnet ungelesene Nachrichten.

\n

\n
<ion-toolbar>\n  <ion-buttons slot="end">\n    <ion-button title="Unread mail">\n      <ion-icon slot="icon-only" name="mail-outline"></ion-icon>\n      <ion-badge></ion-badge>\n    </ion-button>\n    <ion-button title="Messages">\n      <ion-icon slot="icon-only" name="chatbubbles-outline"></ion-icon>\n      <ion-badge>3</ion-badge>\n    </ion-button>\n  </ion-buttons>\n</ion-toolbar>\n

Zweizeilige Listeneinträge

\n

Platzieren Sie die Notiz direkt hinter dem Label, um eine zweite Zeile anzuzeigen.

\n
<ion-content color="light">\n  <ion-list inset="true">\n    <ion-item-group>\n      <ion-item>\n        <ion-label>Network</ion-label>\n        <ion-note>Wi-Fi and mobile data</ion-note>\n      </ion-item>\n    </ion-item-group>\n  </ion-list>\n</ion-content>\n

Segmente in voller Breite

\n

Wählen Sie ein Segment aus. Unter iOS 26 und 27 aktiviert segment-style-glass die Glasoptik.

\n
<ion-segment class="segment-style-glass" value="photos">\n  <ion-segment-button value="photos">Photos</ion-segment-button>\n  <ion-segment-button value="albums">Albums</ion-segment-button>\n</ion-segment>\n

Eckige Schaltflächen

\n

Unter MD3 verändert button-square die Ecken. Vergleichen Sie die Form mit dem Standardbutton.

\n
<ion-button>Default</ion-button> <ion-button class="button-square">Square</ion-button>\n

Die Themes lassen sich mit der Ionic-Anleitung einrichten.

\n', headings: [ { id: 'das-theme-f%C3%BCr-eine-komponente-deaktivieren', text: 'Das Theme für eine Komponente deaktivieren', }, { id: 'senden-schaltfl%C3%A4chen', text: 'Senden-Schaltflächen' }, + { id: 'empfohlene-aktionen-in-overlays', text: 'Empfohlene Aktionen in Overlays' }, { id: 'badges-in-der-werkzeugleiste', text: 'Badges in der Werkzeugleiste' }, { id: 'zweizeilige-listeneintr%C3%A4ge', text: 'Zweizeilige Listeneinträge' }, { id: 'segmente-in-voller-breite', text: 'Segmente in voller Breite' }, { id: 'eckige-schaltfl%C3%A4chen', text: 'Eckige Schaltflächen' }, + { id: 'position-der-tableiste', text: 'Position der Tableiste' }, + { + id: 'abschnittsk%C3%B6pfe-in-einger%C3%BCckten-listen', + text: 'Abschnittsköpfe in eingerückten Listen', + }, + { + id: 'suchleiste-unter-einem-einklappbaren-titel', + text: 'Suchleiste unter einem einklappbaren Titel', + }, + { id: 'werkzeugleiste-mit-suchfeld', text: 'Werkzeugleiste mit Suchfeld' }, + { + id: 'schalter-in-den-android-einstellungen', + text: 'Schalter in den Android-Einstellungen', + }, + { id: 'ger%C3%A4tespezifische-layouts', text: 'Gerätespezifische Layouts' }, ], editUrl: 'https://github.com/webview-native-ui/docs/edit/main/projects/docs/src/guides/de/special-markup.md', diff --git a/projects/docs/src/guides/de/special-markup.md b/projects/docs/src/guides/de/special-markup.md index 0649ecc..0ae045e 100644 --- a/projects/docs/src/guides/de/special-markup.md +++ b/projects/docs/src/guides/de/special-markup.md @@ -1,8 +1,15 @@ --- -iosOnlyHeadings: ['Senden-Schaltflächen', 'Segmente in voller Breite'] -md3OnlyHeadings: ['Eckige Schaltflächen'] +iosOnlyHeadings: + [ + 'Senden-Schaltflächen', + 'Segmente in voller Breite', + 'Position der Tableiste', + 'Suchleiste unter einem einklappbaren Titel', + ] +ios26OnlyHeadings: ['Werkzeugleiste mit Suchfeld'] +md3OnlyHeadings: ['Eckige Schaltflächen', 'Schalter in den Android-Einstellungen'] title: 'Spezielles Markup und Klassen' -sourceRevision: '150c1bfb9b95ca9971ebd9508f5e7d7d895089d8b4e557f17d63fbbdd94f7a60' +sourceRevision: 'bcabd77a20589bfe71b552a3b3a0ee4f4a26b1126ba780711b1a938703337e30' --- # Spezielles Markup und Klassen @@ -34,6 +41,31 @@ Verwenden Sie `type="submit"` zum Absenden eines Formulars oder `button-submit` Delete ``` +## Empfohlene Aktionen in Overlays + +Geben Sie die Rolle im Array `buttons` an: `preferred` für die empfohlene Aktion, `destructive` für eine destruktive Aktion und `cancel` zum Abbrechen. Ohne Rolle gilt der Standardstil. Die Hervorhebung mit `preferred` löst die Aktion nicht automatisch aus. Wenn Sie im Beispiel „Save“ wählen, schließt sich das Overlay mit der Rolle `preferred`. + +Unter iOS ist die empfohlene Aktion in beiden Komponenten farbig hinterlegt. MD3 verwendet im Alert einen gefüllten Button und hebt die Zeile im Action Sheet durch Textfarbe und Schriftstärke hervor. + + +```html +Alert + + +Action sheet + + + +``` + ## Badges in der Werkzeugleiste Platzieren Sie das Badge im Button. Ein leeres Badge kennzeichnet ungelesene Nachrichten. @@ -75,8 +107,10 @@ Platzieren Sie die Notiz direkt hinter dem Label, um eine zweite Zeile anzuzeige Wählen Sie ein Segment aus. Unter iOS 26 und 27 aktiviert segment-style-glass die Glasoptik. +Mit `segment-expand` werden die Schaltflächen gleich breit. Unter iOS 27 bleibt das Segment damit auch in einer Werkzeugleiste kompakt. + ```html - + Photos Albums @@ -90,4 +124,84 @@ Unter MD3 verändert button-square die Ecken. Vergleichen Sie die Form mit dem S Default Square ``` +## Position der Tableiste + +Setzen Sie `tab-bar-position-start`, `tab-bar-position-center` oder `tab-bar-position-end` auf die Leiste. Anfang und Ende folgen der Leserichtung. Das gilt für Leisten am oberen und unteren Rand. + + +```html + + Home + Library + +``` + +## Abschnittsköpfe in eingerückten Listen + +Setzen Sie eine Gruppe mit `item-group-header` vor die Listeneinträge, um den Abschnitt mit Symbol, Titel und Beschreibung einzuleiten. + + +```html + + + + + + +

Mail

+ Manage your accounts. +
+
+
+
+
+``` + +## Suchleiste unter einem einklappbaren Titel + +Setzen Sie `searchbar-classic` im einklappbaren Kopfbereich ein. Die Farbe der Werkzeugleiste bestimmt den Feldhintergrund. Beim Scrollen klappen Titel und Suchfeld gemeinsam ein. + + +```html +
+ + Library + + + + Library + + +
Albums
+
+
+``` + +## Werkzeugleiste mit Suchfeld + +Unter iOS 26 richtet `toolbar-searchbar` das Suchfeld an den Schaltflächen am Anfang oder Ende der Werkzeugleiste aus. + + +```html + + Cancel + + +``` + +## Schalter in den Android-Einstellungen + +MD3-Schalter zeigen standardmäßig keine Ein/Aus-Symbole. Mit der Ionic-Eigenschaft `enableOnOffLabels` blenden Sie diese ein. + + +```html +Notifications +``` + +## Gerätespezifische Layouts + +Auf dem iPad mit dem iOS-27-Theme lässt sich der Inhalt eines modalen Sheets bei gleicher Höhe scrollen, wenn `expandToScroll` auf `false` steht. Unter dem Sheet bleibt ein Abstand. Ziehen Sie den Griff, um die Höhe zu ändern. + +Scharnier und Navigationsleiste des iPhone Duo sind unter [Gerätelayout und geteilte Ansichten](/projects/ionic-theme-ios27/docs/vertical-bars-layout) beschrieben. + Die Themes lassen sich mit der [Ionic-Anleitung](/standard-setup) einrichten. diff --git a/projects/docs/src/guides/en/special-markup.md b/projects/docs/src/guides/en/special-markup.md index 9382445..30b1523 100644 --- a/projects/docs/src/guides/en/special-markup.md +++ b/projects/docs/src/guides/en/special-markup.md @@ -1,6 +1,13 @@ --- -iosOnlyHeadings: ['Submit buttons', 'Full-width segments'] -md3OnlyHeadings: ['Square buttons'] +iosOnlyHeadings: + [ + 'Submit buttons', + 'Full-width segments', + 'Tab bar position', + 'Classic search bar in a collapsing header', + ] +ios26OnlyHeadings: ['Search-bar toolbars'] +md3OnlyHeadings: ['Square buttons', 'Android Settings controls'] title: 'Special markup and classes' --- @@ -33,6 +40,31 @@ Use `type="submit"` to submit a form or `button-submit` to give another action t Delete ``` +## Preferred overlay actions + +Set the role on a button in the overlay’s `buttons` array. Use `preferred` for the recommended action, `destructive` for a destructive action and `cancel` to cancel. A button without a role uses the default style. The theme highlights `preferred` without invoking it automatically. Choosing Save in this example dismisses the overlay with the role `preferred`. + +On iOS, the preferred button has a filled background in both overlays. MD3 fills the preferred alert button and emphasizes the action sheet row with its text color and weight. + + +```html +Alert + + +Action sheet + + + +``` + ## Toolbar badges Place a badge inside its toolbar button. An empty badge marks unread activity. @@ -74,8 +106,10 @@ Place the note immediately after the label to display a second line inside an in Select a segment. The segment-style-glass class applies the glass style on iOS 26 and 27. +Use `segment-expand` to give the buttons equal widths. On iOS 27 this also keeps the segment compact inside a toolbar. + ```html - + Photos Albums @@ -89,4 +123,84 @@ The button-square class changes the corner shape on MD3. Compare it with the def Default Square ``` +## Tab bar position + +Set `tab-bar-position-start`, `tab-bar-position-center` or `tab-bar-position-end` on the bar. Start and end follow the reading direction. The classes work in both the top and bottom slots. + + +```html + + Home + Library + +``` + +## Inset-list section headers + +Place an `item-group-header` group before the group of list items to introduce a section with an icon, title and description. + + +```html + + + + + + +

Mail

+ Manage your accounts. +
+
+
+
+
+``` + +## Classic search bar in a collapsing header + +Place `searchbar-classic` inside the collapsing header. Give its toolbar a color for the field background. Scroll the example to collapse the large title and search field together. + + +```html +
+ + Library + + + + Library + + +
Albums
+
+
+``` + +## Search-bar toolbars + +On iOS 26, `toolbar-searchbar` aligns the search field with buttons in the start or end slot. + + +```html + + Cancel + + +``` + +## Android Settings controls + +MD3 toggles have no on/off symbols by default. Enable them with the Ionic `enableOnOffLabels` property. + + +```html +Notifications +``` + +## Device-specific layouts + +On iPad with the iOS 27 theme, setting `expandToScroll` to `false` on a sheet modal lets its content scroll at the current breakpoint and leaves a gap below the sheet. Drag the handle to resize it. + +For the iPhone Duo hinge and vertical rail, see [Device layout and split panes](/projects/ionic-theme-ios27/docs/vertical-bars-layout). + Apply the themes to your app with the [Ionic setup guide](/standard-setup). diff --git a/projects/docs/src/guides/fr/special-markup.md b/projects/docs/src/guides/fr/special-markup.md index 0fd1aa1..f749e18 100644 --- a/projects/docs/src/guides/fr/special-markup.md +++ b/projects/docs/src/guides/fr/special-markup.md @@ -1,8 +1,15 @@ --- -iosOnlyHeadings: ['Boutons de soumission', 'Segments pleine largeur'] -md3OnlyHeadings: ['Boutons carrés'] +iosOnlyHeadings: + [ + 'Boutons de soumission', + 'Segments pleine largeur', + 'Position de la barre d’onglets', + 'Recherche sous un grand titre repliable', + ] +ios26OnlyHeadings: ['Barre d’outils avec recherche'] +md3OnlyHeadings: ['Boutons carrés', 'Interrupteurs des paramètres Android'] title: 'Balisage et classes spécifiques' -sourceRevision: '150c1bfb9b95ca9971ebd9508f5e7d7d895089d8b4e557f17d63fbbdd94f7a60' +sourceRevision: 'bcabd77a20589bfe71b552a3b3a0ee4f4a26b1126ba780711b1a938703337e30' --- # Balisage et classes spécifiques @@ -34,6 +41,31 @@ Utilisez `type="submit"` pour envoyer un formulaire ou `button-submit` pour donn Delete ``` +## Actions recommandées dans les overlays + +Définissez le rôle de chaque bouton dans le tableau `buttons` : `preferred` pour l’action recommandée, `destructive` pour une action destructive et `cancel` pour annuler. Sans rôle, le bouton conserve son style normal. Le rôle `preferred` met l’action en évidence sans la déclencher automatiquement. Dans cet exemple, sélectionner « Save » ferme la fenêtre avec le rôle `preferred`. + +Sur iOS, le bouton recommandé a un fond plein dans les deux composants. Sur MD3, il a un fond plein dans une alerte ; dans une feuille d’actions, la couleur et la graisse du texte le distinguent. + + +```html +Alert + + +Action sheet + + + +``` + ## Badges de barre d’outils Placez le badge dans le bouton. Un badge vide indique une notification non lue. @@ -75,8 +107,10 @@ Placez la note après le libellé pour afficher une seconde ligne. Sélectionnez un segment. La classe segment-style-glass active le style verre sous iOS 26 et 27. +Utilisez `segment-expand` pour donner la même largeur aux boutons. Sous iOS 27, le segment reste également compact dans une barre d’outils. + ```html - + Photos Albums @@ -90,4 +124,84 @@ La classe button-square modifie les angles sous MD3. Comparez avec le bouton sta Default Square ``` +## Position de la barre d’onglets + +Appliquez `tab-bar-position-start`, `tab-bar-position-center` ou `tab-bar-position-end` à la barre. Le début et la fin suivent le sens de lecture, en haut comme en bas. + + +```html + + Home + Library + +``` + +## En-têtes des listes en retrait + +Placez un groupe `item-group-header` avant les éléments de liste pour présenter la section avec une icône, un titre et une description. + + +```html + + + + + + +

Mail

+ Manage your accounts. +
+
+
+
+
+``` + +## Recherche sous un grand titre repliable + +Placez `searchbar-classic` dans l’en-tête repliable et donnez une couleur à sa barre d’outils pour définir le fond du champ. Faites défiler pour replier le titre et le champ ensemble. + + +```html +
+ + Library + + + + Library + + +
Albums
+
+
+``` + +## Barre d’outils avec recherche + +Sous iOS 26, `toolbar-searchbar` aligne le champ de recherche avec les boutons placés au début ou à la fin. + + +```html + + Cancel + + +``` + +## Interrupteurs des paramètres Android + +Les interrupteurs MD3 masquent les symboles marche/arrêt par défaut. Activez la propriété Ionic `enableOnOffLabels` pour les afficher. + + +```html +Notifications +``` + +## Dispositions propres aux appareils + +Sur iPad avec le thème iOS 27, régler `expandToScroll` sur `false` permet de faire défiler le contenu sans agrandir la fenêtre modale et laisse un espace sous celle-ci. Faites glisser la poignée pour ajuster sa hauteur. + +Pour la charnière et le rail de l’iPhone Duo, consultez [Disposition et panneaux](/projects/ionic-theme-ios27/docs/vertical-bars-layout). + Pour appliquer les thèmes, consultez le [guide Ionic](/standard-setup). diff --git a/projects/docs/src/guides/ja/special-markup.md b/projects/docs/src/guides/ja/special-markup.md index f8105bf..e79307c 100644 --- a/projects/docs/src/guides/ja/special-markup.md +++ b/projects/docs/src/guides/ja/special-markup.md @@ -1,8 +1,10 @@ --- -iosOnlyHeadings: ['送信ボタン', '全幅のセグメント'] -md3OnlyHeadings: ['角を立てたボタン'] +iosOnlyHeadings: + ['送信ボタン', '全幅のセグメント', 'タブバーの配置', '大見出しと一緒に折りたたむ検索バー'] +ios26OnlyHeadings: ['検索バーとツールバーボタン'] +md3OnlyHeadings: ['角を立てたボタン', 'Android 設定画面のトグル'] title: '特別なマークアップとクラス' -sourceRevision: '150c1bfb9b95ca9971ebd9508f5e7d7d895089d8b4e557f17d63fbbdd94f7a60' +sourceRevision: 'bcabd77a20589bfe71b552a3b3a0ee4f4a26b1126ba780711b1a938703337e30' --- # 特別なマークアップとクラス @@ -34,6 +36,31 @@ Ionic標準の外観を使いたいコンポーネントに、iOS 26・27では Delete ``` +## オーバーレイの推奨アクション + +各ボタンの役割は、オーバーレイの `buttons` 配列で指定します。推奨する操作には `preferred`、削除などの取り消せない操作には `destructive`、キャンセルには `cancel` を使います。省略すると通常のボタンになります。`preferred` は操作を強調する指定です。この例で「Save」を押して閉じると、返されるロールは `preferred` になります。 + +iOS ではどちらも推奨ボタンが塗りつぶされます。MD3 ではアラートの推奨ボタンが塗りつぶされ、アクションシートでは文字の色と太さで強調されます。 + + +```html +Alert + + +Action sheet + + + +``` + ## ツールバーボタンのバッジ アイコンとバッジをボタンの直下に並べます。封筒の右上に未読の点、吹き出しの右上にメッセージの件数が表示されます。 @@ -75,8 +102,10 @@ Ionic標準の外観を使いたいコンポーネントに、iOS 26・27では タブを選んで表示を切り替えてください。iOS 26・27ではsegment-style-glassで選択部分にガラスの表現を適用できます。 +各ボタンを等幅にするには `segment-expand` を使います。iOS 27 ではツールバー内でもコンパクトな高さになります。 + ```html - + Photos Albums @@ -90,4 +119,84 @@ MD3ではbutton-squareでボタンの角を立てられます。標準のボタ Default Square ``` +## タブバーの配置 + +タブバーに `tab-bar-position-start`、`tab-bar-position-center`、`tab-bar-position-end` のいずれかを付けます。開始端と終了端は文字の向きに従います。上部・下部どちらのタブバーにも使えます。 + + +```html + + Home + Library + +``` + +## インセットリストの見出し + +項目のグループの前に `item-group-header` を付けたグループを置くと、アイコン、タイトル、説明をまとめて表示できます。 + + +```html + + + + + + +

Mail

+ Manage your accounts. +
+
+
+
+
+``` + +## 大見出しと一緒に折りたたむ検索バー + +折りたたみヘッダー内の検索バーに `searchbar-classic` を付けます。ツールバーに色を指定すると、検索欄の背景に反映されます。例をスクロールすると、大見出しと検索欄が一緒に折りたたまれます。 + + +```html +
+ + Library + + + + Library + + +
Albums
+
+
+``` + +## 検索バーとツールバーボタン + +iOS 26 では、ツールバーに `toolbar-searchbar` を付けると、検索欄とその両端のボタンの位置がそろいます。 + + +```html + + Cancel + + +``` + +## Android 設定画面のトグル + +MD3 のトグルは標準でオン・オフの記号を表示しません。記号を表示するには Ionic の `enableOnOffLabels` を有効にします。 + + +```html +Notifications +``` + +## 端末ごとのレイアウト + +iPad の iOS 27 テーマでは、シートモーダルの `expandToScroll` を `false` にすると、シートの下に余白ができ、現在の高さのまま内容をスクロールできます。高さを変えるにはハンドルをドラッグします。 + +iPhone Duo のヒンジと縦レールについては[端末レイアウトと分割ペイン](/projects/ionic-theme-ios27/docs/vertical-bars-layout)を参照してください。 + アプリへのテーマの適用は[Ionicアプリに導入する](/standard-setup)を参照してください。 diff --git a/scripts/site-contract.test.ts b/scripts/site-contract.test.ts index 2146cec..54e7836 100644 --- a/scripts/site-contract.test.ts +++ b/scripts/site-contract.test.ts @@ -532,9 +532,13 @@ test('all published internal document links resolve within this standalone site' const { GUIDE_CONTENT } = await import('../projects/docs/src/app/generated/guide-content.generated'); for (const chapter of GUIDE_CHAPTERS) { + const guide = GUIDE_CONTENT[chapter.id][locale]; documents.push({ name: `guides/${chapter.id}/${locale}`, - html: GUIDE_CONTENT[chapter.id][locale].html, + html: + 'html' in guide + ? guide.html + : guide.previewSections.map((s) => s.intro + s.code).join(''), }); } diff --git a/scripts/standard-setup.ts b/scripts/standard-setup.ts index 7b7c57d..db38de0 100644 --- a/scripts/standard-setup.ts +++ b/scripts/standard-setup.ts @@ -15,15 +15,22 @@ import { addHeadingAliases } from './markdown-headings'; interface GuideContent { title: string; description: string; - html: string; + html?: string; headings: { id: string; text: string }[]; editUrl: string; - previewSections?: { intro: string; code: string; label: string; themes: 'all' | 'ios' | 'md' }[]; + previewSections?: { + intro: string; + code: string; + label: string; + tallPreview?: boolean; + themes: 'all' | 'ios' | 'ios26' | 'md'; + }[]; } async function renderGuide(root: string, slug: string): Promise> { const english = await readFile(join(root, `projects/docs/src/guides/en/${slug}.md`), 'utf8'); const guides: Record = {}; + let englishHtml = ''; for (const { code } of PUBLISHED_DOCS_LOCALES) { const source = `projects/docs/src/guides/${code}/${slug}.md`; const raw = await readFile(join(root, source), 'utf8'); @@ -31,6 +38,7 @@ async function renderGuide(root: string, slug: string): Promise; md3OnlyHeadings?: string[]; + ios26OnlyHeadings?: string[]; iosOnlyHeadings?: string[]; }>(raw); const body = parsed.body.trim(); @@ -51,7 +59,8 @@ async function renderGuide(root: string, slug: string): Promise]*\bcollapse="condense")/.test( + node.textContent, + ) + ? { tallPreview: true } + : {}), label, themes: parsed.attributes.md3OnlyHeadings?.includes(label) ? ('md' as const) - : parsed.attributes.iosOnlyHeadings?.includes(label) - ? ('ios' as const) - : ('all' as const), + : parsed.attributes.ios26OnlyHeadings?.includes(label) + ? ('ios26' as const) + : parsed.attributes.iosOnlyHeadings?.includes(label) + ? ('ios' as const) + : ('all' as const), }); intro = ''; } else { @@ -81,7 +97,7 @@ async function renderGuide(root: string, slug: string): Promise ({ id: heading.id, text: heading.textContent?.trim() ?? '',