@workday/canvas-kit-docs 13.0.0-alpha.948-next.0 → 13.0.0-alpha.978-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.
Files changed (32) hide show
  1. package/dist/es6/mdx/welcomePage.js +1 -1
  2. package/dist/mdx/10.0-UPGRADE-GUIDE.mdx +1 -1
  3. package/dist/mdx/11.0-UPGRADE-GUIDE.mdx +6 -6
  4. package/dist/mdx/12.0-UPGRADE-GUIDE.mdx +6 -6
  5. package/dist/mdx/CONTRIBUTING.mdx +1 -1
  6. package/dist/mdx/CREATING_COMPOUND_COMPONENTS.mdx +31 -0
  7. package/dist/mdx/preview-react/radio/Radio.mdx +2 -2
  8. package/dist/mdx/preview-react/select/examples/Top Label/Alert.tsx +1 -1
  9. package/dist/mdx/preview-react/status-indicator/StatusIndicator.mdx +2 -2
  10. package/dist/mdx/react/_examples/GlobalHeader.mdx +36 -0
  11. package/dist/mdx/react/_examples/mdx/CompoundComponent.mdx +2 -2
  12. package/dist/mdx/react/_examples/mdx/Headers.mdx +26 -0
  13. package/dist/mdx/react/_examples/mdx/examples/GlobalHeader.tsx +267 -37
  14. package/dist/mdx/react/badge/CountBadge.mdx +2 -2
  15. package/dist/mdx/react/breadcrumbs/examples/Overflow.tsx +13 -4
  16. package/dist/mdx/react/button/button/Button.mdx +5 -5
  17. package/dist/mdx/react/card/card.mdx +2 -2
  18. package/dist/mdx/react/checkbox/Checkbox.mdx +5 -5
  19. package/dist/mdx/react/combobox/Combobox.mdx +2 -2
  20. package/dist/mdx/react/form-field/FormField.mdx +2 -2
  21. package/dist/mdx/react/modal/examples/IframeTest.tsx +4 -1
  22. package/dist/mdx/react/popup/examples/PopupWithFallbackPlacements.tsx +102 -53
  23. package/dist/mdx/react/select/Select.mdx +6 -6
  24. package/dist/mdx/react/switch/Switch.mdx +5 -5
  25. package/dist/mdx/react/table/Table.mdx +2 -2
  26. package/dist/mdx/react/text/BodyText.mdx +2 -2
  27. package/dist/mdx/react/text/Heading.mdx +2 -2
  28. package/dist/mdx/react/text/Subtext.mdx +2 -2
  29. package/dist/mdx/react/text/Text.mdx +2 -2
  30. package/dist/mdx/react/text/Title.mdx +2 -2
  31. package/dist/mdx/welcome.mdx +3 -3
  32. package/package.json +7 -7
