2.0.18 • Published 5 years ago

cdm-ui-components v2.0.18

Weekly downloads
3
License
MIT
Repository
-
Last release
5 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

5 years ago

2.0.16

5 years ago

2.0.17

5 years ago

2.0.15

5 years ago

2.0.14

5 years ago

2.0.13

5 years ago

2.0.9

5 years ago

2.0.11

5 years ago

2.0.12

5 years ago

2.0.10

5 years ago

2.0.7

5 years ago

2.0.8

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.6

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.9

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

6 years ago

1.0.99

6 years ago

1.0.98

6 years ago

1.0.97

6 years ago

1.0.96

6 years ago

1.0.95

6 years ago

1.0.94

6 years ago

1.0.93

6 years ago

1.0.92

6 years ago

1.0.91

6 years ago

1.0.90

6 years ago

1.0.89

6 years ago

1.0.88

6 years ago

1.0.87

6 years ago

1.0.86

6 years ago

1.0.85

6 years ago

1.0.84

6 years ago

1.0.83

6 years ago

1.0.82

6 years ago

1.0.81

6 years ago

1.0.80

6 years ago

1.0.79

6 years ago

1.0.78

6 years ago

1.0.77

6 years ago

1.0.76

6 years ago

1.0.75

6 years ago

1.0.74

6 years ago

1.0.73

6 years ago

1.0.72

6 years ago

1.0.71

6 years ago

1.0.70

6 years ago

1.0.69

6 years ago

1.0.68

6 years ago

1.0.67

6 years ago

1.0.66

6 years ago

1.0.65

6 years ago

1.0.64

6 years ago

1.0.63

6 years ago

1.0.62

6 years ago

1.0.61

6 years ago

1.0.60

6 years ago

1.0.59

6 years ago

1.0.58

6 years ago

1.0.57

6 years ago

1.0.56

6 years ago

1.0.55

6 years ago

1.0.54

6 years ago

1.0.53

6 years ago

1.0.52

6 years ago

1.0.51

6 years ago

1.0.50

6 years ago

1.0.49

6 years ago

1.0.48

6 years ago

1.0.47

6 years ago

1.0.46

6 years ago

1.0.45

6 years ago

1.0.44

6 years ago

1.0.43

6 years ago

1.0.42

6 years ago

1.0.41

6 years ago

1.0.40

6 years ago

1.0.38

6 years ago

1.0.37

7 years ago

1.0.36

7 years ago

1.0.35

7 years ago

1.0.34

7 years ago

1.0.33

7 years ago

1.0.32

7 years ago

1.0.31

7 years ago

1.0.30

7 years ago

1.0.29

7 years ago

1.0.28

7 years ago

1.0.27

7 years ago

1.0.26

7 years ago

1.0.25

7 years ago

1.0.24

7 years ago

1.0.23

7 years ago

1.0.22

7 years ago

1.0.21

7 years ago

1.0.20

7 years ago

1.0.19

7 years ago

1.0.18

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago