@workday/canvas-kit-labs-react 8.0.0 → 8.0.1

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 (244) hide show
  1. package/combobox/README.md +4 -4
  2. package/combobox/index.ts +0 -4
  3. package/combobox/lib/AutocompleteList.tsx +5 -8
  4. package/combobox/lib/Combobox.tsx +14 -20
  5. package/combobox/lib/Status.tsx +1 -3
  6. package/common/index.ts +0 -2
  7. package/common/lib/theming/useThemeRTL.ts +11 -13
  8. package/dist/commonjs/combobox/index.d.ts +0 -3
  9. package/dist/commonjs/combobox/index.d.ts.map +1 -1
  10. package/dist/commonjs/combobox/index.js +0 -7
  11. package/dist/commonjs/combobox/lib/AutocompleteList.d.ts +4 -5
  12. package/dist/commonjs/combobox/lib/AutocompleteList.d.ts.map +1 -1
  13. package/dist/commonjs/combobox/lib/AutocompleteList.js +2 -1
  14. package/dist/commonjs/combobox/lib/Combobox.d.ts +4 -6
  15. package/dist/commonjs/combobox/lib/Combobox.d.ts.map +1 -1
  16. package/dist/commonjs/combobox/lib/Combobox.js +8 -12
  17. package/dist/commonjs/combobox/lib/Status.d.ts +1 -2
  18. package/dist/commonjs/combobox/lib/Status.d.ts.map +1 -1
  19. package/dist/commonjs/combobox/lib/Status.js +2 -1
  20. package/dist/commonjs/common/index.d.ts +0 -2
  21. package/dist/commonjs/common/index.d.ts.map +1 -1
  22. package/dist/commonjs/common/index.js +0 -5
  23. package/dist/commonjs/common/lib/theming/useThemeRTL.d.ts.map +1 -1
  24. package/dist/commonjs/common/lib/theming/useThemeRTL.js +6 -8
  25. package/dist/commonjs/drawer/index.d.ts +1 -4
  26. package/dist/commonjs/drawer/index.d.ts.map +1 -1
  27. package/dist/commonjs/drawer/index.js +3 -9
  28. package/dist/commonjs/drawer/lib/Drawer.d.ts +39 -14
  29. package/dist/commonjs/drawer/lib/Drawer.d.ts.map +1 -1
  30. package/dist/commonjs/drawer/lib/Drawer.js +39 -21
  31. package/dist/commonjs/drawer/lib/DrawerHeader.d.ts +24 -7
  32. package/dist/commonjs/drawer/lib/DrawerHeader.d.ts.map +1 -1
  33. package/dist/commonjs/drawer/lib/DrawerHeader.js +22 -14
  34. package/dist/commonjs/expandable/index.d.ts +3 -0
  35. package/dist/commonjs/expandable/index.d.ts.map +1 -0
  36. package/dist/commonjs/expandable/index.js +14 -0
  37. package/dist/commonjs/expandable/lib/Expandable.d.ts +75 -0
  38. package/dist/commonjs/expandable/lib/Expandable.d.ts.map +1 -0
  39. package/dist/commonjs/expandable/lib/Expandable.js +50 -0
  40. package/dist/commonjs/expandable/lib/ExpandableAvatar.d.ts +7 -0
  41. package/dist/commonjs/expandable/lib/ExpandableAvatar.d.ts.map +1 -0
  42. package/dist/commonjs/expandable/lib/ExpandableAvatar.js +46 -0
  43. package/dist/commonjs/expandable/lib/ExpandableContent.d.ts +19 -0
  44. package/dist/commonjs/expandable/lib/ExpandableContent.d.ts.map +1 -0
  45. package/dist/commonjs/expandable/lib/ExpandableContent.js +41 -0
  46. package/dist/commonjs/expandable/lib/ExpandableIcon.d.ts +29 -0
  47. package/dist/commonjs/expandable/lib/ExpandableIcon.d.ts.map +1 -0
  48. package/dist/commonjs/expandable/lib/ExpandableIcon.js +62 -0
  49. package/dist/commonjs/expandable/lib/ExpandableTarget.d.ts +28 -0
  50. package/dist/commonjs/expandable/lib/ExpandableTarget.d.ts.map +1 -0
  51. package/dist/commonjs/expandable/lib/ExpandableTarget.js +48 -0
  52. package/dist/commonjs/expandable/lib/ExpandableTitle.d.ts +9 -0
  53. package/dist/commonjs/expandable/lib/ExpandableTitle.d.ts.map +1 -0
  54. package/dist/commonjs/expandable/lib/ExpandableTitle.js +39 -0
  55. package/dist/commonjs/expandable/lib/hooks/index.d.ts +4 -0
  56. package/dist/commonjs/expandable/lib/hooks/index.d.ts.map +1 -0
  57. package/dist/commonjs/expandable/lib/hooks/index.js +15 -0
  58. package/dist/commonjs/expandable/lib/hooks/useExpandableContent.d.ts +20 -0
  59. package/dist/commonjs/expandable/lib/hooks/useExpandableContent.d.ts.map +1 -0
  60. package/dist/commonjs/expandable/lib/hooks/useExpandableContent.js +12 -0
  61. package/dist/commonjs/expandable/lib/hooks/useExpandableIcon.d.ts +15 -0
  62. package/dist/commonjs/expandable/lib/hooks/useExpandableIcon.d.ts.map +1 -0
  63. package/dist/commonjs/expandable/lib/hooks/useExpandableIcon.js +11 -0
  64. package/dist/commonjs/expandable/lib/hooks/useExpandableTarget.d.ts +17 -0
  65. package/dist/commonjs/expandable/lib/hooks/useExpandableTarget.d.ts.map +1 -0
  66. package/dist/commonjs/expandable/lib/hooks/useExpandableTarget.js +20 -0
  67. package/dist/commonjs/expandable/lib/useExpandableModel.d.ts +50 -0
  68. package/dist/commonjs/expandable/lib/useExpandableModel.d.ts.map +1 -0
  69. package/dist/commonjs/expandable/lib/useExpandableModel.js +24 -0
  70. package/dist/commonjs/index.d.ts +2 -0
  71. package/dist/commonjs/index.d.ts.map +1 -1
  72. package/dist/commonjs/index.js +2 -0
  73. package/dist/commonjs/search-form/lib/SearchForm.d.ts +1 -2
  74. package/dist/commonjs/search-form/lib/SearchForm.d.ts.map +1 -1
  75. package/dist/commonjs/search-form/lib/SearchForm.js +2 -4
  76. package/dist/commonjs/toast/index.d.ts +3 -0
  77. package/dist/commonjs/toast/index.d.ts.map +1 -0
  78. package/dist/commonjs/toast/index.js +14 -0
  79. package/dist/commonjs/toast/lib/Toast.d.ts +27 -0
  80. package/dist/commonjs/toast/lib/Toast.d.ts.map +1 -0
  81. package/dist/commonjs/toast/lib/Toast.js +78 -0
  82. package/dist/commonjs/toast/lib/ToastBody.d.ts +6 -0
  83. package/dist/commonjs/toast/lib/ToastBody.d.ts.map +1 -0
  84. package/dist/commonjs/toast/lib/ToastBody.js +40 -0
  85. package/dist/commonjs/toast/lib/ToastCloseIcon.d.ts +6 -0
  86. package/dist/commonjs/toast/lib/ToastCloseIcon.d.ts.map +1 -0
  87. package/dist/commonjs/toast/lib/ToastCloseIcon.js +43 -0
  88. package/dist/commonjs/toast/lib/ToastIcon.d.ts +5 -0
  89. package/dist/commonjs/toast/lib/ToastIcon.d.ts.map +1 -0
  90. package/dist/commonjs/toast/lib/ToastIcon.js +26 -0
  91. package/dist/commonjs/toast/lib/ToastLink.d.ts +9 -0
  92. package/dist/commonjs/toast/lib/ToastLink.d.ts.map +1 -0
  93. package/dist/commonjs/toast/lib/ToastLink.js +42 -0
  94. package/dist/commonjs/toast/lib/ToastMessage.d.ts +11 -0
  95. package/dist/commonjs/toast/lib/ToastMessage.d.ts.map +1 -0
  96. package/dist/commonjs/toast/lib/ToastMessage.js +41 -0
  97. package/dist/commonjs/toast/lib/hooks/useToastModel.d.ts +65 -0
  98. package/dist/commonjs/toast/lib/hooks/useToastModel.d.ts.map +1 -0
  99. package/dist/commonjs/toast/lib/hooks/useToastModel.js +35 -0
  100. package/dist/es6/combobox/index.d.ts +0 -3
  101. package/dist/es6/combobox/index.d.ts.map +1 -1
  102. package/dist/es6/combobox/index.js +0 -3
  103. package/dist/es6/combobox/lib/AutocompleteList.d.ts +4 -5
  104. package/dist/es6/combobox/lib/AutocompleteList.d.ts.map +1 -1
  105. package/dist/es6/combobox/lib/AutocompleteList.js +1 -2
  106. package/dist/es6/combobox/lib/Combobox.d.ts +4 -6
  107. package/dist/es6/combobox/lib/Combobox.d.ts.map +1 -1
  108. package/dist/es6/combobox/lib/Combobox.js +5 -10
  109. package/dist/es6/combobox/lib/Status.d.ts +1 -2
  110. package/dist/es6/combobox/lib/Status.d.ts.map +1 -1
  111. package/dist/es6/combobox/lib/Status.js +1 -2
  112. package/dist/es6/common/index.d.ts +0 -2
  113. package/dist/es6/common/index.d.ts.map +1 -1
  114. package/dist/es6/common/index.js +0 -2
  115. package/dist/es6/common/lib/theming/useThemeRTL.d.ts.map +1 -1
  116. package/dist/es6/common/lib/theming/useThemeRTL.js +7 -9
  117. package/dist/es6/drawer/index.d.ts +1 -4
  118. package/dist/es6/drawer/index.d.ts.map +1 -1
  119. package/dist/es6/drawer/index.js +1 -4
  120. package/dist/es6/drawer/lib/Drawer.d.ts +39 -14
  121. package/dist/es6/drawer/lib/Drawer.d.ts.map +1 -1
  122. package/dist/es6/drawer/lib/Drawer.js +38 -20
  123. package/dist/es6/drawer/lib/DrawerHeader.d.ts +24 -7
  124. package/dist/es6/drawer/lib/DrawerHeader.d.ts.map +1 -1
  125. package/dist/es6/drawer/lib/DrawerHeader.js +22 -15
  126. package/dist/es6/expandable/index.d.ts +3 -0
  127. package/dist/es6/expandable/index.d.ts.map +1 -0
  128. package/dist/es6/expandable/index.js +2 -0
  129. package/dist/es6/expandable/lib/Expandable.d.ts +75 -0
  130. package/dist/es6/expandable/lib/Expandable.d.ts.map +1 -0
  131. package/dist/es6/expandable/lib/Expandable.js +44 -0
  132. package/dist/es6/expandable/lib/ExpandableAvatar.d.ts +7 -0
  133. package/dist/es6/expandable/lib/ExpandableAvatar.d.ts.map +1 -0
  134. package/dist/es6/expandable/lib/ExpandableAvatar.js +40 -0
  135. package/dist/es6/expandable/lib/ExpandableContent.d.ts +19 -0
  136. package/dist/es6/expandable/lib/ExpandableContent.d.ts.map +1 -0
  137. package/dist/es6/expandable/lib/ExpandableContent.js +35 -0
  138. package/dist/es6/expandable/lib/ExpandableIcon.d.ts +29 -0
  139. package/dist/es6/expandable/lib/ExpandableIcon.d.ts.map +1 -0
  140. package/dist/es6/expandable/lib/ExpandableIcon.js +56 -0
  141. package/dist/es6/expandable/lib/ExpandableTarget.d.ts +28 -0
  142. package/dist/es6/expandable/lib/ExpandableTarget.d.ts.map +1 -0
  143. package/dist/es6/expandable/lib/ExpandableTarget.js +42 -0
  144. package/dist/es6/expandable/lib/ExpandableTitle.d.ts +9 -0
  145. package/dist/es6/expandable/lib/ExpandableTitle.d.ts.map +1 -0
  146. package/dist/es6/expandable/lib/ExpandableTitle.js +33 -0
  147. package/dist/es6/expandable/lib/hooks/index.d.ts +4 -0
  148. package/dist/es6/expandable/lib/hooks/index.d.ts.map +1 -0
  149. package/dist/es6/expandable/lib/hooks/index.js +3 -0
  150. package/dist/es6/expandable/lib/hooks/useExpandableContent.d.ts +20 -0
  151. package/dist/es6/expandable/lib/hooks/useExpandableContent.d.ts.map +1 -0
  152. package/dist/es6/expandable/lib/hooks/useExpandableContent.js +9 -0
  153. package/dist/es6/expandable/lib/hooks/useExpandableIcon.d.ts +15 -0
  154. package/dist/es6/expandable/lib/hooks/useExpandableIcon.d.ts.map +1 -0
  155. package/dist/es6/expandable/lib/hooks/useExpandableIcon.js +8 -0
  156. package/dist/es6/expandable/lib/hooks/useExpandableTarget.d.ts +17 -0
  157. package/dist/es6/expandable/lib/hooks/useExpandableTarget.d.ts.map +1 -0
  158. package/dist/es6/expandable/lib/hooks/useExpandableTarget.js +17 -0
  159. package/dist/es6/expandable/lib/useExpandableModel.d.ts +50 -0
  160. package/dist/es6/expandable/lib/useExpandableModel.d.ts.map +1 -0
  161. package/dist/es6/expandable/lib/useExpandableModel.js +21 -0
  162. package/dist/es6/index.d.ts +2 -0
  163. package/dist/es6/index.d.ts.map +1 -1
  164. package/dist/es6/index.js +2 -0
  165. package/dist/es6/search-form/lib/SearchForm.d.ts +1 -2
  166. package/dist/es6/search-form/lib/SearchForm.d.ts.map +1 -1
  167. package/dist/es6/search-form/lib/SearchForm.js +2 -4
  168. package/dist/es6/toast/index.d.ts +3 -0
  169. package/dist/es6/toast/index.d.ts.map +1 -0
  170. package/dist/es6/toast/index.js +2 -0
  171. package/dist/es6/toast/lib/Toast.d.ts +27 -0
  172. package/dist/es6/toast/lib/Toast.d.ts.map +1 -0
  173. package/dist/es6/toast/lib/Toast.js +72 -0
  174. package/dist/es6/toast/lib/ToastBody.d.ts +6 -0
  175. package/dist/es6/toast/lib/ToastBody.d.ts.map +1 -0
  176. package/dist/es6/toast/lib/ToastBody.js +34 -0
  177. package/dist/es6/toast/lib/ToastCloseIcon.d.ts +6 -0
  178. package/dist/es6/toast/lib/ToastCloseIcon.d.ts.map +1 -0
  179. package/dist/es6/toast/lib/ToastCloseIcon.js +37 -0
  180. package/dist/es6/toast/lib/ToastIcon.d.ts +5 -0
  181. package/dist/es6/toast/lib/ToastIcon.d.ts.map +1 -0
  182. package/dist/es6/toast/lib/ToastIcon.js +20 -0
  183. package/dist/es6/toast/lib/ToastLink.d.ts +9 -0
  184. package/dist/es6/toast/lib/ToastLink.d.ts.map +1 -0
  185. package/dist/es6/toast/lib/ToastLink.js +36 -0
  186. package/dist/es6/toast/lib/ToastMessage.d.ts +11 -0
  187. package/dist/es6/toast/lib/ToastMessage.d.ts.map +1 -0
  188. package/dist/es6/toast/lib/ToastMessage.js +35 -0
  189. package/dist/es6/toast/lib/hooks/useToastModel.d.ts +65 -0
  190. package/dist/es6/toast/lib/hooks/useToastModel.d.ts.map +1 -0
  191. package/dist/es6/toast/lib/hooks/useToastModel.js +32 -0
  192. package/drawer/index.ts +1 -4
  193. package/drawer/lib/Drawer.tsx +61 -24
  194. package/drawer/lib/DrawerHeader.tsx +54 -26
  195. package/expandable/LICENSE +52 -0
  196. package/expandable/README.md +11 -0
  197. package/expandable/index.ts +2 -0
  198. package/expandable/lib/Expandable.tsx +34 -0
  199. package/expandable/lib/ExpandableAvatar.tsx +26 -0
  200. package/expandable/lib/ExpandableContent.tsx +32 -0
  201. package/expandable/lib/ExpandableIcon.tsx +74 -0
  202. package/expandable/lib/ExpandableTarget.tsx +67 -0
  203. package/expandable/lib/ExpandableTitle.tsx +34 -0
  204. package/expandable/lib/hooks/index.ts +3 -0
  205. package/expandable/lib/hooks/useExpandableContent.ts +9 -0
  206. package/expandable/lib/hooks/useExpandableIcon.ts +8 -0
  207. package/expandable/lib/hooks/useExpandableTarget.ts +16 -0
  208. package/expandable/lib/useExpandableModel.tsx +17 -0
  209. package/expandable/package.json +6 -0
  210. package/index.ts +2 -0
  211. package/package.json +5 -5
  212. package/search-form/lib/SearchForm.tsx +2 -6
  213. package/toast/LICENSE +52 -0
  214. package/toast/README.md +5 -0
  215. package/toast/index.ts +2 -0
  216. package/toast/lib/Toast.tsx +63 -0
  217. package/toast/lib/ToastBody.tsx +34 -0
  218. package/toast/lib/ToastCloseIcon.tsx +18 -0
  219. package/toast/lib/ToastIcon.tsx +24 -0
  220. package/toast/lib/ToastLink.tsx +27 -0
  221. package/toast/lib/ToastMessage.tsx +21 -0
  222. package/toast/lib/hooks/useToastModel.tsx +27 -0
  223. package/toast/package.json +6 -0
  224. package/common/lib/storybook-utils/ComponentStatesTable.tsx +0 -80
  225. package/common/lib/storybook-utils/permutateProps.ts +0 -47
  226. package/common/lib/storybook-utils/propTypes.ts +0 -15
  227. package/dist/commonjs/common/lib/storybook-utils/ComponentStatesTable.d.ts +0 -26
  228. package/dist/commonjs/common/lib/storybook-utils/ComponentStatesTable.d.ts.map +0 -1
  229. package/dist/commonjs/common/lib/storybook-utils/ComponentStatesTable.js +0 -48
  230. package/dist/commonjs/common/lib/storybook-utils/permutateProps.d.ts +0 -5
  231. package/dist/commonjs/common/lib/storybook-utils/permutateProps.d.ts.map +0 -1
  232. package/dist/commonjs/common/lib/storybook-utils/permutateProps.js +0 -47
  233. package/dist/commonjs/common/lib/storybook-utils/propTypes.d.ts +0 -15
  234. package/dist/commonjs/common/lib/storybook-utils/propTypes.d.ts.map +0 -1
  235. package/dist/commonjs/common/lib/storybook-utils/propTypes.js +0 -2
  236. package/dist/es6/common/lib/storybook-utils/ComponentStatesTable.d.ts +0 -26
  237. package/dist/es6/common/lib/storybook-utils/ComponentStatesTable.d.ts.map +0 -1
  238. package/dist/es6/common/lib/storybook-utils/ComponentStatesTable.js +0 -41
  239. package/dist/es6/common/lib/storybook-utils/permutateProps.d.ts +0 -5
  240. package/dist/es6/common/lib/storybook-utils/permutateProps.d.ts.map +0 -1
  241. package/dist/es6/common/lib/storybook-utils/permutateProps.js +0 -43
  242. package/dist/es6/common/lib/storybook-utils/propTypes.d.ts +0 -15
  243. package/dist/es6/common/lib/storybook-utils/propTypes.d.ts.map +0 -1
  244. package/dist/es6/common/lib/storybook-utils/propTypes.js +0 -1
