Skip to content

Commit 8e4014a

Browse files
authored
Merge pull request #973 from strapi/release/1.7.1
2 parents 396ee39 + cd06a2b commit 8e4014a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+24581
-17319
lines changed

.github/actions/install-modules/action.yml

-12
This file was deleted.

.github/actions/install-modules/script.sh

-8
This file was deleted.

.github/workflows/bundle-size.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ jobs:
2020
path: '**/node_modules'
2121
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
2222

23-
- run: yarn install --frozen-lockfile
24-
25-
- name: Link locale packages and install their dependencies
26-
run: yarn bootstrap
23+
- run: yarn install
2724

2825
- name: Build packages
2926
run: yarn build

.github/workflows/tests.yml

+11-20
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ jobs:
2323
with:
2424
path: '**/node_modules'
2525
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
26-
- run: yarn install --frozen-lockfile
27-
28-
- name: Link locale packages and install their dependencies
29-
run: yarn bootstrap
26+
- run: yarn install
3027

3128
- name: Build
3229
run: yarn build --ignore=@strapi/design-system-docs
@@ -47,11 +44,11 @@ jobs:
4744
path: '**/node_modules'
4845
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
4946

50-
- run: yarn install --frozen-lockfile
51-
- name: Link locale packages and install their dependencies
52-
run: yarn bootstrap
47+
- run: yarn install
48+
5349
- name: Run lint
5450
run: yarn lint
51+
5552
- name: Run prettier
5653
run: yarn prettier:check
5754
unit_tests:
@@ -69,10 +66,7 @@ jobs:
6966
path: '**/node_modules'
7067
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
7168

72-
- run: yarn install --frozen-lockfile
73-
74-
- name: Link locale packages and install their dependencies
75-
run: yarn bootstrap
69+
- run: yarn install
7670

7771
- name: Build
7872
run: yarn build --ignore=@strapi/design-system-docs
@@ -88,26 +82,23 @@ jobs:
8882
browser: [chromium, webkit, firefox]
8983
steps:
9084
- uses: actions/checkout@v3
85+
9186
- uses: actions/setup-node@v3
9287
with:
9388
node-version: '18'
9489
cache: yarn
95-
- uses: ./.github/actions/install-modules
96-
with:
97-
globalPackages: http-server
9890

99-
- name: Install Playwright
100-
run: npx [email protected] install --with-deps
91+
- run: yarn install
10192

102-
- name: Link locale packages and install their dependencies
103-
run: yarn bootstrap
93+
- name: Install Playwright
94+
run: npx [email protected] install
10495

10596
- name: Build
10697
run: yarn build
10798

10899
- name: Start storybook
109100
working-directory: ./docs/storybook-static
110-
run: http-server -p 6006 &
101+
run: yarn add -D http-server && yarn http-server -p 6006 &
111102

112103
- name: Run the tests
113-
run: yarn test:e2e:ci -- -- --project=${{ matrix.browser }}
104+
run: yarn test:e2e:ci -- --project=${{ matrix.browser }}

.gitignore

