Skip to content

Commit 655aa72

Browse files
first commit
0 parents  commit 655aa72

File tree

270 files changed

+72263
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

270 files changed

+72263
-0
lines changed

.circleci/config.yml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
2+
#
3+
version: 2
4+
jobs:
5+
build:
6+
docker:
7+
- image: circleci/node:16
8+
9+
working_directory: /tmp/ui
10+
11+
steps:
12+
- checkout
13+
- restore_cache:
14+
keys:
15+
- dependencies-{{ checksum "package-lock.json" }}
16+
- run:
17+
name: Install node dependencies
18+
command: npm install
19+
- save_cache:
20+
paths:
21+
- node_modules
22+
key: dependencies-{{ checksum "package-lock.json" }}
23+
- run:
24+
name: Prettier check
25+
command: npm run check:prettier
26+
- run:
27+
name: Check linting
28+
command: npm run check:code
29+
- run:
30+
name: Build library
31+
command: npm run build
32+
- save_cache:
33+
paths:
34+
- lib
35+
key: lib-{{ .Branch }}-{{ .Revision }}
36+
- save_cache:
37+
paths:
38+
- dist
39+
key: dist-{{ .Branch }}-{{ .Revision }}
40+
41+
# deploy:
42+
# docker:
43+
# - image: circleci/node:10
44+
45+
# working_directory: /tmp/ui
46+
47+
# steps:
48+
# - checkout
49+
# - restore_cache:
50+
# keys:
51+
# - dependencies-{{ checksum "package-lock.json" }}
52+
# - run:
53+
# name: Install node dependencies
54+
# command: npm install
55+
# - restore_cache:
56+
# keys:
57+
# - lib-{{ .Branch }}-{{ .Revision }}
58+
# - restore_cache:
59+
# keys:
60+
# - dist-{{ .Branch }}-{{ .Revision }}
61+
# - run:
62+
# name: Build storybook
63+
# command: npm run build:storybook
64+
# - run:
65+
# name: Copy styles from lib
66+
# command: cp ./lib/*.css ./storybook-static
67+
# - add_ssh_keys:
68+
# fingerprints:
69+
# - '7d:bf:98:9c:fa:d8:d5:9c:38:5c:4d:59:fe:8e:01:72'
70+
# - run:
71+
# name: Deploy to Github Pages
72+
# command: |
73+
# npm init --yes
74+
# npm install gh-pages --no-save
75+
76+
# mkdir storybook-static/.circleci
77+
# touch storybook-static/.circleci/config.yml
78+
# echo 'ui.decentraland.org' > storybook-static/CNAME
79+
80+
# git config user.name "decentraland-bot"
81+
# git config user.email "[email protected]"
82+
# ./node_modules/.bin/gh-pages --dist storybook-static
83+
84+
release:
85+
docker:
86+
- image: circleci/node:16
87+
88+
working_directory: /tmp/ui
89+
90+
steps:
91+
- checkout
92+
- restore_cache:
93+
keys:
94+
- lib-{{ .Branch }}-{{ .Revision }}
95+
- restore_cache:
96+
keys:
97+
- dist-{{ .Branch }}-{{ .Revision }}
98+
- restore_cache:
99+
keys:
100+
- dependencies-{{ checksum "package-lock.json" }}
101+
- run:
102+
name: Install node dependencies
103+
command: npm install
104+
- run:
105+
name: Semantic release
106+
command: npm run semantic-release
107+
108+
workflows:
109+
version: 2
110+
build-deploy-release:
111+
jobs:
112+
- build:
113+
filters:
114+
branches:
115+
ignore: gh-pages
116+
# - deploy:
117+
# requires:
118+
# - build
119+
# filters:
120+
# branches:
121+
# only: master
122+
- release:
123+
requires:
124+
- build
125+
filters:
126+
branches:
127+
only: master