@@ -0,0 +1,72 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import React from 'react';
24
+ import { createContainer } from '@workday/canvas-kit-react/common';
25
+ import { Flex } from '@workday/canvas-kit-react/layout';
26
+ import { Popup } from '@workday/canvas-kit-react/popup';
27
+ import { ToastCloseIcon } from './ToastCloseIcon';
28
+ import { ToastIcon } from './ToastIcon';
29
+ import { ToastMessage } from './ToastMessage';
30
+ import { ToastLink } from './ToastLink';
31
+ import { ToastBody } from './ToastBody';
32
+ import { useToastModel } from './hooks/useToastModel';
33
+ export var Toast = createContainer('div')({
34
+ displayName: 'Toast',
35
+ modelHook: useToastModel,
36
+ subComponents: {
37
+ Body: ToastBody,
38
+ CloseIcon: ToastCloseIcon,
39
+ Icon: ToastIcon,
40
+ Message: ToastMessage,
41
+ Link: ToastLink,
42
+ },
43
+ })(function (_a, Element, model) {
44
+ var children = _a.children, elemProps = __rest(_a, ["children"]);
45
+ var getAriaAttributes = function (mode) {
46
+ switch (mode) {
47
+ case 'dialog':
48
+ return {
49
+ 'aria-describedby': model.state.id,
50
+ 'aria-label': 'notification',
51
+ role: 'dialog',
52
+ };
53
+ case 'alert':
54
+ return {
55
+ role: 'alert',
56
+ 'aria-live': 'assertive',
57
+ 'aria-atomic': true,
58
+ };
59
+ case 'status':
60
+ return {
61
+ role: 'status',
62
+ 'aria-live': 'polite',
63
+ 'aria-atomic': true,
64
+ };
65
+ default: {
66
+ return {};
67
+ }
68
+ }
69
+ };
70
+ return (React.createElement(Popup.Card, __assign({ as: Element, width: 360, padding: "0" }, getAriaAttributes(model.state.mode), elemProps),
71
+ React.createElement(Flex, null, children)));
72
+ });
@@ -0,0 +1,6 @@
1
+ import { ExtractProps } from '@workday/canvas-kit-react/common';
2
+ import { Popup } from '@workday/canvas-kit-react/popup';
3
+ export interface ToastBodyProps extends ExtractProps<typeof Popup.Body> {
4
+ }
5
+ export declare const ToastBody: import("@workday/canvas-kit-react/common").ElementComponent<"div", ToastBodyProps>;
6
+ //# sourceMappingURL=ToastBody.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToastBody.d.ts","sourceRoot":"","sources":["../../../../toast/lib/ToastBody.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,YAAY,EAAqB,MAAM,kCAAkC,CAAC;AACnG,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAGtD,MAAM,WAAW,cAAe,SAAQ,YAAY,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC;CAAG;AAW1E,eAAO,MAAM,SAAS,oFAgBpB,CAAC"}
@@ -0,0 +1,34 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import React from 'react';
24
+ import { createComponent, styled } from '@workday/canvas-kit-react/common';
25
+ import { Popup } from '@workday/canvas-kit-react/popup';
26
+ import { type } from '@workday/canvas-kit-react/tokens';
27
+ var StyledToastBody = styled(Popup.Body)(__assign({ display: 'flex', alignItems: 'flex-start', flexDirection: 'column', justifyContent: 'center' }, type.levels.subtext.large));
28
+ export var ToastBody = createComponent('div')({
29
+ displayName: 'Toast.Body',
30
+ Component: function (_a, ref, Element) {
31
+ var children = _a.children, elemProps = __rest(_a, ["children"]);
32
+ return (React.createElement(StyledToastBody, __assign({ paddingInlineStart: "xxxs", paddingY: "s", paddingInlineEnd: "s", ref: ref, as: Element }, elemProps), children));
33
+ },
34
+ });
@@ -0,0 +1,6 @@
1
+ import { ExtractProps } from '@workday/canvas-kit-react/common';
2
+ import { Popup } from '@workday/canvas-kit-react/popup';
3
+ export interface ToastCloseIconProps extends ExtractProps<typeof Popup.CloseIcon, never> {
4
+ }
5
+ export declare const ToastCloseIcon: import("@workday/canvas-kit-react/common").ElementComponent<"button", ToastCloseIconProps>;
6
+ //# sourceMappingURL=ToastCloseIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToastCloseIcon.d.ts","sourceRoot":"","sources":["../../../../toast/lib/ToastCloseIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,YAAY,EAAa,MAAM,kCAAkC,CAAC;AAC3F,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAGtD,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC,OAAO,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC;CAAG;AAO3F,eAAO,MAAM,cAAc,4FAKzB,CAAC"}
@@ -0,0 +1,37 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import React from 'react';
24
+ import { createComponent } from '@workday/canvas-kit-react/common';
25
+ import { Popup } from '@workday/canvas-kit-react/popup';
26
+ import styled from '@emotion/styled';
27
+ // TODO Remove this once we extend style properties for buttons https://github.com/Workday/canvas-kit/issues/1746
28
+ var StyledCloseIcon = styled(Popup.CloseIcon)({
29
+ position: 'relative',
30
+ });
31
+ export var ToastCloseIcon = createComponent('button')({
32
+ displayName: 'Toast.CloseIcon',
33
+ Component: function (_a, ref, Element) {
34
+ var elemProps = __rest(_a, []);
35
+ return React.createElement(StyledCloseIcon, __assign({ as: Element, ref: ref, size: "small" }, elemProps));
36
+ },
37
+ });
@@ -0,0 +1,5 @@
1
+ import { SystemIconProps } from '@workday/canvas-kit-react/icon';
2
+ export interface ToastIconProps extends Omit<SystemIconProps, 'colorHover'> {
3
+ }
4
+ export declare const ToastIcon: import("@workday/canvas-kit-react/common").ElementComponent<"div", ToastIconProps>;
5
+ //# sourceMappingURL=ToastIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToastIcon.d.ts","sourceRoot":"","sources":["../../../../toast/lib/ToastIcon.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAa,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAE3E,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC;CAAG;AAE9E,eAAO,MAAM,SAAS,oFAgBpB,CAAC"}
@@ -0,0 +1,20 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import React from 'react';
13
+ import { createComponent } from '@workday/canvas-kit-react/common';
14
+ import { SystemIcon } from '@workday/canvas-kit-react/icon';
15
+ export var ToastIcon = createComponent('div')({
16
+ displayName: 'Toast.Icon',
17
+ Component: function (elemProps, ref, Element) {
18
+ return (React.createElement(SystemIcon, __assign({ colorHover: elemProps.color, marginY: "s", marginInlineEnd: "xs", marginInlineStart: "xs", alignSelf: "start", ref: ref, as: Element }, elemProps)));
19
+ },
20
+ });
@@ -0,0 +1,9 @@
1
+ import { HyperlinkProps } from '@workday/canvas-kit-react/button';
2
+ export interface ToastLinkProps extends HyperlinkProps {
3
+ /**
4
+ * attribute for the hyperlink URL
5
+ */
6
+ href: string;
7
+ }
8
+ export declare const ToastLink: import("@workday/canvas-kit-react/common").ElementComponent<"a", ToastLinkProps>;
9
+ //# sourceMappingURL=ToastLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToastLink.d.ts","sourceRoot":"","sources":["../../../../toast/lib/ToastLink.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAY,cAAc,EAAC,MAAM,kCAAkC,CAAC;AAG3E,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAMD,eAAO,MAAM,SAAS,kFASpB,CAAC"}
@@ -0,0 +1,36 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import React from 'react';
24
+ import { createComponent, styled } from '@workday/canvas-kit-react/common';
25
+ import { Hyperlink } from '@workday/canvas-kit-react/button';
26
+ import { space } from '@workday/canvas-kit-react/tokens';
27
+ var StyledHyperLink = styled(Hyperlink)({
28
+ marginTop: space.xxxs,
29
+ });
30
+ export var ToastLink = createComponent('a')({
31
+ displayName: 'Toast.Link',
32
+ Component: function (_a, ref, Element) {
33
+ var children = _a.children, href = _a.href, elemProps = __rest(_a, ["children", "href"]);
34
+ return (React.createElement(StyledHyperLink, __assign({ ref: ref, href: href, as: Element }, elemProps), children));
35
+ },
36
+ });
@@ -0,0 +1,11 @@
1
+ import { FlexProps } from '@workday/canvas-kit-react/layout';
2
+ export interface ToastMessageProps extends FlexProps {
3
+ }
4
+ export declare const ToastMessage: import("@workday/canvas-kit-react/common").ElementComponentM<"div", ToastMessageProps, {
5
+ state: {
6
+ id: string;
7
+ mode: import("./hooks/useToastModel").AriaRoleMode;
8
+ };
9
+ events: {};
10
+ }>;
11
+ //# sourceMappingURL=ToastMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToastMessage.d.ts","sourceRoot":"","sources":["../../../../toast/lib/ToastMessage.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAO,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAGjE,MAAM,WAAW,iBAAkB,SAAQ,SAAS;CAAG;AAMvD,eAAO,MAAM,YAAY;;;;;;EAQvB,CAAC"}
@@ -0,0 +1,35 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import React from 'react';
24
+ import { createSubcomponent, styled } from '@workday/canvas-kit-react/common';
25
+ import { Flex } from '@workday/canvas-kit-react/layout';
26
+ import { useToastModel } from './hooks/useToastModel';
27
+ var StyledMessage = styled(Flex)({
28
+ wordBreak: 'break-word',
29
+ });
30
+ export var ToastMessage = createSubcomponent('div')({
31
+ modelHook: useToastModel,
32
+ })(function (_a, Element, model) {
33
+ var children = _a.children, elemProps = __rest(_a, ["children"]);
34
+ return (React.createElement(StyledMessage, __assign({ flexDirection: "column", id: model.state.id, as: Element }, elemProps), children));
35
+ });
@@ -0,0 +1,65 @@
1
+ export declare type AriaRoleMode = 'dialog' | 'status' | 'alert';
2
+ export declare const useToastModel: (<TT_Special_Generic>(config?: (Partial<{
3
+ /**
4
+ * Sets the correct aria attributes for the Toast.
5
+ * Alert toasts are used to convey urgency and important information. The `role` is set to `alert`
6
+ * Status toasts are used to convey a message or a successful action. The `role` is set to `status`
7
+ * Dialog toasts are used when there's an action to be taken. The `role` is set to `dialog`
8
+ * @default 'status'
9
+ */
10
+ mode: AriaRoleMode;
11
+ /**
12
+ * When the Toast has a `mode="dialog"` this adds a unique id to type the `Toast.Message` to the dialog.
13
+ */
14
+ id: string;
15
+ }> & {} & {}) | undefined) => {
16
+ state: {
17
+ id: string;
18
+ /**
19
+ * Sets the correct aria attributes for the Toast.
20
+ * Alert toasts are used to convey urgency and important information. The `role` is set to `alert`
21
+ * Status toasts are used to convey a message or a successful action. The `role` is set to `status`
22
+ * Dialog toasts are used when there's an action to be taken. The `role` is set to `dialog`
23
+ * @default 'status'
24
+ */
25
+ mode: AriaRoleMode;
26
+ };
27
+ events: {};
28
+ }) & import("@workday/canvas-kit-react/common").ModelExtras<{
29
+ /**
30
+ * Sets the correct aria attributes for the Toast.
31
+ * Alert toasts are used to convey urgency and important information. The `role` is set to `alert`
32
+ * Status toasts are used to convey a message or a successful action. The `role` is set to `status`
33
+ * Dialog toasts are used when there's an action to be taken. The `role` is set to `dialog`
34
+ * @default 'status'
35
+ */
36
+ mode: AriaRoleMode;
37
+ /**
38
+ * When the Toast has a `mode="dialog"` this adds a unique id to type the `Toast.Message` to the dialog.
39
+ */
40
+ id: string;
41
+ }, {}, {
42
+ id: string;
43
+ /**
44
+ * Sets the correct aria attributes for the Toast.
45
+ * Alert toasts are used to convey urgency and important information. The `role` is set to `alert`
46
+ * Status toasts are used to convey a message or a successful action. The `role` is set to `status`
47
+ * Dialog toasts are used when there's an action to be taken. The `role` is set to `dialog`
48
+ * @default 'status'
49
+ */
50
+ mode: AriaRoleMode;
51
+ }, {}, {
52
+ state: {
53
+ id: string;
54
+ /**
55
+ * Sets the correct aria attributes for the Toast.
56
+ * Alert toasts are used to convey urgency and important information. The `role` is set to `alert`
57
+ * Status toasts are used to convey a message or a successful action. The `role` is set to `status`
58
+ * Dialog toasts are used when there's an action to be taken. The `role` is set to `dialog`
59
+ * @default 'status'
60
+ */
61
+ mode: AriaRoleMode;
62
+ };
63
+ events: {};
64
+ }>;
65
+ //# sourceMappingURL=useToastModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useToastModel.d.ts","sourceRoot":"","sources":["../../../../../toast/lib/hooks/useToastModel.tsx"],"names":[],"mappings":"AACA,oBAAY,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzD,eAAO,MAAM,aAAa;IAEtB;;;;;;OAMG;;IAEH;;OAEG;;;;;QAVH;;;;;;WAMG;;;;;IANH;;;;;;OAMG;;IAEH;;OAEG;;;;IAVH;;;;;;OAMG;;;;;QANH;;;;;;WAMG;;;;EAeL,CAAC"}
@@ -0,0 +1,32 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { createModelHook, useUniqueId } from '@workday/canvas-kit-react/common';
13
+ export var useToastModel = createModelHook({
14
+ defaultConfig: {
15
+ /**
16
+ * Sets the correct aria attributes for the Toast.
17
+ * Alert toasts are used to convey urgency and important information. The `role` is set to `alert`
18
+ * Status toasts are used to convey a message or a successful action. The `role` is set to `status`
19
+ * Dialog toasts are used when there's an action to be taken. The `role` is set to `dialog`
20
+ * @default 'status'
21
+ */
22
+ mode: 'status',
23
+ /**
24
+ * When the Toast has a `mode="dialog"` this adds a unique id to type the `Toast.Message` to the dialog.
25
+ */
26
+ id: '',
27
+ },
28
+ })(function (config) {
29
+ var id = useUniqueId(config.id);
30
+ var state = __assign(__assign({}, config), { id: id });
31
+ return { state: state, events: {} };
32
+ });
package/drawer/index.ts CHANGED
@@ -1,5 +1,2 @@
1
- import Drawer from './lib/Drawer';
2
- import DrawerHeader from './lib/DrawerHeader';
3
- export {Drawer, DrawerHeader};
4
- export default Drawer;
1
+ export {DeprecatedDrawerHeader} from './lib/DrawerHeader';
5
2
  export * from './lib/Drawer';
