Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ARCH-482): remove reakit from design-system #4751

Merged
merged 235 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from 231 commits
Commits
Show all changes
235 commits
Select commit Hold shift + click to select a range
285a283
chore: upgrade sb
jmfrancois Jan 11, 2023
b4781ec
chore: beta 25, fix binary breaking change
jmfrancois Jan 12, 2023
c2b805b
Merge branch 'master' into jmfrancois/chore/storybook-beta
jmfrancois Jan 12, 2023
d6dbdab
Merge branch 'master' into jmfrancois/chore/storybook-beta
jmfrancois Jan 26, 2023
38be8b7
chore: try to update
jmfrancois Jan 26, 2023
e03a80f
Merge 38be8b73743f16db46802a26a79dfd40598d0fa3 into 4c3495e127f8a4226…
jmfrancois Jan 26, 2023
0e45be1
chore: yarn-deduplicate
github-actions[bot] Jan 26, 2023
9fe6416
Merge branch 'master' into jmfrancois/chore/storybook-beta
jmfrancois Mar 15, 2023
2646a75
chore: migration
jmfrancois Mar 15, 2023
2515bfe
Merge 2646a7552d2e2d02560eb25a3da6f4b11b4ebd03 into 20f8526e95b093303…
jmfrancois Mar 15, 2023
2259256
chore: yarn-deduplicate
github-actions[bot] Mar 15, 2023
69a644e
Merge branch 'master' into jmfrancois/chore/storybook-beta
jmfrancois Apr 7, 2023
a40beb7
Merge 69a644eb55be32fdcdfb4d9d914e99ee35e66242 into 5d5b89e1320b9667c…
jmfrancois Apr 7, 2023
97a04e4
chore: yarn-deduplicate
github-actions[bot] Apr 7, 2023
cbabe46
chore: upgrade to latest major stable
jmfrancois Apr 7, 2023
c843aed
chore: align deps
jmfrancois Apr 7, 2023
1de1975
chore: dedup
jmfrancois Apr 7, 2023
052ed22
chore: POC remove clickable from reakit
jmfrancois Jun 6, 2023
9f007f9
chore: add Divider
jmfrancois Jun 6, 2023
3b96e71
chore: replace setId by setState randomUUID
jmfrancois Jun 6, 2023
961cb14
chore: remove setId
jmfrancois Jun 6, 2023
b4c3c5f
chore: add missing files
jmfrancois Jun 6, 2023
dfe97dc
chore: remove useless disclosure api
jmfrancois Jun 6, 2023
aa0fc40
chore: cleanup
jmfrancois Jun 6, 2023
2a8e494
fix: modal
jmfrancois Jun 7, 2023
3c923ce
chore: finish Modal
jmfrancois Jun 7, 2023
bc43ae1
chore: rewrite dropdown
jmfrancois Jun 9, 2023
75c0bf3
chore: cleanup
jmfrancois Jun 9, 2023
865ea2f
chore: lint
jmfrancois Jun 9, 2023
821c36d
chore: remove reakit from DS Input Checkbox
jmfrancois Jun 12, 2023
821b764
chore: rewrite tooltip
jmfrancois Jun 12, 2023
95cd2cb
chore: remove reakit from VisuallyHidden
jmfrancois Jun 12, 2023
d5486f9
Merge branch 'master' into jmfrancois/chore/ds-no-reakit
jmfrancois Jun 13, 2023
5e68fab
chore: remove WIP folder
jmfrancois Jun 13, 2023
f581fd3
chore: save
jmfrancois Jun 13, 2023
cd3e0f5
Merge branch 'master' into jmfrancois/chore/ds-no-reakit
jmfrancois Jun 13, 2023
fd86a4e
chore: rewrite Combobox
jmfrancois Jun 14, 2023
326e65c
chore: finish combo
jmfrancois Jun 14, 2023
5b7e45c
Merge branch 'master' into jmfrancois/chore/ds-no-reakit
jmfrancois Jun 20, 2023
9bd5418
chore: update mains.js to esm and update dependencies
cbaune-talend Jun 20, 2023
bf8be3f
chore: add esm export in main.js
cbaune-talend Jun 20, 2023
e70a2be
chore: save
jmfrancois Jun 20, 2023
0b43beb
chore: make first popover works
jmfrancois Jun 21, 2023
c7ea86d
chore: make all stories works
jmfrancois Jun 21, 2023
3487100
chore: prepare the PR
jmfrancois Jun 21, 2023
36a6866
chore: remove reakit
jmfrancois Jun 21, 2023
85bb098
chore: simplify popover
jmfrancois Jun 22, 2023
596ace0
fix: combobox
jmfrancois Jun 26, 2023
b1266f3
chore: add missing hook
jmfrancois Jun 26, 2023
45de609
fix: switch
jmfrancois Jun 26, 2023
c866c87
fix: useId
jmfrancois Jun 26, 2023
808bb52
chore: review Tabs API
jmfrancois Jun 27, 2023
42197f5
fix: tooltip a11y
jmfrancois Jun 27, 2023
01a0683
Merge branch 'master' into jmfrancois/chore/ds-no-reakit
jmfrancois Jun 27, 2023
e01b591
Update chatty-apes-speak.md
jmfrancois Jun 27, 2023
6d5dd2c
fix: types
jmfrancois Jun 27, 2023
465ef52
chore: remove portal from popover
jmfrancois Jun 27, 2023
4db53be
fix: use portal if isFixed
jmfrancois Jun 27, 2023
0f6e8a2
fix: popover arrow
jmfrancois Jun 27, 2023
bf25d5f
fix: ts
jmfrancois Jun 27, 2023
36298e1
fix: toggleswitch
jmfrancois Jun 27, 2023
eb52738
doc: changelog
jmfrancois Jun 27, 2023
facbd37
fix: Dropdown
jmfrancois Jun 27, 2023
15d1382
fix: some cypres
jmfrancois Jun 27, 2023
e4455b7
test: make our jest works well with floating-ui
jmfrancois Jun 28, 2023
b625873
fix: test
jmfrancois Jun 28, 2023
175f86f
fix: forms tests
jmfrancois Jun 28, 2023
0822bc9
fix: pre-release
jmfrancois Jun 28, 2023
840e471
fix: test:demo
jmfrancois Jun 28, 2023
ce24a7f
doc: changelog
jmfrancois Jun 28, 2023
7234a9d
fix: VisuallyHidden
jmfrancois Jun 28, 2023
5ca074b
fix: setup for cypress
jmfrancois Jun 28, 2023
a488227
chore: add back disclosure
jmfrancois Jun 28, 2023
77e31a9
chore: stories
jmfrancois Jun 29, 2023
3298bd0
chore: deactivate last test
jmfrancois Jun 29, 2023
96a2ca1
fix: disclosure prevent default
jmfrancois Jun 30, 2023
9033615
Merge branch 'master' into jmfrancois/chore/ds-no-reakit
jmfrancois Jun 30, 2023
6374e18
test: cy fix
jmfrancois Jun 30, 2023
f555d8b
Update .changeset/chatty-apes-speak.md
jmfrancois Jun 30, 2023
faa84b4
chore: lint
jmfrancois Jun 30, 2023
22c4a48
test: fix
jmfrancois Jun 30, 2023
053224b
chore: storybook mains.js work in progress
cbaune-talend Jul 3, 2023
2cf2321
chore: fix test:demo
jmfrancois Jul 3, 2023
1f2260a
Merge branch 'master' into jmfrancois/chore/ds-no-reakit
jmfrancois Jul 3, 2023
571eda8
chore: rename .stories.mdx in .mdx for DS
cbaune-talend Jul 10, 2023
5cd3acd
chore: add babelrc to storybook package
cbaune-talend Jul 10, 2023
aee8a00
chore: wip - fix context props in preview.js
cbaune-talend Jul 10, 2023
30da1bb
fix: fallback on userMain
jmfrancois Jul 12, 2023
5e33f54
chore: move theme switcher to globals
jmfrancois Jul 12, 2023
b0c6b30
Jmainguy/chore/ds no reakit/fixes (#4797)
jmainguytalend Jul 18, 2023
560eb2e
chore: update tooltip API
jmfrancois Jul 20, 2023
7094afa
feat: support children as fn and remove disclosure
jmfrancois Jul 20, 2023
42fda7b
feat: make the config get sb for you
jmfrancois Jul 21, 2023
d94587e
Merge branch 'master' into jmfrancois/chore/storybook-beta
jmfrancois Jul 21, 2023
0bd3efd
Merge d94587e6fe68887424171ea00ba80796dda52e46 into 612e6291446034d20…
jmfrancois Jul 21, 2023
2bc31af
chore: yarn-deduplicate
github-actions[bot] Jul 21, 2023
427b76a
chore: upgrade sb to 7.1.0
jmfrancois Jul 21, 2023
b98c56b
chore: fallback to cjs, align babel dep
jmfrancois Jul 21, 2023
356aff8
chore: fallback to cjs, align babel dep
jmfrancois Jul 21, 2023
f57b17a
chore:dedup
jmfrancois Jul 21, 2023
b319454
Merge f57b17a97a642699573a38dfb3538095600ec682 into 612e6291446034d20…
jmfrancois Jul 21, 2023
51b54d0
chore: yarn-deduplicate
github-actions[bot] Jul 21, 2023
e6af84b
chore: fix storybook build disabling fallbacks and babelrc path
Nigui Jul 24, 2023
ee40aed
Merge branch 'master' into jmfrancois/chore/ds-no-reakit
jmainguytalend Jul 26, 2023
8da8663
gni progress
Nigui Jul 26, 2023
cf3b44d
Fix renderClone for tsc
Jul 26, 2023
e4c954a
chore: fix stories
jmfrancois Jul 26, 2023
8879f83
a good first solution to switch preview theme
Nigui Jul 26, 2023
380fc1b
chore: remove dark stories use the toggle for that
jmfrancois Jul 26, 2023
cc8fc96
feat: add bootstrap theme toggle
jmfrancois Jul 26, 2023
1761148
some customisation, cleaning and badges
Nigui Jul 27, 2023
0789a88
Merge branch 'master' into jmfrancois/chore/storybook-beta
jmfrancois Jul 27, 2023
d919714
Merge 0789a88603dbb124654ce05aa28361a7644284c2 into a38d7b28addc24e14…
jmfrancois Jul 27, 2023
6471c75
chore: yarn-deduplicate
github-actions[bot] Jul 27, 2023
20f8dcd
fix: use token in doc and not the value
jmfrancois Jul 27, 2023
c7943e1
Merge branch 'jmfrancois/chore/storybook-beta' of github.com:Talend/u…
jmfrancois Jul 27, 2023
8603b8a
fix: some tokens
jmfrancois Jul 27, 2023
b295d90
Merge 8603b8acde0d8a12c4ce341a48899dc49f84609e into 2553a2cc6691ab895…
jmfrancois Jul 27, 2023
3054b40
chore: yarn-deduplicate
github-actions[bot] Jul 27, 2023
9cd0bd1
fix: default value
jmfrancois Jul 27, 2023
4d73458
Merge branch 'jmfrancois/chore/storybook-beta' of github.com:Talend/u…
jmfrancois Jul 27, 2023
b63d96f
simplify code
Nigui Jul 27, 2023
7e50be4
Fix Dropdown placement & style
Jul 27, 2023
202fd9c
get back status page
Nigui Jul 27, 2023
cec4a60
fix: import
jmfrancois Jul 27, 2023
bb8fd7b
fix some css, fix imports and remove useless functions in toolbar
Nigui Jul 27, 2023
b7be465
fix link to tokens and theme switcher example
Nigui Jul 27, 2023
0d95c49
chore: cleanup stories by using mdx
jmfrancois Jul 27, 2023
12fa26c
Merge branch 'jmfrancois/chore/storybook-beta' of github.com:Talend/u…
jmfrancois Jul 27, 2023
cac9de5
chore: remove order from preview
jmfrancois Jul 27, 2023
5278ced
chore: do not publish to netlify
jmfrancois Jul 28, 2023
d487598
fix: make icons config available outside
jmfrancois Jul 28, 2023
82f2e90
chore: update and align config
jmfrancois Jul 28, 2023
ca199c3
chore: create the new one storybook
jmfrancois Jul 28, 2023
1fcceaf
chore: activate icon stories
jmfrancois Jul 28, 2023
6074856
chore: move chromatic
jmfrancois Jul 28, 2023
114bc81
Rework Checkbox & ToggleSwitch state management
Aug 1, 2023
c182397
Fix switch component
Aug 2, 2023
7655a09
Modal : add click out to close
Aug 3, 2023
cdf8728
Merge branch 'master' into jmfrancois/chore/ds-no-reakit
jmainguytalend Aug 3, 2023
6dc83af
Fix UT & Popover & Tooltip
Aug 10, 2023
a4eebb2
Merge branch 'master' into jmfrancois/chore/ds-no-reakit
jmfrancois Aug 31, 2023
ce331ee
Merge branch 'master' into jmfrancois/chore/storybook-beta
Nigui Sep 7, 2023
c796a04
Merge ce331eeb2ce436cf3e35510841aa3ec547dd87f4 into f73fdbc4648412f76…
jmfrancois Sep 7, 2023
bcdce21
chore: yarn-deduplicate
github-actions[bot] Sep 7, 2023
dfac826
migrate @talend/react-forms to sb7
Nigui Sep 7, 2023
53160eb
Merge dfac8269f52405e9a83c557af5448c06f1be91d6 into 37e1a30624e95f960…
jmfrancois Sep 7, 2023
106665b
chore: yarn-deduplicate
github-actions[bot] Sep 7, 2023
7668292
Merge branch 'master' into jmfrancois/chore/storybook-beta
jmfrancois Sep 8, 2023
276e230
chore: move stories and fix some migrations
jmfrancois Sep 8, 2023
53d2b74
chore: move Form stories
jmfrancois Sep 8, 2023
8e3bf03
chore: update CI
jmfrancois Sep 8, 2023
10640bd
chore: add npm script to build it
jmfrancois Sep 8, 2023
6e2bf65
chore: lint
jmfrancois Sep 8, 2023
7855a9b
chore: keep a copy of docs
jmfrancois Sep 8, 2023
4f3133f
chore: add titles
jmfrancois Sep 8, 2023
5b49ec3
chore: migrate all defaultvalue
jmfrancois Sep 11, 2023
a589c60
fix: all options in ds
jmfrancois Sep 11, 2023
d9c7be0
chore: upgrade to storybook 7.4.0
jmfrancois Sep 11, 2023
018faaf
fix: forms works in storybook one
jmfrancois Sep 11, 2023
9141ffa
chore: move Icon docs and fix faceted-search
jmfrancois Sep 11, 2023
ec4980d
chore: remove test:demo and update surge home page
jmfrancois Sep 11, 2023
284e19f
fix: surge
jmfrancois Sep 11, 2023
03bc546
chore: migrate UIForms stories to sb7
cbaune-talend Sep 12, 2023
c2d6ace
chore: remove unused stories files in UIForms
cbaune-talend Sep 12, 2023
7697d7c
feat: add story source
jmfrancois Sep 12, 2023
4d2ce1b
fix: some stories
jmfrancois Sep 12, 2023
0b7f8fd
fix: Floating drawer
jmfrancois Sep 12, 2023
1f47066
Merge branch 'jmfrancois/chore/storybook-beta' of github.com:Talend/u…
jmfrancois Sep 12, 2023
d0e8286
doc: update titles
jmfrancois Sep 12, 2023
d49d1c8
fix: types
jmfrancois Sep 12, 2023
300acaf
Merge branch 'master' into jmfrancois/chore/storybook-beta
jmfrancois Sep 12, 2023
b4b678d
fix: some lint
jmfrancois Sep 13, 2023
64c8446
chore(ARCH-482) rework DS's tabs (#4844)
jmainguytalend Sep 13, 2023
320f871
Merge branch 'master' into jmfrancois/chore/ds-no-reakit
jmfrancois Sep 13, 2023
d137ddc
Merge branch 'master' into jmfrancois/chore/storybook-beta
jmfrancois Sep 13, 2023
7d3f51c
Merge branch 'jmfrancois/chore/storybook-beta' of github.com:Talend/u…
jmfrancois Sep 13, 2023
de7d97a
Merge branch 'jmfrancois/chore/storybook-beta' into jmfrancois/chore/…
jmfrancois Sep 13, 2023
813a446
fix: build and types
jmfrancois Sep 13, 2023
c8f213a
fix: types of combobox
jmfrancois Sep 13, 2023
0d39f80
chore: first effort on drawer
jmfrancois Sep 14, 2023
83558a8
feat: add transition
jmfrancois Sep 14, 2023
2c774e7
fix: drawer
jmfrancois Sep 14, 2023
cd889a3
Merge branch 'master' into jmfrancois/chore/ds-no-reakit
jmfrancois Oct 6, 2023
9639d00
chore: revert change on docs
jmfrancois Oct 6, 2023
6135cb0
chore: update stories
jmfrancois Oct 6, 2023
6500aea
fix: Drawer
jmfrancois Oct 6, 2023
b06f511
chore: align dropdown
jmfrancois Oct 6, 2023
58f05ef
fix: DS
jmfrancois Oct 6, 2023
074d60b
fix: some stories
jmfrancois Oct 6, 2023
0432b1c
Merge branch 'master' into jmfrancois/chore/ds-no-reakit
jmfrancois Oct 10, 2023
b06871d
chore: fix build
jmfrancois Oct 10, 2023
97cedc7
chore: yarn lock
jmfrancois Oct 10, 2023
a4b10a5
test:snapshots
jmfrancois Oct 10, 2023
67cd4b8
feat: custom uncontrol
jmfrancois Oct 11, 2023
ab20bb9
chore: merge uncontrollable widgets
jmfrancois Oct 11, 2023
acd7396
chore: refactor all exports...
jmfrancois Oct 11, 2023
fd4a25e
chore: update the changelog
jmfrancois Oct 11, 2023
0c40aa0
chore: remove default export of tabs
jmfrancois Oct 12, 2023
557b309
chore: revert popover API
jmfrancois Oct 12, 2023
f207ed3
chore: fix some missing components
jmfrancois Oct 12, 2023
e1dd6da
fix: test:cy imports
jmfrancois Oct 12, 2023
b8b3676
fix: re-add checked props on dropdown
jmfrancois Oct 13, 2023
f32b33a
chore: remove aria-selected it is not a11y
jmfrancois Oct 13, 2023
94eecbc
fix: dropdown caret rotation
jmfrancois Oct 13, 2023
d2f1dcf
doc: update doc on intedeterminate
jmfrancois Oct 13, 2023
883562a
doc: update
jmfrancois Oct 13, 2023
d1d5d3b
fix: toggleswitch and storybook config
jmfrancois Oct 13, 2023
ddc1d5b
fix: radio
jmfrancois Oct 13, 2023
fad9db1
feat: reimplement tabs
jmfrancois Oct 16, 2023
c8a9914
chore: doc
jmfrancois Oct 16, 2023
322755e
feat: make tabs a11y
jmfrancois Oct 16, 2023
121e4bd
feat: add some a11y test
jmfrancois Oct 17, 2023
aa3e2e0
test: rename
jmfrancois Oct 17, 2023
9f79d0f
test: add a11y test using jest.axe
jmfrancois Oct 17, 2023
dcc1161
fix: Drawer is a11y
jmfrancois Oct 17, 2023
884c38a
test: FLoatingDrawer and Dropdown
jmfrancois Oct 17, 2023
2bf2726
test: add EmptyState, ErrorState, Form
jmfrancois Oct 17, 2023
2437d0f
test: continue to tests a11y and fix
jmfrancois Oct 18, 2023
b714c9e
test: add some
jmfrancois Oct 18, 2023
2c0bd32
test: add some
jmfrancois Oct 18, 2023
8fff161
feat: use local icons
jmfrancois Oct 18, 2023
cf10013
fix: typings
jmfrancois Oct 18, 2023
56dc0b2
test: fix
jmfrancois Oct 18, 2023
bbcf4ff
fix: onkeydown
jmfrancois Oct 18, 2023
43fcf32
Merge branch 'master' into jmfrancois/chore/ds-no-reakit
jmfrancois Oct 18, 2023
ca32af8
chore: cleanup
jmfrancois Oct 18, 2023
e63a46e
chore: simplify the changes
jmfrancois Oct 18, 2023
97d48b4
chore: cleanup
jmfrancois Oct 18, 2023
ae4db6c
test: update snap
jmfrancois Oct 18, 2023
79f7794
test: update snap
jmfrancois Oct 18, 2023
d369efb
fix: circular dependencies
jmfrancois Oct 19, 2023
4f05602
fix: remove unecessary export type
jmfrancois Oct 19, 2023
c0e6643
fix: wrong import
jmfrancois Oct 19, 2023
60da143
chore: cleanup eslintrc
jmfrancois Oct 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 26 additions & 0 deletions .changeset/bright-dodos-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
'@talend/scripts-core': major
'@talend/scripts-config-jest': major
---

- fix: enforce timer at the end of all tests.
- feat: mock ally.js has it uses unsupported dom method from jsdom.
- feat: add jest-axe configuration


To support floating-ui/react following issue we have decided to add an afterAll to let floating-ui finish stuff
https://github.com/floating-ui/floating-ui/issues/1908


Breaking changes:

you may have tests where you ask for jest.useFakeTimer without go back to real at some point. This is a side effect and it is not compatible with our change to support floating-ui.

```diff
jest.useFakeTimers()
render(<Tooltip><button></Tooltip>)
+jest.useRealTimers()
```

This will fix an error said your test is still pending after 5000 ms.

6 changes: 6 additions & 0 deletions .changeset/bright-zoos-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@talend/scripts-config-storybook-lib': patch
---

fix: add keys on all items in the decorators
fix: improve build performance copy/pasted from #4931
98 changes: 98 additions & 0 deletions .changeset/chatty-apes-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
'@talend/design-system': major
---

chore: remove reakit

* Rewrite components without reakit
* use `@floating-ui/react` for tooltip, popover
* export all types and components from the root

Breaking changes:
* HTML structure output may have changed
* Some passed props from our component to reakit and not documented as a usage as been removed. If you need a different usage let us knwow, now we own the code
* Tabs props API has been completly changed

Components changed:
* Accordion (useId)
* Clickable (rewrite)
* Combobox (add as primitive)
* Disclosure (add as primitive)
* Divider (rewrite)
* Drawer (rewrite using `react-transition-group`)
* Dropdown (rewrite using `@floating-ui/react`)
* Form/Affix/Button (typings)
* Form/Affix/Select (useId)
* Form/Field/Datalist (useId)
* Form/Field/InputFile (useId)
* Form/Field/InputToggleSwitch (rewrite)
* Form/Primitives/Checkbox (rewrite)
* Form/Primitives/Field (useId)
* Form/Primitives/Radio (useId)
* Modal (rewrite Dialog as primitive)
* Popover (rewrite using `@floating-ui/react`)
* Switch (rewrite)
* Tabs (rewrite + props changed)
* Tooltip (rewrite using `@floating-ui/react` + API Change)
* VisuallyHidden (rewrite)


**Migration Guide**

* Checkbox component

Checkbox has two versions now : controlled one and uncontrolled one.
To use controlled version, import Checkbox component and provide `checked` and `onChange` props.
To use uncontrolled version, import UncontrolledCheckbox component and optionally provide `defaultChecked` prop.

We also change way to import it to be less verbose.

Old use
```
import { Form } from '@talend/design-system';
(...)
<Form.Checkbox (...) />
```

New use
```
import { Checkbox, UncontrolledCheckbox } from '@talend/design-system';
(...)
<Checkbox checked={isChecked} onChange={changeHandler} (...) />
<UncontrolledCheckbox defaultChecked={isChecked} (...) />
```

* ToggleSwitch component

ToggleSwitch has two versions now : controlled one and uncontrolled one.
To use controlled version, import ToggleSwitch component and provide `checked` and `onChange` props.
To use uncontrolled version, import UncontrolledToggleSwitch component and optionally provide `defaultChecked` prop.

We also change way to import it to be less verbose.

Old use
```
import { Form } from '@talend/design-system';
(...)
<Form.ToggleSwitch (...) />
```

New use
```
import { ToggleSwitch, UncontrolledToggleSwitch } from '@talend/design-system';
(...)
<ToggleSwitch checked={isChecked} onChange={changeHandler} (...) />
<UncontrolledToggleSwitch defaultChecked={isChecked} (...) />
```

* Switch component

`onChange` prop's signature change from
```
(event: React.MouseEvent<HTMLButtonElement>, value: string) => void
```
to
```
(value: string) => void
```

6 changes: 6 additions & 0 deletions .changeset/famous-hotels-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@talend/react-components': minor
'@talend/design-system': minor
---

feat: upgrade react-is
5 changes: 5 additions & 0 deletions .changeset/selfish-hairs-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@talend/design-system': patch
---

fix: some lint errors
6 changes: 6 additions & 0 deletions .changeset/strange-coats-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@talend/scripts-config-jest': minor
---

feat: add api to set a fetch MockResponse
feat: add jest-axe integration
1 change: 1 addition & 0 deletions .github/workflows/design-system-component-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
yarn --frozen-lock --ignore-scripts
yarn cypress install
yarn workspace @talend/assets-api run build:lib
yarn workspace @talend/utils run build:lib
yarn workspace @talend/icons run build:lib
yarn workspace @talend/design-tokens run build:lib

Expand Down
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@
{
"pattern": "fork/**"
}
]
],
"typescript.validate.enable": true,
"javascript.validate.enable": true
}
2 changes: 2 additions & 0 deletions fork/react-bootstrap/src/Carousel.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ describe('<Carousel>', () => {

// then
expect(screen.getByText('Item 2 content')).toHaveClass('active');
jest.useRealTimers();
});

