Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
delneg committed Nov 17, 2023
0 parents commit 4df95c4
Show file tree
Hide file tree
Showing 111 changed files with 21,898 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Deploy storybook to GitHub Pages
on:
push:
branches:
- master
jobs:
build:
name: Test
runs-on: ubuntu-latest
permissions: write-all
environment: production

steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3

- name: 'Extend memory'
run: |
export NODE_OPTIONS="--max_old_space_size=16384"
- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Run package install
uses: borales/actions-yarn@v4
with:
cmd: install

- name: Run build
uses: borales/actions-yarn@v4
with:
cmd: build-storybook

- name: Deploy landing to Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: storybook-static
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

.parcel-cache/
coverage/
dist/*
build/*
node_modules/
storybook-static/
*.log

# OS generated files
.DS_Store
.DS_Store?
._*
.Trashes
ehthumbs.db
Thumbs.db

# production
/build

# misc
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
.idea
7 changes: 7 additions & 0 deletions .parcelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "@parcel/config-default",
"optimizers": { "*.svg": [], "*.css": ["@parcel/optimizer-cssnano"] },
"validators": {
"*.{ts,tsx}": []
}
}
7 changes: 7 additions & 0 deletions .postcssrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"plugins": {
"postcss-import": true,
"tailwindcss": true,
"postcss-nested": true
}
}
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": false,
"tabWidth": 2,
"printWidth": 100,
"singleQuote": true,
"trailingComma": "all",
"jsxSingleQuote": true,
"bracketSpacing": true
}
44 changes: 44 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
const path = require('path')

module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-a11y',
{
name: '@storybook/preset-scss',
options: {
cssLoaderOptions: {
modules: false,
},
},
},
{
name: '@storybook/addon-postcss',
options: {
postcssLoaderOptions: {
implementation: require('postcss'),
},
},
},
],
webpackFinal: async (config) => {
config.module.rules.push({
test: /\.scss$/,
use: [
{
loader: 'postcss-loader',
options: {
ident: 'postcss',
plugins: [require('tailwindcss'), require('autoprefixer')],
},
},
],
include: path.resolve(__dirname, '../'),
})
return config
},
framework: '@storybook/react',
}
11 changes: 11 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
}

import '../src/index.scss'
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Building and running on localhost

First install dependencies:

```sh
yarn install
```

To run storybook:

```sh
yarn storybook
```

94 changes: 94 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"name": "swisstronik-js-components",
"version": "1.0.0",
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"keywords": [],
"author": "",
"scripts": {
"clean": "rimraf ./dist",
"prebuild": "run-s clean",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
},
"dependencies": {
"@headlessui/react": "^1.4.2",
"@parcel/optimizer-cssnano": "^2.4.1",
"@storybook/addon-docs": "^6.4.22",
"axios": "^0.24.0",
"date-fns": "^2.28.0",
"dayjs": "^1.10.7",
"framer-motion": "^5.5.5",
"lottie-web": "^5.8.1",
"postcss-loader": "~3.0.0",
"rc-slider": "^10.0.0",
"react": "^17.0.2",
"react-date-range": "^1.4.0",
"react-dom": "^17.0.2",
"react-loading-skeleton": "^3.3.1",
"react-markdown": "^8.0.0",
"react-popper-tooltip": "^4.3.1",
"react-redux": "^7.2.6",
"react-router": "^5.3.1",
"react-router-dom": "5",
"react-router-hash-link": "^2.4.3",
"react-swipeable": "^6.2.0",
"react-table": "^7.8.0",
"redux": "^4.1.2",
"redux-saga": "^1.1.3",
"tailwindcss-interaction-variants": "^5.0.0"
},
"devDependencies": {
"@babel/core": "^7.17.9",
"@parcel/compressor-brotli": "^2.0.1",
"@parcel/compressor-gzip": "^2.0.1",
"@parcel/config-default": "^2.0.1",
"@parcel/transformer-image": "^2.0.1",
"@parcel/transformer-sass": "^2.0.1",
"@parcel/validator-typescript": "^2.0.1",
"@storybook/addon-a11y": "^6.4.22",
"@storybook/addon-actions": "^6.4.22",
"@storybook/addon-essentials": "^6.4.22",
"@storybook/addon-interactions": "^6.4.22",
"@storybook/addon-links": "^6.4.22",
"@storybook/addon-postcss": "^2.0.0",
"@storybook/preset-scss": "^1.0.3",
"@storybook/react": "^6.4.22",
"@storybook/testing-library": "^0.0.11",
"@tailwindcss/aspect-ratio": "^0.3.0",
"@tailwindcss/typography": "^0.4.1",
"@types/node": "^16.11.9",
"@types/react": "^17.0.35",
"@types/react-dom": "^17.0.11",
"@types/react-redux": "^7.1.20",
"@types/react-router-dom": "^5.3.2",
"@types/react-router-hash-link": "^2.4.5",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"babel-loader": "^8.2.5",
"chromatic": "^6.5.4",
"css-loader": "5.2.7",
"cssnano": "^5.1.7",
"npm-run-all": "^4.1.5",
"parcel": "^2.0.1",
"postcss": "^8",
"postcss-import": "^14.0.2",
"postcss-nested": "^5.0.6",
"rimraf": "^3.0.2",
"sass": "^1.50.1",
"sass-loader": "10.1.1",
"storybook-addon-sass-postcss": "^0.1.1",
"style-loader": "2.0.0",
"tailwindcss": "npm:@tailwindcss/postcss7-compat",
"typescript": "^4.5.2"
}
}
4 changes: 4 additions & 0 deletions src/assets/icons/arrow-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/arrow-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/icons/bell.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/assets/icons/bookmark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/assets/icons/bookmark_light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/chevron-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/chevron.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/icons/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/icons/discord.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/icons/download.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/assets/icons/medium.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/icons/menu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/assets/icons/message.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/assets/icons/message_light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/moon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4df95c4

Please sign in to comment.