Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] CSS modules #444

Draft
wants to merge 152 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
19b60eb
feat: swc -> vite
hexnickk4997 Jul 12, 2023
2049e87
chore: format fix
hexnickk4997 Jul 12, 2023
ce74b0c
Merge pull request #395 from lidofinance/feature/ui-826-migrate-to-vite
hexnickk4997 Jul 12, 2023
9bb073a
feat: simplified vite config
hexnickk4997 Jul 12, 2023
90d35a3
feat: working simplified external checker
hexnickk4997 Jul 13, 2023
d7d0271
fix: review & format fix
hexnickk4997 Jul 13, 2023
c128442
feat: storybook ^7 update
hexnickk4997 Jul 13, 2023
a0b3f87
feat: swapped storybook webpack to vite
hexnickk4997 Jul 13, 2023
9c44e5a
Merge pull request #396 from lidofinance/feat/simplified-vite-config
hexnickk4997 Jul 13, 2023
9999626
Merge branch 'v4' into feature/ui-829-update-storybook-to-the-latest
hexnickk4997 Jul 13, 2023
173b9e0
Merge pull request #397 from lidofinance/feature/ui-829-update-storyb…
hexnickk4997 Jul 14, 2023
a1edb90
feat: moved accordion to css modules
hexnickk4997 Jul 14, 2023
8a4b4e8
test: fixed issue with css modules
hexnickk4997 Jul 14, 2023
c03d5a2
Merge branch 'v4' into feature/ui-831-migrate-accordion
hexnickk4997 Jul 17, 2023
0ef83ec
feat: scss -> postcss
hexnickk4997 Jul 17, 2023
4f2508e
chore: removed sass dep
hexnickk4997 Jul 17, 2023
bccff30
chore: minor refactoring
hexnickk4997 Jul 17, 2023
ba1a8b1
feat: removed scss breakpoints
hexnickk4997 Jul 17, 2023
8e8a68b
fix: commas
hexnickk4997 Jul 17, 2023
84f8821
feat: added classnames
hexnickk4997 Jul 18, 2023
b7a09bc
Merge pull request #398 from lidofinance/feature/ui-831-migrate-accor…
hexnickk4997 Jul 19, 2023
7cdd63a
feat: migrated address & updated linter
hexnickk4997 Jul 19, 2023
a95cbdf
feat: moved to css modules addressBadge & identicon
hexnickk4997 Jul 19, 2023
7bf05e6
feat: migrate block to css modules
hexnickk4997 Jul 19, 2023
434c22b
Merge pull request #400 from lidofinance/feature/ui-832-migrate-address
hexnickk4997 Jul 19, 2023
afedd4f
Merge pull request #401 from lidofinance/feature/ui-833-migrate-addre…
hexnickk4997 Jul 19, 2023
f09f982
Merge branch 'v4' into feature/ui-834-migrate-block
hexnickk4997 Jul 19, 2023
f09a171
Merge pull request #402 from lidofinance/feature/ui-834-migrate-block
hexnickk4997 Jul 19, 2023
b681a5e
feat: moved loaders to css modules
hexnickk4997 Jul 19, 2023
8c1b7f9
feat: moved chip to css modules
hexnickk4997 Jul 19, 2023
2df7ac1
fix: chip as a clickable button
hexnickk4997 Jul 20, 2023
c871816
Merge pull request #403 from lidofinance/feature/ui-852-migrate-loaders
hexnickk4997 Jul 20, 2023
ae18123
Merge pull request #404 from lidofinance/feature/ui-838-migrate-chip
hexnickk4997 Jul 20, 2023
5895aa5
feat: added linter & formatter for css
hexnickk4997 Jul 20, 2023
29fffff
feat: split css & js linting
hexnickk4997 Jul 20, 2023
a158962
chore: mistype
hexnickk4997 Jul 20, 2023
41794ce
feat: parallel CI checks
hexnickk4997 Jul 20, 2023
27ef3b4
feat: cache node_modules
hexnickk4997 Jul 20, 2023
9d2d512
feat: replaced new component props with builtin type
hexnickk4997 Jul 20, 2023
ae3e90c
feat: moved text to css modules
hexnickk4997 Jul 20, 2023
5ac3804
feat: moved checkbox to css modules
hexnickk4997 Jul 20, 2023
1b93d67
Merge pull request #406 from lidofinance/feature/ui-884-replace-newli…
hexnickk4997 Jul 20, 2023
90830d4
Merge pull request #405 from lidofinance/feature/ui-883-lint-format-css
hexnickk4997 Jul 20, 2023
d23e7cc
Merge branch 'v4' into feature/ui-837-migrate-checkbox
hexnickk4997 Jul 20, 2023
afe7f11
chore: fix formatting
hexnickk4997 Jul 20, 2023
d3c7b52
chore: suppress legacy errors
hexnickk4997 Jul 20, 2023
3d77acc
Merge pull request #407 from lidofinance/feature/ui-837-migrate-checkbox
hexnickk4997 Jul 20, 2023
fc22493
feat: moved container to css modules
hexnickk4997 Jul 20, 2023
ebb5a0d
feat: moved divider to css modules
hexnickk4997 Jul 20, 2023
05db1b5
feat: updated icon storybook types
hexnickk4997 Jul 20, 2023
e7d6ddc
Merge pull request #410 from lidofinance/feature/ui-847-migrate-icons
hexnickk4997 Jul 21, 2023
d215ade
Merge pull request #409 from lidofinance/feature/ui-844-migrate-divider
hexnickk4997 Jul 21, 2023
58ad86c
feat: moved content-theme to css modules
hexnickk4997 Jul 21, 2023
af6d85c
Merge pull request #408 from lidofinance/feature/ui-839-migrate-conta…
hexnickk4997 Jul 21, 2023
45be6ae
Merge pull request #411 from lidofinance/feature/ui-840-migrate-conte…
hexnickk4997 Jul 21, 2023
3fa3ef4
feat: moved Button to css modules
hexnickk4997 Jul 21, 2023
7c6fdc5
fix: checkbox works with normal specifity
hexnickk4997 Jul 21, 2023
4d39ce7
feat: moved cookie theme toggler to css modules
hexnickk4997 Jul 21, 2023
ce858e7
fix: used layers to solve issue with specifity
hexnickk4997 Jul 21, 2023
a76cac8
feat: moved cookies tooltip to css modules
hexnickk4997 Jul 21, 2023
d63f949
fix: added noreferrer
hexnickk4997 Jul 21, 2023
ba2e7e4
feat: moved heading to css modules
hexnickk4997 Jul 21, 2023
09602fd
feat: moved data-table to css modules
hexnickk4997 Jul 24, 2023
e687aab
feat: migrate Input to css modules
hexnickk4997 Jul 24, 2023
266a4bb
fix: label customization with selected content
hexnickk4997 Jul 24, 2023
e4d6979
chore: suppress stylelint
hexnickk4997 Jul 24, 2023
666ebb5
feat: moved lido-logo to css modules
hexnickk4997 Jul 24, 2023
7644658
feat: moved Link to css modules
hexnickk4997 Jul 24, 2023
78f365a
feat: moved Link to css modules
hexnickk4997 Jul 24, 2023
51cc5eb
Revert "feat: moved Link to css modules"
hexnickk4997 Jul 24, 2023
e59b47d
Merge pull request #418 from lidofinance/feature/ui-851-migrate-link
hexnickk4997 Jul 24, 2023
825e4c1
Merge pull request #417 from lidofinance/feature/ui-850-migrate-lido-…
hexnickk4997 Jul 24, 2023
f5bec12
Merge pull request #413 from lidofinance/feature/ui-842-migrate-cooki…
hexnickk4997 Jul 24, 2023
b620bc8
Merge pull request #414 from lidofinance/feature/ui-845-migrate-heading
hexnickk4997 Jul 24, 2023
53649d0
feat: moved main menu to css modules
hexnickk4997 Jul 25, 2023
0445d82
feat: compose icons shared styles
hexnickk4997 Jul 25, 2023
27481ba
Merge pull request #412 from lidofinance/feature/ui-841-migrate-cooki…
hexnickk4997 Jul 25, 2023
752822a
fix: css nesting
hexnickk4997 Jul 25, 2023
56deeac
Merge pull request #415 from lidofinance/feature/ui-843-migrate-data-…
hexnickk4997 Jul 25, 2023
e26d494
feat: added simple css nesting
hexnickk4997 Jul 25, 2023
b15e7c2
chore: removed unused styled components
hexnickk4997 Jul 25, 2023
f710465
Merge pull request #416 from lidofinance/feature/ui-849-migrate-input
hexnickk4997 Jul 25, 2023
2b4cfa7
feat: moved pagination to css modules
hexnickk4997 Jul 25, 2023
4e99bc7
feat: moved popover to css modules
hexnickk4997 Jul 25, 2023
b123639
chore: removed comments
hexnickk4997 Jul 25, 2023
eb28a47
feat: moved section to css modules
hexnickk4997 Jul 25, 2023
96eb161
feat: migrate Select to css modules
hexnickk4997 Jul 25, 2023
5782d58
feat: moved ServicePage to css modules
hexnickk4997 Jul 25, 2023
e49a7e0
feat: moved tooltip to css modules
hexnickk4997 Jul 25, 2023
9fa699a
Merge pull request #420 from lidofinance/feature/ui-855-migrate-pagin…
hexnickk4997 Jul 26, 2023
1215292
Merge pull request #424 from lidofinance/feature/ui-860-migrate-servi…
hexnickk4997 Jul 26, 2023
32921ee
Merge pull request #423 from lidofinance/feature/ui-859-migrate-select
hexnickk4997 Jul 26, 2023
753cb4d
Merge pull request #422 from lidofinance/feature/ui-858-migrate-section
hexnickk4997 Jul 26, 2023
afb827c
Merge pull request #419 from lidofinance/feature/ui-853-migrate-main-…
hexnickk4997 Jul 26, 2023
a1e0d78
Merge pull request #421 from lidofinance/feature/ui-856-migrate-popover
hexnickk4997 Jul 26, 2023
66ff315
feat: migration stack component to css modules
karinamaulitova Jul 27, 2023
45a4b4b
fix: format fix
karinamaulitova Jul 27, 2023
1976ca3
fix: lint css
karinamaulitova Jul 27, 2023
89d14d6
feat: move Modal to css modules
hexnickk4997 Jul 27, 2023
814d405
feat: moved popup-menu to css modules
hexnickk4997 Jul 27, 2023
1729d49
fix: incorrect import
hexnickk4997 Jul 27, 2023
04dc0a4
fix: removed useless check
hexnickk4997 Jul 27, 2023
947ace8
Merge pull request #425 from lidofinance/feature/ui-868-migrate-tooltip
hexnickk4997 Jul 27, 2023
45ab028
feat: moved Toast to css modules
hexnickk4997 Jul 28, 2023
0e600d9
feat: moved ToastPending to css modules
hexnickk4997 Jul 28, 2023
e72f17c
feat: removed box and styled system
hexnickk4997 Jul 28, 2023
96503d9
feat: updated variables to unified format
hexnickk4997 Jul 28, 2023
878ac5d
feat: migrate table to css modules
karinamaulitova Jul 28, 2023
a2bbb2c
fix: formatting
karinamaulitova Jul 28, 2023
a332e15
fix: props destruction, satisfies instead as + delete react import
karinamaulitova Jul 31, 2023
27f7ea0
Merge pull request #426 from lidofinance/feature/ui-861-migrate-stack
hexnickk4997 Aug 1, 2023
869f827
Merge pull request #427 from lidofinance/feature/ui-854-migrate-modal
hexnickk4997 Aug 1, 2023
749e4bb
Merge pull request #428 from lidofinance/feature/ui-857-migrate-popup…
hexnickk4997 Aug 1, 2023
42a5506
Merge pull request #429 from lidofinance/feature/ui-867-migrate-toast
hexnickk4997 Aug 1, 2023
e6004c8
Merge pull request #430 from lidofinance/feature/ui-835-migrate-box
hexnickk4997 Aug 1, 2023
4795f65
Merge pull request #431 from lidofinance/feature/ui-863-migrate-table
hexnickk4997 Aug 1, 2023
3c15d2a
feat: basic working theme on css variables
hexnickk4997 Aug 1, 2023
ef7788c
fix: delete react import + minor fixes
karinamaulitova Aug 1, 2023
7088f43
Merge branch 'v4' into feature/ui-866-migrate-theme
hexnickk4997 Aug 1, 2023
89efd11
fix: incorrect import
hexnickk4997 Aug 1, 2023
7d47e68
feat: font is custom uihead property
hexnickk4997 Aug 1, 2023
2df7ddb
fix: removed extra import
hexnickk4997 Aug 1, 2023
8882e87
Merge pull request #432 from lidofinance/feature/ui-821-delete-react-…
karinamaulitova Aug 1, 2023
1953827
feat: removed unused type
hexnickk4997 Aug 1, 2023
7a3e82f
fix: move props destruction to component declaration
karinamaulitova Aug 1, 2023
0fd54f5
Merge pull request #435 from lidofinance/feature/ui-916-move-props-de…
karinamaulitova Aug 2, 2023
f978a8f
fix: content-theme props
hexnickk4997 Aug 2, 2023
d820828
Merge branch 'v4' into feature/ui-866-migrate-theme
hexnickk4997 Aug 2, 2023
53ce683
Merge branch 'v4' into feature/ui-866-migrate-theme
hexnickk4997 Aug 2, 2023
5ccf804
fix: remove export default
karinamaulitova Aug 2, 2023
231b95e
fix: modalRoot export
karinamaulitova Aug 2, 2023
d0d5be4
fix: use cascade-layers only on prod for one file
hexnickk4997 Aug 2, 2023
f9d5bbe
fix: import icons in stories file
karinamaulitova Aug 2, 2023
96d3f17
Merge pull request #437 from lidofinance/fix/postcss-layers-only-on-prod
hexnickk4997 Aug 2, 2023
476bf5a
Merge pull request #436 from lidofinance/feature/ui-916-delete-defaul…
karinamaulitova Aug 2, 2023
068759a
Merge branch 'v4' into feature/ui-870-migrate-utils
hexnickk4997 Aug 2, 2023
7b38625
Merge pull request #434 from lidofinance/feature/ui-870-migrate-utils
hexnickk4997 Aug 2, 2023
4d6b44c
fix: move withTransition types to a component file
karinamaulitova Aug 2, 2023
d1b6bad
fix: formatting
karinamaulitova Aug 2, 2023
809ba01
Merge pull request #438 from lidofinance/feature/ui-916-import-in-sto…
karinamaulitova Aug 2, 2023
08009e5
Merge pull request #439 from lidofinance/feature/ui-916-move-types-to…
karinamaulitova Aug 2, 2023
ca545ba
fix: replace as with satisfies in stories files
karinamaulitova Aug 2, 2023
dd2deb6
Merge pull request #440 from lidofinance/feature/ui-916-replace-as-wi…
karinamaulitova Aug 2, 2023
e613bd7
fix: add className amd style props where needed
karinamaulitova Aug 3, 2023
851c59e
Merge pull request #441 from lidofinance/feature/ui-916-pass-classnam…
karinamaulitova Aug 3, 2023
b3ceedb
fix: change props type string to ReactNode
karinamaulitova Aug 4, 2023
da10b80
Merge pull request #442 from lidofinance/feature/ui-918-update-typing…
karinamaulitova Aug 4, 2023
07643a9
feat: added RBG variants
hexnickk4997 Aug 4, 2023
a83adc7
feat: added script comments
hexnickk4997 Aug 4, 2023
a003a25
Merge branch 'v4' into feature/ui-866-migrate-theme
hexnickk4997 Aug 4, 2023
5eef49d
chore: format fix
hexnickk4997 Aug 4, 2023
eb82ed6
Merge pull request #433 from lidofinance/feature/ui-866-migrate-theme
hexnickk4997 Aug 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
49 changes: 49 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'plugin:storybook/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'react'],
rules: {
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
ignoreRestSiblings: true,
},
],
},
overrides: [
{
files: ['*.js', '*.jsx', '*.cjs'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
},
},
],
settings: {
react: {
version: 'detect',
},
},
}
57 changes: 0 additions & 57 deletions .eslintrc.json

This file was deleted.

6 changes: 0 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,9 @@ jobs:
- name: Install Dependencies
run: yarn install --immutable

- name: Run lint
run: yarn lint

- name: Build Components
run: yarn build

- name: Run tests
run: yarn test

- name: Publish to NPM
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
170 changes: 161 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,41 @@ permissions:
contents: read
security-events: write

env:
NODE_OPTIONS: --max_old_space_size=4096

jobs:
security:
uses: lidofinance/linters/.github/workflows/security.yml@master

actions:
uses: lidofinance/linters/.github/workflows/actions.yml@master
test-components:

cache-deps:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Set up node
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Restore cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install --immutable

check-types:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: --max_old_space_size=4096
needs: cache-deps
steps:
- name: Checkout repo
uses: actions/checkout@v3
Expand All @@ -27,19 +53,145 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'

- name: Restore cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install --immutable

- name: Check typescript
- name: Check types
run: yarn types

- name: Run lint
run: yarn lint
check-format:
runs-on: ubuntu-latest
needs: cache-deps
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Set up node
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Restore cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}

- name: Build Components
run: yarn build
- name: Install dependencies
run: yarn install --immutable

- name: Check format
run: yarn format

lint-js:
runs-on: ubuntu-latest
needs: cache-deps
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Set up node
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Restore cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install --immutable

- name: Lint JS/TS
run: yarn lint:js

lint-css:
runs-on: ubuntu-latest
needs: cache-deps
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Set up node
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Restore cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install --immutable

- name: Lint CSS
run: yarn lint:css

run-tests:
runs-on: ubuntu-latest
needs: cache-deps
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Set up node
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Restore cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install --immutable

- name: Run tests
run: yarn test

demo-build:
runs-on: ubuntu-latest
needs: cache-deps
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Set up node
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Restore cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install --immutable

- name: Try to build
run: yarn build
5 changes: 0 additions & 5 deletions .nova/Configuration.json

This file was deleted.

4 changes: 2 additions & 2 deletions .releaserc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
branches: [
{name: 'main'},
{name: 'next', channel: 'next', prerelease: true},
{ name: 'main' },
{ name: 'next', channel: 'next', prerelease: true },
],
plugins: [
['@semantic-release/commit-analyzer', { preset: 'conventionalcommits' }],
Expand Down
10 changes: 5 additions & 5 deletions .storybook/components/WithThemeProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BaseDecorators } from '@storybook/addons'
import '@lidofinance/theme'
import '../../packages/theme'
import { createGlobalStyle } from 'styled-components'
import { CookieThemeProvider } from '@lidofinance/theme'
import { CookieThemeProvider } from '../../packages/theme'
import { Decorator } from '@storybook/react'

const GlobalStyle = createGlobalStyle`
body {
Expand All @@ -14,9 +14,9 @@ const GlobalStyle = createGlobalStyle`
}
`

export const WithThemeProvider: BaseDecorators<JSX.Element>[number] = (
export const WithThemeProvider: Decorator<any> = (
Story,
{ args }
{ args },
): JSX.Element => {
return (
<CookieThemeProvider
Expand Down
Loading
Loading