it('Should show next button control on the last image if wrap is true', () => {
Expand All @@ -158,6 +159,7 @@ describe('<Carousel>', () => {

// then
expect(screen.getByText('Item 1 content')).toHaveClass('active');
jest.useRealTimers();
});

it('Should not show the prev button on the first image if wrap is false', () => {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"**/vinyl-fs/glob-parent": "^5.1.2",
"**/fast-glob/glob-parent": "^5.1.2",
"**/trim": "^1.0.1",
"**/x-default-browser": "^0.5.2"
"**/x-default-browser": "^0.5.2",
"**/reactour/prop-types": "^15.7.2"
},
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions packages/cmf-cqrs/src/middleware/smartWebsocket.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ describe('smart websocket tests', () => {

// then
expect(options.onPingTimeout).toBeCalled();
jest.useRealTimers();
});
});
});
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"react-draggable": "^4.4.5",
"react-grid-layout": "^1.4.1",
"react-immutable-proptypes": "^2.2.0",
"react-is": "^16.13.1",
"react-is": "^17.0.0",
"react-popper": "^2.3.0",
"react-transition-group": "^2.9.0",
"react-use": "^17.4.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ describe('Intercom service', () => {
expect(styleElement.textContent.trim().replace(/\s/g, ' ')).toBe(
'.intercom-namespace .intercom-app div.intercom-messenger-frame { top: 39px; left: 427px; right: 221px; margin-top: 2rem; }',
);
jest.useRealTimers();
});

