@workday/canvas-kit-react 7.0.0-alpha.78-next.6 → 7.0.0-alpha.79-next.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/card/lib/Card.tsx +1 -1
- package/dist/commonjs/card/lib/Card.js +1 -1
- package/dist/commonjs/layout/lib/Box.d.ts +1 -1
- package/dist/commonjs/layout/lib/Box.js +1 -1
- package/dist/commonjs/layout/lib/Flex.d.ts +1 -1
- package/dist/commonjs/layout/lib/Flex.js +1 -1
- package/dist/commonjs/modal/lib/ModalCard.js +1 -1
- package/dist/commonjs/popup/lib/PopupCard.js +1 -1
- package/dist/commonjs/toast/lib/Toast.d.ts.map +1 -1
- package/dist/commonjs/toast/lib/Toast.js +1 -1
- package/dist/commonjs/tokens/lib/depth.d.ts +48 -17
- package/dist/commonjs/tokens/lib/depth.d.ts.map +1 -1
- package/dist/commonjs/tokens/lib/depth.js +14 -9
- package/dist/es6/card/lib/Card.js +1 -1
- package/dist/es6/layout/lib/Box.d.ts +1 -1
- package/dist/es6/layout/lib/Box.js +1 -1
- package/dist/es6/layout/lib/Flex.d.ts +1 -1
- package/dist/es6/layout/lib/Flex.js +1 -1
- package/dist/es6/modal/lib/ModalCard.js +1 -1
- package/dist/es6/popup/lib/PopupCard.js +1 -1
- package/dist/es6/toast/lib/Toast.d.ts.map +1 -1
- package/dist/es6/toast/lib/Toast.js +1 -1
- package/dist/es6/tokens/lib/depth.d.ts +48 -17
- package/dist/es6/tokens/lib/depth.d.ts.map +1 -1
- package/dist/es6/tokens/lib/depth.js +14 -9
- package/layout/lib/Box.tsx +1 -1
- package/layout/lib/Flex.tsx +1 -1
- package/modal/lib/ModalCard.tsx +1 -1
- package/package.json +5 -5
- package/popup/lib/PopupCard.tsx +1 -1
- package/toast/lib/Toast.tsx +1 -0
- package/tokens/README.md +11 -8
- package/tokens/lib/depth.ts +60 -24
- package/ts3.5/dist/commonjs/layout/lib/Box.d.ts +1 -1
- package/ts3.5/dist/commonjs/layout/lib/Flex.d.ts +1 -1
- package/ts3.5/dist/commonjs/tokens/lib/depth.d.ts +48 -17
- package/ts3.5/dist/es6/layout/lib/Box.d.ts +1 -1
- package/ts3.5/dist/es6/layout/lib/Flex.d.ts +1 -1
- package/ts3.5/dist/es6/tokens/lib/depth.d.ts +48 -17
package/card/lib/Card.tsx
CHANGED
|
@@ -52,7 +52,7 @@ exports.Card = common_1.createComponent('div')({
|
|
|
52
52
|
displayName: 'Card',
|
|
53
53
|
Component: function (_a, ref, Element) {
|
|
54
54
|
var children = _a.children, elemProps = __rest(_a, ["children"]);
|
|
55
|
-
return (React.createElement(layout_1.Box, __assign({ ref: ref, as: Element, depth:
|
|
55
|
+
return (React.createElement(layout_1.Box, __assign({ ref: ref, as: Element, depth: 1, padding: "l", backgroundColor: "frenchVanilla100", border: "1px solid " + tokens_1.colors.soap500, borderRadius: "l" }, elemProps), children));
|
|
56
56
|
},
|
|
57
57
|
subComponents: {
|
|
58
58
|
Heading: CardHeading_1.CardHeading,
|
|
@@ -40,7 +40,7 @@ export declare const boxStyleFn: <P extends BoxProps>(props: P) => {};
|
|
|
40
40
|
*
|
|
41
41
|
* // `Card`'s default values are set using `BoxProps`
|
|
42
42
|
* const Card = (props: CardProps) => (
|
|
43
|
-
* <Box depth={
|
|
43
|
+
* <Box depth={1} padding="m" borderRadius="l" {...props}>Hello, Card!</Box>
|
|
44
44
|
* );
|
|
45
45
|
*
|
|
46
46
|
*/
|
|
@@ -123,7 +123,7 @@ var StyledBoxComponent = styled_1.default('div')({
|
|
|
123
123
|
*
|
|
124
124
|
* // `Card`'s default values are set using `BoxProps`
|
|
125
125
|
* const Card = (props: CardProps) => (
|
|
126
|
-
* <Box depth={
|
|
126
|
+
* <Box depth={1} padding="m" borderRadius="l" {...props}>Hello, Card!</Box>
|
|
127
127
|
* );
|
|
128
128
|
*
|
|
129
129
|
*/
|
|
@@ -15,7 +15,7 @@ export declare type FlexProps = BoxProps & FlexStyleProps;
|
|
|
15
15
|
*
|
|
16
16
|
* // `Card`'s default values are set using `FlexProps`
|
|
17
17
|
* const Card = (props: CardProps) => (
|
|
18
|
-
* <Flex flexDirection="column" alignItems="flex-start" depth={
|
|
18
|
+
* <Flex flexDirection="column" alignItems="flex-start" depth={1} space="m" {...props}>
|
|
19
19
|
* <h1>Hello, Card!</h1>
|
|
20
20
|
* <p>This card uses flexbox to set its layout.</p>
|
|
21
21
|
* </Flex>
|
|
@@ -67,7 +67,7 @@ var StyledFlex = styled_1.default(layout_1.Box)({
|
|
|
67
67
|
*
|
|
68
68
|
* // `Card`'s default values are set using `FlexProps`
|
|
69
69
|
* const Card = (props: CardProps) => (
|
|
70
|
-
* <Flex flexDirection="column" alignItems="flex-start" depth={
|
|
70
|
+
* <Flex flexDirection="column" alignItems="flex-start" depth={1} space="m" {...props}>
|
|
71
71
|
* <h1>Hello, Card!</h1>
|
|
72
72
|
* <p>This card uses flexbox to set its layout.</p>
|
|
73
73
|
* </Flex>
|
|
@@ -52,6 +52,6 @@ exports.ModalCard = common_1.createComponent('div')({
|
|
|
52
52
|
var children = _a.children, model = _a.model, elemProps = __rest(_a, ["children", "model"]);
|
|
53
53
|
var localModel = common_1.useModelContext(popup_1.PopupModelContext, model);
|
|
54
54
|
var props = hooks_1.useModalCard(localModel, elemProps, ref);
|
|
55
|
-
return (React.createElement(popup_1.Popup.Card, __assign({ as: Element, width: 440, borderWidth: 0, margin: "xl" }, props), children));
|
|
55
|
+
return (React.createElement(popup_1.Popup.Card, __assign({ as: Element, width: 440, borderWidth: 0, margin: "xl", depth: 6 }, props), children));
|
|
56
56
|
},
|
|
57
57
|
});
|
|
@@ -85,7 +85,7 @@ exports.PopupCard = common_1.createComponent('div')({
|
|
|
85
85
|
}, [localModel.state.placement]);
|
|
86
86
|
// As is a Stack that will render an element of `Element`
|
|
87
87
|
var As = common_1.useConstant(function () { return layout_1.Stack.as(Element); });
|
|
88
|
-
return (React.createElement(StyledPopupCard, __assign({ as: As, transformOrigin: transformOrigin, position: "relative", padding: "l", depth:
|
|
88
|
+
return (React.createElement(StyledPopupCard, __assign({ as: As, transformOrigin: transformOrigin, position: "relative", padding: "l", depth: 5, maxWidth: "calc(100vw - " + tokens_1.space.l + ")", spacing: 0, flexDirection: "column", minHeight: 0, maxHeight: "calc(100vh - " + (elemProps.margin
|
|
89
89
|
? tokens_1.space[elemProps.margin] || elemProps.margin
|
|
90
90
|
: tokens_1.space.xl) + " * 2)", overflowY: "auto" // force IE11 to limit the flex size of the card. Without this, the body isn't allowed to overflow properly: https://github.com/philipwalton/flexbugs/issues/216#issuecomment-453053557
|
|
91
91
|
}, props), children));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../toast/lib/Toast.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AACtD,OAAO,EAAsB,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAGlF,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAkB,YAAY,EAAqB,MAAM,kCAAkC,CAAC;AAGnG,MAAM,WAAW,UAAW,SAAQ,YAAY,CAAC,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC;IACxE;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IACjC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAkCD,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../toast/lib/Toast.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AACtD,OAAO,EAAsB,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAGlF,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAkB,YAAY,EAAqB,MAAM,kCAAkC,CAAC;AAGnG,MAAM,WAAW,UAAW,SAAQ,YAAY,CAAC,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC;IACxE;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IACjC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAkCD,eAAO,MAAM,KAAK,4DA8ChB,CAAC"}
|
|
@@ -73,7 +73,7 @@ exports.Toast = common_1.createComponent('div')({
|
|
|
73
73
|
_c = _a.iconColor, // needed for TS2742 - https://github.com/microsoft/TypeScript/issues/29808
|
|
74
74
|
iconColor = _c === void 0 ? tokens_1.colors.greenApple400 : _c, onClose = _a.onClose, onActionClick = _a.onActionClick, actionText = _a.actionText, children = _a.children, elemProps = __rest(_a, ["icon", "iconColor", "onClose", "onActionClick", "actionText", "children"]);
|
|
75
75
|
var isInteractive = onClose || onActionClick;
|
|
76
|
-
return (React.createElement(popup_1.Popup.Card, __assign({ ref: ref, as: Element, width: toastWidth, padding: "s", role: isInteractive ? 'dialog' : 'status', "aria-live": isInteractive ? 'off' : 'polite', "aria-atomic": !isInteractive }, elemProps),
|
|
76
|
+
return (React.createElement(popup_1.Popup.Card, __assign({ ref: ref, as: Element, width: toastWidth, padding: "s", depth: 5, role: isInteractive ? 'dialog' : 'status', "aria-live": isInteractive ? 'off' : 'polite', "aria-atomic": !isInteractive }, elemProps),
|
|
77
77
|
onClose && React.createElement(popup_1.Popup.CloseIcon, { "aria-label": "Close", onClick: onClose, size: "small" }),
|
|
78
78
|
React.createElement(popup_1.Popup.Body, null,
|
|
79
79
|
React.createElement(ToastContentContainer, { onClose: onClose },
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export declare type CanvasDepth = {
|
|
2
2
|
/**
|
|
3
|
-
* ### Depth
|
|
4
|
-
* Used for
|
|
3
|
+
* ### Depth None
|
|
4
|
+
* Used for removing existing depth
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```ts
|
|
8
8
|
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
9
9
|
*
|
|
10
|
-
* const
|
|
11
|
-
* ...depth.
|
|
10
|
+
* const noDepthCardStyles = {
|
|
11
|
+
* ...depth.none,
|
|
12
12
|
* };
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
|
-
boxShadow: '
|
|
15
|
+
none: {
|
|
16
|
+
boxShadow: 'none';
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* ### Depth 1
|
|
20
|
-
* Used for minimal offset
|
|
20
|
+
* Used for minimal offset and Cards
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```ts
|
|
@@ -29,11 +29,11 @@ export declare type CanvasDepth = {
|
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
1: {
|
|
32
|
-
boxShadow: '0px
|
|
32
|
+
boxShadow: '0px 1px 4px rgba(0, 0, 0, 0.2), 0px 2px 8px rgba(0, 0, 0, 0.16)';
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* ### Depth 2
|
|
36
|
-
* Used for
|
|
36
|
+
* Used for Top navigation, Bottom navigation
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* ```ts
|
|
@@ -45,11 +45,11 @@ export declare type CanvasDepth = {
|
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
47
|
2: {
|
|
48
|
-
boxShadow: '0px
|
|
48
|
+
boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.2), 0px 4px 16px rgba(0, 0, 0, 0.16)';
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
51
51
|
* ### Depth 3
|
|
52
|
-
* Used for
|
|
52
|
+
* Used for FABs, Menus
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
55
|
* ```ts
|
|
@@ -61,11 +61,11 @@ export declare type CanvasDepth = {
|
|
|
61
61
|
* ```
|
|
62
62
|
*/
|
|
63
63
|
3: {
|
|
64
|
-
boxShadow: '0px
|
|
64
|
+
boxShadow: '0px 3px 12px rgba(0, 0, 0, 0.2), 0px 6px 24px rgba(0, 0, 0, 0.16)';
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
67
|
* ### Depth 4
|
|
68
|
-
*
|
|
68
|
+
*
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* ```ts
|
|
@@ -77,8 +77,39 @@ export declare type CanvasDepth = {
|
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
79
|
4: {
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
boxShadow: '0px 4px 16px rgba(0, 0, 0, 0.2), 0px 8px 32px rgba(0, 0, 0, 0.16)';
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* ### Depth 5
|
|
84
|
+
* Used for Popups, Toast Messages, Dialogs, Side Panels without opacity overlay behavior
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
89
|
+
*
|
|
90
|
+
* const cardStyles = {
|
|
91
|
+
* ...depth[5],
|
|
92
|
+
* };
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
5: {
|
|
96
|
+
boxShadow: '0px 5px 20px rgba(0, 0, 0, 0.2), 0px 10px 40px rgba(0, 0, 0, 0.16)';
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* ### Depth 6
|
|
100
|
+
* Used for components with opacity overlay behavior such as Modal or Side Panels
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
105
|
+
*
|
|
106
|
+
* const cardStyles = {
|
|
107
|
+
* ...depth[6],
|
|
108
|
+
* };
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
6: {
|
|
112
|
+
boxShadow: '0px 6px 24px rgba(0, 0, 0, 0.2), 0px 12px 48px rgba(0, 0, 0, 0.16)';
|
|
82
113
|
};
|
|
83
114
|
};
|
|
84
115
|
declare type ValueOf<T> = T[keyof T];
|
|
@@ -88,8 +119,8 @@ export declare type CanvasDepthValues = ValueOf<CanvasDepth>;
|
|
|
88
119
|
*
|
|
89
120
|
* Depth is the relative distance between surfaces in the z-axis.
|
|
90
121
|
* It provides delineation, focus, and priority with shadows and layering.
|
|
91
|
-
* There are
|
|
92
|
-
*
|
|
122
|
+
* There are seven depth levels, `none`, `1`, `2`, `3`, `4`, `5` and `6`.
|
|
123
|
+
* `none` is a special value to remove depth styles. All other levels only apply box-shadow styles.
|
|
93
124
|
*
|
|
94
125
|
* @example
|
|
95
126
|
* ```tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depth.d.ts","sourceRoot":"","sources":["../../../../tokens/lib/depth.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG;IACxB;;;;;;;;;;;;OAYG;IACH,
|
|
1
|
+
{"version":3,"file":"depth.d.ts","sourceRoot":"","sources":["../../../../tokens/lib/depth.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG;IACxB;;;;;;;;;;;;OAYG;IACH,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,iEAAiE,CAAC;KAC9E,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,kEAAkE,CAAC;KAC/E,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,mEAAmE,CAAC;KAChF,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,mEAAmE,CAAC;KAChF,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,oEAAoE,CAAC;KACjF,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,oEAAoE,CAAC;KACjF,CAAC;CACH,CAAC;AAEF,aAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7B,oBAAY,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,KAAK,EAAE,WAsBnB,CAAC"}
|
|
@@ -6,8 +6,8 @@ exports.depth = void 0;
|
|
|
6
6
|
*
|
|
7
7
|
* Depth is the relative distance between surfaces in the z-axis.
|
|
8
8
|
* It provides delineation, focus, and priority with shadows and layering.
|
|
9
|
-
* There are
|
|
10
|
-
*
|
|
9
|
+
* There are seven depth levels, `none`, `1`, `2`, `3`, `4`, `5` and `6`.
|
|
10
|
+
* `none` is a special value to remove depth styles. All other levels only apply box-shadow styles.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* ```tsx
|
|
@@ -24,20 +24,25 @@ exports.depth = void 0;
|
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
26
|
exports.depth = {
|
|
27
|
-
|
|
28
|
-
boxShadow: '
|
|
27
|
+
none: {
|
|
28
|
+
boxShadow: 'none',
|
|
29
29
|
},
|
|
30
30
|
1: {
|
|
31
|
-
boxShadow: '0px
|
|
31
|
+
boxShadow: '0px 1px 4px rgba(0, 0, 0, 0.2), 0px 2px 8px rgba(0, 0, 0, 0.16)',
|
|
32
32
|
},
|
|
33
33
|
2: {
|
|
34
|
-
boxShadow: '0px
|
|
34
|
+
boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.2), 0px 4px 16px rgba(0, 0, 0, 0.16)',
|
|
35
35
|
},
|
|
36
36
|
3: {
|
|
37
|
-
boxShadow: '0px
|
|
37
|
+
boxShadow: '0px 3px 12px rgba(0, 0, 0, 0.2), 0px 6px 24px rgba(0, 0, 0, 0.16)',
|
|
38
38
|
},
|
|
39
39
|
4: {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
boxShadow: '0px 4px 16px rgba(0, 0, 0, 0.2), 0px 8px 32px rgba(0, 0, 0, 0.16)',
|
|
41
|
+
},
|
|
42
|
+
5: {
|
|
43
|
+
boxShadow: '0px 5px 20px rgba(0, 0, 0, 0.2), 0px 10px 40px rgba(0, 0, 0, 0.16)',
|
|
44
|
+
},
|
|
45
|
+
6: {
|
|
46
|
+
boxShadow: '0px 6px 24px rgba(0, 0, 0, 0.2), 0px 12px 48px rgba(0, 0, 0, 0.16)',
|
|
42
47
|
},
|
|
43
48
|
};
|
|
@@ -30,7 +30,7 @@ export var Card = createComponent('div')({
|
|
|
30
30
|
displayName: 'Card',
|
|
31
31
|
Component: function (_a, ref, Element) {
|
|
32
32
|
var children = _a.children, elemProps = __rest(_a, ["children"]);
|
|
33
|
-
return (React.createElement(Box, __assign({ ref: ref, as: Element, depth:
|
|
33
|
+
return (React.createElement(Box, __assign({ ref: ref, as: Element, depth: 1, padding: "l", backgroundColor: "frenchVanilla100", border: "1px solid " + colors.soap500, borderRadius: "l" }, elemProps), children));
|
|
34
34
|
},
|
|
35
35
|
subComponents: {
|
|
36
36
|
Heading: CardHeading,
|
|
@@ -40,7 +40,7 @@ export declare const boxStyleFn: <P extends BoxProps>(props: P) => {};
|
|
|
40
40
|
*
|
|
41
41
|
* // `Card`'s default values are set using `BoxProps`
|
|
42
42
|
* const Card = (props: CardProps) => (
|
|
43
|
-
* <Box depth={
|
|
43
|
+
* <Box depth={1} padding="m" borderRadius="l" {...props}>Hello, Card!</Box>
|
|
44
44
|
* );
|
|
45
45
|
*
|
|
46
46
|
*/
|
|
@@ -97,7 +97,7 @@ var StyledBoxComponent = styled('div')({
|
|
|
97
97
|
*
|
|
98
98
|
* // `Card`'s default values are set using `BoxProps`
|
|
99
99
|
* const Card = (props: CardProps) => (
|
|
100
|
-
* <Box depth={
|
|
100
|
+
* <Box depth={1} padding="m" borderRadius="l" {...props}>Hello, Card!</Box>
|
|
101
101
|
* );
|
|
102
102
|
*
|
|
103
103
|
*/
|
|
@@ -15,7 +15,7 @@ export declare type FlexProps = BoxProps & FlexStyleProps;
|
|
|
15
15
|
*
|
|
16
16
|
* // `Card`'s default values are set using `FlexProps`
|
|
17
17
|
* const Card = (props: CardProps) => (
|
|
18
|
-
* <Flex flexDirection="column" alignItems="flex-start" depth={
|
|
18
|
+
* <Flex flexDirection="column" alignItems="flex-start" depth={1} space="m" {...props}>
|
|
19
19
|
* <h1>Hello, Card!</h1>
|
|
20
20
|
* <p>This card uses flexbox to set its layout.</p>
|
|
21
21
|
* </Flex>
|
|
@@ -42,7 +42,7 @@ var StyledFlex = styled(Box)({
|
|
|
42
42
|
*
|
|
43
43
|
* // `Card`'s default values are set using `FlexProps`
|
|
44
44
|
* const Card = (props: CardProps) => (
|
|
45
|
-
* <Flex flexDirection="column" alignItems="flex-start" depth={
|
|
45
|
+
* <Flex flexDirection="column" alignItems="flex-start" depth={1} space="m" {...props}>
|
|
46
46
|
* <h1>Hello, Card!</h1>
|
|
47
47
|
* <p>This card uses flexbox to set its layout.</p>
|
|
48
48
|
* </Flex>
|
|
@@ -30,6 +30,6 @@ export var ModalCard = createComponent('div')({
|
|
|
30
30
|
var children = _a.children, model = _a.model, elemProps = __rest(_a, ["children", "model"]);
|
|
31
31
|
var localModel = useModelContext(PopupModelContext, model);
|
|
32
32
|
var props = useModalCard(localModel, elemProps, ref);
|
|
33
|
-
return (React.createElement(Popup.Card, __assign({ as: Element, width: 440, borderWidth: 0, margin: "xl" }, props), children));
|
|
33
|
+
return (React.createElement(Popup.Card, __assign({ as: Element, width: 440, borderWidth: 0, margin: "xl", depth: 6 }, props), children));
|
|
34
34
|
},
|
|
35
35
|
});
|
|
@@ -63,7 +63,7 @@ export var PopupCard = createComponent('div')({
|
|
|
63
63
|
}, [localModel.state.placement]);
|
|
64
64
|
// As is a Stack that will render an element of `Element`
|
|
65
65
|
var As = useConstant(function () { return Stack.as(Element); });
|
|
66
|
-
return (React.createElement(StyledPopupCard, __assign({ as: As, transformOrigin: transformOrigin, position: "relative", padding: "l", depth:
|
|
66
|
+
return (React.createElement(StyledPopupCard, __assign({ as: As, transformOrigin: transformOrigin, position: "relative", padding: "l", depth: 5, maxWidth: "calc(100vw - " + space.l + ")", spacing: 0, flexDirection: "column", minHeight: 0, maxHeight: "calc(100vh - " + (elemProps.margin
|
|
67
67
|
? space[elemProps.margin] || elemProps.margin
|
|
68
68
|
: space.xl) + " * 2)", overflowY: "auto" // force IE11 to limit the flex size of the card. Without this, the body isn't allowed to overflow properly: https://github.com/philipwalton/flexbugs/issues/216#issuecomment-453053557
|
|
69
69
|
}, props), children));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../toast/lib/Toast.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AACtD,OAAO,EAAsB,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAGlF,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAkB,YAAY,EAAqB,MAAM,kCAAkC,CAAC;AAGnG,MAAM,WAAW,UAAW,SAAQ,YAAY,CAAC,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC;IACxE;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IACjC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAkCD,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../toast/lib/Toast.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AACtD,OAAO,EAAsB,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAGlF,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAkB,YAAY,EAAqB,MAAM,kCAAkC,CAAC;AAGnG,MAAM,WAAW,UAAW,SAAQ,YAAY,CAAC,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC;IACxE;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IACjC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAkCD,eAAO,MAAM,KAAK,4DA8ChB,CAAC"}
|
|
@@ -51,7 +51,7 @@ export var Toast = createComponent('div')({
|
|
|
51
51
|
_c = _a.iconColor, // needed for TS2742 - https://github.com/microsoft/TypeScript/issues/29808
|
|
52
52
|
iconColor = _c === void 0 ? colors.greenApple400 : _c, onClose = _a.onClose, onActionClick = _a.onActionClick, actionText = _a.actionText, children = _a.children, elemProps = __rest(_a, ["icon", "iconColor", "onClose", "onActionClick", "actionText", "children"]);
|
|
53
53
|
var isInteractive = onClose || onActionClick;
|
|
54
|
-
return (React.createElement(Popup.Card, __assign({ ref: ref, as: Element, width: toastWidth, padding: "s", role: isInteractive ? 'dialog' : 'status', "aria-live": isInteractive ? 'off' : 'polite', "aria-atomic": !isInteractive }, elemProps),
|
|
54
|
+
return (React.createElement(Popup.Card, __assign({ ref: ref, as: Element, width: toastWidth, padding: "s", depth: 5, role: isInteractive ? 'dialog' : 'status', "aria-live": isInteractive ? 'off' : 'polite', "aria-atomic": !isInteractive }, elemProps),
|
|
55
55
|
onClose && React.createElement(Popup.CloseIcon, { "aria-label": "Close", onClick: onClose, size: "small" }),
|
|
56
56
|
React.createElement(Popup.Body, null,
|
|
57
57
|
React.createElement(ToastContentContainer, { onClose: onClose },
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export declare type CanvasDepth = {
|
|
2
2
|
/**
|
|
3
|
-
* ### Depth
|
|
4
|
-
* Used for
|
|
3
|
+
* ### Depth None
|
|
4
|
+
* Used for removing existing depth
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```ts
|
|
8
8
|
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
9
9
|
*
|
|
10
|
-
* const
|
|
11
|
-
* ...depth.
|
|
10
|
+
* const noDepthCardStyles = {
|
|
11
|
+
* ...depth.none,
|
|
12
12
|
* };
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
|
-
boxShadow: '
|
|
15
|
+
none: {
|
|
16
|
+
boxShadow: 'none';
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* ### Depth 1
|
|
20
|
-
* Used for minimal offset
|
|
20
|
+
* Used for minimal offset and Cards
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```ts
|
|
@@ -29,11 +29,11 @@ export declare type CanvasDepth = {
|
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
1: {
|
|
32
|
-
boxShadow: '0px
|
|
32
|
+
boxShadow: '0px 1px 4px rgba(0, 0, 0, 0.2), 0px 2px 8px rgba(0, 0, 0, 0.16)';
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* ### Depth 2
|
|
36
|
-
* Used for
|
|
36
|
+
* Used for Top navigation, Bottom navigation
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* ```ts
|
|
@@ -45,11 +45,11 @@ export declare type CanvasDepth = {
|
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
47
|
2: {
|
|
48
|
-
boxShadow: '0px
|
|
48
|
+
boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.2), 0px 4px 16px rgba(0, 0, 0, 0.16)';
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
51
51
|
* ### Depth 3
|
|
52
|
-
* Used for
|
|
52
|
+
* Used for FABs, Menus
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
55
|
* ```ts
|
|
@@ -61,11 +61,11 @@ export declare type CanvasDepth = {
|
|
|
61
61
|
* ```
|
|
62
62
|
*/
|
|
63
63
|
3: {
|
|
64
|
-
boxShadow: '0px
|
|
64
|
+
boxShadow: '0px 3px 12px rgba(0, 0, 0, 0.2), 0px 6px 24px rgba(0, 0, 0, 0.16)';
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
67
|
* ### Depth 4
|
|
68
|
-
*
|
|
68
|
+
*
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* ```ts
|
|
@@ -77,8 +77,39 @@ export declare type CanvasDepth = {
|
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
79
|
4: {
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
boxShadow: '0px 4px 16px rgba(0, 0, 0, 0.2), 0px 8px 32px rgba(0, 0, 0, 0.16)';
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* ### Depth 5
|
|
84
|
+
* Used for Popups, Toast Messages, Dialogs, Side Panels without opacity overlay behavior
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
89
|
+
*
|
|
90
|
+
* const cardStyles = {
|
|
91
|
+
* ...depth[5],
|
|
92
|
+
* };
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
5: {
|
|
96
|
+
boxShadow: '0px 5px 20px rgba(0, 0, 0, 0.2), 0px 10px 40px rgba(0, 0, 0, 0.16)';
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* ### Depth 6
|
|
100
|
+
* Used for components with opacity overlay behavior such as Modal or Side Panels
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
105
|
+
*
|
|
106
|
+
* const cardStyles = {
|
|
107
|
+
* ...depth[6],
|
|
108
|
+
* };
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
6: {
|
|
112
|
+
boxShadow: '0px 6px 24px rgba(0, 0, 0, 0.2), 0px 12px 48px rgba(0, 0, 0, 0.16)';
|
|
82
113
|
};
|
|
83
114
|
};
|
|
84
115
|
declare type ValueOf<T> = T[keyof T];
|
|
@@ -88,8 +119,8 @@ export declare type CanvasDepthValues = ValueOf<CanvasDepth>;
|
|
|
88
119
|
*
|
|
89
120
|
* Depth is the relative distance between surfaces in the z-axis.
|
|
90
121
|
* It provides delineation, focus, and priority with shadows and layering.
|
|
91
|
-
* There are
|
|
92
|
-
*
|
|
122
|
+
* There are seven depth levels, `none`, `1`, `2`, `3`, `4`, `5` and `6`.
|
|
123
|
+
* `none` is a special value to remove depth styles. All other levels only apply box-shadow styles.
|
|
93
124
|
*
|
|
94
125
|
* @example
|
|
95
126
|
* ```tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depth.d.ts","sourceRoot":"","sources":["../../../../tokens/lib/depth.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG;IACxB;;;;;;;;;;;;OAYG;IACH,
|
|
1
|
+
{"version":3,"file":"depth.d.ts","sourceRoot":"","sources":["../../../../tokens/lib/depth.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG;IACxB;;;;;;;;;;;;OAYG;IACH,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,iEAAiE,CAAC;KAC9E,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,kEAAkE,CAAC;KAC/E,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,mEAAmE,CAAC;KAChF,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,mEAAmE,CAAC;KAChF,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,oEAAoE,CAAC;KACjF,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,oEAAoE,CAAC;KACjF,CAAC;CACH,CAAC;AAEF,aAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7B,oBAAY,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,KAAK,EAAE,WAsBnB,CAAC"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Depth is the relative distance between surfaces in the z-axis.
|
|
5
5
|
* It provides delineation, focus, and priority with shadows and layering.
|
|
6
|
-
* There are
|
|
7
|
-
*
|
|
6
|
+
* There are seven depth levels, `none`, `1`, `2`, `3`, `4`, `5` and `6`.
|
|
7
|
+
* `none` is a special value to remove depth styles. All other levels only apply box-shadow styles.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```tsx
|
|
@@ -21,20 +21,25 @@
|
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
23
|
export var depth = {
|
|
24
|
-
|
|
25
|
-
boxShadow: '
|
|
24
|
+
none: {
|
|
25
|
+
boxShadow: 'none',
|
|
26
26
|
},
|
|
27
27
|
1: {
|
|
28
|
-
boxShadow: '0px
|
|
28
|
+
boxShadow: '0px 1px 4px rgba(0, 0, 0, 0.2), 0px 2px 8px rgba(0, 0, 0, 0.16)',
|
|
29
29
|
},
|
|
30
30
|
2: {
|
|
31
|
-
boxShadow: '0px
|
|
31
|
+
boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.2), 0px 4px 16px rgba(0, 0, 0, 0.16)',
|
|
32
32
|
},
|
|
33
33
|
3: {
|
|
34
|
-
boxShadow: '0px
|
|
34
|
+
boxShadow: '0px 3px 12px rgba(0, 0, 0, 0.2), 0px 6px 24px rgba(0, 0, 0, 0.16)',
|
|
35
35
|
},
|
|
36
36
|
4: {
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
boxShadow: '0px 4px 16px rgba(0, 0, 0, 0.2), 0px 8px 32px rgba(0, 0, 0, 0.16)',
|
|
38
|
+
},
|
|
39
|
+
5: {
|
|
40
|
+
boxShadow: '0px 5px 20px rgba(0, 0, 0, 0.2), 0px 10px 40px rgba(0, 0, 0, 0.16)',
|
|
41
|
+
},
|
|
42
|
+
6: {
|
|
43
|
+
boxShadow: '0px 6px 24px rgba(0, 0, 0, 0.2), 0px 12px 48px rgba(0, 0, 0, 0.16)',
|
|
39
44
|
},
|
|
40
45
|
};
|
package/layout/lib/Box.tsx
CHANGED
|
@@ -112,7 +112,7 @@ const StyledBoxComponent = styled('div')<StyledType & BoxProps>(
|
|
|
112
112
|
*
|
|
113
113
|
* // `Card`'s default values are set using `BoxProps`
|
|
114
114
|
* const Card = (props: CardProps) => (
|
|
115
|
-
* <Box depth={
|
|
115
|
+
* <Box depth={1} padding="m" borderRadius="l" {...props}>Hello, Card!</Box>
|
|
116
116
|
* );
|
|
117
117
|
*
|
|
118
118
|
*/
|
package/layout/lib/Flex.tsx
CHANGED
|
@@ -28,7 +28,7 @@ const StyledFlex = styled(Box)<StyledType & FlexProps>(
|
|
|
28
28
|
*
|
|
29
29
|
* // `Card`'s default values are set using `FlexProps`
|
|
30
30
|
* const Card = (props: CardProps) => (
|
|
31
|
-
* <Flex flexDirection="column" alignItems="flex-start" depth={
|
|
31
|
+
* <Flex flexDirection="column" alignItems="flex-start" depth={1} space="m" {...props}>
|
|
32
32
|
* <h1>Hello, Card!</h1>
|
|
33
33
|
* <p>This card uses flexbox to set its layout.</p>
|
|
34
34
|
* </Flex>
|
package/modal/lib/ModalCard.tsx
CHANGED
|
@@ -14,7 +14,7 @@ export const ModalCard = createComponent('div')({
|
|
|
14
14
|
|
|
15
15
|
const props = useModalCard(localModel, elemProps, ref);
|
|
16
16
|
return (
|
|
17
|
-
<Popup.Card as={Element} width={440} borderWidth={0} margin="xl" {...props}>
|
|
17
|
+
<Popup.Card as={Element} width={440} borderWidth={0} margin="xl" depth={6} {...props}>
|
|
18
18
|
{children}
|
|
19
19
|
</Popup.Card>
|
|
20
20
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.79-next.7+578f91ad",
|
|
4
4
|
"description": "The parent module that contains all Workday Canvas Kit React components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"@emotion/styled": "^11.6.0",
|
|
58
58
|
"@popperjs/core": "^2.5.4",
|
|
59
59
|
"@workday/canvas-colors-web": "^2.0.0",
|
|
60
|
-
"@workday/canvas-kit-labs-react": "^7.0.0-alpha.
|
|
61
|
-
"@workday/canvas-kit-popup-stack": "^7.0.0-alpha.
|
|
62
|
-
"@workday/canvas-kit-preview-react": "^7.0.0-alpha.
|
|
60
|
+
"@workday/canvas-kit-labs-react": "^7.0.0-alpha.79-next.7+578f91ad",
|
|
61
|
+
"@workday/canvas-kit-popup-stack": "^7.0.0-alpha.79-next.7+578f91ad",
|
|
62
|
+
"@workday/canvas-kit-preview-react": "^7.0.0-alpha.79-next.7+578f91ad",
|
|
63
63
|
"@workday/canvas-system-icons-web": "1.0.41",
|
|
64
64
|
"@workday/design-assets-types": "^0.2.4",
|
|
65
65
|
"chroma-js": "^2.1.0",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"@workday/canvas-accent-icons-web": "^1.0.0",
|
|
78
78
|
"@workday/canvas-applet-icons-web": "^0.17.50"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "578f91adfde267929daf4f55b7a6463f8739421e"
|
|
81
81
|
}
|
package/popup/lib/PopupCard.tsx
CHANGED
package/toast/lib/Toast.tsx
CHANGED
package/tokens/README.md
CHANGED
|
@@ -174,16 +174,19 @@ const buttonSyles = {
|
|
|
174
174
|
|
|
175
175
|
## Depth
|
|
176
176
|
|
|
177
|
-
Depth is the relative distance between surfaces in the z-axis. It provides delineation, focus, and
|
|
177
|
+
Depth is the relative distance between surfaces in the z-axis. It provides delineation, focus, and
|
|
178
|
+
priority with shadows and layering. There are seven depth levels, `none`, `1`, `2`, `3`, `4`, `5`
|
|
179
|
+
and `6`. `none` is a special value to remove depth styles. All other levels only apply box-shadow
|
|
180
|
+
styles.
|
|
178
181
|
|
|
179
182
|
### Usage
|
|
180
183
|
|
|
181
184
|
```tsx
|
|
182
|
-
import {
|
|
185
|
+
import {depth} from '@workday/canvas-kit-react/tokens';
|
|
183
186
|
|
|
184
187
|
const CustomCard = () => {
|
|
185
|
-
return <div css={depth[
|
|
186
|
-
}
|
|
188
|
+
return <div css={depth[1]}>A standard-depth card</div>;
|
|
189
|
+
};
|
|
187
190
|
```
|
|
188
191
|
|
|
189
192
|
## Type
|
|
@@ -211,8 +214,8 @@ To use the Canvas Kit font
|
|
|
211
214
|
|
|
212
215
|
Canvas Kit v5 introduced `rem` units (instead of `px`) to our type tokens. This update follows the
|
|
213
216
|
guidance [from the WCAG spec](https://www.w3.org/TR/WCAG21/#resize-text) and provides better support
|
|
214
|
-
for users who change their browser's default font size. If you'd like to learn more about `rem` and
|
|
215
|
-
review this
|
|
217
|
+
for users who change their browser's default font size. If you'd like to learn more about `rem` and
|
|
218
|
+
relative units, you can review this
|
|
216
219
|
[documentation](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#ems_and_rems).
|
|
217
220
|
|
|
218
221
|
> **Note:** We are using `16px` as our base font-size for these values. This is a browser standard
|
|
@@ -299,8 +302,8 @@ _Intended for standard body text_
|
|
|
299
302
|
|
|
300
303
|
_Intended for small subtext content or in tight spaces_
|
|
301
304
|
|
|
302
|
-
| Size | Properties
|
|
303
|
-
| -------- |
|
|
305
|
+
| Size | Properties |
|
|
306
|
+
| -------- | ------------------------------------------------------------ |
|
|
304
307
|
| `large` | fontSize: `14px` (`0.875rem`), fontWeight: `regular` (`400`) |
|
|
305
308
|
| `medium` | fontSize: `12px` (`0.75rem`), fontWeight: `regular` (`400`) |
|
|
306
309
|
| `small` | fontSize: `10px` (`0.625rem`), fontWeight: `regular` (`400`) |
|
package/tokens/lib/depth.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export type CanvasDepth = {
|
|
2
2
|
/**
|
|
3
|
-
* ### Depth
|
|
4
|
-
* Used for
|
|
3
|
+
* ### Depth None
|
|
4
|
+
* Used for removing existing depth
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```ts
|
|
8
8
|
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
9
9
|
*
|
|
10
|
-
* const
|
|
11
|
-
* ...depth.
|
|
10
|
+
* const noDepthCardStyles = {
|
|
11
|
+
* ...depth.none,
|
|
12
12
|
* };
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
|
-
boxShadow: '
|
|
15
|
+
none: {
|
|
16
|
+
boxShadow: 'none';
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* ### Depth 1
|
|
20
|
-
* Used for minimal offset
|
|
20
|
+
* Used for minimal offset and Cards
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```ts
|
|
@@ -29,11 +29,11 @@ export type CanvasDepth = {
|
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
1: {
|
|
32
|
-
boxShadow: '0px
|
|
32
|
+
boxShadow: '0px 1px 4px rgba(0, 0, 0, 0.2), 0px 2px 8px rgba(0, 0, 0, 0.16)';
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* ### Depth 2
|
|
36
|
-
* Used for
|
|
36
|
+
* Used for Top navigation, Bottom navigation
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* ```ts
|
|
@@ -45,11 +45,11 @@ export type CanvasDepth = {
|
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
47
|
2: {
|
|
48
|
-
boxShadow: '0px
|
|
48
|
+
boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.2), 0px 4px 16px rgba(0, 0, 0, 0.16)';
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
51
51
|
* ### Depth 3
|
|
52
|
-
* Used for
|
|
52
|
+
* Used for FABs, Menus
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
55
|
* ```ts
|
|
@@ -61,11 +61,11 @@ export type CanvasDepth = {
|
|
|
61
61
|
* ```
|
|
62
62
|
*/
|
|
63
63
|
3: {
|
|
64
|
-
boxShadow: '0px
|
|
64
|
+
boxShadow: '0px 3px 12px rgba(0, 0, 0, 0.2), 0px 6px 24px rgba(0, 0, 0, 0.16)';
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
67
|
* ### Depth 4
|
|
68
|
-
*
|
|
68
|
+
*
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* ```ts
|
|
@@ -77,8 +77,39 @@ export type CanvasDepth = {
|
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
79
|
4: {
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
boxShadow: '0px 4px 16px rgba(0, 0, 0, 0.2), 0px 8px 32px rgba(0, 0, 0, 0.16)';
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* ### Depth 5
|
|
84
|
+
* Used for Popups, Toast Messages, Dialogs, Side Panels without opacity overlay behavior
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
89
|
+
*
|
|
90
|
+
* const cardStyles = {
|
|
91
|
+
* ...depth[5],
|
|
92
|
+
* };
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
5: {
|
|
96
|
+
boxShadow: '0px 5px 20px rgba(0, 0, 0, 0.2), 0px 10px 40px rgba(0, 0, 0, 0.16)';
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* ### Depth 6
|
|
100
|
+
* Used for components with opacity overlay behavior such as Modal or Side Panels
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
105
|
+
*
|
|
106
|
+
* const cardStyles = {
|
|
107
|
+
* ...depth[6],
|
|
108
|
+
* };
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
6: {
|
|
112
|
+
boxShadow: '0px 6px 24px rgba(0, 0, 0, 0.2), 0px 12px 48px rgba(0, 0, 0, 0.16)';
|
|
82
113
|
};
|
|
83
114
|
};
|
|
84
115
|
|
|
@@ -90,8 +121,8 @@ export type CanvasDepthValues = ValueOf<CanvasDepth>;
|
|
|
90
121
|
*
|
|
91
122
|
* Depth is the relative distance between surfaces in the z-axis.
|
|
92
123
|
* It provides delineation, focus, and priority with shadows and layering.
|
|
93
|
-
* There are
|
|
94
|
-
*
|
|
124
|
+
* There are seven depth levels, `none`, `1`, `2`, `3`, `4`, `5` and `6`.
|
|
125
|
+
* `none` is a special value to remove depth styles. All other levels only apply box-shadow styles.
|
|
95
126
|
*
|
|
96
127
|
* @example
|
|
97
128
|
* ```tsx
|
|
@@ -108,20 +139,25 @@ export type CanvasDepthValues = ValueOf<CanvasDepth>;
|
|
|
108
139
|
*
|
|
109
140
|
*/
|
|
110
141
|
export const depth: CanvasDepth = {
|
|
111
|
-
|
|
112
|
-
boxShadow: '
|
|
142
|
+
none: {
|
|
143
|
+
boxShadow: 'none',
|
|
113
144
|
},
|
|
114
145
|
1: {
|
|
115
|
-
boxShadow: '0px
|
|
146
|
+
boxShadow: '0px 1px 4px rgba(0, 0, 0, 0.2), 0px 2px 8px rgba(0, 0, 0, 0.16)',
|
|
116
147
|
},
|
|
117
148
|
2: {
|
|
118
|
-
boxShadow: '0px
|
|
149
|
+
boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.2), 0px 4px 16px rgba(0, 0, 0, 0.16)',
|
|
119
150
|
},
|
|
120
151
|
3: {
|
|
121
|
-
boxShadow: '0px
|
|
152
|
+
boxShadow: '0px 3px 12px rgba(0, 0, 0, 0.2), 0px 6px 24px rgba(0, 0, 0, 0.16)',
|
|
122
153
|
},
|
|
123
154
|
4: {
|
|
124
|
-
|
|
125
|
-
|
|
155
|
+
boxShadow: '0px 4px 16px rgba(0, 0, 0, 0.2), 0px 8px 32px rgba(0, 0, 0, 0.16)',
|
|
156
|
+
},
|
|
157
|
+
5: {
|
|
158
|
+
boxShadow: '0px 5px 20px rgba(0, 0, 0, 0.2), 0px 10px 40px rgba(0, 0, 0, 0.16)',
|
|
159
|
+
},
|
|
160
|
+
6: {
|
|
161
|
+
boxShadow: '0px 6px 24px rgba(0, 0, 0, 0.2), 0px 12px 48px rgba(0, 0, 0, 0.16)',
|
|
126
162
|
},
|
|
127
163
|
};
|
|
@@ -40,7 +40,7 @@ export declare const boxStyleFn: <P extends BoxProps>(props: P) => {};
|
|
|
40
40
|
*
|
|
41
41
|
* // `Card`'s default values are set using `BoxProps`
|
|
42
42
|
* const Card = (props: CardProps) => (
|
|
43
|
-
* <Box depth={
|
|
43
|
+
* <Box depth={1} padding="m" borderRadius="l" {...props}>Hello, Card!</Box>
|
|
44
44
|
* );
|
|
45
45
|
*
|
|
46
46
|
*/
|
|
@@ -15,7 +15,7 @@ export declare type FlexProps = BoxProps & FlexStyleProps;
|
|
|
15
15
|
*
|
|
16
16
|
* // `Card`'s default values are set using `FlexProps`
|
|
17
17
|
* const Card = (props: CardProps) => (
|
|
18
|
-
* <Flex flexDirection="column" alignItems="flex-start" depth={
|
|
18
|
+
* <Flex flexDirection="column" alignItems="flex-start" depth={1} space="m" {...props}>
|
|
19
19
|
* <h1>Hello, Card!</h1>
|
|
20
20
|
* <p>This card uses flexbox to set its layout.</p>
|
|
21
21
|
* </Flex>
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export declare type CanvasDepth = {
|
|
2
2
|
/**
|
|
3
|
-
* ### Depth
|
|
4
|
-
* Used for
|
|
3
|
+
* ### Depth None
|
|
4
|
+
* Used for removing existing depth
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```ts
|
|
8
8
|
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
9
9
|
*
|
|
10
|
-
* const
|
|
11
|
-
* ...depth.
|
|
10
|
+
* const noDepthCardStyles = {
|
|
11
|
+
* ...depth.none,
|
|
12
12
|
* };
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
|
-
boxShadow: '
|
|
15
|
+
none: {
|
|
16
|
+
boxShadow: 'none';
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* ### Depth 1
|
|
20
|
-
* Used for minimal offset
|
|
20
|
+
* Used for minimal offset and Cards
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```ts
|
|
@@ -29,11 +29,11 @@ export declare type CanvasDepth = {
|
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
1: {
|
|
32
|
-
boxShadow: '0px
|
|
32
|
+
boxShadow: '0px 1px 4px rgba(0, 0, 0, 0.2), 0px 2px 8px rgba(0, 0, 0, 0.16)';
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* ### Depth 2
|
|
36
|
-
* Used for
|
|
36
|
+
* Used for Top navigation, Bottom navigation
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* ```ts
|
|
@@ -45,11 +45,11 @@ export declare type CanvasDepth = {
|
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
47
|
2: {
|
|
48
|
-
boxShadow: '0px
|
|
48
|
+
boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.2), 0px 4px 16px rgba(0, 0, 0, 0.16)';
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
51
51
|
* ### Depth 3
|
|
52
|
-
* Used for
|
|
52
|
+
* Used for FABs, Menus
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
55
|
* ```ts
|
|
@@ -61,11 +61,11 @@ export declare type CanvasDepth = {
|
|
|
61
61
|
* ```
|
|
62
62
|
*/
|
|
63
63
|
3: {
|
|
64
|
-
boxShadow: '0px
|
|
64
|
+
boxShadow: '0px 3px 12px rgba(0, 0, 0, 0.2), 0px 6px 24px rgba(0, 0, 0, 0.16)';
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
67
|
* ### Depth 4
|
|
68
|
-
*
|
|
68
|
+
*
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* ```ts
|
|
@@ -77,8 +77,39 @@ export declare type CanvasDepth = {
|
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
79
|
4: {
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
boxShadow: '0px 4px 16px rgba(0, 0, 0, 0.2), 0px 8px 32px rgba(0, 0, 0, 0.16)';
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* ### Depth 5
|
|
84
|
+
* Used for Popups, Toast Messages, Dialogs, Side Panels without opacity overlay behavior
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
89
|
+
*
|
|
90
|
+
* const cardStyles = {
|
|
91
|
+
* ...depth[5],
|
|
92
|
+
* };
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
5: {
|
|
96
|
+
boxShadow: '0px 5px 20px rgba(0, 0, 0, 0.2), 0px 10px 40px rgba(0, 0, 0, 0.16)';
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* ### Depth 6
|
|
100
|
+
* Used for components with opacity overlay behavior such as Modal or Side Panels
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
105
|
+
*
|
|
106
|
+
* const cardStyles = {
|
|
107
|
+
* ...depth[6],
|
|
108
|
+
* };
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
6: {
|
|
112
|
+
boxShadow: '0px 6px 24px rgba(0, 0, 0, 0.2), 0px 12px 48px rgba(0, 0, 0, 0.16)';
|
|
82
113
|
};
|
|
83
114
|
};
|
|
84
115
|
declare type ValueOf<T> = T[keyof T];
|
|
@@ -88,8 +119,8 @@ export declare type CanvasDepthValues = ValueOf<CanvasDepth>;
|
|
|
88
119
|
*
|
|
89
120
|
* Depth is the relative distance between surfaces in the z-axis.
|
|
90
121
|
* It provides delineation, focus, and priority with shadows and layering.
|
|
91
|
-
* There are
|
|
92
|
-
*
|
|
122
|
+
* There are seven depth levels, `none`, `1`, `2`, `3`, `4`, `5` and `6`.
|
|
123
|
+
* `none` is a special value to remove depth styles. All other levels only apply box-shadow styles.
|
|
93
124
|
*
|
|
94
125
|
* @example
|
|
95
126
|
* ```tsx
|
|
@@ -40,7 +40,7 @@ export declare const boxStyleFn: <P extends BoxProps>(props: P) => {};
|
|
|
40
40
|
*
|
|
41
41
|
* // `Card`'s default values are set using `BoxProps`
|
|
42
42
|
* const Card = (props: CardProps) => (
|
|
43
|
-
* <Box depth={
|
|
43
|
+
* <Box depth={1} padding="m" borderRadius="l" {...props}>Hello, Card!</Box>
|
|
44
44
|
* );
|
|
45
45
|
*
|
|
46
46
|
*/
|
|
@@ -15,7 +15,7 @@ export declare type FlexProps = BoxProps & FlexStyleProps;
|
|
|
15
15
|
*
|
|
16
16
|
* // `Card`'s default values are set using `FlexProps`
|
|
17
17
|
* const Card = (props: CardProps) => (
|
|
18
|
-
* <Flex flexDirection="column" alignItems="flex-start" depth={
|
|
18
|
+
* <Flex flexDirection="column" alignItems="flex-start" depth={1} space="m" {...props}>
|
|
19
19
|
* <h1>Hello, Card!</h1>
|
|
20
20
|
* <p>This card uses flexbox to set its layout.</p>
|
|
21
21
|
* </Flex>
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export declare type CanvasDepth = {
|
|
2
2
|
/**
|
|
3
|
-
* ### Depth
|
|
4
|
-
* Used for
|
|
3
|
+
* ### Depth None
|
|
4
|
+
* Used for removing existing depth
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```ts
|
|
8
8
|
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
9
9
|
*
|
|
10
|
-
* const
|
|
11
|
-
* ...depth.
|
|
10
|
+
* const noDepthCardStyles = {
|
|
11
|
+
* ...depth.none,
|
|
12
12
|
* };
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
|
-
boxShadow: '
|
|
15
|
+
none: {
|
|
16
|
+
boxShadow: 'none';
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* ### Depth 1
|
|
20
|
-
* Used for minimal offset
|
|
20
|
+
* Used for minimal offset and Cards
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```ts
|
|
@@ -29,11 +29,11 @@ export declare type CanvasDepth = {
|
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
1: {
|
|
32
|
-
boxShadow: '0px
|
|
32
|
+
boxShadow: '0px 1px 4px rgba(0, 0, 0, 0.2), 0px 2px 8px rgba(0, 0, 0, 0.16)';
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* ### Depth 2
|
|
36
|
-
* Used for
|
|
36
|
+
* Used for Top navigation, Bottom navigation
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* ```ts
|
|
@@ -45,11 +45,11 @@ export declare type CanvasDepth = {
|
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
47
|
2: {
|
|
48
|
-
boxShadow: '0px
|
|
48
|
+
boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.2), 0px 4px 16px rgba(0, 0, 0, 0.16)';
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
51
51
|
* ### Depth 3
|
|
52
|
-
* Used for
|
|
52
|
+
* Used for FABs, Menus
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
55
|
* ```ts
|
|
@@ -61,11 +61,11 @@ export declare type CanvasDepth = {
|
|
|
61
61
|
* ```
|
|
62
62
|
*/
|
|
63
63
|
3: {
|
|
64
|
-
boxShadow: '0px
|
|
64
|
+
boxShadow: '0px 3px 12px rgba(0, 0, 0, 0.2), 0px 6px 24px rgba(0, 0, 0, 0.16)';
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
67
|
* ### Depth 4
|
|
68
|
-
*
|
|
68
|
+
*
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* ```ts
|
|
@@ -77,8 +77,39 @@ export declare type CanvasDepth = {
|
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
79
|
4: {
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
boxShadow: '0px 4px 16px rgba(0, 0, 0, 0.2), 0px 8px 32px rgba(0, 0, 0, 0.16)';
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* ### Depth 5
|
|
84
|
+
* Used for Popups, Toast Messages, Dialogs, Side Panels without opacity overlay behavior
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
89
|
+
*
|
|
90
|
+
* const cardStyles = {
|
|
91
|
+
* ...depth[5],
|
|
92
|
+
* };
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
5: {
|
|
96
|
+
boxShadow: '0px 5px 20px rgba(0, 0, 0, 0.2), 0px 10px 40px rgba(0, 0, 0, 0.16)';
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* ### Depth 6
|
|
100
|
+
* Used for components with opacity overlay behavior such as Modal or Side Panels
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
105
|
+
*
|
|
106
|
+
* const cardStyles = {
|
|
107
|
+
* ...depth[6],
|
|
108
|
+
* };
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
6: {
|
|
112
|
+
boxShadow: '0px 6px 24px rgba(0, 0, 0, 0.2), 0px 12px 48px rgba(0, 0, 0, 0.16)';
|
|
82
113
|
};
|
|
83
114
|
};
|
|
84
115
|
declare type ValueOf<T> = T[keyof T];
|
|
@@ -88,8 +119,8 @@ export declare type CanvasDepthValues = ValueOf<CanvasDepth>;
|
|
|
88
119
|
*
|
|
89
120
|
* Depth is the relative distance between surfaces in the z-axis.
|
|
90
121
|
* It provides delineation, focus, and priority with shadows and layering.
|
|
91
|
-
* There are
|
|
92
|
-
*
|
|
122
|
+
* There are seven depth levels, `none`, `1`, `2`, `3`, `4`, `5` and `6`.
|
|
123
|
+
* `none` is a special value to remove depth styles. All other levels only apply box-shadow styles.
|
|
93
124
|
*
|
|
94
125
|
* @example
|
|
95
126
|
* ```tsx
|