@workday/canvas-kit-docs 13.0.0-alpha.1069-next.0 → 13.0.0-alpha.1074-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/dist/es6/lib/ExampleCodeBlock.d.ts +1 -2
  2. package/dist/es6/lib/ExampleCodeBlock.d.ts.map +1 -1
  3. package/dist/es6/lib/ExampleCodeBlock.js +7 -18
  4. package/dist/es6/lib/MDXElements.d.ts +1 -2
  5. package/dist/es6/lib/MDXElements.d.ts.map +1 -1
  6. package/dist/es6/lib/MDXElements.js +4 -4
  7. package/dist/es6/lib/MoreTooltip.d.ts +1 -1
  8. package/dist/es6/lib/MoreTooltip.d.ts.map +1 -1
  9. package/dist/es6/lib/MoreTooltip.js +11 -12
  10. package/dist/es6/lib/Specifications.d.ts +1 -2
  11. package/dist/es6/lib/Specifications.d.ts.map +1 -1
  12. package/dist/es6/lib/Specifications.js +3 -20
  13. package/dist/es6/lib/StylePropsTable.d.ts +1 -2
  14. package/dist/es6/lib/StylePropsTable.d.ts.map +1 -1
  15. package/dist/es6/lib/StylePropsTable.js +6 -16
  16. package/dist/es6/lib/Table.d.ts.map +1 -1
  17. package/dist/es6/lib/Table.js +7 -7
  18. package/dist/es6/lib/Value.d.ts +3 -3
  19. package/dist/es6/lib/Value.d.ts.map +1 -1
  20. package/dist/es6/lib/Value.js +16 -51
  21. package/dist/es6/lib/docs.js +102 -29
  22. package/dist/es6/lib/stackblitzFiles/App.d.ts +1 -2
  23. package/dist/es6/lib/stackblitzFiles/App.d.ts.map +1 -1
  24. package/dist/es6/lib/stackblitzFiles/App.js +2 -5
  25. package/dist/es6/lib/stackblitzFiles/App.tsx +0 -1
  26. package/dist/es6/lib/stackblitzFiles/Demo.d.ts +1 -2
  27. package/dist/es6/lib/stackblitzFiles/Demo.d.ts.map +1 -1
  28. package/dist/es6/lib/stackblitzFiles/Demo.js +2 -2
  29. package/dist/es6/lib/stackblitzFiles/Demo.tsx +0 -2
  30. package/dist/es6/lib/stackblitzFiles/main.d.ts.map +1 -1
  31. package/dist/es6/lib/stackblitzFiles/main.js +2 -2
  32. package/dist/es6/lib/stackblitzFiles/main.tsx +0 -1
  33. package/dist/es6/lib/stackblitzFiles/packageJSONFile.js +5 -5
  34. package/dist/es6/lib/stackblitzFiles/packageJSONFile.ts +5 -5
  35. package/dist/es6/lib/widgetUtils.d.ts +5 -5
  36. package/dist/es6/lib/widgetUtils.d.ts.map +1 -1
  37. package/dist/es6/lib/widgetUtils.js +25 -54
  38. package/dist/es6/lib/widgets/array.js +2 -4
  39. package/dist/es6/lib/widgets/callExpression.js +2 -14
  40. package/dist/es6/lib/widgets/canvasColor.js +2 -2
  41. package/dist/es6/lib/widgets/component.js +2 -4
  42. package/dist/es6/lib/widgets/conditional.js +2 -12
  43. package/dist/es6/lib/widgets/enhancedComponent.js +14 -66
  44. package/dist/es6/lib/widgets/external.js +2 -4
  45. package/dist/es6/lib/widgets/function.js +7 -26
  46. package/dist/es6/lib/widgets/intersection.js +2 -3
  47. package/dist/es6/lib/widgets/model.js +3 -19
  48. package/dist/es6/lib/widgets/object.js +2 -2
  49. package/dist/es6/lib/widgets/parenthesis.js +2 -5
  50. package/dist/es6/lib/widgets/primitives.js +9 -27
  51. package/dist/es6/lib/widgets/qualifiedName.js +2 -5
  52. package/dist/es6/lib/widgets/symbol.js +2 -2
  53. package/dist/es6/lib/widgets/tuple.js +2 -5
  54. package/dist/es6/lib/widgets/typeParameter.js +2 -13
  55. package/dist/es6/lib/widgets/union.js +4 -10
  56. package/dist/es6/mdx/installBlock.d.ts +1 -2
  57. package/dist/es6/mdx/installBlock.d.ts.map +1 -1
  58. package/dist/es6/mdx/installBlock.js +2 -6
  59. package/dist/es6/mdx/style-props/examples/Background.d.ts +1 -2
  60. package/dist/es6/mdx/style-props/examples/Background.d.ts.map +1 -1
  61. package/dist/es6/mdx/style-props/examples/Background.js +2 -5
  62. package/dist/es6/mdx/style-props/examples/Border.d.ts +1 -2
  63. package/dist/es6/mdx/style-props/examples/Border.d.ts.map +1 -1
  64. package/dist/es6/mdx/style-props/examples/Border.js +2 -5
  65. package/dist/es6/mdx/style-props/examples/Color.d.ts +1 -2
  66. package/dist/es6/mdx/style-props/examples/Color.d.ts.map +1 -1
  67. package/dist/es6/mdx/style-props/examples/Color.js +2 -5
  68. package/dist/es6/mdx/style-props/examples/Depth.d.ts +1 -2
  69. package/dist/es6/mdx/style-props/examples/Depth.d.ts.map +1 -1
  70. package/dist/es6/mdx/style-props/examples/Depth.js +2 -5
  71. package/dist/es6/mdx/style-props/examples/Flex.d.ts +1 -2
  72. package/dist/es6/mdx/style-props/examples/Flex.d.ts.map +1 -1
  73. package/dist/es6/mdx/style-props/examples/Flex.js +2 -14
  74. package/dist/es6/mdx/style-props/examples/FlexItem.d.ts +1 -2
  75. package/dist/es6/mdx/style-props/examples/FlexItem.d.ts.map +1 -1
  76. package/dist/es6/mdx/style-props/examples/FlexItem.js +2 -13
  77. package/dist/es6/mdx/style-props/examples/Grid.d.ts +1 -2
  78. package/dist/es6/mdx/style-props/examples/Grid.d.ts.map +1 -1
  79. package/dist/es6/mdx/style-props/examples/Grid.js +2 -6
  80. package/dist/es6/mdx/style-props/examples/GridItem.d.ts +1 -2
  81. package/dist/es6/mdx/style-props/examples/GridItem.d.ts.map +1 -1
  82. package/dist/es6/mdx/style-props/examples/GridItem.js +2 -6
  83. package/dist/es6/mdx/style-props/examples/Layout.d.ts +1 -2
  84. package/dist/es6/mdx/style-props/examples/Layout.d.ts.map +1 -1
  85. package/dist/es6/mdx/style-props/examples/Layout.js +2 -5
  86. package/dist/es6/mdx/style-props/examples/Other.d.ts +1 -2
  87. package/dist/es6/mdx/style-props/examples/Other.d.ts.map +1 -1
  88. package/dist/es6/mdx/style-props/examples/Other.js +2 -5
  89. package/dist/es6/mdx/style-props/examples/Position.d.ts +1 -2
  90. package/dist/es6/mdx/style-props/examples/Position.d.ts.map +1 -1
  91. package/dist/es6/mdx/style-props/examples/Position.js +2 -5
  92. package/dist/es6/mdx/style-props/examples/Space.d.ts +1 -2
  93. package/dist/es6/mdx/style-props/examples/Space.d.ts.map +1 -1
  94. package/dist/es6/mdx/style-props/examples/Space.js +2 -8
  95. package/dist/es6/mdx/style-props/examples/Text.d.ts +1 -2
  96. package/dist/es6/mdx/style-props/examples/Text.d.ts.map +1 -1
  97. package/dist/es6/mdx/style-props/examples/Text.js +2 -5
  98. package/dist/es6/mdx/versionsTable.d.ts +1 -2
  99. package/dist/es6/mdx/versionsTable.d.ts.map +1 -1
  100. package/dist/es6/mdx/versionsTable.js +8 -21
  101. package/dist/es6/mdx/welcomePage.d.ts +1 -2
  102. package/dist/es6/mdx/welcomePage.d.ts.map +1 -1
  103. package/dist/es6/mdx/welcomePage.js +2 -38
  104. package/dist/mdx/13.0-UPGRADE-GUIDE.mdx +16 -0
  105. package/dist/mdx/labs-react/expandable/examples/Avatar.tsx +0 -2
  106. package/dist/mdx/labs-react/expandable/examples/Depth.tsx +0 -2
  107. package/dist/mdx/labs-react/expandable/examples/EndIcon.tsx +0 -2
  108. package/dist/mdx/labs-react/expandable/examples/LongTitle.tsx +0 -2
  109. package/dist/mdx/labs-react/expandable/examples/RTL.tsx +0 -2
  110. package/dist/mdx/labs-react/expandable/examples/StartIcon.tsx +0 -2
  111. package/dist/mdx/preview-react/information-highlight/examples/Caution.tsx +0 -1
  112. package/dist/mdx/preview-react/information-highlight/examples/Critical.tsx +0 -1
  113. package/dist/mdx/preview-react/information-highlight/examples/Informational.tsx +0 -1
  114. package/dist/mdx/preview-react/pill/examples/WithReadOnly.tsx +0 -2
  115. package/dist/mdx/preview-react/segmented-control/examples/Disabled.tsx +0 -1
  116. package/dist/mdx/preview-react/segmented-control/examples/RTL.tsx +0 -1
  117. package/dist/mdx/preview-react/segmented-control/examples/Vertical.tsx +0 -1
  118. package/dist/mdx/preview-react/select/examples/Top Label/Alert.tsx +0 -2
  119. package/dist/mdx/preview-react/select/examples/Top Label/Default.tsx +0 -2
  120. package/dist/mdx/preview-react/select/examples/Top Label/DefaultWithCustomOptions.tsx +0 -2
  121. package/dist/mdx/preview-react/select/examples/Top Label/DefaultWithSimpleOptions.tsx +0 -2
  122. package/dist/mdx/preview-react/select/examples/Top Label/Disabled.tsx +0 -2
  123. package/dist/mdx/preview-react/select/examples/Top Label/Error.tsx +0 -2
  124. package/dist/mdx/preview-react/select/examples/Top Label/Grow.tsx +0 -2
  125. package/dist/mdx/preview-react/select/examples/Top Label/Scrollable.tsx +0 -2
  126. package/dist/mdx/preview-react/select/examples/storiesData.tsx +0 -1
  127. package/dist/mdx/preview-react/text-area/examples/Alert.tsx +1 -4
  128. package/dist/mdx/preview-react/text-input/examples/Alert.tsx +1 -4
  129. package/dist/mdx/preview-react/text-input/examples/ThemedAlert.tsx +1 -4
  130. package/dist/mdx/react/action-bar/examples/Basic.tsx +0 -1
  131. package/dist/mdx/react/action-bar/examples/DeleteAction.tsx +0 -2
  132. package/dist/mdx/react/action-bar/examples/Icons.tsx +0 -2
  133. package/dist/mdx/react/avatar/avatar/examples/Basic.tsx +0 -1
  134. package/dist/mdx/react/avatar/avatar/examples/Button.tsx +0 -1
  135. package/dist/mdx/react/avatar/avatar/examples/CustomStyles.tsx +0 -1
  136. package/dist/mdx/react/avatar/avatar/examples/Image.tsx +0 -1
  137. package/dist/mdx/react/avatar/avatar/examples/LazyLoad.tsx +0 -1
  138. package/dist/mdx/react/avatar/avatar/examples/ObjectFit.tsx +0 -1
  139. package/dist/mdx/react/avatar/avatar/examples/Size.tsx +0 -1
  140. package/dist/mdx/react/avatar/avatar/examples/Variant.tsx +0 -1
  141. package/dist/mdx/react/banner/examples/Error.tsx +0 -2
  142. package/dist/mdx/react/banner/examples/Sticky.tsx +0 -1
  143. package/dist/mdx/react/banner/examples/StickyAnimation.tsx +42 -26
  144. package/dist/mdx/react/breadcrumbs/examples/Basic.tsx +0 -1
  145. package/dist/mdx/react/button/button/examples/Delete.tsx +0 -2
  146. package/dist/mdx/react/button/button/examples/ExternalHyperlink.tsx +0 -2
  147. package/dist/mdx/react/button/button/examples/Hyperlink.tsx +0 -2
  148. package/dist/mdx/react/button/button/examples/Primary.tsx +0 -2
  149. package/dist/mdx/react/color-picker/color-preview/examples/Basic.tsx +0 -1
  150. package/dist/mdx/react/dialog/examples/DialogWithFallbackPlacements.tsx +0 -1
  151. package/dist/mdx/react/modal/examples/Basic.tsx +0 -2
  152. package/dist/mdx/react/modal/examples/IframeTest.tsx +0 -1
  153. package/dist/mdx/react/modal/examples/ModalWithPopup.tsx +0 -1
  154. package/dist/mdx/react/modal/examples/StackedModals.tsx +0 -1
  155. package/dist/mdx/react/pagination/examples/CustomRange.tsx +0 -1
  156. package/dist/mdx/react/pagination/examples/GoToForm.tsx +0 -1
  157. package/dist/mdx/react/pagination/examples/JumpControls.tsx +0 -1
  158. package/dist/mdx/react/popup/examples/Basic.tsx +0 -2
  159. package/dist/mdx/react/popup/examples/CloseOnTargetHiddenTest.tsx +0 -1
  160. package/dist/mdx/react/popup/examples/ComboboxWithinPopup.tsx +0 -1
  161. package/dist/mdx/react/popup/examples/MultiplePopups.tsx +0 -2
  162. package/dist/mdx/react/popup/examples/PopupWithFallbackPlacements.tsx +0 -1
  163. package/dist/mdx/react/popup/examples/PopupWithNonHidablePopup.tsx +0 -1
  164. package/dist/mdx/react/popup/examples/ReturnFocusTest.tsx +0 -2
  165. package/dist/mdx/react/popup/examples/TooltipReturnFocus.tsx +0 -1
  166. package/dist/mdx/react/select/examples/MenuHeight.tsx +0 -1
  167. package/dist/mdx/react/tabs/examples/Basic.tsx +0 -1
  168. package/dist/mdx/react/tabs/examples/DisabledTab.tsx +0 -1
  169. package/dist/mdx/react/tabs/examples/NamedTabs.tsx +0 -1
  170. package/dist/mdx/react/tabs/examples/RightToLeft.tsx +0 -1
  171. package/dist/mdx/react/text-input/examples/Basic.tsx +0 -3
  172. package/dist/mdx/react/toast/examples/Basic.tsx +0 -2
  173. package/dist/mdx/react/toast/examples/ToastAlert.tsx +0 -2
  174. package/dist/mdx/react/toast/examples/ToastDialog.tsx +0 -2
  175. package/dist/mdx/react/tooltip/examples/Default.tsx +0 -2
  176. package/dist/mdx/react/tooltip/examples/DescribeType.tsx +0 -2
  177. package/dist/mdx/react/tooltip/examples/DescriptionType.tsx +0 -2
  178. package/dist/mdx/react/tooltip/examples/Muted.tsx +0 -2
  179. package/dist/mdx/style-props/examples/Background.tsx +0 -1
  180. package/dist/mdx/style-props/examples/Border.tsx +0 -1
  181. package/dist/mdx/style-props/examples/Color.tsx +0 -1
  182. package/dist/mdx/style-props/examples/Depth.tsx +0 -1
  183. package/dist/mdx/style-props/examples/Flex.tsx +0 -1
  184. package/dist/mdx/style-props/examples/FlexItem.tsx +0 -1
  185. package/dist/mdx/style-props/examples/Grid.tsx +0 -1
  186. package/dist/mdx/style-props/examples/GridItem.tsx +0 -1
  187. package/dist/mdx/style-props/examples/Layout.tsx +0 -1
  188. package/dist/mdx/style-props/examples/Other.tsx +0 -1
  189. package/dist/mdx/style-props/examples/Position.tsx +0 -1
  190. package/dist/mdx/style-props/examples/Space.tsx +0 -1
  191. package/dist/mdx/style-props/examples/Text.tsx +0 -1
  192. package/lib/StylePropsTable.tsx +0 -1
  193. package/lib/Table.tsx +0 -1
  194. package/lib/stackblitzFiles/App.tsx +0 -1
  195. package/lib/stackblitzFiles/Demo.tsx +0 -2
  196. package/lib/stackblitzFiles/main.tsx +0 -1
  197. package/lib/widgets/array.tsx +0 -2
  198. package/lib/widgets/canvasColor.tsx +0 -2
  199. package/lib/widgets/component.tsx +0 -2
  200. package/lib/widgets/conditional.tsx +0 -2
  201. package/lib/widgets/external.tsx +0 -1
  202. package/lib/widgets/model.tsx +0 -2
  203. package/lib/widgets/parenthesis.tsx +0 -2
  204. package/lib/widgets/primitives.tsx +1 -5
  205. package/lib/widgets/qualifiedName.tsx +0 -2
  206. package/lib/widgets/symbol.tsx +0 -2
  207. package/lib/widgets/tuple.tsx +0 -2
  208. package/lib/widgets/typeParameter.tsx +0 -2
  209. package/package.json +6 -6
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import React from 'react';
2
3
  import { Table } from '@workday/canvas-kit-react';
