Giter Site home page Giter Site logo

stavros-tomas / chameleon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ebury/chameleon

0.0 0.0 0.0 107.89 MB

Components library for VUE used by the Ebury online team

Home Page: https://chameleon-ebury.vercel.app/

License: MIT License

JavaScript 51.91% TypeScript 22.16% CSS 4.82% Makefile 0.07% HTML 0.03% Vue 20.95% Dockerfile 0.06%

chameleon's Introduction

Chameleon Components

Chameleon Components is Ebury's vue.js 3.X components library. The library is being used for our Vue projects at Ebury, and more components are added regularly.

Also, check out the latest version deployed in Storybook.

  1. Vision
  2. Contributing
  3. Code Owners
  4. Installation
  5. Usage
  6. Theming
  7. I18n
  8. References

Installation

If you'd like to contribute to the library then you must do the following to set up your local environment:

1. Clone chameleon-components repo

2. Install all dependencies with:

npm install

3. Run Storybook with:

npm start

That's it! By now, you should be up and running. You can check the existing components or create new ones.

Contributing

We love collaborating with other teams and welcome contributions!

See the contributing docs for more info on code style, formatting, testing, and troubleshooting. Or if you want to report a problem or request some change.

Usage

Install the library in your project

Install @ebury/chameleon-components in your project with npm:

npm install @ebury/chameleon-components --save

Import component/s

All of our components are exported by name from @ebury/chameleon-components, so you can import them with:

import { ComponentName } from '@ebury/chameleon-components';

NOTE! If you are going to use ec-phone-number-input, you must host icons from node_modules/svg-country-flags/png100px/ in your project.

For example icon with path node_modules/svg-country-flags/png100px/gb.png should be available in your project by url [your static prefix]icons/country-flags/100/gb.png. Static prefix could be change by setting up respective iconsStaticPrefix property in src/config.js.

Theming

The components can use a custom theme. There are four color palettes used by the CSS, two of them can be adjusted via CSS variables, e.g. the default blue color is defined as --ec-key-color-level-4 and can be configured via --ec-theme-key-color-level-4.

Check out the list of possible variables in the storybook colors story.

A few examples of a theme can be found in the src/styles/themes/ folder.

I18n

Some components, e.g. ec-amount-input or ec-donut require Intl API to format values properly or to detect what is the decimal/grouping separator for a current locale. They both do that via Intl.NumberFormat which might have issues in some browsers for not having all locales set up properly. See the issues we discovered in this PR. If you need to support every single locale on the planet, we recommend to polyfill the Intl API using formatjs.io packages so it's consistent across all browsers.

References

Vue.js

Vue

Vite

Storybook

Storybook

Testing

Vitest

Vue Test Utils

Cypress

Linting

ESLint

Stylelint

CSS

PostCSS

TailwindCSS

Bootstrap Grid

Dependencies

flatpickr

focus-trap

floating-vue

mitt

svg-country-flags

chameleon's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar mcibique avatar stavros-tomas avatar jaimeperezpedra avatar disegnale avatar corinaper avatar jafcalvente avatar wolandec avatar raulwwq0 avatar maruael avatar derrick-g avatar jmesao avatar jeger-at avatar mgascam avatar matallo avatar jonathanmsifleet avatar pelocho avatar anthonys-ebury avatar

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.