├── .circleci
└── config.yml
├── .gitignore
├── LICENSE.txt
├── demo
├── index.css
└── index.html
├── dist
├── index.js
└── index.js.gz
├── lib
├── Component.js
└── index.js
├── package.json
├── readme.md
└── rollup.config.js
/.circleci/config.yml:
--------------------------------------------------------------------------------
1 | # Javascript Node CircleCI 2.0 configuration file
2 | #
3 | # Check https://circleci.com/docs/2.0/language-javascript/ for more details
4 | #
5 | version: 2
6 | jobs:
7 | build:
8 | docker:
9 | # specify the version you desire here
10 | - image: circleci/node:11.1.0
11 |
12 | # Specify service dependencies here if necessary
13 | # CircleCI maintains a library of pre-built images
14 | # documented at https://circleci.com/docs/2.0/circleci-images/
15 | # - image: circleci/mongo:3.4.4
16 |
17 | working_directory: ~/repo
18 |
19 | steps:
20 | - checkout
21 |
22 | # Download and cache dependencies
23 | - restore_cache:
24 | keys:
25 | - v1-dependencies-{{ checksum "package.json" }}
26 | # fallback to using the latest cache if no exact match is found
27 | - v1-dependencies-
28 |
29 | - run: npm install
30 |
31 | - save_cache:
32 | paths:
33 | - node_modules
34 | key: v1-dependencies-{{ checksum "package.json" }}
35 |
36 | # run tests!
37 | - run: npm test
38 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules/
2 | /package-lock.json
3 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Vincent Agnano for the Polight team
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/demo/index.css:
--------------------------------------------------------------------------------
1 | /* Page Layout */
2 | body {
3 | font-family: OpenSans, Arial;
4 | color: #555;
5 | margin: 0;
6 | --col-width: 500px;
7 | }
8 | h1 {
9 | text-align: center;
10 | background: #f5f5f5;
11 | padding: 1rem;
12 | box-shadow: 0 0 3px rgba(0, 0, 0, .3);
13 | }
14 | h2 {
15 | text-align: center;
16 | }
17 | article {
18 | background-color: #f5f5f5;
19 | padding: 2rem;
20 | margin: 1rem auto;
21 | max-width: var(--col-width);
22 | box-shadow: 1px 1px 3px rgba(0, 0, 0, .3);
23 | }
24 | article p {
25 | margin-bottom: 1rem;
26 | padding-bottom: 1rem;
27 | border-bottom: 1px dotted #ccc;
28 | }
29 |
30 | #intro {
31 | max-width: var(--col-width);
32 | margin: 2rem auto;
33 | }
34 |
35 | /* Used within components */
36 | button {
37 | background-color: #2a85d2;
38 | border-radius: 5px;
39 | border: none;
40 | color: white;
41 | font-size: 3rem;
42 | text-align: center;
43 | padding: 0 1rem;
44 | cursor: pointer;
45 | }
46 |
47 | button.reset {
48 | font-size: 1rem;
49 | margin-left: 5rem;
50 | }
51 |
52 | span {
53 | display: inline-block;
54 | font-size: 2rem;
55 | padding: 2rem;
56 | width: 50px;
57 | text-align: right;
58 | }
59 |
60 | progress {
61 | display: block;
62 | width: 100%;
63 | }
64 |
65 | .description {
66 | color: #888;
67 | font-style: italic;
68 | }
69 |
--------------------------------------------------------------------------------
/demo/index.html:
--------------------------------------------------------------------------------
1 |
2 |
Demo of WebComponents built with Brick
3 |
4 |
5 |
6 |
WebComponents made with Brick
7 |
8 |
9 |
10 | Viewing the source of this webpage will show you the whole source code of the components.
11 | Brick does not require any webpack or other compiling library.
12 | You can just use it right away.
13 |
14 |
15 |
16 | A few demo example are available below: each box is an HTML with a description and the component usage below the line.
17 |
18 |
19 |
20 |
21 |
22 |
Minimalist Component Display
23 |
Below is a dummy component that just displays a text.
24 | The text is self-contained in the component and a different text is passed as attribute.
25 | The value can also be changed from the outside. Click on the second component to change the value.
26 |
27 |
28 |
29 |
30 |
31 |
Button
32 |
A button can contain all its actions within the component itself and react.
33 |
34 |
35 |
36 |
37 |
Counter
38 |
Counters demo are the new black.
39 | You can't make a component without a demo with a counter in 2020.