Giter Site home page Giter Site logo

youzan / zent Goto Github PK

View Code? Open in Web Editor NEW
2.2K 85.0 377.0 89.17 MB

A collection of essential UI components written with React.

Home Page: https://youzan.github.io/zent

License: MIT License

Shell 0.35% JavaScript 24.31% HTML 0.23% TypeScript 64.79% SCSS 10.32%
react ui-components component-library components youzan javascript hooks typescript

zent's Introduction

Youzan logo

Zent logo

Zent ( \ˈzent\ ), a collection of essential UI components written with React.

🇨🇳 访问中文版

CI npm version bundle size coverage status PRs welcome

Zent ( \ˈzent\ ) is a React component library developed and used at Youzan. Zent provides a collection of essential UI components and lots of useful domain specific components.

We have more than 50 components for now and we're releasing more.

Our goal is making React development faster and simpler.

Features

  • High quality React components
  • Builtin TypeScript support
  • Supports custom themes
  • Import JavaScript and styles only if they are used
  • Handmade icon font

Supported Environments

  • React >= 17
  • Modern browsers but not IE
  • Supports server-side rendering(SSR)

Required polyfills

  • es6.object.assign
  • es6.object.is
  • es6.string.ends-with
  • es6.string.starts-with
  • es6.string.includes
  • es7.string.trim-left
  • es7.string.trim-right
  • es6.array.from
  • es6.array.of
  • es6.array.fill
  • es6.array.find
  • es6.array.find-index
  • es7.array.includes

Install

yarn add zent

# or

npm install zent --save

Documentation

https://youzan.github.io/zent/en/guides/install

Contribution

Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Zent.

Send issues and pull requests with your ideas.

License

Project licensed under MIT license, feel free to enjoy and participate in Open Source.

zent's People

Contributors

annebai avatar arvintung avatar byeval avatar cookfront avatar cpylua avatar ctyu avatar cythiay avatar dependabot[bot] avatar fairyaierl avatar github-actions[bot] avatar goo-yyh avatar huangsy avatar hyczzhu avatar intellild avatar iscarecrow avatar kainstar avatar lama-pacos avatar liaoyu avatar linxixuan avatar lucasicarus avatar makebanana avatar ninofocus avatar nodew avatar radicalviva avatar ronghang avatar sfantasy avatar vinelink avatar w91 avatar wangchao0502 avatar wulv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zent's Issues

zent-select: 'warning: unknown props' with react v15.4.2 and others..

  1. unknown props

1

  1. 外部清空选择之后应恢复显示placeholder

2

  1. disabled 需要增加指针样式

3

  1. search 输入是否在一次 pop 开闭之后仍然保留, 如果保留是否应该加一个清空按钮.

4

  1. tag上的删除按钮, 在点击事件是否冒泡上表现不一致.

5-1

5-2

zent-table

box-sizing: border-box;

因为有

width: 100%

utils: add unit tests

Add unit tests for functions/components in zent/src/utils

  • WindowEventHandler
  • WindowResizeHandler
  • findPositionedParent
  • getViewportSize
  • isPromise
  • isBrowser

react 版本是15.4时,console 警告

Warning: Unknown prop text on tag. Remove this prop from the element.
....
Warning: Unknown props alias, cid on tag. Remove these props from the element.
...

React hot reload in docs

Component level hot reload is not that easy.
Each page is compiled from a Markdown file on the fly.
The layout is written in Vue.

  • Replace Vue with React in site
  • Remove all Vue related config in webpack config
  • Add react-hot-loader

form的一些问题

  1. form 的 onSubmit 校验不支持一个key对应多value的情况
  2. form 无法使用同步提交

是我没有找到 API么?

Why do we run tests on both CircleCI and TravisCI?

CircleCI runs much faster than TravisCI in general, but it is missing a must-have feature: the ability to run tests on the prospective merge of a Github PR.

If CircleCI supports this feature I will remove TravisCI from this project.

Dialog: flash on close

If we switch to another tab when closing dialog, it will remain there until we switch back resulting a flash.

Implement babel-plugin-zent

Why

We plan to discontinue zent-xxx packages. This plugin helps importing only the part of zent you use. This was the only reason when we first released these zent-xxx packages.

How

  • Transform import { Button } from 'zent' to import Button from 'zent/button'.
  • (configurable) Error on import Button from 'zent-button'
  • (configurable) Error on import * as Zent from 'zent'
  • (configurable) Error on const Zent = require('zent')
  • Update usage in zent/README.md

zent-tree: logic issues, some style fix

  1. disabled为true的节点, 是否还能打开, 以及其子节点是否还能选中
  2. 为disabled节点增加一些样式以区分

1

  1. 默认的 clone action 是否应该进行深复制

3

Why zent-table uses 'flex' instead of 'table' layout?

zent-table中每一行都使用的flex布局,在使用flex的情况下,若果要指定某一行的某一单元格有一个最小宽度,那么整体布局将可能会被破坏(需要做一些hack使column恢复对齐),而使用table不会出现这样的问题,请问是处于什么考虑使用flex替换更直接的table布局呢?

Support SSR

There're some direct references to window and document, these should be guarded.

Consolidate all sub packages into a mono package

Sub packages bring more troubles than conveniences after we released them.

Maintaining these sub packages does not make much sense since each release is tied with specific versions of these sub packages.

So we will drop support for these sub packages.

How

  • Move all sub packages into packages/zent, remove package.json in these folders.
  • Move third-party dependencies and devDependencies into packages/zent.
  • Move scripts in sub packages to packages/zent/scripts.
  • Replace scripts/make-icon-grid.sh with a node script.
  • Change all sub package references to local directories.
  • Replace zent-kit prepublish with webpack & babel.
  • Replace zent-kit test with Jest.
  • Remove zent-kit from project.
  • lerna will still be there, we are planning a babel plugin #200
  • Update reference in documentations

zent-tabs: style bugs

  1. add 按钮里的加号没有居中

add

  1. diasbled 的选项卡增加指针样式'not-allow'以保持一致.

dis

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.