Git Product home page Git Product logo

ingred-ui's Introduction

logo.png INGRED UI is a design system developed to make it easy and quick for anyone to build a user interface. It is based on React and has a well thought out structure that works well with TypeScript.

NPM JavaScript Style Guide

Netlify Status

Install

For npm users:

npm install --save ingred-ui styled-components

For yarn users:

yarn add ingred-ui styled-components

For pnpm users:

pnpm add ingred-ui styled-components

Usage

import * as React from "react";

import { ThemeProvider, createTheme, Button } from "ingred-ui";

const App = () => {
  const theme = createTheme();
  return (
    <ThemeProvider theme={theme}>
      <Button>Sample</Button>
    </ThemeProvider>
  );
};

If you use <DatePicker /> or <DateRangePicker /> , add

import "react-dates/lib/css/_datepicker.css";

License

MIT © CARTA HOLDINGS, Inc.

ingred-ui's People

Contributors

deatiger avatar dependabot[bot] avatar fluctmember avatar gairu527 avatar hirokikondo86 avatar horiyee avatar keisukeonishi avatar kinokoruumu avatar kohashi avatar maktak1995 avatar noronaoki avatar penicillin0 avatar r-miyamae avatar renovate-bot avatar renovate[bot] avatar rotosiruto avatar ryokosuge avatar shungenie avatar suzuken avatar takurinton avatar toshi17 avatar youchann avatar yowatari avatar yutan0423 avatar yuya417 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

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

ingred-ui's Issues

Popoverを実装

Dstでreact-tooltipで実装されているPopoverをreact-popperで再実装する。

ItemEmptyをsvgrに通す

.a, .bなどに対してstyleが当たっているため他のsvgに影響が出ている
svgrに通してhash値を付与する

<Divider />をいい感じにする

実際のプロダクトで利用すると意図通りに表示されないことがあるので、現状のユースケースをみつつ、最適な実装に修正する。

利用側のtestでwarningが出る

Deprecation warning: use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.

navigationRailのExpantionMenuItemのtitleをcontentに置換する

  • Unionを取っているReact.ComponentPropsWithRef<"div"> のPropが title: string を持っているため、titleにstring以外を設定できなくなってしまっている
  • titleの利用をやめてかわりに独自の content という要素を定義して置き換える

ref: #177

Travisを.orgのほうに移す

  • .comのままになってる
  • .orgに移す
  • ついでにnodeのバージョン固定などでテスト通ってないのでなおす

<DataTable />内でstateを持たない

利用する側(コンポーネント)でも「選択した行」をstateとして持っているので、stateの二重管理となる。
コードもそのせいで複雑になっている節があるので、propsで管理したい。

Buttonにcomponent propsを追加

type Props = {
  component?: keyof JSX.IntrinsicElements | React.ComponentType<any>;
}
component: Component = "button",

<Styled.ButtonContainer
  as={Component}

どこかしらでtext-decoration: noneを入れる(Linkが指定される場合があるので)

Toastを入れる

自分の中ではDSTで利用されるコードをそのまま用いることにしたけれど、そこに到るまでの思考回路を残しておく。

ライブラリの依存関係周りを整理

概要

  • 現状react-datesとかを一緒にyarn addしないといけないのは、devDependenciesに書かれているから
  • styled-componentsを含めてライブラリを公開する場合は特殊な設定が必要そう(参考2)
  • 上記を踏まえてpackage.jsonを整理したい

対応

  • ingred-uiの利用に必要となるライブラリはdevDependenciesに記述
  • styled-components周りはbundle設定も含めて諸々対応(資料をもう少し読む)

備考

  • ローカルで検証したい
  • Revertできるようにしたい(センシティブな変更となる)
  • この類の変更はメジャーアップデートかもしれない

という理由から、#40 がリリースされてからの対応が良さそう

参考

  1. https://qiita.com/cognitom/items/acc3ffcbca4c56cf2b95
  2. https://styled-components.com/docs/faqs#i-am-a-library-author-should-i-bundle-styledcomponents-with-my-library
  3. https://docs.npmjs.com/files/package.json#dependencies

だいたいここら辺を読むと対応できそう。

<ButtonGroup />が<Button component={Link} />の形式も受け入れるようにする

  • #82<Button />が様々なタグとして表現できるようになった
  • <ButtonGroup /><button />に対してスタイルを当てるように実装している
  • ↑をいろんなタグに対してスタイルを当てるようにすればイケるはず

イメージ↓

-   button:not(:last-of-type) {
+   & > *:not(:last-of-type) {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
  }

-   button:not(:first-of-type) {
+   & > *:not(:first-of-type) {
    border-left: none;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
  }

arrow_doubleアイコン消す

諸々の事情(詳細は省略)で残っていたarrow_doubleアイコンを消す。

arrow_double_leftアイコンが存在するので問題なし。

リリースの際は破壊的変更になるので、メジャーアップデートにする。

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.