.eslintrc.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*eslint-env node*/
2+
module.exports = {
3+
root: true,
4+
parser: '@typescript-eslint/parser',
5+
ignorePatterns: ['lib/**/*', 'dist/**/*'],
6+
plugins: ['@typescript-eslint'],
7+
extends: [
8+
'eslint:recommended',
9+
'plugin:@typescript-eslint/recommended',
10+
'prettier'
11+
],
12+
env: {
13+
browser: true,
14+
es6: true
15+
},
16+
overrides: [
17+
{
18+
files: ['*.ts', '*.tsx', '*.js'],
19+
rules: {
20+
'@typescript-eslint/explicit-module-boundary-types': 'off',
21+
'no-restricted-imports': ['error', 'semantic-ui-react']
22+
}
23+
},
24+
{
25+
files: ['*.js'],
26+
rules: {
27+
'@typescript-eslint/no-var-requires': 'off'
28+
}
29+
}
30+
]
31+
}

.github/ISSUE_TEMPLATE.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## 🎉 Description
2+
3+
<!-- Briefly describe the issue you are experiencing (or the feature you want to see added to the Dapp). Tell us what you were trying to do and what happened instead. **Remember, this is _not_ a place to ask for help debugging code; for that, we welcome you in the [Decentraland Discord channels](https://dcl.gg/discord).** -->
4+
5+
<!-- Please check one of by placing an x in the box. -->
6+
7+
* [ ] 🐛 This is a bug report.
8+
* [ ] 📈 This is a feature request.
9+
10+
## 📝 Details
11+
12+
Describe the problem you have been experiencing in more detail. Include as much information as you think is relevant. Keep in mind that transactions can fail for many reasons; context is key here. Links to tx, screenshots are welcome.
13+
Remember to not share sensible information
14+
15+
## 🔢 Steps To Reproduce Issue [ Good To Have ]
16+
17+
Please remember that with baby steps it's easier to reproduce the bug and it's much faster to fix it.
18+
19+
```
20+
- Step 1
21+
- Step 2
22+
- Step 3
23+
...
24+
```
25+
26+
## 👍 Other Information
27+
28+
<!-- List any other information that is relevant to your issue. Error logs, related issues, suggestions on how to fix, Stack Overflow links, forum links, etc. -->

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.DS_Store
2+
.vscode
3+
node_modules
4+
/lib
5+
dist
6+
storybook-static
7+
coverage/*

.npmignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
storybook-static
3+
coverage/*
4+
.circleci
5+
.storybook
6+
test
7+
tsconfig.json
8+
webpack.config.js

.prettierrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"trailingComma": "none"
5+
}

.storybook/addons.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import '@storybook/addon-storysource/register'

.storybook/config.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// @ts-ignore
2+
import { addParameters, configure, addDecorator } from '@storybook/react'
3+
import { create } from '@storybook/theming'
4+
import theme from './theme'
5+
6+
// import global css
7+
import 'semantic-ui-css/semantic.min.css'
8+
import 'balloon-css/balloon.min.css'
9+
import '../src/themes/base-theme.css'
10+
import '../src/themes/alternative/light-theme.css'
11+
12+
addParameters({
13+
options: {
14+
theme: create({
15+
base: 'light',
16+
brandTitle: 'UI | Decentraland',
17+
brandUrl: 'https://decentraland.org',
18+
brandImage: 'https://ui.decentraland.org/color_dark_text.png'
19+
})
20+
}
21+
})
22+
23+
addDecorator(theme)
24+
25+
// automatically import all files ending in *.stories.tsx in /stories
26+
const req = require.context('../src/components', true, /.stories.tsx?$/)
27+
28+
function loadStories() {
29+
req.keys().forEach(req)
30+
}
31+
32+
configure(loadStories, module)

.storybook/theme.css

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.switch-theme {
2+
z-index: 10000;
3+
position: fixed;
4+
cursor: pointer;
5+
margin: 24px;
6+
right: 0px;
7+
}
8+
9+
.switch-theme .ui.toggle.checkbox input:checked ~ label:before,
10+
.switch-theme .ui.toggle.checkbox input:focus:checked ~ label:before {
11+
background-color: var(--primary) !important;
12+
}
13+
14+
.switch-theme .icon {
15+
position: absolute;
16+
color: var(--text);
17+
transition: all 0.3s ease;
18+
top: 0px;
19+
z-index: 10001;
20+
font-size: 9px;
21+
}
22+
23+
.switch-theme .icon.sun {
24+
left: 2.5px;
25+
}
26+
27+
.switch-theme .icon.moon {
28+
left: 20px;
29+
}

0 commit comments

Comments
 (0)