@workday/canvas-kit-docs 7.0.0-alpha.0-next.1 → 7.0.0-alpha.0-next.3

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 (40) hide show
  1. package/dist/mdx/preview-react/form-field/examples/Custom.tsx +1 -1
  2. package/dist/mdx/preview-react/side-panel/examples/AlwaysOpen.tsx +16 -22
  3. package/dist/mdx/preview-react/side-panel/examples/Basic.tsx +8 -13
  4. package/dist/mdx/preview-react/side-panel/examples/ExternalControl.tsx +8 -12
  5. package/dist/mdx/preview-react/side-panel/examples/RightOrigin.tsx +15 -22
  6. package/dist/mdx/preview-react/side-panel/examples/Variant.tsx +8 -13
  7. package/dist/mdx/preview-react/text-area/examples/Alert.tsx +9 -3
  8. package/dist/mdx/preview-react/text-area/examples/Basic.tsx +1 -1
  9. package/dist/mdx/preview-react/text-area/examples/Disabled.tsx +1 -1
  10. package/dist/mdx/preview-react/text-area/examples/Error.tsx +1 -1
  11. package/dist/mdx/preview-react/text-area/examples/Grow.tsx +1 -1
  12. package/dist/mdx/preview-react/text-area/examples/HiddenLabel.tsx +7 -5
  13. package/dist/mdx/preview-react/text-area/examples/LabelPositionHorizontal.tsx +1 -1
  14. package/dist/mdx/preview-react/text-area/examples/LabelPositionVertical.tsx +1 -1
  15. package/dist/mdx/preview-react/text-area/examples/Placeholder.tsx +2 -6
  16. package/dist/mdx/preview-react/text-area/examples/RefForwarding.tsx +3 -3
  17. package/dist/mdx/preview-react/text-area/examples/Required.tsx +1 -1
  18. package/dist/mdx/preview-react/text-area/examples/ResizeConstraints.tsx +1 -1
  19. package/dist/mdx/preview-react/text-input/examples/Alert.tsx +3 -7
  20. package/dist/mdx/preview-react/text-input/examples/Basic.tsx +1 -1
  21. package/dist/mdx/preview-react/text-input/examples/Disabled.tsx +1 -1
  22. package/dist/mdx/preview-react/text-input/examples/Error.tsx +1 -1
  23. package/dist/mdx/preview-react/text-input/examples/Grow.tsx +1 -1
  24. package/dist/mdx/preview-react/text-input/examples/HiddenLabel.tsx +7 -5
  25. package/dist/mdx/preview-react/text-input/examples/LabelPositionHorizontal.tsx +1 -1
  26. package/dist/mdx/preview-react/text-input/examples/LabelPositionVertical.tsx +1 -1
  27. package/dist/mdx/preview-react/text-input/examples/LoginForm.tsx +3 -3
  28. package/dist/mdx/preview-react/text-input/examples/Password.tsx +1 -1
  29. package/dist/mdx/preview-react/text-input/examples/Placeholder.tsx +1 -1
  30. package/dist/mdx/preview-react/text-input/examples/RefForwarding.tsx +3 -3
  31. package/dist/mdx/preview-react/text-input/examples/Required.tsx +1 -1
  32. package/dist/mdx/preview-react/text-input/examples/ThemedAlert.tsx +2 -1
  33. package/dist/mdx/preview-react/text-input/examples/ThemedError.tsx +2 -4
  34. package/dist/mdx/react/banner/examples/Sticky.tsx +6 -9
  35. package/dist/mdx/react/banner/examples/StickyAnimation.tsx +1 -0
  36. package/dist/mdx/react/banner/examples/StickyRTL.tsx +8 -10
  37. package/dist/mdx/react/button/icon-button/examples/Inverse.tsx +9 -12
  38. package/dist/mdx/react/button/icon-button/examples/InverseFilled.tsx +9 -12
  39. package/dist/mdx/react/skeleton/examples/Simulation.tsx +10 -9
  40. package/package.json +3 -3
