From c789c990361fd9b520322408a4807ce80c4b1e6a Mon Sep 17 00:00:00 2001 From: Elliott Marquez Date: Mon, 25 Sep 2023 11:19:49 -0700 Subject: [PATCH] chore(fab): explicitly mark function as protected for API docs PiperOrigin-RevId: 568274397 --- catalog/eleventy-helpers/filters/md-markdown.cjs | 5 +++++ catalog/src/components/nav-drawer.ts | 5 ++++- docs/components/button.md | 2 +- docs/components/checkbox.md | 2 +- docs/components/chip.md | 2 +- docs/components/dialog.md | 2 +- docs/components/divider.md | 2 +- docs/components/elevation.md | 2 +- docs/components/fab.md | 5 +++-- docs/components/figures/select/theming-outlined.html | 4 +++- docs/components/figures/select/usage.html | 1 - docs/components/focus-ring.md | 3 +-- docs/components/icon-button.md | 2 +- docs/components/icon.md | 2 +- docs/components/list.md | 1 + docs/components/menu.md | 1 + docs/components/progress.md | 2 +- docs/components/radio.md | 2 +- docs/components/ripple.md | 2 +- docs/components/select.md | 2 +- docs/components/slider.md | 2 +- docs/components/switch.md | 2 +- docs/components/tabs.md | 2 +- docs/components/text-field.md | 2 +- fab/internal/fab.ts | 2 +- 25 files changed, 35 insertions(+), 24 deletions(-) diff --git a/catalog/eleventy-helpers/filters/md-markdown.cjs b/catalog/eleventy-helpers/filters/md-markdown.cjs index 6820481ead..5bdb6e758d 100644 --- a/catalog/eleventy-helpers/filters/md-markdown.cjs +++ b/catalog/eleventy-helpers/filters/md-markdown.cjs @@ -26,6 +26,11 @@ function fixLinks($, redirects) { let [path, hash] = href.split('#'); + // it's probably a href="#section" link + if (path.length === 0) { + continue; + } + for (const [pattern, replacement] of redirects) { const regex = new RegExp(pattern); path = path.replace(regex, replacement); diff --git a/catalog/src/components/nav-drawer.ts b/catalog/src/components/nav-drawer.ts index 29af1dc278..ed3ffa2b8e 100644 --- a/catalog/src/components/nav-drawer.ts +++ b/catalog/src/components/nav-drawer.ts @@ -230,10 +230,13 @@ import {SignalElement} from '../signals/signal-element.js'; .pane.toc { width: auto; box-sizing: border-box; - padding-inline: var(--catalog-spacing-xl); width: var(--_toc-pane-width); } + .toc .scroll-wrapper { + padding-inline: var(--catalog-spacing-xl); + } + .pane.toc p { margin-block: 0; font-size: var(--catalog-label-s-font-size); diff --git a/docs/components/button.md b/docs/components/button.md index ebb3cd58e0..62bed800da 100644 --- a/docs/components/button.md +++ b/docs/components/button.md @@ -46,7 +46,7 @@ payment'" * [Design article](https://m3.material.io/components/buttons) -* API Documentation (*coming soon*) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/button) diff --git a/docs/components/checkbox.md b/docs/components/checkbox.md index 4544b6e4a5..def6c79838 100644 --- a/docs/components/checkbox.md +++ b/docs/components/checkbox.md @@ -44,7 +44,7 @@ user needs to select one or more options from a list. * [Design article](https://m3.material.io/components/checkbox) -* API Documentation (*coming soon*) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/checkbox) diff --git a/docs/components/chip.md b/docs/components/chip.md index 618167dce0..f811377263 100644 --- a/docs/components/chip.md +++ b/docs/components/chip.md @@ -42,7 +42,7 @@ title="Filter chips"> * [Design article](https://m3.material.io/components/chips) -* API Documentation (*coming soon*) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/chips) diff --git a/docs/components/dialog.md b/docs/components/dialog.md index 3fd252eadf..f51e92c4ef 100644 --- a/docs/components/dialog.md +++ b/docs/components/dialog.md @@ -38,7 +38,7 @@ title="A dialog"> * [Design article](https://m3.material.io/components/dialogs) -* API Documentation (*coming soon*) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/dialog) diff --git a/docs/components/divider.md b/docs/components/divider.md index a35c4524f4..439919d664 100644 --- a/docs/components/divider.md +++ b/docs/components/divider.md @@ -19,7 +19,7 @@ define tappable regions in an accordion. ![Screenshot of five stacked dividers](images/divider/hero.png "Dividers separating items in a list.") * [Design article](https://m3.material.io/components/divider) -* API Documentation (*coming soon*) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/divider) diff --git a/docs/components/elevation.md b/docs/components/elevation.md index 3ecf55dc4e..972687c072 100644 --- a/docs/components/elevation.md +++ b/docs/components/elevation.md @@ -20,7 +20,7 @@ UI’s elevation story. ![Diagram showing the five elevation levels and their respective dp values](images/elevation/hero.png "Material uses six levels of elevation, each with a corresponding dp value. These values are named for their relative distance above the UI’s surface: 0, +1, +2, +3, +4, and +5. An element’s resting state can be on levels 0 to +3, while levels +4 and +5 are reserved for user-interacted states such as hover and dragged.") * [Design article](https://m3.material.io/styles/elevation) -* API Documentation (*coming soon*) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/elevation) diff --git a/docs/components/fab.md b/docs/components/fab.md index 0843d2ffa7..b42b4101fe 100644 --- a/docs/components/fab.md +++ b/docs/components/fab.md @@ -88,8 +88,9 @@ payment'" -1. [Extended FAB with both icon and label text](#extended) -2. [Extended FAB without icon](#without-icon) +* [Extended FAB with both icon and label text](#extended) +* [API Documentation](#api) +* [Extended FAB without icon](#without-icon) ## Usage diff --git a/docs/components/figures/select/theming-outlined.html b/docs/components/figures/select/theming-outlined.html index a4125aad66..27caf671ae 100644 --- a/docs/components/figures/select/theming-outlined.html +++ b/docs/components/figures/select/theming-outlined.html @@ -5,6 +5,9 @@ aria-label="Image of an outlined select with a different theme applied" > -
Apple
diff --git a/docs/components/figures/select/usage.html b/docs/components/figures/select/usage.html index 5c284b7a25..89f2b614c6 100644 --- a/docs/components/figures/select/usage.html +++ b/docs/components/figures/select/usage.html @@ -21,7 +21,6 @@
Apricot
- diff --git a/docs/components/focus-ring.md b/docs/components/focus-ring.md index b7c0a95fa3..14afa85bd6 100644 --- a/docs/components/focus-ring.md +++ b/docs/components/focus-ring.md @@ -18,8 +18,7 @@ to determine when they are visible. ![Three elements with a focus ring that moves between them.](images/focus/hero.gif "A focus ring moving across elements.") -* Design article (*coming soon*) -* API Documentation (*coming soon*) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/focus) diff --git a/docs/components/icon-button.md b/docs/components/icon-button.md index 0b1bdc7356..d5dd8f2c44 100644 --- a/docs/components/icon-button.md +++ b/docs/components/icon-button.md @@ -35,7 +35,7 @@ people take supplementary actions with a single tap. * [Design article](https://m3.material.io/components/icon-buttons) -* API Documentation (*coming soon*) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/iconbutton) diff --git a/docs/components/icon.md b/docs/components/icon.md index 61238698b4..4a02f7fca3 100644 --- a/docs/components/icon.md +++ b/docs/components/icon.md @@ -17,7 +17,7 @@ created at seven weights across three different styles. ![Array of icons with various stylistic attributes](images/icon/hero.gif) * [Design article](https://m3.material.io/styles/icons) -* API Documentation (*coming soon*) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/icon) diff --git a/docs/components/list.md b/docs/components/list.md index d03403d5e8..7706d097c3 100644 --- a/docs/components/list.md +++ b/docs/components/list.md @@ -39,6 +39,7 @@ vertical indexes of text and images * [Design article](https://m3.material.io/components/lists) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/list) diff --git a/docs/components/menu.md b/docs/components/menu.md index 71c121b0ce..048b0e8c19 100644 --- a/docs/components/menu.md +++ b/docs/components/menu.md @@ -40,6 +40,7 @@ choices on a temporary surface. * [Design article](https://m3.material.io/components/menus) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/menu) diff --git a/docs/components/progress.md b/docs/components/progress.md index 129ee26d44..8b4cdff081 100644 --- a/docs/components/progress.md +++ b/docs/components/progress.md @@ -45,7 +45,7 @@ There are two types of progress indicators: linear and circular. * [Design article](https://m3.material.io/components/progress-indicators) -* API Documentation (*coming soon*) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/progress) diff --git a/docs/components/radio.md b/docs/components/radio.md index 7ac5704091..067367eff8 100644 --- a/docs/components/radio.md +++ b/docs/components/radio.md @@ -37,7 +37,7 @@ people select one option from a set of options. * [Design article](https://m3.material.io/components/radio-button) -* API Documentation (*coming soon*) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/radio) diff --git a/docs/components/ripple.md b/docs/components/ripple.md index 7419656548..90fd58dca6 100644 --- a/docs/components/ripple.md +++ b/docs/components/ripple.md @@ -44,7 +44,7 @@ title="A bounded and unbounded ripple."> * [Design article](https://m3.material.io/foundations/interaction/states/state-layers) -* API Documentation (*coming soon*) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/ripple) diff --git a/docs/components/select.md b/docs/components/select.md index 63d4a568dd..3af479c217 100644 --- a/docs/components/select.md +++ b/docs/components/select.md @@ -38,7 +38,7 @@ selected menu item above the menu. * Design article (*coming soon*) -* API Documentation (*coming soon*) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/select) diff --git a/docs/components/slider.md b/docs/components/slider.md index 67a55709ee..71c1ffe475 100644 --- a/docs/components/slider.md +++ b/docs/components/slider.md @@ -43,7 +43,7 @@ Sliders can use icons or labels to represent a numeric or relative scale. * [Design article](https://m3.material.io/components/sliders) -* API Documentation (*coming soon*) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/slider) diff --git a/docs/components/switch.md b/docs/components/switch.md index b0ff77ce4f..7674b918d9 100644 --- a/docs/components/switch.md +++ b/docs/components/switch.md @@ -41,7 +41,7 @@ of an item on or off. * [Design article](https://m3.material.io/components/switch) -* API Documentation (*coming soon*) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/switch) diff --git a/docs/components/tabs.md b/docs/components/tabs.md index b3a0c3c262..40bd930a5f 100644 --- a/docs/components/tabs.md +++ b/docs/components/tabs.md @@ -44,7 +44,7 @@ related content that are at the same level of hierarchy. * [Design article](https://m3.material.io/components/tabs) -* API Documentation (*coming soon*) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/tabs) diff --git a/docs/components/text-field.md b/docs/components/text-field.md index 0b1470620d..d91c67b40a 100644 --- a/docs/components/text-field.md +++ b/docs/components/text-field.md @@ -38,7 +38,7 @@ title="Text fields"> * [Design article](https://m3.material.io/components/text-fields) -* API Documentation (*coming soon*) +* [API Documentation](#api) * [Source code](https://github.com/material-components/material-web/tree/main/textfield) diff --git a/fab/internal/fab.ts b/fab/internal/fab.ts index ddadc0cc5d..f4ff602e65 100644 --- a/fab/internal/fab.ts +++ b/fab/internal/fab.ts @@ -20,7 +20,7 @@ export class Fab extends SharedFab { */ @property() variant: FabVariant = 'surface'; - override getRenderClasses() { + protected override getRenderClasses() { return { ...super.getRenderClasses(), 'primary': this.variant === 'primary',