From fcc8af84c84666cbf9e32be9d094d6a431d6ef69 Mon Sep 17 00:00:00 2001 From: --help Date: Wed, 18 Dec 2024 23:16:17 +0100 Subject: [PATCH 1/5] docs(docs): add core and react getting started and using pages Signed-off-by: --help --- docs/astro.config.js | 8 ++- .../src/content/docs/core/getting-started.mdx | 50 ++++++++++++++++++ docs/src/content/docs/core/using.mdx | 34 +++++++++++++ .../content/docs/guide/getting-started.mdx | 26 ---------- docs/src/content/docs/guide/using.md | 14 ----- docs/src/content/docs/index.mdx | 10 ++-- .../content/docs/react/getting-started.mdx | 51 +++++++++++++++++++ docs/src/content/docs/react/using.mdx | 28 ++++++++++ 8 files changed, 174 insertions(+), 47 deletions(-) create mode 100644 docs/src/content/docs/core/getting-started.mdx create mode 100644 docs/src/content/docs/core/using.mdx delete mode 100644 docs/src/content/docs/guide/getting-started.mdx delete mode 100644 docs/src/content/docs/guide/using.md create mode 100644 docs/src/content/docs/react/getting-started.mdx create mode 100644 docs/src/content/docs/react/using.mdx diff --git a/docs/astro.config.js b/docs/astro.config.js index 964c236..fc235eb 100644 --- a/docs/astro.config.js +++ b/docs/astro.config.js @@ -14,8 +14,12 @@ export default defineConfig({ }, sidebar: [ { - label: "Guide", - autogenerate: { directory: "guide" }, + label: "@sandwich-ui/core", + autogenerate: { directory: "core" }, + }, + { + label: "@sandwich-ui/react", + autogenerate: { directory: "react" }, }, ], }), diff --git a/docs/src/content/docs/core/getting-started.mdx b/docs/src/content/docs/core/getting-started.mdx new file mode 100644 index 0000000..f0d4e91 --- /dev/null +++ b/docs/src/content/docs/core/getting-started.mdx @@ -0,0 +1,50 @@ +--- +title: Getting started +description: How to start with Sandwich UI core +--- + +import { Tabs, TabItem } from '@astrojs/starlight/components'; + +## Installation + +### Install and setup Panda CSS + +See the [Panda CSS documentation](https://panda-css.com/docs/overview/getting-started#installation) for installation and setup instructions. + +### Install the dependency + + + +```bash +npm install @sandwich-ui/core +``` + + +```bash +yarn add @sandwich-ui/core +``` + + +```bash +pnpm install @sandwich-ui/core +``` + + + +### Update the `panda.config.ts` + +```ts +import { defineConfig } from "@pandacss/dev"; +import sandwichUIPreset from "@sandwich-ui/core/preset"; + +export default defineConfig({ + preflight: true, + presets: ["@pandacss/dev/presets", sandwichUIPreset], + include: [ + "./node_modules/@sandwich-ui/core/dist/panda.buildinfo.json", + "**/*.html", + ], + importMap: "@sandwich-ui/core", + outdir: "./node_modules/@sandwich-ui/core/dist/styled-system", +}); +``` \ No newline at end of file diff --git a/docs/src/content/docs/core/using.mdx b/docs/src/content/docs/core/using.mdx new file mode 100644 index 0000000..034b123 --- /dev/null +++ b/docs/src/content/docs/core/using.mdx @@ -0,0 +1,34 @@ +--- +title: Using +description: How to use Sandwich UI +--- + +import { Aside } from '@astrojs/starlight/components'; + +## Using the styled system + +```jsx +import { css } from "@sandwich-ui/core/css"; + +function Example() { + return ( + `

Lorem ipsum