@@ -34,7 +34,7 @@ export const WelcomePage = () => {
34
34
  React.createElement(Card.Heading, null, "Getting Started"),
35
35
  React.createElement(Card.Body, null,
36
36
  React.createElement(Text, null, "For all things getting started including helpful guides and docs.")),
37
- React.createElement(Grid.Item, { as: Hyperlink, alignSelf: "end", marginTop: "xs", href: "https://workday.github.io/canvas-kit/?path=/docs/guides-getting-started--page" },
37
+ React.createElement(Grid.Item, { as: Hyperlink, alignSelf: "end", marginTop: "xs", href: "https://workday.github.io/canvas-kit/?path=/docs/guides-getting-started--docs" },
38
38
  ' ',
39
39
  "Getting Started Guide")),
40
40
  React.createElement(Grid, { as: Card, gridTemplateRows: "1fr 1fr 2fr 1fr", depth: "none", display: "grid", maxHeight: 320 },
@@ -48,7 +48,7 @@ If you're using Canvas Kit and not directly using this package, there is nothing
48
48
  end. The Canvas Kit packages are using the static compilation as part of the build process. If you
49
49
  want to use this package for your own styles, you don't need to do anything special to use in
50
50
  development; just reference our
51
- [documentation](https://workday.github.io/canvas-kit/?path=/story/features-styling-welcome--page) on
51
+ [documentation](https://workday.github.io/canvas-kit/?path=/docs/styling-getting-started--docs) on
52
52
  how to get started.
53
53
 
54
54
  For more information on why this package was introduced, please reference our
@@ -1,8 +1,8 @@
1
- import {Table} from '@workday/canvas-kit-react/table';
2
- import {base, brand, system} from '@workday/canvas-tokens-web';
3
- import {StatusIndicator} from '@workday/canvas-kit-preview-react/status-indicator';
4
- import {cssVar} from '@workday/canvas-kit-styling';
5
- import {Box} from '@workday/canvas-kit-react/layout';
1
+ import { Table } from '@workday/canvas-kit-react/table';
2
+ import { base, brand, system } from '@workday/canvas-tokens-web';
3
+ import { StatusIndicator } from '@workday/canvas-kit-preview-react/status-indicator';
4
+ import { cssVar } from '@workday/canvas-kit-styling';
5
+ import { Box } from '@workday/canvas-kit-react/layout';
6
6
 
7
7
 
8
8
  # Canvas Kit 11.0 Upgrade Guide
@@ -850,7 +850,7 @@ previously in [Main](#main) (for reference, see
850
850
  in [Main](#main) from v9).
851
851
 
852
852
  `Table` is a
853
- [compound component](https://workday.github.io/canvas-kit/?path=/docs/guides-compound-components--page)
853
+ [compound component](https://workday.github.io/canvas-kit/?path=/docs/guides-compound-components--docs)
854
854
  which provides a flexible API and access to its internals via its subcomponents.
855
855
 
856
856
  > **Note**: `rowState` prop is no longer a part of the `Table` component.
@@ -1,8 +1,8 @@
1
- import {Table} from '@workday/canvas-kit-react/table';
2
- import {base, brand, system} from '@workday/canvas-tokens-web';
3
- import {StatusIndicator} from '@workday/canvas-kit-preview-react/status-indicator';
4
- import {cssVar} from '@workday/canvas-kit-styling';
5
- import {Box} from '@workday/canvas-kit-react/layout';
1
+ import { Table } from '@workday/canvas-kit-react/table';
2
+ import { base, brand, system } from '@workday/canvas-tokens-web';
3
+ import { StatusIndicator } from '@workday/canvas-kit-preview-react/status-indicator';
4
+ import { cssVar } from '@workday/canvas-kit-styling';
5
+ import { Box } from '@workday/canvas-kit-react/layout';
6
6
 
7
7
 
8
8
  # Canvas Kit 12.0 Upgrade Guide
@@ -361,7 +361,7 @@ made to provide more flexibility and better explicit components when using input
361
361
  ##### Breaking API Change
362
362
 
363
363
  The newly promoted `FormField` is a
364
- [compound component](https://workday.github.io/canvas-kit/?path=/docs/guides-compound-components--page).
364
+ [compound component](https://workday.github.io/canvas-kit/?path=/docs/guides-compound-components--docs).
365
365
  Due to the different APIs of the component, this change is **not codemodable**. The following shows
366
366
  an example of how to **update** your code to match the new compound component API.
367
367
 
@@ -155,7 +155,7 @@ Upon commit, [lint-staged](https://github.com/okonet/lint-staged) will run your
155
155
  ### Releases
156
156
 
157
157
  - Releases are prepared by updating package versions with `lerna version`, and updating the
158
- [changelog](/docs/changelog--page)
158
+ [changelog](/docs/changelog--docs)
159
159
  - A PR is created for the above updates
160
160
  - After the release PR is approved and merged, we create a release in GitHub with the contents of
161
161
  the changelog updates.
@@ -7,12 +7,43 @@ document to learn about what a compound component is.
7
7
  This document will go through building a simplified Disclosure component to help solidify the
8
8
  concepts. We will cover:
9
9
 
10
+ - [Non Coordinated Components](#non-coordinated-components)
10
11
  - [Models](#models)
11
12
  - [Container Components](#disclosure-component)
12
13
  - [Sub-components](#disclosuretarget-component)
13
14
  - [Model Composition](#model-composition)
14
15
  - [Behavior hooks](#behavior-hooks)
15
16
 
17
+ ## Non Coordinated Components
18
+
19
+ In most cases you'll create compound components that have a model and share information across subcomponents. However, in the case where information doesn't need to be shared, you can create a non
20
+ coordinated component. These components often represent some styled element with no associated role
21
+ or behavior and don't rely on state and events such as a `Card`, `Flex` or `Button` components. Use
22
+ `createComponent` factory function in these scenarios.
23
+
24
+ ### `createComponent`
25
+
26
+ Use `createComponent` when you want to create a rendered element with _no behavior_. This is useful
27
+ for elements that you want to use for styling purposes like container elements, or subcomponents
28
+ that are simple rendered elements. This utility function will wrap your component in a
29
+ `React.ForwardRef` and allow you to add subcomponents as well.
30
+
31
+ ```tsx
32
+ export const Card = createComponent('div')({
33
+ displayName: 'Card',
34
+ subComponents: {
35
+ Heading: CardHeading, // this is also using createComponent
36
+ },
37
+ Component: ({children, ...elemProps}: CardProps, ref, Element) => {
38
+ return (
39
+ <Box as={Element} {...elemProps} ref={ref}>
40
+ {children}
41
+ </Box>
42
+ );
43
+ },
44
+ });
45
+ ```
46
+
16
47
  ## Models
17
48
 
18
49
  A model is composed of state and events. The shape of the model used by components looks like this:
@@ -1,4 +1,4 @@
1
- import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
1
+ import { ExampleCodeBlock, SymbolDoc } from '@workday/canvas-kit-docs';
2
2
 
3
3
  import Basic from './examples/Basic';
4
4
  import Alert from './examples/Alert';
@@ -139,7 +139,7 @@ how to use `RadioGroup` with React Hook Form.
139
139
 
140
140
  Radio and its subcomponents support custom styling via the `cs` prop. For more information, check
141
141
  our
142
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
142
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
143
143
 
144
144
  ## Component API
145
145
 
@@ -7,7 +7,7 @@ import {controlComponent} from '../../../../../../utils/storybook';
7
7
 
8
8
  export default () => {
9
9
  return (
10
- <FormField id="select-alert" error="error">
10
+ <FormField id="select-alert" error="alert">
11
11
  <FormField.Label>Label</FormField.Label>
12
12
  <FormField.Field>
13
13
  {controlComponent(<FormField.Input as={Select} name="contact" options={options} />)}
@@ -1,4 +1,4 @@
1
- import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
1
+ import { ExampleCodeBlock, SymbolDoc } from '@workday/canvas-kit-docs';
2
2
 
3
3
  import Basic from './examples/Basic';
4
4
  import Emphasis from './examples/Emphasis';
@@ -75,7 +75,7 @@ The background color dictated by the `variant` will be dark or light based on th
75
75
 
76
76
  Status Indicator and its subcomponents support custom styling via the `cs` prop. For more
77
77
  information, check our
78
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
78
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
79
79
 
80
80
  ## Component API
81
81
 
@@ -0,0 +1,36 @@
1
+ import Basic from './examples/GlobalHeader';
2
+
3
+
4
+ # GlobalHeader Example
5
+
6
+ Developers building internal Workday applications will likely not need to create this component.
7
+ However, if you're building components to be used outside of Workday, this is a helpful reference
8
+ for building a global navigation header that looks like our internal `GlobalHeader`.
9
+
10
+ <ExampleCodeBlock code={Basic} />
11
+
12
+ ## Tooltip usage
13
+
14
+ - The `default` variant Tooltip is used on all of the icon buttons, which will automatically set the
15
+ Tooltip's text to the accessible name. (`aria-label`)
16
+ - The `describe` variant Tooltip is used instead on the "MENU" button because this is a text button.
17
+ The Tooltip's text "Global Navigation" will instead be assigned to the accessible description to
18
+ ensure that the visible button text "MENU" is not overriden.
19
+
20
+ ## Count badge usage
21
+
22
+ When `<CountBadge>` is used as a sibling component for button, the `aria-describedby` property is
23
+ set on the button referencing the `id` value of the `<CountBadge>`. This practice helps support
24
+ users depending on screen readers to describe both the name of the button and the value of the
25
+ `<CountBadge>`.
26
+
27
+ When a web app dynamically updates count badges in real-time, consider the following accessibility
28
+ enhancements to support live, real-time announcements for screen readers:
29
+
30
+ - The `<CountBadge>` component is rendered as a child of the `<AriaLiveRegion>` container.
31
+ - The `<AriaLiveRegion>` container is assigned a name by using `aria-labelledby` to reference the
32
+ name of the icon button `"Notifications"`.
33
+ - The `<AccessibleHide>` component is used following the `<CountBadge>` to render a hidden word
34
+ "new" that only screen reader users can access.
35
+ - When the `<CountBadge>` is updated, then screen readers can automatically describe (in real-time)
36
+ the name of the live region, "Notifications" and the text updated inside of it, "1 new".
@@ -1,4 +1,4 @@
1
- import {ExampleCodeBlock} from '@workday/canvas-kit-docs';
1
+ import { ExampleCodeBlock } from '@workday/canvas-kit-docs';
2
2
 
3
3
  import Template from './examples/compoundComponent/CustomCard';
4
4
 
@@ -11,6 +11,6 @@ Component component utilites are a great way to wrap and extend exisitng Canvas
11
11
  can dramatically simplify state handling and gives you easy access to things like ref forwarding.
12
12
 
13
13
  For more complex examples,
14
- [see the creating-compound-components guide](https://workday.github.io/canvas-kit/?path=/docs/guides-creating-compound-components--page).
14
+ [see the creating-compound-components guide](https://workday.github.io/canvas-kit/?path=/docs/guides-creating-compound-components--docs).
15
15
 
16
16
  <ExampleCodeBlock code={Template} />
@@ -12,6 +12,32 @@ Developers building internal Workday applications will likely not need to create
12
12
  However, if you're building components to be used outside of Workday, this is a helpful reference
13
13
  for building a global navigation header that looks like our internal `GlobalHeader`.
14
14
 
15
+ ## Tooltip usage
16
+
17
+ - The `default` variant Tooltip is used on all of the icon buttons, which will automatically set the
18
+ Tooltip's text to the accessible name. (`aria-label`)
19
+ - The `describe` variant Tooltip is used instead on the "MENU" button because this is a text button.
20
+ The Tooltip's text "Global Navigation" will instead be assigned to the accessible description to
21
+ ensure that the visible button text "MENU" is not overriden.
22
+
23
+ ## Count badge usage
24
+
25
+ When `<CountBadge>` is used as a sibling component for button, the `aria-describedby` property is
26
+ set on the button referencing the `id` value of the `<CountBadge>`. This practice helps support
27
+ users depending on screen readers to describe both the name of the button and the value of the
28
+ `<CountBadge>`.
29
+
30
+ When a web app dynamically updates count badges in real-time, consider the following accessibility
31
+ enhancements to support live, real-time announcements for screen readers:
32
+
33
+ - The `<CountBadge>` component is rendered as a child of the `<AriaLiveRegion>` container.
34
+ - The `<AriaLiveRegion>` container is assigned a name by using `aria-labelledby` to reference the
35
+ name of the icon button `"Notifications"`.
36
+ - The `<AccessibleHide>` component is used following the `<CountBadge>` to render a hidden word
37
+ "new" that only screen reader users can access.
38
+ - When the `<CountBadge>` is updated, then screen readers can automatically describe (in real-time)
39
+ the name of the live region, "Notifications" and the text updated inside of it, "1 new".
40
+
15
41
  <ExampleCodeBlock code={GlobalHeaderBasic} />
16
42
 
17
43
  ## Page Header
@@ -1,65 +1,295 @@
1
1
  import * as React from 'react';
2
- import {styled, createComponent, dubLogoBlue} from '@workday/canvas-kit-react/common';
3
- import {colors, depth, space, type} from '@workday/canvas-kit-react/tokens';
4
-
2
+ import {
3
+ AccessibleHide,
4
+ AriaLiveRegion,
5
+ composeHooks,
6
+ createComponent,
7
+ createElemPropsHook,
8
+ createSubcomponent,
9
+ ExtractProps,
10
+ useUniqueId,
11
+ } from '@workday/canvas-kit-react/common';
12
+ import {base, system} from '@workday/canvas-tokens-web';
13
+ import {calc, createStyles, px2rem} from '@workday/canvas-kit-styling';
5
14
  import {
6
15
  notificationsIcon,
7
16
  inboxIcon,
8
17
  justifyIcon,
9
18
  assistantIcon,
19
+ searchIcon,
10
20
  } from '@workday/canvas-system-icons-web';
11
21
 
12
- import {TertiaryButton, Hyperlink} from '@workday/canvas-kit-react/button';
22
+ import {SecondaryButton, TertiaryButton} from '@workday/canvas-kit-react/button';
13
23
  import {Avatar} from '@workday/canvas-kit-react/avatar';
14
24
  import {Flex, FlexProps} from '@workday/canvas-kit-react/layout';
15
- import {SearchForm} from '@workday/canvas-kit-labs-react/search-form';
25
+ import {LoadReturn} from '@workday/canvas-kit-react/collection';
26
+ import {Tooltip} from '@workday/canvas-kit-react/tooltip';
27
+ import {
28
+ Combobox,
29
+ useComboboxModel,
30
+ useComboboxInput,
31
+ useComboboxLoader,
32
+ } from '@workday/canvas-kit-react/combobox';
33
+ import {InputGroup, TextInput} from '@workday/canvas-kit-react/text-input';
34
+ import {StyledMenuItem} from '@workday/canvas-kit-react/menu';
35
+ import {SystemIcon} from '@workday/canvas-kit-react/icon';
36
+ import {CountBadge} from '@workday/canvas-kit-react/badge';
16
37
 
17
38
  interface HeaderItemProps extends FlexProps {}
39
+ interface LiveCountBadgeProps extends FlexProps {
40
+ cnt: number;
41
+ }
18
42
 
19
- export default () => (
20
- <GlobalHeader>
21
- <GlobalHeader.Item>
22
- <TertiaryButton aria-label="menu" icon={justifyIcon} />
23
- <Hyperlink>
24
- <WorkdayLogo dangerouslySetInnerHTML={{__html: dubLogoBlue}} />
25
- </Hyperlink>
26
- </GlobalHeader.Item>
27
- <GlobalHeader.Item margin="auto" width="100%" maxWidth={`calc(${space.xxxl} * 6)`}>
28
- <SearchForm onSubmit={() => 1} />
29
- </GlobalHeader.Item>
30
- <GlobalHeader.Item>
31
- <TertiaryButton aria-label="messages" icon={assistantIcon} />
32
- <TertiaryButton aria-label="notifications" icon={notificationsIcon} />
33
- <TertiaryButton aria-label="inbox" icon={inboxIcon} />
34
- <Avatar size="medium" variant="light" />
35
- </GlobalHeader.Item>
36
- </GlobalHeader>
43
+ const tasks = ['Request Time Off', 'Create Expense Report', 'Change Benefits'];
44
+
45
+ const styleOverrides = {
46
+ headerWrapper: createStyles({
47
+ display: 'flex',
48
+ alignItems: 'center',
49
+ justifyContent: 'space-between',
50
+ boxSizing: 'border-box',
51
+ ...system.type.subtext.large,
52
+ WebkitFontSmoothing: 'antialiased',
53
+ MozOsxFontSmoothing: 'grayscale',
54
+ backgroundColor: system.color.bg.default,
55
+ padding: system.space.x1,
56
+ }),
57
+ inputGroupInner: createStyles({
58
+ marginLeft: '1rem',
59
+ width: px2rem(20),
60
+ transition: 'opacity 100ms ease',
61
+ }),
62
+ comboboxContainer: createStyles({
63
+ margin: 'auto',
64
+ width: '100%',
65
+ maxWidth: calc.multiply(system.space.x20, 6),
66
+ }),
67
+ comboboxInput: createStyles({
68
+ borderRadius: px2rem(1000),
69
+ width: '20rem',
70
+ }),
71
+ comboboxMenuList: createStyles({
72
+ maxHeight: px2rem(200),
73
+ }),
74
+ menuButtonStyles: createStyles({
75
+ textDecoration: 'none',
76
+ color: base.blackPepper500,
77
+ }),
78
+ notificationContainerStyles: createStyles({
79
+ boxSizing: 'border-box',
80
+ position: 'relative',
81
+ }),
82
+ countBadgeStyles: createStyles({
83
+ boxSizing: 'border-box',
84
+ position: 'absolute',
85
+ top: calc.negate(system.space.x1),
86
+ insetInlineEnd: calc.negate(system.space.x1),
87
+ }),
88
+ actionButtonStyles: createStyles({
89
+ gap: system.space.x4,
90
+ margin: system.space.x4,
91
+ }),
92
+ };
93
+
94
+ const useAutocompleteInput = composeHooks(
95
+ createElemPropsHook(useComboboxModel)(model => {
96
+ return {
97
+ onKeyPress(event: React.KeyboardEvent) {
98
+ model.events.show(event);
99
+ },
100
+ };
101
+ }),
102
+ useComboboxInput
37
103
  );
38
104
 
105
+ const AutoCompleteInput = createSubcomponent(TextInput)({
106
+ modelHook: useComboboxModel,
107
+ elemPropsHook: useAutocompleteInput,
108
+ })<ExtractProps<typeof Combobox.Input, never>>((elemProps, Element) => {
109
+ return <Combobox.Input as={Element} {...elemProps} />;
110
+ });
111
+
112
+ export default () => {
113
+ const [notifications, setNotifications] = React.useState(0);
114
+
115
+ function handleAdd() {
116
+ setNotifications(prev => prev + 1);
117
+ }
118
+
119
+ function handleClear() {
120
+ setNotifications(0);
121
+ }
122
+
123
+ return (
124
+ <>
125
+ <GlobalHeader>
126
+ <GlobalHeader.Item>
127
+ <Tooltip title="Global Navigation" type="describe">
128
+ <TertiaryButton icon={justifyIcon} cs={styleOverrides.menuButtonStyles}>
129
+ MENU
130
+ </TertiaryButton>
131
+ </Tooltip>
132
+ <Tooltip title="Workday Home">
133
+ <TertiaryButton>
134
+ <img src="https://design.workday.com/images/ck-dub-logo-blue.svg" alt="" />
135
+ </TertiaryButton>
136
+ </Tooltip>
137
+ </GlobalHeader.Item>
138
+ <GlobalHeader.Item cs={styleOverrides.comboboxContainer}>
139
+ <Autocomplete aria-label="Search Workday" />
140
+ </GlobalHeader.Item>
141
+ <GlobalHeader.Item>
142
+ <Tooltip title="Assistant">
143
+ <TertiaryButton icon={assistantIcon} />
144
+ </Tooltip>
145
+
146
+ <NotificationLiveBadge cnt={notifications} />
147
+
148
+ <Tooltip title="My Tasks">
149
+ <TertiaryButton icon={inboxIcon} />
150
+ </Tooltip>
151
+ <Tooltip title="Profile">
152
+ <Avatar />
153
+ </Tooltip>
154
+ </GlobalHeader.Item>
155
+ </GlobalHeader>
156
+ <Flex cs={styleOverrides.actionButtonStyles}>
157
+ <SecondaryButton onClick={handleAdd}>Add notification</SecondaryButton>
158
+ <TertiaryButton onClick={handleClear}>Clear</TertiaryButton>
159
+ </Flex>
160
+ </>
161
+ );
162
+ };
163
+
39
164
  const GlobalHeaderItem = createComponent('div')({
40
165
  displayName: 'GlobalHeader.Item',
41
166
  Component: ({gap = 's', ...props}: HeaderItemProps, ref) => (
42
- <Flex gap={gap} alignItems="center" marginX={space.xs} ref={ref} {...props} />
167
+ <Flex gap={gap} alignItems="center" marginX={system.space.x3} ref={ref} {...props} />
43
168
  ),
44
169
  });
45
170
 
46
171
  const GlobalHeader = createComponent('header')({
47
172
  displayName: 'GlobalHeader',
48
- Component: (props, ref, Element) => <HeaderWrapper ref={ref} as={Element} {...props} />,
173
+ Component: (props, ref) => (
174
+ <header className={styleOverrides.headerWrapper} ref={ref} {...props} />
175
+ ),
49
176
  subComponents: {Item: GlobalHeaderItem},
50
177
  });
51
178
 
52
- const HeaderWrapper = styled('header')({
53
- display: 'flex',
54
- alignItems: 'center',
55
- justifyContent: 'space-between',
56
- boxSizing: 'border-box',
57
- ...type.levels.subtext.large,
58
- WebkitFontSmoothing: 'antialiased',
59
- MozOsxFontSmoothing: 'grayscale',
60
- backgroundColor: colors.frenchVanilla100,
61
- ...depth[1],
62
- padding: space.xxs,
179
+ const Autocomplete = createComponent('div')({
180
+ displayName: 'Autocomplete',
181
+ Component: props => {
182
+ const [searchText, setSearchText] = React.useState('');
183
+
184
+ function handleChange(e) {
185
+ setSearchText(e.target.value);
186
+ }
187
+
188
+ const {model, loader} = useComboboxLoader(
189
+ {
190
+ // You can start with any number that makes sense.
191
+ total: 0,
192
+
193
+ // Pick whatever number makes sense for your API
194
+ pageSize: 20,
195
+
196
+ // A load function that will be called by the loader. You must return a promise that returns
197
+ // an object like `{items: [], total: 0}`. The `items` will be merged into the loader's cache
198
+ async load({pageNumber, pageSize, filter}) {
199
+ return new Promise<LoadReturn<string>>(resolve => {
200
+ // simulate a server response by resolving after a period of time
201
+ setTimeout(() => {
202
+ // simulate paging and filtering based on pre-computed items
203
+ const start = (pageNumber - 1) * pageSize;
204
+ const end = start + pageSize;
205
+ const filteredTasks = tasks.filter(i => {
206
+ if (searchText.trim() === '' || typeof searchText !== 'string') {
207
+ return true;
208
+ }
209
+ return i.toLowerCase().includes(searchText.trim().toLowerCase());
210
+ });
211
+
212
+ const total = filteredTasks.length;
213
+ const items = filteredTasks.slice(start, end);
214
+
215
+ resolve({
216
+ items,
217
+ total,
218
+ });
219
+ }, 300);
220
+ });
221
+ },
222
+ onShow() {
223
+ // The `shouldLoad` cancels while the combobox menu is hidden, so let's load when it is
224
+ // visible
225
+ loader.load();
226
+ },
227
+ },
228
+ useComboboxModel
229
+ );
230
+
231
+ return (
232
+ <Combobox model={model}>
233
+ <InputGroup>
234
+ <InputGroup.InnerStart cs={styleOverrides.inputGroupInner}>
235
+ <SystemIcon icon={searchIcon} />
236
+ </InputGroup.InnerStart>
237
+ <InputGroup.Input
238
+ as={AutoCompleteInput}
239
+ cs={styleOverrides.comboboxInput}
240
+ onChange={handleChange}
241
+ value={searchText}
242
+ {...props}
243
+ />
244
+ </InputGroup>
245
+ <Combobox.Menu.Popper>
246
+ <Combobox.Menu.Card>
247
+ {model.state.items.length === 0 ? (
248
+ <StyledMenuItem as="span">No Results Found</StyledMenuItem>
249
+ ) : (
250
+ model.state.items.length > 0 && (
251
+ <Combobox.Menu.List maxHeight={px2rem(200)}>
252
+ {item => <Combobox.Menu.Item>{item}</Combobox.Menu.Item>}
253
+ </Combobox.Menu.List>
254
+ )
255
+ )}
256
+ </Combobox.Menu.Card>
257
+ </Combobox.Menu.Popper>
258
+ </Combobox>
259
+ );
260
+ },
63
261
  });
64
262
 
65
- const WorkdayLogo = styled('span')({lineHeight: 0});
263
+ const NotificationLiveBadge = createComponent('span')({
264
+ displayName: 'NotificationLiveBadge',
265
+ Component: ({cnt = 0, ...props}: LiveCountBadgeProps) => {
266
+ const btnId = useUniqueId();
267
+ const badgeId = useUniqueId();
268
+
269
+ return (
270
+ <Flex cs={styleOverrides.notificationContainerStyles}>
271
+ <Tooltip title="Notifications">
272
+ <TertiaryButton
273
+ id={btnId}
274
+ icon={notificationsIcon}
275
+ aria-describedby={cnt > 0 ? badgeId : undefined}
276
+ {...props}
277
+ />
278
+ </Tooltip>
279
+ <AriaLiveRegion aria-labelledby={btnId}>
280
+ {cnt > 0 && (
281
+ <>
282
+ <CountBadge
283
+ id={badgeId}
284
+ count={cnt}
285
+ limit={100}
286
+ cs={styleOverrides.countBadgeStyles}
287
+ />
288
+ <AccessibleHide>New</AccessibleHide>
289
+ </>
290
+ )}
291
+ </AriaLiveRegion>
292
+ </Flex>
293
+ );
294
+ },
295
+ });
@@ -1,4 +1,4 @@
1
- import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
1
+ import { ExampleCodeBlock, SymbolDoc } from '@workday/canvas-kit-docs';
2
2
 
3
3
  import Basic from './examples/Basic';
4
4
  import CustomLimit from './examples/CustomLimit';
@@ -60,7 +60,7 @@ of another screen update, then this use of `AriaLiveRegion` is unnecessary and n
60
60
  ### Custom Styles
61
61
 
62
62
  Count Badge supports custom styling via the `cs` prop. For more information, check our
63
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
63
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
64
64
 
65
65
  ## Component API
66
66
 
@@ -9,7 +9,7 @@ export interface Breadcrumb {
9
9
  text: string;
10
10
  }
11
11
 
12
- export default () => {
12
+ export default ({width = '100%'}) => {
13
13
  const [items] = React.useState<Breadcrumb[]>([
14
14
  {id: '1', text: 'Home', link: '/'},
15
15
  {id: '2', text: 'Second Link', link: '#'},
@@ -21,11 +21,15 @@ export default () => {
21
21
  ]);
22
22
 
23
23
  const model = useBreadcrumbsModel({items});
24
- const [containerWidth, setContainerWidth] = React.useState('350px');
25
-
24
+ const [containerWidth, setContainerWidth] = React.useState(width);
26
25
  return (
27
26
  <div>
28
27
  <Box width={containerWidth} marginBottom="xl">
28
+ <div style={{display: 'flex', flexDirection: 'column'}}>
29
+ <span>Current Container Width: {containerWidth}</span>
30
+ <span>Overflow visibility: {model.menu.state.visibility}</span>
31
+ </div>
32
+ <hr />
29
33
  <Breadcrumbs model={model} aria-label="Breadcrumbs">
30
34
  <Breadcrumbs.List overflowButton={<Breadcrumbs.OverflowButton aria-label="More links" />}>
31
35
  {item =>
@@ -51,7 +55,12 @@ export default () => {
51
55
  </Box>
52
56
  <hr />
53
57
  <h4>Change Breadcrumbs container size</h4>
54
- <SegmentedControl onSelect={data => setContainerWidth(data.id)}>
58
+ <SegmentedControl
59
+ initialValue={width}
60
+ onSelect={data => {
61
+ setContainerWidth(data.id);
62
+ }}
63
+ >
55
64
  <SegmentedControl.List aria-label="container width control" marginBottom="m">
56
65
  <SegmentedControl.Item data-id="100%">100%</SegmentedControl.Item>
57
66
  <SegmentedControl.Item data-id="480px">480px</SegmentedControl.Item>
@@ -1,8 +1,8 @@
1
1
  import {
2
- ExampleCodeBlock,
3
- Specifications,
4
- SymbolDoc,
5
- SymbolDescription,
2
+ ExampleCodeBlock,
3
+ Specifications,
4
+ SymbolDoc,
5
+ SymbolDescription,
6
6
  } from '@workday/canvas-kit-docs';
7
7
 
8
8
  import Primary from './examples/Primary';
@@ -86,7 +86,7 @@ the width of the button to the width of its container.
86
86
  ### Custom Styles
87
87
 
88
88
  All of our buttons support custom styling via the `cs` prop. For more information, check our
89
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page)
89
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs)
90
90
  or view the example below.
91
91
 
92
92
  <ExampleCodeBlock code={CustomStyles} />
@@ -1,4 +1,4 @@
1
- import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
1
+ import { ExampleCodeBlock, SymbolDoc } from '@workday/canvas-kit-docs';
2
2
  import Basic from './examples/Basic';
3
3
  import WithCustomStyles from './examples/CustomStyles';
4
4
  import WithStencils from './examples/Stencils';
@@ -30,7 +30,7 @@ yarn add @workday/canvas-kit-react
30
30
  ### Custom Styles
31
31
 
32
32
  Card and its subcomponents support custom styling via the `cs` prop. For more information, check our
33
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
33
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
34
34
 
35
35
  <ExampleCodeBlock code={WithCustomStyles} />
36
36
 
@@ -1,8 +1,8 @@
1
1
  import {
2
- ExampleCodeBlock,
3
- SymbolDoc,
4
- Specifications,
5
- InformationHighlight,
2
+ ExampleCodeBlock,
3
+ SymbolDoc,
4
+ Specifications,
5
+ InformationHighlight,
6
6
  } from '@workday/canvas-kit-docs';
7
7
  import Alert from './examples/Alert';
8
8
  import Basic from './examples/Basic';
@@ -104,7 +104,7 @@ or `Checkbox.ErrorType.Error` if Form Field is not being used.
104
104
  ### Custom Styles
105
105
 
106
106
  Checkbox supports custom styling via the `cs` prop. For more information, check our
107
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
107
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
108
108
 
109
109
  ## Component API
110
110
 
@@ -1,4 +1,4 @@
1
- import {ExampleCodeBlock, SymbolDoc, Specifications} from '@workday/canvas-kit-docs';
1
+ import { ExampleCodeBlock, SymbolDoc, Specifications } from '@workday/canvas-kit-docs';
2
2
  import Autocomplete from './examples/Autocomplete';
3
3
 
4
4
  # Combobox
@@ -72,7 +72,7 @@ An Autocomplete is an example of an arbitrary combobox.
72
72
 
73
73
  Combobox and its subcomponents support custom styling via the `cs` prop. For more information, check
74
74
  our
75
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
75
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
76
76
 
77
77
  ## Component API
78
78
 
@@ -1,4 +1,4 @@
1
- import {ExampleCodeBlock, Specifications, SymbolDoc} from '@workday/canvas-kit-docs';
1
+ import { ExampleCodeBlock, Specifications, SymbolDoc } from '@workday/canvas-kit-docs';
2
2
  import Basic from './examples/Basic';
3
3
  import Alert from './examples/Alert';
4
4
  import Error from './examples/Error';
@@ -202,7 +202,7 @@ You can theme your error rings by wrapping an input in a `CanvasProvider` and de
202
202
 
203
203
  Form Field and its subcomponents support custom styling via the `cs` prop. For more information,
204
204
  check our
205
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
205
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
206
206
 
207
207
  ## Component API
208
208
 
@@ -17,7 +17,10 @@ export default () => {
17
17
  <Modal.CloseButton as={DeleteButton}>Delete</Modal.CloseButton>
18
18
  <Modal.CloseButton>Cancel</Modal.CloseButton>
19
19
  </Flex>
20
- <iframe srcDoc="<html><body>Hello, <b>world</b>.<button>iframe button 1</button><button>iframe button 2</button></body></html>" />
20
+ <iframe
21
+ role="iframe"
22
+ srcDoc="<html><body>Hello, <b>world</b>.<button>iframe button 1</button><button data-testid='button2'>iframe button 2</button></body></html>"
23
+ />
21
24
  </Modal.Body>
22
25
  </Modal.Card>
23
26
  </Modal.Overlay>
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import {PopperController} from '../../../../../utils/storybook';
3
2
  import {DeleteButton} from '@workday/canvas-kit-react/button';
4
3
  import {
5
4
  Popup,
@@ -8,14 +7,12 @@ import {
8
7
  useCloseOnOutsideClick,
9
8
  useInitialFocus,
10
9
  useReturnFocus,
11
- Placement,
12
10
  } from '@workday/canvas-kit-react/popup';
13
- import {Box, Flex} from '@workday/canvas-kit-react/layout';
11
+ import {Flex, Grid} from '@workday/canvas-kit-react/layout';
12
+ import {createStyles, calc} from '@workday/canvas-kit-styling';
13
+ import {system} from '@workday/canvas-tokens-web';
14
14
 
15
15
  export default () => {
16
- const [placement, setPlacement] = React.useState<Placement>('top');
17
- const [marginLeftBtn, setMarginLeftBtn] = React.useState(0);
18
- const [marginRightBtn, setMarginRightBtn] = React.useState(0);
19
16
  const model = usePopupModel();
20
17
 
21
18
  useCloseOnOutsideClick(model);
@@ -27,56 +24,108 @@ export default () => {
27
24
  console.log('Delete Item');
28
25
  };
29
26
 
30
- const handlePlacement = (placement: Placement) => {
31
- setPlacement(placement);
32
- };
33
-
34
- const handleMarginLeftBtn = (marginLeftBtn: number) => {
35
- setMarginLeftBtn(marginLeftBtn);
36
- };
27
+ const grid = createStyles({
28
+ gridTemplateAreas: "'topButton topButton''leftButton rightButton''bottomButton bottomButton'",
29
+ height: calc.subtract('100vh', system.space.x16),
30
+ width: calc.subtract('100vw', system.space.x20),
31
+ });
37
32
 
38
- const handleMarginRightBtn = (marginLeftBtn: number) => {
39
- setMarginRightBtn(marginLeftBtn);
40
- };
33
+ const topButton = createStyles({
34
+ gridArea: 'topButton',
35
+ justifySelf: 'center',
36
+ });
37
+ const rightButton = createStyles({
38
+ gridArea: 'rightButton',
39
+ justifySelf: 'right',
40
+ alignSelf: 'center',
41
+ });
42
+ const bottomButton = createStyles({
43
+ gridArea: 'bottomButton',
44
+ justifySelf: 'center',
45
+ alignSelf: 'end',
46
+ });
47
+ const leftButton = createStyles({
48
+ gridArea: 'leftButton',
49
+ justifySelf: 'left',
50
+ alignSelf: 'center',
51
+ });
41
52
 
42
53
  return (
43
- <div style={{height: 1200}} data-testid="scroll-area-fallback-placement">
44
- <PopperController
45
- marginLeftBtn={marginLeftBtn}
46
- marginRightBtn={marginRightBtn}
47
- placement={placement}
48
- onSetPlacement={handlePlacement}
49
- onSetMarginLeftBtn={handleMarginLeftBtn}
50
- onSetMarginRightBtn={handleMarginRightBtn}
51
- >
52
- <Flex width="100%" marginTop={240} justifyContent="center" alignItems="start">
53
- <Popup model={model}>
54
- <Popup.Target
55
- as={DeleteButton}
56
- style={{marginLeft: marginLeftBtn, marginRight: marginRightBtn}}
57
- >
58
- Delete Item
59
- </Popup.Target>
60
- <Popup.Popper placement={placement}>
61
- <Popup.Card width={400}>
62
- <Popup.CloseIcon aria-label="Close" />
63
- <Popup.Heading>Delete Item</Popup.Heading>
64
- <Popup.Body>
65
- <Box as="p" marginY="zero">
66
- Are you sure you'd like to delete the item titled 'My Item'?
67
- </Box>
68
- </Popup.Body>
69
- <Flex gap="s" padding="xxs" marginTop="xxs">
70
- <Popup.CloseButton as={DeleteButton} onClick={handleDelete}>
71
- Delete
72
- </Popup.CloseButton>
73
- <Popup.CloseButton>Cancel</Popup.CloseButton>
74
- </Flex>
75
- </Popup.Card>
76
- </Popup.Popper>
77
- </Popup>
78
- </Flex>
79
- </PopperController>
54
+ <div data-testid="scroll-area-fallback-placement">
55
+ <Grid cs={grid}>
56
+ <Popup>
57
+ <Popup.Target cs={topButton} as={DeleteButton}>
58
+ Placement Top
59
+ </Popup.Target>
60
+ <Popup.Popper placement="top">
61
+ <Popup.Card width={400}>
62
+ <Popup.CloseIcon aria-label="Close" />
63
+ <Popup.Heading paddingTop="m">This is Popup heading</Popup.Heading>
64
+ <Popup.Body>Are you sure you'd like to delete the item titled 'My Item'?</Popup.Body>
65
+ <Flex gap="s" padding="xxs" marginTop="xxs">
66
+ <Popup.CloseButton as={DeleteButton} onClick={handleDelete}>
67
+ Delete
68
+ </Popup.CloseButton>
69
+ <Popup.CloseButton>Cancel</Popup.CloseButton>
70
+ </Flex>
71
+ </Popup.Card>
72
+ </Popup.Popper>
73
+ </Popup>
74
+ <Popup>
75
+ <Popup.Target cs={leftButton} as={DeleteButton}>
76
+ Placement Left
77
+ </Popup.Target>
78
+ <Popup.Popper placement="left">
79
+ <Popup.Card width={400}>
80
+ <Popup.CloseIcon aria-label="Close" />
81
+ <Popup.Heading paddingTop="m">This is Popup heading</Popup.Heading>
82
+ <Popup.Body>Are you sure you'd like to delete the item titled 'My Item'?</Popup.Body>
83
+ <Flex gap="s" padding="xxs" marginTop="xxs">
84
+ <Popup.CloseButton as={DeleteButton} onClick={handleDelete}>
85
+ Delete
86
+ </Popup.CloseButton>
87
+ <Popup.CloseButton>Cancel</Popup.CloseButton>
88
+ </Flex>
89
+ </Popup.Card>
90
+ </Popup.Popper>
91
+ </Popup>
92
+ <Popup>
93
+ <Popup.Target cs={rightButton} as={DeleteButton}>
94
+ Placement Right
95
+ </Popup.Target>
96
+ <Popup.Popper placement="right">
97
+ <Popup.Card width={400}>
98
+ <Popup.CloseIcon aria-label="Close" />
99
+ <Popup.Heading paddingTop="m">This is Popup heading</Popup.Heading>
100
+ <Popup.Body>Are you sure you'd like to delete the item titled 'My Item'?</Popup.Body>
101
+ <Flex gap="s" padding="xxs" marginTop="xxs">
102
+ <Popup.CloseButton as={DeleteButton} onClick={handleDelete}>
103
+ Delete
104
+ </Popup.CloseButton>
105
+ <Popup.CloseButton>Cancel</Popup.CloseButton>
106
+ </Flex>
107
+ </Popup.Card>
108
+ </Popup.Popper>
109
+ </Popup>
110
+ <Popup>
111
+ <Popup.Target cs={bottomButton} as={DeleteButton}>
112
+ Placement Bottom
113
+ </Popup.Target>
114
+ <Popup.Popper placement="bottom">
115
+ <Popup.Card width={400}>
116
+ <Popup.CloseIcon aria-label="Close" />
117
+ <Popup.Heading paddingTop="m">This is Popup heading</Popup.Heading>
118
+ <Popup.Body>Are you sure you'd like to delete the item titled 'My Item'?</Popup.Body>
119
+ <Flex gap="s" padding="xxs" marginTop="xxs">
120
+ <Popup.CloseButton as={DeleteButton} onClick={handleDelete}>
121
+ Delete
122
+ </Popup.CloseButton>
123
+ <Popup.CloseButton>Cancel</Popup.CloseButton>
124
+ </Flex>
125
+ </Popup.Card>
126
+ </Popup.Popper>
127
+ </Popup>
128
+ </Grid>
80
129
  </div>
81
130
  );
82
131
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
- ExampleCodeBlock,
3
- InformationHighlight,
4
- SymbolDoc,
5
- Specifications,
2
+ ExampleCodeBlock,
3
+ InformationHighlight,
4
+ SymbolDoc,
5
+ Specifications,
6
6
  } from '@workday/canvas-kit-docs';
7
7
  import Alert from './examples/Alert';
8
8
  import Basic from './examples/Basic';
@@ -20,7 +20,7 @@ import HoistedModel from './examples/HoistedModel';
20
20
  import RefForwarding from './examples/RefForwarding';
21
21
  import FetchingDynamicItems from './examples/FetchingDynamicItems';
22
22
  import Placeholder from './examples/Placeholder';
23
- import InitialSelectedItem from './examples/InitialSelectedItem';import {Table} from '@workday/canvas-kit-react/table';
23
+ import InitialSelectedItem from './examples/InitialSelectedItem';import { Table } from '@workday/canvas-kit-react/table';
24
24
 
25
25
 
26
26
  # Canvas Kit Select
@@ -305,7 +305,7 @@ prop as well as the `value` DOM property and will update the model accordingly.
305
305
 
306
306
  Select and its subcomponents support custom styling via the `cs` prop. For more information, check
307
307
  our
308
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
308
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
309
309
 
310
310
  ## Component API
311
311
 
@@ -1,8 +1,8 @@
1
1
  import {
2
- ExampleCodeBlock,
3
- SymbolDoc,
4
- Specifications,
5
- InformationHighlight,
2
+ ExampleCodeBlock,
3
+ SymbolDoc,
4
+ Specifications,
5
+ InformationHighlight,
6
6
  } from '@workday/canvas-kit-docs';
7
7
  import Alert from './examples/Alert';
8
8
  import Basic from './examples/Basic';
@@ -73,7 +73,7 @@ The `error` prop may be applied directly to the Switch with a value of `Switch.E
73
73
  ### Custom Styles
74
74
 
75
75
  Switch supports custom styling via the `cs` prop. For more information, check our
76
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
76
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
77
77
 
78
78
  ## Component API
79
79
 
@@ -1,4 +1,4 @@
1
- import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
1
+ import { ExampleCodeBlock, SymbolDoc } from '@workday/canvas-kit-docs';
2
2
  import Basic from './examples/Basic';
3
3
  import BasicWithHeading from './examples/BasicWithHeading';
4
4
  import FixedColumn from './examples/FixedColumn';
@@ -62,7 +62,7 @@ You can also find several advanced Table examples in our Storybook Examples sect
62
62
 
63
63
  Table and its subcomponents support custom styling via the `cs` prop. For more information, check
64
64
  our
65
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
65
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
66
66
 
67
67
  ## Component API
68
68
 
@@ -1,4 +1,4 @@
1
- import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
1
+ import { ExampleCodeBlock, SymbolDoc } from '@workday/canvas-kit-docs';
2
2
  import Basic from './examples/BodyText/Basic';
3
3
 
4
4
  # Canvas Kit Body Text
@@ -29,7 +29,7 @@ You may override the rendered element using the `as` prop.
29
29
  ### Custom Styles
30
30
 
31
31
  Body Text supports custom styling via the `cs` prop. For more information, check our
32
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
32
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
33
33
 
34
34
  ## Component API
35
35
 
@@ -1,4 +1,4 @@
1
- import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';import Basic from './examples/Heading/Basic';
1
+ import { ExampleCodeBlock, SymbolDoc } from '@workday/canvas-kit-docs';import Basic from './examples/Heading/Basic';
2
2
 
3
3
 
4
4
  # Canvas Kit Heading
@@ -29,7 +29,7 @@ according to the [Canvas type hierarchy](/tokens/type/#type-styles).
29
29
  ### Custom Styles
30
30
 
31
31
  Heading supports custom styling via the `cs` prop. For more information, check our
32
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
32
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
33
33
 
34
34
  ## Component API
35
35
 
@@ -1,4 +1,4 @@
1
- import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
1
+ import { ExampleCodeBlock, SymbolDoc } from '@workday/canvas-kit-docs';
2
2
  import Basic from './examples/Subtext/Basic';
3
3
 
4
4
  # Canvas Kit Subtext
@@ -29,7 +29,7 @@ You may override the rendered element using the `as` prop.
29
29
  ### Custom Styles
30
30
 
31
31
  Subtext supports custom styling via the `cs` prop. For more information, check our
32
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
32
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
33
33
 
34
34
  ## Component API
35
35
 
@@ -1,4 +1,4 @@
1
- import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
1
+ import { ExampleCodeBlock, SymbolDoc } from '@workday/canvas-kit-docs';
2
2
  import Basic from './examples/Text/Basic';
3
3
  import TypeLevel from './examples/Text/TypeLevel';
4
4
  import Variant from './examples/Text/Variant';
@@ -44,7 +44,7 @@ understanding of the text being rendered.
44
44
  ### Custom Styles
45
45
 
46
46
  Text supports custom styling via the `cs` prop. For more information, check our
47
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
47
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
48
48
 
49
49
  ## Component API
50
50
 
@@ -1,4 +1,4 @@
1
- import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
1
+ import { ExampleCodeBlock, SymbolDoc } from '@workday/canvas-kit-docs';
2
2
  import Basic from './examples/Title/Basic';
3
3
 
4
4
  # Canvas Kit Title
@@ -29,7 +29,7 @@ You may override the rendered element using the `as` prop.
29
29
  ### Custom Styles
30
30
 
31
31
  Title supports custom styling via the `cs` prop. For more information, check our
32
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--page).
32
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
33
33
 
34
34
  ## Component API
35
35
 
@@ -1,8 +1,8 @@
1
1
  import Readme from '../../../README.md';
2
2
  import Markdown from '../../../utils/storybook/Markdown.tsx';
3
- import {WelcomePage} from './welcomePage';
4
- import {InstallBlock} from './installBlock';
5
- import {version} from '../../../lerna.json';
3
+ import { WelcomePage } from './welcomePage';
4
+ import { InstallBlock } from './installBlock';
5
+ import { version } from '../../../lerna.json';
6
6
 
7
7
 
8
8
  <WelcomePage />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "13.0.0-alpha.948-next.0",
3
+ "version": "13.0.0-alpha.978-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",
@@ -27,7 +27,7 @@
27
27
  "build:docs": "node ./utils/build-docs.js",
28
28
  "build:rebuild": "npm-run-all clean build",
29
29
  "build:specs": "node ./utils/build-specifications.js",
30
- "build": "npm-run-all --parallel build:es6 build:mdx --parallel build:specs build:docs",
30
+ "build": "npm-run-all build:es6 build:mdx build:specs build:docs",
31
31
  "depcheck": "node ../../utils/check-dependencies-exist.js",
32
32
  "typecheck:src": "tsc -p . --noEmit --incremental false"
33
33
  },
@@ -44,10 +44,10 @@
44
44
  "dependencies": {
45
45
  "@emotion/styled": "^11.6.0",
46
46
  "@storybook/csf": "0.0.1",
47
- "@workday/canvas-kit-labs-react": "^13.0.0-alpha.948-next.0",
48
- "@workday/canvas-kit-preview-react": "^13.0.0-alpha.948-next.0",
49
- "@workday/canvas-kit-react": "^13.0.0-alpha.948-next.0",
50
- "@workday/canvas-kit-styling": "^13.0.0-alpha.948-next.0",
47
+ "@workday/canvas-kit-labs-react": "^13.0.0-alpha.978-next.0",
48
+ "@workday/canvas-kit-preview-react": "^13.0.0-alpha.978-next.0",
49
+ "@workday/canvas-kit-react": "^13.0.0-alpha.978-next.0",
50
+ "@workday/canvas-kit-styling": "^13.0.0-alpha.978-next.0",
51
51
  "@workday/canvas-system-icons-web": "^3.0.0",
52
52
  "@workday/canvas-tokens-web": "^2.0.1",
53
53
  "markdown-to-jsx": "^7.2.0",
@@ -60,5 +60,5 @@
60
60
  "mkdirp": "^1.0.3",
61
61
  "typescript": "5.0"
62
62
  },
63
- "gitHead": "cbfbb06dd0be8cd5feca6ee2114cd2b039da66db"
63
+ "gitHead": "e9eabae8567dfb68fc849f0d966c67711bef438b"
64
64
  }