Giter Site home page Giter Site logo

anuragteapot / custom-elements Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joomla-projects/custom-elements

0.0 0.0 0.0 2.32 MB

A compilation of Joomla 4 Custom Elements.

License: GNU General Public License v2.0

JavaScript 67.98% CSS 21.19% HTML 10.84%

custom-elements's Introduction

Joomla UI custom elements

Build Status

Travis-CI GreenKeeper Webcomponents.org
Build Status Greenkeeper badge Published on webcomponents.org
Sauce Labs
Build Status

UI components using modern technologies

This is a collection of all the components that Joomla is using. They are developed with the new W3C standard: custom elements. Each component is using plain and optimized javascript for performance. Also the HTML markup (wherever possible) is reduced to offer a great benefit for front end developers).

Using the NPM power

You can install this package by using NPM:

$ npm i joomla-ui-custom-elements

Configuration

The prefix of all the elements is configuarable. To do so duplicate the file settings.yaml and name the new file as settings-custom.yaml. Open the file in your editor and change the prefix to your taste. (It needs to be one word - check the W3C speifications for valid custom element naming). Build your custom elements by executing:

$ grunt

The folder named dist contains all your elements.

Usage

For each component that you need to have available in your page you need to add the custom element in the head of the document:

<script src="joomla-alert.min.js"></script>

Tests

Once again we are using the great tools from the polymer team here! You will need wct (web component tester) installed globally. To do so just run npm install web-component-tester -g. You might need to run that command as sudo! After that, in the root folder of this project just run wct and see the status of the tests...

The default setup is based on MacOS system and looking for Chrome, Firefox and Safari browsers, you can change this by editing line 5 of https://github.com/joomla-projects/custom-elements/blob/master/wct.conf.json#L5

Browser support

Although all the major browsers are committed to support custom elements some of the all green browsers do need a polyfill. The polyfills can be found in the dist folder and are created by the Polymer team (Polymer is a Google project). The repo for the actual polyfill is: https://github.com/webcomponents/webcomponentsjs

Documentation

Fully documented here

License

The library is released under the GPL license

custom-elements's People

Contributors

armenos avatar brianteeman avatar c-lodder avatar ciar4n avatar dgrammatiko avatar greenkeeper[bot] avatar philetaylor avatar wilsonge 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.