"use client"; /* * Documentation: * Number Input — https://app.subframe.com/f023064a5ca0/library?component=Number+Input_06ebc0c5-994e-4eac-b855-f3c6d7f1bbbf */ import React from "react"; import { FeatherChevronDown } from "@subframe/core"; import { FeatherChevronUp } from "@subframe/core"; import * as SubframeUtils from "../../utils"; export interface StepperProps extends React.HTMLAttributes { down?: boolean; disabled?: boolean; className?: string; } const Stepper = React.forwardRef(function Stepper( { down = false, disabled = false, className, ...otherProps }: StepperProps, ref ) { return (
{down ? ( ) : ( )}
); }); export interface InputProps extends Omit, "placeholder"> { placeholder?: React.ReactNode; className?: string; } const Input = React.forwardRef(function Input( { placeholder, className, ...otherProps }: InputProps, ref ) { return ( ); }); export interface NumberInputRootProps extends React.HTMLAttributes { disabled?: boolean; error?: boolean; variant?: "outline" | "filled"; borderless?: boolean; noPadding?: boolean; size?: "small" | "medium" | "large"; fillContainer?: boolean; showLabel?: boolean; label?: React.ReactNode; description?: React.ReactNode; message?: React.ReactNode; children?: React.ReactNode; className?: string; } const NumberInputRoot = React.forwardRef( function NumberInputRoot( { disabled = false, error = false, variant = "outline", borderless = false, noPadding = false, size = "medium", fillContainer = false, showLabel = false, label, description, message, children, className, ...otherProps }: NumberInputRootProps, ref ) { return (
{label ? ( {label} ) : null} {description ? ( {description} ) : null}
{children ? (
{children}
) : null}
{message ? ( {message} ) : null}
); } ); export const NumberInput = Object.assign(NumberInputRoot, { Stepper, Input, });