` + ); +} +``` + +## Using a recipe + +```jsx +import { ButtonRecipe } from "@sandwich-ui/core/recipes"; + +function Example() { + return ( + `` + ); +} +``` + + diff --git a/docs/src/content/docs/guide/getting-started.mdx b/docs/src/content/docs/guide/getting-started.mdx deleted file mode 100644 index 5ebefc3..0000000 --- a/docs/src/content/docs/guide/getting-started.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Getting started -description: How to start with Sandwich UI ---- - -## Installation - -import { Tabs, TabItem } from '@astrojs/starlight/components'; - - - -```bash -npm install @sandwich-ui/react -``` - - -```bash -yarn add @sandwich-ui/react -``` - - -```bash -pnpm install @sandwich-ui/react -``` - - \ No newline at end of file diff --git a/docs/src/content/docs/guide/using.md b/docs/src/content/docs/guide/using.md deleted file mode 100644 index f4ac8ea..0000000 --- a/docs/src/content/docs/guide/using.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Using -description: How to use Sandwich UI ---- - -```jsx -import { Button } from "@sandwich-ui/react"; - -function Example() { - return ( - - ); -} -``` \ No newline at end of file diff --git a/docs/src/content/docs/index.mdx b/docs/src/content/docs/index.mdx index 97154da..abcef93 100644 --- a/docs/src/content/docs/index.mdx +++ b/docs/src/content/docs/index.mdx @@ -1,17 +1,17 @@ --- title: Sandwich UI -description: A tasty React UI kit +description: A tasty UI kit template: splash hero: - tagline: A tasty React UI kit + tagline: A tasty UI kit image: file: ../../assets/houston.webp actions: - - text: Getting started - link: /guide/getting-started/ + - text: React Getting started + link: /react/getting-started/ icon: right-arrow variant: primary - - text: Storybook + - text: React Storybook link: https://sb-sandwich-ui.mrsquaare.fr/ icon: external --- diff --git a/docs/src/content/docs/react/getting-started.mdx b/docs/src/content/docs/react/getting-started.mdx new file mode 100644 index 0000000..18c0534 --- /dev/null +++ b/docs/src/content/docs/react/getting-started.mdx @@ -0,0 +1,51 @@ +--- +title: Getting started +description: How to start with Sandwich UI React +--- + +import { Tabs, TabItem } from '@astrojs/starlight/components'; + +## Installation + +### Install and setup Panda CSS + +See the [Panda CSS documentation](https://panda-css.com/docs/overview/getting-started#installation) for installation and setup instructions. + +### Install the dependencies + + + +```bash +npm install @sandwich-ui/core @sandwich-ui/react +``` + + +```bash +yarn add @sandwich-ui/core @sandwich-ui/react +``` + + +```bash +pnpm install @sandwich-ui/core @sandwich-ui/react +``` + + + +### Update the `panda.config.ts` + +```ts +import { defineConfig } from "@pandacss/dev"; +import sandwichUIPreset from "@sandwich-ui/core/preset"; + +export default defineConfig({ + preflight: true, + presets: ["@pandacss/dev/presets", sandwichUIPreset], + include: [ + "./node_modules/@sandwich-ui/core/dist/panda.buildinfo.json", + "./node_modules/@sandwich-ui/react/dist/panda.buildinfo.json", + ".**/*.{js,jsx,ts,tsx}", + ], + importMap: "@sandwich-ui/core", + outdir: "./node_modules/@sandwich-ui/core/dist/styled-system", +}); +``` \ No newline at end of file diff --git a/docs/src/content/docs/react/using.mdx b/docs/src/content/docs/react/using.mdx new file mode 100644 index 0000000..d7f8101 --- /dev/null +++ b/docs/src/content/docs/react/using.mdx @@ -0,0 +1,28 @@ +--- +title: Using +description: How to use Sandwich UI React +--- + +## Using the styled system + +```jsx +import { css } from "@sandwich-ui/core/css"; + +function Example() { + return ( +

Lorem ipsum

