@workday/canvas-kit-docs 14.0.0-alpha.1211-next.0 → 14.0.0-alpha.1213-next.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.
- package/dist/es6/lib/docs.js +4708 -938
- package/dist/mdx/14.0-UPGRADE-GUIDE.mdx +97 -9
- package/dist/mdx/preview-react/avatar/Avatar.mdx +80 -0
- package/dist/mdx/preview-react/avatar/examples/Basic.tsx +5 -0
- package/dist/mdx/preview-react/avatar/examples/Custom.tsx +31 -0
- package/dist/mdx/preview-react/avatar/examples/Decorative.tsx +25 -0
- package/dist/mdx/preview-react/avatar/examples/Image.tsx +12 -0
- package/dist/mdx/preview-react/avatar/examples/Size.tsx +22 -0
- package/dist/mdx/preview-react/avatar/examples/Variant.tsx +19 -0
- package/dist/mdx/preview-react/avatar/examples/nicholas-avatar.png +0 -0
- package/dist/mdx/preview-react/pill/examples/WithAvatar.tsx +2 -2
- package/dist/mdx/preview-react/pill/examples/WithRemovable.tsx +1 -1
- package/dist/mdx/react/_examples/mdx/examples/GlobalHeader.tsx +2 -2
- package/dist/mdx/react/avatar/avatar/Avatar.mdx +12 -2
- package/dist/mdx/react/expandable/examples/Avatar.tsx +2 -2
- package/dist/mdx/react/expandable/examples/LongTitle.tsx +1 -1
- package/dist/mdx/react/expandable/examples/RTL.tsx +2 -2
- package/package.json +6 -6
|
@@ -10,6 +10,7 @@ any questions.
|
|
|
10
10
|
- [Instructions](#instructions)
|
|
11
11
|
- [Theming](#theming)
|
|
12
12
|
- [Component Updates](#component-updates)
|
|
13
|
+
- [Avatar in Preview](#avatar-in-preview)
|
|
13
14
|
- [Branding Changes](#branding-changes)
|
|
14
15
|
- [Buttons](#buttons)
|
|
15
16
|
- [Card](#card)
|
|
@@ -17,9 +18,11 @@ any questions.
|
|
|
17
18
|
- [Expandable](#expandable)
|
|
18
19
|
- [Hyperlink & ExternalHyperlink](#hyperlink-and-externalhyperlink)
|
|
19
20
|
- [Loading Dots](#loading-dots)
|
|
21
|
+
- [Pill](#pill)
|
|
20
22
|
- [SearchForm](#search-form)
|
|
21
23
|
- [Status Indicator (Preview)](#status-indicator-preview)
|
|
22
24
|
- [Deprecations](#deprecations)
|
|
25
|
+
- [Avatar in Main](#avatar-in-main)
|
|
23
26
|
- [Combobox (Labs)](#combobox-labs)
|
|
24
27
|
- [Radio (Main)](#radio-main)
|
|
25
28
|
- [Segmented Control (Main)](#segmented-control-main)
|
|
@@ -104,9 +107,35 @@ yarn remove @workday/canvas-kit-codemod
|
|
|
104
107
|
|
|
105
108
|
## Component Updates
|
|
106
109
|
|
|
110
|
+
### Avatar in Preview
|
|
111
|
+
|
|
112
|
+
**PR:** [#3430](https://github.com/Workday/canvas-kit/pull/3430)
|
|
113
|
+
|
|
114
|
+
A new `Avatar` component has been added to the `@workday/canvas-kit-preview-react` package that matches our brand refresh.
|
|
115
|
+
|
|
116
|
+
#### API Changes from the Main Avatar
|
|
117
|
+
|
|
118
|
+
- `Avatar` has a `name` prop. This is required to ensure a fallback if a `url` is not provided. The `name` prop also determines the initials and the `alt` text for the image if a `url` is provided.
|
|
119
|
+
- `url` stays the same. This prop is optional and will be used to display an image `Avatar`.
|
|
120
|
+
- `variant` defines the color of the `Avatar`. The default is `blue` but you can choose one of the following colors:
|
|
121
|
+
- `teal`
|
|
122
|
+
- `purple`
|
|
123
|
+
- `amber`
|
|
124
|
+
- `blue`
|
|
125
|
+
- By default, the `Avatar` will render a `div` element. If you need to render a `button` element use the `BaseAvatar` component.
|
|
126
|
+
- `size` accepts the following values:
|
|
127
|
+
- `extraExtraLarge`
|
|
128
|
+
- `extraLarge`
|
|
129
|
+
- `large`
|
|
130
|
+
- `medium`
|
|
131
|
+
- `small`
|
|
132
|
+
- `extraSmall`
|
|
133
|
+
- `extraExtraSmall`
|
|
134
|
+
|
|
107
135
|
### Branding Changes 💅
|
|
108
136
|
|
|
109
|
-
Several components have been refactored to reflect our new brand direction. Most of these changes
|
|
137
|
+
Several components have been refactored to reflect our new brand direction. Most of these changes
|
|
138
|
+
revolve around the use of our new brand colors.
|
|
110
139
|
|
|
111
140
|
The following components have been updated:
|
|
112
141
|
|
|
@@ -114,6 +143,7 @@ The following components have been updated:
|
|
|
114
143
|
- `Buttons` [#3394](https://github.com/Workday/canvas-kit/pull/3394)
|
|
115
144
|
- `ColorPicker` (Main) [#3307](https://github.com/Workday/canvas-kit/pull/3307)
|
|
116
145
|
- `ColorPicker` (preview) [#3307](https://github.com/Workday/canvas-kit/pull/3307)
|
|
146
|
+
- `InformationHighlight` [#3443](https://github.com/Workday/canvas-kit/pull/3443)
|
|
117
147
|
- `LoadingDots` (Main) [#3393](https://github.com/Workday/canvas-kit/pull/3393)
|
|
118
148
|
- `Pagination` (Preview) [#3300](https://github.com/Workday/canvas-kit/pull/3300)
|
|
119
149
|
- `SearchForm` (Labs) [#3303](https://github.com/Workday/canvas-kit/pull/3303)
|
|
@@ -126,9 +156,9 @@ The following components have been updated:
|
|
|
126
156
|
|
|
127
157
|
#### TertiaryButton
|
|
128
158
|
|
|
129
|
-
The `TertiaryButton` component no longer supports the `isThemable` prop.
|
|
130
|
-
|
|
131
|
-
|
|
159
|
+
The `TertiaryButton` component no longer supports the `isThemable` prop. To customize the appearance
|
|
160
|
+
of `TertiaryButton`, use the `cs` prop for custom styles or the `colors` prop for palette-based
|
|
161
|
+
color overrides.
|
|
132
162
|
|
|
133
163
|
The shape of `TertiaryButton` has changed to have rounded corners, aligning with other buttons and
|
|
134
164
|
our new brand direction.
|
|
@@ -246,12 +276,16 @@ emphasis for the badge.
|
|
|
246
276
|
|
|
247
277
|
### Expandable
|
|
248
278
|
|
|
249
|
-
**
|
|
279
|
+
**PRs:** [#3389](https://github.com/Workday/canvas-kit/pull/3389), [#3430](https://github.com/Workday/canvas-kit/pull/3430)
|
|
250
280
|
|
|
251
281
|
- `<Expandable.Target>` hover state has been update to use `system.color.bg.alt.soft` instead of
|
|
252
282
|
`system.color.bg.alt.default` to match our new brand directions.
|
|
253
283
|
- The `focus` state has been update to use `system.color.border.primary.default` to ensure the same
|
|
254
284
|
focus state color across all components.
|
|
285
|
+
- `Expandable.Avatar` has been updated to use the `Avatar` component from Preview. This change requires that you update the `altText` prop to `name`.
|
|
286
|
+
|
|
287
|
+
> 🤖 The codemod will handle the change of `altText` to `name` on `Expandable.Avatar`.
|
|
288
|
+
|
|
255
289
|
|
|
256
290
|
These changes are only **visual** and should not affect the functionality of the component.
|
|
257
291
|
|
|
@@ -287,6 +321,15 @@ These changes are only **visual** and should not affect the functionality of the
|
|
|
287
321
|
<LoadingDots variant="inverse" />
|
|
288
322
|
```
|
|
289
323
|
|
|
324
|
+
### Pill
|
|
325
|
+
|
|
326
|
+
**PR:** [#3430](https://github.com/Workday/canvas-kit/pull/3430)
|
|
327
|
+
|
|
328
|
+
- `Pill` has been updated to use the `Avatar` component from Preview. This change requires that you provide a value for the `name` prop.
|
|
329
|
+
|
|
330
|
+
> 🤖 The codemod will handle the change of `altText` to `name` on `Pill.Avatar`.
|
|
331
|
+
|
|
332
|
+
|
|
290
333
|
### Search Form 🚨
|
|
291
334
|
|
|
292
335
|
**PR:** [#3303](https://github.com/Workday/canvas-kit/pull/3303)
|
|
@@ -344,16 +387,20 @@ const customTheme = {
|
|
|
344
387
|
|
|
345
388
|
**PR:** [#3287](https://github.com/Workday/canvas-kit/pull/3287)
|
|
346
389
|
|
|
347
|
-
Preview `StatusIndicator` is a rounder and more vibrant base emphasis (`low`). The `emphasis` prop
|
|
390
|
+
Preview `StatusIndicator` is a rounder and more vibrant base emphasis (`low`). The `emphasis` prop
|
|
391
|
+
is now deprecated and the `high` emphasis will be removed in a later version.
|
|
348
392
|
|
|
349
393
|
Variant names of the preview `StatusIndicator` have been updated by the following mapping:
|
|
394
|
+
|
|
350
395
|
- `blue` -> `primary`
|
|
351
396
|
- `green` -> `success`
|
|
352
397
|
- `orange` -> `caution`
|
|
353
398
|
- `red` -> `critical`
|
|
354
399
|
- `gray` -> `neutral`
|
|
355
400
|
|
|
356
|
-
The `StatusIndicatorVariant` type has been updated to contain the new variant names listed above. If
|
|
401
|
+
The `StatusIndicatorVariant` type has been updated to contain the new variant names listed above. If
|
|
402
|
+
you use the old variant values, update to use the new ones mapped above. It has also been
|
|
403
|
+
deprecated. Use `StatusIndicatorProps['variant']` instead.
|
|
357
404
|
|
|
358
405
|
## Deprecations
|
|
359
406
|
|
|
@@ -361,6 +408,43 @@ We add the [@deprecated](https://jsdoc.app/tags-deprecated.html) JSDoc tag to co
|
|
|
361
408
|
in a future major release. This signals consumers to migrate to a more stable alternative before the
|
|
362
409
|
deprecated code is removed.
|
|
363
410
|
|
|
411
|
+
### Avatar in Main
|
|
412
|
+
|
|
413
|
+
**PR:** [#3430](https://github.com/Workday/canvas-kit/pull/3430)
|
|
414
|
+
|
|
415
|
+
We've deprecated the `Avatar` component in `@workday/canvas-kit-react` Main package. Please use the `Avatar` component in our Preview package.
|
|
416
|
+
|
|
417
|
+
**Before in v13**
|
|
418
|
+
|
|
419
|
+
```tsx
|
|
420
|
+
import { Avatar } from '@workday/canvas-kit-react/avatar';
|
|
421
|
+
|
|
422
|
+
// For Avatars that where divs
|
|
423
|
+
<Avatar altText="John Doe" size="extraExtraLarge" as="div" url={yourImageUrl} />
|
|
424
|
+
|
|
425
|
+
// For Avatars that where buttons
|
|
426
|
+
<Avatar altText="John Doe" onClick={() => console.log('Avatar clicked')} />
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
**After in v14**
|
|
430
|
+
|
|
431
|
+
```tsx
|
|
432
|
+
import { Avatar } from '@workday/canvas-kit-preview-react/avatar';
|
|
433
|
+
// name is used as a fallback if the image url is broken or still loading
|
|
434
|
+
// variant light or dark are not used. Instead, variant defines the color of the Avatar
|
|
435
|
+
<Avatar name="John Doe" size="extraExtraLarge" variant='teal' url={yourImageUrl} />
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
If you need to render a `button` element use the `BaseAvatar` component.
|
|
439
|
+
|
|
440
|
+
```tsx
|
|
441
|
+
import { BaseAvatar } from '@workday/canvas-kit-preview-react/avatar';
|
|
442
|
+
|
|
443
|
+
<BaseAvatar name="John Doe" size="extraExtraLarge" variant='teal' as="button" onClick={() => console.log('Avatar clicked')}>
|
|
444
|
+
<BaseAvatar.Name name="John Doe" />
|
|
445
|
+
</BaseAvatar>
|
|
446
|
+
```
|
|
447
|
+
|
|
364
448
|
### Combobox (Labs)
|
|
365
449
|
|
|
366
450
|
The Combobox component in `@workday/canvas-kit-labs-react/combobox` has been deprecated and will be
|
|
@@ -405,9 +489,13 @@ promoted or replaced a component or utility.
|
|
|
405
489
|
|
|
406
490
|
**PR:** [#3429](https://github.com/Workday/canvas-kit/pull/3439)
|
|
407
491
|
|
|
408
|
-
Long overdue, but a sign of moving forward, we are removing our `DeprecatedButton`. Our design
|
|
492
|
+
Long overdue, but a sign of moving forward, we are removing our `DeprecatedButton`. Our design
|
|
493
|
+
system supported this for quite some time, but with the advancement in theming, our components API
|
|
494
|
+
and our flexibility, it is time for us to finally remove this component. This component has served
|
|
495
|
+
as a reminder of how far we've come and it part we're thankful for this change.
|
|
409
496
|
|
|
410
|
-
Al though unlikely, but not impossible, if you were using `DeprecatedButton` please use our flexible
|
|
497
|
+
Al though unlikely, but not impossible, if you were using `DeprecatedButton` please use our flexible
|
|
498
|
+
and themable buttons like `PrimaryButton`, `ScondaryButton` or `TertiaryButton`.
|
|
411
499
|
|
|
412
500
|
### Menu (preview)
|
|
413
501
|
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {SymbolDoc, Specifications, ExampleCodeBlock} from '@workday/canvas-kit-docs';
|
|
2
|
+
|
|
3
|
+
import {Avatar} from '@workday/canvas-kit-preview-react/avatar';
|
|
4
|
+
import Basic from './examples/Basic';
|
|
5
|
+
import Image from './examples/Image';
|
|
6
|
+
import Size from './examples/Size';
|
|
7
|
+
import Variant from './examples/Variant';
|
|
8
|
+
import Custom from './examples/Custom';
|
|
9
|
+
import Decorative from './examples/Decorative';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# Avatar
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
yarn add @workday/canvas-kit-preview-react
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
### Basic Example
|
|
26
|
+
|
|
27
|
+
The most basic usage requires only a `name` prop. The component automatically extracts and displays
|
|
28
|
+
the initials. If you want to display a different set of initials, you can use the `preferredInitials` prop.
|
|
29
|
+
|
|
30
|
+
<ExampleCodeBlock code={Basic} />
|
|
31
|
+
|
|
32
|
+
### Image Avatar
|
|
33
|
+
|
|
34
|
+
You can display a profile image by providing the `url` prop.
|
|
35
|
+
|
|
36
|
+
> Note: The `url` and the `name` prop is required for the image avatar. The `name` is used for the `alt` attribute on the image.
|
|
37
|
+
|
|
38
|
+
#### Image Fallback Behavior
|
|
39
|
+
|
|
40
|
+
The Avatar component includes intelligent fallback handling:
|
|
41
|
+
|
|
42
|
+
- While the image loads, the user's initials are displayed using the `name` prop
|
|
43
|
+
- If the image fails to load, initials remain visible
|
|
44
|
+
- The `name` prop serves as both the alt text and fallback content
|
|
45
|
+
|
|
46
|
+
<ExampleCodeBlock code={Image} />
|
|
47
|
+
|
|
48
|
+
### Sizes
|
|
49
|
+
|
|
50
|
+
The Avatar component supports the following sizes:
|
|
51
|
+
- `extraExtraSmall` is 24px x 24px
|
|
52
|
+
- `extraSmall` is 32px x 32px
|
|
53
|
+
- `small` is 40px x 40px
|
|
54
|
+
- `medium` is 48px x 48px
|
|
55
|
+
- `large` is 72px x 72px
|
|
56
|
+
- `extraLarge` is 96px x 96px
|
|
57
|
+
- `extraExtraLarge` is 120px x 120px
|
|
58
|
+
|
|
59
|
+
<ExampleCodeBlock code={Size} />
|
|
60
|
+
|
|
61
|
+
### Variants
|
|
62
|
+
|
|
63
|
+
Choose from four predefined color schemes:
|
|
64
|
+
|
|
65
|
+
<ExampleCodeBlock code={Variant} />
|
|
66
|
+
|
|
67
|
+
### Advanced Custom Component
|
|
68
|
+
|
|
69
|
+
For complete control over styling and behavior, use the `BaseAvatar` component:
|
|
70
|
+
|
|
71
|
+
<ExampleCodeBlock code={Custom} />
|
|
72
|
+
|
|
73
|
+
### Accessibility
|
|
74
|
+
If the Avatar is purely decorative, you can set the `isDecorative` prop to `true` to prevent the `name` prop from being forwarded to the `alt` attribute of the image.
|
|
75
|
+
|
|
76
|
+
<ExampleCodeBlock code={Decorative} />
|
|
77
|
+
|
|
78
|
+
## Component API
|
|
79
|
+
|
|
80
|
+
<SymbolDoc name="Avatar" fileName="/preview-react/" hideDescription />
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {BaseAvatar} from '@workday/canvas-kit-preview-react/avatar';
|
|
2
|
+
import {createStyles, px2rem} from '@workday/canvas-kit-styling';
|
|
3
|
+
import {base} from '@workday/canvas-tokens-web';
|
|
4
|
+
|
|
5
|
+
const customStyles = createStyles({
|
|
6
|
+
cursor: 'pointer',
|
|
7
|
+
backgroundColor: base.magenta300,
|
|
8
|
+
color: base.magenta700,
|
|
9
|
+
borderRadius: '50%',
|
|
10
|
+
border: 'none',
|
|
11
|
+
padding: '0',
|
|
12
|
+
margin: '0',
|
|
13
|
+
display: 'flex',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
span: {
|
|
16
|
+
cursor: 'pointer',
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export default () => {
|
|
21
|
+
return (
|
|
22
|
+
<BaseAvatar
|
|
23
|
+
size={px2rem(56)}
|
|
24
|
+
cs={customStyles}
|
|
25
|
+
as="button"
|
|
26
|
+
onClick={() => console.log('clicked')}
|
|
27
|
+
>
|
|
28
|
+
<BaseAvatar.Name name="John Doe Jane" />
|
|
29
|
+
</BaseAvatar>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {Avatar} from '@workday/canvas-kit-preview-react/avatar';
|
|
2
|
+
// @ts-ignore
|
|
3
|
+
import nicholasAvatar from './nicholas-avatar.png';
|
|
4
|
+
import {createStyles} from '@workday/canvas-kit-styling';
|
|
5
|
+
import {Text} from '@workday/canvas-kit-react/text';
|
|
6
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
7
|
+
const containerStyles = createStyles({
|
|
8
|
+
display: 'inline-flex',
|
|
9
|
+
gap: system.space.x2,
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
});
|
|
12
|
+
export default () => {
|
|
13
|
+
return (
|
|
14
|
+
<div className={containerStyles}>
|
|
15
|
+
<Avatar
|
|
16
|
+
name="Nicholas Smith"
|
|
17
|
+
isDecorative
|
|
18
|
+
url={nicholasAvatar}
|
|
19
|
+
objectFit="cover"
|
|
20
|
+
size="small"
|
|
21
|
+
/>
|
|
22
|
+
<Text>Nicholas Smith</Text>
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {Avatar} from '@workday/canvas-kit-preview-react/avatar';
|
|
2
|
+
import {createStyles} from '@workday/canvas-kit-styling';
|
|
3
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
4
|
+
|
|
5
|
+
const containerStyles = createStyles({
|
|
6
|
+
display: 'inline-flex',
|
|
7
|
+
gap: system.space.x2,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export default () => {
|
|
11
|
+
return (
|
|
12
|
+
<div className={containerStyles}>
|
|
13
|
+
<Avatar name="John Doe" size="extraExtraSmall" />
|
|
14
|
+
<Avatar name="Logan McNeil" size="extraSmall" />
|
|
15
|
+
<Avatar name="Wonder Woman" size="small" />
|
|
16
|
+
<Avatar name="Iron Man" size="medium" />
|
|
17
|
+
<Avatar name="Peter Parker" size="large" />
|
|
18
|
+
<Avatar name="Bruce Banner" size="extraLarge" />
|
|
19
|
+
<Avatar name="Elektra" size="extraExtraLarge" />
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {Avatar} from '@workday/canvas-kit-preview-react/avatar';
|
|
2
|
+
import {createStyles} from '@workday/canvas-kit-styling';
|
|
3
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
4
|
+
|
|
5
|
+
const containerStyles = createStyles({
|
|
6
|
+
display: 'inline-flex',
|
|
7
|
+
gap: system.space.x2,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export default () => {
|
|
11
|
+
return (
|
|
12
|
+
<div className={containerStyles}>
|
|
13
|
+
<Avatar name="John Doe" variant="blue" />
|
|
14
|
+
<Avatar name="Logan McNeil" variant="amber" />
|
|
15
|
+
<Avatar name="Wonder Woman" variant="teal" />
|
|
16
|
+
<Avatar name="Elektra" variant="purple" />
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
Binary file
|
|
@@ -18,11 +18,11 @@ export default () => {
|
|
|
18
18
|
<div>
|
|
19
19
|
<div className={flexStyles}>
|
|
20
20
|
<Pill onClick={() => setText('The first pill is clicked!')}>
|
|
21
|
-
<Pill.Avatar
|
|
21
|
+
<Pill.Avatar name="Regina Skeltor" url={testAvatar} />
|
|
22
22
|
<Pill.Label>Regina Skeltor</Pill.Label>
|
|
23
23
|
</Pill>
|
|
24
24
|
<Pill disabled>
|
|
25
|
-
<Pill.Avatar
|
|
25
|
+
<Pill.Avatar name="Regina Skeltor" />
|
|
26
26
|
<Pill.Label>Regina Skeltor</Pill.Label>
|
|
27
27
|
</Pill>
|
|
28
28
|
</div>
|
|
@@ -25,7 +25,7 @@ export default () => {
|
|
|
25
25
|
/>
|
|
26
26
|
</Pill>
|
|
27
27
|
<Pill variant="removable">
|
|
28
|
-
<Pill.Avatar
|
|
28
|
+
<Pill.Avatar name="Avatar" url={testAvatar} />
|
|
29
29
|
<Pill.Label>Carolyn Grimaldi</Pill.Label>
|
|
30
30
|
<Pill.IconButton
|
|
31
31
|
aria-label="Remove"
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from '@workday/canvas-system-icons-web';
|
|
21
21
|
|
|
22
22
|
import {SecondaryButton, TertiaryButton} from '@workday/canvas-kit-react/button';
|
|
23
|
-
import {Avatar} from '@workday/canvas-kit-react/avatar';
|
|
23
|
+
import {Avatar} from '@workday/canvas-kit-preview-react/avatar';
|
|
24
24
|
import {Flex, FlexProps} from '@workday/canvas-kit-react/layout';
|
|
25
25
|
import {LoadReturn} from '@workday/canvas-kit-react/collection';
|
|
26
26
|
import {Tooltip} from '@workday/canvas-kit-react/tooltip';
|
|
@@ -149,7 +149,7 @@ export default () => {
|
|
|
149
149
|
<TertiaryButton icon={inboxIcon} />
|
|
150
150
|
</Tooltip>
|
|
151
151
|
<Tooltip title="Profile">
|
|
152
|
-
<Avatar
|
|
152
|
+
<Avatar name="Avatar" />
|
|
153
153
|
</Tooltip>
|
|
154
154
|
</GlobalHeader.Item>
|
|
155
155
|
</GlobalHeader>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {Specifications, SymbolDoc, SymbolDescription, ExampleCodeBlock} from '@workday/canvas-kit-docs';
|
|
1
|
+
import {Specifications, SymbolDoc, SymbolDescription, ExampleCodeBlock, StorybookStatusIndicator} from '@workday/canvas-kit-docs';
|
|
2
|
+
import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight';
|
|
2
3
|
|
|
3
4
|
import Basic from './examples/Basic';
|
|
4
5
|
import Button from './examples/Button';
|
|
@@ -10,7 +11,16 @@ import Variant from './examples/Variant';
|
|
|
10
11
|
import CustomStyles from './examples/CustomStyles';
|
|
11
12
|
|
|
12
13
|
|
|
13
|
-
# Canvas Kit Avatar
|
|
14
|
+
# Canvas Kit Avatar <StorybookStatusIndicator type="deprecated" />
|
|
15
|
+
|
|
16
|
+
<InformationHighlight className="sb-unstyled" variant="caution" cs={{p: {marginBlock: 0}}}>
|
|
17
|
+
<InformationHighlight.Icon />
|
|
18
|
+
<InformationHighlight.Body>
|
|
19
|
+
`Avatar` in Main has been deprecated and will be removed in a future major version.
|
|
20
|
+
Please use [Avatar](https://workday.github.io/canvas-kit/?path=/docs/preview-avatar--basic) in
|
|
21
|
+
Preview instead.
|
|
22
|
+
</InformationHighlight.Body>
|
|
23
|
+
</InformationHighlight>
|
|
14
24
|
|
|
15
25
|
Represents a person's profile.
|
|
16
26
|
|
|
@@ -7,7 +7,7 @@ export default () => (
|
|
|
7
7
|
<Expandable>
|
|
8
8
|
<Expandable.Target headingLevel="h4">
|
|
9
9
|
<Expandable.Icon iconPosition="start" />
|
|
10
|
-
<Expandable.Avatar
|
|
10
|
+
<Expandable.Avatar name="Avatar" url={testAvatar} />
|
|
11
11
|
<Expandable.Title>Title</Expandable.Title>
|
|
12
12
|
</Expandable.Target>
|
|
13
13
|
|
|
@@ -15,7 +15,7 @@ export default () => (
|
|
|
15
15
|
</Expandable>
|
|
16
16
|
<Expandable>
|
|
17
17
|
<Expandable.Target headingLevel="h4">
|
|
18
|
-
<Expandable.Avatar
|
|
18
|
+
<Expandable.Avatar name="Avatar" url={testAvatar} />
|
|
19
19
|
<Expandable.Title>Title</Expandable.Title>
|
|
20
20
|
<Expandable.Icon iconPosition="end" />
|
|
21
21
|
</Expandable.Target>
|
|
@@ -6,7 +6,7 @@ export default () => (
|
|
|
6
6
|
<Expandable>
|
|
7
7
|
<Expandable.Target headingLevel="h4">
|
|
8
8
|
<Expandable.Icon iconPosition="start" />
|
|
9
|
-
<Expandable.Avatar
|
|
9
|
+
<Expandable.Avatar name="Avatar" url={testAvatar} />
|
|
10
10
|
<Expandable.Title>
|
|
11
11
|
Our house special supreme pizza includes pepperoni, sausage, bell peppers, mushrooms,
|
|
12
12
|
onions, and oregano.
|
|
@@ -12,7 +12,7 @@ export default () => {
|
|
|
12
12
|
<Expandable>
|
|
13
13
|
<Expandable.Target headingLevel="h4">
|
|
14
14
|
<Expandable.Icon iconPosition="start" />
|
|
15
|
-
<Expandable.Avatar />
|
|
15
|
+
<Expandable.Avatar name="Avatar" />
|
|
16
16
|
<Expandable.Title>Title</Expandable.Title>
|
|
17
17
|
</Expandable.Target>
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ export default () => {
|
|
|
20
20
|
</Expandable>
|
|
21
21
|
<Expandable>
|
|
22
22
|
<Expandable.Target headingLevel="h4">
|
|
23
|
-
<Expandable.Avatar />
|
|
23
|
+
<Expandable.Avatar name="Avatar" />
|
|
24
24
|
<Expandable.Title>Title</Expandable.Title>
|
|
25
25
|
<Expandable.Icon iconPosition="end" />
|
|
26
26
|
</Expandable.Target>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "14.0.0-alpha.
|
|
3
|
+
"version": "14.0.0-alpha.1213-next.0",
|
|
4
4
|
"description": "Documentation components of Canvas Kit components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"@emotion/styled": "^11.6.0",
|
|
46
46
|
"@stackblitz/sdk": "^1.11.0",
|
|
47
47
|
"@storybook/csf": "0.0.1",
|
|
48
|
-
"@workday/canvas-kit-labs-react": "^14.0.0-alpha.
|
|
49
|
-
"@workday/canvas-kit-preview-react": "^14.0.0-alpha.
|
|
50
|
-
"@workday/canvas-kit-react": "^14.0.0-alpha.
|
|
51
|
-
"@workday/canvas-kit-styling": "^14.0.0-alpha.
|
|
48
|
+
"@workday/canvas-kit-labs-react": "^14.0.0-alpha.1213-next.0",
|
|
49
|
+
"@workday/canvas-kit-preview-react": "^14.0.0-alpha.1213-next.0",
|
|
50
|
+
"@workday/canvas-kit-react": "^14.0.0-alpha.1213-next.0",
|
|
51
|
+
"@workday/canvas-kit-styling": "^14.0.0-alpha.1213-next.0",
|
|
52
52
|
"@workday/canvas-system-icons-web": "^3.0.35",
|
|
53
53
|
"@workday/canvas-tokens-web": "3.0.0-alpha.12",
|
|
54
54
|
"markdown-to-jsx": "^7.2.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"mkdirp": "^1.0.3",
|
|
62
62
|
"typescript": "5.0"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "b5997d670fcef518d13ff761d9a15d54e1d60a21"
|
|
65
65
|
}
|