@workday/canvas-kit-docs 9.0.0-alpha.362-next.2 → 9.0.0-alpha.364-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.
@@ -208738,7 +208738,7 @@ export var docs = (typeof window !== 'undefined' && window.__docs) ||
208738
208738
  "required": true,
208739
208739
  "type": {
208740
208740
  "kind": "string",
208741
- "value": "0px 1px 4px rgba(0, 0, 0, 0.2), 0px 2px 8px rgba(0, 0, 0, 0.16)"
208741
+ "value": "0px 1px 4px rgba(31, 38, 46, 0.12), 0px 2px 8px rgba(31, 38, 46, 0.08)"
208742
208742
  },
208743
208743
  "description": "",
208744
208744
  "declarations": [
@@ -208775,7 +208775,7 @@ export var docs = (typeof window !== 'undefined' && window.__docs) ||
208775
208775
  "required": true,
208776
208776
  "type": {
208777
208777
  "kind": "string",
208778
- "value": "0px 2px 8px rgba(0, 0, 0, 0.2), 0px 4px 16px rgba(0, 0, 0, 0.16)"
208778
+ "value": "0px 2px 8px rgba(31, 38, 46, 0.12), 0px 4px 16px rgba(31, 38, 46, 0.08)"
208779
208779
  },
208780
208780
  "description": "",
208781
208781
  "declarations": [
@@ -208812,7 +208812,7 @@ export var docs = (typeof window !== 'undefined' && window.__docs) ||
208812
208812
  "required": true,
208813
208813
  "type": {
208814
208814
  "kind": "string",
208815
- "value": "0px 3px 12px rgba(0, 0, 0, 0.2), 0px 6px 24px rgba(0, 0, 0, 0.16)"
208815
+ "value": "0px 3px 12px rgba(31, 38, 46, 0.12), 0px 6px 24px rgba(31, 38, 46, 0.08)"
208816
208816
  },
208817
208817
  "description": "",
208818
208818
  "declarations": [
@@ -208849,7 +208849,7 @@ export var docs = (typeof window !== 'undefined' && window.__docs) ||
208849
208849
  "required": true,
208850
208850
  "type": {
208851
208851
  "kind": "string",
208852
- "value": "0px 4px 16px rgba(0, 0, 0, 0.2), 0px 8px 32px rgba(0, 0, 0, 0.16)"
208852
+ "value": "0px 4px 16px rgba(31, 38, 46, 0.12), 0px 8px 32px rgba(31, 38, 46, 0.08)"
208853
208853
  },
208854
208854
  "description": "",
208855
208855
  "declarations": [
@@ -208886,7 +208886,7 @@ export var docs = (typeof window !== 'undefined' && window.__docs) ||
208886
208886
  "required": true,
208887
208887
  "type": {
208888
208888
  "kind": "string",
208889
- "value": "0px 5px 20px rgba(0, 0, 0, 0.2), 0px 10px 40px rgba(0, 0, 0, 0.16)"
208889
+ "value": "0px 5px 20px rgba(31, 38, 46, 0.12), 0px 10px 40px rgba(31, 38, 46, 0.08)"
208890
208890
  },
208891
208891
  "description": "",
208892
208892
  "declarations": [
@@ -208923,7 +208923,7 @@ export var docs = (typeof window !== 'undefined' && window.__docs) ||
208923
208923
  "required": true,
208924
208924
  "type": {
208925
208925
  "kind": "string",
208926
- "value": "0px 6px 24px rgba(0, 0, 0, 0.2), 0px 12px 48px rgba(0, 0, 0, 0.16)"
208926
+ "value": "0px 6px 24px rgba(31, 38, 46, 0.12), 0px 12px 48px rgba(31, 38, 46, 0.08)"
208927
208927
  },
208928
208928
  "description": "",
208929
208929
  "declarations": [
@@ -208998,7 +208998,7 @@ export var docs = (typeof window !== 'undefined' && window.__docs) ||
208998
208998
  "required": true,
208999
208999
  "type": {
209000
209000
  "kind": "string",
209001
- "value": "0px 1px 4px rgba(0, 0, 0, 0.2), 0px 2px 8px rgba(0, 0, 0, 0.16)"
209001
+ "value": "0px 1px 4px rgba(31, 38, 46, 0.12), 0px 2px 8px rgba(31, 38, 46, 0.08)"
209002
209002
  },
209003
209003
  "description": "",
209004
209004
  "declarations": [
@@ -209020,7 +209020,7 @@ export var docs = (typeof window !== 'undefined' && window.__docs) ||
209020
209020
  "required": true,
209021
209021
  "type": {
209022
209022
  "kind": "string",
209023
- "value": "0px 2px 8px rgba(0, 0, 0, 0.2), 0px 4px 16px rgba(0, 0, 0, 0.16)"
209023
+ "value": "0px 2px 8px rgba(31, 38, 46, 0.12), 0px 4px 16px rgba(31, 38, 46, 0.08)"
209024
209024
  },
209025
209025
  "description": "",
209026
209026
  "declarations": [
@@ -209042,7 +209042,7 @@ export var docs = (typeof window !== 'undefined' && window.__docs) ||
209042
209042
  "required": true,
209043
209043
  "type": {
209044
209044
  "kind": "string",
209045
- "value": "0px 3px 12px rgba(0, 0, 0, 0.2), 0px 6px 24px rgba(0, 0, 0, 0.16)"
209045
+ "value": "0px 3px 12px rgba(31, 38, 46, 0.12), 0px 6px 24px rgba(31, 38, 46, 0.08)"
209046
209046
  },
209047
209047
  "description": "",
209048
209048
  "declarations": [
@@ -209064,7 +209064,7 @@ export var docs = (typeof window !== 'undefined' && window.__docs) ||
209064
209064
  "required": true,
209065
209065
  "type": {
209066
209066
  "kind": "string",
209067
- "value": "0px 4px 16px rgba(0, 0, 0, 0.2), 0px 8px 32px rgba(0, 0, 0, 0.16)"
209067
+ "value": "0px 4px 16px rgba(31, 38, 46, 0.12), 0px 8px 32px rgba(31, 38, 46, 0.08)"
209068
209068
  },
209069
209069
  "description": "",
209070
209070
  "declarations": [
@@ -209086,7 +209086,7 @@ export var docs = (typeof window !== 'undefined' && window.__docs) ||
209086
209086
  "required": true,
209087
209087
  "type": {
209088
209088
  "kind": "string",
209089
- "value": "0px 5px 20px rgba(0, 0, 0, 0.2), 0px 10px 40px rgba(0, 0, 0, 0.16)"
209089
+ "value": "0px 5px 20px rgba(31, 38, 46, 0.12), 0px 10px 40px rgba(31, 38, 46, 0.08)"
209090
209090
  },
209091
209091
  "description": "",
209092
209092
  "declarations": [
@@ -209108,7 +209108,7 @@ export var docs = (typeof window !== 'undefined' && window.__docs) ||
209108
209108
  "required": true,
209109
209109
  "type": {
209110
209110
  "kind": "string",
209111
- "value": "0px 6px 24px rgba(0, 0, 0, 0.2), 0px 12px 48px rgba(0, 0, 0, 0.16)"
209111
+ "value": "0px 6px 24px rgba(31, 38, 46, 0.12), 0px 12px 48px rgba(31, 38, 46, 0.08)"
209112
209112
  },
209113
209113
  "description": "",
209114
209114
  "declarations": [
@@ -14,6 +14,8 @@ any questions.
14
14
  - [Toast](#toast)
15
15
  - [Utility Updates](#utility-updates)
16
16
  - [focusRing](#focusring)
17
+ - [Token Updates](#token-updates)
18
+ - [Depth](#depth)
17
19
 
18
20
  ## Codemod
19
21
 
@@ -165,4 +167,14 @@ the correct props.
165
167
 
166
168
  We're removing memoization from focus ring. The `memoize` argument passed to `focusRing` is no
167
169
  longer valid and we've removed the exported `memoizedFocusRing`. There is no codemod for this
168
- change. We couldn't find any example of `memoize` or `memoizedFocusRing` being used.
170
+ change. We couldn't find any example of `memoize` or `memoizedFocusRing` being used.
171
+
172
+ ## Token Updates
173
+
174
+ ### Depth
175
+
176
+ In v7, we released an update to our depth tokens that was too bold and harsh for web applications.
177
+ We've modified the depth token styles to be more subtle and improve visual design. This change
178
+ affects all components which use depth tokens including `Card`, `Toast`, `Dialog`, `Popup`, `Modal`,
179
+ and `Menu`. We have not changed which depth values each component references (i.e., `Card` remains
180
+ at `depth[1]`).
@@ -1,29 +1,48 @@
1
1
  import * as React from 'react';
2
2
  import styled from '@emotion/styled';
3
- import {pickForegroundColor, StyledType} from '@workday/canvas-kit-react/common';
3
+ import {pickForegroundColor} from '@workday/canvas-kit-react/common';
4
4
 
5
5
  import {colors, type, depth, space, borderRadius} from '@workday/canvas-kit-react/tokens';
6
+ import {Text} from '@workday/canvas-kit-react/text';
6
7
  import {Box, Flex} from '@workday/canvas-kit-react/layout';
7
8
 
8
- const StyledCard = styled(Box)<StyledType>({
9
- width: 200,
10
- height: 200,
11
- margin: 20,
12
- borderRadius: 4,
13
- display: 'flex',
14
- alignItems: 'center',
15
- justifyContent: 'center',
16
- });
9
+ const DepthCard = ({depth, children}) => {
10
+ return (
11
+ <Flex
12
+ depth={depth}
13
+ width={200}
14
+ height={200}
15
+ borderRadius="s"
16
+ alignItems="center"
17
+ justifyContent="center"
18
+ backgroundColor="frenchVanilla100"
19
+ >
20
+ {children}
21
+ </Flex>
22
+ );
23
+ };
17
24
 
18
25
  export default () => (
19
- <Flex>
20
- <StyledCard depth="none">Depth None</StyledCard>
21
- <StyledCard depth={1}>Depth 1</StyledCard>
22
- <StyledCard depth={2}>Depth 2</StyledCard>
23
- <StyledCard depth={3}>Depth 3</StyledCard>
24
- <StyledCard depth={4}>Depth 4</StyledCard>
25
- <StyledCard depth={5}>Depth 5</StyledCard>
26
- <StyledCard depth={6}>Depth 6</StyledCard>
26
+ <Flex gap="m" flexDirection="column">
27
+ <Flex gap="m" flexWrap="wrap">
28
+ <DepthCard depth="none">Depth None</DepthCard>
29
+ <DepthCard depth={1}>Depth 1</DepthCard>
30
+ <DepthCard depth={2}>Depth 2</DepthCard>
31
+ <DepthCard depth={3}>Depth 3</DepthCard>
32
+ <DepthCard depth={4}>Depth 4</DepthCard>
33
+ <DepthCard depth={5}>Depth 5</DepthCard>
34
+ <DepthCard depth={6}>Depth 6</DepthCard>
35
+ </Flex>
36
+ <Text>Depth on a colored background</Text>
37
+ <Flex backgroundColor="soap400" gap="m" padding="m" flexWrap="wrap">
38
+ <DepthCard depth="none">Depth None</DepthCard>
39
+ <DepthCard depth={1}>Depth 1</DepthCard>
40
+ <DepthCard depth={2}>Depth 2</DepthCard>
41
+ <DepthCard depth={3}>Depth 3</DepthCard>
42
+ <DepthCard depth={4}>Depth 4</DepthCard>
43
+ <DepthCard depth={5}>Depth 5</DepthCard>
44
+ <DepthCard depth={6}>Depth 6</DepthCard>
45
+ </Flex>
27
46
  </Flex>
28
47
  );
29
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "9.0.0-alpha.362-next.2+ea2fe722",
3
+ "version": "9.0.0-alpha.364-next.3+338b6108",
4
4
  "description": "Documentation components of Canvas Kit components",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -44,9 +44,9 @@
44
44
  "dependencies": {
45
45
  "@emotion/styled": "^11.6.0",
46
46
  "@storybook/csf": "0.0.1",
47
- "@workday/canvas-kit-labs-react": "^9.0.0-alpha.362-next.2+ea2fe722",
48
- "@workday/canvas-kit-preview-react": "^9.0.0-alpha.362-next.2+ea2fe722",
49
- "@workday/canvas-kit-react": "^9.0.0-alpha.362-next.2+ea2fe722",
47
+ "@workday/canvas-kit-labs-react": "^9.0.0-alpha.364-next.3+338b6108",
48
+ "@workday/canvas-kit-preview-react": "^9.0.0-alpha.364-next.3+338b6108",
49
+ "@workday/canvas-kit-react": "^9.0.0-alpha.364-next.3+338b6108",
50
50
  "@workday/canvas-system-icons-web": "^3.0.0",
51
51
  "markdown-to-jsx": "^6.10.3",
52
52
  "ts-node": "^10.9.1"
@@ -57,5 +57,5 @@
57
57
  "mkdirp": "^1.0.3",
58
58
  "typescript": "4.2"
59
59
  },
60
- "gitHead": "ea2fe722d1176835120f765c4b9b88dcd5234fe5"
60
+ "gitHead": "338b6108ddc7d5cf29960927389f7cd85e198e86"
61
61
  }