3
4
  import { StatusIndicator } from '@workday/canvas-kit-preview-react';
@@ -48,25 +49,11 @@ export const VersionTable = () => {
48
49
  }
49
50
  setVersions(arr);
50
51
  }, []);
51
- return (React.createElement(Table, null,
52
- React.createElement(Table.Head, null,
53
- React.createElement(Table.Row, null,
54
- React.createElement(Table.Header, { scope: "col" }, "Version"),
55
- React.createElement(Table.Header, { scope: "col" }, "Documentation"),
56
- React.createElement(Table.Header, { scope: "col" }, "Status"))),
57
- React.createElement(Table.Body, null, versions
58
- .slice()
59
- .reverse()
60
- .map(item => {
61
- const { label, variant } = getVersionStatusIndicator(item.versionNumber);
62
- return (React.createElement(Table.Row, null,
63
- React.createElement(Table.Cell, null,
64
- "v",
65
- item.versionNumber),
66
- React.createElement(Table.Cell, null,
67
- React.createElement("a", { href: item.versionUrl, target: "_blank", rel: "noreferrer" }, "Documentation")),
68
- React.createElement(Table.Cell, null,
69
- React.createElement(StatusIndicator, { variant: variant },
70
- React.createElement(StatusIndicator.Label, null, label)))));
71
- }))));
52
+ return (_jsxs(Table, { children: [_jsx(Table.Head, { children: _jsxs(Table.Row, { children: [_jsx(Table.Header, { scope: "col", children: "Version" }), _jsx(Table.Header, { scope: "col", children: "Documentation" }), _jsx(Table.Header, { scope: "col", children: "Status" })] }) }), _jsx(Table.Body, { children: versions
53
+ .slice()
54
+ .reverse()
55
+ .map(item => {
56
+ const { label, variant } = getVersionStatusIndicator(item.versionNumber);
57
+ return (_jsxs(Table.Row, { children: [_jsxs(Table.Cell, { children: ["v", item.versionNumber] }), _jsx(Table.Cell, { children: _jsx("a", { href: item.versionUrl, target: "_blank", rel: "noreferrer", children: "Documentation" }) }), _jsx(Table.Cell, { children: _jsx(StatusIndicator, { variant: variant, children: _jsx(StatusIndicator.Label, { children: label }) }) })] }));
58
+ }) })] }));
72
59
  };
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
- export declare const WelcomePage: () => React.JSX.Element;
1
+ export declare const WelcomePage: () => import("react/jsx-runtime").JSX.Element;
3
2
  //# sourceMappingURL=welcomePage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"welcomePage.d.ts","sourceRoot":"","sources":["../../../mdx/welcomePage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAsD1B,eAAO,MAAM,WAAW,yBAkHvB,CAAC"}
