npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

avalon-material-ui

v1.0.3

Published

avalon react component with google meterial ui

Readme

avalon-material-ui

安装方法

npm install avalon-material-ui

Button 按钮

  • api:将原生的href属性改成了可选,其他参数和material-ui一样

ButtonGroup 按钮组

  • api:将原生的component属性改成了可选,其他参数和material-ui一样

Checkbox 复选框

  • api:将原生的checked属性名称改为了value,所有控件统一使用value和onChange,其他参数和material-ui一样

DatePicker 日期选择器

  • api:
interface Props {
    className?: string      //根组件样式的className
    style?: CSSProperties   //根组件样式的style

    type: datepickerType    //日期类型,支持日/秒/月,'day' | 'second' | 'month'
    value: valueType        //控件值,{ start: Date; end?: Date }
    onChange: onChangeType  //值改变时触发的事件,(v: valueType) => void

    disabled?: boolean      //是否禁用,默认false
    prefix?: ReactNode      //前置文字
    isRange?: boolean       //是否为范围时间,包含开始和结束,默认false
}

Dialog 对话框

  • api:
interface Props {
    className?: string                                              //根组件样式的className
    style?: CSSProperties                                           //根组件样式的style

    onClose: ModalProps['onClose']                                  //关闭时触发的事件
    open: ModalProps['open']                                        //打开状态
    title: ReactNode                                                //顶部的标题

    content?: ReactNode                                             //中间的内容
    actions?: ReactNode                                             //底部的按钮组

    classes?: classes                                               //以下全为material-ui的Dialog参数
    disableBackdropClick?: ModalProps['disableBackdropClick']       
    disableEscapeKeyDown?: ModalProps['disableEscapeKeyDown']
    fullScreen?: DialogProps['fullScreen']
    fullWidth?: DialogProps['fullWidth']
    maxWidth?: DialogProps['maxWidth']
    onBackdropClick?: ModalProps['onBackdropClick']
    onEnter?: TransitionHandlerProps['onEnter']
    onEntered?: TransitionHandlerProps['onEntered']
    onEntering?: TransitionHandlerProps['onEntering']
    onEscapeKeyDown?: ModalProps['onEscapeKeyDown']
    onExit?: TransitionHandlerProps['onExit']
    onExited?: TransitionHandlerProps['onExited']
    onExiting?: TransitionHandlerProps['onExiting']                 //以上全为material-ui的Dialog参数

    [propName: string]: any

    onClick?(v: any): void                                          //点击时触发的事件
}

MiniDrawer 小抽屉

  • api:

interface FirstLi {                                                    //第一级目录结构
    id: string
    name: string
    icon: string
    open: boolean
    ol: Array<SecondLi>
}

interface SecondLi {                                                   //第二级目录结构
    id: string
    name: string
    component: FunctionComponent<any>
    minFrontVersion?: string
}

type Menu = Array<FirstLi>

interface Props {
    drawerOpen: boolean                                                 //打开状态
    menu: Menu                                                          //左侧菜单
    onDrawerOpenChange: (v: boolean) => void                            //打开状态改变时触发的事件
    onMenuChange: (v: Menu) => void                                     //左侧菜单改变时触发的事件
}

Select 下拉框

  • api:
interface Props {
    className?: string                                                  //根组件样式的className
    style?: CSSProperties                                               //根组件样式的style

    data: Array<                                                        //下拉框的列表数据
        | string
        | number
        | { id: string | number; name: string | number | ReactNode }
    >
    value: string | number | object | undefined                         //下拉框的值

    onChange(v: any): void                                              //下拉框的值改变时触发的事件
}

Table 表格

  • api:
interface Props {
    className?: string                                  //根组件样式的className
    style?: CSSProperties                               //根组件样式的style

    columns: Array<Column>                              //表格的列,{id: string,name: string,show: boolean}
    value: Array<object>                                //表格的值
    dence?: boolean                                     //是否为紧凑型,默认false
}