Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore(docs): updated tsdoc to work with typedoc
  • Loading branch information
mlaursen committed May 11, 2021
1 parent c5a8108 commit cf54c35
Show file tree
Hide file tree
Showing 40 changed files with 125 additions and 34 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.js
Expand Up @@ -27,5 +27,12 @@ module.exports = {
'@typescript-eslint/no-unsafe-member-access': 0,
},
},
{
files: ['packages/*/src/index.ts'],
rules: {
// I don't know how to get @module to work but it's supported by typedoc
'tsdoc/syntax': 0,
},
},
],
};
3 changes: 3 additions & 0 deletions packages/alert/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/alert
*/
export * from "./Snackbar";
export * from "./Toast";
export * from "./MessageQueue";
Expand Down
3 changes: 3 additions & 0 deletions packages/app-bar/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/app-bar
*/
export * from "./AppBar";
export * from "./AppBarTitle";
export * from "./AppBarNav";
Expand Down
3 changes: 3 additions & 0 deletions packages/autocomplete/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/autocomplete
*/
export * from "./AutoComplete";
export * from "./HighlightedResult";
export * from "./useAutoComplete";
Expand Down
3 changes: 3 additions & 0 deletions packages/avatar/src/index.ts
@@ -1 +1,4 @@
/**
* @module @react-md/avatar
*/
export * from "./Avatar";
3 changes: 3 additions & 0 deletions packages/badge/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/badge
*/
export * from "./Badge";
export * from "./BadgeContainer";
export * from "./BadgedButton";
3 changes: 3 additions & 0 deletions packages/button/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/button
*/
export * from "./buttonThemeClassNames";
export * from "./Button";
export * from "./UnstyledButton";
Expand Down
3 changes: 3 additions & 0 deletions packages/card/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/card
*/
export * from "./Card";
export * from "./CardHeader";
export * from "./CardTitle";
Expand Down
3 changes: 3 additions & 0 deletions packages/chip/src/index.ts
@@ -1 +1,4 @@
/**
* @module @react-md/chip
*/
export * from "./Chip";
3 changes: 3 additions & 0 deletions packages/dialog/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/dialog
*/
export * from "./Dialog";
export * from "./DialogHeader";
export * from "./DialogTitle";
Expand Down
3 changes: 3 additions & 0 deletions packages/divider/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/divider
*/
export * from "./Divider";

export * from "./VerticalDivider";
3 changes: 3 additions & 0 deletions packages/expansion-panel/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/expansion-panel
*/
export * from "./ExpansionPanel";
export * from "./ExpansionList";
export * from "./ExpansionPanelHeader";
Expand Down
3 changes: 3 additions & 0 deletions packages/form/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/form
*/
export * from "./Form";
export * from "./Fieldset";
export * from "./FormThemeProvider";
Expand Down
18 changes: 8 additions & 10 deletions packages/form/src/menu/MenuItemInputToggle.tsx
Expand Up @@ -63,10 +63,8 @@ export interface BaseMenuItemInputToggleProps

/**
* The icon will default to:
* - {@link @react-md/icon#ConfigurableIcons.radio} when the `type` is set to
* `"radio"`
* - {@link @react-md/icon#ConfigurableIcons.checkbox} when the `type` is set
* to `"checkbox"`
* - {@link ConfigurableIcons.radio} when the `type` is set to `"radio"`
* - {@link ConfigurableIcons.checkbox} when the `type` is set to `"checkbox"`
* - {@link SwitchTrack} when the `type` is set to `"switch"`
*
* If this behavior isn't preferred, you can provide your own icon with this
Expand All @@ -81,20 +79,20 @@ export interface BaseMenuItemInputToggleProps
iconAfter?: boolean;

/**
* An optional {@link @react-md/list#ListItem} addon to display on the
* opposite side of the `icon`. So if the `iconAfter` prop is `false`, the
* `addon` will appear to the `right` while setting `iconAfter` to `true` will
* render the `addon` to the `left` instead.
* An optional {@link ListItem} addon to display on the opposite side of the
* `icon`. So if the `iconAfter` prop is `false`, the `addon` will appear to
* the `right` while setting `iconAfter` to `true` will render the `addon` to
* the `left` instead.
*/
addon?: ReactNode;

/**
* The {@link @react-md/list#ListItemAddonType} for the `addon`.
* The {@link ListItemAddonType} for the `addon`.
*/
addonType?: ListItemAddonType;