@@ -2,52 +2,70 @@ import * as React from 'react';
2
2
  import styled from '@emotion/styled';
3
3
  import {colors, space, CanvasSpaceValues} from '@workday/canvas-kit-react/tokens';
4
4
 
5
- export interface DrawerProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ /**
6
+ * ### Deprecated Drawer Props
7
+ *
8
+ * As of Canvas Kit v8, Drawer is being soft-deprecated.
9
+ * It will be hard-deprecated (completely removed) in v9. Please see the
10
+ * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
11
+ * for more information.
12
+ */
13
+
14
+ export interface DeprecatedDrawerProps extends React.HTMLAttributes<HTMLDivElement> {
6
15
  /**
7
- * The padding of the Drawer contents.
16
+ * The padding of the DeprecatedDrawer contents.
8
17
  * @default space.s
9
18
  */
10
19
  padding?: CanvasSpaceValues;
11
20
  /**
12
- * The direction from which the Drawer opens. Accepts `Left` or `Right`.
13
- * @default DrawerDirection.Right
21
+ * The direction from which the DeprecatedDrawer opens. Accepts `Left` or `Right`.
22
+ * @default DeprecatedDrawerDirection.Right
14
23
  */
15
- openDirection?: DrawerDirection;
24
+ openDirection?: DeprecatedDrawerDirection;
16
25
  /**
17
- * The width of the Drawer in `px`.
26
+ * The width of the DeprecatedDrawer in `px`.
18
27
  * @default 360
19
28
  */
20
29
  width?: number;
21
30
  /**
22
- * If true, render the Drawer with a drop shadow.
31
+ * If true, render the DeprecatedDrawer with a drop shadow.
23
32
  * @default false
24
33
  */
25
34
  showDropShadow?: boolean;
26
35
  /**
27
- * The optional DrawerHeader component of the Drawer. Shows an optional string and close button.
36
+ * The optional DeprecatedDrawerHeader component of the DeprecatedDrawer. Shows an optional string and close button.
28
37
  */
29
38
  header?: React.ReactElement;
30
39
  /**
31
- * The `aria-labelledby` of the Drawer. Set this when there is a `header` for accessibility. The `role` attribute should also be used when this attribute is present. This value should be the same as the `id` attribute of the `header` element.
40
+ * The `aria-labelledby` of the DeprecatedDrawer. Set this when there is a `header` for accessibility. The `role` attribute should also be used when this attribute is present. This value should be the same as the `id` attribute of the `header` element.
32
41
  */
33
42
  'aria-labelledby'?: string;
34
43
  /**
35
- * The `aria-label` for the Drawer. Set this when there is NO `header` for accessibility.
44
+ * The `aria-label` for the DeprecatedDrawer. Set this when there is NO `header` for accessibility.
36
45
  */
37
46
  'aria-label'?: string;
38
47
  /**
39
- * The role of the Drawer. If `role` is provided, you must also set `aria-labelledby` to link `header` to the `role`.
48
+ * The role of the DeprecatedDrawer. If `role` is provided, you must also set `aria-labelledby` to link `header` to the `role`.
40
49
  */
41
50
  role?: string;
42
51
  }
