"use client"; import {mergeProps} from "@base-ui/react/merge-props"; import {Meter as BaseMeter} from "@base-ui/react/meter"; import {useRender} from "@base-ui/react/use-render"; import * as React from "react"; import {cn} from "@/lib/utilities"; import styles from "./meter.module.css"; /** * Displays a scalar measurement within a known range. * * @remarks * - Renders a `
` element by default * - Built on Base UI Meter primitives * - Intended for values such as storage usage, health, or completion * * @example * ```tsx * * * * * * ``` * * @see {@link https://base-ui.com/react/components/meter | Base UI Meter Docs} */ const Meter = React.forwardRef((props, forwardedRef) => { const {className, children, render, ...otherProps} = props; return ( {children} ); }); /** * Renders the background track for a meter. * * @remarks * - Renders a `
` element by default * - Built on Base UI Meter track primitives * * @example * ```tsx * * ``` * * @see {@link https://base-ui.com/react/components/meter | Base UI Meter Docs} */ const MeterTrack = React.forwardRef((props, forwardedRef) => { const {className, children, render, ...otherProps} = props; return ( {children} ); }); /** * Renders the filled indicator that reflects the current meter value. * * @remarks * - Renders a `
` element by default * - Built on Base UI Meter indicator primitives * * @example * ```tsx * * ``` * * @see {@link https://base-ui.com/react/components/meter | Base UI Meter Docs} */ const MeterIndicator = React.forwardRef((props, forwardedRef) => { const {className, children, render, ...otherProps} = props; return ( {children} ); }); /** * Renders the accessible label associated with a meter. * * @remarks * - Renders a `` element by default * - Built on Base UI Meter label primitives * * @example * ```tsx * Storage used * ``` * * @see {@link https://base-ui.com/react/components/meter | Base UI Meter Docs} */ const MeterLabel = React.forwardRef((props, forwardedRef) => { const {className, children, render, ...otherProps} = props; return ( {children} ); }); // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API namespace Meter { export type Props = React.ComponentPropsWithRef; export type State = BaseMeter.Root.State; } // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API namespace MeterTrack { export type Props = React.ComponentPropsWithRef; export type State = BaseMeter.Track.State; } // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API namespace MeterIndicator { export type Props = React.ComponentPropsWithRef; export type State = BaseMeter.Indicator.State; } // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API namespace MeterLabel { export type Props = React.ComponentPropsWithRef; export type State = BaseMeter.Label.State; } Meter.displayName = "Meter"; MeterTrack.displayName = "MeterTrack"; MeterIndicator.displayName = "MeterIndicator"; MeterLabel.displayName = "MeterLabel"; export {Meter, MeterIndicator, MeterLabel, MeterTrack};