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

feat: 1.10.0 #7

Merged
merged 31 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a05b753
wip: form component
bouassaba Oct 30, 2024
7064685
chore: set version to 1.10.0
bouassaba Oct 30, 2024
e65ac67
wip: section-error, section-placeholder, refactor section-spinner
bouassaba Oct 31, 2024
a875cd6
fix: adjust switch-card story
bouassaba Oct 31, 2024
8ba72f8
fix: reference @koupr/ui typings inside Storybook correctly
bouassaba Nov 1, 2024
df8e787
ci: trying to fix linter errors
bouassaba Nov 1, 2024
293ffe9
ci: trying to fix linter errors
bouassaba Nov 1, 2024
3a30d9c
ci: trying to fix linter errors
bouassaba Nov 1, 2024
038173c
ci: trying to fix linter errors
bouassaba Nov 1, 2024
0afc498
ci: trying to fix linter errors
bouassaba Nov 1, 2024
12198b2
ci: trying to fix linter errors
bouassaba Nov 1, 2024
105bfc5
ci: trying to fix linter errors
bouassaba Nov 1, 2024
d40601f
ci: optimize GitHub action
bouassaba Nov 1, 2024
09ff58b
ci: revert changes in GitHub action
bouassaba Nov 1, 2024
9cd0a31
ci: revert changes in GitHub action
bouassaba Nov 1, 2024
606d1ea
ci: more complete fixes in GitHub action
bouassaba Nov 1, 2024
652b36a
ci: title case title names in GitHub action
bouassaba Nov 1, 2024
34fa861
refactor: GitHub action name
bouassaba Nov 1, 2024
0c6dc9c
wip: data-table basic layout
bouassaba Nov 1, 2024
2d614eb
wip: more on data-table component
bouassaba Nov 2, 2024
3ff5124
refactor: remove unused import
bouassaba Nov 2, 2024
65b6b24
wip: add actions to data-table
bouassaba Nov 3, 2024
7d9fcc9
fix: add missing keys
bouassaba Nov 3, 2024
77a7481
refactor: add sample onClick handlers
bouassaba Nov 3, 2024
17dc54e
wip: updated dependencies, fix issues
bouassaba Nov 4, 2024
f674faf
fix: suppress use client warnings when building Storybook
bouassaba Nov 4, 2024
c0dacf1
fix: add replace-exports.js to mitigate Parcel bug
bouassaba Nov 4, 2024
f6cf84d
fix: ESLint ignore eslint.config.js
bouassaba Nov 4, 2024
47d829a
fix: set engines to node 22.x
bouassaba Nov 4, 2024
7ba0a43
ci: use node 22
bouassaba Nov 4, 2024
aa24f29
feat: add new icons
bouassaba Nov 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{js,json,yml}]
charset = utf-8
indent_style = space
indent_size = 2
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

23 changes: 0 additions & 23 deletions .eslintrc.cjs

This file was deleted.

48 changes: 28 additions & 20 deletions .github/workflows/check-on-pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint and build
name: Lint and Build

on:
pull_request:
Expand All @@ -9,69 +9,77 @@ on:
- '!README.md'

jobs:
lint:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Node.js
- name: Set Up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'

- name: Install packages
- name: Install Packages
run: npm i

- name: Run TypeScript Compiler
run: npm run tsc

- name: Run ESLint
run: npm run lint
- name: Build
run: npm run build
permissions:
contents: read
pull-requests: read
checks: write

build:
build-storybook:
runs-on: ubuntu-latest
needs: lint
needs: build
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Node.js
- name: Set Up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'

- name: Install packages
- name: Install Packages
run: npm i

- name: Build
run: npm run build

- name: Build Storybook
run: npm run build-storybook
permissions:
contents: read
pull-requests: read
checks: write

build-storybook:
lint:
runs-on: ubuntu-latest
needs: build
needs:
- build
- build-storybook
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Node.js
- name: Set Up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'

- name: Install packages
run: npm i

- name: Build
run: npm run build-storybook
run: npm run build

- name: Run TypeScript Compiler
run: npm run tsc

- name: Run ESLint
run: npm run lint
permissions:
contents: read
pull-requests: read
Expand Down
12 changes: 12 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ const config: StorybookConfig = {
plugins: [tailwindcss(), autoprefixer()],
},
},
build: {
rollupOptions: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
onwarn(warning: any, warn: any) {
// Suppress: Module level directives cause errors when bundled, "use client"
if (warning.code === 'MODULE_LEVEL_DIRECTIVE') {
return
}
warn(warning)
},
},
},
})
newConfig.resolve.alias['@koupr/ui'] = path.resolve(
__dirname,
Expand Down
1 change: 0 additions & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ChakraProvider } from '@chakra-ui/react'
// @ts-expect-error ignored
import { theme } from '@koupr/ui'
import type { Preview } from '@storybook/react'
import { MemoryRouter } from 'react-router-dom'
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
npm i @koupr/ui
```

Koupr UI is meant to work on top of Chakra UI: https://v2.chakra-ui.com/getting-started
Koupr UI is meant to work on top of Chakra UI: https://v2.chakra-ui.com/getting-started

## Usage

```tsx
import { createRoot } from 'react-dom/client'
import { theme } from '@koupr/ui'
import App from "./App"
import { createRoot } from 'react-dom/client'
import App from './App'

createRoot(document.getElementById('root') as HTMLElement).render(
<ChakraProvider theme={theme}>
<App/>
<App />
</ChakraProvider>,
)
```
Expand Down
40 changes: 40 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
import react from 'eslint-plugin-react'
import storybook from 'eslint-plugin-storybook'
import globals from 'globals'
import ts from 'typescript-eslint'

export default [
...ts.configs.recommended,
eslintPluginPrettierRecommended,
...storybook.configs['flat/recommended'],
{
files: ['src/**/*.{ts,tsx}'],
},
{
plugins: {
react,
},
},
{
languageOptions: {
globals: globals.browser,
},
},
{
rules: {
'react/react-in-jsx-scope': 'off',
'prettier/prettier': 'error',
},
},
{
ignores: [
'*.cjs',
'dist',
'.parcel-cache',
'tailwind.config.js',
'postcss.config.js',
'replace-exports.js',
],
},
]
Loading