From 8892d063f02ea9ff4da6712c13778941141335e2 Mon Sep 17 00:00:00 2001 From: sarahgm <38324334+sarahgm@users.noreply.github.com> Date: Wed, 30 Oct 2024 06:42:44 +0100 Subject: [PATCH] chore: add typecheck to our documentation (#4267) * typescript docs * save * add tsconfig check * refa card in iconlist * add to root command * test * update * test * test * test * undo * move in one file * test test test * test * update * maybe build * add build step for typecheck --- .github/workflows/typecheck.yml | 2 + docs/app/page.tsx | 2 +- .../form/form/form-focus-management.demo.tsx | 2 +- .../form/slider/slider-width.demo.tsx | 2 +- .../overlay/menu/menu-open-dialog.demo.tsx | 12 +- .../accessibility-aria-live.demo.tsx | 1 - .../form-fields-required-state.demo.tsx | 7 +- .../multiple-selection-selectlist.demo.tsx | 6 +- .../tag-group-multiselect.demo.tsx | 5 +- .../releases/config/storybook/release.mdx | 30 +++++ docs/content/releases/docs/release.mdx | 106 ++++++++++++++++++ .../releases/packages/components/release.mdx | 99 ++++++++++++++++ .../releases/packages/icons/release.mdx | 10 ++ .../releases/packages/system/release.mdx | 32 ++++++ .../packages/theme-preset/release.mdx | 10 ++ .../releases/packages/types/release.mdx | 13 +++ .../releases/themes/theme-b2b/release.mdx | 77 +++++++++++++ .../releases/themes/theme-core/release.mdx | 65 +++++++++++ .../releases/themes/theme-docs/release.mdx | 39 +++++++ docs/next.config.js | 4 - docs/ui/IconList.tsx | 35 +++--- docs/ui/navigation/Navigation.tsx | 10 +- package.json | 2 +- tsconfig.check.json | 16 +-- 24 files changed, 519 insertions(+), 68 deletions(-) diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index 2da363d922..e8803fe5e7 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -23,6 +23,8 @@ jobs: cache: 'pnpm' - name: Install dependencies run: pnpm install + - name: Build docs for generated files + run: pnpm build:docs # Action - name: Typecheck diff --git a/docs/app/page.tsx b/docs/app/page.tsx index fbae913dcf..6f9f522eff 100644 --- a/docs/app/page.tsx +++ b/docs/app/page.tsx @@ -34,7 +34,7 @@ const SectionLink = ({ // Page // --------------- -export const Page = () => { +const Page = () => { const latestPost = getLatestPost(); return (
diff --git a/docs/content/components/form/form/form-focus-management.demo.tsx b/docs/content/components/form/form/form-focus-management.demo.tsx index 5138ad82b8..37736b9d4b 100644 --- a/docs/content/components/form/form/form-focus-management.demo.tsx +++ b/docs/content/components/form/form/form-focus-management.demo.tsx @@ -26,7 +26,7 @@ export default () => { {invalid ? ( - + Whoopsies! Please enter both your email address and password to proceed. diff --git a/docs/content/components/form/slider/slider-width.demo.tsx b/docs/content/components/form/slider/slider-width.demo.tsx index ba3911cdb5..2ba14ffb44 100644 --- a/docs/content/components/form/slider/slider-width.demo.tsx +++ b/docs/content/components/form/slider/slider-width.demo.tsx @@ -1,7 +1,7 @@ import { Slider } from '@marigold/components'; export default () => ( - + Example ); diff --git a/docs/content/components/overlay/menu/menu-open-dialog.demo.tsx b/docs/content/components/overlay/menu/menu-open-dialog.demo.tsx index d7e28edd23..e0067c215f 100644 --- a/docs/content/components/overlay/menu/menu-open-dialog.demo.tsx +++ b/docs/content/components/overlay/menu/menu-open-dialog.demo.tsx @@ -1,15 +1,5 @@ import { useState } from 'react'; -import { - Body, - Button, - Dialog, - Footer, - Header, - Inline, - Menu, - Stack, - Text, -} from '@marigold/components'; +import { Button, Dialog, Menu } from '@marigold/components'; export default () => { const [open, setDialogOpen] = useState(false); diff --git a/docs/content/foundations/accessibility/accessibility-aria-live.demo.tsx b/docs/content/foundations/accessibility/accessibility-aria-live.demo.tsx index 391bfc6aa2..facbb7b9c6 100644 --- a/docs/content/foundations/accessibility/accessibility-aria-live.demo.tsx +++ b/docs/content/foundations/accessibility/accessibility-aria-live.demo.tsx @@ -7,7 +7,6 @@ import { Form, Image, Inline, - Menu, Select, Stack, Text, diff --git a/docs/content/foundations/form-fields/form-fields-required-state.demo.tsx b/docs/content/foundations/form-fields/form-fields-required-state.demo.tsx index 98cb1206aa..99aef6478f 100644 --- a/docs/content/foundations/form-fields/form-fields-required-state.demo.tsx +++ b/docs/content/foundations/form-fields/form-fields-required-state.demo.tsx @@ -1,12 +1,7 @@ import { Select } from '@marigold/components'; export default () => ( - Pop Hip Hop Rock diff --git a/docs/content/patterns/multiple-selection/multiple-selection-selectlist.demo.tsx b/docs/content/patterns/multiple-selection/multiple-selection-selectlist.demo.tsx index b37da60135..8ebeb14381 100644 --- a/docs/content/patterns/multiple-selection/multiple-selection-selectlist.demo.tsx +++ b/docs/content/patterns/multiple-selection/multiple-selection-selectlist.demo.tsx @@ -11,9 +11,11 @@ const paymentMethods = [ export default () => ( - {item => {item.name}} + {(item: { id: string; name: string }) => ( + {item.name} + )} ); diff --git a/docs/content/patterns/multiple-selection/tag-group-multiselect.demo.tsx b/docs/content/patterns/multiple-selection/tag-group-multiselect.demo.tsx index db0967fcfd..36bc27cbeb 100644 --- a/docs/content/patterns/multiple-selection/tag-group-multiselect.demo.tsx +++ b/docs/content/patterns/multiple-selection/tag-group-multiselect.demo.tsx @@ -18,10 +18,7 @@ export default () => { Swimming pool Breakfast -

- Current selection (controlled):{' '} - {selected === 'all' ? 'all' : [...selected].join(', ')} -

+

Current selection (controlled): {[...selected].join(', ')}

); }; diff --git a/docs/content/releases/config/storybook/release.mdx b/docs/content/releases/config/storybook/release.mdx index a0f7cc104f..94e1db359e 100644 --- a/docs/content/releases/config/storybook/release.mdx +++ b/docs/content/releases/config/storybook/release.mdx @@ -1,9 +1,39 @@ --- title: '@marigold/storybook-config' caption: 'Have a look on the latest changes regarding @marigold/storybook-config' +badge: new toc: false --- +## 1.1.50 (Released on ) + +### Patch Changes + +- Updated dependencies [65608b4] +- Updated dependencies [caefbe4] +- Updated dependencies [2d9917f] +- Updated dependencies [6f8e3a2] +- Updated dependencies [7ea3838] +- Updated dependencies [6687af7] +- Updated dependencies [2babc0b] +- Updated dependencies [8c539d3] +- Updated dependencies [f18c8aa] +- Updated dependencies [d5386e4] +- Updated dependencies [5798b4d] +- Updated dependencies [5c029ec] +- Updated dependencies [2169b6f] +- Updated dependencies [bfd2843] +- Updated dependencies [0e77996] +- Updated dependencies [b8cd92a] +- Updated dependencies [45fb3c4] +- Updated dependencies [f6a132c] +- Updated dependencies [956982a] +- Updated dependencies [df04623] +- Updated dependencies [f3f0ea0] + - @marigold/components@10.0.0 + - @marigold/theme-b2b@28.0.0 + - @marigold/theme-core@27.0.0 + ## 1.1.49 (Released on ) ### Patch Changes diff --git a/docs/content/releases/docs/release.mdx b/docs/content/releases/docs/release.mdx index f598b5acca..8fbc3669b0 100644 --- a/docs/content/releases/docs/release.mdx +++ b/docs/content/releases/docs/release.mdx @@ -1,9 +1,115 @@ --- title: '@marigold/docs' caption: 'Have a look on the latest changes regarding @marigold/docs' +badge: new toc: false --- +## 10.0.0 (Released on ) + +### Major Changes + +- caefbe4: refa(listbox): Allow sections in `` and ``, adjust Section API in `` + - Updated the docs for ``, `` and `` with section stories + - Renamed the part of the `` accordingly (from `sectionTitle` to `header`) + + **BREAKING CHANGE:** We changed the API of the `
` component that is used in ``, `` and `` are now called `