Skip to content

Commit bf42851

Browse files
committed
Merge branch 'main' into translation/jp-20251007
# Conflicts: # cspell-wordlist.txt # plugins/docusaurus-plugin-ionic-component-api/index.js # scripts/build-translate/index.ts # scripts/data/translated-api.json # scripts/data/translated-cache.json # src/components/page/reference/ReleaseNotes/release-notes.json # src/translate/.detection/api/app.json # src/translate/.detection/api/menu.json # src/translate/.detection/api/popover.json # src/translate/api/app.json # src/translate/api/menu.json # src/translate/api/popover.json # static/code/stackblitz/v7/react/package-lock.json # static/code/stackblitz/v7/vue/package-lock.json # static/code/stackblitz/v8/react/package-lock.json # static/code/stackblitz/v8/vue/package-lock.json # static/usage/v8/radio/label-wrap/index.md # static/usage/v8/segment/swipeable/index.md
2 parents 69a3d24 + 34b943c commit bf42851

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+2537
-15237
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
# デプロイ
3737
- name: deploy
3838
run: |
39-
npx netlify-cli deploy \
39+
npx netlify-cli@23.7.3 deploy \
4040
--site ${{ secrets.NETLIFY_SITE_ID }} \
4141
--dir www/ \
4242
--auth ${{ secrets.NETLIFY_TOKEN }} \

cspell-wordlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,6 @@ webnative
8484

8585
browserslistrc
8686
ionicframework
87+
tappable
88+
Overscroll
89+
expressjs

docs/api/picker.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,37 @@ Each [Picker Column](./picker-column) can be navigated using the keyboard when f
235235
| <kbd>Home</kbd> | Scroll to the first option. |
236236
| <kbd>End</kbd> | Scroll to the last option. |
237237

238+
## Accessibility
239+
240+
### Screen Readers
241+
242+
Picker supports navigation using a screen reader by implementing the [`slider` role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/slider_role) on each [Picker Column](./picker-column). The following gestures can be used to navigate the Picker.
243+
244+
| Gesture | Function |
245+
| - | - |
246+
| Swipe Left | Move focus to the previous Picker Column. |
247+
| Swipe Right | Move focus to the next Picker Column. |
248+
| Swipe Up | Select the next option in the Picker Column. |
249+
| Swipe Down | Select the previous option in the Picker Column. |
250+
| Double Tap and Slide Up/Down | Adjust the selected option in the Picker Column. Can be used as an alternative to swiping up and down. |
251+
252+
:::caution
253+
The Swipe Up and Swipe Down gestures rely on the correct key events being synthesized as noted on the [`slider` documentation](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/slider_role). [Chromium-based browsers do not synthesize keyboard events correctly](https://issues.chromium.org/issues/40816094), but the "Double Tap and Slide Up/Down" gesture can be used as an alternative until this has been implemented in Chromium-based browsers.
254+
:::
255+
256+
### Keyboard Interactions
257+
258+
Each [Picker Column](./picker-column) can be navigated using the keyboard when focused.
259+
260+
| Key | Description |
261+
| -------------------- | ------------------------------------ |
262+
| <kbd>ArrowUp</kbd> | Scroll to the previous option. |
263+
| <kbd>ArrowDown</kbd> | Scroll to the next option. |
264+
| <kbd>PageUp</kbd> | Scroll up by more than one option. |
265+
| <kbd>PageDown</kbd> | Scroll down by more than one option. |
266+
| <kbd>Home</kbd> | Scroll to the first option. |
267+
| <kbd>End</kbd> | Scroll to the last option. |
268+
238269
## プロパティ
239270
<Props />
240271

plugins/docusaurus-plugin-ionic-component-api/index.js

Lines changed: 19 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,31 @@ module.exports = function (context, options) {
1919
*/
2020
const generateMarkdownForVersion = async (version, npmTag, isCurrentVersion) => {
2121
let COMPONENT_LINK_REGEXP;
22-
const response = isCurrentVersion
23-
? await fetch(`https://unpkg.com/@ionic/docs@${npmTag}/core.json`)
24-
: await fetch(`https://unpkg.com/@ionic/docs@${npmTag}/core.json`);
25-
const { components } = await response.json();
26-
22+
const components = await (async () => {
23+
if (isCurrentVersion) {
24+
const { components } = require(process.cwd() + `/scripts/data/translated-api.json`);
25+
return components;
26+
} else {
27+
const response = isCurrentVersion
28+
? await fetch(
29+
`https://raw.githubusercontent.com/ionic-jp/ionic-docs/main/scripts/data/translated-api.json`
30+
)
31+
: await fetch(`https://unpkg.com/@ionic/docs@${npmTag}/core.json`);
32+
const { components } = await response.json();
33+
return components;
34+
}
35+
})();
36+
// const response = isCurrentVersion
37+
// ? await fetch(`https://raw.githubusercontent.com/ionic-jp/ionic-docs/main/scripts/data/translated-api.json`)
38+
// : await fetch(`https://unpkg.com/@ionic/docs@${npmTag}/core.json`);
39+
// const { components } = await response.json();
2740
const names = components.map((component) => component.tag.slice(4));
2841
// matches all relative markdown links to a component, e.g. (../button)
2942
COMPONENT_LINK_REGEXP = new RegExp(`\\(../(${names.join('|')})/?(#[^)]+)?\\)`, 'g');
30-
3143
components.forEach((comp) => {
3244
const compTag = comp.tag.slice(4);
3345
const outDir = getDirectoryPath(compTag, version, isCurrentVersion);
34-
comp = translateDocs(comp);
46+
3547
data.push({
3648
outDir,
3749
componentTag: compTag,
@@ -327,45 +339,3 @@ ${slots.map((slot) => `| \`${slot.name}\` | ${formatMultiline(slot.docs)} |`).jo
327339
328340
`;
329341
}
330-
331-
function translateDocs(comp) {
332-
const { props, events, methods, parts, styles, slots } = comp;
333-
return {
334-
...comp,
335-
props: props.map((prop) => ({
336-
...prop,
337-
docs: translate(prop.docs),
338-
})),
339-
events: events.map((event) => ({
340-
...event,
341-
docs: translate(event.docs),
342-
})),
343-
methods: methods.map((method) => ({
344-
...method,
345-
docs: translate(method.docs),
346-
})),
347-
parts: parts.map((part) => ({
348-
...part,
349-
docs: translate(part.docs),
350-
})),
351-
styles: styles.map((styles) => ({
352-
...styles,
353-
docs: translate(styles.docs),
354-
})),
355-
slots: slots.map((slot) => ({
356-
...slot,
357-
docs: translate(slot.docs),
358-
})),
359-
};
360-
}
361-
362-
function translate(docs) {
363-
const TranslatedFile = require(process.cwd() + '/scripts/data/translated-cache.json');
364-
const translated = TranslatedFile.cache;
365-
366-
if (translated.hasOwnProperty(docs)) {
367-
return translated[docs];
368-
}
369-
370-
return docs;
371-
}

scripts/_api.js

Lines changed: 0 additions & 156 deletions
This file was deleted.

0 commit comments

Comments
 (0)