Skip to content

Commit

Permalink
Merge pull request #35 from raisiqueira/chore/update-nx
Browse files Browse the repository at this point in the history
chore: housekeeping
  • Loading branch information
raisiqueira authored Jul 1, 2023
2 parents 2830270 + 72ddd94 commit 5050fa1
Show file tree
Hide file tree
Showing 28 changed files with 10,887 additions and 12,526 deletions.
42 changes: 33 additions & 9 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,59 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"ignorePatterns": [
"**/*"
],
"plugins": [
"@nx"
],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"files": [
"*.ts",
"*.tsx",
"*.js",
"*.jsx"
],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
"onlyDependOnLibsWithTags": [
"*"
]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"files": [
"*.ts",
"*.tsx"
],
"extends": [
"plugin:@nx/typescript"
],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"files": [
"*.js",
"*.jsx"
],
"extends": [
"plugin:@nx/javascript"
],
"rules": {}
}
],
"extends": [
"plugin:storybook/recommended"
]
}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['16.x']
node: ['16', '18']
os: [ubuntu-latest]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
18
7 changes: 7 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,11 @@ module.exports = {
// webpackFinal: async (config, { configType }) => {
// return config;
// },
framework: {
name: '@storybook/react-webpack5',
options: {},
},
docs: {
autodocs: false,
},
};
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ The Storybook will be available on the localhost:4400 and refresh when you chang

### Running unit tests

Run `nx test headless-stepper` to execute the unit tests via [Jest](https://jestjs.io).
Run `nx test headless-stepper` to execute the unit tests via [Vitest](https://vitest.dev).

## Sponsors

Expand Down
32 changes: 32 additions & 0 deletions docs/components/CustomSandBox/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import {
SandpackProvider,
SandpackLayout,
SandpackPreview,
SandpackCodeEditor,
SandpackFileExplorer,
} from '@codesandbox/sandpack-react';

import { type SandpackProviderProps } from '@codesandbox/sandpack-react';

export const CustomSandBox = ({
files,
options,
customSetup,
...rest
}: SandpackProviderProps) => {
return (
<SandpackProvider
template="react-ts"
files={files}
options={options}
customSetup={customSetup}
{...rest}
>
<SandpackLayout>
<SandpackFileExplorer />
<SandpackCodeEditor showTabs showLineNumbers />
</SandpackLayout>
<SandpackPreview style={{ height: 400 }} showNavigator />
</SandpackProvider>
);
};
10 changes: 2 additions & 8 deletions docs/components/examples/Basic.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { Sandpack } from '@codesandbox/sandpack-react';
import '@codesandbox/sandpack-react/dist/index.css';
import { CustomSandBox } from '../CustomSandBox';

const Sandbox = () => {
const code = `
Expand Down Expand Up @@ -52,16 +51,11 @@ const Sandbox = () => {
);
}`;
return (
<Sandpack
template="react-ts"
<CustomSandBox
customSetup={{ dependencies: { 'headless-stepper': 'next' } }}
files={{
'/App.tsx': code,
}}
options={{
showNavigator: true,
showTabs: true,
}}
/>
);
};
Expand Down
10 changes: 2 additions & 8 deletions docs/components/examples/StepperBasic.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { Sandpack } from '@codesandbox/sandpack-react';
import '@codesandbox/sandpack-react/dist/index.css';
import { CustomSandBox } from '../CustomSandBox';

const Sandbox = () => {
const code = `
Expand All @@ -24,16 +23,11 @@ export default MyAwesomeStepper;
`;

return (
<Sandpack
template="react-ts"
<CustomSandBox
customSetup={{ dependencies: { 'headless-stepper': 'next' } }}
files={{
'/App.tsx': code,
}}
options={{
showNavigator: true,
showTabs: true,
}}
/>
);
};
Expand Down
11 changes: 2 additions & 9 deletions docs/components/examples/StepperWithAsProps.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { Sandpack } from '@codesandbox/sandpack-react';
import '@codesandbox/sandpack-react/dist/index.css';
import { CustomSandBox } from '../CustomSandBox';

const Sandbox = () => {
const code = `
Expand Down Expand Up @@ -35,8 +34,7 @@ const Sandbox = () => {
`;

return (
<Sandpack
template="react-ts"
<CustomSandBox
customSetup={{
dependencies: {
'headless-stepper': 'next',
Expand All @@ -48,11 +46,6 @@ const Sandbox = () => {
files={{
'/App.tsx': code,
}}
options={{
showNavigator: true,
showTabs: true,
showLineNumbers: true,
}}
/>
);
};
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@codesandbox/sandpack-react": "^0.15.0",
"@codesandbox/sandpack-react": "^2.6.9",
"next": "13.2.4",
"next-seo": "^5.1.0",
"nextra": "^2.2.20",
Expand Down
41 changes: 21 additions & 20 deletions docs/pages/getting-started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,29 @@
title: Installation
---

import { Callout } from 'nextra-theme-docs';
import { Callout, Tabs, Tab } from 'nextra-theme-docs';

# Installation

You can install using [NPM](https://www.npmjs.com/), [Yarn](https://yarnpkg.com/en/docs/install) or [PNPM](https://pnpm.io/).

Headless Stepper is compatible with **React 16.8.0** and up.

## NPM

```bash
npm install --save headless-stepper
```

## Yarn

```bash
yarn add headless-stepper
```

## PNPM

```bash
pnpm install --save headless-stepper
```
Headless Stepper is compatible with **React 16.8.0** and up

<Tabs items={['npm', 'yarn', 'pnpm']}>
<Tab>
```bash
npm run dev
```
</Tab>
<Tab>
```bash
yarn dev
```
</Tab>

<Tab>
```bash
pnpm dev
```
</Tab>
</Tabs>
2 changes: 1 addition & 1 deletion docs/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// const { createGlobPatternsForDependencies } = require('@nrwl/react/tailwind');
// const { createGlobPatternsForDependencies } = require('@nx/react/tailwind');
// const { join } = require('path');

module.exports = {
Expand Down
5 changes: 0 additions & 5 deletions jest.config.ts

This file was deleted.

15 changes: 0 additions & 15 deletions jest.preset.js

This file was deleted.

Loading

0 comments on commit 5050fa1

Please sign in to comment.