@orchestrator-ui/orchestrator-ui-components 3.10.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/.turbo/turbo-build.log +9 -9
  2. package/.turbo/turbo-lint.log +2 -11
  3. package/.turbo/turbo-test.log +6 -6
  4. package/CHANGELOG.md +313 -307
  5. package/dist/index.d.ts +812 -794
  6. package/dist/index.js +1047 -488
  7. package/dist/index.js.map +1 -1
  8. package/eslint.config.js +5 -0
  9. package/package.json +6 -7
  10. package/src/components/WfoForms/UserInputForm.tsx +0 -1
  11. package/src/components/WfoForms/formFields/AcceptField.tsx +2 -2
  12. package/src/components/WfoForms/formFields/ListSelectField.tsx +0 -1
  13. package/src/components/WfoForms/formFields/SelectField/SelectField.tsx +1 -1
  14. package/src/components/WfoForms/formFields/deprecated/ImsNodeIdField.tsx +2 -2
  15. package/src/components/WfoForms/formFields/deprecated/ImsPortIdField.tsx +2 -2
  16. package/src/components/WfoForms/formFields/deprecated/VlanField.tsx +11 -11
  17. package/src/components/WfoPageTemplate/WfoPageHeader/WfoHamburgerMenu.tsx +1 -1
  18. package/src/components/WfoSubscription/WfoCustomerDescriptionsField.tsx +2 -3
  19. package/src/components/WfoTable/WfoTableSettingsModal/WfoTableSettingsModal.tsx +1 -1
  20. package/src/components/WfoWorkflowSteps/WfoStep/WfoStep.tsx +4 -2
  21. package/src/components/WfoWorkflowSteps/WfoWorkflowStepList/WfoWorkflowStepList.tsx +4 -6
  22. package/src/configuration/version.ts +1 -1
  23. package/src/pages/processes/WfoProcessDetail.tsx +3 -3
  24. package/src/rtk/api.ts +4 -2
  25. package/src/types/types.ts +1 -1
  26. package/src/utils/getDefaultTableConfig.ts +20 -16
  27. package/src/utils/getEnvironmentVariables.ts +13 -10
  28. package/eslintrc.js +0 -3
  29. package/src/stories/Button.jsx +0 -62
  30. package/src/stories/Button.stories.js +0 -45
  31. package/src/stories/Configure.mdx +0 -452
  32. package/src/stories/Header.jsx +0 -74
  33. package/src/stories/Header.stories.js +0 -23
  34. package/src/stories/Page.jsx +0 -89
  35. package/src/stories/Page.stories.js +0 -25
  36. package/src/stories/assets/accessibility.png +0 -0
  37. package/src/stories/assets/accessibility.svg +0 -5
  38. package/src/stories/assets/addon-library.png +0 -0
  39. package/src/stories/assets/assets.png +0 -0
  40. package/src/stories/assets/context.png +0 -0
  41. package/src/stories/assets/discord.svg +0 -15
  42. package/src/stories/assets/docs.png +0 -0
  43. package/src/stories/assets/figma-plugin.png +0 -0
  44. package/src/stories/assets/github.svg +0 -3
  45. package/src/stories/assets/share.png +0 -0
  46. package/src/stories/assets/styling.png +0 -0
  47. package/src/stories/assets/testing.png +0 -0
  48. package/src/stories/assets/theming.png +0 -0
  49. package/src/stories/assets/tutorials.svg +0 -12
  50. package/src/stories/assets/youtube.svg +0 -4
  51. package/src/stories/button.css +0 -30
  52. package/src/stories/colors.mdx +0 -13
  53. package/src/stories/header.css +0 -32
  54. package/src/stories/page.css +0 -69
