2.0.18 • Published 4 years ago

cdm-ui-components v2.0.18

Weekly downloads
3
License
MIT
Repository
-
Last release
4 years ago

cdm-ui-components

Reusable UI components for Cedemo's eco-system

NPM JavaScript Style Guide

Install

npm install --save cdm-ui-components

Usage

import React, { Component } from 'react'
import { 
  // theming
  ThemeProvider,
  DefaultTheme,
  // style
  Reset,
  GlobalStyle,
  // buttons
  Button,
  DropdownButton,
  // zones
  Zone,
  LightZone,
  DarkZone,
  BackgroundZone,
  // fonts
  A,
  H2,
  H4,
  P,
  Text,
  Display,
  // spacing
  Padding,
  Margin,
  // overlay
  Overlay,
  // icons
  Play,
  Home,
  LeftArrow,
  RightArrow,
  // layout
  Row,
  Col,
  Div,
  // form
  Input,
  Label,
  Textarea,
  Select,
  VirtualizedSelect,
  DatePicker,
  UploadButton
  // modal
  Modal,
  // list
  List,
  ListItem,
  // loader
  Loader,
  // card
  Card,
  // image
  BackgroundImage,
  // alert
  Alert,
  // tag
  Tag
} from 'cdm-ui-components'

const theme = DefaultTheme

class Example extends Component {
  
  render() {
    return (
      <React.Fragment>
          <Reset />
          <ThemeProvider theme={DefaultTheme}>
            <React.Fragment>
              <GlobalStyle /> 

              {/* Banner */}
              <BackgroundZone noPadding url="http://www.cedemo.com/img/hero-rcp.jpg">
                <Overlay gradient>
                  <Padding 
                    horizontal={{mobile: 4, tablet: 5, desktop: 6}}
                    vertical={{mobile: 5, tablet: 6, desktop: 7}}
                    >
                    <Display>Cedemo UI/UX library</Display>
                    <Padding bottom={4}>
                      <P style={{color: "#eee", fontSize: "1.4rem"}} lead>Simple, performant & dev-friendly (not really) UI library.</P>
                    </Padding>
                    <Button primary noShadow>
                      Discover
                    </Button>
                    <Button background dark noShadow>
                      <Play />&nbsp;&nbsp;View information
                    </Button>
                  </Padding>
                  <Margin bottom={5} />
                </Overlay>
              </BackgroundZone>

              {/* Main content */}
              <Zone transparent noShadow noPadding>
                <Padding horizontal={{mobile: 0, tablet: 0, desktop: 6}}>
                  <Zone transparent noShadow noPadding style={{top: '-3.75em'}}>

                    {/* Menu */}
                    <Zone transparent noPadding>
                        <List noShadow noBorderRadius>
                          <ListItem hoverBackground='rgba(255,255,255,.23)' width='8%' selected><Text color='#fff'><Home size={17}/></Text></ListItem>
                          <ListItem hoverBackground='rgba(255,255,255,.23)' width='23%'><Text color='#fff' bold spaced uppercase>Catalog</Text></ListItem>
                          <ListItem hoverBackground='rgba(255,255,255,.23)' width='23%'><Text color='#fff' bold spaced uppercase>Videos</Text></ListItem>
                          <ListItem hoverBackground='rgba(255,255,255,.23)' width='23%'><Text color='#fff' bold spaced uppercase>Statistics</Text></ListItem>
                          <ListItem hoverBackground='rgba(255,255,255,.23)' width='23%'><Text color='#fff' bold spaced uppercase>Export</Text></ListItem>
                        </List>
                    </Zone>

                    {/* Main zone */}
                    <Zone>
                      <Padding vertical={4} horizontal={4}>
                        <H2>Cedemo's UI library</H2>
                        <P lead gray>Created for performance, quick startup, clean design.</P>
                        <P lead gray>Uses <code>react-tippy</code>, <code>react-select</code>, <code>styled-components</code>, <code>day-js</code>...</P>
                        <P lead gray><Text bold inline>Work in progress</Text></P>
                        <br/><br/>
                        <Loader />
                      </Padding>
                    </Zone>
                  
                  </Zone>
                </Padding>
              </Zone>

            </React.Fragment>
          </ThemeProvider>
      </React.Fragment>
    );
}

Built with (thank you guys)

No huge ambition for this library. No Boostrap or CSS dependency (only css-in-js). Just reusing bunch of amazing libraries:

react-tippy
react-select
react-icons-kit
react-virtualized
styled-components
styled-bootstrap-grid

License

MIT © Romain Roufast - Cedemo(https://github.com/Romain Roufast)

2.0.18

4 years ago

2.0.16

4 years ago

2.0.17

4 years ago

2.0.15

4 years ago

2.0.14

4 years ago

2.0.13

4 years ago

2.0.9

4 years ago

2.0.11

4 years ago

2.0.12

4 years ago

2.0.10

4 years ago

2.0.7

4 years ago

2.0.8

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.6

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.9

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.99

4 years ago

1.0.98

5 years ago

1.0.97

5 years ago

1.0.96

5 years ago

1.0.95

5 years ago

1.0.94

5 years ago

1.0.93

5 years ago

1.0.92

5 years ago

1.0.91

5 years ago

1.0.90

5 years ago

1.0.89

5 years ago

1.0.88

5 years ago

1.0.87

5 years ago

1.0.86

5 years ago

1.0.85

5 years ago

1.0.84

5 years ago

1.0.83

5 years ago

1.0.82

5 years ago

1.0.81

5 years ago

1.0.80

5 years ago

1.0.79

5 years ago

1.0.78

5 years ago

1.0.77

5 years ago

1.0.76

5 years ago

1.0.75

5 years ago

1.0.74

5 years ago

1.0.73

5 years ago

1.0.72

5 years ago

1.0.71

5 years ago

1.0.70

5 years ago

1.0.69

5 years ago

1.0.68

5 years ago

1.0.67

5 years ago

1.0.66

5 years ago

1.0.65

5 years ago

1.0.64

5 years ago

1.0.63

5 years ago

1.0.62

5 years ago

1.0.61

5 years ago

1.0.60

5 years ago

1.0.59

5 years ago

1.0.58

5 years ago

1.0.57

5 years ago

1.0.56

5 years ago

1.0.55

5 years ago

1.0.54

5 years ago

1.0.53

5 years ago

1.0.52

5 years ago

1.0.51

5 years ago

1.0.50

5 years ago

1.0.49

5 years ago

1.0.48

5 years ago

1.0.47

5 years ago

1.0.46

5 years ago

1.0.45

5 years ago

1.0.44

5 years ago

1.0.43

5 years ago

1.0.42

5 years ago

1.0.41

5 years ago

1.0.40

5 years ago

1.0.38

5 years ago

1.0.37

5 years ago

1.0.36

5 years ago

1.0.35

5 years ago

1.0.34

5 years ago

1.0.33

5 years ago

1.0.32

5 years ago

1.0.31

5 years ago

1.0.30

5 years ago

1.0.29

5 years ago

1.0.28

5 years ago

1.0.27

5 years ago

1.0.26

5 years ago

1.0.25

5 years ago

1.0.24

5 years ago

1.0.23

5 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.20

5 years ago

1.0.19

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago