@workday/canvas-kit-docs 11.0.0-alpha.790-next.0 → 11.0.0-alpha.793-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 (46) hide show
  1. package/dist/es6/lib/docs.js +52 -3
  2. package/dist/mdx/preview-react/_examples/examples/TextInputWithReactHookForm.tsx +9 -5
  3. package/dist/mdx/preview-react/form-field/examples/AllFields.tsx +10 -8
  4. package/dist/mdx/preview-react/form-field/examples/RefForwarding.tsx +9 -1
  5. package/dist/mdx/preview-react/form-field/examples/ThemedErrors.tsx +9 -1
  6. package/dist/mdx/preview-react/radio/examples/Basic.tsx +6 -1
  7. package/dist/mdx/preview-react/radio/examples/Custom.tsx +21 -4
  8. package/dist/mdx/preview-react/radio/examples/Inverse.tsx +16 -10
  9. package/dist/mdx/preview-react/status-indicator/examples/Emphasis.tsx +7 -1
  10. package/dist/mdx/preview-react/status-indicator/examples/Icon.tsx +7 -1
  11. package/dist/mdx/preview-react/status-indicator/examples/Overflow.tsx +7 -1
  12. package/dist/mdx/preview-react/status-indicator/examples/Variants.tsx +15 -3
  13. package/dist/mdx/react/button/button/examples/Delete.tsx +8 -1
  14. package/dist/mdx/react/button/button/examples/ExternalHyperlinkInverse.tsx +8 -1
  15. package/dist/mdx/react/button/button/examples/HyperlinkInverse.tsx +8 -1
  16. package/dist/mdx/react/button/button/examples/Primary.tsx +8 -1
  17. package/dist/mdx/react/button/button/examples/PrimaryInverse.tsx +9 -1
  18. package/dist/mdx/react/button/button/examples/Secondary.tsx +8 -1
  19. package/dist/mdx/react/button/button/examples/SecondaryInverse.tsx +9 -1
  20. package/dist/mdx/react/button/button/examples/Tertiary.tsx +8 -1
  21. package/dist/mdx/react/button/button/examples/TertiaryInverse.tsx +9 -2
  22. package/dist/mdx/react/checkbox/examples/Indeterminate.tsx +8 -1
  23. package/dist/mdx/react/checkbox/examples/Inverse.tsx +9 -1
  24. package/dist/mdx/react/combobox/examples/Autocomplete.tsx +20 -4
  25. package/dist/mdx/react/icon/examples/AccentIconList.tsx +23 -10
  26. package/dist/mdx/react/icon/examples/AppletIconList.tsx +23 -10
  27. package/dist/mdx/react/icon/examples/IconList.tsx +24 -10
  28. package/dist/mdx/react/icon/examples/Overview.tsx +15 -2
  29. package/dist/mdx/react/loading-dots/examples/Accessible.tsx +12 -7
  30. package/dist/mdx/react/select/examples/Alert.tsx +6 -1
  31. package/dist/mdx/react/select/examples/Basic.tsx +6 -1
  32. package/dist/mdx/react/select/examples/Complex.tsx +6 -1
  33. package/dist/mdx/react/select/examples/Disabled.tsx +6 -1
  34. package/dist/mdx/react/select/examples/DisabledOption.tsx +6 -1
  35. package/dist/mdx/react/select/examples/Error.tsx +6 -1
  36. package/dist/mdx/react/select/examples/FetchingDynamicItems.tsx +7 -1
  37. package/dist/mdx/react/select/examples/InitialSelectedItem.tsx +6 -1
  38. package/dist/mdx/react/select/examples/MenuHeight.tsx +6 -1
  39. package/dist/mdx/react/select/examples/Placeholder.tsx +6 -1
  40. package/dist/mdx/react/select/examples/Required.tsx +6 -1
  41. package/dist/mdx/react/select/examples/WithIcons.tsx +12 -2
  42. package/dist/mdx/react/table/examples/Basic.tsx +8 -2
  43. package/dist/mdx/react/table/examples/BasicWithHeading.tsx +14 -3
  44. package/dist/mdx/react/table/examples/FixedColumn.tsx +21 -17
  45. package/dist/mdx/react/table/examples/RightToLeft.tsx +8 -2
  46. package/package.json +6 -6
@@ -37072,7 +37072,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
37072
37072
  "type": {
37073
37073
  "kind": "enhancedComponent",
37074
37074
  "componentType": "regular",
37075
- "displayName": "NewCountBadge",
37075
+ "displayName": "CountBadge",
37076
37076
  "props": [
37077
37077
  {
37078
37078
  "kind": "property",
@@ -100994,8 +100994,45 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
100994
100994
  "name": "aria-haspopup",
100995
100995
  "required": true,
100996
100996
  "type": {
100997
- "kind": "boolean",
100998
- "value": true
100997
+ "kind": "union",
100998
+ "value": [
100999
+ {
101000
+ "kind": "primitive",
101001
+ "value": "boolean"
101002
+ },
101003
+ {
101004
+ "kind": "string",
101005
+ "value": "listbox"
101006
+ },
101007
+ {
101008
+ "kind": "string",
101009
+ "value": "grid"
101010
+ },
101011
+ {
101012
+ "kind": "string",
101013
+ "value": "menu"
101014
+ },
101015
+ {
101016
+ "kind": "string",
101017
+ "value": "false"
101018
+ },
101019
+ {
101020
+ "kind": "string",
101021
+ "value": "true"
101022
+ },
101023
+ {
101024
+ "kind": "string",
101025
+ "value": "dialog"
101026
+ },
101027
+ {
101028
+ "kind": "string",
101029
+ "value": "tree"
101030
+ },
101031
+ {
101032
+ "kind": "primitive",
101033
+ "value": "undefined"
101034
+ }
101035
+ ]
100999
101036
  },
101000
101037
  "description": "",
101001
101038
  "tags": {},
@@ -195325,6 +195362,18 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
195325
195362
  "description": "",
195326
195363
  "tags": {},
195327
195364
  "declarations": []
195365
+ },
195366
+ {
195367
+ "kind": "property",
195368
+ "name": "aria-haspopup",
195369
+ "required": true,
195370
+ "type": {
195371
+ "kind": "string",
195372
+ "value": "menu"
195373
+ },
195374
+ "description": "",
195375
+ "tags": {},
195376
+ "declarations": []
195328
195377
  }
195329
195378
  ]
195330
195379
  }
@@ -59,7 +59,11 @@ const validationSchema: SchemaOf<LoginSchema> = object({
59
59
  role: string().required(roleRequired),
60
60
  });
61
61
 
62
- const options = ['Developer', 'Designer', 'Product Manager'];
62
+ const options = [
63
+ {id: '1', label: 'Developer'},
64
+ {id: '2', label: 'Designer'},
65
+ {id: '3', label: 'Product Manager'},
66
+ ];
63
67
 
