Skip to content

Commit

Permalink
chore(core): removed the Server Component flags
Browse files Browse the repository at this point in the history
They aren't really server components, they just don't require client
side JS
  • Loading branch information
mlaursen committed Jul 21, 2024
1 parent ae183b3 commit 0850a7b
Show file tree
Hide file tree
Showing 73 changed files with 84 additions and 194 deletions.
2 changes: 0 additions & 2 deletions packages/core/src/RootHtml.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ export interface RootHtmlProps extends HtmlHTMLAttributes<HTMLHtmlElement> {
}

/**
* **Server Component**
*
* This is mostly for creating the root html for next.js applications that
* defaults to setting the `dir="ltr"` and `lang="en"`. Additional props can be
* passed to the root `<html>` and `<body>` elements and children can be
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/app-bar/AppBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ export interface AppBarProps
}

/**
* **Server Component**
*
* @example Simple Example
* ```tsx
* import { AppBar, AppBarTitle, Button } from "@react-md/core";
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/app-bar/AppBarTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ export interface AppBarTitleProps
}

/**
* **Server Component**
*
* @example Updating the Keyline
* ```tsx
* import { AppBar, AppBarTitle } from "@react-md/core";
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/avatar/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ export interface AvatarProps
}

/**
* **Server Component**
*
* An `Avatar` is generally used to represent objects or people within your app.
* The avatar can consist of an image, an icon, or some text to display. When
* the avatar is not an image, different themes can be applied to make the
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/badge/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
}

/**
* **Server Component**
*
* @example Simple Example
* ```tsx
* import type { ReactElement } from "react";
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/box/Box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { box, type BoxOptions } from "./styles.js";
export interface BoxProps extends HTMLAttributes<HTMLDivElement>, BoxOptions {}

/**
* **Server Component**
*
* The `Box` component is a wrapper around the CSS box model and should solve
* most of your `flex` and `grid` layout requirements for responsive design.
* There are pass-through props for all of the box module styling properties
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/button/ButtonUnstyled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ export type ButtonUnstyledProps = Omit<
>;

/**
* **Server Component**
*
* A simple wrapper for a `<button type="button">` that applies the unstyled
* utility class.
*
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ export interface CardProps
CardClassNameOptions {}

/**
* **Server Component**
*
* @example Simple Example
* ```tsx
* import {
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/card/CardContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ export interface CardContentProps
CardContentClassNameOptions {}

/**
* **Server Component**
*
* @since 6.0.0 Renamed `disableExtraPadding` to `disableLastChildPadding` and
* removed the `disableParagraphMargin` prop.
*/
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/card/CardFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ export interface CardFooterProps extends BoxProps {
}

/**
* **Server Component**
*
* A simple wrapper around the {@link Box} component that applies additional
* padding and applies `justify-content: flex-end;` by default.
*
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/card/CardHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ export interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {
}

/**
* **Server Component**
*
* @since 6.0.0 Removed the `align` prop.
* @since 6.0.0 Renamed the `beforeChildren` and `afterChildren` props to
* `beforeAddon` and `afterAddon`.
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/card/CardSubtitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ export interface CardSubtitleProps extends TypographyProps {
}

/**
* **Server Component**
*
* @since 6.0.0 Extends the {@link Typography} component and removed the
* `noWrap`/`disableSecondaryColor` props.
*/
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/card/CardTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ export interface CardTitleProps extends TypographyProps {
}

/**
* **Server Component**
*
* @since 6.0.0 Extends the {@link Typography} component and removed
* the `small`/`noWrap` props.
*/
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/chip/Chip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ export interface ChipProps extends ButtonHTMLAttributes<HTMLButtonElement> {
}

/**
* **Server Component**
*
* @example Simple Example
* ```tsx
* import { Chip } from "@react-md/core";
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/dialog/DialogContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ export interface DialogContainerProps extends HTMLAttributes<HTMLDivElement> {
}

/**
* **Server Component**
*
* @since 6.0.0
* @internal
*/
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/dialog/DialogContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ export interface DialogContentProps
DialogContentClassNameOptions {}