@@ -45,7 +45,7 @@ export default () => {
45
45
 
46
46
  const model = useFormFieldModel({isRequired: true});
47
47
 
48
- const layoutProps = useFormFieldOrientation('vertical')
48
+ const layoutProps = useFormFieldOrientation('vertical');
49
49
 
50
50
  return (
51
51
  <Stack {...layoutProps}>
@@ -1,38 +1,32 @@
1
- /** @jsx jsx */
2
1
  import * as React from 'react';
3
- import {jsx} from '@emotion/core';
4
2
  import {colors, space, type} from '@workday/canvas-kit-react/tokens';
5
3
  import {AccentIcon} from '@workday/canvas-kit-react/icon';
6
4
  import {rocketIcon} from '@workday/canvas-accent-icons-web';
7
5
  import {SidePanel, useSidePanel} from '@workday/canvas-kit-preview-react/side-panel';
8
- import {Flex} from '@workday/canvas-kit-labs-react/layout';
9
- import {useThemeRTL} from '@workday/canvas-kit-labs-react/common';
6
+ import {Flex, HStack} from '@workday/canvas-kit-labs-react/layout';
7
+ import {styled} from '@workday/canvas-kit-react/common';
8
+
9
+ const StyledHeader = styled('h3')({
10
+ ...type.levels.body.large,
11
+ color: colors.licorice500,
12
+ fontWeight: type.properties.fontWeights.bold,
13
+ });
14
+
15
+ const StyledAccentIcon = styled(AccentIcon)({
16
+ marginRight: space.s,
17
+ });
10
18
 
11
19
  export default () => {
12
20
  const {panelProps, labelProps} = useSidePanel();
13
21
 
14
- const {themeRTL} = useThemeRTL();
15
- const iconStyles = themeRTL({
16
- marginRight: space.s,
17
- });
18
-
19
22
  return (
20
- <Flex height={320}>
23
+ <HStack spacing="s" height={320}>
21
24
  <SidePanel {...panelProps}>
22
25
  <Flex alignItems="center" paddingY="s" paddingX="xs">
23
- <AccentIcon css={iconStyles} icon={rocketIcon} />
24
- <h3
25
- css={{
26
- ...type.levels.body.large,
27
- color: colors.licorice500,
28
- fontWeight: type.properties.fontWeights.bold,
29
- }}
30
- {...labelProps}
31
- >
32
- Tasks Panel
33
- </h3>
26
+ <StyledAccentIcon icon={rocketIcon} />
27
+ <StyledHeader {...labelProps}>Tasks Panel</StyledHeader>
34
28
  </Flex>
35
29
  </SidePanel>
36
- </Flex>
30
+ </HStack>
37
31
  );
38
32
  };
@@ -1,6 +1,4 @@
1
- /** @jsx jsx */
2
1
  import * as React from 'react';
3
- import {jsx} from '@emotion/core';
4
2
  import {colors, type} from '@workday/canvas-kit-react/tokens';
5
3
  import {SecondaryButton} from '@workday/canvas-kit-react/button';
6
4
  import {
@@ -9,12 +7,18 @@ import {
9
7
  SidePanelTransitionStates,
10
8
  } from '@workday/canvas-kit-preview-react/side-panel';
11
9
  import {Flex} from '@workday/canvas-kit-labs-react/layout';
12
- import {CanvasProvider} from '@workday/canvas-kit-react/common';
10
+ import {CanvasProvider, styled} from '@workday/canvas-kit-react/common';
13
11
  import {AccentIcon} from '@workday/canvas-kit-react/icon';
14
12
  import {rocketIcon} from '@workday/canvas-accent-icons-web';
15
13
  // local helper hook for setting content direction;
16
14
  import {useDirection} from './useDirection';
17
15
 
16
+ const StyledHeader = styled('h3')({
17
+ ...type.levels.body.large,
18
+ color: colors.licorice500,
19
+ fontWeight: type.properties.fontWeights.bold,
20
+ });
21
+
18
22
  export default () => {
19
23
  const {direction, toggleDirection} = useDirection();
20
24
  const {expanded, panelProps, labelProps, controlProps} = useSidePanel();
@@ -32,16 +36,7 @@ export default () => {
32
36
  <Flex marginInlineEnd="s">
33
37
  <AccentIcon icon={rocketIcon} />
34
38
  </Flex>
35
- <h3
36
- css={{
37
- ...type.levels.body.large,
38
- color: colors.licorice500,
39
- fontWeight: type.properties.fontWeights.bold,
40
- }}
41
- {...labelProps}
42
- >
43
- Tasks Panel
44
- </h3>
39
+ <StyledHeader {...labelProps}>Tasks Panel</StyledHeader>
45
40
  </Flex>
46
41
  )}
47
42
  </SidePanel>
@@ -1,6 +1,4 @@
1
- /** @jsx jsx */
2
1
  import * as React from 'react';
3
- import {jsx} from '@emotion/core';
4
2
  import {
5
3
  SidePanel,
6
4
  useSidePanel,
@@ -9,6 +7,13 @@ import {
9
7
  import {Flex} from '@workday/canvas-kit-labs-react/layout';
10
8
  import {SecondaryButton} from '@workday/canvas-kit-react/button';
11
9
  import {colors, type} from '@workday/canvas-kit-react/tokens';
10
+ import {styled} from '@workday/canvas-kit-react/common';
11
+
12
+ const StyledHeader = styled('h3')({
13
+ ...type.levels.body.large,
14
+ color: colors.licorice500,
15
+ fontWeight: type.properties.fontWeights.bold,
16
+ });
12
17
 
13
18
  export default () => {
14
19
  const {expanded, panelProps, labelProps, controlProps} = useSidePanel({initialExpanded: false});
@@ -28,16 +33,7 @@ export default () => {
28
33
  >
29
34
  {panelState === 'expanded' && (
30
35
  <Flex alignItems="center" paddingY="s" paddingX="xs">
31
- <h3
32
- css={{
33
- ...type.levels.body.large,
34
- color: colors.licorice500,
35
- fontWeight: type.properties.fontWeights.bold,
36
- }}
37
- {...labelProps}
38
- >
39
- Tasks Panel
40
- </h3>
36
+ <StyledHeader {...labelProps}>Tasks Panel</StyledHeader>
41
37
  </Flex>
42
38
  )}
43
39
  </SidePanel>
@@ -1,6 +1,4 @@
1
- /** @jsx jsx */
2
1
  import * as React from 'react';
3
- import {jsx} from '@emotion/core';
4
2
  import {colors, type} from '@workday/canvas-kit-react/tokens';
5
3
  import {SecondaryButton} from '@workday/canvas-kit-react/button';
6
4
  import {
@@ -8,42 +6,37 @@ import {
8
6
  useSidePanel,
9
7
  SidePanelTransitionStates,
10
8
  } from '@workday/canvas-kit-preview-react/side-panel';
11
- import {useThemeRTL} from '@workday/canvas-kit-labs-react/common';
12
9
  import {Flex} from '@workday/canvas-kit-labs-react/layout';
13
- import {CanvasProvider} from '@workday/canvas-kit-react/common';
10
+ import {CanvasProvider, styled} from '@workday/canvas-kit-react/common';
14
11
  // local helper hook for setting content direction;
15
12
  import {useDirection} from './useDirection';
16
13
 
14
+ const StyledHeader = styled('h3')({
15
+ ...type.levels.body.large,
16
+ color: colors.licorice500,
17
+ fontWeight: type.properties.fontWeights.bold,
18
+ });
19
+
20
+ const StyledSidePanel = styled(SidePanel)({
21
+ position: 'absolute',
22
+ right: 0,
23
+ });
24
+
17
25
  const RightPanel = () => {
18
26
  const {expanded, panelProps, labelProps, controlProps} = useSidePanel();
19
27
  const [panelState, setPanelState] = React.useState<SidePanelTransitionStates>(
20
28
  expanded ? 'expanded' : 'collapsed'
21
29
  );
22
30
 
23
- const {themeRTL} = useThemeRTL();
24
- const panelStyles = themeRTL({
25
- position: 'absolute',
26
- right: 0,
27
- });
28
-
29
31
  return (
30
- <SidePanel {...panelProps} onStateTransition={setPanelState} origin="right" css={panelStyles}>
32
+ <StyledSidePanel {...panelProps} onStateTransition={setPanelState} origin="right">
31
33
  <SidePanel.ToggleButton {...controlProps} />
32
34
  {panelState === 'expanded' && (
33
35
  <Flex alignItems="center" justifyContent="flex-end" paddingY="s" paddingX="xs">
34
- <h3
35
- css={{
36
- ...type.levels.body.large,
37
- color: colors.licorice500,
38
- fontWeight: type.properties.fontWeights.bold,
39
- }}
40
- {...labelProps}
41
- >
42
- Tasks Panel
43
- </h3>
36
+ <StyledHeader {...labelProps}>Tasks Panel</StyledHeader>
44
37
  </Flex>
45
38
  )}
46
- </SidePanel>
39
+ </StyledSidePanel>
47
40
  );
48
41
  };
49
42
 
@@ -1,6 +1,4 @@
1
- /** @jsx jsx */
2
1
  import * as React from 'react';
3
- import {jsx} from '@emotion/core';
4
2
  import {colors, type} from '@workday/canvas-kit-react/tokens';
5
3
  import {SecondaryButton} from '@workday/canvas-kit-react/button';
6
4
  import {
@@ -9,10 +7,16 @@ import {
9
7
  SidePanelTransitionStates,
10
8
  } from '@workday/canvas-kit-preview-react/side-panel';
11
9
  import {Flex} from '@workday/canvas-kit-labs-react/layout';
12
- import {CanvasProvider} from '@workday/canvas-kit-react/common';
10
+ import {CanvasProvider, styled} from '@workday/canvas-kit-react/common';
13
11
  // local helper hook for setting content direction;
14
12
  import {useDirection} from './useDirection';
15
13
 
14
+ const StyledHeader = styled('h3')({
15
+ ...type.levels.body.large,
16
+ color: colors.licorice500,
17
+ fontWeight: type.properties.fontWeights.bold,
18
+ });
19
+
16
20
  export default () => {
17
21
  const {direction, toggleDirection} = useDirection();
18
22
  const {expanded, panelProps, labelProps, controlProps} = useSidePanel();
@@ -27,16 +31,7 @@ export default () => {
27
31
  <SidePanel.ToggleButton {...controlProps} />
28
32
  {panelState === 'expanded' && (
29
33
  <Flex alignItems="center" paddingY="s" paddingX="xs">
30
- <h3
31
- css={{
32
- ...type.levels.body.large,
33
- color: colors.licorice500,
34
- fontWeight: type.properties.fontWeights.bold,
35
- }}
36
- {...labelProps}
37
- >
38
- Alternate Panel
39
- </h3>
34
+ <StyledHeader {...labelProps}>Alternate Panel</StyledHeader>
40
35
  </Flex>
41
36
  )}
42
37
  </SidePanel>
@@ -1,5 +1,6 @@
1
+ /** @jsxRuntime classic */
1
2
  /** @jsx jsx */
2
- import { jsx } from '@emotion/core'
3
+ import {jsx} from '@emotion/core';
3
4
  import React from 'react';
4
5
  import {TextArea} from '@workday/canvas-kit-preview-react/text-area';
5
6
  import {useThemedRing} from '@workday/canvas-kit-labs-react/common';
@@ -16,10 +17,15 @@ export default () => {
16
17
  value.length < 3 ? 'success' : value.length < 7 ? 'alert' : 'error'
17
18
  );
18
19
 
19
- const hintColor = value.length < 3 ? colors.greenApple600 : value.length < 7 ? colors.cantaloupe600 : colors.cinnamon500
20
+ const hintColor =
21
+ value.length < 3
22
+ ? colors.greenApple600
23
+ : value.length < 7
24
+ ? colors.cantaloupe600
25
+ : colors.cinnamon500;
20
26
 
21
27
  return (
22
- <TextArea orientation='vertical'>
28
+ <TextArea orientation="vertical">
23
29
  <TextArea.Label>Add a comment</TextArea.Label>
24
30
  <TextArea.Field css={alertStyles} onChange={handleChange} value={value} />
25
31
  <TextArea.Hint paddingTop={space.xxs}>
@@ -9,7 +9,7 @@ export default () => {
9
9
  };
10
10
 
11
11
  return (
12
- <TextArea orientation='vertical'>
12
+ <TextArea orientation="vertical">
13
13
  <TextArea.Label>Leave a review</TextArea.Label>
14
14
  <TextArea.Field onChange={handleChange} value={value} />
15
15
  </TextArea>
@@ -9,7 +9,7 @@ export default () => {
9
9
  };
10
10
 
11
11
  return (
12
- <TextArea orientation='vertical'>
12
+ <TextArea orientation="vertical">
13
13
  <TextArea.Label>Leave a review</TextArea.Label>
14
14
  <TextArea.Field disabled onChange={handleChange} value={value} />
15
15
  </TextArea>
@@ -31,7 +31,7 @@ export default () => {
31
31
  };
32
32
 
33
33
  return (
34
- <TextArea hasError={hasError} orientation='vertical'>
34
+ <TextArea hasError={hasError} orientation="vertical">
35
35
  <TextArea.Label>A three letter word</TextArea.Label>
36
36
  <TextArea.Field onChange={handleChange} value={value} />
37
37
  <TextArea.Hint paddingTop={space.xxs}>{hint}</TextArea.Hint>
@@ -9,7 +9,7 @@ export default () => {
9
9
  };
10
10
 
11
11
  return (
12
- <TextArea orientation='vertical' alignItems='stretch'>
12
+ <TextArea orientation="vertical" alignItems="stretch">
13
13
  <TextArea.Label>Leave a review</TextArea.Label>
14
14
  <TextArea.Field onChange={handleChange} value={value} />
15
15
  </TextArea>
@@ -1,8 +1,10 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/core'
3
1
  import React from 'react';
4
2
  import {TextArea} from '@workday/canvas-kit-preview-react/text-area';
5
- import { accessibleHide } from '@workday/canvas-kit-react/common';
3
+ import {accessibleHide, styled} from '@workday/canvas-kit-react/common';
4
+
5
+ const StyledTextAreaLabel = styled(TextArea.Label)({
6
+ ...accessibleHide,
7
+ });
6
8
 
7
9
  export default () => {
8
10
  const [value, setValue] = React.useState('');
@@ -12,8 +14,8 @@ export default () => {
12
14
  };
13
15
 
14
16
  return (
15
- <TextArea orientation='vertical' spacing='zero'>
16
- <TextArea.Label css={{...accessibleHide}}>Email</TextArea.Label>
17
+ <TextArea orientation="vertical" spacing="zero">
18
+ <StyledTextAreaLabel>Email</StyledTextAreaLabel>
17
19
  <TextArea.Field onChange={handleChange} value={value} />
18
20
  </TextArea>
19
21
  );
@@ -9,7 +9,7 @@ export default () => {
9
9
  };
10
10
 
11
11
  return (
12
- <TextArea orientation='horizontal'>
12
+ <TextArea orientation="horizontal">
13
13
  <TextArea.Label>Leave a review</TextArea.Label>
14
14
  <TextArea.Field onChange={handleChange} value={value} />
15
15
  </TextArea>
@@ -9,7 +9,7 @@ export default () => {
9
9
  };
10
10
 
11
11
  return (
12
- <TextArea orientation='vertical' spacing='xxxs'>
12
+ <TextArea orientation="vertical" spacing="xxxs">
13
13
  <TextArea.Label>Leave a review</TextArea.Label>
14
14
  <TextArea.Field onChange={handleChange} value={value} />
15
15
  </TextArea>
@@ -9,13 +9,9 @@ export default () => {
9
9
  };
10
10
 
11
11
  return (
12
- <TextArea orientation='vertical'>
12
+ <TextArea orientation="vertical">
13
13
  <TextArea.Label>Leave a review</TextArea.Label>
14
- <TextArea.Field
15
- placeholder="Let us know how we did!"
16
- onChange={handleChange}
17
- value={value}
18
- />
14
+ <TextArea.Field placeholder="Let us know how we did!" onChange={handleChange} value={value} />
19
15
  </TextArea>
20
16
  );
21
17
  };
@@ -13,12 +13,12 @@ export default () => {
13
13
  };
14
14
 
15
15
  const handleClick = () => {
16
- changeFocus(ref.current)
16
+ changeFocus(ref.current);
17
17
  };
18
18
 
19
19
  return (
20
- <VStack spacing='xxxs' alignItems='flex-start'>
21
- <TextArea orientation='vertical'>
20
+ <VStack spacing="xxxs" alignItems="flex-start">
21
+ <TextArea orientation="vertical">
22
22
  <TextArea.Label>Leave a review</TextArea.Label>
23
23
  <TextArea.Field onChange={handleChange} value={value} ref={ref} />
24
24
  </TextArea>
@@ -9,7 +9,7 @@ export default () => {
9
9
  };
10
10
 
11
11
  return (
12
- <TextArea isRequired={true} orientation='vertical'>
12
+ <TextArea isRequired={true} orientation="vertical">
13
13
  <TextArea.Label>Leave a review</TextArea.Label>
14
14
  <TextArea.Field onChange={handleChange} value={value} />
15
15
  </TextArea>
@@ -14,7 +14,7 @@ export default () => {
14
14
  };
15
15
 
16
16
  return (
17
- <TextArea orientation='vertical'>
17
+ <TextArea orientation="vertical">
18
18
  <TextArea.Label>Leave a review</TextArea.Label>
19
19
  <StyledField onChange={handleChange} value={value} />
20
20
  </TextArea>
@@ -1,3 +1,4 @@
1
+ /** @jsxRuntime classic */
1
2
  /** @jsx jsx */
2
3
  import {jsx} from '@emotion/core';
3
4
  import React from 'react';
@@ -17,14 +18,9 @@ export default () => {
17
18
  );
18
19
 
19
20
  return (
20
- <TextInput orientation='vertical'>
21
+ <TextInput orientation="vertical">
21
22
  <TextInput.Label>Password</TextInput.Label>
22
- <TextInput.Field
23
- css={alertStyles}
24
- onChange={handleChange}
25
- value={value}
26
- type="password"
27
- />
23
+ <TextInput.Field css={alertStyles} onChange={handleChange} value={value} type="password" />
28
24
  <TextInput.Hint paddingTop={space.xxs}>
29
25
  <strong>Password Strength: </strong>
30
26
  {value.length < 3 ? (
@@ -9,7 +9,7 @@ export default () => {
9
9
  };
10
10
 
11
11
  return (
12
- <TextInput orientation='vertical'>
12
+ <TextInput orientation="vertical">
13
13
  <TextInput.Label>Email</TextInput.Label>
14
14
  <TextInput.Field onChange={handleChange} value={value} />
15
15
  </TextInput>
@@ -9,7 +9,7 @@ export default () => {
9
9
  };
10
10
 
11
11
  return (
12
- <TextInput orientation='vertical'>
12
+ <TextInput orientation="vertical">
13
13
  <TextInput.Label>Email</TextInput.Label>
14
14
  <TextInput.Field onChange={handleChange} value={value} disabled />
15
15
  </TextInput>
@@ -31,7 +31,7 @@ export default () => {
31
31
  };
32
32
 
33
33
  return (
34
- <TextInput hasError={hasError} orientation='vertical'>
34
+ <TextInput hasError={hasError} orientation="vertical">
35
35
  <TextInput.Label>A three letter word</TextInput.Label>
36
36
  <TextInput.Field onChange={handleChange} value={value} />
37
37
  <TextInput.Hint paddingTop={space.xxs}>{hint}</TextInput.Hint>
@@ -9,7 +9,7 @@ export default () => {
9
9
  };
10
10
 
11
11
  return (
12
- <TextInput orientation='vertical' alignItems='stretch'>
12
+ <TextInput orientation="vertical" alignItems="stretch">
13
13
  <TextInput.Label>Street Address</TextInput.Label>
14
14
  <TextInput.Field onChange={handleChange} value={value} />
15
15
  </TextInput>
@@ -1,8 +1,10 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/core'
3
1
  import React from 'react';
4
2
  import {TextInput} from '@workday/canvas-kit-preview-react/text-input';
5
- import { accessibleHide } from '@workday/canvas-kit-react/common';
3
+ import {accessibleHide, styled} from '@workday/canvas-kit-react/common';
4
+
5
+ const StyledTextAreaLabel = styled(TextInput.Label)({
6
+ ...accessibleHide,
7
+ });
6
8
 
7
9
  export default () => {
8
10
  const [value, setValue] = React.useState('');
@@ -12,8 +14,8 @@ export default () => {
12
14
  };
13
15
 
14
16
  return (
15
- <TextInput orientation='vertical' spacing='zero'>
16
- <TextInput.Label css={{...accessibleHide}}>Email</TextInput.Label>
17
+ <TextInput orientation="vertical" spacing="zero">
18
+ <StyledTextAreaLabel>Email</StyledTextAreaLabel>
17
19
  <TextInput.Field onChange={handleChange} value={value} />
18
20
  </TextInput>
19
21
  );
@@ -9,7 +9,7 @@ export default () => {
9
9
  };
10
10
 
11
11
  return (
12
- <TextInput orientation='horizontal'>
12
+ <TextInput orientation="horizontal">
13
13
  <TextInput.Label>Email</TextInput.Label>
14
14
  <TextInput.Field onChange={handleChange} value={value} />
15
15
  </TextInput>
@@ -9,7 +9,7 @@ export default () => {
9
9
  };
10
10
 
11
11
  return (
12
- <TextInput orientation='vertical' spacing='xxxs'>
12
+ <TextInput orientation="vertical" spacing="xxxs">
13
13
  <TextInput.Label>Email</TextInput.Label>
14
14
  <TextInput.Field onChange={handleChange} value={value} />
15
15
  </TextInput>
@@ -48,9 +48,9 @@ export default () => {
48
48
 
49
49
  return (
50
50
  <form onSubmit={formik.handleSubmit} action=".">
51
- <VStack spacing='xs' alignItems='flex-start'>
51
+ <VStack spacing="xs" alignItems="flex-start">
52
52
  <TextInput
53
- orientation='vertical'
53
+ orientation="vertical"
54
54
  isRequired={true}
55
55
  hasError={formik.touched.email && !!formik.errors.email}
56
56
  >
@@ -66,7 +66,7 @@ export default () => {
66
66
  <TextInput.Hint>{formik.touched.email && formik.errors.email}</TextInput.Hint>
67
67
  </TextInput>
68
68
  <TextInput
69
- orientation='vertical'
69
+ orientation="vertical"
70
70
  id={passwordId}
71
71
  hasError={formik.touched.password && !!formik.errors.password}
72
72
  isRequired={true}
@@ -9,7 +9,7 @@ export default () => {
9
9
  };
10
10
 
11
11
  return (
12
- <TextInput orientation='vertical'>
12
+ <TextInput orientation="vertical">
13
13
  <TextInput.Label>Password</TextInput.Label>
14
14
  <TextInput.Field onChange={handleChange} value={value} type="password" />
15
15
  </TextInput>
@@ -9,7 +9,7 @@ export default () => {
9
9
  };
10
10
 
11
11
  return (
12
- <TextInput orientation='vertical'>
12
+ <TextInput orientation="vertical">
13
13
  <TextInput.Label>Email</TextInput.Label>
14
14
  <TextInput.Field onChange={handleChange} value={value} placeholder="user@email.com" />
15
15
  </TextInput>
@@ -13,12 +13,12 @@ export default () => {
13
13
  };
14
14
 
15
15
  const handleClick = () => {
16
- changeFocus(ref.current)
16
+ changeFocus(ref.current);
17
17
  };
18
18
 
19
19
  return (
20
- <VStack spacing='xxxs' alignItems='flex-start'>
21
- <TextInput orientation='vertical'>
20
+ <VStack spacing="xxxs" alignItems="flex-start">
21
+ <TextInput orientation="vertical">
22
22
  <TextInput.Label>Email</TextInput.Label>
23
23
  <TextInput.Field onChange={handleChange} value={value} ref={ref} />
24
24
  </TextInput>
@@ -9,7 +9,7 @@ export default () => {
9
9
  };
10
10
 
11
11
  return (
12
- <TextInput isRequired={true} orientation='vertical'>
12
+ <TextInput isRequired={true} orientation="vertical">
13
13
  <TextInput.Label>Email</TextInput.Label>
14
14
  <TextInput.Field onChange={handleChange} value={value} />
15
15
  </TextInput>
@@ -1,3 +1,4 @@
1
+ /** @jsxRuntime classic */
1
2
  /** @jsx jsx */
2
3
  import {jsx} from '@emotion/core';
3
4
  import React from 'react';
@@ -37,7 +38,7 @@ const AlertInput = () => {
37
38
  const alertStyles = useThemedRing('alert');
38
39
 
39
40
  return (
40
- <TextInput orientation='vertical'>
41
+ <TextInput orientation="vertical">
41
42
  <TextInput.Label>Email</TextInput.Label>
42
43
  <TextInput.Field css={alertStyles} onChange={handleChange} value={value} />
43
44
  <TextInput.Hint paddingTop={space.xxs}>Please enter a valid email.</TextInput.Hint>
@@ -25,12 +25,10 @@ export default () => {
25
25
 
26
26
  return (
27
27
  <CanvasProvider theme={theme}>
28
- <TextInput hasError={!value} isRequired={true} orientation='vertical'>
28
+ <TextInput hasError={!value} isRequired={true} orientation="vertical">
29
29
  <TextInput.Label>Email</TextInput.Label>
30
30
  <TextInput.Field onChange={handleChange} value={value} />
31
- <TextInput.Hint paddingTop={space.xxs}>
32
- {!value && 'Please enter an email.'}
33
- </TextInput.Hint>
31
+ <TextInput.Hint paddingTop={space.xxs}>{!value && 'Please enter an email.'}</TextInput.Hint>
34
32
  </TextInput>
35
33
  </CanvasProvider>
36
34
  );
@@ -1,24 +1,21 @@
1
- /** @jsx jsx */
2
- import {jsx} from '@emotion/core';
3
1
  import React from 'react';
4
-
5
- import {CSSProperties} from '@workday/canvas-kit-react/tokens';
6
- import {Box, useThemeRTL} from '@workday/canvas-kit-labs-react/common';
2
+ import {Box} from '@workday/canvas-kit-labs-react/common';
7
3
  import {Banner} from '@workday/canvas-kit-react/banner';
4
+ import {styled} from '@workday/canvas-kit-react/common';
8
5
 
9
- const styles: CSSProperties = {
6
+ const StyledBanner = styled(Banner)({
10
7
  position: 'absolute',
11
8
  right: 0,
12
- };
9
+ });
13
10
 
14
11
  export default () => {
15
12
  return (
16
13
  <Box height={64}>
17
- <Banner hasError={true} isSticky={true} css={styles}>
14
+ <StyledBanner hasError={true} isSticky={true}>
18
15
  <Banner.Icon />
19
16
  <Banner.Label>3 Errors</Banner.Label>
20
17
  <Banner.ActionText />
21
- </Banner>
18
+ </StyledBanner>
22
19
  </Box>
23
20
  );
24
21
  };
@@ -1,3 +1,4 @@
1
+ /** @jsxRuntime classic */
1
2
  /** @jsx jsx */
2
3
  import {jsx, keyframes} from '@emotion/core';
3
4
  import React from 'react';
@@ -1,37 +1,35 @@
1
- /** @jsx jsx */
2
- import {jsx} from '@emotion/core';
3
1
  import React from 'react';
4
2
 
5
- import {CSSProperties} from '@workday/canvas-kit-react/tokens';
6
3
  import {Box, useThemeRTL} from '@workday/canvas-kit-labs-react/common';
7
4
  import {
8
5
  CanvasProvider,
9
6
  ContentDirection,
10
7
  PartialEmotionCanvasTheme,
8
+ styled,
11
9
  } from '@workday/canvas-kit-react/common';
12
10
  import {Banner} from '@workday/canvas-kit-react/banner';
13
11
 
14
- const styles: CSSProperties = {
15
- position: 'absolute',
16
- left: 0,
17
- };
18
-
19
12
  const theme: PartialEmotionCanvasTheme = {
20
13
  canvas: {
21
14
  direction: ContentDirection.RTL,
22
15
  },
23
16
  };
24
17
 
18
+ const StyledStickyBanner = styled(Banner)({
19
+ position: 'absolute',
20
+ left: 0,
21
+ });
22
+
25
23
  export default () => {
26
24
  const {themeRTL} = useThemeRTL();
27
25
  return (
28
26
  <CanvasProvider theme={theme}>
29
27
  <Box height={64}>
30
- <Banner isSticky={true} css={styles}>
28
+ <StyledStickyBanner isSticky={true}>
31
29
  <Banner.Icon />
32
30
  <Banner.Label>3 אזהרות</Banner.Label>
33
31
  <Banner.ActionText />
34
- </Banner>
32
+ </StyledStickyBanner>
35
33
  </Box>
36
34
  </CanvasProvider>
37
35
  );
@@ -1,20 +1,17 @@
1
- /** @jsx jsx */
2
- import {jsx} from '@emotion/core';
3
1
  import React from 'react';
4
2
 
5
- import {space, colors, borderRadius} from '@workday/canvas-kit-react/tokens';
3
+ import {colors} from '@workday/canvas-kit-react/tokens';
6
4
  import {IconButton} from '@workday/canvas-kit-react/button';
7
5
  import {activityStreamIcon} from '@workday/canvas-system-icons-web';
8
-
9
- const blueBackground = {
10
- backgroundColor: colors.blueberry400,
11
- borderRadius: borderRadius.m,
12
- padding: space.xxs,
13
- display: 'inline-block',
14
- };
6
+ import {Flex} from '@workday/canvas-kit-labs-react/layout';
15
7
 
16
8
  export default () => (
17
- <div css={blueBackground}>
9
+ <Flex
10
+ display="inline-flex"
11
+ backgroundColor={colors.blackPepper400}
12
+ borderRadius="m"
13
+ padding="xxs"
14
+ >
18
15
  <IconButton icon={activityStreamIcon} aria-label="Activity Stream" variant="inverse" />
19
- </div>
16
+ </Flex>
20
17
  );
@@ -1,20 +1,17 @@
1
- /** @jsx jsx */
2
- import {jsx} from '@emotion/core';
3
1
  import React from 'react';
4
2
 
5
- import {space, colors, borderRadius} from '@workday/canvas-kit-react/tokens';
3
+ import {colors} from '@workday/canvas-kit-react/tokens';
6
4
  import {IconButton} from '@workday/canvas-kit-react/button';
7
5
  import {activityStreamIcon} from '@workday/canvas-system-icons-web';
8
-
9
- const blueBackground = {
10
- backgroundColor: colors.blueberry400,
11
- borderRadius: borderRadius.m,
12
- padding: space.xxs,
13
- display: 'inline-block',
14
- };
6
+ import {Flex} from '@workday/canvas-kit-labs-react/layout';
15
7
 
16
8
  export default () => (
17
- <div css={blueBackground}>
9
+ <Flex
10
+ display="inline-flex"
11
+ backgroundColor={colors.blackPepper400}
12
+ borderRadius="m"
13
+ padding="xxs"
14
+ >
18
15
  <IconButton icon={activityStreamIcon} aria-label="Activity Stream" variant="inverseFilled" />
19
- </div>
16
+ </Flex>
20
17
  );
@@ -1,6 +1,5 @@
1
- /** @jsx jsx */
2
1
  import React from 'react';
3
- import {jsx, keyframes} from '@emotion/core';
2
+ import {keyframes} from '@emotion/core';
4
3
 
5
4
  import {
6
5
  Card,
@@ -9,6 +8,7 @@ import {
9
8
  SecondaryButton,
10
9
  SystemIconCircle,
11
10
  TextInput,
11
+ styled,
12
12
  } from '@workday/canvas-kit-react';
13
13
 
14
14
  import {Box, Flex} from '@workday/canvas-kit-labs-react';
@@ -16,6 +16,7 @@ import {Box, Flex} from '@workday/canvas-kit-labs-react';
16
16
  import {Skeleton} from '@workday/canvas-kit-react/skeleton';
17
17
  import {borderRadius, space, type} from '@workday/canvas-kit-react/tokens';
18
18
  import {patternIcon} from '@workday/canvas-system-icons-web';
19
+ import {StyledType} from '@workday/canvas-kit-react/common';
19
20
 
20
21
  const fadeOut = keyframes`
21
22
  from {
@@ -27,6 +28,10 @@ const fadeOut = keyframes`
27
28
  }
28
29
  `;
29
30
 
31
+ const StyledSimulation = styled(Box)<StyledType>({
32
+ pointerEvents: 'none',
33
+ });
34
+
30
35
  export default () => {
31
36
  const [loading, setLoading] = React.useState(true);
32
37
  const [loadTime, setLoadTime] = React.useState('3000');
@@ -96,16 +101,12 @@ export default () => {
96
101
  </Box>
97
102
  )}
98
103
 
99
- <Box
104
+ <StyledSimulation
100
105
  position="absolute"
101
106
  top={0}
102
107
  left={0}
103
108
  width="100%"
104
- css={{
105
- pointerEvents: 'none',
106
- animation: !loading ? `${fadeOut} 150ms ease-out` : undefined,
107
- animationFillMode: !loading ? 'forwards' : undefined,
108
- }}
109
+ animation={!loading ? `${fadeOut} 150ms ease-out forwards` : undefined}
109
110
  >
110
111
  <Skeleton>
111
112
  <Flex alignItems="center">
@@ -120,7 +121,7 @@ export default () => {
120
121
  </Flex>
121
122
  <Skeleton.Text lineCount={3} />
122
123
  </Skeleton>
123
- </Box>
124
+ </StyledSimulation>
124
125
  </Box>
125
126
  </Card.Body>
126
127
  </Card>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "7.0.0-alpha.0-next.1+57471fa0",
3
+ "version": "7.0.0-alpha.0-next.3+14a81c7e",
4
4
  "description": "Documentation components of Canvas Kit components",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -50,7 +50,7 @@
50
50
  ],
51
51
  "dependencies": {
52
52
  "@storybook/csf": "0.0.1",
53
- "@workday/canvas-kit-react": "^7.0.0-alpha.0-next.1+57471fa0"
53
+ "@workday/canvas-kit-react": "^7.0.0-alpha.0-next.3+14a81c7e"
54
54
  },
55
55
  "devDependencies": {
56
56
  "fs-extra": "^10.0.0",
@@ -58,5 +58,5 @@
58
58
  "mkdirp": "^1.0.3",
59
59
  "typescript": "^3.8.3"
60
60
  },
61
- "gitHead": "57471fa0c73534126f9ef9a18203d49c5834d21e"
61
+ "gitHead": "14a81c7ef3deb9efaf67fa3ec9cc2d2a3161b00b"
62
62
  }