/**
* The {@link @react-md/list#ListItemAddonPosition} for the `addon`.
* The {@link ListItemAddonPosition} for the `addon`.
*/
addonPosition?: ListItemAddonPosition;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/form/src/slider/Slider.tsx
Expand Up @@ -20,7 +20,7 @@ export interface SliderProps extends SliderRequiredProps, BaseSliderProps {
* An optional label to apply to the slider's thumb. This should normally be a
* short (1-4 word) description for this slider.
*
* @see {@link SliderLabelProps#label}
* @see {@link SliderLabelProps.label}
* @see {@link thumbLabelledBy}
*/
thumbLabel?: string;
Expand All @@ -29,7 +29,7 @@ export interface SliderProps extends SliderRequiredProps, BaseSliderProps {
* An optional id point to a label describing the slider's thumb. This should
* normally be a short (1-4 word) description for this slider.
*
* @see {@link SliderLabelProps#label}
* @see {@link SliderLabelProps.label}
* @see {@link thumbLabel}
*/
thumbLabelledBy?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/text-field/useNumberField.ts
Expand Up @@ -111,7 +111,7 @@ export interface NumberFieldHookControls {
/**
* An ordered list containing:
* - the current `number` value of the field which will be updated based on the
* {@link NumberFieldHookOptions#updateOnChange} option
* {@link NumberFieldHookOptions.updateOnChange} option
*
* @remarks \@since 2.5.0
*/
Expand Down
3 changes: 3 additions & 0 deletions packages/icon/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/icon
*/
export * from "./FontIcon";
export * from "./SVGIcon";
export * from "./TextIconSpacing";
Expand Down
12 changes: 6 additions & 6 deletions packages/layout/src/Configuration.tsx
Expand Up @@ -37,24 +37,24 @@ export interface ConfigurationProps extends AppSizeOptions, StatesConfigProps {
/**
* Boolean if the default tooltip hover mode should be disabled.
*
* @deprecated \@since 2.8.0 Use the {@link ConfigurationProps#hoverMode}
* configuration object instead.
* @deprecated \@since 2.8.0 Use the {@link hoverMode} configuration object
* instead.
*/
disableTooltipHoverMode?: boolean;

/**
* The default delay before the tooltip hover mode is enabled.
*
* @deprecated \@since 2.8.0 Use the {@link ConfigurationProps#hoverMode}
* configuration object instead.
* @deprecated \@since 2.8.0 Use the {@link hoverMode} configuration object
* instead.
*/
tooltipDefaultDelay?: number;

/**
* The delay before the tooltip should become visible.
*
* @deprecated \@since 2.8.0 Use the {@link ConfigurationProps#hoverMode}
* configuration object instead.
* @deprecated \@since 2.8.0 Use the {@link hoverMode} configuration object
* instead.
*/
tooltipDelayTimeout?: number;

Expand Down
3 changes: 3 additions & 0 deletions packages/layout/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/layout
*/
export * from "./Configuration";
export * from "./constants";
export * from "./defaultMiniNavigationItemRenderer";
Expand Down
3 changes: 3 additions & 0 deletions packages/link/src/index.ts
@@ -1,2 +1,5 @@
/**
* @module @react-md/link
*/
export * from "./Link";
export * from "./SkipToMainContent";
3 changes: 3 additions & 0 deletions packages/list/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/list
*/
export * from "./List";
export * from "./SimpleListItem";
export * from "./ListItem";
Expand Down
3 changes: 3 additions & 0 deletions packages/media/src/index.ts
@@ -1,2 +1,5 @@
/**
* @module @react-md/media
*/
export * from "./MediaContainer";
export * from "./MediaOverlay";
3 changes: 3 additions & 0 deletions packages/menu/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/menu
*/
export * from "./MenuButton";
export * from "./Menu";
export * from "./MenuItem";
Expand Down
3 changes: 3 additions & 0 deletions packages/overlay/src/index.ts
@@ -1,2 +1,5 @@
/**
* @module @react-md/overlay
*/
export * from "./Overlay";
export * from "./constants";
4 changes: 2 additions & 2 deletions packages/portal/src/ConditionalPortal.tsx
Expand Up @@ -14,12 +14,12 @@ export interface RenderConditionalPortalProps {
portal?: boolean;

/**
* @see {@link Portal#into}
* @see {@link PortalProps.into}
*/
portalInto?: PortalInto;

/**
* @see {@link Portal#intoId}
* @see {@link PortalProps.intoId}
*/
portalIntoId?: string;
}
Expand Down
3 changes: 3 additions & 0 deletions packages/portal/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/portal
*/
export { PortalInto } from "./getContainer";

export * from "./Portal";
Expand Down
3 changes: 3 additions & 0 deletions packages/progress/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/progress
*/
export * from "./LinearProgress";
export * from "./CircularProgress";
export * from "./getProgressA11y";
3 changes: 3 additions & 0 deletions packages/sheet/src/index.ts
@@ -1,2 +1,5 @@
/**
* @module @react-md/sheet
*/
export * from "./Sheet";
export * from "./constants";
3 changes: 3 additions & 0 deletions packages/states/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/states
*/
export * from "./useInteractionStates";
export * from "./StatesConfig";
export * from "./ripples/constants";
3 changes: 3 additions & 0 deletions packages/table/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/table
*/
export * from "./TableContainer";
export * from "./Table";
export * from "./TableHeader";
Expand Down
3 changes: 3 additions & 0 deletions packages/tabs/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/tabs
*/
export * from "./TabsList";
export * from "./Tabs";
export * from "./Tab";
Expand Down
3 changes: 1 addition & 2 deletions packages/tooltip/src/TooltipHoverModeConfig.tsx
Expand Up @@ -16,8 +16,7 @@ interface TooltipHoverModeConfigProps {
* functionality in that once a tooltip has become visible by hover, all other
* tooltips will become visible immediately until 3 seconds have passed.
*
* @deprecated \@since 2.8.0 Use the {@link @react-md/utils#HoverModeProvider}
* instead.
* @deprecated \@since 2.8.0 Use the {@link HoverModeProvider} instead.
*/
export function TooltipHoverModeConfig({
defaultDelay = DEFAULT_TOOLTIP_DELAY,
Expand Down
3 changes: 3 additions & 0 deletions packages/tooltip/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/tooltip
*/
export * from "./Tooltip";
export * from "./Tooltipped";
export * from "./TooltipHoverModeConfig";
Expand Down
11 changes: 5 additions & 6 deletions packages/tooltip/src/useTooltip.ts
Expand Up @@ -83,18 +83,17 @@ export type TooltipKeyboardEventHandlers<E extends HTMLElement> = Pick<
*
* @remarks \@since 2.8.0
*/
export type TooltippedElementEventHandlers<
E extends HTMLElement
> = HoverModeEventHandlers<E> &
TooltipTouchEventHandlers<E> &
TooltipKeyboardEventHandlers<E>;
export type TooltippedElementEventHandlers<E extends HTMLElement> =
HoverModeEventHandlers<E> &
TooltipTouchEventHandlers<E> &
TooltipKeyboardEventHandlers<E>;

/** @remarks \@since 2.8.0 */
export interface TooltipHookProvidedElementProps<E extends HTMLElement>
extends Required<TooltippedElementEventHandlers<E>> {
/**
* The DOM `id` required for a11y that is based off of the
* {@link AllTooltipHookOptions.baseId}.
* {@link TooltipHookOptions.baseId}.
*/
id: string;

Expand Down
3 changes: 3 additions & 0 deletions packages/transition/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/transition
*/
export * from "./Collapse";
export * from "./CrossFade";
export * from "./ScaleTransition";
Expand Down
3 changes: 3 additions & 0 deletions packages/tree/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/tree
*/
export * from "./useTreeItemExpansion";
export * from "./useTreeItemSelection";
export * from "./types";
Expand Down
3 changes: 3 additions & 0 deletions packages/typography/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/typography
*/
export * from "./Text";
export * from "./TextContainer";
export * from "./SrOnly";
6 changes: 2 additions & 4 deletions packages/utils/src/hover/useHoverMode.ts
Expand Up @@ -200,10 +200,8 @@ export interface HoverModeReturnValue<E extends HTMLElement>
*
* @remarks \@since 2.8.0
* @param options - An optional object of options to use. See
* {@link HoverModeOnlyOptions} and {@link StickyHoverModeOptions} for more
* details.
* @returns either the {@link HoverModeReturnValue} or
* {@link StickyHoverModeReturnValue}
* {@link HoverModeOnlyOptions} and {@link HoverModeOptions} for more details.
* @returns either the {@link HoverModeReturnValue} or {@link HoverModeReturnValue}
*/
export function useHoverMode<E extends HTMLElement>(
options?: HoverModeOnlyOptions<E>
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/hover/useHoverModeContext.ts
Expand Up @@ -17,7 +17,7 @@ export interface HoverModeActions {
/**
* A function that will enable the hover mode for all connected components.
* This should normally be called after hovering over an element for the
* {@link HoverModeContext#visibleInTime}.
* {@link HoverModeContext.visibleInTime}.
*/
enableHoverMode(): void;

Expand Down
3 changes: 3 additions & 0 deletions packages/utils/src/index.ts
@@ -1,3 +1,6 @@
/**
* @module @react-md/utils
*/
export * from "./applyRef";
export * from "./bem";
export * from "./colors";
Expand Down

0 comments on commit cf54c35

Please sign in to comment.