+ ); +} +``` + +## Using a component + +```jsx +import { Button } from "@sandwich-ui/react"; + +function Example() { + return ( + + ); +} +``` \ No newline at end of file From 771985754414a60b908d0b874745788f2aad0f7c Mon Sep 17 00:00:00 2001 From: --help Date: Wed, 18 Dec 2024 23:16:35 +0100 Subject: [PATCH 2/5] docs: update README, merge previous changelog with actual packages Signed-off-by: --help --- PREVIOUS_CHANGELOGS.md | 37 -------------------------- README.md | 38 ++++++++------------------- docs/README.md | 2 +- packages/core/README.md | 3 +++ packages/react-storybook/CHANGELOG.md | 20 ++++++++++++++ packages/react-storybook/README.md | 4 +-- packages/react/CHANGELOG.md | 16 +++++++++++ packages/react/README.md | 4 +-- 8 files changed, 55 insertions(+), 69 deletions(-) delete mode 100644 PREVIOUS_CHANGELOGS.md create mode 100644 packages/core/README.md diff --git a/PREVIOUS_CHANGELOGS.md b/PREVIOUS_CHANGELOGS.md deleted file mode 100644 index 8060c08..0000000 --- a/PREVIOUS_CHANGELOGS.md +++ /dev/null @@ -1,37 +0,0 @@ -# @mrsquaare/sandwich-ui - -## 0.3.1 - -### Patch Changes - -- [#3](https://github.com/MrSquaare/sandwich-ui/pull/3) [`b2f564c`](https://github.com/MrSquaare/sandwich-ui/commit/b2f564cbfdd825519727065e9037e2f6c6d9c02f) Thanks [@MrSquaare](https://github.com/MrSquaare)! - Bump packages, migrate to ESLint v9 - -## 0.3.0 - -### Minor Changes - -- [#1](https://github.com/MrSquaare/sandwich-ui/pull/1) [`67e57ad`](https://github.com/MrSquaare/sandwich-ui/commit/67e57ad4e631cc20297386ad3099dfe48aceae87) Thanks [@MrSquaare](https://github.com/MrSquaare)! - Initial version - ---- - -# @sandwich-ui/storybook - -## 0.1.1 - -### Patch Changes - -- [#3](https://github.com/MrSquaare/sandwich-ui/pull/3) [`b2f564c`](https://github.com/MrSquaare/sandwich-ui/commit/b2f564cbfdd825519727065e9037e2f6c6d9c02f) Thanks [@MrSquaare](https://github.com/MrSquaare)! - Bump packages, migrate to ESLint v9 - -- Updated dependencies [[`b2f564c`](https://github.com/MrSquaare/sandwich-ui/commit/b2f564cbfdd825519727065e9037e2f6c6d9c02f)]: - - @mrsquaare/sandwich-ui@0.3.1 - -## 0.1.0 - -### Minor Changes - -- [#1](https://github.com/MrSquaare/sandwich-ui/pull/1) [`67e57ad`](https://github.com/MrSquaare/sandwich-ui/commit/67e57ad4e631cc20297386ad3099dfe48aceae87) Thanks [@MrSquaare](https://github.com/MrSquaare)! - Initial version - -### Patch Changes - -- Updated dependencies [[`67e57ad`](https://github.com/MrSquaare/sandwich-ui/commit/67e57ad4e631cc20297386ad3099dfe48aceae87)]: - - @mrsquaare/sandwich-ui@0.3.0 diff --git a/README.md b/README.md index d8fd207..a056cb7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # sandwich-ui -A tasty React UI kit +A tasty UI kit ## Table of Contents @@ -13,42 +13,26 @@ A tasty React UI kit ## About -Sandwich UI is a React UI kit used for my personal projects. +Sandwich UI is a UI kit used for my personal projects. This repository is a [monorepo](https://en.wikipedia.org/wiki/Monorepo), powered by [Turborepo](https://turborepo.org/). -It is composed of three projects: +It is composed of multiple packages: -- the [Sandwich UI library](sandwich-ui) -- the [Docs](docs) -- the [Storybook](storybook) +- [Core library](packages/core) +- [React library](packages/react) +- [React storybook](packages/react-storybook) +- [Docs](docs) ## Getting started -### Installation - -```sh -# npm -npm install @sandwich-ui/react - -# yarn -yarn add @sandwich-ui/react - -# pnpm -pnpm install @sandwich-ui/react -``` +- [Core library](docs/src/content/docs/core/getting-started.mdx) +- [React library](docs/src/content/docs/react/getting-started.mdx) ## Using -```jsx -import { Button } from "@sandwich-ui/react"; - -function Example() { - return ( - - ); -} -``` +- [Core library](docs/src/content/docs/core/using.mdx) +- [React library](docs/src/content/docs/react/using.mdx) ## Contributing diff --git a/docs/README.md b/docs/README.md index 77181af..678b994 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,3 +1,3 @@ -# docs +# @sandwich-ui/docs The Sandwich UI docs \ No newline at end of file diff --git a/packages/core/README.md b/packages/core/README.md new file mode 100644 index 0000000..4e88e8f --- /dev/null +++ b/packages/core/README.md @@ -0,0 +1,3 @@ +# @sandwich-ui/core + +The Sandwich UI core library \ No newline at end of file diff --git a/packages/react-storybook/CHANGELOG.md b/packages/react-storybook/CHANGELOG.md index 2342896..d86ede7 100644 --- a/packages/react-storybook/CHANGELOG.md +++ b/packages/react-storybook/CHANGELOG.md @@ -33,3 +33,23 @@ - Updated dependencies [[`5359733`](https://github.com/MrSquaare/sandwich-ui/commit/53597336cdedb347f282eb81e6917f59596194bf), [`0563f83`](https://github.com/MrSquaare/sandwich-ui/commit/0563f833a175875d357d8c5aa9a7efc37f2a3cee), [`5359733`](https://github.com/MrSquaare/sandwich-ui/commit/53597336cdedb347f282eb81e6917f59596194bf), [`5359733`](https://github.com/MrSquaare/sandwich-ui/commit/53597336cdedb347f282eb81e6917f59596194bf)]: - @sandwich-ui/core@0.1.0 - @sandwich-ui/react@0.4.0 + +## 0.1.1 + +### Patch Changes + +- [#3](https://github.com/MrSquaare/sandwich-ui/pull/3) [`b2f564c`](https://github.com/MrSquaare/sandwich-ui/commit/b2f564cbfdd825519727065e9037e2f6c6d9c02f) Thanks [@MrSquaare](https://github.com/MrSquaare)! - Bump packages, migrate to ESLint v9 + +- Updated dependencies [[`b2f564c`](https://github.com/MrSquaare/sandwich-ui/commit/b2f564cbfdd825519727065e9037e2f6c6d9c02f)]: + - @mrsquaare/sandwich-ui@0.3.1 + +## 0.1.0 + +### Minor Changes + +- [#1](https://github.com/MrSquaare/sandwich-ui/pull/1) [`67e57ad`](https://github.com/MrSquaare/sandwich-ui/commit/67e57ad4e631cc20297386ad3099dfe48aceae87) Thanks [@MrSquaare](https://github.com/MrSquaare)! - Initial version + +### Patch Changes + +- Updated dependencies [[`67e57ad`](https://github.com/MrSquaare/sandwich-ui/commit/67e57ad4e631cc20297386ad3099dfe48aceae87)]: + - @mrsquaare/sandwich-ui@0.3.0 diff --git a/packages/react-storybook/README.md b/packages/react-storybook/README.md index feda326..cb3fe2a 100644 --- a/packages/react-storybook/README.md +++ b/packages/react-storybook/README.md @@ -1,3 +1,3 @@ -# storybook +# @sandwich-ui/react-storybook -The Sandwich UI storybook \ No newline at end of file +The Sandwich UI React Storybook \ No newline at end of file diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 8370cc4..f7ad724 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -32,3 +32,19 @@ - Updated dependencies [[`5359733`](https://github.com/MrSquaare/sandwich-ui/commit/53597336cdedb347f282eb81e6917f59596194bf), [`5359733`](https://github.com/MrSquaare/sandwich-ui/commit/53597336cdedb347f282eb81e6917f59596194bf)]: - @sandwich-ui/core@0.1.0 + +--- + +# @mrsquaare/sandwich-ui + +## 0.3.1 + +### Patch Changes + +- [#3](https://github.com/MrSquaare/sandwich-ui/pull/3) [`b2f564c`](https://github.com/MrSquaare/sandwich-ui/commit/b2f564cbfdd825519727065e9037e2f6c6d9c02f) Thanks [@MrSquaare](https://github.com/MrSquaare)! - Bump packages, migrate to ESLint v9 + +## 0.3.0 + +### Minor Changes + +- [#1](https://github.com/MrSquaare/sandwich-ui/pull/1) [`67e57ad`](https://github.com/MrSquaare/sandwich-ui/commit/67e57ad4e631cc20297386ad3099dfe48aceae87) Thanks [@MrSquaare](https://github.com/MrSquaare)! - Initial version diff --git a/packages/react/README.md b/packages/react/README.md index 865228a..f00d698 100644 --- a/packages/react/README.md +++ b/packages/react/README.md @@ -1,3 +1,3 @@ -# sandwich-ui +# @sandwich-ui/react -The Sandwich UI library \ No newline at end of file +The Sandwich UI React library \ No newline at end of file From e692700be58298cb13c180dc92561a31416eda10 Mon Sep 17 00:00:00 2001 From: --help Date: Wed, 18 Dec 2024 23:18:01 +0100 Subject: [PATCH 3/5] chore: add changeset Signed-off-by: --help --- .changeset/three-schools-promise.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/three-schools-promise.md diff --git a/.changeset/three-schools-promise.md b/.changeset/three-schools-promise.md new file mode 100644 index 0000000..3a2cc74 --- /dev/null +++ b/.changeset/three-schools-promise.md @@ -0,0 +1,5 @@ +--- +"@sandwich-ui/docs": patch +--- + +Add core and react docs From c1dabe46b95cc5ffee22e7ee391946ed974ce692 Mon Sep 17 00:00:00 2001 From: --help Date: Wed, 18 Dec 2024 23:22:44 +0100 Subject: [PATCH 4/5] docs(docs): improve GitHub markdown readability Signed-off-by: --help --- docs/src/content/docs/core/getting-started.mdx | 6 ++++++ docs/src/content/docs/react/getting-started.mdx | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/docs/src/content/docs/core/getting-started.mdx b/docs/src/content/docs/core/getting-started.mdx index f0d4e91..f059b39 100644 --- a/docs/src/content/docs/core/getting-started.mdx +++ b/docs/src/content/docs/core/getting-started.mdx @@ -15,19 +15,25 @@ See the [Panda CSS documentation](https://panda-css.com/docs/overview/getting-st + ```bash npm install @sandwich-ui/core ``` + + ```bash yarn add @sandwich-ui/core ``` + + ```bash pnpm install @sandwich-ui/core ``` + diff --git a/docs/src/content/docs/react/getting-started.mdx b/docs/src/content/docs/react/getting-started.mdx index 18c0534..a822028 100644 --- a/docs/src/content/docs/react/getting-started.mdx +++ b/docs/src/content/docs/react/getting-started.mdx @@ -15,19 +15,25 @@ See the [Panda CSS documentation](https://panda-css.com/docs/overview/getting-st + ```bash npm install @sandwich-ui/core @sandwich-ui/react ``` + + ```bash yarn add @sandwich-ui/core @sandwich-ui/react ``` + + ```bash pnpm install @sandwich-ui/core @sandwich-ui/react ``` + From f4afdaa4f8a1c8b86f54e0aa58115a0901b87265 Mon Sep 17 00:00:00 2001 From: --help Date: Wed, 18 Dec 2024 23:24:27 +0100 Subject: [PATCH 5/5] docs(docs): remove typo for react panda update config section Signed-off-by: --help --- docs/src/content/docs/react/getting-started.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/content/docs/react/getting-started.mdx b/docs/src/content/docs/react/getting-started.mdx index a822028..082d2ae 100644 --- a/docs/src/content/docs/react/getting-started.mdx +++ b/docs/src/content/docs/react/getting-started.mdx @@ -49,7 +49,7 @@ export default defineConfig({ include: [ "./node_modules/@sandwich-ui/core/dist/panda.buildinfo.json", "./node_modules/@sandwich-ui/react/dist/panda.buildinfo.json", - ".**/*.{js,jsx,ts,tsx}", + "**/*.{js,jsx,ts,tsx}", ], importMap: "@sandwich-ui/core", outdir: "./node_modules/@sandwich-ui/core/dist/styled-system",