Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 0 additions & 5 deletions apps/docs/app/ThemeWrapperDynamic.tsx

This file was deleted.

34 changes: 19 additions & 15 deletions apps/docs/app/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import { SlackIcon } from '../components/internal/icons/SlackIcon';
import Image from 'next/image';
import { Search } from 'nextra/components'
import { inter } from '../src/fonts';
import { ThemeWrapper } from './ThemeWrapperDynamic';
import { theme } from "../components/theme";
import { ThemeProvider } from "@mui/material";
import { AppRouterCacheProvider } from '@mui/material-nextjs/v15-appRouter';

/*
<>
Expand Down Expand Up @@ -128,20 +130,22 @@ export default async function RootLayout({ children }) {
{/* Your additional tags should be passed as `children` of `<Head>` element */}
</Head>
<body className={`${inter.variable} font-sans`}>
<ThemeWrapper>
<Layout
search={<Search />}
navbar={navbar}
pageMap={await getPageMap()}
docsRepositoryBase="https://github.com/enterwell/ui/tree/stage/apps/docs"
editLink="Edit this page on GitHub"
sidebar={{ defaultMenuCollapseLevel: 1 }}
footer={footer}
// ...Your additional theme config options
>
{children}
</Layout>
</ThemeWrapper>
<AppRouterCacheProvider options={{ key: 'css', enableCssLayer: true }}>
<ThemeProvider theme={theme}>
<Layout
search={<Search />}
navbar={navbar}
pageMap={await getPageMap()}
docsRepositoryBase="https://github.com/enterwell/ui/tree/stage/apps/docs"
editLink="Edit this page on GitHub"
sidebar={{ defaultMenuCollapseLevel: 1 }}
footer={footer}
// ...Your additional theme config options
>
{children}
</Layout>
</ThemeProvider>
</AppRouterCacheProvider>
</body>
</html>
)
Expand Down
8 changes: 5 additions & 3 deletions apps/docs/components/ExampleUseDataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,19 @@ export function ExampleUseDataGrid() {
};
};

const dataGrid = useDataGrid({
const { props: dataGridProps, refreshTable } = useDataGrid({
tableId: 'example-use-data-grid',
columns,
onPage: handleOnPage
});

useEffect(() => {
dataGrid.refreshTable();
refreshTable();
}, []);

return (
<DataGridPro autoHeight {...dataGrid.props} />
<div style={{ display: 'flex', flexDirection: 'column' }}>
<DataGridPro {...dataGridProps} />
</div>
);
}
3 changes: 2 additions & 1 deletion apps/docs/components/ExampleUseDebounce.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { useState } from 'react';
import { useDebounce } from '@enterwell/react-hooks';
import { Button } from '@mui/material';

export function ExampleUseDebounce() {
const [value, setValue] = useState(0);
Expand All @@ -13,7 +14,7 @@ export function ExampleUseDebounce() {
<div>
<div>Value: {value}</div>
<div>Value debounced (1s): {valueDebounced}</div>
<button onClick={() => setValue((curr) => curr + 1)}>Increment</button>
<Button variant='outlined' onClick={() => setValue((curr) => curr + 1)}>Increment</Button>
</div>
);
}
6 changes: 4 additions & 2 deletions apps/docs/components/ExampleUseMutationObserver.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ export function ExampleUseMutationObserver() {
document.querySelector('html'),
(mutations) => {
setMutations((curr) => [...curr, ...mutations]);
}, {
},
{
attributes: true,
characterData: true,
childList: true,
});
}
);
// @highlight-end