@@ -1,452 +0,0 @@
1
- import Image from 'next/image';
2
-
3
- import { Meta } from '@storybook/blocks';
4
-
5
- import Accessibility from './assets/accessibility.png';
6
- import AddonLibrary from './assets/addon-library.png';
7
- import Assets from './assets/assets.png';
8
- import Context from './assets/context.png';
9
- import Discord from './assets/discord.svg';
10
- import Docs from './assets/docs.png';
11
- import FigmaPlugin from './assets/figma-plugin.png';
12
- import Github from './assets/github.svg';
13
- import Share from './assets/share.png';
14
- import Styling from './assets/styling.png';
15
- import Testing from './assets/testing.png';
16
- import Theming from './assets/theming.png';
17
- import Tutorials from './assets/tutorials.svg';
18
- import Youtube from './assets/youtube.svg';
19
-
20
- export const RightArrow = () => (
21
- <svg
22
- viewBox="0 0 14 14"
23
- width="8px"
24
- height="14px"
25
- style={{
26
- marginLeft: '4px',
27
- display: 'inline-block',
28
- shapeRendering: 'inherit',
29
- verticalAlign: 'middle',
30
- fill: 'currentColor',
31
- 'path fill': 'currentColor',
32
- }}
33
- >
34
- <path d="m11.1 7.35-5.5 5.5a.5.5 0 0 1-.7-.7L10.04 7 4.9 1.85a.5.5 0 1 1 .7-.7l5.5 5.5c.2.2.2.5 0 .7Z" />
35
- </svg>
36
- );
37
-
38
- <Meta title="Configure your project" />
39
-
40
- <div className="sb-container">
41
- <div className='sb-section-title'>
42
- # Configure your project
43
-
44
- Because Storybook works separately from your app, you'll need to configure it for your specific stack and setup. Below, explore guides for configuring Storybook with popular frameworks and tools. If you get stuck, learn how you can ask for help from our community.
45
-
46
- </div>
47
- <div className="sb-section">
48
- <div className="sb-section-item">
49
- <Image
50
- src={Styling}
51
- alt="A wall of logos representing different styling technologies"
52
- width={0}
53
- height={0}
54
- style={{ width: '100%', height: 'auto' }}
55
- />
56
- <h4 className="sb-section-item-heading">Add styling and CSS</h4>
57
- <p className="sb-section-item-paragraph">Like with web applications, there are many ways to include CSS within Storybook. Learn more about setting up styling within Storybook.</p>
58
- <a
59
- href="https://storybook.js.org/docs/react/configure/styling-and-css"
60
- target="_blank"
61
- >Learn more<RightArrow /></a>
62
- </div>
63
- <div className="sb-section-item">
64
- <Image
65
- width={0}
66
- height={0}
67
- style={{ width: '100%', height: 'auto' }}
68
- src={Context}
69
- alt="An abstraction representing the composition of data for a component"
70
- />
71
- <h4 className="sb-section-item-heading">Provide context and mocking</h4>
72
- <p className="sb-section-item-paragraph">Often when a story doesn't render, it's because your component is expecting a specific environment or context (like a theme provider) to be available.</p>
73
- <a
74
- href="https://storybook.js.org/docs/react/writing-stories/decorators#context-for-mocking"
75
- target="_blank"
76
- >Learn more<RightArrow /></a>
77
- </div>
78
- <div className="sb-section-item">
79
- <Image
80
- width={0}
81
- height={0}
82
- style={{ width: '100%', height: 'auto' }}
83
- src={Assets}
84
- alt="A representation of typography and image assets"
85
- />
86
- <div>
87
- <h4 className="sb-section-item-heading">Load assets and resources</h4>
88
- <p className="sb-section-item-paragraph">To link static files (like fonts) to your projects and stories, use the
89
- `staticDirs` configuration option to specify folders to load when
90
- starting Storybook.</p>
91
- <a
92
- href="https://storybook.js.org/docs/react/configure/images-and-assets"
93
- target="_blank"
94
- >Learn more<RightArrow /></a>
95
- </div>
96
- </div>
97
- </div>
98
- </div>
99
- <div className="sb-container">
100
- <div className='sb-section-title'>
101
- # Do more with Storybook
102
-
103
- Now that you know the basics, let's explore other parts of Storybook that will improve your experience. This list is just to get you started. You can customise Storybook in many ways to fit your needs.
104
-
105
- </div>
106
-
107
- <div className="sb-section">
108
- <div className="sb-features-grid">
109
- <div className="sb-grid-item">
110
- <Image
111
- width={0}
112
- height={0}
113
- style={{ width: '100%', height: 'auto' }}
114
- src={Docs}
115
- alt="A screenshot showing the autodocs tag being set, pointing a docs page being generated"
116
- />
117
- <h4 className="sb-section-item-heading">Autodocs</h4>
118
- <p className="sb-section-item-paragraph">Auto-generate living,
119
- interactive reference documentation from your components and stories.</p>
120
- <a
121
- href="https://storybook.js.org/docs/react/writing-docs/autodocs"
122
- target="_blank"
123
- >Learn more<RightArrow /></a>
124
- </div>
125
- <div className="sb-grid-item">
126
- <Image
127
- width={0}
128
- height={0}
129
- style={{ width: '100%', height: 'auto' }}
130
- src={Share}
131
- alt="A browser window showing a Storybook being published to a chromatic.com URL"
132
- />
133
- <h4 className="sb-section-item-heading">Publish to Chromatic</h4>
134
- <p className="sb-section-item-paragraph">Publish your Storybook to review and collaborate with your entire team.</p>
135
- <a
136
- href="https://storybook.js.org/docs/react/sharing/publish-storybook#publish-storybook-with-chromatic"
137
- target="_blank"
138
- >Learn more<RightArrow /></a>
139
- </div>
140
- <div className="sb-grid-item">
141
- <Image
142
- width={0}
143
- height={0}
144
- style={{ width: '100%', height: 'auto' }}
145
- src={FigmaPlugin}
146
- alt="Windows showing the Storybook plugin in Figma"
147
- />
148
- <h4 className="sb-section-item-heading">Figma Plugin</h4>
149
- <p className="sb-section-item-paragraph">Embed your stories into Figma to cross-reference the design and live
150
- implementation in one place.</p>
151
- <a
152
- href="https://storybook.js.org/docs/react/sharing/design-integrations#embed-storybook-in-figma-with-the-plugin"
153
- target="_blank"
154
- >Learn more<RightArrow /></a>
155
- </div>
156
- <div className="sb-grid-item">
157
- <Image
158
- width={0}
159
- height={0}
160
- style={{ width: '100%', height: 'auto' }}
161
- src={Testing}
162
- alt="Screenshot of tests passing and failing"
163
- />
164
- <h4 className="sb-section-item-heading">Testing</h4>
165
- <p className="sb-section-item-paragraph">Use stories to test a component in all its variations, no matter how
166
- complex.</p>
167
- <a
168
- href="https://storybook.js.org/docs/react/writing-tests/introduction"
169
- target="_blank"
170
- >Learn more<RightArrow /></a>
171
- </div>
172
- <div className="sb-grid-item">
173
- <Image
174
- width={0}
175
- height={0}
176
- style={{ width: '100%', height: 'auto' }}
177
- src={Accessibility}
178
- alt="Screenshot of accessibility tests passing and failing"
179
- />
180
- <h4 className="sb-section-item-heading">Accessibility</h4>
181
- <p className="sb-section-item-paragraph">Automatically test your components for a11y issues as you develop.</p>
182
- <a
183
- href="https://storybook.js.org/docs/react/writing-tests/accessibility-testing"
184
- target="_blank"
185
- >Learn more<RightArrow /></a>
186
- </div>
187
- <div className="sb-grid-item">
188
- <Image
189
- width={0}
190
- height={0}
191
- style={{ width: '100%', height: 'auto' }}
192
- src={Theming}
193
- alt="Screenshot of Storybook in light and dark mode"
194
- />
195
- <h4 className="sb-section-item-heading">Theming</h4>
196
- <p className="sb-section-item-paragraph">Theme Storybook's UI to personalize it to your project.</p>
197
- <a
198
- href="https://storybook.js.org/docs/react/configure/theming"
199
- target="_blank"
200
- >Learn more<RightArrow /></a>
201
- </div>
202
- </div>
203
- </div>
204
- </div>
205
- <div className='sb-addon'>
206
- <div className='sb-addon-text'>
207
- <h4>Addons</h4>
208
- <p className="sb-section-item-paragraph">Integrate your tools with Storybook to connect workflows.</p>
209
- <a
210
- href="https://storybook.js.org/integrations/"
211
- target="_blank"
212
- >Discover all addons<RightArrow /></a>
213
- </div>
214
- <div className='sb-addon-img'>
215
- <Image
216
- width={650}
217
- height={347}
218
- src={AddonLibrary}
219
- alt="Integrate your tools with Storybook to connect workflows."
220
- />
221
- </div>
222
- </div>
223
-
224
- <div className="sb-section sb-socials">
225
- <div className="sb-section-item">
226
- <Image
227
- width={32}
228
- height={32}
229
- layout="fixed"
230
- src={Github}
231
- alt="Github logo"
232
- className="sb-explore-image"
233
- />
234
- Join our contributors building the future of UI development.
235
-
236
- <a
237
- href="https://github.com/storybookjs/storybook"
238
- target="_blank"
239
- >Star on GitHub<RightArrow /></a>
240
- </div>
241
- <div className="sb-section-item">
242
- <Image
243
- width={33}
244
- height={32}
245
- layout="fixed"
246
- src={Discord}
247
- alt="Discord logo"
248
- className="sb-explore-image"
249
- />
250
- <div>
251
- Get support and chat with frontend developers.
252
-
253
- <a
254
- href="https://discord.gg/storybook"
255
- target="_blank"
256
- >Join Discord server<RightArrow /></a>
257
- </div>
258
- </div>
259
- <div className="sb-section-item">
260
- <Image
261
- width={32}
262
- height={32}
263
- layout="fixed"
264
- src={Youtube}
265
- alt="Youtube logo"
266
- className="sb-explore-image"
267
- />
268
- <div>
269
- Watch tutorials, feature previews and interviews.
270
-
271
- <a
272
- href="https://www.youtube.com/@chromaticui"
273
- target="_blank"
274
- >Watch on YouTube<RightArrow /></a>
275
- </div>
276
- </div>
277
- <div className="sb-section-item">
278
- <Image
279
- width={33}
280
- height={32}
281
- layout="fixed"
282
- src={Tutorials}
283
- alt="A book"
284
- className="sb-explore-image"
285
- />
286
- <p>Follow guided walkthroughs on for key workflows.</p>
287
-
288
- <a
289
- href="https://storybook.js.org/tutorials/"
290
- target="_blank"
291
- >Discover tutorials<RightArrow /></a>
292
- </div>
293
-
294
- </div>
295
-
296
- <style>
297
- {`
298
- .sb-container {
299
- margin-bottom: 48px;
300
- }
301
-
302
- .sb-section {
303
- width: 100%;
304
- display: flex;
305
- flex-direction: row;
306
- gap: 20px;
307
- }
308
-
309
- img {
310
- object-fit: cover;
311
- }
312
-
313
- .sb-section-title {
314
- margin-bottom: 32px;
315
- }
316
-
317
- .sb-section a:not(h1 a, h2 a, h3 a) {
318
- font-size: 14px;
319
- }
320
-
321
- .sb-section-item, .sb-grid-item {
322
- flex: 1;
323
- display: flex;
324
- flex-direction: column;
325
- }
326
-
327
- .sb-section-item-heading {
328
- padding-top: 20px !important;
329
- padding-bottom: 5px !important;
330
- margin: 0 !important;
331
- }
332
- .sb-section-item-paragraph {
333
- margin: 0;
334
- padding-bottom: 10px;
335
- }
336
-
337
- .sb-chevron {
338
- margin-left: 5px;
339
- }
340
-
341
- .sb-features-grid {
342
- display: grid;
343
- grid-template-columns: repeat(2, 1fr);
344
- grid-gap: 32px 20px;
345
- }
346
-
347
- .sb-socials {
348
- display: grid;
349
- grid-template-columns: repeat(4, 1fr);
350
- }
351
-
352
- .sb-socials p {
353
- margin-bottom: 10px;
354
- }
355
-
356
- .sb-explore-image {
357
- max-height: 32px;
358
- align-self: flex-start;
359
- }
360
-
361
- .sb-addon {
362
- width: 100%;
363
- display: flex;
364
- align-items: center;
365
- position: relative;
366
- background-color: #EEF3F8;
367
- border-radius: 5px;
368
- border: 1px solid rgba(0, 0, 0, 0.05);
369
- background: #EEF3F8;
370
- height: 180px;
371
- margin-bottom: 48px;
372
- overflow: hidden;
373
- }
374
-
375
- .sb-addon-text {
376
- padding-left: 48px;
377
- max-width: 240px;
378
- }
379
-
380
- .sb-addon-text h4 {
381
- padding-top: 0px;
382
- }
383
-
384
- .sb-addon-img {
385
- position: absolute;
386
- left: 345px;
387
- top: 0;
388
- height: 100%;
389
- width: 200%;
390
- overflow: hidden;
391
- }
392
-
393
- .sb-addon-img img {
394
- width: 650px;
395
- transform: rotate(-15deg);
396
- margin-left: 40px;
397
- margin-top: -72px;
398
- box-shadow: 0 0 1px rgba(255, 255, 255, 0);
399
- backface-visibility: hidden;
400
- }
401
-
402
- @media screen and (max-width: 800px) {
403
- .sb-addon-img {
404
- left: 300px;
405
- }
406
- }
407
-
408
- @media screen and (max-width: 600px) {
409
- .sb-section {
410
- flex-direction: column;
411
- }
412
-
413
- .sb-features-grid {
414
- grid-template-columns: repeat(1, 1fr);
415
- }
416
-
417
- .sb-socials {
418
- grid-template-columns: repeat(2, 1fr);
419
- }
420
-
421
- .sb-addon {
422
- height: 280px;
423
- align-items: flex-start;
424
- padding-top: 32px;
425
- overflow: hidden;
426
- }
427
-
428
- .sb-addon-text {
429
- padding-left: 24px;
430
- }
431
-
432
- .sb-addon-img {
433
- right: 0;
434
- left: 0;
435
- top: 130px;
436
- bottom: 0;
437
- overflow: hidden;
438
- height: auto;
439
- width: 124%;
440
- }
441
-
442
- .sb-addon-img img {
443
- width: 1200px;
444
- transform: rotate(-12deg);
445
- margin-left: 0;
446
- margin-top: 48px;
447
- margin-bottom: -40px;
448
- margin-left: -24px;
449
- }
450
- }
451
- `}
452
- </style>
@@ -1,74 +0,0 @@
1
- import React from 'react';
2
-
3
- import PropTypes from 'prop-types';
4
-
5
- import { Button } from './Button';
6
- import './header.css';
7
-
8
- export const Header = ({ user, onLogin, onLogout, onCreateAccount }) => (
9
- <header>
10
- <div className="storybook-header">
11
- <div>
12
- <svg
13
- width="32"
14
- height="32"
15
- viewBox="0 0 32 32"
16
- xmlns="http://www.w3.org/2000/svg"
17
- >
18
- <g fill="none" fillRule="evenodd">
19
- <path
20
- d="M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z"
21
- fill="#FFF"
22
- />
23
- <path
24
- d="M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z"
25
- fill="#555AB9"
26
- />
27
- <path
28
- d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z"
29
- fill="#91BAF8"
30
- />
31
- </g>
32
- </svg>
33
- <h1>Acme</h1>
34
- </div>
35
- <div>
36
- {user ? (
37
- <>
38
- <span className="welcome">
39
- Welcome, <b>{user.name}</b>!
40
- </span>
41
- <Button
42
- size="small"
43
- onClick={onLogout}
44
- label="Log out"
45
- />
46
- </>
47
- ) : (
48
- <>
49
- <Button size="small" onClick={onLogin} label="Log in" />
50
- <Button
51
- primary
52
- size="small"
53
- onClick={onCreateAccount}
54
- label="Sign up"
55
- />
56
- </>
57
- )}
58
- </div>
59
- </div>
60
- </header>
61
- );
62
-
63
- Header.propTypes = {
64
- user: PropTypes.shape({
65
- name: PropTypes.string.isRequired,
66
- }),
67
- onLogin: PropTypes.func.isRequired,
68
- onLogout: PropTypes.func.isRequired,
69
- onCreateAccount: PropTypes.func.isRequired,
70
- };
71
-
72
- Header.defaultProps = {
73
- user: null,
74
- };
@@ -1,23 +0,0 @@
1
- import { Header } from './Header';
2
-
3
- export default {
4
- title: 'Example/Header',
5
- component: Header,
6
- // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
7
- tags: ['autodocs'],
8
- parameters: {
9
- // More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout
10
- layout: 'fullscreen',
11
- },
12
- };
13
- export const LoggedIn = {
14
- args: {
15
- user: {
16
- name: 'Jane Doe',
17
- },
18
- },
19
- };
20
-
21
- export const LoggedOut = {
22
- args: {},
23
- };
@@ -1,89 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Header } from './Header';
4
- import './page.css';
5
-
6
- export const Page = () => {
7
- const [user, setUser] = React.useState();
8
-
9
- return (
10
- <article>
11
- <Header
12
- user={user}
13
- onLogin={() => setUser({ name: 'Jane Doe' })}
14
- onLogout={() => setUser(undefined)}
15
- onCreateAccount={() => setUser({ name: 'Jane Doe' })}
16
- />
17
- <section className="storybook-page">
18
- <h2>Pages in Storybook</h2>
19
- <p>
20
- We recommend building UIs with a{' '}
21
- <a
22
- href="https://componentdriven.org"
23
- target="_blank"
24
- rel="noopener noreferrer"
25
- >
26
- <strong>component-driven</strong>
27
- </a>{' '}
28
- process starting with atomic components and ending with
29
- pages.
30
- </p>
31
- <p>
32
- Render pages with mock data. This makes it easy to build and
33
- review page states without needing to navigate to them in
34
- your app. Here are some handy patterns for managing page
35
- data in Storybook:
36
- </p>
37
- <ul>
38
- <li>
39
- Use a higher-level connected component. Storybook helps
40
- you compose such data from the "args" of child component
41
- stories
42
- </li>
43
- <li>
44
- Assemble data in the page component from your services.
45
- You can mock these services out using Storybook.
46
- </li>
47
- </ul>
48
- <p>
49
- Get a guided tutorial on component-driven development at{' '}
50
- <a
51
- href="https://storybook.js.org/tutorials/"
52
- target="_blank"
53
- rel="noopener noreferrer"
54
- >
55
- Storybook tutorials
56
- </a>
57
- . Read more in the{' '}
58
- <a
59
- href="https://storybook.js.org/docs"
60
- target="_blank"
61
- rel="noopener noreferrer"
62
- >
63
- docs
64
- </a>
65
- .
66
- </p>
67
- <div className="tip-wrapper">
68
- <span className="tip">Tip</span> Adjust the width of the
69
- canvas with the{' '}
70
- <svg
71
- width="10"
72
- height="10"
73
- viewBox="0 0 12 12"
74
- xmlns="http://www.w3.org/2000/svg"
75
- >
76
- <g fill="none" fillRule="evenodd">
77
- <path
78
- d="M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0 01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0 010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z"
79
- id="a"
80
- fill="#999"
81
- />
82
- </g>
83
- </svg>
84
- Viewports addon in the toolbar
85
- </div>
86
- </section>
87
- </article>
88
- );
89
- };
@@ -1,25 +0,0 @@
1
- import { userEvent, within } from '@storybook/testing-library';
2
-
3
- import { Page } from './Page';
4
-
5
- export default {
6
- title: 'Example/Page',
7
- component: Page,
8
- parameters: {
9
- // More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout
10
- layout: 'fullscreen',
11
- },
12
- };
13
-
14
- export const LoggedOut = {};
15
-
16
- // More on interaction testing: https://storybook.js.org/docs/react/writing-tests/interaction-testing
17
- export const LoggedIn = {
18
- play: async ({ canvasElement }) => {
19
- const canvas = within(canvasElement);
20
- const loginButton = await canvas.getByRole('button', {
21
- name: /Log in/i,
22
- });
23
- await userEvent.click(loginButton);
24
- },
25
- };
@@ -1,5 +0,0 @@
1
- <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <title>Accessibility</title>
3
- <circle cx="24.334" cy="24" r="24" fill="#A849FF" fill-opacity="0.3"/>
4
- <path fill-rule="evenodd" clip-rule="evenodd" d="M27.8609 11.585C27.8609 9.59506 26.2497 7.99023 24.2519 7.99023C22.254 7.99023 20.6429 9.65925 20.6429 11.585C20.6429 13.575 22.254 15.1799 24.2519 15.1799C26.2497 15.1799 27.8609 13.575 27.8609 11.585ZM21.8922 22.6473C21.8467 23.9096 21.7901 25.4788 21.5897 26.2771C20.9853 29.0462 17.7348 36.3314 17.3325 37.2275C17.1891 37.4923 17.1077 37.7955 17.1077 38.1178C17.1077 39.1519 17.946 39.9902 18.9802 39.9902C19.6587 39.9902 20.253 39.6293 20.5814 39.0889L20.6429 38.9874L24.2841 31.22C24.2841 31.22 27.5529 37.9214 27.9238 38.6591C28.2948 39.3967 28.8709 39.9902 29.7168 39.9902C30.751 39.9902 31.5893 39.1519 31.5893 38.1178C31.5893 37.7951 31.3639 37.2265 31.3639 37.2265C30.9581 36.3258 27.698 29.0452 27.0938 26.2771C26.8975 25.4948 26.847 23.9722 26.8056 22.7236C26.7927 22.333 26.7806 21.9693 26.7653 21.6634C26.7008 21.214 27.0231 20.8289 27.4097 20.7005L35.3366 18.3253C36.3033 18.0685 36.8834 16.9773 36.6256 16.0144C36.3678 15.0515 35.2722 14.4737 34.3055 14.7305C34.3055 14.7305 26.8619 17.1057 24.2841 17.1057C21.7062 17.1057 14.456 14.7947 14.456 14.7947C13.4893 14.5379 12.3937 14.9873 12.0715 15.9502C11.7493 16.9131 12.3293 18.0044 13.3604 18.3253L21.2873 20.7005C21.674 20.8289 21.9318 21.214 21.9318 21.6634C21.9174 21.9493 21.9053 22.2857 21.8922 22.6473Z" fill="#A470D5"/>
5
- </svg>
Binary file
Binary file