All Projects → glean-wheat → wheat-ui

glean-wheat / wheat-ui

Licence: other
Web Components 组件库;拍平框架差异

Programming Languages

SCSS
7915 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to wheat-ui

pattern-library
AXA CH UI component library. Please share, comment, create issues and work with us!
Stars: ✭ 103 (+505.88%)
Mutual labels:  webcomponents, storybook, lit-html
polymerx-cli
⚡ Unlock the power of Polymer 3, Web Components and modern web tools.
Stars: ✭ 30 (+76.47%)
Mutual labels:  webcomponents, lit-html
highcharts-webcomponent
Highcharts Web Component usable with any Framework
Stars: ✭ 21 (+23.53%)
Mutual labels:  webcomponents, lit-html
Wired Elements
Collection of custom elements that appear hand drawn. Great for wireframes or a fun look.
Stars: ✭ 8,848 (+51947.06%)
Mutual labels:  webcomponents, lit-html
redux-connect-element
Redux HTMLElement Connector
Stars: ✭ 16 (-5.88%)
Mutual labels:  webcomponents, lit-html
MoleculeJS
A library for creating fast and reactive Custom Elements
Stars: ✭ 39 (+129.41%)
Mutual labels:  webcomponents, lit-html
bce.design
minimal magic, minimal tooling, essential dependencies, high productivity, no transpilations and no migrations. The Web Components starter ships with integrated lit-html, redux-toolkit and vaadin router components.
Stars: ✭ 67 (+294.12%)
Mutual labels:  webcomponents, lit-html
app-starter
Angular mono-repo (Ionic/Capacitor/StencilJS/Web Component) app starter for supporting cross platform apps.
Stars: ✭ 75 (+341.18%)
Mutual labels:  webcomponents, storybook
rollup-plugin-lit-css
Moved to https://github.com/bennypowers/lit-css
Stars: ✭ 35 (+105.88%)
Mutual labels:  webcomponents, lit-html
fuco
Functional Component like React, but for Web Components.
Stars: ✭ 71 (+317.65%)
Mutual labels:  webcomponents, lit-html
create-evergreen-app
Get up and running with an evergreen web application development stack designed by, and for, today's modern web.
Stars: ✭ 16 (-5.88%)
Mutual labels:  webcomponents, lit-html
lit-components
Moved to https://github.com/vaadin/component-mixins
Stars: ✭ 59 (+247.06%)
Mutual labels:  webcomponents, lit-html
hello-web-components
A simple starter <hello-world /> web component written in typescript, using lit-html and lit-element. Unit tested with jest and e2e tested with puppeteer and jest-puppeteer.
Stars: ✭ 15 (-11.76%)
Mutual labels:  lit-html
desktop
💻 Desktop app for all your Storybooks
Stars: ✭ 68 (+300%)
Mutual labels:  storybook
react-native-hybrid-storybook
Showcase your react native components in the browser
Stars: ✭ 18 (+5.88%)
Mutual labels:  storybook
next-app-starter
Another awesome starter for your app base on nextjs + tailwind + react-query + react-hook-form + next-auth + jotai
Stars: ✭ 73 (+329.41%)
Mutual labels:  storybook
availity-react
React components using Availity UIKit and Bootstrap 4
Stars: ✭ 46 (+170.59%)
Mutual labels:  storybook
enterprise-wc
Enterprise-grade web component library for the Infor Design System
Stars: ✭ 14 (-17.65%)
Mutual labels:  webcomponents
mod-uk-design-system
Build web applications that meet the Defence Digital service standards
Stars: ✭ 78 (+358.82%)
Mutual labels:  storybook
pharos
JSTOR's design system
Stars: ✭ 48 (+182.35%)
Mutual labels:  lit-html

wheat-ui

通过 web components 打造全新组件库

适配所有框架

无论你的技术栈使用的是 angular、vue、react;不存在框架兼容问题,你就当做标签直接使用

示例

image

在 html 中使用

将 dist 中的 wheat.ui.min.js 保存在本地或者 CDN 上,然后通过 script 引入即可

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Modal</title>
  </head>
  <style></style>
  <body>
    <button onclick="showModal()">显示弹框</button>
    <wheat-modal title="弹窗" visible="false" maskCloseable="true">
      <div slot="content">
        弹框内容
      </div>
    </wheat-modal>
  </body>
  <script src="./dist/wheat.ui.min.js"></script>
  <script>
    const MyModalDom = document.querySelector('wheat-modal')

    MyModalDom.addEventListener('onCancel', (value) => {
      const {
        detail: { visible }
      } = value
      console.log('触发取消方法')
      MyModalDom.setAttribute('visible', visible)
    })

    MyModalDom.addEventListener('onConfirm', (value) => {
      console.log('触发确定方法')
      MyModalDom.setAttribute('visible', false)
    })
    const showModal = () => {
      MyModalDom.setAttribute('visible', true)
    }
  </script>
</html>

在 angular、vue、react 项目中使用,

安装

npm i web-component-wheat-ui

使用

import 'web-component-wheat-ui'

在 React 中使用

import React, { useState, useEffect } from 'react'
import 'web-component-wheat-ui'
const App = () => {
  const [visible, setvisible] = useState(false)
  useEffect(() => {
    const MyModalDom = document.querySelector('wheat-modal')
    MyModalDom.addEventListener('onCancel', (value) => {
      const {
        detail: { visible }
      } = value
      console.log('触发取消方法')
      setvisible(visible)
    })

    MyModalDom.addEventListener('onConfirm', (value) => {
      console.log('触发确定方法')
      setvisible(false)
    })
  }, [])
  return (
    <div className="App">
      <button
        onClick={() => {
          setvisible(true)
        }}
      >
        显示弹框
      </button>
      <wheat-modal title="title" visible={visible}>
        <div slot="content">弹框内容</div>
      </wheat-modal>
    </div>
  )
}

export default App

在 Vue 中使用

<template>
  <div>
    <button @click="showModal">
      显示弹框
    </button>
    <wheat-modal title="title" :visible="visible.toString()">
      <div slot="content">弹框内容</div>
    </wheat-modal>
    <div>{{ visible }}</div>
  </div>
</template>

<script>
import 'web-component-wheat-ui'

export default {
  data() {
    return {
      visible: false
    }
  },
  mounted() {
    const MyModalDom = document.querySelector('wheat-modal')
    MyModalDom.addEventListener('onCancel', (value) => {
      const {
        detail: { visible }
      } = value
      console.log('触发取消方法', value)
      this.visible = visible
    })

    MyModalDom.addEventListener('onConfirm', (value) => {
      console.log('触发确定方法', value)
      this.visible = false
      this.hidden()
    })
  },
  methods: {
    showModal() {
      this.visible = true
    },
    hidden() {
      this.visible = false
    }
  }
}
</script>

更多>>

贡献流程

  1. 添加 SSH
  2. clone 仓库
https://github.com/glean-wheat/wheat-ui
  1. 新建 issue

发现问题或者有开发者提出的问题了后,在https://github.com/glean-wheat/wheat-ui/issues创建issue;

  1. 在develop中拉取分支
  • 根据第三步创建的issue后,根据生成的id,创建分支,一般bug类的 命名为 hotfix/#+ issueID; 新增功能 feature/#+issueID

eg:

feature/#3
  1. 提交
  • 提交的时可根据 commitlint 规范进行提交;描述信息为该 issueid;这样github会根据id进行关联

eg:

git commit -m "feat: #3"

6: 提交PR

master 是保护分支;需要有 review 之后;才可合并

文档规划

  • 文档接入; storybook
  • 单测接入
  • react、vue 使用样式案例
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].