diff --git a/.circleci/config.yml b/.circleci/config.yml index 9d3354c453ca..42f40b70bfc2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,7 +43,7 @@ executors: default: 'small' working_directory: /tmp/storybook docker: - - image: mcr.microsoft.com/playwright:v1.32.3-focal + - image: mcr.microsoft.com/playwright:v1.35.0-focal environment: NODE_OPTIONS: --max_old_space_size=6144 resource_class: <> diff --git a/.github/workflows/canary-release-pr.WIP b/.github/workflows/canary-release-pr.WIP new file mode 100644 index 000000000000..0c5948948959 --- /dev/null +++ b/.github/workflows/canary-release-pr.WIP @@ -0,0 +1,88 @@ +name: Publish canary release of PR +run-name: 'Canary release: PR #${{ github.event.pull_request.number }} at ${{ github.sha }}' + +on: + pull_request: + types: [opened, synchronize, reopened] + branches: + - next + +env: + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 + PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1 + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + +permissions: + pull-requests: write + +jobs: + release-canary: + name: Release canary version + runs-on: ubuntu-latest + environment: canary-release + defaults: + run: + working-directory: scripts + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: | + ~/.yarn/berry/cache + key: yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }} + restore-keys: | + yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }} + yarn-v1-${{ hashFiles('scripts/yarn.lock') }} + yarn-v1 + + - name: Install dependencies + working-directory: . + run: yarn task --task=install --start-from=install + + - name: Set version + id: version + run: | + SHORT_SHA=$(git rev-parse --short ${{ github.sha }}) + yarn release:version --release-type prerelease --pre-id pr-${{ github.event.pull_request.number }}-$SHORT_SHA --verbose + + - name: Publish v${{ steps.version.outputs.next-version }} + env: + YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: yarn release:publish --tag pr-${{ github.event.pull_request.number }} --verbose + + - name: Create comment on PR + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh pr comment ${{ github.event.pull_request.number }}\ + --repo "${{github.repository }}"\ + --body "πŸš€ This pull request has been published as version \`${{ steps.version.outputs.next-version }}\` and with the tag \`pr-${{ github.event.pull_request.number }}\`. + [You can see it on the npm registry here](https://npmjs.com/package/@storybook/cli/v/${{ steps.version.outputs.next-version }})". + + - name: Create failing comment on PR + if: failure() + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh pr comment ${{ github.event.pull_request.number }}\ + --repo "${{github.repository }}"\ + --body "Failed to publish canary version of this pul request. See the failed workflow run at See run at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + + # - name: Report failure to Discord + # if: failure() + # env: + # DISCORD_WEBHOOK: ${{ secrets.DISCORD_MONITORING_URL }} + # uses: Ilshidur/action-discord@master + # with: + # args: 'The GitHub Action for publishing version ${{ steps.version.outputs.current-version }} (triggered by ${{ github.triggering_actor }}) failed! See run at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' diff --git a/.github/workflows/check-release-tasks.yml b/.github/workflows/check-release-tasks.yml new file mode 100644 index 000000000000..4848ae35f07e --- /dev/null +++ b/.github/workflows/check-release-tasks.yml @@ -0,0 +1,19 @@ +name: Check release tasks +run-name: 'Check tasks for "${{ github.event.pull_request.title }}" PR' + +on: + pull_request: + types: + - opened + - edited + branches: + - 'latest-release' + - 'next-release' + +jobs: + task-check: + runs-on: ubuntu-latest + steps: + - uses: chromaui/task-completed-checker-action@main + with: + repo-token: '${{ secrets.GITHUB_TOKEN }}' diff --git a/.github/workflows/danger-js.yml b/.github/workflows/danger-js.yml index edeb4aaad03a..40b6466fd0c9 100644 --- a/.github/workflows/danger-js.yml +++ b/.github/workflows/danger-js.yml @@ -1,6 +1,6 @@ on: pull_request: - types: [opened, synchronize, reopened, labeled, unlabeled] + types: [opened, synchronize, reopened, labeled, unlabeled, edited] name: Danger JS jobs: @@ -13,7 +13,7 @@ jobs: node-version: '16' - uses: actions/checkout@v3 - name: Danger JS - uses: danger/danger-js@10.9.0 + uses: danger/danger-js@11.2.6 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml new file mode 100644 index 000000000000..d5a8ca655af6 --- /dev/null +++ b/.github/workflows/prepare-patch-release.yml @@ -0,0 +1,175 @@ +name: Prepare patch PR +run-name: Prepare patch PR, triggered by ${{ github.triggering_actor }} + +on: + push: + branches: + - next + workflow_dispatch: + +env: + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 + PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1 + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true + +jobs: + prepare-patch-pull-request: + name: Prepare patch pull request + runs-on: ubuntu-latest + defaults: + run: + working-directory: scripts + steps: + - name: Checkout main + uses: actions/checkout@v3 + with: + ref: main + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: | + ~/.yarn/berry/cache + key: yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }} + restore-keys: | + yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }} + yarn-v1-${{ hashFiles('scripts/yarn.lock') }} + yarn-v1 + + - name: Install Dependencies + working-directory: . + run: | + yarn task --task=install + + - name: Check if pull request is frozen + if: github.event_name != 'workflow_dispatch' + id: check-frozen + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: yarn release:is-pr-frozen + + - name: Cancel when frozen + if: steps.check-frozen.outputs.frozen == 'true' && github.event_name != 'workflow_dispatch' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # From https://stackoverflow.com/a/75809743 + run: | + gh run cancel ${{ github.run_id }} + gh run watch ${{ github.run_id }} + + - name: Check for unreleased changes + id: unreleased-changes + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: yarn release:unreleased-changes-exists --unpicked-patches + + - name: Fetch next branch + run: + # depth needs to be set to a high enough number that it will contain all the merge commits to cherry-pick + # as of May 2023, the whole repo had 55K commits + git fetch --depth=2000 origin next + + - name: Pick patches + id: pick-patches + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + yarn release:pick-patches + + - name: Bump version + id: bump-version + if: steps.unreleased-changes.outputs.has-changes-to-release == 'true' + run: | + yarn release:version --release-type patch --verbose + + # We need the current version to set the branch name, even when not bumping the version + - name: Get current version + id: current-version + if: steps.unreleased-changes.outputs.has-changes-to-release == 'false' + run: | + yarn release:get-current-version --verbose + + - name: Set version output + id: versions + run: | + echo "current=${{ steps.bump-version.outputs.current-version || steps.current-version.outputs.current-version }}" >> "$GITHUB_OUTPUT" + echo "next=${{ steps.bump-version.outputs.next-version || steps.current-version.outputs.current-version }}" >> "$GITHUB_OUTPUT" + + - name: Write changelog + if: steps.unreleased-changes.outputs.has-changes-to-release == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + yarn release:write-changelog ${{ steps.versions.outputs.next }} --unpicked-patches --verbose + + - name: 'Commit changes to branch: version-patch-from-${{ steps.versions.outputs.current }}' + working-directory: . + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git checkout -b version-patch-from-${{ steps.versions.outputs.current }} + git add . + git commit -m "Bump version from ${{ steps.versions.outputs.current }} to ${{ steps.versions.outputs.next }}" || true + git push --force origin version-patch-from-${{ steps.versions.outputs.current }} + + - name: Generate PR description + id: description + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: yarn release:generate-pr-description --unpicked-patches --manual-cherry-picks='${{ steps.pick-patches.outputs.failed-cherry-picks }}' ${{ steps.unreleased-changes.outputs.has-changes-to-release == 'true' && format('{0}={1} {2}={3}', '--current-version', steps.versions.outputs.current, '--next-version', steps.versions.outputs.next) || '' }} --verbose + + - name: Create or update pull request with release + if: steps.unreleased-changes.outputs.has-changes-to-release == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + if PR_STATE=$(gh pr view --json state --jq .state 2>/dev/null) && [[ -n "$PR_STATE" && "$PR_STATE" == *"OPEN"* ]]; then + gh pr edit \ + --repo "${{github.repository }}" \ + --title "Bump version on \`main\`: patch from ${{ steps.versions.outputs.current }} to ${{ steps.versions.outputs.next }}" \ + --body "${{ steps.description.outputs.description }}" + else + gh pr create \ + --repo "${{github.repository }}" \ + --title "Bump version on \`main\`: patch from ${{ steps.versions.outputs.current }} to ${{ steps.versions.outputs.next }}" \ + --base latest-release \ + --head version-patch-from-${{ steps.versions.outputs.current }} \ + --body "${{ steps.description.outputs.description }}" + fi + + - name: Create or update pull request without release + if: steps.unreleased-changes.outputs.has-changes-to-release == 'false' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + if PR_STATE=$(gh pr view --json state --jq .state 2>/dev/null) && [[ -n "$PR_STATE" && "$PR_STATE" == *"OPEN"* ]]; then + gh pr edit \ + --repo "${{github.repository }}"\ + --title "Merge patches to \`main\`" \ + --body "${{ steps.description.outputs.description }}" + else + gh pr create \ + --repo "${{github.repository }}"\ + --title "Merge patches to \`main\`" \ + --base latest-release \ + --head version-patch-from-${{ steps.versions.outputs.current }} \ + --body "${{ steps.description.outputs.description }}" + fi + + - name: Report job failure to Discord + if: failure() + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_MONITORING_URL }} + uses: Ilshidur/action-discord@master + with: + args: 'The GitHub Action for preparing the release pull request bumping from v${{ steps.versions.outputs.current }} to v${{ steps.versions.outputs.next }} (triggered by ${{ github.triggering_actor }}) failed! See run at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' diff --git a/.github/workflows/prepare-prerelease.yml b/.github/workflows/prepare-prerelease.yml new file mode 100644 index 000000000000..932c4b31f64f --- /dev/null +++ b/.github/workflows/prepare-prerelease.yml @@ -0,0 +1,159 @@ +name: Prepare prerelease PR +run-name: Prepare prerelease PR, triggered by ${{ github.triggering_actor }} + +on: + push: + branches: + - next + workflow_dispatch: + inputs: + release-type: + description: 'Which release type to use for bumping the version' + required: true + default: 'prerelease' + type: choice + options: + - prerelease + - prepatch + - preminor + - premajor + - patch + - minor + - major + pre-id: + description: For prerelease versions, what prerelease identifier to use, eg. 'alpha', 'beta', 'rc' + required: false + type: string + +env: + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 + PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1 + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true + +jobs: + prepare-prerelease-pull-request: + name: Prepare prerelease pull request + runs-on: ubuntu-latest + defaults: + run: + working-directory: scripts + steps: + - name: Checkout next + uses: actions/checkout@v3 + with: + ref: next + # this needs to be set to a high enough number that it will contain the last version tag + # as of May 2023, the whole repo had 55K commits + fetch-depth: 10000 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: | + ~/.yarn/berry/cache + key: yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }} + restore-keys: | + yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }} + yarn-v1-${{ hashFiles('scripts/yarn.lock') }} + yarn-v1 + + - name: Install Dependencies + working-directory: . + run: | + yarn task --task=install + + - name: Check if pull request is frozen + if: github.event_name != 'workflow_dispatch' + id: check-frozen + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: yarn release:is-pr-frozen + + - name: Cancel when frozen + if: steps.check-frozen.outputs.frozen == 'true' && github.event_name != 'workflow_dispatch' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # From https://stackoverflow.com/a/75809743 + run: | + gh run cancel ${{ github.run_id }} + gh run watch ${{ github.run_id }} + + # tags are needed to get changes and changelog generation + - name: Fetch git tags + run: git fetch --tags origin + + - name: Check for unreleased changes + id: unreleased-changes + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: yarn release:unreleased-changes-exists + + - name: Cancel when no release necessary + if: steps.unreleased-changes.outputs.has-changes-to-release == 'false' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # From https://stackoverflow.com/a/75809743 + run: | + gh run cancel ${{ github.run_id }} + gh run watch ${{ github.run_id }} + + - name: Bump version + id: bump-version + run: | + yarn release:version --release-type ${{ inputs.release-type || 'prerelease' }} ${{ inputs.pre-id && format('{0} {1}', '--pre-id', inputs.pre-id) || '' }} --verbose + + - name: Write changelog + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + yarn release:write-changelog ${{ steps.bump-version.outputs.next-version }} --verbose + + - name: 'Commit changes to branch: version-prerelease-from-${{ steps.bump-version.outputs.current-version }}' + working-directory: . + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git checkout -b version-prerelease-from-${{ steps.bump-version.outputs.current-version }} + git add . + git commit -m "Bump version from ${{ steps.bump-version.outputs.current-version }} to ${{ steps.bump-version.outputs.next-version }}" || true + git push --force origin version-prerelease-from-${{ steps.bump-version.outputs.current-version }} + + - name: Generate PR description + id: description + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: yarn release:generate-pr-description --current-version ${{ steps.bump-version.outputs.current-version }} --next-version ${{ steps.bump-version.outputs.next-version }} --verbose + + - name: Create or update pull request + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + if PR_STATE=$(gh pr view --json state --jq .state 2>/dev/null) && [[ -n "$PR_STATE" && "$PR_STATE" == *"OPEN"* ]]; then + gh pr edit \ + --repo "${{github.repository }}" \ + --title "Bump version on \`next\`: ${{ inputs.release-type || 'prerelease' }} ${{ inputs.pre-id && format('({0})', inputs.pre-id) }} from ${{ steps.bump-version.outputs.current-version }} to ${{ steps.bump-version.outputs.next-version }}" \ + --body "${{ steps.description.outputs.description }}" + else + gh pr create \ + --repo "${{github.repository }}"\ + --title "Bump version on \`next\`: ${{ inputs.release-type || 'prerelease' }} ${{ inputs.pre-id && format('({0})', inputs.pre-id) }} from ${{ steps.bump-version.outputs.current-version }} to ${{ steps.bump-version.outputs.next-version }}" \ + --base next-release \ + --head version-prerelease-from-${{ steps.bump-version.outputs.current-version }} \ + --body "${{ steps.description.outputs.description }}" + fi + + - name: Report job failure to Discord + if: failure() + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_MONITORING_URL }} + uses: Ilshidur/action-discord@master + with: + args: 'The GitHub Action for preparing the release pull request bumping from v${{ steps.bump-version.outputs.current-version }} to v${{ steps.bump-version.outputs.next-version }} (triggered by ${{ github.triggering_actor }}) failed! See run at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000000..c6c92b600c2d --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,136 @@ +name: Publish +run-name: Publish new version on ${{ github.ref_name }}, triggered by ${{ github.triggering_actor }} + +on: + push: + branches: + - latest-release + - next-release + +env: + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 + PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1 + +permissions: + contents: write + pull-requests: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name }} + +jobs: + publish: + name: Publish new version + runs-on: ubuntu-latest + environment: release + defaults: + run: + working-directory: scripts + steps: + - name: Checkout ${{ github.ref_name }} + uses: actions/checkout@v3 + with: + fetch-depth: 100 + token: ${{ secrets.GH_TOKEN }} + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: | + ~/.yarn/berry/cache + key: yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }} + restore-keys: | + yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }} + yarn-v1-${{ hashFiles('scripts/yarn.lock') }} + yarn-v1 + + - name: Install script dependencies + run: | + yarn install + + - name: Get current version + id: version + run: yarn release:get-current-version + + - name: Check if publish is needed + id: publish-needed + run: yarn release:is-version-published ${{ steps.version.outputs.current-version }} + + - name: Check release vs prerelease + if: steps.publish-needed.outputs.published == 'false' + id: is-prerelease + run: yarn release:is-prerelease + + - name: Install code dependencies + if: steps.publish-needed.outputs.published == 'false' + working-directory: . + run: yarn task --task=install --start-from=install + + - name: Publish + if: steps.publish-needed.outputs.published == 'false' + env: + YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: yarn release:publish --tag ${{ steps.is-prerelease.outputs.prerelease == 'true' && 'next' || 'latest' }} --verbose + + - name: Get target branch + id: target + run: echo "target=${{ github.ref_name == 'next-release' && 'next' || 'main' }}" >> $GITHUB_OUTPUT + + - name: Get changelog for ${{ steps.version.outputs.current-version }} + if: steps.publish-needed.outputs.published == 'false' + id: changelog + run: yarn release:get-changelog-from-file ${{ steps.version.outputs.current-version }} + + # tags are needed to get list of patches to label as picked + - name: Fetch git tags + if: github.ref_name == 'main-release' + run: git fetch --tags origin + + - name: Label patch PRs as picked + if: github.ref_name == 'main-release' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: yarn release:label-patches + + - name: Create GitHub Release + if: steps.publish-needed.outputs.published == 'false' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create \ + v${{ steps.version.outputs.current-version }} \ + --repo "${{ github.repository }}" \ + --target ${{ github.ref_name }} \ + --title "v${{ steps.version.outputs.current-version }}" \ + --notes "${{ steps.changelog.outputs.changelog }}" \ + ${{ steps.is-prerelease.outputs.prerelease == 'true' && '--prerelease' || '' }} + + - name: Merge ${{ github.ref_name }} into ${{ steps.target.outputs.target }} + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git fetch origin ${{ steps.target.outputs.target }} + git checkout ${{ steps.target.outputs.target }} + git merge ${{ github.ref_name }} + git push origin ${{ steps.target.outputs.target }} + + # Force push from next to main if it is not a prerelease, and this release is from next-release + # This happens when eg. next has been tracking 7.1.0-alpha.X, and now we want to release 7.1.0 + # This will keep release-next, next and main all tracking v7.1.0 + # - name: Force push ${{ steps.target.outputs.target }} to main + # if: steps.publish-needed.outputs.published == 'false' && steps.target.outputs.target == 'next' && !steps.is-prerelease.outputs.prerelease + # run: | + # git push --force origin ${{ steps.target.outputs.target }}:main + + - name: Report job failure to Discord + if: failure() + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_MONITORING_URL }} + uses: Ilshidur/action-discord@master + with: + args: 'The GitHub Action for publishing version ${{ steps.version.outputs.current-version }} (triggered by ${{ github.triggering_actor }}) failed! See run at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' diff --git a/.github/workflows/trigger-circle-ci-workflow.yml b/.github/workflows/trigger-circle-ci-workflow.yml index a54a57743175..78de059ad4e3 100644 --- a/.github/workflows/trigger-circle-ci-workflow.yml +++ b/.github/workflows/trigger-circle-ci-workflow.yml @@ -9,6 +9,8 @@ on: branches: - next - main + - version-prerelease-from-** + - version-patch-from-** jobs: get-branch: diff --git a/.yarnrc.yml b/.yarnrc.yml index 2bc71525011c..05080224265e 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -2,4 +2,10 @@ installStatePath: ./.yarn/root-install-state.gz nodeLinker: node-modules +npmPublishAccess: public + +plugins: + - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs + spec: "@yarnpkg/plugin-workspace-tools" + yarnPath: .yarn/releases/yarn-3.4.1.cjs diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e67161964a7..940682e25a50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +## 7.0.21 + +- Angular: Fix 16.1 compatibility - [#23064](https://github.com/storybookjs/storybook/pull/23064), thanks [@ndelangen](https://github.com/ndelangen)! +- Angular: Fix ivy preset - [#23070](https://github.com/storybookjs/storybook/pull/23070), thanks [@ndelangen](https://github.com/ndelangen)! +- CLI: Improve steps in storybook init - [#22502](https://github.com/storybookjs/storybook/pull/22502), thanks [@yannbf](https://github.com/yannbf)! +- CLI: Skip builder selection for react native - [#23042](https://github.com/storybookjs/storybook/pull/23042), thanks [@dannyhw](https://github.com/dannyhw)! +- Core: Fix `builder-manager` adding multiple dashes to relative path - [#22974](https://github.com/storybookjs/storybook/pull/22974), thanks [@MarioCadenas](https://github.com/MarioCadenas)! +- Core: Improve `of={...}` DocBlock error in story index - [#22782](https://github.com/storybookjs/storybook/pull/22782), thanks [@shilman](https://github.com/shilman)! +- Dependencies: Set vue-component-type-helpers to latest - [#23015](https://github.com/storybookjs/storybook/pull/23015), thanks [@ndelangen](https://github.com/ndelangen)! +- Vue3: Fix source decorator to generate correct story code - [#22518](https://github.com/storybookjs/storybook/pull/22518), thanks [@chakAs3](https://github.com/chakAs3)! +- Web-components: Fix custom-elements order of property application - [#19183](https://github.com/storybookjs/storybook/pull/19183), thanks [@sonntag-philipp](https://github.com/sonntag-philipp)! + ## 7.0.20 (June 8, 2023) #### Bug Fixes diff --git a/CHANGELOG.prerelease.md b/CHANGELOG.prerelease.md new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/MIGRATION.md b/MIGRATION.md index e75f6916a032..9cc1a10178fe 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1247,6 +1247,111 @@ You can get the same result by setting [the parameter `parameters.docs.source.fo ### 7.0 Addon authors changes +#### New Addons API + +Storybook 7 adds 2 new packages for addon authors to use: `@storybook/preview-api` and `@storybook/manager-api`. +These 2 packages replace `@storybook/addons`. + +When adding addons to storybook, you can (for example) add panels: + +```js +import { addons } from '@storybook/manager-api'; + +addons.addPanel('my-panel', { + title: 'My Panel', + render: ({ active, key }) =>
My Panel
, +}); +``` + +Note that this before would import `addons` from `@storybook/addons`, but now it imports `{ addons }` from `@storybook/manager-api`. +The `addons` export is now a named export only, there's no default export anymore, so make sure to update this usage. + +The package `@storybook/addons` is still available, but it's only for backwards compatibility. It's not recommended to use it anymore. + +It's also been used by addon creators to gain access to a few APIs like `makeDecorator`. +These APIs are now available in `@storybook/preview-api`. + +Storybook users have had access to a few storybook-lifecycle hooks such as `useChannel`, `useParameter`, `useStorybookState`; +when these hooks are used in panels, they should be imported from `@storybook/manager-api`. +When these hooks are used in decorators/stories, they should be imported from `@storybook/preview-api`. + +Storybook 7 includes `@storybook/addons` shim package that provides the old API and calls the new API under the hood. +This backwards compatibility will be removed in a future release of storybook. + +Here's an example of using the new API: +The `@storybook/preview-api` is used here, because the `useEffect` hook is used in a decorator. + +```js +import { useEffect, makeDecorator } from '@storybook/preview-api'; + +export const withMyAddon = makeDecorator({ + name: 'withMyAddon', + parameterName: 'myAddon', + wrapper: (getStory) => { + useEffect(() => { + // do something with the options + }, []); + return getStory(context); + }, +}); +``` + +##### Specific instructions for addon creators + +If you're an addon creator, you'll have to update your addon to use the new APIs. + +That means you'll have to release a breaking release of your addon to make it compatible with Storybook 7. +It should no longer depend on `@storybook/addons`, but instead on `@storybook/preview-api` and/or `@storybook/manager-api`. + +You might also depend (and use) these packages in your addon's decorators: `@storybook/store`, `@storybook/preview-web`, `@storybook/core-client`, `@storybook/client-api`; these have all been consolidated into `@storybook/preview-api`. +So if you use any of these packages, please import what you need from `@storybook/preview-api` instead. + +Storybook 7 will prepare manager-code for the browser using ESbuild (before it was using a combination of webpack + babel). +This is a very important change, though it will not affect most addons. +It means that when creating custom addons, particularly custom addons within the repo in which they are consumed, +you will need to be aware that this code is not passed though babel, and thus will not use your babel config. +This can result in errors if you are using experimental JS features in your addon code, not supported yet by ESbuild, +or using babel dependent features such as Component selectors in Emotion. + +ESbuild also places some constraints on things you can import into your addon's manager code: only woff2 files are supported, and not all image file types are supported. +Here's the [list](https://github.com/storybookjs/storybook/blob/next/code/builders/builder-manager/src/index.ts#L53-L70) of supported file types. + +This is not configurable. + +If this is a problem for your addon, you need to pre-compile your addon's manager code to ensure it works. + +If you addon also introduces preview code (such a decorators) it will be passed though whatever builder + config the user has configured for their project; this hasn't changed. + +In both the preview and manager code it's good to remember [Storybook now targets modern browser only](#modern-browser-support). + +The package `@storybook/components` contain a lot of components useful for building addons. +Some of these addons have been moved to a new package `@storybook/blocks`. +These components were moved: `ColorControl`, `ColorPalette`, `ArgsTable`, `ArgRow`, `TabbedArgsTable`, `SectionRow`, `Source`, `Code`. + +##### Specific instructions for addon users + +All of storybook's core addons have been updated and are ready to use with Storybook 7. + +We're working with the community to update the most popular addons. +But if you're using an addon that hasn't been updated yet, it might not work. + +It's possible for example for older addons to use APIs that are no longer available in Storybook 7. +Your addon might not show upside of the storybook (manager) UI, or storybook might fail to start entirely. + +When this happens to you please open an issue on the addon's repo, and ask the addon author to update their addon to be compatible with Storybook 7. +It's also useful for the storybook team to know which addons are not yet compatible, so please open an issue on the storybook repo as well; particularly if the addon is popular and causes a critical failure. + +Here's a list of popular addons that are known not to be compatible with Storybook 7 yet: + +- [ ] [storybook-addon-jsx](https://github.com/storybookjs/addon-jsx) +- [ ] [storybook-addon-dark-mode](https://github.com/hipstersmoothie/storybook-dark-mode) + +Though storybook should de-duplicate storybook packages, storybook CLI's `upgrade` command will warn you when you have multiple storybook-dependencies, because it is a possibility that this causes addons/storybook to not work, so when running into issues, please run this: + +``` +npx sb upgrade +``` + #### register.js removed In SB 6.x and earlier, addons exported a `register.js` entry point by convention, and users would import this in `.storybook/manager.js`. This was [deprecated in SB 6.5](#deprecated-registerjs) diff --git a/code/__mocks__/fs-extra.js b/code/__mocks__/fs-extra.js index 8ec82c844bd6..a29315078944 100644 --- a/code/__mocks__/fs-extra.js +++ b/code/__mocks__/fs-extra.js @@ -15,6 +15,7 @@ function __setMockFiles(newMockFiles) { const readFile = async (filePath) => mockFiles[filePath]; const readFileSync = (filePath = '') => mockFiles[filePath]; const existsSync = (filePath) => !!mockFiles[filePath]; +const readJson = (filePath = '') => JSON.parse(mockFiles[filePath]); const readJsonSync = (filePath = '') => JSON.parse(mockFiles[filePath]); const lstatSync = (filePath) => ({ isFile: () => !!mockFiles[filePath], @@ -24,6 +25,7 @@ const lstatSync = (filePath) => ({ fs.__setMockFiles = __setMockFiles; fs.readFile = readFile; fs.readFileSync = readFileSync; +fs.readJson = readJson; fs.readJsonSync = readJsonSync; fs.existsSync = existsSync; fs.lstatSync = lstatSync; diff --git a/code/addons/a11y/package.json b/code/addons/a11y/package.json index 5ae2a36828c7..b7b6b8e6e329 100644 --- a/code/addons/a11y/package.json +++ b/code/addons/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-a11y", - "version": "7.0.20", + "version": "7.0.21", "description": "Test component compliance with web accessibility standards", "keywords": [ "a11y", @@ -63,16 +63,16 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/addon-highlight": "7.0.20", - "@storybook/channels": "7.0.20", - "@storybook/client-logger": "7.0.20", - "@storybook/components": "7.0.20", - "@storybook/core-events": "7.0.20", + "@storybook/addon-highlight": "7.0.21", + "@storybook/channels": "7.0.21", + "@storybook/client-logger": "7.0.21", + "@storybook/components": "7.0.21", + "@storybook/core-events": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/theming": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/manager-api": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/theming": "7.0.21", + "@storybook/types": "7.0.21", "axe-core": "^4.2.0", "lodash": "^4.17.21", "react-resize-detector": "^7.1.2" diff --git a/code/addons/actions/package.json b/code/addons/actions/package.json index fcd2ef612a66..2aa90463ab29 100644 --- a/code/addons/actions/package.json +++ b/code/addons/actions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-actions", - "version": "7.0.20", + "version": "7.0.21", "description": "Get UI feedback when an action is performed on an interactive element", "keywords": [ "storybook", @@ -80,14 +80,14 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/components": "7.0.20", - "@storybook/core-events": "7.0.20", + "@storybook/client-logger": "7.0.21", + "@storybook/components": "7.0.21", + "@storybook/core-events": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/theming": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/manager-api": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/theming": "7.0.21", + "@storybook/types": "7.0.21", "dequal": "^2.0.2", "lodash": "^4.17.21", "polished": "^4.2.2", diff --git a/code/addons/backgrounds/package.json b/code/addons/backgrounds/package.json index 8f8198096e45..7c274dd7c980 100644 --- a/code/addons/backgrounds/package.json +++ b/code/addons/backgrounds/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-backgrounds", - "version": "7.0.20", + "version": "7.0.21", "description": "Switch backgrounds to view components in different settings", "keywords": [ "addon", @@ -76,14 +76,14 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/components": "7.0.20", - "@storybook/core-events": "7.0.20", + "@storybook/client-logger": "7.0.21", + "@storybook/components": "7.0.21", + "@storybook/core-events": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/theming": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/manager-api": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/theming": "7.0.21", + "@storybook/types": "7.0.21", "memoizerific": "^1.11.3", "ts-dedent": "^2.0.0" }, diff --git a/code/addons/controls/package.json b/code/addons/controls/package.json index 5d778087040e..c2c9fc6f883b 100644 --- a/code/addons/controls/package.json +++ b/code/addons/controls/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-controls", - "version": "7.0.20", + "version": "7.0.21", "description": "Interact with component inputs dynamically in the Storybook UI", "keywords": [ "addon", @@ -68,15 +68,15 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/blocks": "7.0.20", - "@storybook/client-logger": "7.0.20", - "@storybook/components": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/manager-api": "7.0.20", - "@storybook/node-logger": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/theming": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/blocks": "7.0.21", + "@storybook/client-logger": "7.0.21", + "@storybook/components": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/manager-api": "7.0.21", + "@storybook/node-logger": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/theming": "7.0.21", + "@storybook/types": "7.0.21", "lodash": "^4.17.21", "ts-dedent": "^2.0.0" }, diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index e3ee1d152b17..70689f08e5b1 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-docs", - "version": "7.0.20", + "version": "7.0.21", "description": "Document component usage and properties in Markdown", "keywords": [ "addon", @@ -101,19 +101,19 @@ "@babel/plugin-transform-react-jsx": "^7.19.0", "@jest/transform": "^29.3.1", "@mdx-js/react": "^2.1.5", - "@storybook/blocks": "7.0.20", - "@storybook/client-logger": "7.0.20", - "@storybook/components": "7.0.20", - "@storybook/csf-plugin": "7.0.20", - "@storybook/csf-tools": "7.0.20", + "@storybook/blocks": "7.0.21", + "@storybook/client-logger": "7.0.21", + "@storybook/components": "7.0.21", + "@storybook/csf-plugin": "7.0.21", + "@storybook/csf-tools": "7.0.21", "@storybook/global": "^5.0.0", "@storybook/mdx2-csf": "^1.0.0", - "@storybook/node-logger": "7.0.20", - "@storybook/postinstall": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/react-dom-shim": "7.0.20", - "@storybook/theming": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/node-logger": "7.0.21", + "@storybook/postinstall": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/react-dom-shim": "7.0.21", + "@storybook/theming": "7.0.21", + "@storybook/types": "7.0.21", "fs-extra": "^11.1.0", "remark-external-links": "^8.0.0", "remark-slug": "^6.0.0", diff --git a/code/addons/essentials/package.json b/code/addons/essentials/package.json index c573b0d8b93e..e83815e307d4 100644 --- a/code/addons/essentials/package.json +++ b/code/addons/essentials/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-essentials", - "version": "7.0.20", + "version": "7.0.21", "description": "Curated addons to bring out the best of Storybook", "keywords": [ "addon", @@ -119,23 +119,23 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/addon-actions": "7.0.20", - "@storybook/addon-backgrounds": "7.0.20", - "@storybook/addon-controls": "7.0.20", - "@storybook/addon-docs": "7.0.20", - "@storybook/addon-highlight": "7.0.20", - "@storybook/addon-measure": "7.0.20", - "@storybook/addon-outline": "7.0.20", - "@storybook/addon-toolbars": "7.0.20", - "@storybook/addon-viewport": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/manager-api": "7.0.20", - "@storybook/node-logger": "7.0.20", - "@storybook/preview-api": "7.0.20", + "@storybook/addon-actions": "7.0.21", + "@storybook/addon-backgrounds": "7.0.21", + "@storybook/addon-controls": "7.0.21", + "@storybook/addon-docs": "7.0.21", + "@storybook/addon-highlight": "7.0.21", + "@storybook/addon-measure": "7.0.21", + "@storybook/addon-outline": "7.0.21", + "@storybook/addon-toolbars": "7.0.21", + "@storybook/addon-viewport": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/manager-api": "7.0.21", + "@storybook/node-logger": "7.0.21", + "@storybook/preview-api": "7.0.21", "ts-dedent": "^2.0.0" }, "devDependencies": { - "@storybook/vue": "7.0.20", + "@storybook/vue": "7.0.21", "typescript": "^4.9.3" }, "peerDependencies": { diff --git a/code/addons/gfm/package.json b/code/addons/gfm/package.json index d791a87fdb0c..a8abccfe6c1d 100644 --- a/code/addons/gfm/package.json +++ b/code/addons/gfm/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-mdx-gfm", - "version": "7.0.20", + "version": "7.0.21", "description": "GitHub Flavored Markdown in Storybook", "keywords": [ "addon", @@ -51,7 +51,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/node-logger": "7.0.20", + "@storybook/node-logger": "7.0.21", "remark-gfm": "^3.0.1", "ts-dedent": "^2.0.0" }, diff --git a/code/addons/highlight/package.json b/code/addons/highlight/package.json index 6a78b4dad225..ea3a82096936 100644 --- a/code/addons/highlight/package.json +++ b/code/addons/highlight/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-highlight", - "version": "7.0.20", + "version": "7.0.21", "description": "Highlight DOM nodes within your stories", "keywords": [ "storybook-addons", @@ -61,9 +61,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/core-events": "7.0.20", + "@storybook/core-events": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/preview-api": "7.0.20" + "@storybook/preview-api": "7.0.21" }, "devDependencies": { "@types/webpack-env": "^1.16.0", diff --git a/code/addons/interactions/package.json b/code/addons/interactions/package.json index af081ba049e8..5e589ac38428 100644 --- a/code/addons/interactions/package.json +++ b/code/addons/interactions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-interactions", - "version": "7.0.20", + "version": "7.0.21", "description": "Automate, test and debug user interactions", "keywords": [ "storybook-addons", @@ -72,16 +72,16 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/components": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/core-events": "7.0.20", + "@storybook/client-logger": "7.0.21", + "@storybook/components": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/core-events": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/instrumenter": "7.0.20", - "@storybook/manager-api": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/theming": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/instrumenter": "7.0.21", + "@storybook/manager-api": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/theming": "7.0.21", + "@storybook/types": "7.0.21", "jest-mock": "^27.0.6", "polished": "^4.2.2", "ts-dedent": "^2.2.0" diff --git a/code/addons/jest/package.json b/code/addons/jest/package.json index e912093bf379..e281743318f0 100644 --- a/code/addons/jest/package.json +++ b/code/addons/jest/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-jest", - "version": "7.0.20", + "version": "7.0.21", "description": "React storybook addon that show component jest report", "keywords": [ "addon", @@ -70,13 +70,13 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/components": "7.0.20", - "@storybook/core-events": "7.0.20", + "@storybook/client-logger": "7.0.21", + "@storybook/components": "7.0.21", + "@storybook/core-events": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/theming": "7.0.20", + "@storybook/manager-api": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/theming": "7.0.21", "react-resize-detector": "^7.1.2", "upath": "^1.2.0" }, diff --git a/code/addons/links/package.json b/code/addons/links/package.json index 08e8f02f93a7..5b3a169d14d9 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-links", - "version": "7.0.20", + "version": "7.0.21", "description": "Link stories together to build demos and prototypes with your UI components", "keywords": [ "addon", @@ -80,14 +80,14 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/core-events": "7.0.20", + "@storybook/client-logger": "7.0.21", + "@storybook/core-events": "7.0.21", "@storybook/csf": "^0.1.0", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/router": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/manager-api": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/router": "7.0.21", + "@storybook/types": "7.0.21", "prop-types": "^15.7.2", "ts-dedent": "^2.0.0" }, diff --git a/code/addons/measure/package.json b/code/addons/measure/package.json index b94505b7bd57..a3f952bd4e63 100644 --- a/code/addons/measure/package.json +++ b/code/addons/measure/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-measure", - "version": "7.0.20", + "version": "7.0.21", "description": "Inspect layouts by visualizing the box model", "keywords": [ "storybook-addons", @@ -75,13 +75,13 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/components": "7.0.20", - "@storybook/core-events": "7.0.20", + "@storybook/client-logger": "7.0.21", + "@storybook/components": "7.0.21", + "@storybook/core-events": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/types": "7.0.20" + "@storybook/manager-api": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/types": "7.0.21" }, "devDependencies": { "typescript": "~4.9.3" diff --git a/code/addons/outline/package.json b/code/addons/outline/package.json index e68a14d9ac94..d0d545928a45 100644 --- a/code/addons/outline/package.json +++ b/code/addons/outline/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-outline", - "version": "7.0.20", + "version": "7.0.21", "description": "Outline all elements with CSS to help with layout placement and alignment", "keywords": [ "storybook-addons", @@ -78,13 +78,13 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/components": "7.0.20", - "@storybook/core-events": "7.0.20", + "@storybook/client-logger": "7.0.21", + "@storybook/components": "7.0.21", + "@storybook/core-events": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/manager-api": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/types": "7.0.21", "ts-dedent": "^2.0.0" }, "devDependencies": { diff --git a/code/addons/storyshots-core/package.json b/code/addons/storyshots-core/package.json index d6fd218ac0db..3f05bf94dcd8 100644 --- a/code/addons/storyshots-core/package.json +++ b/code/addons/storyshots-core/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storyshots", - "version": "7.0.20", + "version": "7.0.21", "description": "Take a code snapshot of every story automatically with Jest", "keywords": [ "addon", @@ -37,12 +37,12 @@ "dependencies": { "@jest/transform": "^29.3.1", "@storybook/babel-plugin-require-context-hook": "1.0.1", - "@storybook/client-api": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/core-webpack": "7.0.20", + "@storybook/client-api": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/core-webpack": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/preview-api": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/preview-api": "7.0.21", + "@storybook/types": "7.0.21", "@types/glob": "^7.1.3", "@types/jest-specific-snapshot": "^0.5.6", "glob": "^8.1.0", @@ -57,11 +57,11 @@ "@angular/core": "^13.3.6", "@angular/platform-browser-dynamic": "^13.3.6", "@emotion/jest": "^11.8.0", - "@storybook/addon-docs": "7.0.20", - "@storybook/angular": "7.0.20", - "@storybook/react": "7.0.20", - "@storybook/vue": "7.0.20", - "@storybook/vue3": "7.0.20", + "@storybook/addon-docs": "7.0.21", + "@storybook/angular": "7.0.21", + "@storybook/react": "7.0.21", + "@storybook/vue": "7.0.21", + "@storybook/vue3": "7.0.21", "babel-loader": "^9.1.2", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.5", diff --git a/code/addons/storyshots-puppeteer/package.json b/code/addons/storyshots-puppeteer/package.json index 765ff3709d4f..60353d22ffaa 100644 --- a/code/addons/storyshots-puppeteer/package.json +++ b/code/addons/storyshots-puppeteer/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storyshots-puppeteer", - "version": "7.0.20", + "version": "7.0.21", "description": "Image snapshots addition to StoryShots based on puppeteer", "keywords": [ "addon", @@ -36,8 +36,8 @@ "dependencies": { "@axe-core/puppeteer": "^4.2.0", "@storybook/csf": "^0.1.0", - "@storybook/node-logger": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/node-logger": "7.0.21", + "@storybook/types": "7.0.21", "@types/jest-image-snapshot": "^5.1.0", "jest-image-snapshot": "^6.0.0" }, @@ -49,7 +49,7 @@ "rimraf": "^3.0.2" }, "peerDependencies": { - "@storybook/addon-storyshots": "7.0.20", + "@storybook/addon-storyshots": "7.0.21", "puppeteer": ">=2.0.0" }, "peerDependenciesMeta": { diff --git a/code/addons/storysource/package.json b/code/addons/storysource/package.json index 31ed317bf36a..32d1325ed160 100644 --- a/code/addons/storysource/package.json +++ b/code/addons/storysource/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storysource", - "version": "7.0.20", + "version": "7.0.21", "description": "View a story’s source code to see how it works and paste into your app", "keywords": [ "addon", @@ -53,13 +53,13 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/components": "7.0.20", - "@storybook/manager-api": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/router": "7.0.20", - "@storybook/source-loader": "7.0.20", - "@storybook/theming": "7.0.20", + "@storybook/client-logger": "7.0.21", + "@storybook/components": "7.0.21", + "@storybook/manager-api": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/router": "7.0.21", + "@storybook/source-loader": "7.0.21", + "@storybook/theming": "7.0.21", "estraverse": "^5.2.0", "prop-types": "^15.7.2", "react-syntax-highlighter": "^15.5.0" diff --git a/code/addons/toolbars/package.json b/code/addons/toolbars/package.json index 74cda4b938db..5832c1d9eded 100644 --- a/code/addons/toolbars/package.json +++ b/code/addons/toolbars/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-toolbars", - "version": "7.0.20", + "version": "7.0.21", "description": "Create your own toolbar items that control story rendering", "keywords": [ "addon", @@ -68,11 +68,11 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/components": "7.0.20", - "@storybook/manager-api": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/theming": "7.0.20" + "@storybook/client-logger": "7.0.21", + "@storybook/components": "7.0.21", + "@storybook/manager-api": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/theming": "7.0.21" }, "devDependencies": { "typescript": "~4.9.3" diff --git a/code/addons/viewport/package.json b/code/addons/viewport/package.json index 6b1b28b76e40..56433dba236d 100644 --- a/code/addons/viewport/package.json +++ b/code/addons/viewport/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-viewport", - "version": "7.0.20", + "version": "7.0.21", "description": "Build responsive components by adjusting Storybook’s viewport size and orientation", "keywords": [ "addon", @@ -73,13 +73,13 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/components": "7.0.20", - "@storybook/core-events": "7.0.20", + "@storybook/client-logger": "7.0.21", + "@storybook/components": "7.0.21", + "@storybook/core-events": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/theming": "7.0.20", + "@storybook/manager-api": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/theming": "7.0.21", "memoizerific": "^1.11.3", "prop-types": "^15.7.2" }, diff --git a/code/e2e-tests/addon-viewport.spec.ts b/code/e2e-tests/addon-viewport.spec.ts index 18d72e112646..ec96a3bd93ea 100644 --- a/code/e2e-tests/addon-viewport.spec.ts +++ b/code/e2e-tests/addon-viewport.spec.ts @@ -20,4 +20,24 @@ test.describe('addon-viewport', () => { // Check that Button story is still displayed await expect(sbPage.previewRoot()).toContainText('Button'); }); + + test('iframe width should be changed when a mobile viewport is selected', async ({ page }) => { + const sbPage = new SbPage(page); + + // Click on viewport button and select small mobile + await sbPage.navigateToStory('example/button', 'primary'); + + // Measure the original dimensions of previewRoot + const originalDimensions = await sbPage.getCanvasBodyElement().boundingBox(); + await expect(originalDimensions?.width).toBeDefined(); + + await sbPage.selectToolbar('[title="Change the size of the preview"]', '#list-item-mobile1'); + + // Measure the adjusted dimensions of previewRoot after clicking the mobile item. + const adjustedDimensions = await sbPage.getCanvasBodyElement().boundingBox(); + await expect(adjustedDimensions?.width).toBeDefined(); + + // Compare the two widths + await expect(adjustedDimensions?.width).not.toBe(originalDimensions?.width); + }); }); diff --git a/code/frameworks/angular/package.json b/code/frameworks/angular/package.json index c064dd080d1f..798200de166c 100644 --- a/code/frameworks/angular/package.json +++ b/code/frameworks/angular/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/angular", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.", "keywords": [ "storybook", @@ -36,21 +36,21 @@ "prep": "../../../scripts/prepare/tsc.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.20", - "@storybook/cli": "7.0.20", - "@storybook/client-logger": "7.0.20", - "@storybook/core-client": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/core-events": "7.0.20", - "@storybook/core-server": "7.0.20", - "@storybook/core-webpack": "7.0.20", - "@storybook/docs-tools": "7.0.20", + "@storybook/builder-webpack5": "7.0.21", + "@storybook/cli": "7.0.21", + "@storybook/client-logger": "7.0.21", + "@storybook/core-client": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/core-events": "7.0.21", + "@storybook/core-server": "7.0.21", + "@storybook/core-webpack": "7.0.21", + "@storybook/docs-tools": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.20", - "@storybook/node-logger": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/telemetry": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/manager-api": "7.0.21", + "@storybook/node-logger": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/telemetry": "7.0.21", + "@storybook/types": "7.0.21", "@types/node": "^16.0.0", "@types/react": "^16.14.34", "@types/react-dom": "^16.9.14", diff --git a/code/frameworks/angular/src/server/angular-cli-webpack.js b/code/frameworks/angular/src/server/angular-cli-webpack.js index feb510df501f..76d05ff55e72 100644 --- a/code/frameworks/angular/src/server/angular-cli-webpack.js +++ b/code/frameworks/angular/src/server/angular-cli-webpack.js @@ -1,19 +1,48 @@ +/* eslint-disable global-require */ // Private angular devkit stuff const { generateI18nBrowserWebpackConfigFromContext, } = require('@angular-devkit/build-angular/src/utils/webpack-browser-config'); -const { - getCommonConfig, - getStylesConfig, - getDevServerConfig, - getTypeScriptConfig, -} = require('@angular-devkit/build-angular/src/webpack/configs'); const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); const { filterOutStylingRules } = require('./utils/filter-out-styling-rules'); const { default: StorybookNormalizeAngularEntryPlugin, } = require('./plugins/storybook-normalize-angular-entry-plugin'); +const getAngularWebpackUtils = () => { + try { + // Angular < 16.1.0 + const { + getCommonConfig, + getStylesConfig, + getDevServerConfig, + getTypeScriptConfig, + } = require('@angular-devkit/build-angular/src/webpack/configs'); + + return { + getCommonConfig, + getStylesConfig, + getDevServerConfig, + getTypeScriptConfig, + }; + } catch (e) { + // Angular > 16.1.0 + const { + getCommonConfig, + getStylesConfig, + getDevServerConfig, + getTypeScriptConfig, + } = require('@angular-devkit/build-angular/src/tools/webpack/configs'); + + return { + getCommonConfig, + getStylesConfig, + getDevServerConfig, + getTypeScriptConfig, + }; + } +}; + /** * Extract webpack config from angular-cli 13.x.x * ⚠️ This file is in JavaScript to not use TypeScript. Because current storybook TypeScript version is not compatible with Angular CLI. @@ -26,6 +55,8 @@ exports.getWebpackConfig = async (baseConfig, { builderOptions, builderContext } /** * Get angular-cli Webpack config */ + const { getCommonConfig, getStylesConfig, getDevServerConfig, getTypeScriptConfig } = + getAngularWebpackUtils(); const { config: cliConfig } = await generateI18nBrowserWebpackConfigFromContext( { // Default options diff --git a/code/frameworks/angular/src/server/framework-preset-angular-ivy.ts b/code/frameworks/angular/src/server/framework-preset-angular-ivy.ts index 5d22cf4210cc..987df7f78005 100644 --- a/code/frameworks/angular/src/server/framework-preset-angular-ivy.ts +++ b/code/frameworks/angular/src/server/framework-preset-angular-ivy.ts @@ -1,5 +1,4 @@ import { Configuration } from 'webpack'; -import { VERSION } from '@angular/core'; import * as path from 'path'; import { Preset } from '@storybook/types'; @@ -50,6 +49,7 @@ export const runNgcc = async () => { }; export const webpack = async (webpackConfig: Configuration, options: PresetOptions) => { + const { VERSION } = await loadEsmModule('@angular/core'); const framework = await options.presets.apply('framework'); const angularOptions = (typeof framework === 'object' ? framework.options : {}) as AngularOptions; const isAngular16OrNewer = parseInt(VERSION.major, 10) >= 16; diff --git a/code/frameworks/ember/package.json b/code/frameworks/ember/package.json index 09c95456da2b..fcfd3ea2f2c0 100644 --- a/code/frameworks/ember/package.json +++ b/code/frameworks/ember/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/ember", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.", "homepage": "https://github.com/storybookjs/storybook/tree/next/code/frameworks/ember", "bugs": { @@ -31,12 +31,12 @@ "prep": "../../../scripts/prepare/tsc.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/docs-tools": "7.0.20", + "@storybook/builder-webpack5": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/docs-tools": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/preview-api": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/preview-api": "7.0.21", + "@storybook/types": "7.0.21", "ts-dedent": "^2.0.0" }, "devDependencies": { diff --git a/code/frameworks/html-vite/package.json b/code/frameworks/html-vite/package.json index e845b98e2908..422906d9d338 100644 --- a/code/frameworks/html-vite/package.json +++ b/code/frameworks/html-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html-vite", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for HTML and Vite: Develop HTML in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -47,15 +47,15 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/addons": "7.0.20", - "@storybook/builder-vite": "7.0.20", - "@storybook/channel-postmessage": "7.0.20", - "@storybook/channel-websocket": "7.0.20", - "@storybook/client-api": "7.0.20", - "@storybook/core-server": "7.0.20", - "@storybook/html": "7.0.20", - "@storybook/node-logger": "7.0.20", - "@storybook/preview-web": "7.0.20", + "@storybook/addons": "7.0.21", + "@storybook/builder-vite": "7.0.21", + "@storybook/channel-postmessage": "7.0.21", + "@storybook/channel-websocket": "7.0.21", + "@storybook/client-api": "7.0.21", + "@storybook/core-server": "7.0.21", + "@storybook/html": "7.0.21", + "@storybook/node-logger": "7.0.21", + "@storybook/preview-web": "7.0.21", "magic-string": "^0.27.0" }, "devDependencies": { diff --git a/code/frameworks/html-webpack5/package.json b/code/frameworks/html-webpack5/package.json index 36efc70d1026..bd60af0382bc 100644 --- a/code/frameworks/html-webpack5/package.json +++ b/code/frameworks/html-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html-webpack5", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -47,11 +47,11 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.20", - "@storybook/core-common": "7.0.20", + "@storybook/builder-webpack5": "7.0.21", + "@storybook/core-common": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/html": "7.0.20", - "@storybook/preset-html-webpack": "7.0.20", + "@storybook/html": "7.0.21", + "@storybook/preset-html-webpack": "7.0.21", "@types/node": "^16.0.0" }, "devDependencies": { diff --git a/code/frameworks/nextjs/package.json b/code/frameworks/nextjs/package.json index d02403ddbcdc..7b8e997536cc 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/nextjs", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Next.js", "keywords": [ "storybook", @@ -70,13 +70,13 @@ "@babel/preset-react": "^7.18.6", "@babel/preset-typescript": "^7.21.0", "@babel/runtime": "^7.21.0", - "@storybook/addon-actions": "7.0.20", - "@storybook/builder-webpack5": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/node-logger": "7.0.20", - "@storybook/preset-react-webpack": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/react": "7.0.20", + "@storybook/addon-actions": "7.0.21", + "@storybook/builder-webpack5": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/node-logger": "7.0.21", + "@storybook/preset-react-webpack": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/react": "7.0.21", "@types/node": "^16.0.0", "css-loader": "^6.7.3", "find-up": "^5.0.0", diff --git a/code/frameworks/preact-vite/package.json b/code/frameworks/preact-vite/package.json index 54b679fe245e..cececb239995 100644 --- a/code/frameworks/preact-vite/package.json +++ b/code/frameworks/preact-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact-vite", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Preact and Vite: Develop Preact components in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -47,8 +47,8 @@ }, "dependencies": { "@preact/preset-vite": "^2.0.0", - "@storybook/builder-vite": "7.0.20", - "@storybook/preact": "7.0.20" + "@storybook/builder-vite": "7.0.21", + "@storybook/preact": "7.0.21" }, "devDependencies": { "@types/node": "^16.0.0", diff --git a/code/frameworks/preact-webpack5/package.json b/code/frameworks/preact-webpack5/package.json index 40f4419cedfd..8634f2a8cd0b 100644 --- a/code/frameworks/preact-webpack5/package.json +++ b/code/frameworks/preact-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact-webpack5", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Preact: Develop Preact Component in isolation.", "keywords": [ "storybook" @@ -47,10 +47,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/preact": "7.0.20", - "@storybook/preset-preact-webpack": "7.0.20", + "@storybook/builder-webpack5": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/preact": "7.0.21", + "@storybook/preset-preact-webpack": "7.0.21", "@types/node": "^16.0.0" }, "devDependencies": { diff --git a/code/frameworks/react-vite/package.json b/code/frameworks/react-vite/package.json index bc8cb349f461..571763db4cc6 100644 --- a/code/frameworks/react-vite/package.json +++ b/code/frameworks/react-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-vite", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for React and Vite: Develop React components in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -49,8 +49,8 @@ "dependencies": { "@joshwooding/vite-plugin-react-docgen-typescript": "0.2.1", "@rollup/pluginutils": "^4.2.0", - "@storybook/builder-vite": "7.0.20", - "@storybook/react": "7.0.20", + "@storybook/builder-vite": "7.0.21", + "@storybook/react": "7.0.21", "@vitejs/plugin-react": "^3.0.1", "ast-types": "^0.14.2", "magic-string": "^0.27.0", diff --git a/code/frameworks/react-webpack5/package.json b/code/frameworks/react-webpack5/package.json index 141630953668..4d7dd7d9935d 100644 --- a/code/frameworks/react-webpack5/package.json +++ b/code/frameworks/react-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-webpack5", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for React: Develop React Component in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -47,9 +47,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.20", - "@storybook/preset-react-webpack": "7.0.20", - "@storybook/react": "7.0.20", + "@storybook/builder-webpack5": "7.0.21", + "@storybook/preset-react-webpack": "7.0.21", + "@storybook/react": "7.0.21", "@types/node": "^16.0.0" }, "devDependencies": { diff --git a/code/frameworks/server-webpack5/package.json b/code/frameworks/server-webpack5/package.json index 750e0814535d..3f709f758d4e 100644 --- a/code/frameworks/server-webpack5/package.json +++ b/code/frameworks/server-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/server-webpack5", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -47,10 +47,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/preset-server-webpack": "7.0.20", - "@storybook/server": "7.0.20", + "@storybook/builder-webpack5": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/preset-server-webpack": "7.0.21", + "@storybook/server": "7.0.21", "@types/node": "^16.0.0" }, "devDependencies": { diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index 6c24f356f0e1..56cb73648605 100644 --- a/code/frameworks/svelte-vite/package.json +++ b/code/frameworks/svelte-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte-vite", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Svelte and Vite: Develop Svelte components in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -47,9 +47,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-vite": "7.0.20", - "@storybook/node-logger": "7.0.20", - "@storybook/svelte": "7.0.20", + "@storybook/builder-vite": "7.0.21", + "@storybook/node-logger": "7.0.21", + "@storybook/svelte": "7.0.21", "@sveltejs/vite-plugin-svelte": "^2.0.0", "magic-string": "^0.27.0", "svelte": "^3.0.0", diff --git a/code/frameworks/svelte-webpack5/package.json b/code/frameworks/svelte-webpack5/package.json index 05455c331ad7..7709ed3dfa5f 100644 --- a/code/frameworks/svelte-webpack5/package.json +++ b/code/frameworks/svelte-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte-webpack5", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -47,10 +47,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/preset-svelte-webpack": "7.0.20", - "@storybook/svelte": "7.0.20" + "@storybook/builder-webpack5": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/preset-svelte-webpack": "7.0.21", + "@storybook/svelte": "7.0.21" }, "devDependencies": { "svelte": "^3.48.0", diff --git a/code/frameworks/sveltekit/package.json b/code/frameworks/sveltekit/package.json index 78932c2c46cc..e4e1a94eafa4 100644 --- a/code/frameworks/sveltekit/package.json +++ b/code/frameworks/sveltekit/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/sveltekit", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for SvelteKit", "keywords": [ "storybook", @@ -50,9 +50,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-vite": "7.0.20", - "@storybook/svelte": "7.0.20", - "@storybook/svelte-vite": "7.0.20" + "@storybook/builder-vite": "7.0.21", + "@storybook/svelte": "7.0.21", + "@storybook/svelte-vite": "7.0.21" }, "devDependencies": { "@types/node": "^16.0.0", diff --git a/code/frameworks/vue-vite/package.json b/code/frameworks/vue-vite/package.json index d05bd52d21f2..0aee8864ce56 100644 --- a/code/frameworks/vue-vite/package.json +++ b/code/frameworks/vue-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue-vite", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Vue2 and Vite: Develop Vue2 Components in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -47,10 +47,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-vite": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/core-server": "7.0.20", - "@storybook/vue": "7.0.20", + "@storybook/builder-vite": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/core-server": "7.0.21", + "@storybook/vue": "7.0.21", "magic-string": "^0.27.0", "vue-docgen-api": "^4.40.0" }, diff --git a/code/frameworks/vue-webpack5/package.json b/code/frameworks/vue-webpack5/package.json index 7946b8f9a8cf..be52b71dcd88 100644 --- a/code/frameworks/vue-webpack5/package.json +++ b/code/frameworks/vue-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue-webpack5", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -47,10 +47,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/preset-vue-webpack": "7.0.20", - "@storybook/vue": "7.0.20", + "@storybook/builder-webpack5": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/preset-vue-webpack": "7.0.21", + "@storybook/vue": "7.0.21", "@types/node": "^16.0.0" }, "devDependencies": { diff --git a/code/frameworks/vue3-vite/package.json b/code/frameworks/vue3-vite/package.json index 8f7a32ef9118..89f50bb14095 100644 --- a/code/frameworks/vue3-vite/package.json +++ b/code/frameworks/vue3-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3-vite", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Vue3 and Vite: Develop Vue3 components in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -47,9 +47,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-vite": "7.0.20", - "@storybook/core-server": "7.0.20", - "@storybook/vue3": "7.0.20", + "@storybook/builder-vite": "7.0.21", + "@storybook/core-server": "7.0.21", + "@storybook/vue3": "7.0.21", "@vitejs/plugin-vue": "^4.0.0", "magic-string": "^0.27.0", "vue-docgen-api": "^4.40.0" diff --git a/code/frameworks/vue3-webpack5/package.json b/code/frameworks/vue3-webpack5/package.json index 88d72b12f1bb..accbb9e49b5e 100644 --- a/code/frameworks/vue3-webpack5/package.json +++ b/code/frameworks/vue3-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3-webpack5", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -47,10 +47,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-webpack5": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/preset-vue3-webpack": "7.0.20", - "@storybook/vue3": "7.0.20", + "@storybook/builder-webpack5": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/preset-vue3-webpack": "7.0.21", + "@storybook/vue3": "7.0.21", "@types/node": "^16.0.0" }, "devDependencies": { diff --git a/code/frameworks/web-components-vite/package.json b/code/frameworks/web-components-vite/package.json index 118437cea04d..d69e9e109f87 100644 --- a/code/frameworks/web-components-vite/package.json +++ b/code/frameworks/web-components-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components-vite", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for web-components and Vite: Develop Web Components in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -47,10 +47,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/builder-vite": "7.0.20", - "@storybook/core-server": "7.0.20", - "@storybook/node-logger": "7.0.20", - "@storybook/web-components": "7.0.20", + "@storybook/builder-vite": "7.0.21", + "@storybook/core-server": "7.0.21", + "@storybook/node-logger": "7.0.21", + "@storybook/web-components": "7.0.21", "magic-string": "^0.27.0" }, "devDependencies": { diff --git a/code/frameworks/web-components-webpack5/package.json b/code/frameworks/web-components-webpack5/package.json index 502a7f9a8092..4d61524316c1 100644 --- a/code/frameworks/web-components-webpack5/package.json +++ b/code/frameworks/web-components-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components-webpack5", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.", "keywords": [ "lit", @@ -51,10 +51,10 @@ }, "dependencies": { "@babel/preset-env": "^7.20.2", - "@storybook/builder-webpack5": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/preset-web-components-webpack": "7.0.20", - "@storybook/web-components": "7.0.20", + "@storybook/builder-webpack5": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/preset-web-components-webpack": "7.0.21", + "@storybook/web-components": "7.0.21", "@types/node": "^16.0.0" }, "devDependencies": { diff --git a/code/lib/addons/package.json b/code/lib/addons/package.json index a2433f0d8104..e5545a34bc75 100644 --- a/code/lib/addons/package.json +++ b/code/lib/addons/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addons", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook addons store", "keywords": [ "storybook" @@ -44,9 +44,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/manager-api": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/types": "7.0.20" + "@storybook/manager-api": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/types": "7.0.21" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/builder-manager/package.json b/code/lib/builder-manager/package.json index fae08bddff2e..4d9fb6347882 100644 --- a/code/lib/builder-manager/package.json +++ b/code/lib/builder-manager/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-manager", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook manager builder", "keywords": [ "storybook" @@ -44,9 +44,9 @@ }, "dependencies": { "@fal-works/esbuild-plugin-global-externals": "^2.1.2", - "@storybook/core-common": "7.0.20", - "@storybook/manager": "7.0.20", - "@storybook/node-logger": "7.0.20", + "@storybook/core-common": "7.0.21", + "@storybook/manager": "7.0.21", + "@storybook/node-logger": "7.0.21", "@types/ejs": "^3.1.1", "@types/find-cache-dir": "^3.2.1", "@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.10", diff --git a/code/lib/builder-manager/src/utils/managerEntries.ts b/code/lib/builder-manager/src/utils/managerEntries.ts index c6ac46a0a242..51413bfb852e 100644 --- a/code/lib/builder-manager/src/utils/managerEntries.ts +++ b/code/lib/builder-manager/src/utils/managerEntries.ts @@ -4,7 +4,12 @@ import { join, parse, relative, sep } from 'node:path'; import slash from 'slash'; const sanitizeBase = (path: string) => { - return path.replaceAll('.', '').replaceAll('@', '').replaceAll(sep, '-').replaceAll('/', '-'); + return path + .replaceAll('.', '') + .replaceAll('@', '') + .replaceAll(sep, '-') + .replaceAll('/', '-') + .replaceAll(new RegExp(/^(-)+/g), ''); }; const sanitizeFinal = (path: string) => { diff --git a/code/lib/builder-vite/package.json b/code/lib/builder-vite/package.json index 300a66c48d82..ab21bfc805d8 100644 --- a/code/lib/builder-vite/package.json +++ b/code/lib/builder-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-vite", - "version": "7.0.20", + "version": "7.0.21", "description": "A plugin to run and build Storybooks with Vite", "homepage": "https://github.com/storybookjs/storybook/tree/next/code/lib/builder-vite/#readme", "bugs": { @@ -42,16 +42,16 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/channel-postmessage": "7.0.20", - "@storybook/channel-websocket": "7.0.20", - "@storybook/client-logger": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/csf-plugin": "7.0.20", + "@storybook/channel-postmessage": "7.0.21", + "@storybook/channel-websocket": "7.0.21", + "@storybook/client-logger": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/csf-plugin": "7.0.21", "@storybook/mdx2-csf": "^1.0.0", - "@storybook/node-logger": "7.0.20", - "@storybook/preview": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/node-logger": "7.0.21", + "@storybook/preview": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/types": "7.0.21", "browser-assert": "^1.2.1", "es-module-lexer": "^0.9.3", "express": "^4.17.3", diff --git a/code/lib/builder-webpack5/package.json b/code/lib/builder-webpack5/package.json index aecf81747cc2..7cd70e8c5c25 100644 --- a/code/lib/builder-webpack5/package.json +++ b/code/lib/builder-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-webpack5", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" @@ -56,25 +56,25 @@ }, "dependencies": { "@babel/core": "^7.12.10", - "@storybook/addons": "7.0.20", - "@storybook/api": "7.0.20", - "@storybook/channel-postmessage": "7.0.20", - "@storybook/channel-websocket": "7.0.20", - "@storybook/channels": "7.0.20", - "@storybook/client-api": "7.0.20", - "@storybook/client-logger": "7.0.20", - "@storybook/components": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/core-events": "7.0.20", - "@storybook/core-webpack": "7.0.20", + "@storybook/addons": "7.0.21", + "@storybook/api": "7.0.21", + "@storybook/channel-postmessage": "7.0.21", + "@storybook/channel-websocket": "7.0.21", + "@storybook/channels": "7.0.21", + "@storybook/client-api": "7.0.21", + "@storybook/client-logger": "7.0.21", + "@storybook/components": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/core-events": "7.0.21", + "@storybook/core-webpack": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.20", - "@storybook/node-logger": "7.0.20", - "@storybook/preview": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/router": "7.0.20", - "@storybook/store": "7.0.20", - "@storybook/theming": "7.0.20", + "@storybook/manager-api": "7.0.21", + "@storybook/node-logger": "7.0.21", + "@storybook/preview": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/router": "7.0.21", + "@storybook/store": "7.0.21", + "@storybook/theming": "7.0.21", "@types/node": "^16.0.0", "@types/semver": "^7.3.4", "babel-loader": "^9.0.0", diff --git a/code/lib/channel-postmessage/package.json b/code/lib/channel-postmessage/package.json index c02ebf4d6589..53063e427d3e 100644 --- a/code/lib/channel-postmessage/package.json +++ b/code/lib/channel-postmessage/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channel-postmessage", - "version": "7.0.20", + "version": "7.0.21", "description": "", "keywords": [ "storybook" @@ -43,9 +43,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/channels": "7.0.20", - "@storybook/client-logger": "7.0.20", - "@storybook/core-events": "7.0.20", + "@storybook/channels": "7.0.21", + "@storybook/client-logger": "7.0.21", + "@storybook/core-events": "7.0.21", "@storybook/global": "^5.0.0", "qs": "^6.10.0", "telejson": "^7.0.3" diff --git a/code/lib/channel-websocket/package.json b/code/lib/channel-websocket/package.json index 2de10981aee4..4c7433515e7d 100644 --- a/code/lib/channel-websocket/package.json +++ b/code/lib/channel-websocket/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channel-websocket", - "version": "7.0.20", + "version": "7.0.21", "description": "", "keywords": [ "storybook" @@ -43,8 +43,8 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/channels": "7.0.20", - "@storybook/client-logger": "7.0.20", + "@storybook/channels": "7.0.21", + "@storybook/client-logger": "7.0.21", "@storybook/global": "^5.0.0", "telejson": "^7.0.3" }, diff --git a/code/lib/channels/package.json b/code/lib/channels/package.json index 87a81299dd1b..548cd974ef96 100644 --- a/code/lib/channels/package.json +++ b/code/lib/channels/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channels", - "version": "7.0.20", + "version": "7.0.21", "description": "", "keywords": [ "storybook" diff --git a/code/lib/cli-sb/package.json b/code/lib/cli-sb/package.json index ae89b4b0a13d..258a81d34924 100644 --- a/code/lib/cli-sb/package.json +++ b/code/lib/cli-sb/package.json @@ -1,6 +1,6 @@ { "name": "sb", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook CLI", "keywords": [ "storybook" @@ -21,7 +21,7 @@ "license": "MIT", "bin": "./index.js", "dependencies": { - "@storybook/cli": "7.0.20" + "@storybook/cli": "7.0.21" }, "publishConfig": { "access": "public" diff --git a/code/lib/cli-storybook/package.json b/code/lib/cli-storybook/package.json index f057162242f1..b8229d3075b7 100644 --- a/code/lib/cli-storybook/package.json +++ b/code/lib/cli-storybook/package.json @@ -1,6 +1,6 @@ { "name": "storybook", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook CLI", "keywords": [ "storybook" @@ -24,7 +24,7 @@ "storybook": "./index.js" }, "dependencies": { - "@storybook/cli": "7.0.20" + "@storybook/cli": "7.0.21" }, "publishConfig": { "access": "public" diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index 03c86bde8a68..5f168829ac1c 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/cli", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook's CLI - easiest method of adding storybook to your projects", "keywords": [ "cli", @@ -57,13 +57,13 @@ "@babel/core": "^7.20.2", "@babel/preset-env": "^7.20.2", "@ndelangen/get-tarball": "^3.0.7", - "@storybook/codemod": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/core-server": "7.0.20", - "@storybook/csf-tools": "7.0.20", - "@storybook/node-logger": "7.0.20", - "@storybook/telemetry": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/codemod": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/core-server": "7.0.21", + "@storybook/csf-tools": "7.0.21", + "@storybook/node-logger": "7.0.21", + "@storybook/telemetry": "7.0.21", + "@storybook/types": "7.0.21", "@types/semver": "^7.3.4", "boxen": "^5.1.2", "chalk": "^4.1.0", @@ -95,7 +95,7 @@ "util-deprecate": "^1.0.2" }, "devDependencies": { - "@storybook/client-api": "7.0.20", + "@storybook/client-api": "7.0.21", "@types/cross-spawn": "^6.0.2", "@types/prompts": "^2.0.9", "@types/puppeteer-core": "^2.1.0", diff --git a/code/lib/cli/src/detect.ts b/code/lib/cli/src/detect.ts index 8f8271ad8e4d..f6306ad45ec1 100644 --- a/code/lib/cli/src/detect.ts +++ b/code/lib/cli/src/detect.ts @@ -131,6 +131,7 @@ export async function detectBuilder(packageManager: JsPackageManager, projectTyp return CoreBuilder.Vite; case ProjectType.REACT_SCRIPTS: case ProjectType.ANGULAR: + case ProjectType.REACT_NATIVE: // technically react native doesn't use webpack, we just want to set something case ProjectType.NEXTJS: return CoreBuilder.Webpack5; default: diff --git a/code/lib/cli/src/generators/baseGenerator.ts b/code/lib/cli/src/generators/baseGenerator.ts index 999c533f0025..512e6dca5c9b 100644 --- a/code/lib/cli/src/generators/baseGenerator.ts +++ b/code/lib/cli/src/generators/baseGenerator.ts @@ -277,17 +277,17 @@ export async function baseGenerator( ); } - const packages = [ + const allPackages = [ 'storybook', getExternalFramework(rendererId) ? undefined : `@storybook/${rendererId}`, ...frameworkPackages, ...addonPackages, ...extraPackages, - ] - .filter(Boolean) - .filter( - (packageToInstall) => !installedDependencies.has(getPackageDetails(packageToInstall)[0]) - ); + ].filter(Boolean); + + const packages = [...new Set(allPackages)].filter( + (packageToInstall) => !installedDependencies.has(getPackageDetails(packageToInstall)[0]) + ); logger.log(); const versionedPackagesSpinner = ora({ @@ -299,30 +299,6 @@ export async function baseGenerator( ); versionedPackagesSpinner.succeed(); - await fse.ensureDir(`./${storybookConfigFolder}`); - - if (addMainFile) { - await configureMain({ - framework: { name: frameworkInclude, options: options.framework || {} }, - storybookConfigFolder, - docs: { autodocs: 'tag' }, - addons: pnp ? addons.map(wrapForPnp) : addons, - extensions, - language, - ...(staticDir ? { staticDirs: [path.join('..', staticDir)] } : null), - ...extraMain, - ...(type !== 'framework' - ? { - core: { - builder: builderInclude, - }, - } - : {}), - }); - } - - await configurePreview({ frameworkPreviewParts, storybookConfigFolder, language, rendererId }); - const depsToInstall = [...versionedPackages]; // Add basic babel config for a select few frameworks that need it, if they do not have a babel config file already @@ -385,6 +361,30 @@ export async function baseGenerator( addDependenciesSpinner.succeed(); } + await fse.ensureDir(`./${storybookConfigFolder}`); + + if (addMainFile) { + await configureMain({ + framework: { name: frameworkInclude, options: options.framework || {} }, + storybookConfigFolder, + docs: { autodocs: 'tag' }, + addons: pnp ? addons.map(wrapForPnp) : addons, + extensions, + language, + ...(staticDir ? { staticDirs: [path.join('..', staticDir)] } : null), + ...extraMain, + ...(type !== 'framework' + ? { + core: { + builder: builderInclude, + }, + } + : {}), + }); + } + + await configurePreview({ frameworkPreviewParts, storybookConfigFolder, language, rendererId }); + if (addScripts) { await stopIfExiting(async () => packageManager.addStorybookCommandInScripts({ diff --git a/code/lib/cli/src/repro-generators/scripts.ts b/code/lib/cli/src/repro-generators/scripts.ts index f47050163209..184f899bead5 100644 --- a/code/lib/cli/src/repro-generators/scripts.ts +++ b/code/lib/cli/src/repro-generators/scripts.ts @@ -148,7 +148,7 @@ const configureYarn2ForE2E = async ({ cwd }: Options) => { // eslint-disable-next-line @typescript-eslint/no-shadow const command = [ // ⚠️ Need to set registry because Yarn 2 is not using the conf of Yarn 1 (URL is hardcoded in CircleCI config.yml) - `yarn config set npmScopes --json '{ "storybook": { "npmRegistryServer": "http://localhost:6001/" } }'`, + `yarn config set npmRegistryServer http://localhost:6001/`, // Some required magic to be able to fetch deps from local registry `yarn config set unsafeHttpWhitelist --json '["localhost"]'`, // Disable fallback mode to make sure everything is required correctly diff --git a/code/lib/cli/src/versions.ts b/code/lib/cli/src/versions.ts index 5d4322423639..d46c57786f95 100644 --- a/code/lib/cli/src/versions.ts +++ b/code/lib/cli/src/versions.ts @@ -1,96 +1,96 @@ // auto generated file, do not edit export default { - '@storybook/addon-a11y': '7.0.20', - '@storybook/addon-actions': '7.0.20', - '@storybook/addon-backgrounds': '7.0.20', - '@storybook/addon-controls': '7.0.20', - '@storybook/addon-docs': '7.0.20', - '@storybook/addon-essentials': '7.0.20', - '@storybook/addon-highlight': '7.0.20', - '@storybook/addon-interactions': '7.0.20', - '@storybook/addon-jest': '7.0.20', - '@storybook/addon-links': '7.0.20', - '@storybook/addon-mdx-gfm': '7.0.20', - '@storybook/addon-measure': '7.0.20', - '@storybook/addon-outline': '7.0.20', - '@storybook/addon-storyshots': '7.0.20', - '@storybook/addon-storyshots-puppeteer': '7.0.20', - '@storybook/addon-storysource': '7.0.20', - '@storybook/addon-toolbars': '7.0.20', - '@storybook/addon-viewport': '7.0.20', - '@storybook/addons': '7.0.20', - '@storybook/angular': '7.0.20', - '@storybook/api': '7.0.20', - '@storybook/blocks': '7.0.20', - '@storybook/builder-manager': '7.0.20', - '@storybook/builder-vite': '7.0.20', - '@storybook/builder-webpack5': '7.0.20', - '@storybook/channel-postmessage': '7.0.20', - '@storybook/channel-websocket': '7.0.20', - '@storybook/channels': '7.0.20', - '@storybook/cli': '7.0.20', - '@storybook/client-api': '7.0.20', - '@storybook/client-logger': '7.0.20', - '@storybook/codemod': '7.0.20', - '@storybook/components': '7.0.20', - '@storybook/core-client': '7.0.20', - '@storybook/core-common': '7.0.20', - '@storybook/core-events': '7.0.20', - '@storybook/core-server': '7.0.20', - '@storybook/core-webpack': '7.0.20', - '@storybook/csf-plugin': '7.0.20', - '@storybook/csf-tools': '7.0.20', - '@storybook/docs-tools': '7.0.20', - '@storybook/ember': '7.0.20', - '@storybook/html': '7.0.20', - '@storybook/html-vite': '7.0.20', - '@storybook/html-webpack5': '7.0.20', - '@storybook/instrumenter': '7.0.20', - '@storybook/manager': '7.0.20', - '@storybook/manager-api': '7.0.20', - '@storybook/nextjs': '7.0.20', - '@storybook/node-logger': '7.0.20', - '@storybook/postinstall': '7.0.20', - '@storybook/preact': '7.0.20', - '@storybook/preact-vite': '7.0.20', - '@storybook/preact-webpack5': '7.0.20', - '@storybook/preset-create-react-app': '7.0.20', - '@storybook/preset-html-webpack': '7.0.20', - '@storybook/preset-preact-webpack': '7.0.20', - '@storybook/preset-react-webpack': '7.0.20', - '@storybook/preset-server-webpack': '7.0.20', - '@storybook/preset-svelte-webpack': '7.0.20', - '@storybook/preset-vue-webpack': '7.0.20', - '@storybook/preset-vue3-webpack': '7.0.20', - '@storybook/preset-web-components-webpack': '7.0.20', - '@storybook/preview': '7.0.20', - '@storybook/preview-api': '7.0.20', - '@storybook/preview-web': '7.0.20', - '@storybook/react': '7.0.20', - '@storybook/react-dom-shim': '7.0.20', - '@storybook/react-vite': '7.0.20', - '@storybook/react-webpack5': '7.0.20', - '@storybook/router': '7.0.20', - '@storybook/server': '7.0.20', - '@storybook/server-webpack5': '7.0.20', - '@storybook/source-loader': '7.0.20', - '@storybook/store': '7.0.20', - '@storybook/svelte': '7.0.20', - '@storybook/svelte-vite': '7.0.20', - '@storybook/svelte-webpack5': '7.0.20', - '@storybook/sveltekit': '7.0.20', - '@storybook/telemetry': '7.0.20', - '@storybook/theming': '7.0.20', - '@storybook/types': '7.0.20', - '@storybook/vue': '7.0.20', - '@storybook/vue-vite': '7.0.20', - '@storybook/vue-webpack5': '7.0.20', - '@storybook/vue3': '7.0.20', - '@storybook/vue3-vite': '7.0.20', - '@storybook/vue3-webpack5': '7.0.20', - '@storybook/web-components': '7.0.20', - '@storybook/web-components-vite': '7.0.20', - '@storybook/web-components-webpack5': '7.0.20', - sb: '7.0.20', - storybook: '7.0.20', + '@storybook/addon-a11y': '7.0.21', + '@storybook/addon-actions': '7.0.21', + '@storybook/addon-backgrounds': '7.0.21', + '@storybook/addon-controls': '7.0.21', + '@storybook/addon-docs': '7.0.21', + '@storybook/addon-essentials': '7.0.21', + '@storybook/addon-highlight': '7.0.21', + '@storybook/addon-interactions': '7.0.21', + '@storybook/addon-jest': '7.0.21', + '@storybook/addon-links': '7.0.21', + '@storybook/addon-mdx-gfm': '7.0.21', + '@storybook/addon-measure': '7.0.21', + '@storybook/addon-outline': '7.0.21', + '@storybook/addon-storyshots': '7.0.21', + '@storybook/addon-storyshots-puppeteer': '7.0.21', + '@storybook/addon-storysource': '7.0.21', + '@storybook/addon-toolbars': '7.0.21', + '@storybook/addon-viewport': '7.0.21', + '@storybook/addons': '7.0.21', + '@storybook/angular': '7.0.21', + '@storybook/api': '7.0.21', + '@storybook/blocks': '7.0.21', + '@storybook/builder-manager': '7.0.21', + '@storybook/builder-vite': '7.0.21', + '@storybook/builder-webpack5': '7.0.21', + '@storybook/channel-postmessage': '7.0.21', + '@storybook/channel-websocket': '7.0.21', + '@storybook/channels': '7.0.21', + '@storybook/cli': '7.0.21', + '@storybook/client-api': '7.0.21', + '@storybook/client-logger': '7.0.21', + '@storybook/codemod': '7.0.21', + '@storybook/components': '7.0.21', + '@storybook/core-client': '7.0.21', + '@storybook/core-common': '7.0.21', + '@storybook/core-events': '7.0.21', + '@storybook/core-server': '7.0.21', + '@storybook/core-webpack': '7.0.21', + '@storybook/csf-plugin': '7.0.21', + '@storybook/csf-tools': '7.0.21', + '@storybook/docs-tools': '7.0.21', + '@storybook/ember': '7.0.21', + '@storybook/html': '7.0.21', + '@storybook/html-vite': '7.0.21', + '@storybook/html-webpack5': '7.0.21', + '@storybook/instrumenter': '7.0.21', + '@storybook/manager': '7.0.21', + '@storybook/manager-api': '7.0.21', + '@storybook/nextjs': '7.0.21', + '@storybook/node-logger': '7.0.21', + '@storybook/postinstall': '7.0.21', + '@storybook/preact': '7.0.21', + '@storybook/preact-vite': '7.0.21', + '@storybook/preact-webpack5': '7.0.21', + '@storybook/preset-create-react-app': '7.0.21', + '@storybook/preset-html-webpack': '7.0.21', + '@storybook/preset-preact-webpack': '7.0.21', + '@storybook/preset-react-webpack': '7.0.21', + '@storybook/preset-server-webpack': '7.0.21', + '@storybook/preset-svelte-webpack': '7.0.21', + '@storybook/preset-vue-webpack': '7.0.21', + '@storybook/preset-vue3-webpack': '7.0.21', + '@storybook/preset-web-components-webpack': '7.0.21', + '@storybook/preview': '7.0.21', + '@storybook/preview-api': '7.0.21', + '@storybook/preview-web': '7.0.21', + '@storybook/react': '7.0.21', + '@storybook/react-dom-shim': '7.0.21', + '@storybook/react-vite': '7.0.21', + '@storybook/react-webpack5': '7.0.21', + '@storybook/router': '7.0.21', + '@storybook/server': '7.0.21', + '@storybook/server-webpack5': '7.0.21', + '@storybook/source-loader': '7.0.21', + '@storybook/store': '7.0.21', + '@storybook/svelte': '7.0.21', + '@storybook/svelte-vite': '7.0.21', + '@storybook/svelte-webpack5': '7.0.21', + '@storybook/sveltekit': '7.0.21', + '@storybook/telemetry': '7.0.21', + '@storybook/theming': '7.0.21', + '@storybook/types': '7.0.21', + '@storybook/vue': '7.0.21', + '@storybook/vue-vite': '7.0.21', + '@storybook/vue-webpack5': '7.0.21', + '@storybook/vue3': '7.0.21', + '@storybook/vue3-vite': '7.0.21', + '@storybook/vue3-webpack5': '7.0.21', + '@storybook/web-components': '7.0.21', + '@storybook/web-components-vite': '7.0.21', + '@storybook/web-components-webpack5': '7.0.21', + sb: '7.0.21', + storybook: '7.0.21', }; diff --git a/code/lib/client-api/package.json b/code/lib/client-api/package.json index 482ecae72cb3..7963d6b77e4d 100644 --- a/code/lib/client-api/package.json +++ b/code/lib/client-api/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/client-api", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook Client API", "keywords": [ "storybook" @@ -42,8 +42,8 @@ "prep": "../../../scripts/prepare/facade.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/preview-api": "7.0.20" + "@storybook/client-logger": "7.0.21", + "@storybook/preview-api": "7.0.21" }, "publishConfig": { "access": "public" diff --git a/code/lib/client-logger/package.json b/code/lib/client-logger/package.json index f5384c19702c..10ae95ac110d 100644 --- a/code/lib/client-logger/package.json +++ b/code/lib/client-logger/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/client-logger", - "version": "7.0.20", + "version": "7.0.21", "description": "", "keywords": [ "storybook" diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index 5842b23a08a9..313734561d12 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/codemod", - "version": "7.0.20", + "version": "7.0.21", "description": "A collection of codemod scripts written with JSCodeshift", "keywords": [ "storybook" @@ -49,9 +49,9 @@ "@babel/preset-env": "~7.21.0", "@babel/types": "~7.21.2", "@storybook/csf": "^0.1.0", - "@storybook/csf-tools": "7.0.20", - "@storybook/node-logger": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/csf-tools": "7.0.21", + "@storybook/node-logger": "7.0.21", + "@storybook/types": "7.0.21", "cross-spawn": "^7.0.3", "globby": "^11.0.2", "jscodeshift": "^0.14.0", diff --git a/code/lib/core-client/package.json b/code/lib/core-client/package.json index 8cbf579d6b9b..010737621903 100644 --- a/code/lib/core-client/package.json +++ b/code/lib/core-client/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-client", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" @@ -35,8 +35,8 @@ "prep": "../../../scripts/prepare/facade.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/preview-api": "7.0.20" + "@storybook/client-logger": "7.0.21", + "@storybook/preview-api": "7.0.21" }, "publishConfig": { "access": "public" diff --git a/code/lib/core-common/package.json b/code/lib/core-common/package.json index b8f47c908d6d..e709df86e886 100644 --- a/code/lib/core-common/package.json +++ b/code/lib/core-common/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-common", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" @@ -43,8 +43,8 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/node-logger": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/node-logger": "7.0.21", + "@storybook/types": "7.0.21", "@types/node": "^16.0.0", "@types/pretty-hrtime": "^1.0.0", "chalk": "^4.1.0", diff --git a/code/lib/core-events/package.json b/code/lib/core-events/package.json index 2e39167fa5d3..7332fc993dac 100644 --- a/code/lib/core-events/package.json +++ b/code/lib/core-events/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-events", - "version": "7.0.20", + "version": "7.0.21", "description": "Event names used in storybook core", "keywords": [ "storybook" diff --git a/code/lib/core-server/package.json b/code/lib/core-server/package.json index 6aa158bdccb4..dfb90947e2ef 100644 --- a/code/lib/core-server/package.json +++ b/code/lib/core-server/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-server", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" @@ -56,18 +56,18 @@ "dependencies": { "@aw-web-design/x-default-browser": "1.4.88", "@discoveryjs/json-ext": "^0.5.3", - "@storybook/builder-manager": "7.0.20", - "@storybook/core-common": "7.0.20", - "@storybook/core-events": "7.0.20", + "@storybook/builder-manager": "7.0.21", + "@storybook/core-common": "7.0.21", + "@storybook/core-events": "7.0.21", "@storybook/csf": "^0.1.0", - "@storybook/csf-tools": "7.0.20", + "@storybook/csf-tools": "7.0.21", "@storybook/docs-mdx": "^0.1.0", "@storybook/global": "^5.0.0", - "@storybook/manager": "7.0.20", - "@storybook/node-logger": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/telemetry": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/manager": "7.0.21", + "@storybook/node-logger": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/telemetry": "7.0.21", + "@storybook/types": "7.0.21", "@types/detect-port": "^1.3.0", "@types/node": "^16.0.0", "@types/node-fetch": "^2.5.7", diff --git a/code/lib/core-webpack/package.json b/code/lib/core-webpack/package.json index 10be481c22d5..734e0025a096 100644 --- a/code/lib/core-webpack/package.json +++ b/code/lib/core-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-webpack", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" @@ -43,9 +43,9 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/core-common": "7.0.20", - "@storybook/node-logger": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/core-common": "7.0.21", + "@storybook/node-logger": "7.0.21", + "@storybook/types": "7.0.21", "@types/node": "^16.0.0", "ts-dedent": "^2.0.0" }, diff --git a/code/lib/csf-plugin/package.json b/code/lib/csf-plugin/package.json index 9fab83cea03d..3dea8b58e94f 100644 --- a/code/lib/csf-plugin/package.json +++ b/code/lib/csf-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/csf-plugin", - "version": "7.0.20", + "version": "7.0.21", "description": "Enrich CSF files via static analysis", "keywords": [ "storybook" @@ -43,7 +43,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/csf-tools": "7.0.20", + "@storybook/csf-tools": "7.0.21", "unplugin": "^0.10.2" }, "devDependencies": { diff --git a/code/lib/csf-tools/package.json b/code/lib/csf-tools/package.json index 4c4220cc3d3a..5d979a0890da 100644 --- a/code/lib/csf-tools/package.json +++ b/code/lib/csf-tools/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/csf-tools", - "version": "7.0.20", + "version": "7.0.21", "description": "Parse and manipulate CSF and Storybook config files", "keywords": [ "storybook" @@ -46,7 +46,7 @@ "@babel/traverse": "~7.21.2", "@babel/types": "~7.21.2", "@storybook/csf": "^0.1.0", - "@storybook/types": "7.0.20", + "@storybook/types": "7.0.21", "fs-extra": "^11.1.0", "recast": "^0.23.1", "ts-dedent": "^2.0.0" diff --git a/code/lib/docs-tools/package.json b/code/lib/docs-tools/package.json index 27f3832945ed..a62d6e39fd45 100644 --- a/code/lib/docs-tools/package.json +++ b/code/lib/docs-tools/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/docs-tools", - "version": "7.0.20", + "version": "7.0.21", "description": "Shared utility functions for frameworks to implement docs", "keywords": [ "storybook" @@ -44,9 +44,9 @@ }, "dependencies": { "@babel/core": "^7.12.10", - "@storybook/core-common": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/core-common": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/types": "7.0.21", "@types/doctrine": "^0.0.3", "doctrine": "^3.0.0", "lodash": "^4.17.21" diff --git a/code/lib/instrumenter/package.json b/code/lib/instrumenter/package.json index 8686055a8445..13e9b112898d 100644 --- a/code/lib/instrumenter/package.json +++ b/code/lib/instrumenter/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/instrumenter", - "version": "7.0.20", + "version": "7.0.21", "description": "", "keywords": [ "storybook" @@ -43,11 +43,11 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/channels": "7.0.20", - "@storybook/client-logger": "7.0.20", - "@storybook/core-events": "7.0.20", + "@storybook/channels": "7.0.21", + "@storybook/client-logger": "7.0.21", + "@storybook/core-events": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/preview-api": "7.0.20" + "@storybook/preview-api": "7.0.21" }, "devDependencies": { "typescript": "~4.9.3" diff --git a/code/lib/manager-api-shim/package.json b/code/lib/manager-api-shim/package.json index 0756e4a799cf..4c58db46d2c6 100644 --- a/code/lib/manager-api-shim/package.json +++ b/code/lib/manager-api-shim/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/api", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook Manager API (facade)", "keywords": [ "storybook" @@ -42,8 +42,8 @@ "prep": "../../../scripts/prepare/facade.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/manager-api": "7.0.20" + "@storybook/client-logger": "7.0.21", + "@storybook/manager-api": "7.0.21" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/manager-api/package.json b/code/lib/manager-api/package.json index 194123ec420f..53fc8a885c5f 100644 --- a/code/lib/manager-api/package.json +++ b/code/lib/manager-api/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/manager-api", - "version": "7.0.20", + "version": "7.0.21", "description": "Core Storybook Manager API & Context", "keywords": [ "storybook" @@ -42,14 +42,14 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/channels": "7.0.20", - "@storybook/client-logger": "7.0.20", - "@storybook/core-events": "7.0.20", + "@storybook/channels": "7.0.21", + "@storybook/client-logger": "7.0.21", + "@storybook/core-events": "7.0.21", "@storybook/csf": "^0.1.0", "@storybook/global": "^5.0.0", - "@storybook/router": "7.0.20", - "@storybook/theming": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/router": "7.0.21", + "@storybook/theming": "7.0.21", + "@storybook/types": "7.0.21", "dequal": "^2.0.2", "lodash": "^4.17.21", "memoizerific": "^1.11.3", diff --git a/code/lib/manager-api/src/version.ts b/code/lib/manager-api/src/version.ts index ccdc13153a3d..a833a6556b6f 100644 --- a/code/lib/manager-api/src/version.ts +++ b/code/lib/manager-api/src/version.ts @@ -1 +1 @@ -export const version = '7.0.20'; +export const version = '7.0.21'; diff --git a/code/lib/node-logger/package.json b/code/lib/node-logger/package.json index e7d7730cb303..82cf1634aa7f 100644 --- a/code/lib/node-logger/package.json +++ b/code/lib/node-logger/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/node-logger", - "version": "7.0.20", + "version": "7.0.21", "description": "", "keywords": [ "storybook" diff --git a/code/lib/postinstall/package.json b/code/lib/postinstall/package.json index b4f93fd7ea71..7a913aa22bd0 100644 --- a/code/lib/postinstall/package.json +++ b/code/lib/postinstall/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/postinstall", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook addons postinstall utilities", "keywords": [ "api", diff --git a/code/lib/preview-api/package.json b/code/lib/preview-api/package.json index bbe0743761ca..cca19c236b72 100644 --- a/code/lib/preview-api/package.json +++ b/code/lib/preview-api/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview-api", - "version": "7.0.20", + "version": "7.0.21", "description": "", "keywords": [ "storybook" @@ -67,13 +67,13 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/channel-postmessage": "7.0.20", - "@storybook/channels": "7.0.20", - "@storybook/client-logger": "7.0.20", - "@storybook/core-events": "7.0.20", + "@storybook/channel-postmessage": "7.0.21", + "@storybook/channels": "7.0.21", + "@storybook/client-logger": "7.0.21", + "@storybook/core-events": "7.0.21", "@storybook/csf": "^0.1.0", "@storybook/global": "^5.0.0", - "@storybook/types": "7.0.20", + "@storybook/types": "7.0.21", "@types/qs": "^6.9.5", "dequal": "^2.0.2", "lodash": "^4.17.21", @@ -85,7 +85,7 @@ }, "devDependencies": { "@jest/globals": "^26.6.2", - "@storybook/core-common": "7.0.20", + "@storybook/core-common": "7.0.21", "ansi-to-html": "^0.6.11", "react": "^16.14.0", "slash": "^5.0.0" diff --git a/code/lib/preview-web/package.json b/code/lib/preview-web/package.json index 7d7949bbb6a3..8407ca84e40e 100644 --- a/code/lib/preview-web/package.json +++ b/code/lib/preview-web/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview-web", - "version": "7.0.20", + "version": "7.0.21", "description": "", "keywords": [ "storybook" @@ -42,8 +42,8 @@ "prep": "../../../scripts/prepare/facade.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/preview-api": "7.0.20" + "@storybook/client-logger": "7.0.21", + "@storybook/preview-api": "7.0.21" }, "publishConfig": { "access": "public" diff --git a/code/lib/preview/package.json b/code/lib/preview/package.json index 51f2964a29e8..9a7cad075b5f 100644 --- a/code/lib/preview/package.json +++ b/code/lib/preview/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview", - "version": "7.0.20", + "version": "7.0.21", "description": "", "keywords": [ "storybook" @@ -55,12 +55,12 @@ "prep": "../../../scripts/prepare/esm-bundle.ts" }, "devDependencies": { - "@storybook/channel-postmessage": "7.0.20", - "@storybook/channel-websocket": "7.0.20", - "@storybook/channels": "7.0.20", - "@storybook/client-logger": "7.0.20", - "@storybook/core-events": "7.0.20", - "@storybook/preview-api": "7.0.20", + "@storybook/channel-postmessage": "7.0.21", + "@storybook/channel-websocket": "7.0.21", + "@storybook/channels": "7.0.21", + "@storybook/client-logger": "7.0.21", + "@storybook/core-events": "7.0.21", + "@storybook/preview-api": "7.0.21", "typescript": "~4.9.3" }, "publishConfig": { diff --git a/code/lib/react-dom-shim/package.json b/code/lib/react-dom-shim/package.json index 658ffa3f7944..71b1f31687f5 100644 --- a/code/lib/react-dom-shim/package.json +++ b/code/lib/react-dom-shim/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-dom-shim", - "version": "7.0.20", + "version": "7.0.21", "description": "", "keywords": [ "storybook" @@ -53,7 +53,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "devDependencies": { - "@storybook/types": "7.0.20", + "@storybook/types": "7.0.21", "typescript": "~4.9.3" }, "peerDependencies": { diff --git a/code/lib/router/package.json b/code/lib/router/package.json index cb04c13dccf4..4be5a3e7e9db 100644 --- a/code/lib/router/package.json +++ b/code/lib/router/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/router", - "version": "7.0.20", + "version": "7.0.21", "description": "Core Storybook Router", "keywords": [ "storybook" @@ -48,7 +48,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", + "@storybook/client-logger": "7.0.21", "memoizerific": "^1.11.3", "qs": "^6.10.0" }, diff --git a/code/lib/source-loader/package.json b/code/lib/source-loader/package.json index ea0fdf184fc6..5608cd221aa5 100644 --- a/code/lib/source-loader/package.json +++ b/code/lib/source-loader/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/source-loader", - "version": "7.0.20", + "version": "7.0.21", "description": "Source loader", "keywords": [ "lib", @@ -45,7 +45,7 @@ }, "dependencies": { "@storybook/csf": "^0.1.0", - "@storybook/types": "7.0.20", + "@storybook/types": "7.0.21", "estraverse": "^5.2.0", "lodash": "^4.17.21", "prettier": "^2.8.0" diff --git a/code/lib/store/package.json b/code/lib/store/package.json index af3cb072526b..b879ff940425 100644 --- a/code/lib/store/package.json +++ b/code/lib/store/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/store", - "version": "7.0.20", + "version": "7.0.21", "description": "", "keywords": [ "storybook" @@ -42,8 +42,8 @@ "prep": "../../../scripts/prepare/facade.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/preview-api": "7.0.20" + "@storybook/client-logger": "7.0.21", + "@storybook/preview-api": "7.0.21" }, "publishConfig": { "access": "public" diff --git a/code/lib/telemetry/package.json b/code/lib/telemetry/package.json index 5f8c207ea359..5b2445d92622 100644 --- a/code/lib/telemetry/package.json +++ b/code/lib/telemetry/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/telemetry", - "version": "7.0.20", + "version": "7.0.21", "description": "Telemetry logging for crash reports and usage statistics", "keywords": [ "storybook" @@ -43,8 +43,8 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/core-common": "7.0.20", + "@storybook/client-logger": "7.0.21", + "@storybook/core-common": "7.0.21", "chalk": "^4.1.0", "detect-package-manager": "^2.0.1", "fetch-retry": "^5.0.2", diff --git a/code/lib/theming/package.json b/code/lib/theming/package.json index 1a317eb332df..0fe7803f134f 100644 --- a/code/lib/theming/package.json +++ b/code/lib/theming/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/theming", - "version": "7.0.20", + "version": "7.0.21", "description": "Core Storybook Components", "keywords": [ "storybook" @@ -49,7 +49,7 @@ }, "dependencies": { "@emotion/use-insertion-effect-with-fallbacks": "^1.0.0", - "@storybook/client-logger": "7.0.20", + "@storybook/client-logger": "7.0.21", "@storybook/global": "^5.0.0", "memoizerific": "^1.11.3" }, diff --git a/code/lib/types/package.json b/code/lib/types/package.json index ed76f1017f43..705c99519d29 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/types", - "version": "7.0.20", + "version": "7.0.21", "description": "Core Storybook TS Types", "keywords": [ "storybook" @@ -43,7 +43,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/channels": "7.0.20", + "@storybook/channels": "7.0.21", "@types/babel__core": "^7.0.0", "@types/express": "^4.7.0", "file-system-cache": "^2.0.0" diff --git a/code/package.json b/code/package.json index 8a75fcfe5b67..d593bd18e904 100644 --- a/code/package.json +++ b/code/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/root", - "version": "7.0.20", + "version": "7.0.21", "private": true, "description": "Storybook root", "homepage": "https://storybook.js.org/", @@ -78,13 +78,14 @@ "defaults" ], "resolutions": { - "@playwright/test": "1.32.3", + "@playwright/test": "1.35.0", "@typescript-eslint/eslint-plugin": "^5.45.0", "@typescript-eslint/experimental-utils": "^5.45.0", "@typescript-eslint/parser": "^5.45.0", "esbuild": "^0.17.0", "eslint": "^8.28.0", - "playwright": "1.32.3", + "playwright": "1.35.0", + "playwright-core": "1.35.0", "serialize-javascript": "^3.1.0" }, "dependencies": { @@ -99,7 +100,7 @@ "@nrwl/cli": "^15.4.5", "@nrwl/nx-cloud": "^15.0.2", "@nrwl/workspace": "^15.4.5", - "@playwright/test": "1.32.3", + "@playwright/test": "^1.35.0", "@storybook/addon-a11y": "workspace:*", "@storybook/addon-actions": "workspace:*", "@storybook/addon-backgrounds": "workspace:*", @@ -245,7 +246,6 @@ "lodash": "^4.17.21", "node-gyp": "^8.4.0", "nx": "^15.4.5", - "playwright": "1.32.3", "prettier": "2.8.0", "process": "^0.11.10", "raf": "^3.4.1", @@ -325,10 +325,6 @@ [ "dependencies", "Dependency Upgrades" - ], - [ - "other", - "Other" ] ] } diff --git a/code/presets/create-react-app/package.json b/code/presets/create-react-app/package.json index d45ecdad1472..3c432db97670 100644 --- a/code/presets/create-react-app/package.json +++ b/code/presets/create-react-app/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-create-react-app", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Create React App preset", "keywords": [ "storybook" @@ -50,14 +50,14 @@ "dependencies": { "@pmmmwh/react-refresh-webpack-plugin": "^0.5.1", "@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.0c3f3b7.0", - "@storybook/types": "7.0.20", + "@storybook/types": "7.0.21", "@types/babel__core": "^7.1.7", "babel-plugin-react-docgen": "^4.1.0", "pnp-webpack-plugin": "^1.7.0", "semver": "^7.3.5" }, "devDependencies": { - "@storybook/node-logger": "7.0.20", + "@storybook/node-logger": "7.0.21", "@types/node": "^16.0.0", "typescript": "~4.9.3" }, diff --git a/code/presets/html-webpack/package.json b/code/presets/html-webpack/package.json index 4b0407ca6980..3d04150de1b3 100644 --- a/code/presets/html-webpack/package.json +++ b/code/presets/html-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-html-webpack", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -48,7 +48,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/core-webpack": "7.0.20", + "@storybook/core-webpack": "7.0.21", "@types/node": "^16.0.0", "html-loader": "^3.1.0", "webpack": "5" diff --git a/code/presets/preact-webpack/package.json b/code/presets/preact-webpack/package.json index c1d7793930ad..eda3d7ca99a2 100644 --- a/code/presets/preact-webpack/package.json +++ b/code/presets/preact-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-preact-webpack", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Preact: Develop Preact Component in isolation.", "keywords": [ "storybook" @@ -50,7 +50,7 @@ "dependencies": { "@babel/plugin-transform-react-jsx": "^7.21.0", "@babel/preset-typescript": "^7.21.0", - "@storybook/core-webpack": "7.0.20", + "@storybook/core-webpack": "7.0.21", "@types/node": "^16.0.0" }, "devDependencies": { diff --git a/code/presets/react-webpack/package.json b/code/presets/react-webpack/package.json index c583464defb5..8fa467807366 100644 --- a/code/presets/react-webpack/package.json +++ b/code/presets/react-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-react-webpack", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for React: Develop React Component in isolation with Hot Reloading", "keywords": [ "storybook" @@ -66,10 +66,10 @@ "@babel/preset-flow": "^7.18.6", "@babel/preset-react": "^7.18.6", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.5", - "@storybook/core-webpack": "7.0.20", - "@storybook/docs-tools": "7.0.20", - "@storybook/node-logger": "7.0.20", - "@storybook/react": "7.0.20", + "@storybook/core-webpack": "7.0.21", + "@storybook/docs-tools": "7.0.21", + "@storybook/node-logger": "7.0.21", + "@storybook/react": "7.0.21", "@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.0c3f3b7.0", "@types/node": "^16.0.0", "@types/semver": "^7.3.4", diff --git a/code/presets/server-webpack/package.json b/code/presets/server-webpack/package.json index ad5d6acc8f86..50e3baebce7f 100644 --- a/code/presets/server-webpack/package.json +++ b/code/presets/server-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-server-webpack", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -53,10 +53,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/core-server": "7.0.20", - "@storybook/core-webpack": "7.0.20", + "@storybook/core-server": "7.0.21", + "@storybook/core-webpack": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/server": "7.0.20", + "@storybook/server": "7.0.21", "@types/node": "^16.0.0", "safe-identifier": "^0.4.1", "ts-dedent": "^2.0.0", diff --git a/code/presets/svelte-webpack/package.json b/code/presets/svelte-webpack/package.json index 13fe8ebf0283..131c8a8eae75 100644 --- a/code/presets/svelte-webpack/package.json +++ b/code/presets/svelte-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-svelte-webpack", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -63,8 +63,8 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/core-webpack": "7.0.20", - "@storybook/node-logger": "7.0.20", + "@storybook/core-webpack": "7.0.21", + "@storybook/node-logger": "7.0.21", "sveltedoc-parser": "^4.2.1", "ts-dedent": "^2.0.0" }, diff --git a/code/presets/vue-webpack/package.json b/code/presets/vue-webpack/package.json index 840c5a17e2e8..92a4ff795975 100644 --- a/code/presets/vue-webpack/package.json +++ b/code/presets/vue-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-vue-webpack", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -58,8 +58,8 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/core-webpack": "7.0.20", - "@storybook/docs-tools": "7.0.20", + "@storybook/core-webpack": "7.0.21", + "@storybook/docs-tools": "7.0.21", "@types/node": "^16.0.0", "ts-loader": "^9.2.8", "vue-docgen-api": "^4.44.23", diff --git a/code/presets/vue3-webpack/package.json b/code/presets/vue3-webpack/package.json index 372d63c70f7f..2989161d9efc 100644 --- a/code/presets/vue3-webpack/package.json +++ b/code/presets/vue3-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-vue3-webpack", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.", "keywords": [ "storybook" @@ -58,8 +58,8 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/core-webpack": "7.0.20", - "@storybook/docs-tools": "7.0.20", + "@storybook/core-webpack": "7.0.21", + "@storybook/docs-tools": "7.0.21", "@types/node": "^16.0.0", "ts-loader": "^9.2.8", "vue-docgen-api": "^4.46.0", diff --git a/code/presets/web-components-webpack/package.json b/code/presets/web-components-webpack/package.json index e2a254a54095..f934e8ab0996 100644 --- a/code/presets/web-components-webpack/package.json +++ b/code/presets/web-components-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-web-components-webpack", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.", "keywords": [ "lit", @@ -54,7 +54,7 @@ "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/preset-env": "^7.20.2", - "@storybook/core-webpack": "7.0.20", + "@storybook/core-webpack": "7.0.21", "@types/node": "^16.0.0", "babel-loader": "^7.0.0 || ^8.0.0 || ^9.0.0", "babel-plugin-bundled-import-meta": "^0.3.1" diff --git a/code/renderers/html/package.json b/code/renderers/html/package.json index d89ffb7abca0..34c8e2a98eb8 100644 --- a/code/renderers/html/package.json +++ b/code/renderers/html/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook HTML renderer", "keywords": [ "storybook" @@ -48,11 +48,11 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/core-client": "7.0.20", - "@storybook/docs-tools": "7.0.20", + "@storybook/core-client": "7.0.21", + "@storybook/docs-tools": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/preview-api": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/preview-api": "7.0.21", + "@storybook/types": "7.0.21", "ts-dedent": "^2.0.0" }, "devDependencies": { diff --git a/code/renderers/preact/package.json b/code/renderers/preact/package.json index a4b6895221b5..22ff4faede7a 100644 --- a/code/renderers/preact/package.json +++ b/code/renderers/preact/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook Preact renderer", "keywords": [ "storybook" @@ -48,10 +48,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/core-client": "7.0.20", + "@storybook/core-client": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/preview-api": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/preview-api": "7.0.21", + "@storybook/types": "7.0.21", "ts-dedent": "^2.0.0" }, "devDependencies": { diff --git a/code/renderers/react/package.json b/code/renderers/react/package.json index eb5c2b148bf5..2814488746af 100644 --- a/code/renderers/react/package.json +++ b/code/renderers/react/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook React renderer", "keywords": [ "storybook" @@ -52,13 +52,13 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/core-client": "7.0.20", - "@storybook/docs-tools": "7.0.20", + "@storybook/client-logger": "7.0.21", + "@storybook/core-client": "7.0.21", + "@storybook/docs-tools": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/preview-api": "7.0.20", - "@storybook/react-dom-shim": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/preview-api": "7.0.21", + "@storybook/react-dom-shim": "7.0.21", + "@storybook/types": "7.0.21", "@types/escodegen": "^0.0.6", "@types/estree": "^0.0.51", "@types/node": "^16.0.0", diff --git a/code/renderers/react/template/stories/ts-argtypes.stories.tsx b/code/renderers/react/template/stories/ts-argtypes.stories.tsx index 21eb492d30e7..f2b29752c276 100644 --- a/code/renderers/react/template/stories/ts-argtypes.stories.tsx +++ b/code/renderers/react/template/stories/ts-argtypes.stories.tsx @@ -1,10 +1,12 @@ import React, { useState } from 'react'; import mapValues from 'lodash/mapValues.js'; import { PureArgsTable as ArgsTable } from '@storybook/blocks'; +import type { StoryObj } from '@storybook/react'; import type { Args, Parameters, StoryContext } from '@storybook/types'; import { inferControls } from '@storybook/preview-api'; import { ThemeProvider, themes, convert } from '@storybook/theming'; +import { within } from '@storybook/testing-library'; import { component as TsFunctionComponentComponent } from './docgen-components/ts-function-component/input'; import { component as TsFunctionComponentInlineDefaultsComponent } from './docgen-components/ts-function-component-inline-defaults/input'; import { component as TsReactFcGenericsComponent } from './docgen-components/8143-ts-react-fc-generics/input'; @@ -76,6 +78,27 @@ export const TsComponentProps = { parameters: { component: TsComponentPropsCompo export const TsJsdoc = { parameters: { component: TsJsdocComponent } }; -export const TsTypes = { parameters: { component: TsTypesComponent } }; +const addChromaticIgnore = async (element: HTMLElement) => { + const row = element.parentElement?.parentElement; + if (row?.nodeName === 'TR') { + row.setAttribute('data-chromatic', 'ignore'); + } else { + throw new Error('the DOM structure changed, please update this test'); + } +}; + +export const TsTypes: StoryObj = { + parameters: { component: TsTypesComponent }, + play: async ({ canvasElement }) => { + // This play function's sole purpose is to add a "chromatic ignore" region to flaky rows. + const canvas = within(canvasElement); + const funcCell = await canvas.findByText('funcWithArgsAndReturns'); + addChromaticIgnore(funcCell); + const namedNumericCell = await canvas.findByText('namedNumericLiteralUnion'); + addChromaticIgnore(namedNumericCell); + const inlinedNumericCell = await canvas.findByText('inlinedNumericLiteralUnion'); + addChromaticIgnore(inlinedNumericCell); + }, +}; export const TsHtml = { parameters: { component: TsHtmlComponent } }; diff --git a/code/renderers/server/package.json b/code/renderers/server/package.json index 7a803eecee7e..7779e219bc5b 100644 --- a/code/renderers/server/package.json +++ b/code/renderers/server/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/server", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook Server renderer", "keywords": [ "storybook" @@ -53,11 +53,11 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/core-client": "7.0.20", + "@storybook/core-client": "7.0.21", "@storybook/csf": "^0.1.0", "@storybook/global": "^5.0.0", - "@storybook/preview-api": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/preview-api": "7.0.21", + "@storybook/types": "7.0.21", "@types/fs-extra": "^11.0.1", "fs-extra": "^11.1.0", "ts-dedent": "^2.0.0", diff --git a/code/renderers/svelte/package.json b/code/renderers/svelte/package.json index be4bb6d3ef64..973cc308a284 100644 --- a/code/renderers/svelte/package.json +++ b/code/renderers/svelte/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook Svelte renderer", "keywords": [ "storybook" @@ -52,13 +52,13 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/core-client": "7.0.20", - "@storybook/core-events": "7.0.20", - "@storybook/docs-tools": "7.0.20", + "@storybook/client-logger": "7.0.21", + "@storybook/core-client": "7.0.21", + "@storybook/core-events": "7.0.21", + "@storybook/docs-tools": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/preview-api": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/preview-api": "7.0.21", + "@storybook/types": "7.0.21", "sveltedoc-parser": "^4.2.1", "type-fest": "2.19.0" }, diff --git a/code/renderers/vue/package.json b/code/renderers/vue/package.json index ac891b97e3c4..5ae8db74ad72 100644 --- a/code/renderers/vue/package.json +++ b/code/renderers/vue/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook Vue renderer", "keywords": [ "storybook" @@ -48,12 +48,12 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/core-client": "7.0.20", - "@storybook/docs-tools": "7.0.20", + "@storybook/client-logger": "7.0.21", + "@storybook/core-client": "7.0.21", + "@storybook/docs-tools": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/preview-api": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/preview-api": "7.0.21", + "@storybook/types": "7.0.21", "ts-dedent": "^2.0.0", "type-fest": "2.19.0" }, diff --git a/code/renderers/vue3/package.json b/code/renderers/vue3/package.json index c6c213af57bb..a44780aa5235 100644 --- a/code/renderers/vue3/package.json +++ b/code/renderers/vue3/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook Vue 3 renderer", "keywords": [ "storybook" @@ -48,14 +48,14 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/core-client": "7.0.20", - "@storybook/docs-tools": "7.0.20", + "@storybook/core-client": "7.0.21", + "@storybook/docs-tools": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/preview-api": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/preview-api": "7.0.21", + "@storybook/types": "7.0.21", "ts-dedent": "^2.0.0", "type-fest": "2.19.0", - "vue-component-type-helpers": "^1.6.5" + "vue-component-type-helpers": "latest" }, "devDependencies": { "@digitak/esrun": "^3.2.2", diff --git a/code/renderers/web-components/package.json b/code/renderers/web-components/package.json index 12e98f532605..47d9417e79c9 100644 --- a/code/renderers/web-components/package.json +++ b/code/renderers/web-components/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook web-components renderer", "keywords": [ "lit", @@ -51,13 +51,13 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", - "@storybook/core-client": "7.0.20", - "@storybook/docs-tools": "7.0.20", + "@storybook/client-logger": "7.0.21", + "@storybook/core-client": "7.0.21", + "@storybook/docs-tools": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/manager-api": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/types": "7.0.21", "ts-dedent": "^2.0.0" }, "devDependencies": { diff --git a/code/renderers/web-components/src/docs/__testfixtures__/lit-element-demo-card/properties.snapshot b/code/renderers/web-components/src/docs/__testfixtures__/lit-element-demo-card/properties.snapshot index 127bc8704a4a..7f1b194d16b6 100644 --- a/code/renderers/web-components/src/docs/__testfixtures__/lit-element-demo-card/properties.snapshot +++ b/code/renderers/web-components/src/docs/__testfixtures__/lit-element-demo-card/properties.snapshot @@ -84,7 +84,7 @@ Object { }, }, "type": Object { - "name": "void", + "name": "boolean", }, }, "backSide": Object { @@ -126,7 +126,7 @@ Object { "name": "header", "required": false, "table": Object { - "category": "properties", + "category": "attributes", "defaultValue": Object { "summary": "\\"Your Message\\"", }, @@ -152,7 +152,7 @@ Object { "name": "rows", "required": false, "table": Object { - "category": "properties", + "category": "attributes", "defaultValue": Object { "summary": "[]", }, diff --git a/code/renderers/web-components/src/docs/custom-elements.ts b/code/renderers/web-components/src/docs/custom-elements.ts index 66743bfdd7a8..c60d23bfe1ea 100644 --- a/code/renderers/web-components/src/docs/custom-elements.ts +++ b/code/renderers/web-components/src/docs/custom-elements.ts @@ -39,8 +39,19 @@ interface Declaration { } function mapItem(item: TagItem, category: string): InputType { - const type = - category === 'properties' ? { name: item.type?.text || item.type } : { name: 'void' }; + let type; + switch (category) { + case 'attributes': + case 'properties': + type = { name: item.type?.text || item.type }; + break; + case 'slots': + type = { name: 'string' }; + break; + default: + type = { name: 'void' }; + break; + } return { name: item.name, @@ -137,13 +148,13 @@ export const extractArgTypesFromElements = (tagName: string, customElements: Cus const metaData = getMetaData(tagName, customElements); return ( metaData && { - ...mapData(metaData.attributes, 'attributes'), - ...mapData(metaData.members, 'properties'), - ...mapData(metaData.properties, 'properties'), - ...mapData(metaData.events, 'events'), - ...mapData(metaData.slots, 'slots'), - ...mapData(metaData.cssProperties, 'css custom properties'), - ...mapData(metaData.cssParts, 'css shadow parts'), + ...mapData(metaData.members ?? [], 'properties'), + ...mapData(metaData.properties ?? [], 'properties'), + ...mapData(metaData.attributes ?? [], 'attributes'), + ...mapData(metaData.events ?? [], 'events'), + ...mapData(metaData.slots ?? [], 'slots'), + ...mapData(metaData.cssProperties ?? [], 'css custom properties'), + ...mapData(metaData.cssParts ?? [], 'css shadow parts'), } ); }; diff --git a/code/renderers/web-components/template/stories/custom-elements.json b/code/renderers/web-components/template/stories/custom-elements.json index 7389e1bab99b..6bdc06ce7a23 100644 --- a/code/renderers/web-components/template/stories/custom-elements.json +++ b/code/renderers/web-components/template/stories/custom-elements.json @@ -51,8 +51,8 @@ ], "slots": [ { - "description": "This is an unnamed slot (the default slot)", - "name": "" + "name": "prefix", + "description": "Label prefix" } ], "members": [ diff --git a/code/renderers/web-components/template/stories/demo-wc-card.stories.js b/code/renderers/web-components/template/stories/demo-wc-card.stories.js index 0e5dd11f3e68..193a961c6bce 100644 --- a/code/renderers/web-components/template/stories/demo-wc-card.stories.js +++ b/code/renderers/web-components/template/stories/demo-wc-card.stories.js @@ -3,14 +3,22 @@ import './demo-wc-card'; export default { component: 'demo-wc-card', + render: ({ backSide, header, rows, prefix }) => + html` + ${prefix}A simple card + `, }; -const Template = ({ backSide, header, rows }) => - html` - A simple card - `; +export const Front = { + args: { backSide: false, header: undefined, rows: [] }, +}; + +export const Back = { + args: { backSide: true, header: undefined, rows: [] }, +}; -export const Front = Template.bind({}); -Front.args = { backSide: false, header: undefined, rows: [] }; +export const Prefix = { + args: { backSide: false, prefix: 'prefix:', header: 'my header', rows: [] }, +}; diff --git a/code/renderers/web-components/template/stories/demo-wc-card/DemoWcCard.js b/code/renderers/web-components/template/stories/demo-wc-card/DemoWcCard.js index 89e29d06fc92..4c8cee3a7c6c 100644 --- a/code/renderers/web-components/template/stories/demo-wc-card/DemoWcCard.js +++ b/code/renderers/web-components/template/stories/demo-wc-card/DemoWcCard.js @@ -69,7 +69,7 @@ export class DemoWcCard extends LitElement {
-
${this.header}
+
${this.header}
${this.rows.length === 0 diff --git a/code/ui/.storybook/preview.tsx b/code/ui/.storybook/preview.tsx index ed08e0fd9886..7c52ad023776 100644 --- a/code/ui/.storybook/preview.tsx +++ b/code/ui/.storybook/preview.tsx @@ -64,18 +64,19 @@ const ThemeStack = styled.div( const PlayFnNotice = styled.div( { position: 'absolute', - bottom: '1rem', - right: '1rem', - border: '1px solid #ccc', - borderRadius: '5px', - padding: '1rem', - fontSize: '12px', + top: 0, + left: 0, + width: '100%', + borderBottom: '1px solid #ccc', + padding: '3px 8px', + fontSize: '10px', + fontWeight: 'bold', '> *': { display: 'block', }, }, ({ theme }) => ({ - background: theme.background.content, + background: '#fffbd9', color: theme.color.defaultText, }) ); @@ -219,10 +220,15 @@ export const decorators = [ {!parameters.theme && isChromatic() && playFunction && ( - - Detected play function. - Rendering in a single theme - + <> + + + Detected play function in Chromatic. Rendering only light theme to avoid + multiple play functions in the same story. + + +
+ )} diff --git a/code/ui/blocks/package.json b/code/ui/blocks/package.json index 031db785e98b..072e9f66b6c5 100644 --- a/code/ui/blocks/package.json +++ b/code/ui/blocks/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/blocks", - "version": "7.0.20", + "version": "7.0.21", "description": "Storybook Doc Blocks", "keywords": [ "storybook" @@ -43,17 +43,17 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/channels": "7.0.20", - "@storybook/client-logger": "7.0.20", - "@storybook/components": "7.0.20", - "@storybook/core-events": "7.0.20", + "@storybook/channels": "7.0.21", + "@storybook/client-logger": "7.0.21", + "@storybook/components": "7.0.21", + "@storybook/core-events": "7.0.21", "@storybook/csf": "^0.1.0", - "@storybook/docs-tools": "7.0.20", + "@storybook/docs-tools": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.20", - "@storybook/preview-api": "7.0.20", - "@storybook/theming": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/manager-api": "7.0.21", + "@storybook/preview-api": "7.0.21", + "@storybook/theming": "7.0.21", + "@storybook/types": "7.0.21", "@types/lodash": "^4.14.167", "color-convert": "^2.0.1", "dequal": "^2.0.2", @@ -67,7 +67,7 @@ "util-deprecate": "^1.0.2" }, "devDependencies": { - "@storybook/addon-actions": "7.0.20", + "@storybook/addon-actions": "7.0.21", "@types/color-convert": "^2.0.0" }, "peerDependencies": { diff --git a/code/ui/blocks/src/blocks/DocsPage.stories.tsx b/code/ui/blocks/src/blocks/DocsPage.stories.tsx index b65768ef1f3d..e0e0daf53722 100644 --- a/code/ui/blocks/src/blocks/DocsPage.stories.tsx +++ b/code/ui/blocks/src/blocks/DocsPage.stories.tsx @@ -1,4 +1,5 @@ import type { Meta, StoryObj } from '@storybook/react'; +import { within } from '@storybook/testing-library'; import { DocsPage } from './DocsPage'; const meta = { @@ -16,8 +17,20 @@ export const Default: Story = { parameters: { relativeCsfPaths: ['../examples/Button.stories'], }, + play: async ({ canvasElement }) => { + // This play function's sole purpose is to add a "chromatic ignore" region to a flaky row. + const canvas = within(canvasElement); + const sizeCell = await canvas.findByText('How large should the button be?'); + const sizeRow = sizeCell.parentElement?.parentElement?.parentElement; + if (sizeRow?.nodeName === 'TR') { + sizeRow.setAttribute('data-chromatic', 'ignore'); + } else { + throw new Error('the DOM structure changed, please update this test'); + } + }, }; export const SingleStory: Story = { + ...Default, parameters: { relativeCsfPaths: ['../examples/DocsPageParameters.stories'], }, diff --git a/code/ui/components/package.json b/code/ui/components/package.json index dc22c8de2acf..7872dc025628 100644 --- a/code/ui/components/package.json +++ b/code/ui/components/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/components", - "version": "7.0.20", + "version": "7.0.21", "description": "Core Storybook Components", "keywords": [ "storybook" @@ -48,11 +48,11 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/client-logger": "7.0.20", + "@storybook/client-logger": "7.0.21", "@storybook/csf": "^0.1.0", "@storybook/global": "^5.0.0", - "@storybook/theming": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/theming": "7.0.21", + "@storybook/types": "7.0.21", "memoizerific": "^1.11.3", "use-resize-observer": "^9.1.0", "util-deprecate": "^1.0.2" diff --git a/code/ui/manager/package.json b/code/ui/manager/package.json index 4e2434e52370..3f1fc6fa8a45 100644 --- a/code/ui/manager/package.json +++ b/code/ui/manager/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/manager", - "version": "7.0.20", + "version": "7.0.21", "description": "Core Storybook UI", "keywords": [ "storybook" @@ -51,19 +51,19 @@ }, "devDependencies": { "@fal-works/esbuild-plugin-global-externals": "^2.1.2", - "@storybook/addons": "7.0.20", - "@storybook/api": "7.0.20", - "@storybook/channel-postmessage": "7.0.20", - "@storybook/channel-websocket": "7.0.20", - "@storybook/channels": "7.0.20", - "@storybook/client-logger": "7.0.20", - "@storybook/components": "7.0.20", - "@storybook/core-events": "7.0.20", + "@storybook/addons": "7.0.21", + "@storybook/api": "7.0.21", + "@storybook/channel-postmessage": "7.0.21", + "@storybook/channel-websocket": "7.0.21", + "@storybook/channels": "7.0.21", + "@storybook/client-logger": "7.0.21", + "@storybook/components": "7.0.21", + "@storybook/core-events": "7.0.21", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "7.0.20", - "@storybook/router": "7.0.20", - "@storybook/theming": "7.0.20", - "@storybook/types": "7.0.20", + "@storybook/manager-api": "7.0.21", + "@storybook/router": "7.0.21", + "@storybook/theming": "7.0.21", + "@storybook/types": "7.0.21", "@testing-library/react": "^11.2.2", "@types/semver": "^7.3.4", "copy-to-clipboard": "^3.3.1", diff --git a/code/ui/manager/src/components/layout/app.mockdata.tsx b/code/ui/manager/src/components/layout/app.mockdata.tsx index fc87fd64d17e..48e2696d3306 100644 --- a/code/ui/manager/src/components/layout/app.mockdata.tsx +++ b/code/ui/manager/src/components/layout/app.mockdata.tsx @@ -105,6 +105,7 @@ class PlaceholderClock extends Component<{ color: string }, { count: number }> { return (

=2.0.0" peerDependenciesMeta: puppeteer: @@ -5204,18 +5204,18 @@ __metadata: "@angular/platform-browser-dynamic": ^13.3.6 "@emotion/jest": ^11.8.0 "@jest/transform": ^29.3.1 - "@storybook/addon-docs": 7.0.20 - "@storybook/angular": 7.0.20 + "@storybook/addon-docs": 7.0.21 + "@storybook/angular": 7.0.21 "@storybook/babel-plugin-require-context-hook": 1.0.1 - "@storybook/client-api": 7.0.20 - "@storybook/core-common": 7.0.20 - "@storybook/core-webpack": 7.0.20 + "@storybook/client-api": 7.0.21 + "@storybook/core-common": 7.0.21 + "@storybook/core-webpack": 7.0.21 "@storybook/global": ^5.0.0 - "@storybook/preview-api": 7.0.20 - "@storybook/react": 7.0.20 - "@storybook/types": 7.0.20 - "@storybook/vue": 7.0.20 - "@storybook/vue3": 7.0.20 + "@storybook/preview-api": 7.0.21 + "@storybook/react": 7.0.21 + "@storybook/types": 7.0.21 + "@storybook/vue": 7.0.21 + "@storybook/vue3": 7.0.21 "@types/glob": ^7.1.3 "@types/jest-specific-snapshot": ^0.5.6 babel-loader: ^9.1.2 @@ -5289,13 +5289,13 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/addon-storysource@workspace:addons/storysource" dependencies: - "@storybook/client-logger": 7.0.20 - "@storybook/components": 7.0.20 - "@storybook/manager-api": 7.0.20 - "@storybook/preview-api": 7.0.20 - "@storybook/router": 7.0.20 - "@storybook/source-loader": 7.0.20 - "@storybook/theming": 7.0.20 + "@storybook/client-logger": 7.0.21 + "@storybook/components": 7.0.21 + "@storybook/manager-api": 7.0.21 + "@storybook/preview-api": 7.0.21 + "@storybook/router": 7.0.21 + "@storybook/source-loader": 7.0.21 + "@storybook/theming": 7.0.21 "@types/react": ^16.14.34 "@types/react-syntax-highlighter": 11.0.5 estraverse: ^5.2.0 @@ -5313,15 +5313,15 @@ __metadata: languageName: unknown linkType: soft -"@storybook/addon-toolbars@7.0.20, @storybook/addon-toolbars@workspace:*, @storybook/addon-toolbars@workspace:addons/toolbars": +"@storybook/addon-toolbars@7.0.21, @storybook/addon-toolbars@workspace:*, @storybook/addon-toolbars@workspace:addons/toolbars": version: 0.0.0-use.local resolution: "@storybook/addon-toolbars@workspace:addons/toolbars" dependencies: - "@storybook/client-logger": 7.0.20 - "@storybook/components": 7.0.20 - "@storybook/manager-api": 7.0.20 - "@storybook/preview-api": 7.0.20 - "@storybook/theming": 7.0.20 + "@storybook/client-logger": 7.0.21 + "@storybook/components": 7.0.21 + "@storybook/manager-api": 7.0.21 + "@storybook/preview-api": 7.0.21 + "@storybook/theming": 7.0.21 typescript: ~4.9.3 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5334,17 +5334,17 @@ __metadata: languageName: unknown linkType: soft -"@storybook/addon-viewport@7.0.20, @storybook/addon-viewport@workspace:*, @storybook/addon-viewport@workspace:addons/viewport": +"@storybook/addon-viewport@7.0.21, @storybook/addon-viewport@workspace:*, @storybook/addon-viewport@workspace:addons/viewport": version: 0.0.0-use.local resolution: "@storybook/addon-viewport@workspace:addons/viewport" dependencies: - "@storybook/client-logger": 7.0.20 - "@storybook/components": 7.0.20 - "@storybook/core-events": 7.0.20 + "@storybook/client-logger": 7.0.21 + "@storybook/components": 7.0.21 + "@storybook/core-events": 7.0.21 "@storybook/global": ^5.0.0 - "@storybook/manager-api": 7.0.20 - "@storybook/preview-api": 7.0.20 - "@storybook/theming": 7.0.20 + "@storybook/manager-api": 7.0.21 + "@storybook/preview-api": 7.0.21 + "@storybook/theming": 7.0.21 memoizerific: ^1.11.3 prop-types: ^15.7.2 typescript: ~4.9.3 @@ -5359,20 +5359,20 @@ __metadata: languageName: unknown linkType: soft -"@storybook/addons@7.0.20, @storybook/addons@workspace:*, @storybook/addons@workspace:lib/addons": +"@storybook/addons@7.0.21, @storybook/addons@workspace:*, @storybook/addons@workspace:lib/addons": version: 0.0.0-use.local resolution: "@storybook/addons@workspace:lib/addons" dependencies: - "@storybook/manager-api": 7.0.20 - "@storybook/preview-api": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/manager-api": 7.0.21 + "@storybook/preview-api": 7.0.21 + "@storybook/types": 7.0.21 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 languageName: unknown linkType: soft -"@storybook/angular@7.0.20, @storybook/angular@workspace:*, @storybook/angular@workspace:frameworks/angular": +"@storybook/angular@7.0.21, @storybook/angular@workspace:*, @storybook/angular@workspace:frameworks/angular": version: 0.0.0-use.local resolution: "@storybook/angular@workspace:frameworks/angular" dependencies: @@ -5388,21 +5388,21 @@ __metadata: "@angular/forms": ^16.0.0-rc.4 "@angular/platform-browser": ^16.0.0-rc.4 "@angular/platform-browser-dynamic": ^16.0.0-rc.4 - "@storybook/builder-webpack5": 7.0.20 - "@storybook/cli": 7.0.20 - "@storybook/client-logger": 7.0.20 - "@storybook/core-client": 7.0.20 - "@storybook/core-common": 7.0.20 - "@storybook/core-events": 7.0.20 - "@storybook/core-server": 7.0.20 - "@storybook/core-webpack": 7.0.20 - "@storybook/docs-tools": 7.0.20 + "@storybook/builder-webpack5": 7.0.21 + "@storybook/cli": 7.0.21 + "@storybook/client-logger": 7.0.21 + "@storybook/core-client": 7.0.21 + "@storybook/core-common": 7.0.21 + "@storybook/core-events": 7.0.21 + "@storybook/core-server": 7.0.21 + "@storybook/core-webpack": 7.0.21 + "@storybook/docs-tools": 7.0.21 "@storybook/global": ^5.0.0 - "@storybook/manager-api": 7.0.20 - "@storybook/node-logger": 7.0.20 - "@storybook/preview-api": 7.0.20 - "@storybook/telemetry": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/manager-api": 7.0.21 + "@storybook/node-logger": 7.0.21 + "@storybook/preview-api": 7.0.21 + "@storybook/telemetry": 7.0.21 + "@storybook/types": 7.0.21 "@types/node": ^16.0.0 "@types/react": ^16.14.34 "@types/react-dom": ^16.9.14 @@ -5450,12 +5450,12 @@ __metadata: languageName: unknown linkType: soft -"@storybook/api@7.0.20, @storybook/api@workspace:*, @storybook/api@workspace:lib/manager-api-shim": +"@storybook/api@7.0.21, @storybook/api@workspace:*, @storybook/api@workspace:lib/manager-api-shim": version: 0.0.0-use.local resolution: "@storybook/api@workspace:lib/manager-api-shim" dependencies: - "@storybook/client-logger": 7.0.20 - "@storybook/manager-api": 7.0.20 + "@storybook/client-logger": 7.0.21 + "@storybook/manager-api": 7.0.21 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5499,22 +5499,22 @@ __metadata: languageName: node linkType: hard -"@storybook/blocks@7.0.20, @storybook/blocks@workspace:*, @storybook/blocks@workspace:ui/blocks": +"@storybook/blocks@7.0.21, @storybook/blocks@workspace:*, @storybook/blocks@workspace:ui/blocks": version: 0.0.0-use.local resolution: "@storybook/blocks@workspace:ui/blocks" dependencies: - "@storybook/addon-actions": 7.0.20 - "@storybook/channels": 7.0.20 - "@storybook/client-logger": 7.0.20 - "@storybook/components": 7.0.20 - "@storybook/core-events": 7.0.20 + "@storybook/addon-actions": 7.0.21 + "@storybook/channels": 7.0.21 + "@storybook/client-logger": 7.0.21 + "@storybook/components": 7.0.21 + "@storybook/core-events": 7.0.21 "@storybook/csf": ^0.1.0 - "@storybook/docs-tools": 7.0.20 + "@storybook/docs-tools": 7.0.21 "@storybook/global": ^5.0.0 - "@storybook/manager-api": 7.0.20 - "@storybook/preview-api": 7.0.20 - "@storybook/theming": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/manager-api": 7.0.21 + "@storybook/preview-api": 7.0.21 + "@storybook/theming": 7.0.21 + "@storybook/types": 7.0.21 "@types/color-convert": ^2.0.0 "@types/lodash": ^4.14.167 color-convert: ^2.0.1 @@ -5533,14 +5533,14 @@ __metadata: languageName: unknown linkType: soft -"@storybook/builder-manager@7.0.20, @storybook/builder-manager@workspace:*, @storybook/builder-manager@workspace:lib/builder-manager": +"@storybook/builder-manager@7.0.21, @storybook/builder-manager@workspace:*, @storybook/builder-manager@workspace:lib/builder-manager": version: 0.0.0-use.local resolution: "@storybook/builder-manager@workspace:lib/builder-manager" dependencies: "@fal-works/esbuild-plugin-global-externals": ^2.1.2 - "@storybook/core-common": 7.0.20 - "@storybook/manager": 7.0.20 - "@storybook/node-logger": 7.0.20 + "@storybook/core-common": 7.0.21 + "@storybook/manager": 7.0.21 + "@storybook/node-logger": 7.0.21 "@types/ejs": ^3.1.1 "@types/find-cache-dir": ^3.2.1 "@yarnpkg/esbuild-plugin-pnp": ^3.0.0-rc.10 @@ -5558,20 +5558,20 @@ __metadata: languageName: unknown linkType: soft -"@storybook/builder-vite@7.0.20, @storybook/builder-vite@workspace:*, @storybook/builder-vite@workspace:lib/builder-vite": +"@storybook/builder-vite@7.0.21, @storybook/builder-vite@workspace:*, @storybook/builder-vite@workspace:lib/builder-vite": version: 0.0.0-use.local resolution: "@storybook/builder-vite@workspace:lib/builder-vite" dependencies: - "@storybook/channel-postmessage": 7.0.20 - "@storybook/channel-websocket": 7.0.20 - "@storybook/client-logger": 7.0.20 - "@storybook/core-common": 7.0.20 - "@storybook/csf-plugin": 7.0.20 + "@storybook/channel-postmessage": 7.0.21 + "@storybook/channel-websocket": 7.0.21 + "@storybook/client-logger": 7.0.21 + "@storybook/core-common": 7.0.21 + "@storybook/csf-plugin": 7.0.21 "@storybook/mdx2-csf": ^1.0.0 - "@storybook/node-logger": 7.0.20 - "@storybook/preview": 7.0.20 - "@storybook/preview-api": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/node-logger": 7.0.21 + "@storybook/preview": 7.0.21 + "@storybook/preview-api": 7.0.21 + "@storybook/types": 7.0.21 "@types/express": ^4.17.13 "@types/node": ^16.0.0 browser-assert: ^1.2.1 @@ -5602,30 +5602,30 @@ __metadata: languageName: unknown linkType: soft -"@storybook/builder-webpack5@7.0.20, @storybook/builder-webpack5@workspace:*, @storybook/builder-webpack5@workspace:lib/builder-webpack5": +"@storybook/builder-webpack5@7.0.21, @storybook/builder-webpack5@workspace:*, @storybook/builder-webpack5@workspace:lib/builder-webpack5": version: 0.0.0-use.local resolution: "@storybook/builder-webpack5@workspace:lib/builder-webpack5" dependencies: "@babel/core": ^7.12.10 - "@storybook/addons": 7.0.20 - "@storybook/api": 7.0.20 - "@storybook/channel-postmessage": 7.0.20 - "@storybook/channel-websocket": 7.0.20 - "@storybook/channels": 7.0.20 - "@storybook/client-api": 7.0.20 - "@storybook/client-logger": 7.0.20 - "@storybook/components": 7.0.20 - "@storybook/core-common": 7.0.20 - "@storybook/core-events": 7.0.20 - "@storybook/core-webpack": 7.0.20 + "@storybook/addons": 7.0.21 + "@storybook/api": 7.0.21 + "@storybook/channel-postmessage": 7.0.21 + "@storybook/channel-websocket": 7.0.21 + "@storybook/channels": 7.0.21 + "@storybook/client-api": 7.0.21 + "@storybook/client-logger": 7.0.21 + "@storybook/components": 7.0.21 + "@storybook/core-common": 7.0.21 + "@storybook/core-events": 7.0.21 + "@storybook/core-webpack": 7.0.21 "@storybook/global": ^5.0.0 - "@storybook/manager-api": 7.0.20 - "@storybook/node-logger": 7.0.20 - "@storybook/preview": 7.0.20 - "@storybook/preview-api": 7.0.20 - "@storybook/router": 7.0.20 - "@storybook/store": 7.0.20 - "@storybook/theming": 7.0.20 + "@storybook/manager-api": 7.0.21 + "@storybook/node-logger": 7.0.21 + "@storybook/preview": 7.0.21 + "@storybook/preview-api": 7.0.21 + "@storybook/router": 7.0.21 + "@storybook/store": 7.0.21 + "@storybook/theming": 7.0.21 "@types/node": ^16.0.0 "@types/pretty-hrtime": ^1.0.0 "@types/semver": ^7.3.4 @@ -5666,13 +5666,13 @@ __metadata: languageName: unknown linkType: soft -"@storybook/channel-postmessage@7.0.20, @storybook/channel-postmessage@workspace:*, @storybook/channel-postmessage@workspace:lib/channel-postmessage": +"@storybook/channel-postmessage@7.0.21, @storybook/channel-postmessage@workspace:*, @storybook/channel-postmessage@workspace:lib/channel-postmessage": version: 0.0.0-use.local resolution: "@storybook/channel-postmessage@workspace:lib/channel-postmessage" dependencies: - "@storybook/channels": 7.0.20 - "@storybook/client-logger": 7.0.20 - "@storybook/core-events": 7.0.20 + "@storybook/channels": 7.0.21 + "@storybook/client-logger": 7.0.21 + "@storybook/core-events": 7.0.21 "@storybook/global": ^5.0.0 qs: ^6.10.0 telejson: ^7.0.3 @@ -5680,19 +5680,19 @@ __metadata: languageName: unknown linkType: soft -"@storybook/channel-websocket@7.0.20, @storybook/channel-websocket@workspace:*, @storybook/channel-websocket@workspace:lib/channel-websocket": +"@storybook/channel-websocket@7.0.21, @storybook/channel-websocket@workspace:*, @storybook/channel-websocket@workspace:lib/channel-websocket": version: 0.0.0-use.local resolution: "@storybook/channel-websocket@workspace:lib/channel-websocket" dependencies: - "@storybook/channels": 7.0.20 - "@storybook/client-logger": 7.0.20 + "@storybook/channels": 7.0.21 + "@storybook/client-logger": 7.0.21 "@storybook/global": ^5.0.0 telejson: ^7.0.3 typescript: ~4.9.3 languageName: unknown linkType: soft -"@storybook/channels@7.0.20, @storybook/channels@workspace:*, @storybook/channels@workspace:lib/channels": +"@storybook/channels@7.0.21, @storybook/channels@workspace:*, @storybook/channels@workspace:lib/channels": version: 0.0.0-use.local resolution: "@storybook/channels@workspace:lib/channels" dependencies: @@ -5700,21 +5700,21 @@ __metadata: languageName: unknown linkType: soft -"@storybook/cli@7.0.20, @storybook/cli@workspace:*, @storybook/cli@workspace:lib/cli": +"@storybook/cli@7.0.21, @storybook/cli@workspace:*, @storybook/cli@workspace:lib/cli": version: 0.0.0-use.local resolution: "@storybook/cli@workspace:lib/cli" dependencies: "@babel/core": ^7.20.2 "@babel/preset-env": ^7.20.2 "@ndelangen/get-tarball": ^3.0.7 - "@storybook/client-api": 7.0.20 - "@storybook/codemod": 7.0.20 - "@storybook/core-common": 7.0.20 - "@storybook/core-server": 7.0.20 - "@storybook/csf-tools": 7.0.20 - "@storybook/node-logger": 7.0.20 - "@storybook/telemetry": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/client-api": 7.0.21 + "@storybook/codemod": 7.0.21 + "@storybook/core-common": 7.0.21 + "@storybook/core-server": 7.0.21 + "@storybook/csf-tools": 7.0.21 + "@storybook/node-logger": 7.0.21 + "@storybook/telemetry": 7.0.21 + "@storybook/types": 7.0.21 "@types/cross-spawn": ^6.0.2 "@types/prompts": ^2.0.9 "@types/puppeteer-core": ^2.1.0 @@ -5757,16 +5757,16 @@ __metadata: languageName: unknown linkType: soft -"@storybook/client-api@7.0.20, @storybook/client-api@workspace:*, @storybook/client-api@workspace:lib/client-api": +"@storybook/client-api@7.0.21, @storybook/client-api@workspace:*, @storybook/client-api@workspace:lib/client-api": version: 0.0.0-use.local resolution: "@storybook/client-api@workspace:lib/client-api" dependencies: - "@storybook/client-logger": 7.0.20 - "@storybook/preview-api": 7.0.20 + "@storybook/client-logger": 7.0.21 + "@storybook/preview-api": 7.0.21 languageName: unknown linkType: soft -"@storybook/client-logger@7.0.20, @storybook/client-logger@^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0, @storybook/client-logger@workspace:*, @storybook/client-logger@workspace:lib/client-logger": +"@storybook/client-logger@7.0.21, @storybook/client-logger@^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0, @storybook/client-logger@workspace:*, @storybook/client-logger@workspace:lib/client-logger": version: 0.0.0-use.local resolution: "@storybook/client-logger@workspace:lib/client-logger" dependencies: @@ -5775,7 +5775,7 @@ __metadata: languageName: unknown linkType: soft -"@storybook/codemod@7.0.20, @storybook/codemod@workspace:*, @storybook/codemod@workspace:lib/codemod": +"@storybook/codemod@7.0.21, @storybook/codemod@workspace:*, @storybook/codemod@workspace:lib/codemod": version: 0.0.0-use.local resolution: "@storybook/codemod@workspace:lib/codemod" dependencies: @@ -5783,9 +5783,9 @@ __metadata: "@babel/preset-env": ~7.21.0 "@babel/types": ~7.21.2 "@storybook/csf": ^0.1.0 - "@storybook/csf-tools": 7.0.20 - "@storybook/node-logger": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/csf-tools": 7.0.21 + "@storybook/node-logger": 7.0.21 + "@storybook/types": 7.0.21 "@types/jscodeshift": ^0.11.6 ansi-regex: ^5.0.1 cross-spawn: ^7.0.3 @@ -5810,16 +5810,16 @@ __metadata: languageName: unknown linkType: soft -"@storybook/components@7.0.20, @storybook/components@workspace:*, @storybook/components@workspace:ui/components": +"@storybook/components@7.0.21, @storybook/components@workspace:*, @storybook/components@workspace:ui/components": version: 0.0.0-use.local resolution: "@storybook/components@workspace:ui/components" dependencies: "@popperjs/core": ^2.6.0 - "@storybook/client-logger": 7.0.20 + "@storybook/client-logger": 7.0.21 "@storybook/csf": ^0.1.0 "@storybook/global": ^5.0.0 - "@storybook/theming": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/theming": 7.0.21 + "@storybook/types": 7.0.21 "@types/overlayscrollbars": ^1.12.0 "@types/react-syntax-highlighter": 11.0.5 "@types/util-deprecate": ^1.0.0 @@ -5841,21 +5841,21 @@ __metadata: languageName: unknown linkType: soft -"@storybook/core-client@7.0.20, @storybook/core-client@workspace:*, @storybook/core-client@workspace:lib/core-client": +"@storybook/core-client@7.0.21, @storybook/core-client@workspace:*, @storybook/core-client@workspace:lib/core-client": version: 0.0.0-use.local resolution: "@storybook/core-client@workspace:lib/core-client" dependencies: - "@storybook/client-logger": 7.0.20 - "@storybook/preview-api": 7.0.20 + "@storybook/client-logger": 7.0.21 + "@storybook/preview-api": 7.0.21 languageName: unknown linkType: soft -"@storybook/core-common@7.0.20, @storybook/core-common@workspace:*, @storybook/core-common@workspace:lib/core-common": +"@storybook/core-common@7.0.21, @storybook/core-common@workspace:*, @storybook/core-common@workspace:lib/core-common": version: 0.0.0-use.local resolution: "@storybook/core-common@workspace:lib/core-common" dependencies: - "@storybook/node-logger": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/node-logger": 7.0.21 + "@storybook/types": 7.0.21 "@types/mock-fs": ^4.13.1 "@types/node": ^16.0.0 "@types/picomatch": ^2.3.0 @@ -5882,7 +5882,7 @@ __metadata: languageName: unknown linkType: soft -"@storybook/core-events@7.0.20, @storybook/core-events@workspace:*, @storybook/core-events@workspace:lib/core-events": +"@storybook/core-events@7.0.21, @storybook/core-events@workspace:*, @storybook/core-events@workspace:lib/core-events": version: 0.0.0-use.local resolution: "@storybook/core-events@workspace:lib/core-events" dependencies: @@ -5890,24 +5890,24 @@ __metadata: languageName: unknown linkType: soft -"@storybook/core-server@7.0.20, @storybook/core-server@workspace:*, @storybook/core-server@workspace:lib/core-server": +"@storybook/core-server@7.0.21, @storybook/core-server@workspace:*, @storybook/core-server@workspace:lib/core-server": version: 0.0.0-use.local resolution: "@storybook/core-server@workspace:lib/core-server" dependencies: "@aw-web-design/x-default-browser": 1.4.88 "@discoveryjs/json-ext": ^0.5.3 - "@storybook/builder-manager": 7.0.20 - "@storybook/core-common": 7.0.20 - "@storybook/core-events": 7.0.20 + "@storybook/builder-manager": 7.0.21 + "@storybook/core-common": 7.0.21 + "@storybook/core-events": 7.0.21 "@storybook/csf": ^0.1.0 - "@storybook/csf-tools": 7.0.20 + "@storybook/csf-tools": 7.0.21 "@storybook/docs-mdx": ^0.1.0 "@storybook/global": ^5.0.0 - "@storybook/manager": 7.0.20 - "@storybook/node-logger": 7.0.20 - "@storybook/preview-api": 7.0.20 - "@storybook/telemetry": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/manager": 7.0.21 + "@storybook/node-logger": 7.0.21 + "@storybook/preview-api": 7.0.21 + "@storybook/telemetry": 7.0.21 + "@storybook/types": 7.0.21 "@types/compression": ^1.7.0 "@types/detect-port": ^1.3.0 "@types/ip": ^1.1.0 @@ -5947,13 +5947,13 @@ __metadata: languageName: unknown linkType: soft -"@storybook/core-webpack@7.0.20, @storybook/core-webpack@workspace:*, @storybook/core-webpack@workspace:lib/core-webpack": +"@storybook/core-webpack@7.0.21, @storybook/core-webpack@workspace:*, @storybook/core-webpack@workspace:lib/core-webpack": version: 0.0.0-use.local resolution: "@storybook/core-webpack@workspace:lib/core-webpack" dependencies: - "@storybook/core-common": 7.0.20 - "@storybook/node-logger": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/core-common": 7.0.21 + "@storybook/node-logger": 7.0.21 + "@storybook/types": 7.0.21 "@types/node": ^16.0.0 ts-dedent: ^2.0.0 typescript: ~4.9.3 @@ -5961,17 +5961,17 @@ __metadata: languageName: unknown linkType: soft -"@storybook/csf-plugin@7.0.20, @storybook/csf-plugin@workspace:*, @storybook/csf-plugin@workspace:lib/csf-plugin": +"@storybook/csf-plugin@7.0.21, @storybook/csf-plugin@workspace:*, @storybook/csf-plugin@workspace:lib/csf-plugin": version: 0.0.0-use.local resolution: "@storybook/csf-plugin@workspace:lib/csf-plugin" dependencies: - "@storybook/csf-tools": 7.0.20 + "@storybook/csf-tools": 7.0.21 typescript: ~4.9.3 unplugin: ^0.10.2 languageName: unknown linkType: soft -"@storybook/csf-tools@7.0.20, @storybook/csf-tools@workspace:*, @storybook/csf-tools@workspace:lib/csf-tools": +"@storybook/csf-tools@7.0.21, @storybook/csf-tools@workspace:*, @storybook/csf-tools@workspace:lib/csf-tools": version: 0.0.0-use.local resolution: "@storybook/csf-tools@workspace:lib/csf-tools" dependencies: @@ -5980,7 +5980,7 @@ __metadata: "@babel/traverse": ~7.21.2 "@babel/types": ~7.21.2 "@storybook/csf": ^0.1.0 - "@storybook/types": 7.0.20 + "@storybook/types": 7.0.21 "@types/fs-extra": ^11.0.1 "@types/js-yaml": ^3.12.6 fs-extra: ^11.1.0 @@ -6016,14 +6016,14 @@ __metadata: languageName: node linkType: hard -"@storybook/docs-tools@7.0.20, @storybook/docs-tools@workspace:*, @storybook/docs-tools@workspace:lib/docs-tools": +"@storybook/docs-tools@7.0.21, @storybook/docs-tools@workspace:*, @storybook/docs-tools@workspace:lib/docs-tools": version: 0.0.0-use.local resolution: "@storybook/docs-tools@workspace:lib/docs-tools" dependencies: "@babel/core": ^7.12.10 - "@storybook/core-common": 7.0.20 - "@storybook/preview-api": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/core-common": 7.0.21 + "@storybook/preview-api": 7.0.21 + "@storybook/types": 7.0.21 "@types/doctrine": ^0.0.3 doctrine: ^3.0.0 jest-specific-snapshot: ^7.0.0 @@ -6037,12 +6037,12 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/ember@workspace:frameworks/ember" dependencies: - "@storybook/builder-webpack5": 7.0.20 - "@storybook/core-common": 7.0.20 - "@storybook/docs-tools": 7.0.20 + "@storybook/builder-webpack5": 7.0.21 + "@storybook/core-common": 7.0.21 + "@storybook/docs-tools": 7.0.21 "@storybook/global": ^5.0.0 - "@storybook/preview-api": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/preview-api": 7.0.21 + "@storybook/types": 7.0.21 ember-source: ~3.28.1 ts-dedent: ^2.0.0 typescript: ~4.9.3 @@ -6086,15 +6086,15 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/html-vite@workspace:frameworks/html-vite" dependencies: - "@storybook/addons": 7.0.20 - "@storybook/builder-vite": 7.0.20 - "@storybook/channel-postmessage": 7.0.20 - "@storybook/channel-websocket": 7.0.20 - "@storybook/client-api": 7.0.20 - "@storybook/core-server": 7.0.20 - "@storybook/html": 7.0.20 - "@storybook/node-logger": 7.0.20 - "@storybook/preview-web": 7.0.20 + "@storybook/addons": 7.0.21 + "@storybook/builder-vite": 7.0.21 + "@storybook/channel-postmessage": 7.0.21 + "@storybook/channel-websocket": 7.0.21 + "@storybook/client-api": 7.0.21 + "@storybook/core-server": 7.0.21 + "@storybook/html": 7.0.21 + "@storybook/node-logger": 7.0.21 + "@storybook/preview-web": 7.0.21 "@types/node": ^16.0.0 magic-string: ^0.27.0 typescript: ~4.9.3 @@ -6105,11 +6105,11 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/html-webpack5@workspace:frameworks/html-webpack5" dependencies: - "@storybook/builder-webpack5": 7.0.20 - "@storybook/core-common": 7.0.20 + "@storybook/builder-webpack5": 7.0.21 + "@storybook/core-common": 7.0.21 "@storybook/global": ^5.0.0 - "@storybook/html": 7.0.20 - "@storybook/preset-html-webpack": 7.0.20 + "@storybook/html": 7.0.21 + "@storybook/preset-html-webpack": 7.0.21 "@types/node": ^16.0.0 typescript: ~4.9.3 peerDependencies: @@ -6119,15 +6119,15 @@ __metadata: languageName: unknown linkType: soft -"@storybook/html@7.0.20, @storybook/html@workspace:*, @storybook/html@workspace:renderers/html": +"@storybook/html@7.0.21, @storybook/html@workspace:*, @storybook/html@workspace:renderers/html": version: 0.0.0-use.local resolution: "@storybook/html@workspace:renderers/html" dependencies: - "@storybook/core-client": 7.0.20 - "@storybook/docs-tools": 7.0.20 + "@storybook/core-client": 7.0.21 + "@storybook/docs-tools": 7.0.21 "@storybook/global": ^5.0.0 - "@storybook/preview-api": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/preview-api": 7.0.21 + "@storybook/types": 7.0.21 ts-dedent: ^2.0.0 typescript: ~4.9.3 peerDependencies: @@ -6135,15 +6135,15 @@ __metadata: languageName: unknown linkType: soft -"@storybook/instrumenter@7.0.20, @storybook/instrumenter@^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0, @storybook/instrumenter@workspace:*, @storybook/instrumenter@workspace:lib/instrumenter": +"@storybook/instrumenter@7.0.21, @storybook/instrumenter@^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0, @storybook/instrumenter@workspace:*, @storybook/instrumenter@workspace:lib/instrumenter": version: 0.0.0-use.local resolution: "@storybook/instrumenter@workspace:lib/instrumenter" dependencies: - "@storybook/channels": 7.0.20 - "@storybook/client-logger": 7.0.20 - "@storybook/core-events": 7.0.20 + "@storybook/channels": 7.0.21 + "@storybook/client-logger": 7.0.21 + "@storybook/core-events": 7.0.21 "@storybook/global": ^5.0.0 - "@storybook/preview-api": 7.0.20 + "@storybook/preview-api": 7.0.21 typescript: ~4.9.3 languageName: unknown linkType: soft @@ -6187,19 +6187,19 @@ __metadata: languageName: node linkType: hard -"@storybook/manager-api@7.0.20, @storybook/manager-api@workspace:*, @storybook/manager-api@workspace:lib/manager-api": +"@storybook/manager-api@7.0.21, @storybook/manager-api@workspace:*, @storybook/manager-api@workspace:lib/manager-api": version: 0.0.0-use.local resolution: "@storybook/manager-api@workspace:lib/manager-api" dependencies: "@jest/globals": ^29.3.1 - "@storybook/channels": 7.0.20 - "@storybook/client-logger": 7.0.20 - "@storybook/core-events": 7.0.20 + "@storybook/channels": 7.0.21 + "@storybook/client-logger": 7.0.21 + "@storybook/core-events": 7.0.21 "@storybook/csf": ^0.1.0 "@storybook/global": ^5.0.0 - "@storybook/router": 7.0.20 - "@storybook/theming": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/router": 7.0.21 + "@storybook/theming": 7.0.21 + "@storybook/types": 7.0.21 "@types/lodash": ^4.14.167 "@types/qs": ^6 dequal: ^2.0.2 @@ -6218,24 +6218,24 @@ __metadata: languageName: unknown linkType: soft -"@storybook/manager@7.0.20, @storybook/manager@workspace:*, @storybook/manager@workspace:ui/manager": +"@storybook/manager@7.0.21, @storybook/manager@workspace:*, @storybook/manager@workspace:ui/manager": version: 0.0.0-use.local resolution: "@storybook/manager@workspace:ui/manager" dependencies: "@fal-works/esbuild-plugin-global-externals": ^2.1.2 - "@storybook/addons": 7.0.20 - "@storybook/api": 7.0.20 - "@storybook/channel-postmessage": 7.0.20 - "@storybook/channel-websocket": 7.0.20 - "@storybook/channels": 7.0.20 - "@storybook/client-logger": 7.0.20 - "@storybook/components": 7.0.20 - "@storybook/core-events": 7.0.20 + "@storybook/addons": 7.0.21 + "@storybook/api": 7.0.21 + "@storybook/channel-postmessage": 7.0.21 + "@storybook/channel-websocket": 7.0.21 + "@storybook/channels": 7.0.21 + "@storybook/client-logger": 7.0.21 + "@storybook/components": 7.0.21 + "@storybook/core-events": 7.0.21 "@storybook/global": ^5.0.0 - "@storybook/manager-api": 7.0.20 - "@storybook/router": 7.0.20 - "@storybook/theming": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/manager-api": 7.0.21 + "@storybook/router": 7.0.21 + "@storybook/theming": 7.0.21 + "@storybook/types": 7.0.21 "@testing-library/react": ^11.2.2 "@types/semver": ^7.3.4 copy-to-clipboard: ^3.3.1 @@ -6285,13 +6285,13 @@ __metadata: "@babel/preset-typescript": ^7.21.0 "@babel/runtime": ^7.21.0 "@babel/types": ^7.20.5 - "@storybook/addon-actions": 7.0.20 - "@storybook/builder-webpack5": 7.0.20 - "@storybook/core-common": 7.0.20 - "@storybook/node-logger": 7.0.20 - "@storybook/preset-react-webpack": 7.0.20 - "@storybook/preview-api": 7.0.20 - "@storybook/react": 7.0.20 + "@storybook/addon-actions": 7.0.21 + "@storybook/builder-webpack5": 7.0.21 + "@storybook/core-common": 7.0.21 + "@storybook/node-logger": 7.0.21 + "@storybook/preset-react-webpack": 7.0.21 + "@storybook/preview-api": 7.0.21 + "@storybook/react": 7.0.21 "@types/babel__core": ^7 "@types/babel__plugin-transform-runtime": ^7 "@types/babel__preset-env": ^7 @@ -6337,7 +6337,7 @@ __metadata: languageName: unknown linkType: soft -"@storybook/node-logger@7.0.20, @storybook/node-logger@workspace:*, @storybook/node-logger@workspace:lib/node-logger": +"@storybook/node-logger@7.0.21, @storybook/node-logger@workspace:*, @storybook/node-logger@workspace:lib/node-logger": version: 0.0.0-use.local resolution: "@storybook/node-logger@workspace:lib/node-logger" dependencies: @@ -6350,7 +6350,7 @@ __metadata: languageName: unknown linkType: soft -"@storybook/postinstall@7.0.20, @storybook/postinstall@workspace:*, @storybook/postinstall@workspace:lib/postinstall": +"@storybook/postinstall@7.0.21, @storybook/postinstall@workspace:*, @storybook/postinstall@workspace:lib/postinstall": version: 0.0.0-use.local resolution: "@storybook/postinstall@workspace:lib/postinstall" dependencies: @@ -6366,8 +6366,8 @@ __metadata: resolution: "@storybook/preact-vite@workspace:frameworks/preact-vite" dependencies: "@preact/preset-vite": ^2.0.0 - "@storybook/builder-vite": 7.0.20 - "@storybook/preact": 7.0.20 + "@storybook/builder-vite": 7.0.21 + "@storybook/preact": 7.0.21 "@types/node": ^16.0.0 typescript: ~4.9.3 vite: ^4.0.0 @@ -6381,10 +6381,10 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/preact-webpack5@workspace:frameworks/preact-webpack5" dependencies: - "@storybook/builder-webpack5": 7.0.20 - "@storybook/core-common": 7.0.20 - "@storybook/preact": 7.0.20 - "@storybook/preset-preact-webpack": 7.0.20 + "@storybook/builder-webpack5": 7.0.21 + "@storybook/core-common": 7.0.21 + "@storybook/preact": 7.0.21 + "@storybook/preset-preact-webpack": 7.0.21 "@types/node": ^16.0.0 preact: ^10.5.13 typescript: ~4.9.3 @@ -6396,14 +6396,14 @@ __metadata: languageName: unknown linkType: soft -"@storybook/preact@7.0.20, @storybook/preact@workspace:*, @storybook/preact@workspace:renderers/preact": +"@storybook/preact@7.0.21, @storybook/preact@workspace:*, @storybook/preact@workspace:renderers/preact": version: 0.0.0-use.local resolution: "@storybook/preact@workspace:renderers/preact" dependencies: - "@storybook/core-client": 7.0.20 + "@storybook/core-client": 7.0.21 "@storybook/global": ^5.0.0 - "@storybook/preview-api": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/preview-api": 7.0.21 + "@storybook/types": 7.0.21 preact: ^10.5.13 ts-dedent: ^2.0.0 typescript: ~4.9.3 @@ -6417,9 +6417,9 @@ __metadata: resolution: "@storybook/preset-create-react-app@workspace:presets/create-react-app" dependencies: "@pmmmwh/react-refresh-webpack-plugin": ^0.5.1 - "@storybook/node-logger": 7.0.20 + "@storybook/node-logger": 7.0.21 "@storybook/react-docgen-typescript-plugin": 1.0.6--canary.9.0c3f3b7.0 - "@storybook/types": 7.0.20 + "@storybook/types": 7.0.21 "@types/babel__core": ^7.1.7 "@types/node": ^16.0.0 babel-plugin-react-docgen: ^4.1.0 @@ -6432,11 +6432,11 @@ __metadata: languageName: unknown linkType: soft -"@storybook/preset-html-webpack@7.0.20, @storybook/preset-html-webpack@workspace:*, @storybook/preset-html-webpack@workspace:presets/html-webpack": +"@storybook/preset-html-webpack@7.0.21, @storybook/preset-html-webpack@workspace:*, @storybook/preset-html-webpack@workspace:presets/html-webpack": version: 0.0.0-use.local resolution: "@storybook/preset-html-webpack@workspace:presets/html-webpack" dependencies: - "@storybook/core-webpack": 7.0.20 + "@storybook/core-webpack": 7.0.21 "@types/node": ^16.0.0 html-loader: ^3.1.0 typescript: ~4.9.3 @@ -6446,13 +6446,13 @@ __metadata: languageName: unknown linkType: soft -"@storybook/preset-preact-webpack@7.0.20, @storybook/preset-preact-webpack@workspace:*, @storybook/preset-preact-webpack@workspace:presets/preact-webpack": +"@storybook/preset-preact-webpack@7.0.21, @storybook/preset-preact-webpack@workspace:*, @storybook/preset-preact-webpack@workspace:presets/preact-webpack": version: 0.0.0-use.local resolution: "@storybook/preset-preact-webpack@workspace:presets/preact-webpack" dependencies: "@babel/plugin-transform-react-jsx": ^7.21.0 "@babel/preset-typescript": ^7.21.0 - "@storybook/core-webpack": 7.0.20 + "@storybook/core-webpack": 7.0.21 "@types/node": ^16.0.0 preact: ^10.5.13 typescript: ~4.9.3 @@ -6462,17 +6462,17 @@ __metadata: languageName: unknown linkType: soft -"@storybook/preset-react-webpack@7.0.20, @storybook/preset-react-webpack@workspace:*, @storybook/preset-react-webpack@workspace:presets/react-webpack": +"@storybook/preset-react-webpack@7.0.21, @storybook/preset-react-webpack@workspace:*, @storybook/preset-react-webpack@workspace:presets/react-webpack": version: 0.0.0-use.local resolution: "@storybook/preset-react-webpack@workspace:presets/react-webpack" dependencies: "@babel/preset-flow": ^7.18.6 "@babel/preset-react": ^7.18.6 "@pmmmwh/react-refresh-webpack-plugin": ^0.5.5 - "@storybook/core-webpack": 7.0.20 - "@storybook/docs-tools": 7.0.20 - "@storybook/node-logger": 7.0.20 - "@storybook/react": 7.0.20 + "@storybook/core-webpack": 7.0.21 + "@storybook/docs-tools": 7.0.21 + "@storybook/node-logger": 7.0.21 + "@storybook/react": 7.0.21 "@storybook/react-docgen-typescript-plugin": 1.0.6--canary.9.0c3f3b7.0 "@types/node": ^16.0.0 "@types/semver": ^7.3.4 @@ -6495,14 +6495,14 @@ __metadata: languageName: unknown linkType: soft -"@storybook/preset-server-webpack@7.0.20, @storybook/preset-server-webpack@workspace:*, @storybook/preset-server-webpack@workspace:presets/server-webpack": +"@storybook/preset-server-webpack@7.0.21, @storybook/preset-server-webpack@workspace:*, @storybook/preset-server-webpack@workspace:presets/server-webpack": version: 0.0.0-use.local resolution: "@storybook/preset-server-webpack@workspace:presets/server-webpack" dependencies: - "@storybook/core-server": 7.0.20 - "@storybook/core-webpack": 7.0.20 + "@storybook/core-server": 7.0.21 + "@storybook/core-webpack": 7.0.21 "@storybook/global": ^5.0.0 - "@storybook/server": 7.0.20 + "@storybook/server": 7.0.21 "@types/node": ^16.0.0 fs-extra: ^11.1.0 jest-specific-snapshot: ^7.0.0 @@ -6514,12 +6514,12 @@ __metadata: languageName: unknown linkType: soft -"@storybook/preset-svelte-webpack@7.0.20, @storybook/preset-svelte-webpack@workspace:*, @storybook/preset-svelte-webpack@workspace:presets/svelte-webpack": +"@storybook/preset-svelte-webpack@7.0.21, @storybook/preset-svelte-webpack@workspace:*, @storybook/preset-svelte-webpack@workspace:presets/svelte-webpack": version: 0.0.0-use.local resolution: "@storybook/preset-svelte-webpack@workspace:presets/svelte-webpack" dependencies: - "@storybook/core-webpack": 7.0.20 - "@storybook/node-logger": 7.0.20 + "@storybook/core-webpack": 7.0.21 + "@storybook/node-logger": 7.0.21 svelte: ^3.31.2 svelte-loader: ^3.1.2 sveltedoc-parser: ^4.2.1 @@ -6532,12 +6532,12 @@ __metadata: languageName: unknown linkType: soft -"@storybook/preset-vue-webpack@7.0.20, @storybook/preset-vue-webpack@workspace:*, @storybook/preset-vue-webpack@workspace:presets/vue-webpack": +"@storybook/preset-vue-webpack@7.0.21, @storybook/preset-vue-webpack@workspace:*, @storybook/preset-vue-webpack@workspace:presets/vue-webpack": version: 0.0.0-use.local resolution: "@storybook/preset-vue-webpack@workspace:presets/vue-webpack" dependencies: - "@storybook/core-webpack": 7.0.20 - "@storybook/docs-tools": 7.0.20 + "@storybook/core-webpack": 7.0.21 + "@storybook/docs-tools": 7.0.21 "@types/node": ^16.0.0 ts-loader: ^9.2.8 typescript: ~4.9.3 @@ -6557,12 +6557,12 @@ __metadata: languageName: unknown linkType: soft -"@storybook/preset-vue3-webpack@7.0.20, @storybook/preset-vue3-webpack@workspace:*, @storybook/preset-vue3-webpack@workspace:presets/vue3-webpack": +"@storybook/preset-vue3-webpack@7.0.21, @storybook/preset-vue3-webpack@workspace:*, @storybook/preset-vue3-webpack@workspace:presets/vue3-webpack": version: 0.0.0-use.local resolution: "@storybook/preset-vue3-webpack@workspace:presets/vue3-webpack" dependencies: - "@storybook/core-webpack": 7.0.20 - "@storybook/docs-tools": 7.0.20 + "@storybook/core-webpack": 7.0.21 + "@storybook/docs-tools": 7.0.21 "@types/node": ^16.0.0 "@vue/compiler-sfc": ^3.2.33 ts-loader: ^9.2.8 @@ -6580,14 +6580,14 @@ __metadata: languageName: unknown linkType: soft -"@storybook/preset-web-components-webpack@7.0.20, @storybook/preset-web-components-webpack@workspace:*, @storybook/preset-web-components-webpack@workspace:presets/web-components-webpack": +"@storybook/preset-web-components-webpack@7.0.21, @storybook/preset-web-components-webpack@workspace:*, @storybook/preset-web-components-webpack@workspace:presets/web-components-webpack": version: 0.0.0-use.local resolution: "@storybook/preset-web-components-webpack@workspace:presets/web-components-webpack" dependencies: "@babel/plugin-syntax-dynamic-import": ^7.8.3 "@babel/plugin-syntax-import-meta": ^7.10.4 "@babel/preset-env": ^7.20.2 - "@storybook/core-webpack": 7.0.20 + "@storybook/core-webpack": 7.0.21 "@types/node": ^16.0.0 babel-loader: ^7.0.0 || ^8.0.0 || ^9.0.0 babel-plugin-bundled-import-meta: ^0.3.1 @@ -6598,19 +6598,19 @@ __metadata: languageName: unknown linkType: soft -"@storybook/preview-api@7.0.20, @storybook/preview-api@workspace:*, @storybook/preview-api@workspace:lib/preview-api": +"@storybook/preview-api@7.0.21, @storybook/preview-api@workspace:*, @storybook/preview-api@workspace:lib/preview-api": version: 0.0.0-use.local resolution: "@storybook/preview-api@workspace:lib/preview-api" dependencies: "@jest/globals": ^26.6.2 - "@storybook/channel-postmessage": 7.0.20 - "@storybook/channels": 7.0.20 - "@storybook/client-logger": 7.0.20 - "@storybook/core-common": 7.0.20 - "@storybook/core-events": 7.0.20 + "@storybook/channel-postmessage": 7.0.21 + "@storybook/channels": 7.0.21 + "@storybook/client-logger": 7.0.21 + "@storybook/core-common": 7.0.21 + "@storybook/core-events": 7.0.21 "@storybook/csf": ^0.1.0 "@storybook/global": ^5.0.0 - "@storybook/types": 7.0.20 + "@storybook/types": 7.0.21 "@types/qs": ^6.9.5 ansi-to-html: ^0.6.11 dequal: ^2.0.2 @@ -6625,25 +6625,25 @@ __metadata: languageName: unknown linkType: soft -"@storybook/preview-web@7.0.20, @storybook/preview-web@workspace:*, @storybook/preview-web@workspace:lib/preview-web": +"@storybook/preview-web@7.0.21, @storybook/preview-web@workspace:*, @storybook/preview-web@workspace:lib/preview-web": version: 0.0.0-use.local resolution: "@storybook/preview-web@workspace:lib/preview-web" dependencies: - "@storybook/client-logger": 7.0.20 - "@storybook/preview-api": 7.0.20 + "@storybook/client-logger": 7.0.21 + "@storybook/preview-api": 7.0.21 languageName: unknown linkType: soft -"@storybook/preview@7.0.20, @storybook/preview@workspace:*, @storybook/preview@workspace:lib/preview": +"@storybook/preview@7.0.21, @storybook/preview@workspace:*, @storybook/preview@workspace:lib/preview": version: 0.0.0-use.local resolution: "@storybook/preview@workspace:lib/preview" dependencies: - "@storybook/channel-postmessage": 7.0.20 - "@storybook/channel-websocket": 7.0.20 - "@storybook/channels": 7.0.20 - "@storybook/client-logger": 7.0.20 - "@storybook/core-events": 7.0.20 - "@storybook/preview-api": 7.0.20 + "@storybook/channel-postmessage": 7.0.21 + "@storybook/channel-websocket": 7.0.21 + "@storybook/channels": 7.0.21 + "@storybook/client-logger": 7.0.21 + "@storybook/core-events": 7.0.21 + "@storybook/preview-api": 7.0.21 typescript: ~4.9.3 languageName: unknown linkType: soft @@ -6666,11 +6666,11 @@ __metadata: languageName: node linkType: hard -"@storybook/react-dom-shim@7.0.20, @storybook/react-dom-shim@workspace:lib/react-dom-shim": +"@storybook/react-dom-shim@7.0.21, @storybook/react-dom-shim@workspace:lib/react-dom-shim": version: 0.0.0-use.local resolution: "@storybook/react-dom-shim@workspace:lib/react-dom-shim" dependencies: - "@storybook/types": 7.0.20 + "@storybook/types": 7.0.21 typescript: ~4.9.3 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -6684,8 +6684,8 @@ __metadata: dependencies: "@joshwooding/vite-plugin-react-docgen-typescript": 0.2.1 "@rollup/pluginutils": ^4.2.0 - "@storybook/builder-vite": 7.0.20 - "@storybook/react": 7.0.20 + "@storybook/builder-vite": 7.0.21 + "@storybook/react": 7.0.21 "@types/node": ^16.0.0 "@vitejs/plugin-react": ^3.0.1 ast-types: ^0.14.2 @@ -6704,9 +6704,9 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/react-webpack5@workspace:frameworks/react-webpack5" dependencies: - "@storybook/builder-webpack5": 7.0.20 - "@storybook/preset-react-webpack": 7.0.20 - "@storybook/react": 7.0.20 + "@storybook/builder-webpack5": 7.0.21 + "@storybook/preset-react-webpack": 7.0.21 + "@storybook/react": 7.0.21 "@types/node": ^16.0.0 jest-specific-snapshot: ^7.0.0 typescript: ~4.9.3 @@ -6722,18 +6722,18 @@ __metadata: languageName: unknown linkType: soft -"@storybook/react@7.0.20, @storybook/react@workspace:*, @storybook/react@workspace:renderers/react": +"@storybook/react@7.0.21, @storybook/react@workspace:*, @storybook/react@workspace:renderers/react": version: 0.0.0-use.local resolution: "@storybook/react@workspace:renderers/react" dependencies: "@babel/core": ^7.20.2 - "@storybook/client-logger": 7.0.20 - "@storybook/core-client": 7.0.20 - "@storybook/docs-tools": 7.0.20 + "@storybook/client-logger": 7.0.21 + "@storybook/core-client": 7.0.21 + "@storybook/docs-tools": 7.0.21 "@storybook/global": ^5.0.0 - "@storybook/preview-api": 7.0.20 - "@storybook/react-dom-shim": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/preview-api": 7.0.21 + "@storybook/react-dom-shim": 7.0.21 + "@storybook/types": 7.0.21 "@types/escodegen": ^0.0.6 "@types/estree": ^0.0.51 "@types/node": ^16.0.0 @@ -6777,7 +6777,7 @@ __metadata: "@nrwl/cli": ^15.4.5 "@nrwl/nx-cloud": ^15.0.2 "@nrwl/workspace": ^15.4.5 - "@playwright/test": 1.32.3 + "@playwright/test": ^1.35.0 "@storybook/addon-a11y": "workspace:*" "@storybook/addon-actions": "workspace:*" "@storybook/addon-backgrounds": "workspace:*" @@ -6923,7 +6923,6 @@ __metadata: lodash: ^4.17.21 node-gyp: ^8.4.0 nx: ^15.4.5 - playwright: 1.32.3 prettier: 2.8.0 process: ^0.11.10 raf: ^3.4.1 @@ -6957,11 +6956,11 @@ __metadata: languageName: unknown linkType: soft -"@storybook/router@7.0.20, @storybook/router@workspace:*, @storybook/router@workspace:lib/router": +"@storybook/router@7.0.21, @storybook/router@workspace:*, @storybook/router@workspace:lib/router": version: 0.0.0-use.local resolution: "@storybook/router@workspace:lib/router" dependencies: - "@storybook/client-logger": 7.0.20 + "@storybook/client-logger": 7.0.21 "@storybook/global": ^5.0.0 dequal: ^2.0.2 lodash: ^4.17.21 @@ -6980,10 +6979,10 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/server-webpack5@workspace:frameworks/server-webpack5" dependencies: - "@storybook/builder-webpack5": 7.0.20 - "@storybook/core-common": 7.0.20 - "@storybook/preset-server-webpack": 7.0.20 - "@storybook/server": 7.0.20 + "@storybook/builder-webpack5": 7.0.21 + "@storybook/core-common": 7.0.21 + "@storybook/preset-server-webpack": 7.0.21 + "@storybook/server": 7.0.21 "@types/node": ^16.0.0 typescript: ~4.9.3 peerDependencies: @@ -6992,15 +6991,15 @@ __metadata: languageName: unknown linkType: soft -"@storybook/server@7.0.20, @storybook/server@workspace:*, @storybook/server@workspace:renderers/server": +"@storybook/server@7.0.21, @storybook/server@workspace:*, @storybook/server@workspace:renderers/server": version: 0.0.0-use.local resolution: "@storybook/server@workspace:renderers/server" dependencies: - "@storybook/core-client": 7.0.20 + "@storybook/core-client": 7.0.21 "@storybook/csf": ^0.1.0 "@storybook/global": ^5.0.0 - "@storybook/preview-api": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/preview-api": 7.0.21 + "@storybook/types": 7.0.21 "@types/fs-extra": ^11.0.1 fs-extra: ^11.1.0 ts-dedent: ^2.0.0 @@ -7009,12 +7008,12 @@ __metadata: languageName: unknown linkType: soft -"@storybook/source-loader@7.0.20, @storybook/source-loader@workspace:*, @storybook/source-loader@workspace:lib/source-loader": +"@storybook/source-loader@7.0.21, @storybook/source-loader@workspace:*, @storybook/source-loader@workspace:lib/source-loader": version: 0.0.0-use.local resolution: "@storybook/source-loader@workspace:lib/source-loader" dependencies: "@storybook/csf": ^0.1.0 - "@storybook/types": 7.0.20 + "@storybook/types": 7.0.21 estraverse: ^5.2.0 jest-specific-snapshot: ^7.0.0 lodash: ^4.17.21 @@ -7026,22 +7025,22 @@ __metadata: languageName: unknown linkType: soft -"@storybook/store@7.0.20, @storybook/store@workspace:*, @storybook/store@workspace:lib/store": +"@storybook/store@7.0.21, @storybook/store@workspace:*, @storybook/store@workspace:lib/store": version: 0.0.0-use.local resolution: "@storybook/store@workspace:lib/store" dependencies: - "@storybook/client-logger": 7.0.20 - "@storybook/preview-api": 7.0.20 + "@storybook/client-logger": 7.0.21 + "@storybook/preview-api": 7.0.21 languageName: unknown linkType: soft -"@storybook/svelte-vite@7.0.20, @storybook/svelte-vite@workspace:frameworks/svelte-vite": +"@storybook/svelte-vite@7.0.21, @storybook/svelte-vite@workspace:frameworks/svelte-vite": version: 0.0.0-use.local resolution: "@storybook/svelte-vite@workspace:frameworks/svelte-vite" dependencies: - "@storybook/builder-vite": 7.0.20 - "@storybook/node-logger": 7.0.20 - "@storybook/svelte": 7.0.20 + "@storybook/builder-vite": 7.0.21 + "@storybook/node-logger": 7.0.21 + "@storybook/svelte": 7.0.21 "@sveltejs/vite-plugin-svelte": ^2.0.0 "@types/node": ^16.0.0 magic-string: ^0.27.0 @@ -7061,10 +7060,10 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/svelte-webpack5@workspace:frameworks/svelte-webpack5" dependencies: - "@storybook/builder-webpack5": 7.0.20 - "@storybook/core-common": 7.0.20 - "@storybook/preset-svelte-webpack": 7.0.20 - "@storybook/svelte": 7.0.20 + "@storybook/builder-webpack5": 7.0.21 + "@storybook/core-common": 7.0.21 + "@storybook/preset-svelte-webpack": 7.0.21 + "@storybook/svelte": 7.0.21 svelte: ^3.48.0 svelte-loader: ^3.1.2 typescript: ~4.9.3 @@ -7077,17 +7076,17 @@ __metadata: languageName: unknown linkType: soft -"@storybook/svelte@7.0.20, @storybook/svelte@workspace:*, @storybook/svelte@workspace:renderers/svelte": +"@storybook/svelte@7.0.21, @storybook/svelte@workspace:*, @storybook/svelte@workspace:renderers/svelte": version: 0.0.0-use.local resolution: "@storybook/svelte@workspace:renderers/svelte" dependencies: - "@storybook/client-logger": 7.0.20 - "@storybook/core-client": 7.0.20 - "@storybook/core-events": 7.0.20 - "@storybook/docs-tools": 7.0.20 + "@storybook/client-logger": 7.0.21 + "@storybook/core-client": 7.0.21 + "@storybook/core-events": 7.0.21 + "@storybook/docs-tools": 7.0.21 "@storybook/global": ^5.0.0 - "@storybook/preview-api": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/preview-api": 7.0.21 + "@storybook/types": 7.0.21 expect-type: ^0.14.2 svelte: ^3.31.2 svelte-check: ^2.9.2 @@ -7103,9 +7102,9 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/sveltekit@workspace:frameworks/sveltekit" dependencies: - "@storybook/builder-vite": 7.0.20 - "@storybook/svelte": 7.0.20 - "@storybook/svelte-vite": 7.0.20 + "@storybook/builder-vite": 7.0.21 + "@storybook/svelte": 7.0.21 + "@storybook/svelte-vite": 7.0.21 "@types/node": ^16.0.0 typescript: ^4.9.3 vite: ^4.0.0 @@ -7114,12 +7113,12 @@ __metadata: languageName: unknown linkType: soft -"@storybook/telemetry@7.0.20, @storybook/telemetry@workspace:*, @storybook/telemetry@workspace:lib/telemetry": +"@storybook/telemetry@7.0.21, @storybook/telemetry@workspace:*, @storybook/telemetry@workspace:lib/telemetry": version: 0.0.0-use.local resolution: "@storybook/telemetry@workspace:lib/telemetry" dependencies: - "@storybook/client-logger": 7.0.20 - "@storybook/core-common": 7.0.20 + "@storybook/client-logger": 7.0.21 + "@storybook/core-common": 7.0.21 chalk: ^4.1.0 detect-package-manager: ^2.0.1 fetch-retry: ^5.0.2 @@ -7144,7 +7143,7 @@ __metadata: languageName: node linkType: hard -"@storybook/theming@7.0.20, @storybook/theming@workspace:*, @storybook/theming@workspace:lib/theming": +"@storybook/theming@7.0.21, @storybook/theming@workspace:*, @storybook/theming@workspace:lib/theming": version: 0.0.0-use.local resolution: "@storybook/theming@workspace:lib/theming" dependencies: @@ -7153,7 +7152,7 @@ __metadata: "@emotion/react": ^11.10.4 "@emotion/styled": ^11.10.4 "@emotion/use-insertion-effect-with-fallbacks": ^1.0.0 - "@storybook/client-logger": 7.0.20 + "@storybook/client-logger": 7.0.21 "@storybook/global": ^5.0.0 "@types/fs-extra": ^11.0.1 "@types/node": ^16.0.0 @@ -7169,11 +7168,11 @@ __metadata: languageName: unknown linkType: soft -"@storybook/types@7.0.20, @storybook/types@workspace:*, @storybook/types@workspace:lib/types": +"@storybook/types@7.0.21, @storybook/types@workspace:*, @storybook/types@workspace:lib/types": version: 0.0.0-use.local resolution: "@storybook/types@workspace:lib/types" dependencies: - "@storybook/channels": 7.0.20 + "@storybook/channels": 7.0.21 "@storybook/csf": ^0.1.0 "@types/babel__core": ^7.0.0 "@types/express": ^4.7.0 @@ -7187,10 +7186,10 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/vue-vite@workspace:frameworks/vue-vite" dependencies: - "@storybook/builder-vite": 7.0.20 - "@storybook/core-common": 7.0.20 - "@storybook/core-server": 7.0.20 - "@storybook/vue": 7.0.20 + "@storybook/builder-vite": 7.0.21 + "@storybook/core-common": 7.0.21 + "@storybook/core-server": 7.0.21 + "@storybook/vue": 7.0.21 magic-string: ^0.27.0 typescript: ~4.9.3 vite: ^4.0.0 @@ -7208,10 +7207,10 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/vue-webpack5@workspace:frameworks/vue-webpack5" dependencies: - "@storybook/builder-webpack5": 7.0.20 - "@storybook/core-common": 7.0.20 - "@storybook/preset-vue-webpack": 7.0.20 - "@storybook/vue": 7.0.20 + "@storybook/builder-webpack5": 7.0.21 + "@storybook/core-common": 7.0.21 + "@storybook/preset-vue-webpack": 7.0.21 + "@storybook/vue": 7.0.21 "@types/node": ^16.0.0 typescript: ~4.9.3 vue: ^2.6.12 @@ -7233,9 +7232,9 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/vue3-vite@workspace:frameworks/vue3-vite" dependencies: - "@storybook/builder-vite": 7.0.20 - "@storybook/core-server": 7.0.20 - "@storybook/vue3": 7.0.20 + "@storybook/builder-vite": 7.0.21 + "@storybook/core-server": 7.0.21 + "@storybook/vue3": 7.0.21 "@types/node": ^16.0.0 "@vitejs/plugin-vue": ^4.0.0 magic-string: ^0.27.0 @@ -7253,10 +7252,10 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/vue3-webpack5@workspace:frameworks/vue3-webpack5" dependencies: - "@storybook/builder-webpack5": 7.0.20 - "@storybook/core-common": 7.0.20 - "@storybook/preset-vue3-webpack": 7.0.20 - "@storybook/vue3": 7.0.20 + "@storybook/builder-webpack5": 7.0.21 + "@storybook/core-common": 7.0.21 + "@storybook/preset-vue3-webpack": 7.0.21 + "@storybook/vue3": 7.0.21 "@types/node": ^16.0.0 "@vue/compiler-sfc": 3.0.0 typescript: ~4.9.3 @@ -7271,39 +7270,39 @@ __metadata: languageName: unknown linkType: soft -"@storybook/vue3@7.0.20, @storybook/vue3@workspace:*, @storybook/vue3@workspace:renderers/vue3": +"@storybook/vue3@7.0.21, @storybook/vue3@workspace:*, @storybook/vue3@workspace:renderers/vue3": version: 0.0.0-use.local resolution: "@storybook/vue3@workspace:renderers/vue3" dependencies: "@digitak/esrun": ^3.2.2 - "@storybook/core-client": 7.0.20 - "@storybook/docs-tools": 7.0.20 + "@storybook/core-client": 7.0.21 + "@storybook/docs-tools": 7.0.21 "@storybook/global": ^5.0.0 - "@storybook/preview-api": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/preview-api": 7.0.21 + "@storybook/types": 7.0.21 "@types/prettier": 2.7.2 "@vue/vue3-jest": 29 ts-dedent: ^2.0.0 type-fest: 2.19.0 typescript: ~4.9.3 vue: ^3.2.47 - vue-component-type-helpers: ^1.6.5 + vue-component-type-helpers: latest vue-tsc: ^1.2.0 peerDependencies: vue: ^3.0.0 languageName: unknown linkType: soft -"@storybook/vue@7.0.20, @storybook/vue@workspace:*, @storybook/vue@workspace:renderers/vue": +"@storybook/vue@7.0.21, @storybook/vue@workspace:*, @storybook/vue@workspace:renderers/vue": version: 0.0.0-use.local resolution: "@storybook/vue@workspace:renderers/vue" dependencies: - "@storybook/client-logger": 7.0.20 - "@storybook/core-client": 7.0.20 - "@storybook/docs-tools": 7.0.20 + "@storybook/client-logger": 7.0.21 + "@storybook/core-client": 7.0.21 + "@storybook/docs-tools": 7.0.21 "@storybook/global": ^5.0.0 - "@storybook/preview-api": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/preview-api": 7.0.21 + "@storybook/types": 7.0.21 ts-dedent: ^2.0.0 type-fest: 2.19.0 typescript: ~4.9.3 @@ -7324,10 +7323,10 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/web-components-vite@workspace:frameworks/web-components-vite" dependencies: - "@storybook/builder-vite": 7.0.20 - "@storybook/core-server": 7.0.20 - "@storybook/node-logger": 7.0.20 - "@storybook/web-components": 7.0.20 + "@storybook/builder-vite": 7.0.21 + "@storybook/core-server": 7.0.21 + "@storybook/node-logger": 7.0.21 + "@storybook/web-components": 7.0.21 "@types/node": ^16.0.0 magic-string: ^0.27.0 typescript: ~4.9.3 @@ -7342,10 +7341,10 @@ __metadata: resolution: "@storybook/web-components-webpack5@workspace:frameworks/web-components-webpack5" dependencies: "@babel/preset-env": ^7.20.2 - "@storybook/builder-webpack5": 7.0.20 - "@storybook/core-common": 7.0.20 - "@storybook/preset-web-components-webpack": 7.0.20 - "@storybook/web-components": 7.0.20 + "@storybook/builder-webpack5": 7.0.21 + "@storybook/core-common": 7.0.21 + "@storybook/preset-web-components-webpack": 7.0.21 + "@storybook/web-components": 7.0.21 "@types/node": ^16.0.0 lit: 2.3.1 typescript: ~4.9.3 @@ -7356,17 +7355,17 @@ __metadata: languageName: unknown linkType: soft -"@storybook/web-components@7.0.20, @storybook/web-components@workspace:*, @storybook/web-components@workspace:renderers/web-components": +"@storybook/web-components@7.0.21, @storybook/web-components@workspace:*, @storybook/web-components@workspace:renderers/web-components": version: 0.0.0-use.local resolution: "@storybook/web-components@workspace:renderers/web-components" dependencies: - "@storybook/client-logger": 7.0.20 - "@storybook/core-client": 7.0.20 - "@storybook/docs-tools": 7.0.20 + "@storybook/client-logger": 7.0.21 + "@storybook/core-client": 7.0.21 + "@storybook/docs-tools": 7.0.21 "@storybook/global": ^5.0.0 - "@storybook/manager-api": 7.0.20 - "@storybook/preview-api": 7.0.20 - "@storybook/types": 7.0.20 + "@storybook/manager-api": 7.0.21 + "@storybook/preview-api": 7.0.21 + "@storybook/types": 7.0.21 "@types/cross-spawn": ^6.0.2 "@types/node": ^16.0.0 cross-spawn: ^7.0.3 @@ -24527,23 +24526,23 @@ __metadata: languageName: node linkType: hard -"playwright-core@npm:1.32.3": - version: 1.32.3 - resolution: "playwright-core@npm:1.32.3" +"playwright-core@npm:1.35.0": + version: 1.35.0 + resolution: "playwright-core@npm:1.35.0" bin: - playwright: cli.js - checksum: 8b94feb15084813607abac69ef3d4f78b345bcc89e322706e62c203b79e74096caf499ce4cd4103b1bfc853f17a9ff0573f636dc0ee88f56a5cb6ed18ce55f06 + playwright-core: cli.js + checksum: 157257f0950190903d75ff6af70258fe1b1c6bf44f144a063428a594c09b4631d4c151ff65e28e1d9fc13edd8bd51c4720a7d87fc755c2afba47f41919bf5875 languageName: node linkType: hard -"playwright@npm:1.32.3": - version: 1.32.3 - resolution: "playwright@npm:1.32.3" +"playwright@npm:1.35.0": + version: 1.35.0 + resolution: "playwright@npm:1.35.0" dependencies: - playwright-core: 1.32.3 + playwright-core: 1.35.0 bin: playwright: cli.js - checksum: 26a3a8897d1a41cd5d001859521ee44b3ac21618e638d3b2a58615672b2f325a6cdeb614dabc6b120999d8874f260c9786683644b13fe07476d4a3a47fcfff1f + checksum: efe6a7c74fff1fe30b952e3d80a6da42779579174ae4ced83e24ebd07d9388f0a43d5188106f08874e645128e27b020c0c8e118948d607328d37a38b20c57c19 languageName: node linkType: hard @@ -27284,7 +27283,7 @@ __metadata: version: 0.0.0-use.local resolution: "sb@workspace:lib/cli-sb" dependencies: - "@storybook/cli": 7.0.20 + "@storybook/cli": 7.0.21 bin: sb: ./index.js languageName: unknown @@ -28261,7 +28260,7 @@ __metadata: version: 0.0.0-use.local resolution: "storybook@workspace:lib/cli-storybook" dependencies: - "@storybook/cli": 7.0.20 + "@storybook/cli": 7.0.21 bin: sb: ./index.js storybook: ./index.js @@ -30776,10 +30775,10 @@ __metadata: languageName: node linkType: hard -"vue-component-type-helpers@npm:^1.6.5": - version: 1.7.8 - resolution: "vue-component-type-helpers@npm:1.7.8" - checksum: 82560704241cad12858e197593b18398bfd43c0319b93f0102723975b392a6319bcd9a5912859ebef0a26965d2301836252713af7e0cfe71a0312237ad64ca16 +"vue-component-type-helpers@npm:latest": + version: 1.6.5 + resolution: "vue-component-type-helpers@npm:1.6.5" + checksum: 205d520c05e53d1cc6f53fe920c64b4c6883249cbfe15026fcda250980bf4ddfc004292e0c9ecaa7fcf983bd143482ffbc4191e0b84f6d3f996a0a07ca3396c4 languageName: node linkType: hard diff --git a/docs/api/arg-types.md b/docs/api/arg-types.md new file mode 100644 index 000000000000..cff029e9fc32 --- /dev/null +++ b/docs/api/arg-types.md @@ -0,0 +1,500 @@ +--- +title: 'ArgTypes' +--- + +ArgTypes specify the behavior of [args](../writing-stories/args.md). By specifying the type of an arg, you constrain the values that it can accept and provide information about args that are not explicitly set (i.e., [description](#description)). + +You can also use argTypes to β€œannotate” args with information used by addons that make use of those args. For instance, to instruct the [controls addon](../essentials/controls.md) to render a color picker, you could specify the `'color'` [control type](#control). + +The most concrete realization of argTypes is the [`ArgTypes` doc block](./doc-block-argtypes.md) ([`Controls`](./doc-block-controls.md) is similar). Each row in the table corresponds to a single argType and the current value of that arg. + +![ArgTypes table](./doc-block-argtypes.png) + +## Automatic argType inference + +If you are using the Storybook [docs](../writing-docs/introduction.md) addon (installed by default as part of [essentials](../essentials/introduction.md)), then Storybook will infer a set of argTypes for each story based on the `component` specified in the [default export](../writing-stories/introduction#default-export) of the CSF file. + +To do so, Storybook uses various static analysis tools depending on your framework. + +| Framework | Static analysis tool | +| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| React | [react-docgen](https://github.com/reactjs/react-docgen) or [react-docgen-typescript](https://github.com/styleguidist/react-docgen-typescript) | +| Vue | [vue-docgen-api](https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/packages/vue-docgen-api) | +| Angular | [compodoc](https://compodoc.app/) | +| WebComponents | [custom-element.json](https://github.com/webcomponents/custom-elements-json) | +| Ember | [YUI doc](https://github.com/ember-learn/ember-cli-addon-docs-yuidoc#documenting-components) | + +The data structure of `argTypes` is designed to match the output of the these tools. Properties specified manually will override what is inferred. + +## Manually specifying argTypes + +For most Storybook projects, argTypes are [automatically inferred](#automatic-argtype-inference) from your components. Any argTypes specified manually will override the inferred values. + +ArgTypes are most often specified at the meta (component) level, in the [default export](../writing-stories/introduction#default-export) of the CSF file: + + + + + + + +They can apply to all stories when specified at the project (global) level, in the `preview.js|ts` configuration file: + + + + + + + +Or they can apply only to a [specific story](../writing-stories/introduction#defining-stories): + + + + + + + +## `argTypes` + +Type: + +```ts +{ + [key: string]: { + control?: ControlType | { type: ControlType; /* See below for more */ }; + description?: string; + if?: Conditional; + mapping?: { [key: string]: { [option: string]: any } }; + name?: string; + options?: string[]; + table?: { + category?: string; + defaultValue?: { summary: string; detail?: string }; + subcategory?: string; + type?: { summary?: string; detail?: string }; + }, + type?: SBType | SBScalarType['name']; + } +} +``` + +You configure argTypes using an object with keys matching the name of args. The value of each key is an object with the following properties: + +### `control` + +Type: + +```ts +| ControlType +| { + type: ControlType, + accept?: string; + labels?: { [option: string]: string }; + max?: number; + min?: number; + presetColors?: string[]; + step?: number; + } +``` + +Default: + +1. `'select'`, if [`options`](#options) are specified +2. Else, inferred from [`type`](#type) +3. Else, `'object'` + +Specify the behavior of the [controls addon](../essentials/controls.md) for the arg. If you specify a string, it's used as the [`type`](#controltype) of the control. If you specify an object, you can provide additional configuration. + + + + + + + +#### `control.type` + +Type: `ControlType | null` + +Default: [Inferred](#automatic-argtype-inference); `'select'`, if [`options`](#options) are specified; falling back to `'object'` + +Specifies the type of control used to change the arg value with the [controls addon](../essentials/controls.md). Here are the available types, `ControlType`, grouped by the type of data they handle: + +| Data type | ControlType | Description | +| -------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **array** | `'object'` | Provides a JSON-based editor to handle the values of the array. Also allows editing in raw mode.
`{ control: 'object' }` | +| **boolean** | `'boolean'` | Provides a toggle for switching between possible states.
`{ control: 'boolean' }` | +| **enum** | `'check'` | Provides a set of stacked checkboxes for selecting multiple options.
`{ control: 'check', options: ['email', 'phone', 'mail'] }` | +| | `'inline-check'` | Provides a set of inlined checkboxes for selecting multiple options.
`{ control: 'inline-check', options: ['email', 'phone', 'mail'] }` | +| | `'radio'` | Provides a set of stacked radio buttons based on the available options.
`{ control: 'radio', options: ['email', 'phone', 'mail'] }` | +| | `'inline-radio'` | Provides a set of inlined radio buttons based on the available options.
`{ control: 'inline-radio', options: ['email', 'phone', 'mail'] }` | +| | `'select'` | Provides a select to choose a single value from the options.
`{ control: 'select', options: [20, 30, 40, 50] }` | +| | `'multi-select'` | Provides a select to choose multiple values from the options.
`{ control: 'multi-select', options: ['USA', 'Canada', 'Mexico'] }` | +| **number** | `'number'` | Provides a numeric input to include the range of all possible values.
`{ control: { type: 'number', min:1, max:30, step: 2 } }` | +| | `'range'` | Provides a range slider to include all possible values.
`{ control: { type: 'range', min: 1, max: 30, step: 3 } }` | +| **object** | `'file'` | Provides a file input that returns an array of URLs. Can be further customized to accept specific file types.
`{ control: { type: 'file', accept: '.png' } }` | +| | `'object'` | Provides a JSON-based editor to handle the object's values. Also allows editing in raw mode.
`{ control: 'object' }` | +| **string** | `'color'` | Provides a color picker to choose color values. Can be additionally configured to include a set of color presets.
`{ control: { type: 'color', presetColors: ['red', 'green']} }` | +| | `'date'` | Provides a datepicker to choose a date.
`{ control: 'date' }` | +| | `'text'` | Provides a freeform text input.
`{ control: 'text' }` | + +
+ +πŸ’‘ The `date` control will convert the date into a UNIX timestamp when the value changes. It's a known limitation that will be fixed in a future release. If you need to represent the actual date, you'll need to update the story's implementation and convert the value into a date object. + +
+ +#### `control.accept` + +Type: `string` + +When `type` is `'file'`, you can specify the file types that are accepted. The value should be a string of comma-separated MIME types. + +#### `control.labels` + +Type: `{ [option: string]: string }` + +Map [`options`](#options) to labels. `labels` doesn't have to be exhaustive. If an option is not in the object's keys, it's used verbatim. + +#### `control.max` + +Type: `number` + +When `type` is `'number'` or `'range'`, sets the maximum allowed value. + +#### `control.min` + +Type: `number` + +When `type` is `'number'` or `'range'`, sets the minimum allowed value. + +#### `control.presetColors` + +Type: `string[]` + +When `type` is `'color'`, defines the set of colors that are available in addition to the general color picker. The values in the array should be valid CSS color values. + +#### `control.step` + +Type: `number` + +When `type` is `'number'` or `'range'`, sets the granularity allowed when incrementing/decrementing the value. + +### `description` + +Type: `string` + +Default: [Inferred](#automatic-argtype-inference) + +Describe the arg. (If you intend to describe the type of the arg, you should use [`table.type`](#tabletype), instead.) + + + + + + + +### `if` + +Type: + +```ts +{ + [predicateType: 'arg' | 'global']: string; + eq?: any; + exists?: boolean; + neq?: any; + truthy?: boolean; +} +``` + +Conditionally render an argType based on the value of another [arg](../writing-stories/args.md) or [global](../essentials/toolbars-and-globals.md). + + + + + + + +### `mapping` + +Type: `{ [key: string]: { [option: string]: any } }` + +Map [`options`](#options) to values. + +When dealing with non-primitive values, you'll notice that you'll run into some limitations. The most obvious issue is that not every value can be represented as part of the `args` param in the URL, losing the ability to share and deeplink to such a state. Beyond that, complex values such as JSX cannot be synchronized between the manager (e.g., Controls addon) and the preview (your story). + +`mapping` doesn't have to be exhaustive. If the currently selected option is not listed, it's used verbatim. Can be used with [`control.labels`](#labels). + + + + + + + +### `name` + +Type: `string` + +The `argTypes` object uses the name of the arg as the key. By default, that key is used when displaying the argType in Storybook. You can override the displayed name by specifying a `name` property. + + + + + + + +
+ +πŸ’‘ Be careful renaming args in this way. Users of the component you're documenting will not be able to use the documented name as a property of your component and the actual name will not displayed. + +For this reason, the `name` property is best used when defining an `argType` that is only used for documentation purposes and not an actual property of the component. For example, when [providing argTypes for each property of an object](https://stackblitz.com/edit/github-uplqzp?file=src/stories/Button.stories.tsx). + +
+ +### `options` + +Type: `string[]` + +Default: [Inferred](#automatic-argtype-inference) + +If the arg accepts a finite set of values, you can specify them with `options`. If those values are [complex](../essentials/controls#dealing-with-complex-values), like JSX elements, you can use [`mapping`](#mapping) to map them to string values. You can use [`control.labels`](#labels) to provide custom labels for the options. + + + + + + + +### `table` + +Type: + +```ts +{ + category?: string; + defaultValue?: { + detail?: string; + summary: string; + }; + subcategory?: string; + type?: { + detail?: string; + summary: string; + }; +} +``` + +Default: [Inferred](#automatic-argtype-inference) + +Specify how the arg is documented in the [`ArgTypes` doc block](./doc-block-argtypes.md), [`Controls` doc block](./doc-block-controls.md), and [Controls addon panel](../essentials/controls.md). + + + + + + + +#### `table.category` + +Type: `string` + +Default: [Inferred](#automatic-argtype-inference), in some frameworks + +Display the argType under a category heading, with the label specified by `category`. + +#### `table.defaultValue` + +Type: `{ detail?: string; summary: string }` + +Default: [Inferred](#automatic-argtype-inference) + +The documented default value of the argType. `summary` is typically used for the value itself, while `detail` is used for additional information. + +#### `table.subcategory` + +Type: `string` + +Display the argType under a subcategory heading (which displays under the [`category`] heading), with the label specified by `subcategory`. + +#### `table.type` + +Type: `{ detail?: string; summary: string }` + +Default: Inferred from [`type`](#type) + +The documented type of the argType. `summary` is typically used for the type itself, while `detail` is used for additional information. + +If you need to specify the actual, semantic type, you should use [`type`](#type), instead. + +### `type` + +Type: `'boolean' | 'function' | 'number' | 'string' | 'symbol' | SBType` + +The full type of `SBType` is: + +
+SBType + +```ts +interface SBBaseType { + required?: boolean; + raw?: string; +} + +type SBScalarType = SBBaseType & { + name: 'boolean' | 'string' | 'number' | 'function' | 'symbol'; +}; + +type SBArrayType = SBBaseType & { + name: 'array'; + value: SBType; +}; +type SBObjectType = SBBaseType & { + name: 'object'; + value: Record; +}; +type SBEnumType = SBBaseType & { + name: 'enum'; + value: (string | number)[]; +}; +type SBIntersectionType = SBBaseType & { + name: 'intersection'; + value: SBType[]; +}; +type SBUnionType = SBBaseType & { + name: 'union'; + value: SBType[]; +}; +type SBOtherType = SBBaseType & { + name: 'other'; + value: string; +}; + +type SBType = + | SBScalarType + | SBEnumType + | SBArrayType + | SBObjectType + | SBIntersectionType + | SBUnionType + | SBOtherType; +``` + +
+ +Default: [Inferred](#automatic-argtype-inference) + +Specifies the semantic type of the argType. When an argType is [inferred](#automatic-argtype-inference), the information from the various tools is summarized in this property, which is then used to infer other properties, like [`control`](#control) and [`table.type`](#tabletype). + +If you only need to specify the documented type, you should use [`table.type`](#tabletype), instead. + + + + + + + +### `defaultValue` (deprecated) + +Type: `any` + +Define the default value of the argType. Deprecated in favor of defining the [`arg`](../writing-stories/args.md) value directly. + + + + + + diff --git a/docs/api/argtypes.md b/docs/api/argtypes.md deleted file mode 100644 index da1c1927e683..000000000000 --- a/docs/api/argtypes.md +++ /dev/null @@ -1,216 +0,0 @@ ---- -title: 'ArgTypes' ---- - -ArgTypes are a first-class feature in Storybook for specifying the behaviour of [Args](../writing-stories/args.md). By specifying the type of an arg, you constrain the values that it can take and provide information about args that are not explicitly set (i.e., not required). - -You can also use argTypes to β€œannotate” args with information used by addons that make use of those args. For instance, to instruct the controls addon to render a color, you could choose a string-valued arg. - -The most concrete realization of argTypes is the [`ArgTypes` doc block](./doc-block-argtypes.md) ([`Controls`](./doc-block-controls.md) is similar). Each row in the table corresponds to a single argType and the current value of that arg. - -![Storybook inferring automatically the argType](./doc-block-argtypes.png) - -## Automatic argType inference - -If you are using the Storybook [docs](../writing-docs/introduction.md) addon (installed by default as part of [essentials](../essentials/introduction.md)), then Storybook will infer a set of argTypes for each story based on the `component` specified in the [default export](./csf.md#default-export) of the CSF file. - -To do so, Storybook uses various static analysis tools depending on your framework. - -- React - - [react-docgen](https://github.com/reactjs/react-docgen) - - [react-docgen-typescript](https://github.com/styleguidist/react-docgen-typescript) -- Vue - - [vue-docgen-api](https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/packages/vue-docgen-api) -- Angular - - [compodoc](https://compodoc.app/) -- WebComponents - - [custom-element.json](https://github.com/webcomponents/custom-elements-json) -- Ember - - [YUI doc](https://github.com/ember-learn/ember-cli-addon-docs-yuidoc#documenting-components) - -The format of the generated argType will look something like this: - - - - - - - -This ArgTypes data structure, name, type, defaultValue, and description are standard fields in all ArgTypes (analogous to PropTypes in React). The table and control fields are addon-specific annotations. So, for example, the table annotation provides extra information to customize how the label gets rendered, and the control annotation includes additional information for the control editing the property. - -## Manual specification - -If you want more control over the args table or any other aspect of using argTypes, you can overwrite the generated argTypes for your component on a per-arg basis. For instance, with the above-inferred argTypes and the following default export: - -
-πŸ’‘ As with other Storybook properties (e.g., args, decorators), you can also override ArgTypes per story basis. -
- - - - - - - -The `values.description`, `table.type`, and `controls.type` are merged into the defaults extracted by Storybook. The final merged values would be: - - - - - - - -In particular, this would render a row with a modified description, a type display with a dropdown that shows the detail, and no control. - -### Available properties - -Here's an explanation of each available property: - -| Property | Description | -| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | The name of the property.
`argTypes: { label: { name: 'Something' } }` | -| `type.name` | Sets a type for the property.
`argTypes: { label: { type: { name: 'number' } } }` | -| `type.required` | Sets the property as optional or required.
`argTypes: { label: { type: { required: true } }` | -| `description` | Sets a Markdown description for the property.
`argTypes: { label: { description: 'Something' } }` | -| `table.type.summary` | Provide a short version of the type.
`argTypes: { label: { table: { type: { summary: 'a short summary' } }}}` | -| `table.type.detail` | Provides an extended version of the type.
`argTypes: { label: { table: { type: { detail: 'something' } }}}` | -| `table.defaultValue.summary` | Provide a short version of the default value.
`argTypes: { label: { table: { defaultValue: { summary: 'Hello World' } }}}` | -| `table.defaultValue.detail` | Provides a longer version of the default value.
`argTypes: { label: { table: { defaultValue: { detail: 'Something' } }}}` | -| `control` | Associates a control for the property.
`argTypes: { label: { control: { type: 'text'} } }`
Read the [Essentials documentation](../essentials/controls.md) to learn more about controls. | - -#### Shorthands - -
- -πŸ’‘ The `@storybook/addon-docs` provide a shorthand for common tasks: - -- `type: 'number'` is shorthand for type: { name: 'number' } -- `control: 'radio'` is shorthand for control: { type: 'radio' } - -
- -### Grouping - -You can also manually specify groups to organize related `argTypes` into categories or even subcategories. Based on the following component implementation: - - - - - - - -You could group similar properties for better organization and structure. Using the table below as a reference: - -| Field | Category | -| :------------------ | :------: | -| **backgroundColor** | Colors | -| **primary** | Colors | -| **label** | Text | -| **onClick** | Events | -| **size** | Sizes | - -Results in the following change into your story and UI. - - - - - - - -![button story with args grouped into categories](./button-args-grouped-categories.png) - -You can also extend the formula above and introduce subcategories, allowing better structuring and organization. Using the table below as a reference leads to the following change to your story and UI: - -| Field | Category | Subcategory | -| :------------------ | :------: | :-------------: | -| **backgroundColor** | Colors | Button colors | -| **primary** | Colors | Button style | -| **label** | Text | Button contents | -| **onClick** | Events | Button Events | -| **size** | Sizes | | - - - - - - - -![button story with args grouped into categories](./button-args-grouped-subcategories.png) - -#### Global `argTypes` - -You can also define arg types at the global level; they will apply to every component's stories unless you overwrite them. To do so, export the `argTypes` key in your `preview.js`: - - - - - - - -
-πŸ’‘ If you define a global arg type for a story that does not have that arg (e.g. if there is no corresponding global arg definition), then the arg type will have no effect. -
- -#### Using argTypes in addons - -If you want to access the argTypes of the current component inside an addon, you can use the `useArgTypes` hook from the `@storybook/manager-api` package: - - - - - - diff --git a/docs/api/doc-block-controls.md b/docs/api/doc-block-controls.md index e9824ee7e9d8..133ceed32c1c 100644 --- a/docs/api/doc-block-controls.md +++ b/docs/api/doc-block-controls.md @@ -10,6 +10,12 @@ The `Controls` block can be used to show a dynamic table of args for a given sto

+
+ +⚠️ The Controls doc block will only have functioning UI controls if you have also installed and registered [`@storybook/addon-controls`](../essentials/controls.md) (included in [`@storybook/addon-essentials`](../essentials/introduction.md)). + +
+ ![Screenshot of Controls block](./doc-block-controls.png) @@ -66,6 +72,12 @@ The example above applied the parameter at the [component](../writing-stories/pa +
+ +πŸ’‘ This API configures Controls blocks used within docs pages. To configure the Controls addon panel, see the [Controls addon docs](../essentials/controls.md). To configure individual controls, you can specify [argTypes](./arg-types.md#control) for each. + +
+ ### `exclude` Type: `string[] | RegExp` diff --git a/docs/migration-guide.md b/docs/migration-guide.md index 2f617dc6a87f..a66b94b7ac67 100644 --- a/docs/migration-guide.md +++ b/docs/migration-guide.md @@ -6,19 +6,16 @@ Storybook 7 is our first major release in over 2 years. A lot has changed during ## Major breaking changes -The rest of this guide will help you upgrade successfully, either automatically or manually. But first, we’ve accumulated a lot of breaking changes in Storybook 7. Here are the most impactful changes you should know about before you go further: +The rest of this guide will help you upgrade successfully, either automatically or manually. But first, we’ve accumulated a lot of [breaking changes](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#70-breaking-changes) in Storybook 7. Here are the most impactful changes you should know about before you go further: - [Webpack4 support discontinued](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#webpack4-support-discontinued) - [IE11 support discontinued](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#modern-browser-support) - [Minimum supported version of node is 16](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#dropped-support-for-node-15-and-below) - [Babel mode v7 exclusively](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#babel-mode-v7-exclusively) +- [Start and build CLI binaries removed](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#start-storybook--build-storybook-binaries-removed) - [Some community addons might not work yet](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#specific-instructions-for-addon-users) -- Storybook CLI changes: - - [Start and build binaries removed](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#start-storybook--build-storybook-binaries-removed) - - [`DLL` flags removed](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#removed-dll-flags) - - [`use-npm` flag deprecated](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#cli-option---use-npm-deprecated) -If any of these apply to your project, please read through the [full migration notes](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#from-version-65x-to-700) before continuing. If these are hard requirements, you should probably stick with Storybook 6.x. +If any of these apply to your project, please read through the [full migration notes](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#from-version-65x-to-700) before continuing. If any of these new requirements or changes do not fit your project, you should probably stick with Storybook 6.x. ## Automatic upgrade diff --git a/docs/snippets/angular/arg-types-control.ts.mdx b/docs/snippets/angular/arg-types-control.ts.mdx new file mode 100644 index 000000000000..94f8365e086e --- /dev/null +++ b/docs/snippets/angular/arg-types-control.ts.mdx @@ -0,0 +1,23 @@ +```ts +// Example.stories.ts + +import type { Meta } from '@storybook/angular'; + +import { Example } from './Example'; + +const meta: Meta = { + component: Example, + argTypes: { + value: { + control: { + type: 'number', + min: 0, + max: 100, + step: 10, + }, + }, + }, +}; + +export default meta; +``` diff --git a/docs/snippets/angular/arg-types-default-value.ts.mdx b/docs/snippets/angular/arg-types-default-value.ts.mdx new file mode 100644 index 000000000000..41e3d3987501 --- /dev/null +++ b/docs/snippets/angular/arg-types-default-value.ts.mdx @@ -0,0 +1,23 @@ +```ts +// Example.stories.ts + +import type { Meta } from '@storybook/angular'; + +import { Example } from './Example'; + +const meta: Meta = { + component: Example, + argTypes: { + value: { + // ❌ Deprecated + defaultValue: 0, + }, + }, + // βœ… Do this instead + args: { + value: 0, + }, +}; + +export default meta; +``` diff --git a/docs/snippets/angular/arg-types-description.ts.mdx b/docs/snippets/angular/arg-types-description.ts.mdx new file mode 100644 index 000000000000..154c1b1f4a6b --- /dev/null +++ b/docs/snippets/angular/arg-types-description.ts.mdx @@ -0,0 +1,18 @@ +```ts +// Example.stories.ts + +import type { Meta } from '@storybook/angular'; + +import { Example } from './Example'; + +const meta: Meta = { + component: Example, + argTypes: { + value: { + description: 'The value of the slider', + }, + }, +}; + +export default meta; +``` diff --git a/docs/snippets/angular/arg-types-if.ts.mdx b/docs/snippets/angular/arg-types-if.ts.mdx new file mode 100644 index 000000000000..d1887b8bfbcd --- /dev/null +++ b/docs/snippets/angular/arg-types-if.ts.mdx @@ -0,0 +1,40 @@ +```ts +// Example.stories.ts + +import type { Meta } from '@storybook/angular'; + +import { Example } from './Example'; + +const meta: Meta = { + component: Example, + argTypes: { + parent: { control: 'select', options: ['one', 'two', 'three'] }, + + // πŸ‘‡ Only shown when `parent` arg exists + parentExists: { if: { arg: 'parent', exists: true } }, + + // πŸ‘‡ Only shown when `parent` arg does not exist + parentDoesNotExist: { if: { arg: 'parent', exists: false } }, + + // πŸ‘‡ Only shown when `parent` arg value is truthy + parentIsTruthy: { if: { arg: 'parent' } }, + parentIsTruthyVerbose: { if: { arg: 'parent', truthy: true } }, + + // πŸ‘‡ Only shown when `parent` arg value is not truthy + parentIsNotTruthy: { if: { arg: 'parent', truthy: false } }, + + // πŸ‘‡ Only shown when `parent` arg value is 'three' + parentIsEqToValue: { if: { arg: 'parent', eq: 'three' } }, + + // πŸ‘‡ Only shown when `parent` arg value is not 'three' + parentIsNotEqToValue: { if: { arg: 'parent', neq: 'three' } }, + + // Each of the above can also be conditional on the value of a globalType, e.g.: + + // πŸ‘‡ Only shown when `theme` global exists + parentExists: { if: { global: 'theme', exists: true } }, + }, +}; + +export default meta; +``` diff --git a/docs/snippets/angular/arg-types-in-meta.ts.mdx b/docs/snippets/angular/arg-types-in-meta.ts.mdx new file mode 100644 index 000000000000..1cc7933b518a --- /dev/null +++ b/docs/snippets/angular/arg-types-in-meta.ts.mdx @@ -0,0 +1,20 @@ +```ts +// Button.stories.ts + +import type { Meta } from '@storybook/angular'; + +import { Button } from './button.component'; + +const meta: Meta