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 🙏

© 2024 – Pkg Stats / Ryan Hefner

flarej

v0.6.0

Published

An ui components library based on React and NornJ

Downloads

589

Readme

FlareJ

   ___      __
 /\  __\   /\_\
 \_\ \_/_  \/\ \
/\___  __\  \ \ \
\/__/\ \_/  _\ \ \
    \_\ \  /\ \_\ \ (Component, {
   /\___/  \ \____/   ...responsiveSettings
   \/__/    \/___/  });

FlareJ是一个基于ReactNornJ模板引擎的UI组件库。

FlareJ的前身是一个基于jQuery的UI组件库,在2011-2015年曾服务于jd.com内部多个PC及移动端系统中。

NPM Version NPM Downloads

组件

目前已有的组件(点击查看示例或文档):

原创组件

可以使用babel-plugin-import按需引入以上组件,.babelrc配置:

{
  "plugins": [
    ["import", {
      "libraryName": "flarej",
      "libraryDirectory": "lib/components",
      "style": true
    }]
  ]
}

引入组件:

import { Row, Col, Pagination } from 'flarej';

高阶组件

使用Responsive高阶组件,可创建各属性值支持按响应式条件变化的组件。使用方法如下,可以用fj变量作为Responsive的别名:

import fj from 'flarej/lib/higherOrders/responsive';
//或 import fj from 'flarej';
import EChart from 'flarej/lib/components/ECharts';

//创建响应式组件
const FjEChart = fj(EChart, {
  responsive: false,          //是否开启响应式
  responsiveDelay: 70,        //响应式执行后修改组件属性值延迟时间
  responsiveOnlyWidth: true,  //只在页面宽度改变时执行响应式
  defaultResponsiveParam: {   //默认响应式参数
    '(max-width: 1350px)': {  //响应式条件,与css媒体查询语法一致
      state: {                //组件各属性值
        width: 200
      }
    },
    '(min-width: 1351px)': {
      state: {
        width: 'auto'
      }
    }
  }
});

ReactDOM.render(
  <FjEChart autoResize={false}
            responsive={true}
            responsiveParam={{  //可在使用组件时继续传入其他响应式参数,会在defaultResponsiveParam后面执行
              '(max-width: 1350px)': {
                state: {
                  width: 200
                }
              }
            }}
  />,
document.body);

使用Responsive高阶组件创建的组件

第三方组件

依赖的项目

安装

使用npm安装:

npm install flarej

浏览器支持

所有现代浏览器以及Internet Explorer 9+。

License

MIT