it('should remove custom style with cleanup return function', () => {
Expand All @@ -182,6 +183,7 @@ describe('Intercom service', () => {

// then
expect(intercomContainer.querySelector('style')).toBeFalsy();
jest.useRealTimers();
});
});
});
8 changes: 8 additions & 0 deletions packages/components/src/Datalist/Datalist.component.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ describe('Datalist component', () => {

// then
expect(screen.queryByRole('listbox')).not.toBeInTheDocument();
jest.useRealTimers();
});

it('should close suggestions on enter', () => {
Expand Down Expand Up @@ -218,6 +219,7 @@ describe('Datalist component', () => {

// then
expect(onChange).toBeCalledWith(expect.anything(), { value: '' });
jest.useRealTimers();
});

it('should reset previous value on ESC keydown', () => {
Expand Down Expand Up @@ -368,6 +370,7 @@ describe('Datalist component', () => {

// then
expect(onChange).toBeCalledWith(expect.anything(), { value: 'foo' });
jest.useRealTimers();
});

it('should persist unknown value on blur', () => {
Expand All @@ -384,6 +387,7 @@ describe('Datalist component', () => {

// then
expect(onChange).toBeCalledWith(expect.anything(), { value: 'not a known value' });
jest.useRealTimers();
});

it('should persist known value on enter', () => {
Expand Down Expand Up @@ -431,6 +435,7 @@ describe('Datalist component', () => {

// // then
expect(onChange).toBeCalledWith(expect.anything(), { value: 'not there' });
jest.useRealTimers();
});
});

Expand All @@ -450,6 +455,7 @@ describe('Datalist component', () => {

// then
expect(onChange).toBeCalledWith(expect.anything(), { value: 'foo' });
jest.useRealTimers();
});

it('should reset unknown value on blur', () => {
Expand All @@ -467,6 +473,7 @@ describe('Datalist component', () => {
// then
expect(onChange).not.toBeCalled();
expect(input).toHaveValue('My foo');
jest.useRealTimers();
});

it('should persist known value on enter', () => {
Expand Down Expand Up @@ -527,6 +534,7 @@ describe('Datalist component', () => {

// then
expect(onChange).toBeCalledWith(expect.anything(), { value: '' });
jest.useRealTimers();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ describe('InputDateTimePicker', () => {

// then
expect(getPopup()).not.toBeInTheDocument();
jest.useRealTimers();
});

it('should trigger props.onBlur', async () => {
Expand All @@ -52,6 +53,7 @@ describe('InputDateTimePicker', () => {

// then
expect(onBlur).toBeCalled();
jest.useRealTimers();
});
});

Expand Down Expand Up @@ -93,6 +95,7 @@ describe('InputDateTimePicker', () => {

// then
expect(document.activeElement).toHaveClass('tc-date-picker-day');
jest.useRealTimers();
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ describe('TimePicker', () => {

// then
expect(onChange).toBeCalledWith(expect.anything(), { hours: '17', minutes: '38' }, FIELD_HOURS);
jest.useRealTimers();
});

it('should trigger onChange on minutes change', () => {
Expand All @@ -109,6 +110,7 @@ describe('TimePicker', () => {
{ hours: '15', minutes: '17' },
FIELD_MINUTES,
);
jest.useRealTimers();
});

it('should manage tabIndex', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { TFunction } from 'i18next';
import { withTranslation } from 'react-i18next';

import Icon from '../../Icon';
import { Icon, SVG_TRANSFORMS } from '@talend/design-system';
import I18N_DOMAIN_COMPONENTS from '../../constants';
import getDefaultT from '../../translate';

Expand All @@ -16,7 +15,7 @@ function SkipTo({ href, label }: SkipToProps) {
return (
<a href={href}>
<span className={theme.icon}>
<Icon transform="rotate-270" name="talend-arrow-left" />
<Icon transform={SVG_TRANSFORMS.Rotate270} name="talend-arrow-left" />
</span>
<span className={theme.text}>{label}</span>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ exports[`Skip links should render 1`] = `
<span
class="CoralIcon"
name="talend-arrow-left"
transform="rotate-270"
/>
</span>
<span
Expand All @@ -36,7 +35,6 @@ exports[`Skip links should render 1`] = `
<span
class="CoralIcon"
name="talend-arrow-left"
transform="rotate-270"
/>
</span>
<span
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ exports[`List DisplayMode should render 1`] = `
>
<button
aria-describedby="id-42"
aria-label="Set Table as current display mode."
aria-pressed="true"
class="theme-clickable theme-buttonIcon theme-toggle theme-size_S"
id="myDisplayMode-table"
Expand All @@ -28,6 +29,7 @@ exports[`List DisplayMode should render 1`] = `
</button>
<button
aria-describedby="id-42"
aria-label="Set Expanded as current display mode."
aria-pressed="false"
class="theme-clickable theme-buttonIcon theme-toggle theme-size_S"
id="myDisplayMode-large"
Expand Down
Loading