return (
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/components/docs/NpmPackageCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type NpmPackageCardProps = {

export function NpmPackageCard({ name, version }: NpmPackageCardProps) {
return (
<Card className="rounded-lg border border-neutral-300 dark:border-neutral-700 bg-card shadow-xl">
<Card>
<CardActionArea href={`https://www.npmjs.com/package/${name}`}>
<div className="px-4 py-2 flex items-center justify-between gap-4 w-full">
<span className="flex items-center gap-2">
Expand Down
29 changes: 0 additions & 29 deletions apps/docs/components/internal/ThemeWrapper.tsx

This file was deleted.

14 changes: 5 additions & 9 deletions apps/docs/components/theme.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { createTheme } from "@mui/material";
import { Roboto } from 'next/font/google';

Expand All @@ -7,15 +9,9 @@ const roboto = Roboto({
display: 'swap',
});

export const theme = (mode: string | undefined) => createTheme({
palette: {
mode: mode === 'light' ? 'light' : 'dark',
primary: {
main: '#eeeeee',
},
secondary: {
main: '#b5b5b5',
}
export const theme = createTheme({
colorSchemes: {
dark: true
Comment thread
AleksandarDev marked this conversation as resolved.
},
typography: {
fontFamily: roboto.style.fontFamily,
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/content/about.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Callout } from 'nextra/components';

<Callout type="warning">Docs for this section is under construction.</Callout>
> [!WARNING]
>
> Docs for this section is under construction.

# About
1 change: 0 additions & 1 deletion apps/docs/content/react-hooks/about.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Callout } from 'nextra/components';
import { PackageDescription } from '../../components/docs/PackageDocs';
import PackageMetadata from '@enterwell/react-hooks/package';

Expand Down
6 changes: 3 additions & 3 deletions apps/docs/content/react-hooks/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Callout } from 'nextra/components';

<Callout type="warning">Docs for this section is under construction.</Callout>
> [!WARNING]
>
> Docs for this section is under construction.

# Introduction
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
import { Callout } from 'nextra/components';
import { PackagePeerDependencies } from '../../../components/docs/PackageDocs';
import packageMetadata from '@enterwell/react-hooks/package';

# Installation

If you don't have pnpm installed, you can install it by running the following command:

```bash
npm install -g pnpm
```

Run the following command to install the package:

```bash
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/content/react-hooks/hooks.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Callout } from 'nextra/components';

<Callout type="warning">Docs for this section is under construction.</Callout>
> [!WARNING]
>
> Docs for this section is under construction.

# Hooks
1 change: 0 additions & 1 deletion apps/docs/content/react-mui-hooks/about.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Callout } from 'nextra/components';
import { PackageDescription } from '../../components/docs/PackageDocs';
import PackageMetadata from '@enterwell/react-mui-hooks/package';

Expand Down
6 changes: 3 additions & 3 deletions apps/docs/content/react-mui-hooks/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Callout } from 'nextra/components';

<Callout type="warning">Docs for this section is under construction.</Callout>
> [!WARNING]
>
> Docs for this section is under construction.

# Introduction
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
import { Callout } from 'nextra/components';
import { PackagePeerDependencies } from '../../../components/docs/PackageDocs';
import packageMetadata from '@enterwell/react-mui-hooks/package';

# Installation

If you don't have pnpm installed, you can install it by running the following command:

```bash
npm install -g pnpm
```

Run the following command to install the package:

```bash
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/content/react-mui-hooks/hooks.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Callout } from 'nextra/components';

<Callout type="warning">Docs for this section is under construction.</Callout>
> [!WARNING]
>
> Docs for this section is under construction.

# Hooks
1 change: 0 additions & 1 deletion apps/docs/content/react-ui/about.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Callout } from 'nextra/components';
import { PackageDescription } from '../../components/docs/PackageDocs';
import PackageMetadata from '@enterwell/react-ui/package';

Expand Down
6 changes: 3 additions & 3 deletions apps/docs/content/react-ui/components.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { Callout } from 'nextra/components';

<Callout type="warning">Docs for this section is under construction.</Callout>
> [!WARNING]
>
> Docs for this section is under construction.
6 changes: 3 additions & 3 deletions apps/docs/content/react-ui/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Callout } from 'nextra/components';

<Callout type="warning">Docs for this section is under construction.</Callout>
> [!WARNING]
>
> Docs for this section is under construction.

# Introduction

Expand Down
7 changes: 0 additions & 7 deletions apps/docs/content/react-ui/getting-started/installation.mdx
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
import { Callout } from 'nextra/components';
import { PackagePeerDependencies } from '../../../components/docs/PackageDocs';
import packageMetadata from '@enterwell/react-ui/package';

# Installation

If you don't have pnpm installed, you can install it by running the following command:

```bash
npm install -g pnpm
```

Run the following command to install the package:

```bash
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const withNextra = nextra({
]
},
defaultShowCopyCode: true,
})
});

/** @type {import('next').NextConfig} */
const nextConfig = {
Expand Down
31 changes: 16 additions & 15 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,32 @@
"@enterwell/react-ui": "workspace:*",
"@mdx-js/mdx": "3.1.0",
"@mdx-js/react": "3.1.0",
"@mui/icons-material": "6.4.7",
"@mui/lab": "6.0.0-beta.30",
"@mui/material": "6.4.3",
"@mui/system": "6.4.3",
"@mui/x-data-grid-pro": "7.26.0",
"@mui/x-date-pickers": "7.27.3",
"@mui/x-date-pickers-pro": "7.27.3",
"@mui/icons-material": "7.0.1",
"@mui/lab": "7.0.0-beta.10",
"@mui/material": "7.0.1",
"@mui/material-nextjs": "7.0.0",
"@mui/system": "7.0.1",
"@mui/x-data-grid-pro": "7.28.2",
"@mui/x-date-pickers": "7.28.2",
"@mui/x-date-pickers-pro": "7.28.2",
"classix": "2.2.2",
"comment-parser": "1.4.1",
"next": "15.2.4",
"nextra": "4.2.17",
"nextra": "4.3.0-alpha.3",
"nextra-theme-docs": "4.2.17",
"react": "19.0.0",
"react-dom": "19.0.0",
"react": "19.1.0",
"react-dom": "19.1.0",
"tailwindcss-animate": "1.0.7"
},
"devDependencies": {
"@tailwindcss/postcss": "4.0.17",
"@types/node": "22.13.16",
"@types/react": "19.0.10",
"@types/react-dom": "19.0.4",
"@next/eslint-plugin-next": "15.2.4",
"@tailwindcss/postcss": "4.1.1",
"@types/node": "22.13.17",
"@types/react": "19.1.0",
"@types/react-dom": "19.1.1",
"pagefind": "1.3.0",
"postcss": "8.5.3",
"tailwindcss": "4.0.17",
"tailwindcss": "4.1.1",
"typescript": "5.8.2",
"unist-builder": "4.0.0",
"unist-util-visit": "5.0.0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"devDependencies": {
"@turbo/gen": "2.4.4",
"eslint": "8.57.1",
"eslint": "9.23.0",
"just-camel-case": "6.2.0",
"just-pascal-case": "3.2.0",
"tsconfig": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-custom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.0.0",
"private": true,
"devDependencies": {
"@vercel/style-guide": "5.2.0",
"eslint-config-turbo": "1.13.4"
"@vercel/style-guide": "6.0.0",
"eslint-config-turbo": "2.4.4"
}
}
4 changes: 4 additions & 0 deletions packages/react-hooks/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

_NOTE: This is an automatically generated file. Do not modify contents of this file manually._

## [0.6.0] - 2025-04-01
### Changed
- Updated packages

## [0.5.0] - 2024-01-08
### Added
- [useControllableState] useControllableState hook
Expand Down
Loading