64
68
  export default () => {
65
69
  const {
@@ -70,7 +74,7 @@ export default () => {
70
74
  defaultValues: {
71
75
  email: 'example@baz.com',
72
76
  password: 'foobarbaz',
73
- role: 'Designer',
77
+ role: '',
74
78
  },
75
79
  resolver: useYupValidationResolver(validationSchema),
76
80
  mode: 'onTouched',
@@ -93,21 +97,21 @@ export default () => {
93
97
  passwordRef.current = ref;
94
98
  };
95
99
  return (
96
- <form onSubmit={onSubmit} action=".">
100
+ <form onSubmit={onSubmit} action="." noValidate={true}>
97
101
  <Flex gap="xs" flexDirection="column" alignItems="flex-start">
98
102
  <FormField
99
103
  orientation="vertical"
100
104
  isRequired={true}
101
105
  error={!!errors.role ? 'error' : undefined}
102
106
  >
103
- <Select items={options}>
107
+ <Select items={options} getTextValue={item => item.label}>
104
108
  <FormField.Label>What is your role?</FormField.Label>
105
109
  <FormField.Input as={Select.Input} {...register('role')} width="280px" />
106
110
  <Select.Popper>
107
111
  <Select.Card>
108
112
  <Select.List maxHeight={200}>
109
113
  {item => {
110
- return <Select.Item>{item}</Select.Item>;
114
+ return <Select.Item>{item.label}</Select.Item>;
111
115
  }}
112
116
  </Select.List>
113
117
  </Select.Card>
@@ -7,17 +7,19 @@ import {Checkbox} from '@workday/canvas-kit-react/checkbox';
7
7
  import {Select} from '@workday/canvas-kit-react/select';
8
8
  import {TextArea} from '@workday/canvas-kit-react/text-area';
9
9
  import {Switch} from '@workday/canvas-kit-react/switch';
10
+ import {calc, createStyles} from '@workday/canvas-kit-styling';
11
+ import {system} from '@workday/canvas-tokens-web';
12
+
13
+ const parentContainerStyles = createStyles({
14
+ flexDirection: 'column',
15
+ gap: calc.subtract(system.space.x6, system.space.x1),
16
+ padding: calc.subtract(system.space.x10, system.space.x1),
17
+ borderRadius: system.space.x1,
18
+ });
10
19
 
11
20
  export default () => {
12
21
  return (
13
- <Flex
14
- cs={{
15
- flexDirection: 'column',
16
- gap: '20px',
17
- padding: '36px',
18
- borderRadius: '4px',
19
- }}
20
- >
22
+ <Flex cs={parentContainerStyles}>
21
23
  <FormField grow>
22
24
  <FormField.Label>First Name</FormField.Label>
23
25
  <FormField.Input as={TextInput} />
@@ -4,6 +4,14 @@ import {Flex} from '@workday/canvas-kit-react/layout';
4
4
  import {SecondaryButton} from '@workday/canvas-kit-react/button';
5
5
  import {TextInput} from '@workday/canvas-kit-react/text-input';
6
6
  import {FormField} from '@workday/canvas-kit-preview-react/form-field';
7
+ import {createStyles} from '@workday/canvas-kit-styling';
8
+ import {system} from '@workday/canvas-tokens-web';
9
+
10
+ const parentContainerStyles = createStyles({
11
+ gap: system.space.x1,
12
+ alignItems: 'flex-start',
13
+ flexDirection: 'column',
14
+ });
7
15
 
8
16
  export default () => {
9
17
  const [value, setValue] = React.useState('');
@@ -18,7 +26,7 @@ export default () => {
18
26
  };
19
27
 
20
28
  return (
21
- <Flex gap="xxxs" alignItems="flex-start" flexDirection="column">
29
+ <Flex cs={parentContainerStyles}>
22
30
  <FormField>
23
31
  <FormField.Label>Email</FormField.Label>
24
32
  <FormField.Input as={TextInput} onChange={handleChange} value={value} ref={ref} />
@@ -3,6 +3,12 @@ import {TextInput} from '@workday/canvas-kit-react/text-input';
3
3
  import {FormField} from '@workday/canvas-kit-preview-react/form-field';
4
4
  import {CanvasProvider, PartialEmotionCanvasTheme} from '@workday/canvas-kit-react/common';
5
5
  import {colors, space} from '@workday/canvas-kit-react/tokens';
6
+ import {createStyles} from '@workday/canvas-kit-styling';
7
+ import {system} from '@workday/canvas-tokens-web';
8
+
9
+ const formFieldHintStyles = createStyles({
10
+ paddingTop: system.space.x2,
11
+ });
6
12
 
7
13
  export default () => {
8
14
  const [value, setValue] = React.useState('');
@@ -29,7 +35,9 @@ export default () => {
29
35
  <FormField error={!value ? 'error' : undefined} isRequired={true} orientation="vertical">
30
36
  <FormField.Label>Email</FormField.Label>
31
37
  <FormField.Input as={TextInput} onChange={handleChange} value={value} />
32
- <FormField.Hint paddingTop={space.xxs}>{!value && 'Please enter an email.'}</FormField.Hint>
38
+ <FormField.Hint cs={formFieldHintStyles}>
39
+ {!value && 'Please enter an email.'}
40
+ </FormField.Hint>
33
41
  </FormField>
34
42
  </CanvasProvider>
35
43
  );
@@ -2,6 +2,11 @@ import React from 'react';
2
2
  import {FormField} from '@workday/canvas-kit-preview-react/form-field';
3
3
  import {RadioGroup} from '@workday/canvas-kit-preview-react/radio';
4
4
  import {Flex} from '@workday/canvas-kit-react/layout';
5
+ import {createStyles, px2rem} from '@workday/canvas-kit-styling';
6
+
7
+ const formfieldInputStyles = createStyles({
8
+ width: px2rem(200),
9
+ });
5
10
 
6
11
  export default () => {
7
12
  const [value, setValue] = React.useState<string | number>('deep-dish');
@@ -18,10 +23,10 @@ export default () => {
18
23
  <FormField as="fieldset">
19
24
  <FormField.Label as="legend">Choose Your Pizza Crust</FormField.Label>
20
25
  <FormField.Input
26
+ cs={formfieldInputStyles}
21
27
  as={RadioGroup}
22
28
  name="pizza-crust"
23
29
  onChange={handleChange}
24
- width="200px"
25
30
  value={value}
26
31
  >
27
32
  <RadioGroup.RadioButton value="deep-dish">Deep dish</RadioGroup.RadioButton>
@@ -2,6 +2,17 @@ import React from 'react';
2
2
  import {FormField} from '@workday/canvas-kit-preview-react/form-field';
3
3
  import {RadioGroup} from '@workday/canvas-kit-preview-react/radio';
4
4
  import {Flex} from '@workday/canvas-kit-react/layout';
5
+ import {createStyles, px2rem} from '@workday/canvas-kit-styling';
6
+ import {base} from '@workday/canvas-tokens-web';
7
+
8
+ const styleOverrides = {
9
+ formfieldInputStyles: createStyles({
10
+ width: px2rem(200),
11
+ }),
12
+ radioGroupLabelTextStyles: createStyles({
13
+ color: base.berrySmoothie400,
14
+ }),
15
+ };
5
16
 
6
17
  export default () => {
7
18
  const [value, setValue] = React.useState<string | number>('deep-dish');
@@ -21,20 +32,26 @@ export default () => {
21
32
  as={RadioGroup}
22
33
  name="pizza-crust-custom"
23
34
  onChange={handleChange}
24
- width="200px"
35
+ cs={styleOverrides.formfieldInputStyles}
25
36
  value={value}
26
37
  >
27
38
  <RadioGroup.Label>
28
39
  <RadioGroup.Label.Input value="deep-dish" />
29
- <RadioGroup.Label.Text color="berrySmoothie400">Deep dish</RadioGroup.Label.Text>
40
+ <RadioGroup.Label.Text cs={styleOverrides.radioGroupLabelTextStyles}>
41
+ Deep dish
42
+ </RadioGroup.Label.Text>
30
43
  </RadioGroup.Label>
31
44
  <RadioGroup.Label>
32
45
  <RadioGroup.Label.Input value="gluten-free" />
33
- <RadioGroup.Label.Text color="berrySmoothie400">Gluten free</RadioGroup.Label.Text>
46
+ <RadioGroup.Label.Text cs={styleOverrides.radioGroupLabelTextStyles}>
47
+ Gluten free
48
+ </RadioGroup.Label.Text>
34
49
  </RadioGroup.Label>
35
50
  <RadioGroup.Label>
36
51
  <RadioGroup.Label.Input value="cauliflower" />
37
- <RadioGroup.Label.Text color="berrySmoothie400">Cauliflower</RadioGroup.Label.Text>
52
+ <RadioGroup.Label.Text cs={styleOverrides.radioGroupLabelTextStyles}>
53
+ Cauliflower
54
+ </RadioGroup.Label.Text>
38
55
  </RadioGroup.Label>
39
56
  </FormField.Input>
40
57
  </FormField>
@@ -2,14 +2,20 @@ import React from 'react';
2
2
  import {Box} from '@workday/canvas-kit-react/layout';
3
3
  import {RadioGroup} from '@workday/canvas-kit-preview-react/radio';
4
4
  import {FormField} from '@workday/canvas-kit-preview-react/form-field';
5
- import {styled, StyledType} from '@workday/canvas-kit-react/common';
6
- import {colors} from '@workday/canvas-kit-react/tokens';
5
+ import {createStyles} from '@workday/canvas-kit-styling';
6
+ import {system} from '@workday/canvas-tokens-web';
7
7
 
8
- const StyledFormField = styled(FormField)<StyledType>({
9
- legend: {
10
- color: colors.frenchVanilla100,
11
- },
12
- });
8
+ const styleOverrides = {
9
+ containerStyles: createStyles({
10
+ backgroundColor: system.color.bg.primary.default,
11
+ padding: system.space.x4,
12
+ }),
13
+ formFieldStyles: createStyles({
14
+ legend: {
15
+ color: system.color.text.inverse,
16
+ },
17
+ }),
18
+ };
13
19
 
14
20
  export default () => {
15
21
  const [value, setValue] = React.useState<string | number>('deep-dish');
@@ -22,8 +28,8 @@ export default () => {
22
28
  };
23
29
 
24
30
  return (
25
- <Box backgroundColor="blueberry400" padding="s">
26
- <StyledFormField as="fieldset">
31
+ <Box cs={styleOverrides.containerStyles}>
32
+ <FormField cs={styleOverrides.formFieldStyles} as="fieldset">
27
33
  <FormField.Label as="legend">Choose Your Pizza Crust</FormField.Label>
28
34
  <FormField.Input as={RadioGroup} name="crust-inverse" onChange={handleChange} value={value}>
29
35
  <RadioGroup.RadioButton variant="inverse" value="deep-dish">
@@ -39,7 +45,7 @@ export default () => {
39
45
  Cauliflower
40
46
  </RadioGroup.RadioButton>
41
47
  </FormField.Input>
42
- </StyledFormField>
48
+ </FormField>
43
49
  </Box>
44
50
  );
45
51
  };
@@ -3,10 +3,16 @@ import React from 'react';
3
3
  import {StatusIndicator} from '@workday/canvas-kit-preview-react/status-indicator';
4
4
  import {uploadCloudIcon} from '@workday/canvas-system-icons-web';
5
5
  import {Flex} from '@workday/canvas-kit-react/layout';
6
+ import {createStyles} from '@workday/canvas-kit-styling';
7
+ import {system} from '@workday/canvas-tokens-web';
8
+
9
+ const parentContainerStyles = createStyles({
10
+ gap: system.space.x4,
11
+ });
6
12
 
7
13
  export default () => {
8
14
  return (
9
- <Flex gap="s">
15
+ <Flex cs={parentContainerStyles}>
10
16
  <StatusIndicator emphasis="high">
11
17
  <StatusIndicator.Icon icon={uploadCloudIcon} />
12
18
  <StatusIndicator.Label>High Emphasis</StatusIndicator.Label>
@@ -3,10 +3,16 @@ import React from 'react';
3
3
  import {StatusIndicator} from '@workday/canvas-kit-preview-react/status-indicator';
4
4
  import {uploadCloudIcon} from '@workday/canvas-system-icons-web';
5
5
  import {Flex} from '@workday/canvas-kit-react/layout';
6
+ import {createStyles} from '@workday/canvas-kit-styling';
7
+ import {system} from '@workday/canvas-tokens-web';
8
+
9
+ const parentContainerStyles = createStyles({
10
+ gap: system.space.x4,
11
+ });
6
12
 
7
13
  export default () => {
8
14
  return (
9
- <Flex gap="s">
15
+ <Flex cs={parentContainerStyles}>
10
16
  <StatusIndicator>
11
17
  <StatusIndicator.Icon aria-label="unpublished" icon={uploadCloudIcon} />
12
18
  <StatusIndicator.Label>Unpublished</StatusIndicator.Label>
@@ -3,11 +3,17 @@ import React from 'react';
3
3
  import {StatusIndicator} from '@workday/canvas-kit-preview-react/status-indicator';
4
4
  import {uploadCloudIcon} from '@workday/canvas-system-icons-web';
5
5
  import {OverflowTooltip} from '@workday/canvas-kit-react/tooltip';
6
+ import {calc, createStyles} from '@workday/canvas-kit-styling';
7
+ import {system} from '@workday/canvas-tokens-web';
8
+
9
+ const statusIndicatorStyles = createStyles({
10
+ maxWidth: calc.add(system.space.x20, system.space.x4),
11
+ });
6
12
 
7
13
  export default () => {
8
14
  return (
9
15
  <OverflowTooltip>
10
- <StatusIndicator tabIndex={0} style={{maxWidth: '6rem'}}>
16
+ <StatusIndicator tabIndex={0} cs={statusIndicatorStyles}>
11
17
  <StatusIndicator.Icon icon={uploadCloudIcon} />
12
18
  <StatusIndicator.Label>
13
19
  Your workbook is currently in process of saving
@@ -3,11 +3,23 @@ import React from 'react';
3
3
  import {StatusIndicator} from '@workday/canvas-kit-preview-react/status-indicator';
4
4
  import {uploadCloudIcon} from '@workday/canvas-system-icons-web';
5
5
  import {Flex} from '@workday/canvas-kit-react/layout';
6
+ import {createStyles} from '@workday/canvas-kit-styling';
7
+ import {system} from '@workday/canvas-tokens-web';
8
+
9
+ const styleOverrides = {
10
+ parentContainerStyles: createStyles({
11
+ gap: system.space.x4,
12
+ flexDirection: 'column',
13
+ }),
14
+ innerContainerStyles: createStyles({
15
+ gap: system.space.x4,
16
+ }),
17
+ };
6
18
 
7
19
  export default () => {
8
20
  return (
9
- <Flex gap="s" flexDirection="column">
10
- <Flex gap="s">
21
+ <Flex cs={styleOverrides.parentContainerStyles}>
22
+ <Flex cs={styleOverrides.innerContainerStyles}>
11
23
  <StatusIndicator>
12
24
  <StatusIndicator.Label>Lorem ipsum dolor</StatusIndicator.Label>
13
25
  <StatusIndicator.Icon icon={uploadCloudIcon} />
@@ -33,7 +45,7 @@ export default () => {
33
45
  <StatusIndicator.Icon icon={uploadCloudIcon} />
34
46
  </StatusIndicator>
35
47
  </Flex>
36
- <Flex gap="s">
48
+ <Flex cs={styleOverrides.innerContainerStyles}>
37
49
  <StatusIndicator emphasis="high">
38
50
  <StatusIndicator.Label>Lorem ipsum dolor</StatusIndicator.Label>
39
51
  <StatusIndicator.Icon icon={uploadCloudIcon} />
@@ -3,9 +3,16 @@ import React from 'react';
3
3
  import {DeleteButton} from '@workday/canvas-kit-react/button';
4
4
  import {Flex} from '@workday/canvas-kit-react/layout';
5
5
  import {trashIcon} from '@workday/canvas-system-icons-web';
6
+ import {createStyles} from '@workday/canvas-kit-styling';
7
+ import {system} from '@workday/canvas-tokens-web';
8
+
9
+ const parentContainerStyles = createStyles({
10
+ gap: system.space.x4,
11
+ padding: system.space.x4,
12
+ });
6
13
 
7
14
  export default () => (
8
- <Flex gap="s" padding="s">
15
+ <Flex cs={parentContainerStyles}>
9
16
  <DeleteButton>Delete</DeleteButton>
10
17
  <DeleteButton icon={trashIcon} iconPosition="start">
11
18
  Delete
@@ -2,9 +2,16 @@ import React from 'react';
2
2
 
3
3
  import {ExternalHyperlink} from '@workday/canvas-kit-react/button';
4
4
  import {Box} from '@workday/canvas-kit-react/layout';
5
+ import {createStyles} from '@workday/canvas-kit-styling';
6
+ import {system} from '@workday/canvas-tokens-web';
7
+
8
+ const parentContainerStyles = createStyles({
9
+ backgroundColor: system.color.bg.primary.default,
10
+ padding: system.space.x4,
11
+ });
5
12
 
6
13
  export default () => (
7
- <Box backgroundColor="blueberry400" padding="s">
14
+ <Box cs={parentContainerStyles}>
8
15
  <ExternalHyperlink href="https://workday.com" variant="inverse">
9
16
  Hyperlink
10
17
  </ExternalHyperlink>
@@ -2,9 +2,16 @@ import React from 'react';
2
2
 
3
3
  import {Hyperlink} from '@workday/canvas-kit-react/button';
4
4
  import {Box} from '@workday/canvas-kit-react/layout';
5
+ import {createStyles} from '@workday/canvas-kit-styling';
6
+ import {system} from '@workday/canvas-tokens-web';
7
+
8
+ const parentContainerStyles = createStyles({
9
+ backgroundColor: system.color.bg.primary.default,
10
+ padding: system.space.x4,
11
+ });
5
12
 
6
13
  export default () => (
7
- <Box backgroundColor="blueberry400" padding="s">
14
+ <Box cs={parentContainerStyles}>
8
15
  <Hyperlink href="#hyperlink" variant="inverse">
9
16
  Hyperlink
10
17
  </Hyperlink>
@@ -7,9 +7,16 @@ import {
7
7
  relatedActionsVerticalIcon,
8
8
  caretDownIcon,
9
9
  } from '@workday/canvas-system-icons-web';
10
+ import {createStyles} from '@workday/canvas-kit-styling';
11
+ import {system} from '@workday/canvas-tokens-web';
12
+
13
+ const parentContainerStyles = createStyles({
14
+ gap: system.space.x4,
15
+ padding: system.space.x4,
16
+ });
10
17
 
11
18
  export default () => (
12
- <Flex gap="s" padding="s">
19
+ <Flex cs={parentContainerStyles}>
13
20
  <PrimaryButton>Primary</PrimaryButton>
14
21
  <PrimaryButton icon={plusIcon} iconPosition="start">
15
22
  Primary
@@ -7,9 +7,17 @@ import {
7
7
  relatedActionsVerticalIcon,
8
8
  caretDownIcon,
9
9
  } from '@workday/canvas-system-icons-web';
10
+ import {createStyles} from '@workday/canvas-kit-styling';
11
+ import {system} from '@workday/canvas-tokens-web';
12
+
13
+ const parentContainerStyles = createStyles({
14
+ gap: system.space.x4,
15
+ backgroundColor: system.color.bg.primary.default,
16
+ padding: system.space.x4,
17
+ });
10
18
 
11
19
  export default () => (
12
- <Flex gap="s" backgroundColor="blueberry400" padding="s">
20
+ <Flex cs={parentContainerStyles}>
13
21
  <PrimaryButton variant="inverse">Primary</PrimaryButton>
14
22
  <PrimaryButton icon={plusIcon} iconPosition="start" variant="inverse">
15
23
  Primary
@@ -7,9 +7,16 @@ import {
7
7
  relatedActionsVerticalIcon,
8
8
  caretDownIcon,
9
9
  } from '@workday/canvas-system-icons-web';
10
+ import {createStyles} from '@workday/canvas-kit-styling';
11
+ import {system} from '@workday/canvas-tokens-web';
12
+
13
+ const parentContainerStyles = createStyles({
14
+ gap: system.space.x4,
15
+ padding: system.space.x4,
16
+ });
10
17
 
11
18
  export default () => (
12
- <Flex gap="s" padding="s">
19
+ <Flex cs={parentContainerStyles}>
13
20
  <SecondaryButton>Secondary</SecondaryButton>
14
21
  <SecondaryButton icon={plusIcon} iconPosition="start">
15
22
  Secondary
@@ -7,9 +7,17 @@ import {
7
7
  relatedActionsVerticalIcon,
8
8
  caretDownIcon,
9
9
  } from '@workday/canvas-system-icons-web';
10
+ import {createStyles} from '@workday/canvas-kit-styling';
11
+ import {system} from '@workday/canvas-tokens-web';
12
+
13
+ const parentContainerStyles = createStyles({
14
+ gap: system.space.x4,
15
+ padding: system.space.x4,
16
+ backgroundColor: system.color.bg.primary.default,
17
+ });
10
18
 
11
19
  export default () => (
12
- <Flex gap="s" backgroundColor="blueberry400" padding="s">
20
+ <Flex cs={parentContainerStyles}>
13
21
  <SecondaryButton variant="inverse">Secondary</SecondaryButton>
14
22
  <SecondaryButton icon={plusIcon} variant="inverse">
15
23
  Secondary
@@ -7,9 +7,16 @@ import {
7
7
  relatedActionsVerticalIcon,
8
8
  caretDownIcon,
9
9
  } from '@workday/canvas-system-icons-web';
10
+ import {createStyles} from '@workday/canvas-kit-styling';
11
+ import {system} from '@workday/canvas-tokens-web';
12
+
13
+ const parentContainerStyles = createStyles({
14
+ gap: system.space.x4,
15
+ padding: system.space.x4,
16
+ });
10
17
 
11
18
  export default () => (
12
- <Flex gap="s" padding="s">
19
+ <Flex cs={parentContainerStyles}>
13
20
  <TertiaryButton>Tertiary</TertiaryButton>
14
21
  <TertiaryButton icon={plusIcon} iconPosition="start">
15
22
  Tertiary
@@ -5,12 +5,19 @@ import {Flex} from '@workday/canvas-kit-react/layout';
5
5
  import {
6
6
  plusIcon,
7
7
  relatedActionsVerticalIcon,
8
- arrowRightIcon,
9
8
  caretDownIcon,
10
9
  } from '@workday/canvas-system-icons-web';
10
+ import {createStyles} from '@workday/canvas-kit-styling';
11
+ import {system} from '@workday/canvas-tokens-web';
12
+
13
+ const parentContainerStyles = createStyles({
14
+ gap: system.space.x4,
15
+ padding: system.space.x4,
16
+ backgroundColor: system.color.bg.primary.default,
17
+ });
11
18
 
12
19
  export default () => (
13
- <Flex gap="s" backgroundColor="blueberry400" padding="s">
20
+ <Flex cs={parentContainerStyles}>
14
21
  <TertiaryButton variant="inverse">Tertiary</TertiaryButton>
15
22
  <TertiaryButton icon={plusIcon} iconPosition="start" variant="inverse">
16
23
  Tertiary
@@ -1,6 +1,13 @@
1
1
  import React from 'react';
2
2
  import {Checkbox} from '@workday/canvas-kit-react/checkbox';
3
3
  import {Box} from '@workday/canvas-kit-react/layout';
4
+ import {createStyles} from '@workday/canvas-kit-styling';
5
+ import {system} from '@workday/canvas-tokens-web';
6
+
7
+ const styleOverrides = createStyles({
8
+ marginInlineLeft: system.space.x8,
9
+ marginTop: system.space.x2,
10
+ });
4
11
 
5
12
  export default () => {
6
13
  const [pizzaChecked, setPizzaChecked] = React.useState(false);
@@ -58,7 +65,7 @@ export default () => {
58
65
  label="Supreme Pizza Toppings"
59
66
  onChange={handlePizzaChange}
60
67
  />
61
- <Box marginLeft="l" marginTop="xxs">
68
+ <Box cs={styleOverrides}>
62
69
  {toppings.map((topping, index) => (
63
70
  <Checkbox
64
71
  checked={topping.checked}
@@ -1,6 +1,14 @@
1
1
  import React from 'react';
2
2
  import {Checkbox} from '@workday/canvas-kit-react/checkbox';
3
3
  import {Flex} from '@workday/canvas-kit-react/layout';
4
+ import {createStyles} from '@workday/canvas-kit-styling';
5
+ import {system} from '@workday/canvas-tokens-web';
6
+
7
+ const styleOverrides = createStyles({
8
+ gap: system.space.x4,
9
+ backgroundColor: system.color.bg.primary.default,
10
+ padding: system.space.x4,
11
+ });
4
12
 
5
13
  export default () => {
6
14
  const [checked, setChecked] = React.useState(false);
@@ -10,7 +18,7 @@ export default () => {
10
18
  };
11
19
 
12
20
  return (
13
- <Flex gap="s" backgroundColor="blueberry400" padding="s">
21
+ <Flex cs={styleOverrides}>
14
22
  <Checkbox
15
23
  variant="inverse"
16
24
  checked={checked}