@workday/canvas-kit-react 7.0.0-alpha.78-next.6 → 7.0.0-alpha.81-next.9

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 (56) hide show
  1. package/button/lib/BaseButton.tsx +2 -2
  2. package/button/lib/SecondaryButton.tsx +2 -3
  3. package/card/lib/Card.tsx +1 -1
  4. package/dist/commonjs/button/lib/BaseButton.js +2 -2
  5. package/dist/commonjs/button/lib/SecondaryButton.d.ts.map +1 -1
  6. package/dist/commonjs/button/lib/SecondaryButton.js +2 -3
  7. package/dist/commonjs/card/lib/Card.js +1 -1
  8. package/dist/commonjs/layout/lib/Box.d.ts +1 -1
  9. package/dist/commonjs/layout/lib/Box.js +1 -1
  10. package/dist/commonjs/layout/lib/Flex.d.ts +1 -1
  11. package/dist/commonjs/layout/lib/Flex.js +1 -1
  12. package/dist/commonjs/modal/lib/ModalCard.js +1 -1
  13. package/dist/commonjs/popup/lib/Popper.d.ts +1 -9
  14. package/dist/commonjs/popup/lib/Popper.d.ts.map +1 -1
  15. package/dist/commonjs/popup/lib/Popper.js +2 -2
  16. package/dist/commonjs/popup/lib/PopupCard.js +1 -1
  17. package/dist/commonjs/toast/lib/Toast.d.ts.map +1 -1
  18. package/dist/commonjs/toast/lib/Toast.js +1 -1
  19. package/dist/commonjs/tokens/lib/depth.d.ts +48 -17
  20. package/dist/commonjs/tokens/lib/depth.d.ts.map +1 -1
  21. package/dist/commonjs/tokens/lib/depth.js +14 -9
  22. package/dist/es6/button/lib/BaseButton.js +2 -2
  23. package/dist/es6/button/lib/SecondaryButton.d.ts.map +1 -1
  24. package/dist/es6/button/lib/SecondaryButton.js +2 -3
  25. package/dist/es6/card/lib/Card.js +1 -1
  26. package/dist/es6/layout/lib/Box.d.ts +1 -1
  27. package/dist/es6/layout/lib/Box.js +1 -1
  28. package/dist/es6/layout/lib/Flex.d.ts +1 -1
  29. package/dist/es6/layout/lib/Flex.js +1 -1
  30. package/dist/es6/modal/lib/ModalCard.js +1 -1
  31. package/dist/es6/popup/lib/Popper.d.ts +1 -9
  32. package/dist/es6/popup/lib/Popper.d.ts.map +1 -1
  33. package/dist/es6/popup/lib/Popper.js +2 -2
  34. package/dist/es6/popup/lib/PopupCard.js +1 -1
  35. package/dist/es6/toast/lib/Toast.d.ts.map +1 -1
  36. package/dist/es6/toast/lib/Toast.js +1 -1
  37. package/dist/es6/tokens/lib/depth.d.ts +48 -17
  38. package/dist/es6/tokens/lib/depth.d.ts.map +1 -1
  39. package/dist/es6/tokens/lib/depth.js +14 -9
  40. package/layout/lib/Box.tsx +1 -1
  41. package/layout/lib/Flex.tsx +1 -1
  42. package/modal/lib/ModalCard.tsx +1 -1
  43. package/package.json +5 -5
  44. package/popup/lib/Popper.tsx +2 -11
  45. package/popup/lib/PopupCard.tsx +1 -1
  46. package/toast/lib/Toast.tsx +1 -0
  47. package/tokens/README.md +11 -8
  48. package/tokens/lib/depth.ts +60 -24
  49. package/ts3.5/dist/commonjs/layout/lib/Box.d.ts +1 -1
  50. package/ts3.5/dist/commonjs/layout/lib/Flex.d.ts +1 -1
  51. package/ts3.5/dist/commonjs/popup/lib/Popper.d.ts +1 -9
  52. package/ts3.5/dist/commonjs/tokens/lib/depth.d.ts +48 -17
  53. package/ts3.5/dist/es6/layout/lib/Box.d.ts +1 -1
  54. package/ts3.5/dist/es6/layout/lib/Flex.d.ts +1 -1
  55. package/ts3.5/dist/es6/popup/lib/Popper.d.ts +1 -9
  56. package/ts3.5/dist/es6/tokens/lib/depth.d.ts +48 -17