1
+ {"version":3,"file":"welcomePage.d.ts","sourceRoot":"","sources":["../../../mdx/welcomePage.tsx"],"names":[],"mappings":"AAqDA,eAAO,MAAM,WAAW,+CAkHvB,CAAC"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // @ts-ignore: Cannot find module error
3
3
  import headerImage from './CK-banner-temp.jpg';
4
4
  import { Flex, Grid, Box } from '@workday/canvas-kit-react/layout';
@@ -45,41 +45,5 @@ const linkStyles = createStyles({
45
45
  marginTop: system.space.x3,
46
46
  });
47
47
  export const WelcomePage = () => {
48
- return (React.createElement("div", { className: "sb-unstyled" },
49
- React.createElement("div", { className: parentFlexStyles },
50
- React.createElement(Box, { cs: { overflow: 'hidden', position: 'relative' } },
51
- React.createElement(Flex, { cs: { flexDirection: 'row', position: 'absolute', top: '45%', left: '10%' } },
52
- React.createElement(Text, { typeLevel: "title.medium", cs: textStyles }, "Canvas Kit"),
53
- React.createElement(Text, { typeLevel: "title.medium", cs: [textStyles, versionStyles] },
54
- "v",
55
- version)),
56
- React.createElement("img", { src: headerImage, alt: "banner with canvas kit logo and version", className: imageStyles })),
57
- React.createElement(Text, { typeLevel: "body.medium" },
58
- "This project provides a set of components for the Workday Canvas Design System that can be used to implement user experiences consistent with",
59
- React.createElement(ExternalHyperlink, { href: "https://canvas.workdaydesign.com/", iconLabel: "Open docs in new window" }, "Workday Design Principles.")),
60
- React.createElement(Heading, { size: "medium", className: borderStyles }, "Quick Links"),
61
- React.createElement(Grid, { gridAutoColumns: "auto", gridTemplateColumns: "repeat(auto-fill, minmax(250px, 1fr))", gridGap: "s" },
62
- React.createElement(Grid, { as: Card, className: gridStyles },
63
- React.createElement(SystemIcon, { color: base.cantaloupe400, colorHover: base.cantaloupe400, icon: rocketIcon, size: 60 }),
64
- React.createElement(Card.Heading, null, "Getting Started"),
65
- React.createElement(Card.Body, null,
66
- React.createElement(Text, null, "For all things getting started including helpful guides and docs.")),
67
- React.createElement(Grid.Item, { as: Hyperlink, className: linkStyles, href: "https://workday.github.io/canvas-kit/?path=/docs/guides-getting-started--docs" }, "Getting Started Guide")),
68
- React.createElement(Grid, { as: Card, className: gridStyles },
69
- React.createElement(SystemIcon, { color: base.blueberry400, icon: tokensIcon, colorHover: base.blueberry400, size: 60 }),
70
- React.createElement(Card.Heading, null, "Tokens"),
71
- React.createElement(Card.Body, null,
72
- React.createElement(Text, null, "Tokens are the smallest pieces of our Design System with the primary function of storing UI information.")),
73
- React.createElement(Grid.Item, { as: Hyperlink, className: linkStyles, href: "https://workday.github.io/canvas-kit/?path=/docs/tokens--overview" }, "View Our Tokens")),
74
- React.createElement(Grid, { as: Card, className: gridStyles },
75
- React.createElement(SystemIcon, { color: base.greenApple400, icon: shapesIcon, size: 60, colorHover: base.greenApple400 }),
76
- React.createElement(Card.Heading, null, "Assets"),
77
- React.createElement(Card.Body, null,
78
- React.createElement(Text, null, "Assets are graphics which help communicate meaning or highlight areas of interaction to our users.")),
79
- React.createElement(Grid.Item, { as: Hyperlink, className: linkStyles, href: "https://workday.github.io/canvas-kit/?path=/docs/assets-icons--overview" }, "View Assets"))),
80
- React.createElement(Heading, { size: "medium", className: borderStyles }, "Installation"),
81
- React.createElement(Text, null, "To get started using Canvas Kit React first add or install the module to your existing React project"),
82
- React.createElement(InstallBlock, { command: "yarn add", packageName: "@workday/canvas-kit-react" }),
83
- "or",
84
- React.createElement(InstallBlock, { command: "npm install", packageName: "@workday/canvas-kit-react" }))));
48
+ return (_jsx("div", { className: "sb-unstyled", children: _jsxs("div", { className: parentFlexStyles, children: [_jsxs(Box, { cs: { overflow: 'hidden', position: 'relative' }, children: [_jsxs(Flex, { cs: { flexDirection: 'row', position: 'absolute', top: '45%', left: '10%' }, children: [_jsx(Text, { typeLevel: "title.medium", cs: textStyles, children: "Canvas Kit" }), _jsxs(Text, { typeLevel: "title.medium", cs: [textStyles, versionStyles], children: ["v", version] })] }), _jsx("img", { src: headerImage, alt: "banner with canvas kit logo and version", className: imageStyles })] }), _jsxs(Text, { typeLevel: "body.medium", children: ["This project provides a set of components for the Workday Canvas Design System that can be used to implement user experiences consistent with", _jsx(ExternalHyperlink, { href: "https://canvas.workdaydesign.com/", iconLabel: "Open docs in new window", children: "Workday Design Principles." })] }), _jsx(Heading, { size: "medium", className: borderStyles, children: "Quick Links" }), _jsxs(Grid, { gridAutoColumns: "auto", gridTemplateColumns: "repeat(auto-fill, minmax(250px, 1fr))", gridGap: "s", children: [_jsxs(Grid, { as: Card, className: gridStyles, children: [_jsx(SystemIcon, { color: base.cantaloupe400, colorHover: base.cantaloupe400, icon: rocketIcon, size: 60 }), _jsx(Card.Heading, { children: "Getting Started" }), _jsx(Card.Body, { children: _jsx(Text, { children: "For all things getting started including helpful guides and docs." }) }), _jsx(Grid.Item, { as: Hyperlink, className: linkStyles, href: "https://workday.github.io/canvas-kit/?path=/docs/guides-getting-started--docs", children: "Getting Started Guide" })] }), _jsxs(Grid, { as: Card, className: gridStyles, children: [_jsx(SystemIcon, { color: base.blueberry400, icon: tokensIcon, colorHover: base.blueberry400, size: 60 }), _jsx(Card.Heading, { children: "Tokens" }), _jsx(Card.Body, { children: _jsx(Text, { children: "Tokens are the smallest pieces of our Design System with the primary function of storing UI information." }) }), _jsx(Grid.Item, { as: Hyperlink, className: linkStyles, href: "https://workday.github.io/canvas-kit/?path=/docs/tokens--overview", children: "View Our Tokens" })] }), _jsxs(Grid, { as: Card, className: gridStyles, children: [_jsx(SystemIcon, { color: base.greenApple400, icon: shapesIcon, size: 60, colorHover: base.greenApple400 }), _jsx(Card.Heading, { children: "Assets" }), _jsx(Card.Body, { children: _jsx(Text, { children: "Assets are graphics which help communicate meaning or highlight areas of interaction to our users." }) }), _jsx(Grid.Item, { as: Hyperlink, className: linkStyles, href: "https://workday.github.io/canvas-kit/?path=/docs/assets-icons--overview", children: "View Assets" })] })] }), _jsx(Heading, { size: "medium", className: borderStyles, children: "Installation" }), _jsx(Text, { children: "To get started using Canvas Kit React first add or install the module to your existing React project" }), _jsx(InstallBlock, { command: "yarn add", packageName: "@workday/canvas-kit-react" }), "or", _jsx(InstallBlock, { command: "npm install", packageName: "@workday/canvas-kit-react" })] }) }));
85
49
  };
@@ -21,6 +21,8 @@ any questions.
21
21
  - [External Hyperlink](#external-hyperlink)
22
22
  - [Pill](#pill)
23
23
  - [Tabs](#tabs)
24
+ - [Infrastructure](#infrastructure)
25
+ - [Supporting react-jsx](#supoorting-react-jsx)
24
26
  - [Troubleshooting](#troubleshooting)
25
27
  - [Glossary](#glossary)
26
28
  - [Main](#main)
@@ -158,6 +160,20 @@ A few changes have been made to `Pill` to ensure proper accessibility and styles
158
160
 
159
161
  **Note:** There should be no developer impact and the visual changes are safe to accept.
160
162
 
163
+ ## Infrastructure
164
+
165
+ ### Supporting `react-jsx`
166
+
167
+ We've updated the `jsx` flag in our `tsconfig` to `react-jsx`. As part of this change, we've also updated our peer dependencies for our packages to a minimum version of `react@17.0.0`. This change is to provide support for modern technologies like `vite` and ES modules.
168
+
169
+ ##### Breaking Changes
170
+
171
+ If you're using `react@16.x.x`, you'll need to upgrade to `react@17.x.x` to use Canvas Kit v13.
172
+
173
+ >**Note:** You'll need to update the way `jsx` transpiles. The automatic runtime feature, enabled through the `@babel/preset-react` preset with the `runtime: "automatic"` option, handles the importing of functions that JSX transpiles to.
174
+
175
+ ```sh
176
+
161
177
  ## Troubleshooting
162
178
 
163
179
  ## Glossary
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {Expandable} from '@workday/canvas-kit-labs-react/expandable';
4
2
  // @ts-ignore: Cannot find module error
5
3
  import testAvatar from './test-avatar.png';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {Expandable} from '@workday/canvas-kit-labs-react/expandable';
4
2
  import {space} from '@workday/canvas-kit-react/tokens';
5
3
 
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {Expandable} from '@workday/canvas-kit-labs-react/expandable';
4
2
 
5
3
  export default () => (
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {Expandable} from '@workday/canvas-kit-labs-react/expandable';
4
2
  // @ts-ignore: Cannot find module error
5
3
  import testAvatar from './test-avatar.png';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {Expandable} from '@workday/canvas-kit-labs-react/expandable';
4
2
  import {CanvasProvider, ContentDirection} from '@workday/canvas-kit-react/common';
5
3
 
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {Expandable} from '@workday/canvas-kit-labs-react/expandable';
4
2
 
5
3
  export default () => (
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Flex} from '@workday/canvas-kit-react/layout';
3
2
  import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight';
4
3
  import {system} from '@workday/canvas-tokens-web';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Flex} from '@workday/canvas-kit-react/layout';
3
2
  import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight';
4
3
  import {system} from '@workday/canvas-tokens-web';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Flex} from '@workday/canvas-kit-react/layout';
3
2
  import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight';
4
3
  import {system} from '@workday/canvas-tokens-web';
@@ -1,5 +1,3 @@
1
- import * as React from 'react';
2
-
3
1
  import {Pill} from '@workday/canvas-kit-preview-react/pill';
4
2
  import {createStyles} from '@workday/canvas-kit-styling';
5
3
  import {system} from '@workday/canvas-tokens-web';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {SegmentedControl} from '@workday/canvas-kit-preview-react/segmented-control';
3
2
  import {
4
3
  gridIcon,
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {CanvasProvider, ContentDirection} from '@workday/canvas-kit-react/common';
3
2
  import {
4
3
  gridIcon,
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {SegmentedControl} from '@workday/canvas-kit-preview-react/segmented-control';
3
2
  import {
4
3
  gridIcon,
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {FormField} from '@workday/canvas-kit-react/form-field';
4
2
  import {Select} from '@workday/canvas-kit-preview-react/select';
5
3
  import {hintText, options} from '../storiesData';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {FormField} from '@workday/canvas-kit-react/form-field';
4
2
  import {Select} from '@workday/canvas-kit-preview-react/select';
5
3
  import {options} from '../storiesData';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {FormField} from '@workday/canvas-kit-react/form-field';
4
2
  import {Select} from '@workday/canvas-kit-preview-react/select';
5
3
  import {customOptions, customRenderOption, customRenderSelected} from '../storiesData';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {FormField} from '@workday/canvas-kit-react/form-field';
4
2
  import {Select} from '@workday/canvas-kit-preview-react/select';
5
3
  import {simpleOptions} from '../storiesData';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {FormField} from '@workday/canvas-kit-react/form-field';
4
2
  import {Select} from '@workday/canvas-kit-preview-react/select';
5
3
  import {options} from '../storiesData';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {FormField} from '@workday/canvas-kit-react/form-field';
4
2
  import {Select} from '@workday/canvas-kit-preview-react/select';
5
3
  import {hintText, options} from '../storiesData';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {FormField} from '@workday/canvas-kit-react/form-field';
4
2
  import {Select} from '@workday/canvas-kit-preview-react/select';
5
3
  import {options} from '../storiesData';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {FormField} from '@workday/canvas-kit-react/form-field';
4
2
  import {Select} from '@workday/canvas-kit-preview-react/select';
5
3
  import {manyOptions} from '../storiesData';
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import {SystemIcon} from '@workday/canvas-kit-react/icon';
3
2
  import {
4
3
  activityStreamIcon,
@@ -1,6 +1,3 @@
1
- /** @jsxRuntime classic */
2
- /** @jsx jsx */
3
- import {jsx} from '@emotion/react';
4
1
  import React from 'react';
5
2
  import {TextArea} from '@workday/canvas-kit-preview-react/text-area';
6
3
  import {useThemedRing} from '@workday/canvas-kit-react/common';
@@ -28,7 +25,7 @@ export default () => {
28
25
  return (
29
26
  <TextArea orientation="vertical">
30
27
  <TextArea.Label>Add a comment</TextArea.Label>
31
- <TextArea.Field css={alertStyles} onChange={handleChange} value={value} />
28
+ <TextArea.Field cs={alertStyles} onChange={handleChange} value={value} />
32
29
  <TextArea.Hint paddingTop={space.xxs}>
33
30
  <strong>Character Limit: </strong>
34
31
  <Text color={hintColor}>{10 - value.length} Left</Text>
@@ -1,6 +1,3 @@
1
- /** @jsxRuntime classic */
2
- /** @jsx jsx */
3
- import {jsx} from '@emotion/react';
4
1
  import React from 'react';
5
2
  import {TextInput} from '@workday/canvas-kit-preview-react/text-input';
6
3
  import {useThemedRing} from '@workday/canvas-kit-react/common';
@@ -20,7 +17,7 @@ export default () => {
20
17
  return (
21
18
  <TextInput orientation="vertical">
22
19
  <TextInput.Label>Password</TextInput.Label>
23
- <TextInput.Field css={alertStyles} onChange={handleChange} value={value} type="password" />
20
+ <TextInput.Field cs={alertStyles} onChange={handleChange} value={value} type="password" />
24
21
  <TextInput.Hint paddingTop={space.xxs}>
25
22
  <strong>Password Strength: </strong>
26
23
  {value.length < 3 ? (
@@ -1,6 +1,3 @@
1
- /** @jsxRuntime classic */
2
- /** @jsx jsx */
3
- import {jsx} from '@emotion/react';
4
1
  import React from 'react';
5
2
  import {TextInput} from '@workday/canvas-kit-preview-react/text-input';
6
3
  import {
@@ -43,7 +40,7 @@ const AlertInput = () => {
43
40
  return (
44
41
  <TextInput orientation="vertical">
45
42
  <TextInput.Label>Email</TextInput.Label>
46
- <TextInput.Field css={alertStyles} onChange={handleChange} value={value} />
43
+ <TextInput.Field cs={alertStyles} onChange={handleChange} value={value} />
47
44
  <TextInput.Hint paddingTop={space.xxs}>Please enter a valid email.</TextInput.Hint>
48
45
  </TextInput>
49
46
  );
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {ActionBar} from '@workday/canvas-kit-react/action-bar';
3
2
  import {PrimaryButton} from '@workday/canvas-kit-react/button';
4
3
 
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {ActionBar} from '@workday/canvas-kit-react/action-bar';
4
2
  import {DeleteButton} from '@workday/canvas-kit-react/button';
5
3
 
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {ActionBar} from '@workday/canvas-kit-react/action-bar';
4
2
  import {notificationsIcon, alarmClockIcon} from '@workday/canvas-system-icons-web';
5
3
  import {PrimaryButton} from '@workday/canvas-kit-react/button';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Avatar} from '@workday/canvas-kit-react/avatar';
3
2
  import {createStyles} from '@workday/canvas-kit-styling';
4
3
  import {system} from '@workday/canvas-tokens-web';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Avatar} from '@workday/canvas-kit-react/avatar';
3
2
  import {createStyles} from '@workday/canvas-kit-styling';
4
3
  import {system} from '@workday/canvas-tokens-web';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Avatar} from '@workday/canvas-kit-react/avatar';
3
2
  import {createStencil, createStyles} from '@workday/canvas-kit-styling';
4
3
  import {base, system} from '@workday/canvas-tokens-web';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Avatar} from '@workday/canvas-kit-react/avatar';
3
2
  // @ts-ignore: Cannot find module error
4
3
  import testAvatar from './test-avatar.png';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Avatar} from '@workday/canvas-kit-react/avatar';
3
2
  // @ts-ignore: Cannot find module error
4
3
  import testAvatar from './test-avatar.png';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Avatar} from '@workday/canvas-kit-react/avatar';
3
2
  import {px2rem} from '@workday/canvas-kit-styling';
4
3
 
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Avatar} from '@workday/canvas-kit-react/avatar';
3
2
  import {px2rem} from '@workday/canvas-kit-styling';
4
3
 
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Avatar} from '@workday/canvas-kit-react/avatar';
3
2
 
4
3
  export default () => (
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {Banner} from '@workday/canvas-kit-react/banner';
4
2
 
5
3
  export default () => {
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Box} from '@workday/canvas-kit-react/layout';
3
2
  import {Banner} from '@workday/canvas-kit-react/banner';
4
3
  import {styled} from '@workday/canvas-kit-react/common';
@@ -1,6 +1,3 @@
1
- /** @jsxRuntime classic */
2
- /** @jsx jsx */
3
- import {jsx, keyframes} from '@emotion/react';
4
1
  import React from 'react';
5
2
 
6
3
  import {CSSProperties, space} from '@workday/canvas-kit-react/tokens';
@@ -8,47 +5,66 @@ import {useTheme} from '@workday/canvas-kit-react/common';
8
5
  import {Box} from '@workday/canvas-kit-react/layout';
9
6
  import {loopIcon} from '@workday/canvas-system-icons-web';
10
7
  import {Banner} from '@workday/canvas-kit-react/banner';
8
+ import {
9
+ createStencil,
10
+ createStyles,
11
+ createVars,
12
+ keyframes,
13
+ handleCsProp,
14
+ cssVar,
15
+ } from '@workday/canvas-kit-styling';
16
+ import {system} from '@workday/canvas-tokens-web';
11
17
 
12
- const containerStyles: CSSProperties = {
18
+ const containerStyles = createStyles({
13
19
  position: 'absolute',
14
20
  right: 0,
15
21
  overflow: 'hidden',
16
- };
22
+ });
23
+ const stickyAnimationVars = createVars('width', 'rerun');
24
+ const stickAnimationKeyframes = keyframes({
25
+ '0%': {
26
+ transform: `translateX(${cssVar(stickyAnimationVars.width)})`,
27
+ },
28
+ '100%': {
29
+ transform: `translateX(0 * ${cssVar(stickyAnimationVars.rerun)})`,
30
+ },
31
+ });
32
+
33
+ const stickyAnimationStencil = createStencil({
34
+ base: {
35
+ marginY: system.space.x1,
36
+ marginInlineStart: system.space.x1,
37
+ marginInlineEnd: 0,
38
+ animationName: stickAnimationKeyframes,
39
+ animationDuration: '.3s',
40
+ animationTimingFunction: 'ease-out',
41
+ },
42
+ });
17
43
 
18
44
  export default () => {
19
45
  const theme = useTheme();
20
46
  const bannerRef = React.useRef<HTMLButtonElement>(null);
21
47
  const containerRef = React.useRef<HTMLDivElement>(null);
22
48
  const [styles, setStyles] = React.useState<CSSProperties>();
49
+ const [bannerWidth, setBannerWidth] = React.useState(0);
23
50
 
24
51
  const [rerun, setRerun] = React.useState(1); // Only needed for demo purposes
25
52
 
26
53
  React.useLayoutEffect(() => {
27
- let width = bannerRef.current.offsetWidth;
28
- if (theme.canvas.direction === 'rtl') {
29
- width *= -1;
30
- }
31
- const slideInKeyframes = keyframes({
32
- '0%': {
33
- transform: `translateX(${width}px)`,
34
- },
35
- '100%': {
36
- transform: `translateX(0 * ${rerun})`,
37
- },
38
- });
39
-
40
- setStyles({
41
- marginY: space.xxxs,
42
- marginInlineStart: space.xxxs,
43
- maringInlineEnd: 0,
44
- animation: `${slideInKeyframes} .3s ease-out forwards`,
45
- });
54
+ const width = bannerRef.current.offsetWidth;
55
+ setBannerWidth(theme.canvas.direction === 'rtl' ? width * -1 : width);
46
56
  }, [theme.canvas.direction, rerun]);
47
57
 
48
58
  return (
49
59
  <Box height={64}>
50
- <div css={containerStyles} ref={containerRef}>
51
- <div css={styles}>
60
+ <div className={containerStyles} ref={containerRef}>
61
+ <div
62
+ key={rerun}
63
+ {...handleCsProp({}, [
64
+ stickyAnimationStencil(),
65
+ stickyAnimationVars({width: `${bannerWidth}px`, rerun: `${rerun}`}),
66
+ ])}
67
+ >
52
68
  <Banner
53
69
  onClick={() => setRerun(r => r + 1)}
54
70
  hasError={true}
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import {Breadcrumbs} from '@workday/canvas-kit-react/breadcrumbs';
3
2
 
4
3
  export default () => {
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {DeleteButton} from '@workday/canvas-kit-react/button';
4
2
  import {Flex} from '@workday/canvas-kit-react/layout';
5
3
  import {trashIcon} from '@workday/canvas-system-icons-web';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {ExternalHyperlink} from '@workday/canvas-kit-react/button';
4
2
 
5
3
  export default () => (
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {Hyperlink} from '@workday/canvas-kit-react/button';
4
2
 
5
3
  export default () => <Hyperlink href="#hyperlink">Hyperlink</Hyperlink>;
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {PrimaryButton} from '@workday/canvas-kit-react/button';
4
2
  import {Flex} from '@workday/canvas-kit-react/layout';
5
3
  import {
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {ColorPreview} from '@workday/canvas-kit-react/color-picker';
3
2
  import {FormField} from '@workday/canvas-kit-react/form-field';
4
3
 
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Dialog} from '@workday/canvas-kit-react/dialog';
3
2
  import {PrimaryButton} from '@workday/canvas-kit-react/button';
4
3
  import {Flex, Grid} from '@workday/canvas-kit-react/layout';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {Modal} from '@workday/canvas-kit-react/modal';
4
2
  import {PrimaryButton} from '@workday/canvas-kit-react/button';
5
3
  import {Flex, Box} from '@workday/canvas-kit-react/layout';
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import {Modal} from '@workday/canvas-kit-react/modal';
3
2
  import {DeleteButton} from '@workday/canvas-kit-react/button';
4
3
  import {Flex} from '@workday/canvas-kit-react/layout';
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import {Modal, useModalModel} from '@workday/canvas-kit-react/modal';
3
2
  import {DeleteButton} from '@workday/canvas-kit-react/button';
4
3
  import {
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import {Modal, useModalModel} from '@workday/canvas-kit-react/modal';
3
2
  import {DeleteButton} from '@workday/canvas-kit-react/button';
4
3
  import {Flex} from '@workday/canvas-kit-react/layout';
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import {
3
2
  Pagination,
4
3
  getLastPage,
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import {
3
2
  Pagination,
4
3
  getLastPage,
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import {
3
2
  Pagination,
4
3
  getLastPage,
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {DeleteButton} from '@workday/canvas-kit-react/button';
4
2
  import {
5
3
  Popup,