+124-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,128 @@
1-
.env
2-
.vscode
3-
node_modules
1+
############################
2+
# OS X
3+
############################
4+
45
.DS_Store
5-
yarn-debug.log*
6-
yarn-error.log*
6+
.AppleDouble
7+
.LSOverride
8+
Icon
9+
.Spotlight-V100
10+
.Trashes
11+
._*
12+
13+
14+
############################
15+
# Linux
16+
############################
17+
18+
*~
19+
20+
21+
############################
22+
# Windows
23+
############################
24+
25+
Thumbs.db
26+
ehthumbs.db
27+
Desktop.ini
28+
$RECYCLE.BIN/
29+
*.cab
30+
*.msi
31+
*.msm
32+
*.msp
33+
34+
35+
############################
36+
# Packages
37+
############################
38+
39+
*.7z
40+
*.csv
41+
*.dat
42+
*.dmg
43+
*.gz
44+
*.iso
45+
*.jar
46+
*.rar
47+
*.tar
48+
*.zip
49+
*.com
50+
*.class
51+
*.dll
52+
*.exe
53+
*.o
54+
*.seed
55+
*.so
56+
*.swo
57+
*.swp
58+
*.swn
59+
*.swm
60+
*.out
61+
*.pid
62+
63+
64+
############################
65+
# Logs and databases
66+
############################
67+
68+
.tmp
69+
*.log
70+
*.sql
71+
!.github/workflows/db/**/*.sql
72+
*.sqlite
73+
74+
75+
############################
76+
# Misc.
77+
############################
78+
79+
*#
780
.idea
81+
nbproject
82+
.eslintcache
83+
84+
85+
############################
86+
# Node.js
87+
############################
88+
89+
lib-cov
90+
lcov.info
91+
pids
92+
logs
93+
results
94+
build
95+
node_modules
96+
.node_history
97+
package-lock.json
98+
**/package-lock.json
99+
*.heapsnapshot
100+
101+
102+
############################
103+
# Builds
104+
############################
105+
8106
dist
9107
storybook-static
10-
test-results
11-
playwright-report
12-
packages/strapi-icons/src
13-
coverage
108+
**/strapi-icons/src/*
109+
110+
############################
111+
# Visual Studio Code
112+
############################
113+
114+
.vscode/
115+
!.vscode/settings.json
116+
front-workspace.code-workspace
117+
.yarnrc
118+
119+
############################
120+
# Yarn
121+
############################
122+
.pnp.*
123+
.yarn/*
124+
!.yarn/patches
125+
!.yarn/plugins
126+
!.yarn/releases
127+
!.yarn/sdks
128+
!.yarn/versions

.husky/pre-commit

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
yarn nx affected --target=lint --uncommitted --parallel
5+
yarn nx affected --target=test:ts --uncommitted --parallel
6+
yarn nx affected --target=prettier:write --uncommitted --parallel

.prettierignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ packages/strapi-icons/src
55
# for now
66
website
77

8-
storybook-static
8+
storybook-static
9+
.yarn

.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

+541
Large diffs are not rendered by default.

.yarn/releases/yarn-3.5.0.cjs

+873
Large diffs are not rendered by default.

.yarnrc.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
defaultSemverRangePrefix: ''
2+
3+
nodeLinker: node-modules
4+
5+
plugins:
6+
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
7+
spec: '@yarnpkg/plugin-interactive-tools'
8+
9+
preferInteractive: true
10+
11+
yarnPath: .yarn/releases/yarn-3.5.0.cjs

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The core team will review your pull request and will either merge it, request ch
4040
### Setup end-to-end (e2e) tests
4141

4242
1. Install Playwright `npx [email protected] install --with-deps`
43-
2. Install and link any cross-dependencies: `yarn bootstrap`
43+
2. Install dependencies: `yarn install`
4444
3. Run storybook `yarn storybook` and the e2e tests in parallel `yarn test:e2e`
4545

4646
## Development Workflow

docs/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@
1313
"@strapi/design-system": "^1.7.0-alpha.2",
1414
"@strapi/icons": "^1.7.0-alpha.2",
1515
"@strapi/ui-primitives": "^1.7.0-alpha.2",
16-
"qs": "^6.11.0",
17-
"react": "17",
16+
"qs": "^6.11.1",
17+
"react": "18.2.0",
1818
"react-copy-to-clipboard": "^5.1.0",
19-
"react-dom": "17",
19+
"react-dom": "18.2.0",
2020
"react-router-dom": "5.3.4",
2121
"storybook-dark-mode": "^2.1.1",
22-
"styled-components": "^5.3.6"
22+
"styled-components": "^5.3.10"
2323
},
2424
"devDependencies": {
25-
"eslint-plugin-mdx": "^1.17.0"
25+
"eslint-plugin-mdx": "^1.17.1"
2626
},
2727
"scripts": {
2828
"build": "build-storybook",
29-
"clean": "rm -rf storybook-static node_modules",
29+
"clean": "rimraf storybook-static node_modules",
3030
"develop": "start-storybook -p 6006",
3131
"lint": "eslint --ext .mdx ."
3232
}

docs/stories/DismissibleLayer.stories.mdx

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
import { useState, useEffect } from 'react';
22
import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs';
33

4-
import { Typography, DismissibleLayer } from '@strapi/design-system';
4+
import { Typography, DismissibleLayer, DismissibleLayerBranch } from '@strapi/design-system';
55

66
<Meta title="Design System/Technical Components/DismissibleLayer" component={DismissibleLayer} />
77

88
# DismissibleLayer
99

10-
`DismissibleLayer` is a internal utility component wrapping the logic for a layer that can dismissed. It's typically
10+
`DismissibleLayer` is a internal utility component re-exported from the `@radix-ui/dismissable-layer` package. It's typically
1111
used within a `Modal` or a `Popover` & in conjunction with `FocusTrap`.
1212

1313
[View source](https://github.com/strapi/design-system/tree/main/packages/strapi-design-system/src/DismissibleLayer)
1414

15-
## Imports
15+
## Usage
1616

1717
```js
1818
import { DismissibleLayer } from '@strapi/design-system';
1919
```
2020

21-
## Usage
21+
### Basic Usage
22+
23+
Typically you'll want to provide a `onEscapeKeyDown` and `onPointerDownOutside` handler to dismiss the layer.
2224

2325
<Canvas>
2426
<Story name="base">
2527
{() => {
26-
const [isVisible, setIsVisible] = useState(false);
28+
const [isVisible, setIsVisible] = useState(true);
2729
useEffect(() => {
2830
let timeout = null;
2931
if (!isVisible) {
@@ -44,4 +46,6 @@ import { DismissibleLayer } from '@strapi/design-system';
4446

4547
## Props
4648

49+
### DismissibleLayer
50+
4751
<ArgsTable of={DismissibleLayer} />

0 commit comments

Comments
 (0)