/**
* **Server Component**
*
* Look at the `Dialog` or `FixedDialog` components for example usage.
* The `DialogContent` component should be used as a child of the `Dialog`
* component that applies some reasonable default styles. Look at the `Dialog`
* or `FixedDialog` components for example usage.
*/
export const DialogContent = forwardRef<HTMLDivElement, DialogContentProps>(
function DialogContent(
Expand Down
5 changes: 2 additions & 3 deletions packages/core/src/dialog/DialogFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ export interface DialogFooterProps
DialogFooterClassNameOptions {}

/**
* **Server Component**
*
* Look at the `Dialog` or `FixedDialog` components for example usage.
* The `DialogFooter` is a simple `<footer>` with simple `display: flex` styles
* applied. Look at the `Dialog` or `FixedDialog` components for example usage.
*/
export const DialogFooter = forwardRef<HTMLDivElement, DialogFooterProps>(
function DialogFooter({ children, className, align = "end", ...props }, ref) {
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/dialog/DialogHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { dialogHeader } from "./styles.js";
export type DialogHeaderProps = HTMLAttributes<HTMLDivElement>;

/**
* **Server Component**
*
* Look at the `Dialog` or `FixedDialog` components for example usage.
* The `DialogHeader` component should be rendered within a `Dialog` component
* and generally contains the `DialogTitle`. Look at the `Dialog` or
* `FixedDialog` components for example usage.
*/
export const DialogHeader = forwardRef<HTMLDivElement, DialogHeaderProps>(
function DialogHeader(props, ref) {
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/dialog/DialogTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export interface DialogTitleProps extends TypographyProps {
}

/**
* **Server Component**
*
* Look at the `Dialog` or `FixedDialog` components for example usage.
* The `DialogTitle` component is a simple `Typography` component wrapper with
* sensible defaults to be rendered within a `Dialog`. Look at the `Dialog` or
* `FixedDialog` components for example usage.
*/
export const DialogTitle = forwardRef<HTMLHeadingElement, DialogTitleProps>(
function DialogTitle(
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/divider/Divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ export interface DividerProps
DividerClassNameOptions {}

/**
* **Server Component**
*
* @example Simple Example
* ```tsx
* import { Divider } from "@react-md/core";
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/expansion-panel/ExpansionPanelHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export interface ExpansionPanelHeaderProps
}

/**
* **Server Component**
* This is mostly an internal component, but can also be used to implement a
* custom header implementation if needed. This might really be a client
* component in practice since the `onClick` prop must be provided.
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/form/Fieldset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ export function fieldset(options: FieldsetClassNameOptions = {}): string {
}

/**
* **Server Component**
*
* @since 6.0.0 Removed the `legend`, `legendStyle`,
* `legendClassName`, and `legendSROnly` props. You must provide a `Legend`
* yourself manually instead of using a prop.
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/form/FormMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import {
} from "./types.js";

/**
* **Server Component**
*
* The `FormMessage` component is used to create additional helper messages or
* error messages and generally placed below the related `TextField`. If a
* `length` (of the `value`) and `maxLength` are provided, a counter will also
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/form/FormMessageContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export interface FormMessageContainerProps
}

/**
* **Server Component**
* Conditionally wraps the `children` in a `.rmd-form-message-container` wrapper
* and renders the {@link FormMessage} component.
*
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/form/FormMessageCounter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export interface FormMessageCounterProps
}

/**
* **Server Component**
*
* This component can be used to create a "counter" within the
* {@link FormMessage} component.
*
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/form/InputToggleIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ export interface InputToggleIconProps extends HTMLAttributes<HTMLSpanElement> {
}

/**
* **Server Component**
*
* @since 2.8.0
* @since 6.0.0 Updated to use different icons for each checked state instead
* of a css overlay hack.
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/form/Label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ export function label(options: LabelClassNameOptions): string {
}

/**
* **Server Component**
*
* Most of the form components already use this `Label` internally when a
* `label` prop has been provided. You should generally use this component if
* you need to separate the label from an existing form component or you need to
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/form/Legend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ export interface LegendProps extends TypographyProps {
}

/**
* **Server Component**
*
* This should be used within a `Fieldset` to apply a label.
*
* @since 6.0.0
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/form/NativeSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ export interface NativeSelectProps
}

/**
* **Server Component**
*
* This component is a wrapper for the native `<select>` field that applies the
* same theming as `TextField` and `TextArea` components. This component might
* not be used much since the `Select` offers more styling options.
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/form/SelectedOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export interface SelectedOptionProps extends BoxProps {
}

/**
* **Server Component**
*
* This component is used to render the current option.
*
* @since 6.0.0
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/form/SliderContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ export interface SliderContainerProps
}

/**
* **Server Component**
*
* The `SliderContainer` component is mostly an internal component that is
* built-in to the `Slider` and `RangeSlider` components to add addons to the
* left or right of the `SliderTrack`. When vertical, it will add addons to the
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/form/SliderMark.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ export interface SliderMarkProps extends HTMLAttributes<HTMLSpanElement> {
}

/**
* **Server Component**
*
* @internal
* @since 6.0.0
*/
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/form/SliderMarkLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ export interface SliderMarkLabelProps extends CustomizableSliderMarkLabelProps {
}

/**
* **Server Component**
*
* @internal
* @since 6.0.0
*/
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/form/SliderTrack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ export interface SliderTrackProps
}

/**
* **Server Component**
*
* @internal
* @since 2.5.0
* @since 6.0.0 Updated to be internal only.
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/form/SliderValueMarks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ export interface SliderValueMarksProps
}

/**
* **Server Component**
*
* @internal
* @since 6.0.0
*/
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/form/Switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ export interface SwitchProps
}

/**
* **Server Component**
*
* @example Simple Example
* ```tsx
* import { Form, Switch } from "@react-md/core";
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/form/SwitchTrack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export interface SwitchTrackProps extends HTMLAttributes<HTMLDivElement> {
}

/**
* **Server Component**
* Used to create the switch track styles
* @internal
*/
export const SwitchTrack = forwardRef<HTMLDivElement, SwitchTrackProps>(
function SwitchTrack(props, ref) {
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/form/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ export interface TextFieldProps
}

/**
* **Server Component**
*
* The structure for this component is:
* @example Component Structure
* ```tsx
Expand Down
4 changes: 1 addition & 3 deletions packages/core/src/form/TextFieldAddon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ export interface TextFieldAddonProps extends ConfigurableTextFieldAddonProps {
}

/**
* **Server Component**
*
* This component is used to add an an icon before or after the text field with
* This component is used to add an icon before or after the text field with
* correct styling.
*/
export const TextFieldAddon = forwardRef<HTMLSpanElement, TextFieldAddonProps>(
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/icon/FontIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ export interface FontIconProps
}

/**
* **Server Component**
*
* The `FontIcon` component is used for rendering a font-icon library's icon.
* The default is to use the `material-icons` library, but others can be used as
* well.
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/icon/IconRotator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ export interface IconRotatorProps extends IconRotatorBaseProps {
}

/**
* **Server Component**
*
* The `IconRotator` is a simple component that is used to rotate an icon from a
* one degrees to another.
*/
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/icon/MaterialIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ export interface MaterialIconProps
}

/**
* **Server Component**
*
* The `MaterialIcon` component is used for rendering a material icon using the
* Google Fonts stylesheet (handled separately). This is mostly a convenience
* wrapper around the `FontIcon` that will catch typos for the supported icon
Expand Down
Loading

0 comments on commit 0850a7b

Please sign in to comment.