@@ -267,8 +267,8 @@ export const getPaddingStyles = (
267
267
  case 'small':
268
268
  return icon
269
269
  ? iconPosition === 'start'
270
- ? `0 20px 0 ${space.s}`
271
- : `0 ${space.s} 0 20px`
270
+ ? `0 ${space.s} 0 ${space.xs}`
271
+ : `0 ${space.xs} 0 ${space.s}`
272
272
  : `0 ${space.s}`;
273
273
 
274
274
  case 'extraSmall':
@@ -162,12 +162,11 @@ export const getSecondaryButtonColors = (
162
162
  focus: {
163
163
  background: colors.frenchVanilla100,
164
164
  icon: colors.blackPepper500,
165
- border: colors.blackPepper400,
166
165
  label: colors.blackPepper500,
167
166
  focusRing: focusRing(
168
167
  {
169
- separation: 1,
170
- innerColor: colors.blackPepper400,
168
+ separation: 2,
169
+ innerColor: 'currentColor',
171
170
  outerColor: colors.frenchVanilla100,
172
171
  },
173
172
  theme
package/card/lib/Card.tsx CHANGED
@@ -21,7 +21,7 @@ export const Card = createComponent('div')({
21
21
  <Box
22
22
  ref={ref}
23
23
  as={Element}
24
- depth={2}
24
+ depth={1}
25
25
  padding="l"
26
26
  backgroundColor="frenchVanilla100"
27
27
  border={`1px solid ${colors.soap500}`}
@@ -167,8 +167,8 @@ var getPaddingStyles = function (children, size, icon, iconPosition) {
167
167
  case 'small':
168
168
  return icon
169
169
  ? iconPosition === 'start'
170
- ? "0 20px 0 " + tokens_1.space.s
171
- : "0 " + tokens_1.space.s + " 0 20px"
170
+ ? "0 " + tokens_1.space.s + " 0 " + tokens_1.space.xs
171
+ : "0 " + tokens_1.space.xs + " 0 " + tokens_1.space.s
172
172
  : "0 " + tokens_1.space.s;
173
173
  case 'extraSmall':
174
174
  return icon
@@ -1 +1 @@
1
- {"version":3,"file":"SecondaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/SecondaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EACL,cAAc,EAEd,SAAS,EACT,kBAAkB,EAGnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AAGjE,MAAM,WAAW,oBAAqB,SAAQ,SAAS,EAAE,cAAc;IACrE;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;;;OAKG;IACH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SecondaryButtonColors = function (variant, theme) {
117
117
  focus: {
118
118
  background: tokens_1.colors.frenchVanilla100,
119
119
  icon: tokens_1.colors.blackPepper500,
120
- border: tokens_1.colors.blackPepper400,
121
120
  label: tokens_1.colors.blackPepper500,
122
121
  focusRing: common_1.focusRing({
123
- separation: 1,
124
- innerColor: tokens_1.colors.blackPepper400,
122
+ separation: 2,
123
+ innerColor: 'currentColor',
125
124
  outerColor: tokens_1.colors.frenchVanilla100,
126
125
  }, theme),
127
126
  },
@@ -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: 2, padding: "l", backgroundColor: "frenchVanilla100", border: "1px solid " + tokens_1.colors.soap500, borderRadius: "l" }, elemProps), children));
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={2} padding="m" borderRadius="l" {...props}>Hello, Card!</Box>
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={2} padding="m" borderRadius="l" {...props}>Hello, Card!</Box>
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={2} space="m" {...props}>
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={2} space="m" {...props}>
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
  });
@@ -18,14 +18,6 @@ export interface PopperProps {
18
18
  children: ((props: {
19
19
  placement: Placement;
20
20
  }) => React.ReactNode) | React.ReactNode;
21
- /**
22
- * The element that contains the portal children when `portal` is true. It is best to not define
23
- * this unless you know what you're doing. Popper works with a PopupStack and in order for
24
- * z-indexes to work correctly, all Popups on your page should live on the same root element
25
- * otherwise you risk running into rendering issues:
26
- * https://philipwalton.com/articles/what-no-one-told-you-about-z-index/
27
- */
28
- containerElement?: Element | null;
29
21
  /**
30
22
  * When provided, this optional callback will be used to determine positioning for the Popper element
31
23
  * instead of calling `getBoundingClientRect` on the `anchorElement` prop. Use this when you need
@@ -58,7 +50,7 @@ export interface PopperProps {
58
50
  */
59
51
  popperOptions?: Partial<PopperOptions>;
60
52
  /**
61
- * If true, attach the Popper to the `containerElement`. If false, render the Popper within the
53
+ * If false, render the Popper within the
62
54
  * DOM hierarchy of its parent. A non-portal Popper will constrained by the parent container
63
55
  * overflows. If you set this to `false`, you may experience issues where you content gets cut off
64
56
  * by scrollbars or `overflow: hidden`
@@ -1 +1 @@
1
- {"version":3,"file":"Popper.d.ts","sourceRoot":"","sources":["../../../../popup/lib/Popper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,oBAAY,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;AAC3C,oBAAY,aAAa,GAAG,QAAQ,CAAC,OAAO,CAAC;AAK7C,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC;IAC1D;;;;;OAKG;IACH,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE;QAAC,SAAS,EAAE,SAAS,CAAA;KAAC,KAAK,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;IACjF;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAC;IACpC;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;OAKG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IACnD;;O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G,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;CAClD;AAED,eAAO,MAAM,MAAM,oFAQlB,CAAC"}
@@ -77,7 +77,7 @@ var defaultPopperOptions = {};
77
77
  // Popper bails early if `open` is false and React hooks cannot be called conditionally,
78
78
  // so we're breaking out the open version into another component.
79
79
  var OpenPopper = React.forwardRef(function (_a, ref) {
80
- var anchorElement = _a.anchorElement, getAnchorClientRect = _a.getAnchorClientRect, _b = _a.popperOptions, popperOptions = _b === void 0 ? defaultPopperOptions : _b, _c = _a.placement, popperPlacement = _c === void 0 ? 'bottom' : _c, onPlacementChange = _a.onPlacementChange, children = _a.children, portal = _a.portal, containerElement = _a.containerElement, popperInstanceRef = _a.popperInstanceRef;
80
+ var anchorElement = _a.anchorElement, getAnchorClientRect = _a.getAnchorClientRect, _b = _a.popperOptions, popperOptions = _b === void 0 ? defaultPopperOptions : _b, _c = _a.placement, popperPlacement = _c === void 0 ? 'bottom' : _c, onPlacementChange = _a.onPlacementChange, children = _a.children, portal = _a.portal, popperInstanceRef = _a.popperInstanceRef;
81
81
  var firstRender = React.useRef(true);
82
82
  var _d = common_1.useLocalRef(popperInstanceRef), localRef = _d.localRef, elementRef = _d.elementRef;
83
83
  var _e = React.useState(popperPlacement), placement = _e[0], setPlacement = _e[1];
@@ -128,7 +128,7 @@ var OpenPopper = React.forwardRef(function (_a, ref) {
128
128
  if (!portal) {
129
129
  return contents;
130
130
  }
131
- return ReactDOM.createPortal(contents, containerElement || stackRef.current);
131
+ return ReactDOM.createPortal(contents, stackRef.current);
132
132
  });
133
133
  // Typescript threw an error about non-callable signatures. Using typeof as a 'function' returns
134
134
  // a type of `Function` which isn't descriptive enough for Typescript. We don't do any detection
@@ -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: 2, maxWidth: "calc(100vw - " + tokens_1.space.l + ")", spacing: 0, flexDirection: "column", minHeight: 0, maxHeight: "calc(100vh - " + (elemProps.margin
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,4DA6ChB,CAAC"}
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 Inset
4
- * Used for inset containers
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 insetCardStyles = {
11
- * ...depth.inset,
10
+ * const noDepthCardStyles = {
11
+ * ...depth.none,
12
12
  * };
13
13
  * ```
14
14
  */
15
- inset: {
16
- boxShadow: 'inset 0px 0px 8px 0 rgba(82, 97, 115, 0.09)';
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 2px 4px 0 rgba(0, 0, 0, 0.08)';
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 Cards, Popups, and Menus — our most common depth
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 4px 8px 0 rgba(0, 0, 0, 0.1)';
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 interactive Cards on hover
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 8px 16px 0 rgba(0, 0, 0, 0.12)';
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
- * Used for Cards on white backgrounds — adds border styles for more contrast
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
- border: '1px solid rgba(218, 226, 230, 1)';
81
- boxShadow: '0px 8px 16px 0 rgba(0, 0, 0, 0.12)';
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 five depth levels, `inset`, `1`, `2`, `3`, and `4`.
92
- * Most levels only apply box-shadow styles, but `depth[4]` also applies border styles.
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,KAAK,EAAE;QACL,SAAS,EAAE,6CAA6C,CAAC;KAC1D,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,mCAAmC,CAAC;KAChD,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,kCAAkC,CAAC;KAC/C,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,oCAAoC,CAAC;KACjD,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,MAAM,EAAE,kCAAkC,CAAC;QAC3C,SAAS,EAAE,oCAAoC,CAAC;KACjD,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,WAiBnB,CAAC"}
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 five depth levels, `inset`, `1`, `2`, `3`, and `4`.
10
- * Most levels only apply box-shadow styles, but `depth[4]` also applies border styles.
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
- inset: {
28
- boxShadow: 'inset 0px 0px 8px 0 rgba(82, 97, 115, 0.09)',
27
+ none: {
28
+ boxShadow: 'none',
29
29
  },
30
30
  1: {
31
- boxShadow: '0px 2px 4px 0 rgba(0, 0, 0, 0.08)',
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 4px 8px 0 rgba(0, 0, 0, 0.1)',
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 8px 16px 0 rgba(0, 0, 0, 0.12)',
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
- border: '1px solid rgba(218, 226, 230, 1)',
41
- boxShadow: '0px 8px 16px 0 rgba(0, 0, 0, 0.12)',
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
  };
@@ -144,8 +144,8 @@ export var getPaddingStyles = function (children, size, icon, iconPosition) {
144
144
  case 'small':
145
145
  return icon
146
146
  ? iconPosition === 'start'
147
- ? "0 20px 0 " + space.s
148
- : "0 " + space.s + " 0 20px"
147
+ ? "0 " + space.s + " 0 " + space.xs
148
+ : "0 " + space.xs + " 0 " + space.s
149
149
  : "0 " + space.s;
150
150
  case 'extraSmall':
151
151
  return icon
@@ -1 +1 @@
1
- {"version":3,"file":"SecondaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/SecondaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EACL,cAAc,EAEd,SAAS,EACT,kBAAkB,EAGnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AAGjE,MAAM,WAAW,oBAAqB,SAAQ,SAAS,EAAE,cAAc;IACrE;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;;OAIG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,eAAe,yEA+C1B,CAAC;AAEH,eAAO,MAAM,wBAAwB,YAC1B,SAAS,GAAG,SAAS,SACvB,kBAAkB,KACxB,YAqFF,CAAC"}
1
+ {"version":3,"file":"SecondaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/SecondaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EACL,cAAc,EAEd,SAAS,EACT,kBAAkB,EAGnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AAGjE,MAAM,WAAW,oBAAqB,SAAQ,SAAS,EAAE,cAAc;IACrE;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;;OAIG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,eAAe,yEA+C1B,CAAC;AAEH,eAAO,MAAM,wBAAwB,YAC1B,SAAS,GAAG,SAAS,SACvB,kBAAkB,KACxB,YAoFF,CAAC"}
@@ -95,11 +95,10 @@ export var getSecondaryButtonColors = function (variant, theme) {
95
95
  focus: {
96
96
  background: colors.frenchVanilla100,
97
97
  icon: colors.blackPepper500,
98
- border: colors.blackPepper400,
99
98
  label: colors.blackPepper500,
100
99
  focusRing: focusRing({
101
- separation: 1,
102
- innerColor: colors.blackPepper400,
100
+ separation: 2,
101
+ innerColor: 'currentColor',
103
102
  outerColor: colors.frenchVanilla100,
104
103
  }, theme),
105
104
  },
@@ -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: 2, padding: "l", backgroundColor: "frenchVanilla100", border: "1px solid " + colors.soap500, borderRadius: "l" }, elemProps), children));
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={2} padding="m" borderRadius="l" {...props}>Hello, Card!</Box>
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={2} padding="m" borderRadius="l" {...props}>Hello, Card!</Box>
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={2} space="m" {...props}>
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={2} space="m" {...props}>
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
  });
@@ -18,14 +18,6 @@ export interface PopperProps {
18
18
  children: ((props: {
19
19
  placement: Placement;
20
20
  }) => React.ReactNode) | React.ReactNode;
21
- /**
22
- * The element that contains the portal children when `portal` is true. It is best to not define
23
- * this unless you know what you're doing. Popper works with a PopupStack and in order for
24
- * z-indexes to work correctly, all Popups on your page should live on the same root element
25
- * otherwise you risk running into rendering issues:
26
- * https://philipwalton.com/articles/what-no-one-told-you-about-z-index/
27
- */
28
- containerElement?: Element | null;
29
21
  /**
30
22
  * When provided, this optional callback will be used to determine positioning for the Popper element
31
23
  * instead of calling `getBoundingClientRect` on the `anchorElement` prop. Use this when you need
@@ -58,7 +50,7 @@ export interface PopperProps {
58
50
  */
59
51
  popperOptions?: Partial<PopperOptions>;
60
52
  /**
61
- * If true, attach the Popper to the `containerElement`. If false, render the Popper within the
53
+ * If false, render the Popper within the
62
54
  * DOM hierarchy of its parent. A non-portal Popper will constrained by the parent container
63
55
  * overflows. If you set this to `false`, you may experience issues where you content gets cut off
64
56
  * by scrollbars or `overflow: hidden`
@@ -1 +1 @@
1
- {"version":3,"file":"Popper.d.ts","sourceRoot":"","sources":["../../../../popup/lib/Popper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,oBAAY,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;AAC3C,oBAAY,aAAa,GAAG,QAAQ,CAAC,OAAO,CAAC;AAK7C,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC;IAC1D;;;;;OAKG;IACH,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE;QAAC,SAAS,EAAE,SAAS,CAAA;KAAC,KAAK,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;IACjF;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,OAAO,G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,SAAS,CAAC;IACtB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IACnD;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACvC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;CAClD;AAED,eAAO,MAAM,MAAM,oFAQlB,CAAC"}
@@ -55,7 +55,7 @@ var defaultPopperOptions = {};
55
55
  // Popper bails early if `open` is false and React hooks cannot be called conditionally,
56
56
  // so we're breaking out the open version into another component.
57
57
  var OpenPopper = React.forwardRef(function (_a, ref) {
58
- var anchorElement = _a.anchorElement, getAnchorClientRect = _a.getAnchorClientRect, _b = _a.popperOptions, popperOptions = _b === void 0 ? defaultPopperOptions : _b, _c = _a.placement, popperPlacement = _c === void 0 ? 'bottom' : _c, onPlacementChange = _a.onPlacementChange, children = _a.children, portal = _a.portal, containerElement = _a.containerElement, popperInstanceRef = _a.popperInstanceRef;
58
+ var anchorElement = _a.anchorElement, getAnchorClientRect = _a.getAnchorClientRect, _b = _a.popperOptions, popperOptions = _b === void 0 ? defaultPopperOptions : _b, _c = _a.placement, popperPlacement = _c === void 0 ? 'bottom' : _c, onPlacementChange = _a.onPlacementChange, children = _a.children, portal = _a.portal, popperInstanceRef = _a.popperInstanceRef;
59
59
  var firstRender = React.useRef(true);
60
60
  var _d = useLocalRef(popperInstanceRef), localRef = _d.localRef, elementRef = _d.elementRef;
61
61
  var _e = React.useState(popperPlacement), placement = _e[0], setPlacement = _e[1];
@@ -106,7 +106,7 @@ var OpenPopper = React.forwardRef(function (_a, ref) {
106
106
  if (!portal) {
107
107
  return contents;
108
108
  }
109
- return ReactDOM.createPortal(contents, containerElement || stackRef.current);
109
+ return ReactDOM.createPortal(contents, stackRef.current);
110
110
  });
111
111
  // Typescript threw an error about non-callable signatures. Using typeof as a 'function' returns
112
112
  // a type of `Function` which isn't descriptive enough for Typescript. We don't do any detection
@@ -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: 2, maxWidth: "calc(100vw - " + space.l + ")", spacing: 0, flexDirection: "column", minHeight: 0, maxHeight: "calc(100vh - " + (elemProps.margin
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,4DA6ChB,CAAC"}
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 },