43
52
 
44
- export enum DrawerDirection {
53
+ /**
54
+ * ### Deprecated Drawer Direction
55
+ *
56
+ * As of Canvas Kit v8, Drawer is being soft-deprecated.
57
+ * It will be hard-deprecated (completely removed) in v9. Please see the
58
+ * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
59
+ * for more information.
60
+ */
61
+
62
+ export enum DeprecatedDrawerDirection {
45
63
  Left,
46
64
  Right,
47
65
  }
48
66
 
49
67
  const DrawerContainer = styled('div')<
50
- Pick<DrawerProps, 'width' | 'showDropShadow' | 'openDirection'>
68
+ Pick<DeprecatedDrawerProps, 'width' | 'showDropShadow' | 'openDirection'>
51
69
  >(
52
70
  {
53
71
  height: '100%',
@@ -61,26 +79,27 @@ const DrawerContainer = styled('div')<
61
79
  }),
62
80
  ({showDropShadow, openDirection}) => ({
63
81
  boxShadow:
64
- openDirection === DrawerDirection.Right && showDropShadow
82
+ openDirection === DeprecatedDrawerDirection.Right && showDropShadow
65
83
  ? '-8px 0px 16px 0 rgba(0,0,0,0.12)'
66
- : openDirection === DrawerDirection.Left && showDropShadow
84
+ : openDirection === DeprecatedDrawerDirection.Left && showDropShadow
67
85
  ? '8px 0px 16px 0 rgba(0,0,0,0.12)'
68
86
  : undefined,
69
87
  }),
70
88
  ({openDirection}) => ({
71
- borderLeft: openDirection === DrawerDirection.Right ? `1px solid ${colors.soap400}` : undefined,
72
- borderRight: openDirection === DrawerDirection.Left ? `1px solid ${colors.soap400}` : undefined,
73
- right: openDirection === DrawerDirection.Right ? space.zero : undefined,
74
- left: openDirection === DrawerDirection.Left ? space.zero : undefined,
89
+ borderLeft:
90
+ openDirection === DeprecatedDrawerDirection.Right ? `1px solid ${colors.soap400}` : undefined,
91
+ borderRight:
92
+ openDirection === DeprecatedDrawerDirection.Left ? `1px solid ${colors.soap400}` : undefined,
93
+ right: openDirection === DeprecatedDrawerDirection.Right ? space.zero : undefined,
94
+ left: openDirection === DeprecatedDrawerDirection.Left ? space.zero : undefined,
75
95
  })
76
96
  );
77
97
 
78
- const ChildrenContainer = styled('div')<Pick<DrawerProps, 'padding'>>(
98
+ const ChildrenContainer = styled('div')<Pick<DeprecatedDrawerProps, 'padding'>>(
79
99
  {
80
100
  height: '100%',
81
101
  overflowY: 'auto',
82
102
  wordBreak: 'break-word',
83
- wordWrap: 'break-word', // Needed for IE11
84
103
  position: 'relative',
85
104
  },
86
105
  ({padding}) => ({
@@ -88,14 +107,32 @@ const ChildrenContainer = styled('div')<Pick<DrawerProps, 'padding'>>(
88
107
  })
89
108
  );
90
109
 
91
- export default class Drawer extends React.Component<DrawerProps, {}> {
92
- static OpenDirection = DrawerDirection;
110
+ /**
111
+ * ### Deprecated Drawer
112
+ *
113
+ * As of Canvas Kit v8, this component is being soft-deprecated.
114
+ * It will be hard-deprecated (completely removed) in v9. Please see the
115
+ * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
116
+ * for more information.
117
+ */
118
+
119
+ export class DeprecatedDrawer extends React.Component<DeprecatedDrawerProps, {}> {
120
+ static OpenDirection = DeprecatedDrawerDirection;
121
+
122
+ componentDidMount() {
123
+ console.warn(
124
+ `This component is being deprecated and will be removed in Canvas Kit V9.\n
125
+ For more information, please see the V8 upgrade guide:\n
126
+ https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page
127
+ `
128
+ );
129
+ }
93
130
 
94
131
  public render() {
95
132
  const {
96
133
  padding = space.s,
97
134
  width = 360,
98
- openDirection = DrawerDirection.Right,
135
+ openDirection = DeprecatedDrawerDirection.Right,
99
136
  showDropShadow = false,
100
137
  children,
101
138
  header,