Skip to content

Commit 6954677

Browse files
Elliott Marquezcopybara-github
authored andcommitted
docs: fix doc formatting that works in google but not github
fixes #2334 PiperOrigin-RevId: 370196653
1 parent 018ff45 commit 6954677

File tree

2 files changed

+70
-135
lines changed

2 files changed

+70
-135
lines changed

packages/dialog/README.md

Lines changed: 51 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -288,111 +288,59 @@ the `escapeKeyAction` attribute to an empty string `""`.
288288

289289
### Slots
290290

291-
| Name | Description |
292-
| ----------------- | ------------------------------------------------------ |
293-
| `primaryAction` | A focusable and clickable target. Typically a button |
294-
: : such as `<mwc-button>`. Placed on the bottom right of :
295-
: : the dialog (LTR) and above the secondary action when :
296-
: : stacked. Automatically clicked when `Enter` key is :
297-
: : pressed in the dialog. :
298-
| `secondaryAction` | A focusable and clickable target. Typically a button |
299-
: : such as `<mwc-button>`. Placed immediately to the left :
300-
: : of the `primaryAction` (LTR) or below when stacked. :
301-
| _default_ | Content to display in the dialog's content area. |
291+
| Name | Type | Description
292+
| ----------------------- | --------- |------------
293+
| `open` | `boolean` | Whether the dialog should open.
294+
| `hideActions` | `boolean` | Hides the actions footer of the dialog. Needed to remove excess padding when no actions are slotted in.
295+
| `stacked` | `boolean` | Whether to stack the action buttons.
296+
| `heading` | `string` | Heading text of the dialog.
297+
| `scrimClickAction` | `string` | _Default: 'close'_ – Action to be emitted with the `closing` and `closed` events when the dialog closes because the scrim was clicked (see [actions section](#actions)).
298+
| `escapeKeyAction` | `string` | _Default: 'close'_ – Action to be emitted with the `closing` and `closed` events when the dialog closes because the excape key was pressed (see [actions section](#actions)).
299+
| `defaultAction` | `string` | _Default: 'close'_ – Action to be emitted with the `closing` and `closed` events when `<mwc-dialog>.open` is toggled (see [actions section](#actions)).
300+
| `actionAttribute` | `string` | _Default: 'dialogAction'_ – Attribute to read in light dom of dialog for closing action value (see [actions section](#actions)).
301+
| `initialFocusAttribute` | `string` | _Default: 'dialogInitialFocus'_ – Attribute to search for in light dom for initial focus on dialog open.
302302

303303
### Properties/Attributes
304304

305-
| Name | Type | Description |
306-
| ----------------------- | --------- | -------------------------------------- |
307-
| `open` | `boolean` | Whether the dialog should open. |
308-
| `hideActions` | `boolean` | Hides the actions footer of the |
309-
: : : dialog. Needed to remove excess :
310-
: : : padding when no actions are slotted :
311-
: : : in. :
312-
| `stacked` | `boolean` | Whether to stack the action buttons. |
313-
| `heading` | `string` | Heading text of the dialog. |
314-
| `scrimClickAction` | `string` | _Default: 'close'_ – Action to be |
315-
: : : emitted with the `closing` and :
316-
: : : `closed` events when the dialog closes :
317-
: : : because the scrim was clicked (see :
318-
: : : [actions section](#actions)). Setting :
319-
: : : this attribute to an empty string `""` :
320-
: : : will prevent clicks outside the dialog :
321-
: : : from closing the dialog. :
322-
| `escapeKeyAction` | `string` | _Default: 'close'_ – Action to be |
323-
: : : emitted with the `closing` and :
324-
: : : `closed` events when the dialog closes :
325-
: : : because the escape key was pressed :
326-
: : : (see [actions section](#actions)). :
327-
: : : Setting this attribute to an empty :
328-
: : : string `""` will prevent the escape :
329-
: : : key from closing the dialog. :
330-
| `defaultAction` | `string` | _Default: 'close'_ – Action to be |
331-
: : : emitted with the `closing` and :
332-
: : : `closed` events when :
333-
: : : `<mwc-dialog>.open` is toggled (see :
334-
: : : [actions section](#actions)). :
335-
| `actionAttribute` | `string` | _Default: 'dialogAction'_ – Attribute |
336-
: : : to read in light dom of dialog for :
337-
: : : closing action value (see [actions :
338-
: : : section](#actions)). :
339-
| `initialFocusAttribute` | `string` | _Default: 'dialogInitialFocus'_|
340-
: : : Attribute to search for in light dom :
341-
: : : for initial focus on dialog open. :
305+
| Name | Type | Description
306+
| ----------------------- | --------- |------------
307+
| `open` | `boolean` | Whether the dialog should open.
308+
| `hideActions` | `boolean` | Hides the actions footer of the dialog. Needed to remove excess padding when no actions are slotted in.
309+
| `stacked` | `boolean` | Whether to stack the action buttons.
310+
| `heading` | `string` | Heading text of the dialog.
311+
| `scrimClickAction` | `string` | _Default: 'close'_ – Action to be emitted with the `closing` and `closed` events when the dialog closes because the scrim was clicked (see [actions section](#actions)). Setting this attribute to an empty string `""` will prevent clicks outside the dialog from closing the dialog.
312+
| `escapeKeyAction` | `string` | _Default: 'close'_ – Action to be emitted with the `closing` and `closed` events when the dialog closes because the escape key was pressed (see [actions section](#actions)). Setting this attribute to an empty string `""` will prevent the escape key from closing the dialog.
313+
| `defaultAction` | `string` | _Default: 'close'_ – Action to be emitted with the `closing` and `closed` events when `<mwc-dialog>.open` is toggled (see [actions section](#actions)).
314+
| `actionAttribute` | `string` | _Default: 'dialogAction'_ – Attribute to read in light dom of dialog for closing action value (see [actions section](#actions)).
315+
| `initialFocusAttribute` | `string` | _Default: 'dialogInitialFocus'_ – Attribute to search for in light dom for initial focus on dialog open.
342316

343317
### Methods
344318

345-
| Name | Description |
346-
| ----------------------- | ------------------------------------------------- |
347-
| `forceLayout() => void` | Forces dialog to relayout (animation frame time). |
348-
: : May be required if dialog size is incorrect or if :
349-
: : stacked layout has not been triggered correctly. :
350-
| `focus() => void` | Focuses on the initial focus element if defined |
351-
: : (see [focus section](#focus)). :
352-
| `blur() => void` | Blurs the active element. |
353-
| `show() => void` | Opens the dialog. |
354-
| `close() => void` | Closes the dialog. |
319+
| Name | Description
320+
| -------- | -------------
321+
| `forceLayout() => void` | Forces dialog to relayout (animation frame time). May be required if dialog size is incorrect or if stacked layout has not been triggered correctly.
322+
| `focus() => void` | Focuses on the initial focus element if defined (see [focus section](#focus)).
323+
| `blur() => void` | Blurs the active element.
324+
| `show() => void` | Opens the dialog.
325+
| `close() => void` | Closes the dialog.
355326

356327
### Listeners
357-
358-
| Event Name | Target | Description |
359-
| ------------------- | ------------ | ---------------------------------- |
360-
| `click` | root element | Detects if clicked target is a |
361-
: : : dialog action. :
362-
| `resize` | `window` | Performs dialog layout (passive). |
363-
| `orientationchange` | `window` | Performs dialog layout (passive). |
364-
| `keydown` | `mwc-dialog` | Listens for the enter key to click |
365-
: : : the default button (passive). :
366-
| `keydown` | `document` | Listens for the escape key to |
367-
: : : close the dialog (see :
368-
: : : [`escapeKeyAction`](#properties)). :
328+
| Event Name | Target | Description
329+
| ------------------- | ------------ | -----------
330+
| `click` | root element | Detects if clicked target is a dialog action.
331+
| `resize` | `window ` | Performs dialog layout (passive).
332+
| `orientationchange` | `window` | Performs dialog layout (passive).
333+
| `keydown` | `mwc-dialog` | Listens for the enter key to click the default button (passive).
334+
| `keydown` | `document` | Listens for the escape key to close the dialog (see [`escapeKeyAction`](#properties)).
369335

370336
### Events
371337

372-
| Event Name | Target | Detail | Description |
373-
| ---------- | ------------ | ------------------ | -------------------- |
374-
| `opening` | `mwc-dialog` | `{}` | Fired when the |
375-
: : : : dialog is beginning :
376-
: : : : to open. :
377-
| `opened` | `mwc-dialog` | `{}` | Fired once the |
378-
: : : : dialog is finished :
379-
: : : : opening (after :
380-
: : : : animation). :
381-
| `closing` | `mwc-dialog` | `{action: string}` | Fired when the |
382-
: : : : dialog is is :
383-
: : : : beginning to close. :
384-
: : : : Detail is the action :
385-
: : : : that closed the :
386-
: : : : dialog (see [actions :
387-
: : : : section](#actions)). :
388-
| `closed` | `mwc-dialog` | `{action: string}` | Fired once the |
389-
: : : : dialog is finished :
390-
: : : : closing (after :
391-
: : : : animation). Detail :
392-
: : : : is the action that :
393-
: : : : closed the dialog :
394-
: : : : (see [actions :
395-
: : : : section](#actions)). :
338+
| Event Name | Target | Detail | Description
339+
| ---------- | ------------ | ------------------ | -----------
340+
| `opening` | `mwc-dialog` | `{}` | Fired when the dialog is beginning to open.
341+
| `opened` | `mwc-dialog` | `{}` | Fired once the dialog is finished opening (after animation).
342+
| `closing` | `mwc-dialog` | `{action: string}` | Fired when the dialog is is beginning to close. Detail is the action that closed the dialog (see [actions section](#actions)).
343+
| `closed` | `mwc-dialog` | `{action: string}` | Fired once the dialog is finished closing (after animation). Detail is the action that closed the dialog (see [actions section](#actions)).
396344

397345
### CSS Custom Properties
398346

@@ -410,26 +358,22 @@ Name | Default
410358

411359
#### Elevation values
412360

413-
| Elevation Level | CSS Value | -- | - `24` | `0px 11px 15px -7px rgba(0, 0, 0,
414-
0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0,
415-
0.12)`
361+
| Elevation Level | CSS Value
362+
| --------------- | ---------
363+
`24` | `0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12)`
416364

417365
#### Global Custom Properties
418366

419367
This component exposes the following global
420368
[theming](https://github.com/material-components/material-components-web-components/blob/master/docs/theming.md)
421369
custom properties.
422370

423-
| Name | Description |
424-
| --------------------------------------- | ----------------------------- |
425-
| `--mdc-theme-surface` | Color of the dialog surface's |
426-
: : background. :
427-
| `--mdc-shape-medium` | Corner radius of the dialog |
428-
: : surface. :
429-
| `--mdc-typography-body1-<PROPERTY>` | Styles the typography of the |
430-
: : dialog's text. :
431-
| `--mdc-typography-headline6-<PROPERTY>` | Styles the typography of the |
432-
: : action buttons. :
371+
| Name | Description
372+
| ---------------------------------------- | -----------
373+
| `--mdc-theme-surface` | Color of the dialog surface's background.
374+
| `--mdc-shape-medium` | Corner radius of the dialog surface.
375+
| `--mdc-typography-body1-<PROPERTY>` | Styles the typography of the dialog's text.
376+
| `--mdc-typography-headline6-<PROPERTY>` | Styles the typography of the action buttons.
433377

434378
### Actions
435379

packages/icon-button-toggle/README.md

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -140,42 +140,33 @@ For technical details about the Material Icons font, see the
140140
## API
141141

142142
### Slots
143-
| Name | Description
144-
| ---- | -----------
145-
| `onIcon` | Optional `<img>` or `<svg>` to display instead of using an icon font for the `onIcon` property.
143+
144+
| Name | Description
145+
| --------- | -----------
146+
| `onIcon` | Optional `<img>` or `<svg>` to display instead of using an icon font for the `onIcon` property.
146147
| `offIcon` | Optional `<img>` or `<svg>` to display instead of using an icon font for the `offIcon` property.
147148

148-
### Properties/attributes
149-
150-
| Name | Type | Default | Description |
151-
| -------------- | --------- | ----------- | -------------------------------- |
152-
| `aria-label` | `string` | `''` | Accessible label for the button. |
153-
| `on` | `boolean` | `false` | Whether the toggle is activated. |
154-
| `onIcon` | `string` | `''` | Icon to display when `on` is |
155-
: : : : `true`. :
156-
| `offIcon` | `string` | `''` | Icon to display when `on` is |
157-
: : : : `false`. :
158-
| `disabled` | `boolean` | `false` | Disabled buttons cannot be |
159-
: : : : interacted with and have no :
160-
: : : : visual interaction effect. :
161-
| `ariaLabelOn` | `string` | `undefined` | `aria-label` of the button when |
162-
: : : : `on` is true. If set, :
163-
: : : : `ariaLabelOff` must also be set. :
164-
| `ariaLabelOff` | `string` | `undefined` | `aria-label` of the button when |
165-
: : : : `on` is false. If set, :
166-
: : : : `ariaLabelOn` must also be set. :
149+
### Properties / Attributes
150+
151+
| Name | Type | Default | Description
152+
| -------------- | --------- | ----------- | -----------
153+
| `aria-label` | `string` | `''` | Accessible label for the button.
154+
| `on` | `boolean` | `false` | Whether the toggle is activated.
155+
| `onIcon` | `string` | `''` | Icon to display when `on` is `true`.
156+
| `offIcon` | `string` | `''` | Icon to display when `on` is `false`.
157+
| `disabled` | `boolean` | `false` | Disabled buttons cannot be interacted with and have no visual interaction effect.
158+
| `ariaLabelOn` | `string` | `undefined` | `aria-label` of the button when `on` is true. If set, `ariaLabelOff` must also be set.
159+
| `ariaLabelOff` | `string` | `undefined` | `aria-label` of the button when `on` is false. If set, `ariaLabelOn` must also be set.
167160

168161
### Methods
162+
169163
*None*
170164

171165
### Events
172166

173-
| Name | Detail | Description |
174-
| --------------------------- | ----------------- | ------------------------ |
175-
| `icon-button-toggle-change` | `{isOn: boolean}` | Indicates the button has |
176-
: : : been toggled. `isOn` :
177-
: : : indicates the `on` value :
178-
: : : of the toggle button. :
167+
| Name | Detail | Description
168+
| --------------------------- | ----------------- | -----------
169+
| `icon-button-toggle-change` | `{isOn: boolean}` | Indicates the button has been toggled. `isOn` indicates the `on` value of the toggle button.
179170

180171
### CSS custom properties
181172

0 commit comments

Comments
 (0)