Skip to content

Commit

Permalink
ui-kit: refactoring. work version
Browse files Browse the repository at this point in the history
Signed-off-by: Viktor Login <[email protected]>
  • Loading branch information
batazor committed Dec 2, 2024
1 parent 192a761 commit 2152ad6
Show file tree
Hide file tree
Showing 6 changed files with 753 additions and 694 deletions.
10 changes: 6 additions & 4 deletions boundaries/platform/ui-kit/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { StorybookConfig } from '@storybook/react-vite'

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],

addons: [
'@storybook/addon-links',
Expand All @@ -15,15 +15,17 @@ const config: StorybookConfig = {
'@storybook/addon-jest',
],

core: {
builder: '@storybook/builder-vite',
},

framework: {
name: '@storybook/react-vite',
options: {}
},

features: {},
typescript: {
reactDocgen: 'react-docgen-typescript'
},
typescript: {},

docs: {}
}
Expand Down
3 changes: 3 additions & 0 deletions boundaries/platform/ui-kit/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<script>
window.global = window;
</script>
16 changes: 8 additions & 8 deletions boundaries/platform/ui-kit/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,39 @@ import '@fontsource/roboto/500.css'
import '@fontsource/roboto/700.css'
import '@fontsource/caveat'
import '@fontsource/material-icons'
import { CssVarsProvider } from '@mui/material/styles'
import { ThemeProvider } from '@mui/material/styles'
import InitColorSchemeScript from '@mui/material/InitColorSchemeScript'
import { ThemeProvider } from 'next-themes'
import { ThemeProvider as ThemeProviderNext } from 'next-themes'
import { LocalizationProvider } from '@mui/x-date-pickers'
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'

import '../src/theme/styles.css'
// import '../src/theme/styles.css'
import { theme } from '../src/theme/theme'

const preview: Preview = {
decorators: [
(Story) => {
return (
// @ts-ignore
(<ThemeProvider
(<ThemeProviderNext
enableSystem
attribute="class"
defaultTheme={'light'}
>
<CssVarsProvider theme={theme}>
<ThemeProvider theme={theme}>
<InitColorSchemeScript />
<LocalizationProvider dateAdapter={AdapterDayjs}>
<Provider>
<Story />
</Provider>
</LocalizationProvider>
</CssVarsProvider>
</ThemeProvider>)
</ThemeProvider>
</ThemeProviderNext>)
);
},
],

tags: ['autodocs']
tags: []
}

export default preview
43 changes: 25 additions & 18 deletions boundaries/platform/ui-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"keywords": [
"darkmode",
"switch"
"ui-kit"
],
"author": {
"name": "@batazor",
Expand All @@ -43,44 +43,51 @@
"*.css"
],
"dependencies": {
"@fontsource/caveat": "^5.1.0",
"@fontsource/material-icons": "^5.1.0",
"@fontsource/roboto": "^5.1.0",
"@heroicons/react": "^2.2.0",
"@mui/icons-material": "^6.1.9",
"@mui/material": "^6.1.9",
"@mui/x-date-pickers": "8.0.0-alpha.2",
"@storybook/builder-vite": "8.5.0-alpha.14",
"@tailwindcss/postcss": "4.0.0-beta.4",
"@tailwindcss/typography": "^0.5.15",
"@types/react": "^18.3.12",
"algoliasearch": "^5.15.0",
"autoprefixer": "^10.4.20",
"date-fns": "^4.1.0",
"dayjs": "^1.11.13",
"export-to-csv": "^1.4.0",
"glob": "^11.0.0",
"material-react-table": "^3.0.1",
"next": "^15.0.3",
"next-themes": "^0.4.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "19.0.0-rc.1",
"react-dom": "19.0.0-rc.1",
"react-instantsearch": "^7.13.8",
"react-wrap-balancer": "^1.1.1",
"styles": "link:@mui/material/styles",
"tailwindcss": "^3.4.15",
"tailwindcss": "4.0.0-beta.4",
"vite-plugin-dts": "4.3.0",
"vite-plugin-lib-inject-css": "^2.1.1"
},
"devDependencies": {
"@chromatic-com/storybook": "^3.2.2",
"@storybook/addon-a11y": "^8.4.6",
"@storybook/addon-actions": "^8.4.6",
"@storybook/addon-controls": "^8.4.6",
"@storybook/addon-a11y": "8.5.0-alpha.14",
"@storybook/addon-actions": "8.5.0-alpha.14",
"@storybook/addon-controls": "8.5.0-alpha.14",
"@storybook/addon-coverage": "^1.0.4",
"@storybook/addon-docs": "^8.4.6",
"@storybook/addon-essentials": "^8.4.6",
"@storybook/addon-interactions": "^8.4.6",
"@storybook/addon-jest": "^8.4.6",
"@storybook/addon-links": "^8.4.6",
"@storybook/addon-themes": "^8.4.6",
"@storybook/blocks": "^8.4.6",
"@storybook/react": "^8.4.6",
"@storybook/react-vite": "^8.4.6",
"@storybook/test": "^8.4.6",
"@storybook/addon-docs": "8.5.0-alpha.14",
"@storybook/addon-essentials": "8.5.0-alpha.14",
"@storybook/addon-interactions": "8.5.0-alpha.14",
"@storybook/addon-jest": "8.5.0-alpha.14",
"@storybook/addon-links": "8.5.0-alpha.14",
"@storybook/addon-themes": "8.5.0-alpha.14",
"@storybook/blocks": "8.5.0-alpha.14",
"@storybook/react": "8.5.0-alpha.14",
"@storybook/react-vite": "8.5.0-alpha.14",
"@storybook/test": "8.5.0-alpha.14",
"@typescript-eslint/eslint-plugin": "^8.16.0",
"@typescript-eslint/parser": "^8.16.0",
"@vitejs/plugin-react-swc": "^3.7.2",
Expand All @@ -92,7 +99,7 @@
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"postcss-loader": "^8.1.1",
"storybook": "^8.4.6",
"storybook": "8.5.0-alpha.14",
"style-loader": "^4.0.0",
"typescript": "^5.7.2",
"vite": "^6.0.1"
Expand Down
Loading

0 comments on commit 2152ad6

Please sign in to comment.