@workday/canvas-kit-react 14.1.21 → 14.2.0-0017-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 (278) hide show
  1. package/banner/lib/hooks/useThemedPalette.ts +6 -0
  2. package/common/lib/CanvasProvider.tsx +6 -0
  3. package/common/lib/theming/README.md +104 -444
  4. package/common/lib/theming/getObjectProxy.ts +1 -0
  5. package/common/lib/theming/index.ts +28 -0
  6. package/common/lib/theming/types.ts +19 -1
  7. package/common/lib/utils/colorUtils.ts +2 -1
  8. package/dist/commonjs/action-bar/lib/ActionBarList.js +1 -1
  9. package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.js +1 -1
  10. package/dist/commonjs/avatar/lib/Avatar.js +20 -20
  11. package/dist/commonjs/badge/lib/CountBadge.js +6 -6
  12. package/dist/commonjs/banner/lib/Banner.js +5 -5
  13. package/dist/commonjs/banner/lib/BannerActionText.js +2 -2
  14. package/dist/commonjs/banner/lib/BannerIcon.js +1 -1
  15. package/dist/commonjs/banner/lib/BannerLabel.js +1 -1
  16. package/dist/commonjs/banner/lib/hooks/useThemedPalette.d.ts +6 -0
  17. package/dist/commonjs/banner/lib/hooks/useThemedPalette.d.ts.map +1 -1
  18. package/dist/commonjs/banner/lib/hooks/useThemedPalette.js +6 -0
  19. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.js +1 -1
  20. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.js +1 -1
  21. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsLink.js +1 -1
  22. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsList.js +1 -1
  23. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.js +2 -2
  24. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.js +1 -1
  25. package/dist/commonjs/button/lib/BaseButton.js +21 -21
  26. package/dist/commonjs/button/lib/DeleteButton.js +1 -1
  27. package/dist/commonjs/button/lib/ExternalHyperlink.js +1 -1
  28. package/dist/commonjs/button/lib/Hyperlink.js +4 -4
  29. package/dist/commonjs/button/lib/PrimaryButton.js +2 -2
  30. package/dist/commonjs/button/lib/SecondaryButton.js +2 -2
  31. package/dist/commonjs/button/lib/TertiaryButton.js +17 -17
  32. package/dist/commonjs/button/lib/ToolbarDropdownButton.js +3 -3
  33. package/dist/commonjs/button/lib/ToolbarIconButton.js +1 -1
  34. package/dist/commonjs/card/lib/Card.js +3 -3
  35. package/dist/commonjs/card/lib/CardBody.js +1 -1
  36. package/dist/commonjs/card/lib/CardHeading.js +1 -1
  37. package/dist/commonjs/checkbox/lib/CheckBackground.js +3 -3
  38. package/dist/commonjs/checkbox/lib/CheckboxCheck.js +5 -5
  39. package/dist/commonjs/checkbox/lib/CheckboxContainer.js +1 -1
  40. package/dist/commonjs/checkbox/lib/CheckboxInput.js +5 -5
  41. package/dist/commonjs/checkbox/lib/CheckboxRipple.js +1 -1
  42. package/dist/commonjs/collection/lib/ListBox.js +3 -3
  43. package/dist/commonjs/color-picker/lib/ColorInput.js +3 -3
  44. package/dist/commonjs/color-picker/lib/ColorPreview.js +1 -1
  45. package/dist/commonjs/color-picker/lib/parts/ColorSwatch.js +2 -2
  46. package/dist/commonjs/combobox/lib/ComboboxMenuList.js +1 -1
  47. package/dist/commonjs/common/lib/AccessibleHide.js +1 -1
  48. package/dist/commonjs/common/lib/CanvasProvider.d.ts +3 -0
  49. package/dist/commonjs/common/lib/CanvasProvider.d.ts.map +1 -1
  50. package/dist/commonjs/common/lib/CanvasProvider.js +6 -2
  51. package/dist/commonjs/common/lib/theming/getObjectProxy.d.ts +1 -0
  52. package/dist/commonjs/common/lib/theming/getObjectProxy.d.ts.map +1 -1
  53. package/dist/commonjs/common/lib/theming/getObjectProxy.js +1 -0
  54. package/dist/commonjs/common/lib/theming/index.d.ts +28 -0
  55. package/dist/commonjs/common/lib/theming/index.d.ts.map +1 -1
  56. package/dist/commonjs/common/lib/theming/index.js +28 -0
  57. package/dist/commonjs/common/lib/theming/types.d.ts +15 -0
  58. package/dist/commonjs/common/lib/theming/types.d.ts.map +1 -1
  59. package/dist/commonjs/common/lib/theming/types.js +1 -0
  60. package/dist/commonjs/common/lib/utils/colorUtils.d.ts +1 -0
  61. package/dist/commonjs/common/lib/utils/colorUtils.d.ts.map +1 -1
  62. package/dist/commonjs/common/lib/utils/colorUtils.js +1 -0
  63. package/dist/commonjs/expandable/lib/Expandable.js +1 -1
  64. package/dist/commonjs/expandable/lib/ExpandableAvatar.js +1 -1
  65. package/dist/commonjs/expandable/lib/ExpandableContent.js +1 -1
  66. package/dist/commonjs/expandable/lib/ExpandableIcon.js +10 -10
  67. package/dist/commonjs/expandable/lib/ExpandableTarget.js +1 -1
  68. package/dist/commonjs/expandable/lib/ExpandableTitle.js +1 -1
  69. package/dist/commonjs/form-field/lib/FormFieldContainer.js +1 -1
  70. package/dist/commonjs/form-field/lib/FormFieldField.js +1 -1
  71. package/dist/commonjs/form-field/lib/FormFieldGroupLabel.js +5 -5
  72. package/dist/commonjs/form-field/lib/FormFieldGroupList.js +3 -3
  73. package/dist/commonjs/form-field/lib/FormFieldHint.js +3 -3
  74. package/dist/commonjs/form-field/lib/FormFieldLabel.js +6 -6
  75. package/dist/commonjs/form-field/lib/formFieldStencil.js +8 -8
  76. package/dist/commonjs/icon/lib/AccentIcon.js +2 -2
  77. package/dist/commonjs/icon/lib/AppletIcon.js +1 -1
  78. package/dist/commonjs/icon/lib/Graphic.js +4 -4
  79. package/dist/commonjs/icon/lib/Svg.js +3 -3
  80. package/dist/commonjs/icon/lib/SystemIcon.js +1 -1
  81. package/dist/commonjs/icon/lib/SystemIconCircle.js +1 -1
  82. package/dist/commonjs/loading-dots/lib/LoadingDots.js +3 -3
  83. package/dist/commonjs/menu/lib/MenuCard.js +1 -1
  84. package/dist/commonjs/menu/lib/MenuDivider.js +1 -1
  85. package/dist/commonjs/menu/lib/MenuGroup.js +1 -1
  86. package/dist/commonjs/menu/lib/MenuItem.js +1 -1
  87. package/dist/commonjs/menu/lib/MenuList.js +3 -3
  88. package/dist/commonjs/modal/lib/ModalBody.js +1 -1
  89. package/dist/commonjs/modal/lib/ModalCard.js +1 -1
  90. package/dist/commonjs/modal/lib/ModalHeading.js +1 -1
  91. package/dist/commonjs/modal/lib/ModalOverflowOverlay.js +1 -1
  92. package/dist/commonjs/modal/lib/ModalOverlay.js +2 -2
  93. package/dist/commonjs/pagination/lib/Pagination/AdditionalDetails.js +2 -2
  94. package/dist/commonjs/pagination/lib/Pagination/Controls.d.ts.map +1 -1
  95. package/dist/commonjs/pagination/lib/Pagination/Controls.js +9 -15
  96. package/dist/commonjs/pagination/lib/Pagination/GoTo/Form.js +1 -1
  97. package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.js +1 -1
  98. package/dist/commonjs/pagination/lib/Pagination/GoTo/TextInput.js +1 -1
  99. package/dist/commonjs/pagination/lib/Pagination/Nav.js +1 -1
  100. package/dist/commonjs/pagination/lib/Pagination/PageButton.js +2 -2
  101. package/dist/commonjs/pagination/lib/Pagination/PageList.js +1 -1
  102. package/dist/commonjs/pagination/lib/Pagination/Pagination.js +1 -1
  103. package/dist/commonjs/pagination/lib/Pagination/common/List.js +2 -2
  104. package/dist/commonjs/popup/lib/PopupBody.js +1 -1
  105. package/dist/commonjs/popup/lib/PopupCard.js +2 -2
  106. package/dist/commonjs/popup/lib/PopupCloseIcon.js +1 -1
  107. package/dist/commonjs/popup/lib/PopupHeading.js +1 -1
  108. package/dist/commonjs/popup/lib/hooks/useDisableBodyScroll.js +1 -1
  109. package/dist/commonjs/segmented-control/lib/SegmentedControlButton.js +4 -4
  110. package/dist/commonjs/select/lib/SelectCard.js +1 -1
  111. package/dist/commonjs/select/lib/SelectInput.js +3 -3
  112. package/dist/commonjs/skeleton/lib/Skeleton.js +2 -2
  113. package/dist/commonjs/skeleton/lib/parts/SkeletonHeader.js +1 -1
  114. package/dist/commonjs/skeleton/lib/parts/SkeletonShape.js +1 -1
  115. package/dist/commonjs/skeleton/lib/parts/SkeletonText.js +1 -1
  116. package/dist/commonjs/switch/lib/Switch.js +7 -7
  117. package/dist/commonjs/table/lib/BaseTable.js +1 -1
  118. package/dist/commonjs/table/lib/Table.js +7 -7
  119. package/dist/commonjs/table/lib/parts/BaseTableBody.js +1 -1
  120. package/dist/commonjs/table/lib/parts/BaseTableCaption.js +1 -1
  121. package/dist/commonjs/table/lib/parts/BaseTableCell.js +1 -1
  122. package/dist/commonjs/table/lib/parts/BaseTableHead.js +1 -1
  123. package/dist/commonjs/table/lib/parts/BaseTableHeader.js +1 -1
  124. package/dist/commonjs/table/lib/parts/css-grid-table/TableRow.js +1 -1
  125. package/dist/commonjs/tabs/lib/TabsItem.js +1 -1
  126. package/dist/commonjs/tabs/lib/TabsList.js +8 -8
  127. package/dist/commonjs/tabs/lib/TabsOverflowButton.js +1 -1
  128. package/dist/commonjs/testing/lib/ComponentStatesTable.js +5 -5
  129. package/dist/commonjs/text/lib/LabelText.js +6 -6
  130. package/dist/commonjs/text/lib/Text.js +16 -16
  131. package/dist/commonjs/text/lib/TypeLevelComponents.js +4 -4
  132. package/dist/commonjs/text-area/lib/TextArea.js +5 -5
  133. package/dist/commonjs/text-input/lib/InputGroup.js +6 -6
  134. package/dist/commonjs/text-input/lib/TextInput.js +5 -5
  135. package/dist/commonjs/toast/lib/Toast.js +1 -1
  136. package/dist/commonjs/toast/lib/ToastBody.js +1 -1
  137. package/dist/commonjs/toast/lib/ToastCloseIcon.js +1 -1
  138. package/dist/commonjs/toast/lib/ToastIcon.js +1 -1
  139. package/dist/commonjs/toast/lib/ToastMessage.js +1 -1
  140. package/dist/commonjs/tooltip/lib/TooltipContainer.js +2 -2
  141. package/dist/commonjs/version/lib/version.js +1 -1
  142. package/dist/es6/action-bar/lib/ActionBarList.js +1 -1
  143. package/dist/es6/action-bar/lib/ActionBarOverflowButton.js +1 -1
  144. package/dist/es6/avatar/lib/Avatar.js +20 -20
  145. package/dist/es6/badge/lib/CountBadge.js +6 -6
  146. package/dist/es6/banner/lib/Banner.js +5 -5
  147. package/dist/es6/banner/lib/BannerActionText.js +2 -2
  148. package/dist/es6/banner/lib/BannerIcon.js +1 -1
  149. package/dist/es6/banner/lib/BannerLabel.js +1 -1
  150. package/dist/es6/banner/lib/hooks/useThemedPalette.d.ts +6 -0
  151. package/dist/es6/banner/lib/hooks/useThemedPalette.d.ts.map +1 -1
  152. package/dist/es6/banner/lib/hooks/useThemedPalette.js +6 -0
  153. package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.js +1 -1
  154. package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.js +1 -1
  155. package/dist/es6/breadcrumbs/lib/BreadcrumbsLink.js +1 -1
  156. package/dist/es6/breadcrumbs/lib/BreadcrumbsList.js +1 -1
  157. package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.js +2 -2
  158. package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.js +1 -1
  159. package/dist/es6/button/lib/BaseButton.js +21 -21
  160. package/dist/es6/button/lib/DeleteButton.js +1 -1
  161. package/dist/es6/button/lib/ExternalHyperlink.js +1 -1
  162. package/dist/es6/button/lib/Hyperlink.js +4 -4
  163. package/dist/es6/button/lib/PrimaryButton.js +2 -2
  164. package/dist/es6/button/lib/SecondaryButton.js +2 -2
  165. package/dist/es6/button/lib/TertiaryButton.js +17 -17
  166. package/dist/es6/button/lib/ToolbarDropdownButton.js +3 -3
  167. package/dist/es6/button/lib/ToolbarIconButton.js +1 -1
  168. package/dist/es6/card/lib/Card.js +3 -3
  169. package/dist/es6/card/lib/CardBody.js +1 -1
  170. package/dist/es6/card/lib/CardHeading.js +1 -1
  171. package/dist/es6/checkbox/lib/CheckBackground.js +3 -3
  172. package/dist/es6/checkbox/lib/CheckboxCheck.js +5 -5
  173. package/dist/es6/checkbox/lib/CheckboxContainer.js +1 -1
  174. package/dist/es6/checkbox/lib/CheckboxInput.js +5 -5
  175. package/dist/es6/checkbox/lib/CheckboxRipple.js +1 -1
  176. package/dist/es6/collection/lib/ListBox.js +3 -3
  177. package/dist/es6/color-picker/lib/ColorInput.js +3 -3
  178. package/dist/es6/color-picker/lib/ColorPreview.js +1 -1
  179. package/dist/es6/color-picker/lib/parts/ColorSwatch.js +2 -2
  180. package/dist/es6/combobox/lib/ComboboxMenuList.js +1 -1
  181. package/dist/es6/common/lib/AccessibleHide.js +1 -1
  182. package/dist/es6/common/lib/CanvasProvider.d.ts +3 -0
  183. package/dist/es6/common/lib/CanvasProvider.d.ts.map +1 -1
  184. package/dist/es6/common/lib/CanvasProvider.js +6 -2
  185. package/dist/es6/common/lib/theming/getObjectProxy.d.ts +1 -0
  186. package/dist/es6/common/lib/theming/getObjectProxy.d.ts.map +1 -1
  187. package/dist/es6/common/lib/theming/getObjectProxy.js +1 -0
  188. package/dist/es6/common/lib/theming/index.d.ts +28 -0
  189. package/dist/es6/common/lib/theming/index.d.ts.map +1 -1
  190. package/dist/es6/common/lib/theming/index.js +28 -0
  191. package/dist/es6/common/lib/theming/types.d.ts +15 -0
  192. package/dist/es6/common/lib/theming/types.d.ts.map +1 -1
  193. package/dist/es6/common/lib/theming/types.js +1 -0
  194. package/dist/es6/common/lib/utils/colorUtils.d.ts +1 -0
  195. package/dist/es6/common/lib/utils/colorUtils.d.ts.map +1 -1
  196. package/dist/es6/common/lib/utils/colorUtils.js +1 -0
  197. package/dist/es6/expandable/lib/Expandable.js +1 -1
  198. package/dist/es6/expandable/lib/ExpandableAvatar.js +1 -1
  199. package/dist/es6/expandable/lib/ExpandableContent.js +1 -1
  200. package/dist/es6/expandable/lib/ExpandableIcon.js +10 -10
  201. package/dist/es6/expandable/lib/ExpandableTarget.js +1 -1
  202. package/dist/es6/expandable/lib/ExpandableTitle.js +1 -1
  203. package/dist/es6/form-field/lib/FormFieldContainer.js +1 -1
  204. package/dist/es6/form-field/lib/FormFieldField.js +1 -1
  205. package/dist/es6/form-field/lib/FormFieldGroupLabel.js +5 -5
  206. package/dist/es6/form-field/lib/FormFieldGroupList.js +3 -3
  207. package/dist/es6/form-field/lib/FormFieldHint.js +3 -3
  208. package/dist/es6/form-field/lib/FormFieldLabel.js +6 -6
  209. package/dist/es6/form-field/lib/formFieldStencil.js +8 -8
  210. package/dist/es6/icon/lib/AccentIcon.js +2 -2
  211. package/dist/es6/icon/lib/AppletIcon.js +1 -1
  212. package/dist/es6/icon/lib/Graphic.js +4 -4
  213. package/dist/es6/icon/lib/Svg.js +3 -3
  214. package/dist/es6/icon/lib/SystemIcon.js +1 -1
  215. package/dist/es6/icon/lib/SystemIconCircle.js +1 -1
  216. package/dist/es6/loading-dots/lib/LoadingDots.js +3 -3
  217. package/dist/es6/menu/lib/MenuCard.js +1 -1
  218. package/dist/es6/menu/lib/MenuDivider.js +1 -1
  219. package/dist/es6/menu/lib/MenuGroup.js +1 -1
  220. package/dist/es6/menu/lib/MenuItem.js +1 -1
  221. package/dist/es6/menu/lib/MenuList.js +3 -3
  222. package/dist/es6/modal/lib/ModalBody.js +1 -1
  223. package/dist/es6/modal/lib/ModalCard.js +1 -1
  224. package/dist/es6/modal/lib/ModalHeading.js +1 -1
  225. package/dist/es6/modal/lib/ModalOverflowOverlay.js +1 -1
  226. package/dist/es6/modal/lib/ModalOverlay.js +2 -2
  227. package/dist/es6/pagination/lib/Pagination/AdditionalDetails.js +2 -2
  228. package/dist/es6/pagination/lib/Pagination/Controls.d.ts.map +1 -1
  229. package/dist/es6/pagination/lib/Pagination/Controls.js +9 -15
  230. package/dist/es6/pagination/lib/Pagination/GoTo/Form.js +1 -1
  231. package/dist/es6/pagination/lib/Pagination/GoTo/Label.js +1 -1
  232. package/dist/es6/pagination/lib/Pagination/GoTo/TextInput.js +1 -1
  233. package/dist/es6/pagination/lib/Pagination/Nav.js +1 -1
  234. package/dist/es6/pagination/lib/Pagination/PageButton.js +2 -2
  235. package/dist/es6/pagination/lib/Pagination/PageList.js +1 -1
  236. package/dist/es6/pagination/lib/Pagination/Pagination.js +1 -1
  237. package/dist/es6/pagination/lib/Pagination/common/List.js +2 -2
  238. package/dist/es6/popup/lib/PopupBody.js +1 -1
  239. package/dist/es6/popup/lib/PopupCard.js +2 -2
  240. package/dist/es6/popup/lib/PopupCloseIcon.js +1 -1
  241. package/dist/es6/popup/lib/PopupHeading.js +1 -1
  242. package/dist/es6/popup/lib/hooks/useDisableBodyScroll.js +1 -1
  243. package/dist/es6/segmented-control/lib/SegmentedControlButton.js +4 -4
  244. package/dist/es6/select/lib/SelectCard.js +1 -1
  245. package/dist/es6/select/lib/SelectInput.js +3 -3
  246. package/dist/es6/skeleton/lib/Skeleton.js +2 -2
  247. package/dist/es6/skeleton/lib/parts/SkeletonHeader.js +1 -1
  248. package/dist/es6/skeleton/lib/parts/SkeletonShape.js +1 -1
  249. package/dist/es6/skeleton/lib/parts/SkeletonText.js +1 -1
  250. package/dist/es6/switch/lib/Switch.js +7 -7
  251. package/dist/es6/table/lib/BaseTable.js +1 -1
  252. package/dist/es6/table/lib/Table.js +7 -7
  253. package/dist/es6/table/lib/parts/BaseTableBody.js +1 -1
  254. package/dist/es6/table/lib/parts/BaseTableCaption.js +1 -1
  255. package/dist/es6/table/lib/parts/BaseTableCell.js +1 -1
  256. package/dist/es6/table/lib/parts/BaseTableHead.js +1 -1
  257. package/dist/es6/table/lib/parts/BaseTableHeader.js +1 -1
  258. package/dist/es6/table/lib/parts/css-grid-table/TableRow.js +1 -1
  259. package/dist/es6/tabs/lib/TabsItem.js +1 -1
  260. package/dist/es6/tabs/lib/TabsList.js +8 -8
  261. package/dist/es6/tabs/lib/TabsOverflowButton.js +1 -1
  262. package/dist/es6/testing/lib/ComponentStatesTable.js +5 -5
  263. package/dist/es6/text/lib/LabelText.js +6 -6
  264. package/dist/es6/text/lib/Text.js +16 -16
  265. package/dist/es6/text/lib/TypeLevelComponents.js +4 -4
  266. package/dist/es6/text-area/lib/TextArea.js +5 -5
  267. package/dist/es6/text-input/lib/InputGroup.js +6 -6
  268. package/dist/es6/text-input/lib/TextInput.js +5 -5
  269. package/dist/es6/toast/lib/Toast.js +1 -1
  270. package/dist/es6/toast/lib/ToastBody.js +1 -1
  271. package/dist/es6/toast/lib/ToastCloseIcon.js +1 -1
  272. package/dist/es6/toast/lib/ToastIcon.js +1 -1
  273. package/dist/es6/toast/lib/ToastMessage.js +1 -1
  274. package/dist/es6/tooltip/lib/TooltipContainer.js +2 -2
  275. package/dist/es6/version/lib/version.js +1 -1
  276. package/package.json +5 -5
  277. package/pagination/lib/Pagination/Controls.tsx +21 -17
  278. package/testing/lib/ComponentStatesTable.tsx +5 -5
@@ -27,6 +27,9 @@ const getPaletteColorsFromTheme = (
27
27
  };
28
28
  };
29
29
 
30
+ /**
31
+ * @deprecated ⚠️ `getPaletteColors` is deprecated. Use CSS variables from `@workday/canvas-tokens-web` instead. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
32
+ */
30
33
  export const getPaletteColors = (
31
34
  type: paletteSelection,
32
35
  theme: EmotionCanvasTheme
@@ -46,6 +49,9 @@ export const getPaletteColors = (
46
49
  }
47
50
  };
48
51
 
52
+ /**
53
+ * @deprecated ⚠️ `useThemedPalette` is deprecated. In previous versions of Canvas Kit, we allowed teams to pass a theme object, this supported [Emotion's theming](https://emotion.sh/docs/theming). Now that we're shifting to a global theming approach based on CSS variables, we advise to no longer using the theme prop. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
54
+ */
49
55
  export const useThemedPalette = (type: paletteSelection) => {
50
56
  const theme = useTheme();
51
57
 
@@ -5,6 +5,9 @@ import {brand, base} from '@workday/canvas-tokens-web';
5
5
  import {getCache, maybeWrapCSSVariables, createStyles} from '@workday/canvas-kit-styling';
6
6
 
7
7
  export interface CanvasProviderProps {
8
+ /**
9
+ * @deprecated ⚠️ `theme` is deprecated. In previous versions of Canvas Kit, we allowed teams to pass a theme object, this supported [Emotion's theming](https://emotion.sh/docs/theming). Now that we're shifting to a global theming approach based on CSS variables, we advise to no longer using the theme prop. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
10
+ */
8
11
  theme?: PartialEmotionCanvasTheme;
9
12
  }
10
13
 
@@ -66,6 +69,9 @@ export const defaultBranding = createStyles({
66
69
  });
67
70
 
68
71
  export const useCanvasThemeToCssVars = (
72
+ /**
73
+ * @deprecated ⚠️ `theme` is deprecated. In previous versions of Canvas Kit, we allowed teams to pass a theme object, this supported [Emotion's theming](https://emotion.sh/docs/theming). Now that we're shifting to a global theming approach based on CSS variables, we advise to no longer using the theme prop. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
74
+ */
69
75
  theme: PartialEmotionCanvasTheme | undefined,
70
76
  elemProps: React.HTMLAttributes<HTMLElement>
71
77
  ) => {
@@ -1,7 +1,10 @@
1
1
  # Canvas Kit Theming
2
2
 
3
- Canvas Kit Common contains wrappers and types to enabling theming of Canvas components as well as
4
- utilities that are used across components.
3
+ > **Deprecation Notice:** The `theme` prop on `CanvasProvider` and all associated theming utilities
4
+ > (`useTheme`, `getTheme`, `styled`, `defaultCanvasTheme`, `ContentDirection`, etc.) are deprecated.
5
+ > Please use CSS variables from `@workday/canvas-tokens-web` for theming. For the full theming
6
+ > guide, see our
7
+ > [Theming Documentation](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs).
5
8
 
6
9
  ## Installation
7
10
 
@@ -9,330 +12,102 @@ utilities that are used across components.
9
12
  yarn add @workday/canvas-kit-react/common
10
13
  ```
11
14
 
12
- ## Usage
15
+ ## Recommended Approach: CSS Variables
13
16
 
14
- Wrap all of your Canvas components with the `CanvasProvider` higher order component. Usually this
15
- would go in the highest level component of your application. This includes an
16
- [`InputProvider`](../../README.md#input-provider) and includes all global configuration needed for
17
- our Canvas Components.
17
+ Canvas Kit v14+ promotes using CSS variables for theming. Import CSS variable files and override
18
+ values in your root CSS:
18
19
 
19
- ```tsx
20
- import * as React from 'react';
21
- import {CanvasProvider} from '@workday/canvas-kit-react/common';
22
-
23
- <CanvasProvider>{/* All your components containing any Canvas components */}</CanvasProvider>;
24
- ```
25
-
26
- ## Component Props
27
-
28
- ### Required
29
-
30
- > None
31
-
32
- ### Optional
20
+ ```css
21
+ /* index.css */
22
+ @import '@workday/canvas-tokens-web/css/base/_variables.css';
23
+ @import '@workday/canvas-tokens-web/css/system/_variables.css';
24
+ @import '@workday/canvas-tokens-web/css/brand/_variables.css';
33
25
 
34
- #### `theme: PartialEmotionCanvasTheme`
35
-
36
- > The theme to be used throughout the children of the `CanvasProvider` component.
37
-
38
- Default: `{ canvas: defaultCanvasTheme }`
39
-
40
- ## Theme Object
41
-
42
- The Canvas theme is based on the following object:
43
-
44
- ```ts
45
- export const defaultCanvasTheme: CanvasTheme = {
46
- palette: {
47
- primary: {
48
- lightest: colors.blueberry100,
49
- light: colors.blueberry200,
50
- main: colors.blueberry400,
51
- dark: colors.blueberry500,
52
- darkest: colors.blueberry600,
53
- contrast: colors.frenchVanilla100,
54
- },
55
- caution: {
56
- lightest: colors.cantaloupe100,
57
- light: colors.cantaloupe300,
58
- main: colors.cantaloupe400,
59
- dark: colors.cantaloupe500,
60
- darkest: colors.cantaloupe600,
61
- contrast: colors.frenchVanilla100,
62
- },
63
- error: {
64
- lightest: colors.cinnamon100,
65
- light: colors.cinnamon300,
66
- main: colors.cinnamon500,
67
- dark: colors.cinnamon600,
68
- darkest: '#80160E',
69
- contrast: colors.frenchVanilla100,
70
- },
71
- success: {
72
- lightest: colors.greenApple100,
73
- light: colors.greenApple300,
74
- main: colors.greenApple600,
75
- dark: '',
76
- darkest: '',
77
- contrast: colors.frenchVanilla100,
78
- },
79
- neutral: {
80
- lightest: colors.soap200,
81
- light: colors.soap300,
82
- main: colors.soap600,
83
- dark: colors.licorice300,
84
- darkest: colors.licorice400,
85
- contrast: colors.frenchVanilla100,
86
- },
87
- common: {
88
- focusOutline: colors.blueberry400,
89
- },
90
- },
91
- breakpoints: {
92
- values: {
93
- zero: 0,
94
- s: 320,
95
- m: 768,
96
- l: 1024,
97
- xl: 1440,
98
- },
99
- up,
100
- down,
101
- between,
102
- only,
103
- },
104
- direction: ContentDirection.LTR,
105
- };
26
+ :root {
27
+ /* Override brand primary colors */
28
+ --cnvs-brand-primary-base: var(--cnvs-base-palette-magenta-600);
29
+ --cnvs-brand-primary-light: var(--cnvs-base-palette-magenta-200);
30
+ --cnvs-brand-primary-dark: var(--cnvs-base-palette-magenta-700);
31
+ }
106
32
  ```
107
33
 
108
- Any changes will be reflected across all supported components. You are also able to consume for your
109
- own use cases.
110
-
111
- ## Custom Theme
112
-
113
- The `CanvasProvider` accepts a full or partial theme object to give a branded look or a different
114
- direction to the component library.
115
-
116
- > Note: Our theme is namespaced under the `canvas` key within the Emotion `ThemeContext`.
117
-
118
- For a consistent theming experience, provide a value for each property in the theme object. Use our
119
- CSS variables.
120
-
121
- Example:
34
+ Or use `createStyles` to generate themed class names:
122
35
 
123
36
  ```tsx
124
- import {CanvasProvider, EmotionCanvasTheme} from '@workday/canvas-kit-react/common';
125
- import {brand} from '@workday/canvas-tokens-web';
126
-
127
- const theme: EmotionCanvasTheme = {
128
- canvas: {
129
- palette: {
130
- primary: {
131
- lightest: base.magenta25,
132
- lighter: base.magenta50,
133
- light: base.magenta200,
134
- main: base.magenta600,
135
- dark: base.magenta700,
136
- darkest: base.magenta800,
137
- contrast: base.neutral0,
138
- },
139
- },
140
- },
141
- };
142
-
143
- <CanvasProvider theme={theme}>{/* Your app with Canvas components */}</CanvasProvider>;
144
- ```
145
-
146
- ### Bidirectionality
147
-
148
- We strongly encourage the use of
149
- [CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties)
150
- for styling. All previous bidirectionality in the Canvas theme have been deprecated.
151
-
152
- ### Nesting CanvasProvider components
153
-
154
- It is possible to set a theme for a specific component or set of components within your React tree.
155
- This is generally discouraged for consistency reasons, but may be required in some contexts (a green
156
- `Switch` component for example, or changing the direction of a set of components). To do this, you
157
- can nest CanvasProvider components with a different theme.
37
+ import {createStyles} from '@workday/canvas-kit-styling';
38
+ import {brand, base} from '@workday/canvas-tokens-web';
39
+ import {CanvasProvider} from '@workday/canvas-kit-react/common';
158
40
 
159
- ```tsx
160
- import * as React from 'react';
161
- import {
162
- CanvasProvider,
163
- EmotionCanvasTheme,
164
- PartialEmotionCanvasTheme,
165
- ContentDirection,
166
- } from '@workday/canvas-kit-react/common';
167
- import {Switch} from '@workday/canvas-kit-react/switch';
168
-
169
- const rtlTheme: EmotionCanvasTheme = {
170
- canvas: {
171
- direction: ContentDirection.RTL,
172
- },
173
- };
174
-
175
- const theme: PartialEmotionCanvasTheme = {
176
- canvas: {
177
- palette: {
178
- primary: {
179
- main: colors.greenApple400,
180
- },
181
- },
182
- direction: ContentDirection.LTR,
183
- },
184
- };
41
+ const themedBrand = createStyles({
42
+ [brand.primary.base]: base.magenta600,
43
+ [brand.primary.dark]: base.magenta700,
44
+ });
185
45
 
186
- <CanvasProvider theme={rtlTheme}>
187
- <CanvasProvider theme={theme}>
188
- <Switch checked={true} />
189
- {/* Content that should be LTR */}
190
- </CanvasProvider>
46
+ <CanvasProvider className={themedBrand}>
47
+ <App />
191
48
  </CanvasProvider>;
192
49
  ```
193
50
 
194
- ### Context Alternative
51
+ ## Bidirectionality (RTL Support)
195
52
 
196
- If, for whatever reason, you're not able to use React Contexts, we offer an alternative. A good
197
- example of this is an app with many small React trees.
53
+ ### Setting RTL Direction
198
54
 
199
- Simply set your theme on the window object like so:
55
+ Use the native HTML `dir` attribute to set the text direction. The `CanvasProvider` accepts a `dir`
56
+ prop:
200
57
 
201
58
  ```tsx
202
- const theme: PartialEmotionCanvasTheme = {
203
- canvas: {
204
- palette: {
205
- primary: {
206
- main: colors.greenApple400,
207
- },
208
- },
209
- },
210
- };
211
-
212
- window.workday.canvas.theme = theme;
213
- ```
214
-
215
- Note if any of the window object hasn't been defined, you will need to change your assignment. For
216
- example:
59
+ import {CanvasProvider} from '@workday/canvas-kit-react/common';
217
60
 
218
- ```tsx
219
- window.workday = {
220
- canvas: {
221
- theme: theme;
222
- }
223
- }
61
+ <CanvasProvider dir="rtl">
62
+ <App />
63
+ </CanvasProvider>;
224
64
  ```
225
65
 
226
- If the theme is not available via a context, Canvas Kit components will attempt to pull it from this
227
- variable before falling back to the default theme.
66
+ ### CSS Logical Properties
228
67
 
229
- ## Accessing the theme value
230
-
231
- Canvas Kit provides two functions to access the current theme, `getTheme` and `useTheme`. If you
232
- need to access the theme within a function component, use the hook, `useTheme`. If you need to
233
- access the theme within a `styled` component, a class component, or outside a component, use
234
- `getTheme`. The main difference is `useTheme` is intended to work within the `CanvasProvider` and
235
- will check the `ThemeContext` for the theme first. Both functions check the window for the theme and
236
- fall back to the default theme is nothing is found. Both functions will return a full theme object
237
- in this shape:
238
-
239
- **Return value**
68
+ Use
69
+ [CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties)
70
+ for styling. These automatically adapt to the text direction:
240
71
 
241
- ```tsx
242
- {
243
- canvas: {
244
- palette: {
245
- // ...
246
- },
247
- breakpoints: {
248
- // ...
249
- },
250
- direction: ContentDirection.LTR,
251
- },
252
- // other themes can be placed here
72
+ ```css
73
+ /* Use CSS logical properties */
74
+ .my-component {
75
+ margin-inline-start: 1rem; /* Instead of margin-left */
76
+ padding-inline-end: 1rem; /* Instead of padding-right */
253
77
  }
254
78
  ```
255
79
 
256
- ### getTheme
257
-
258
- `getTheme` is a function that returns the full theme object with the Canvas Kit theme under the
259
- `canvas` key. It should be used with `styled` components, class components, or outside components.
260
-
261
- Below is an example of how to use `getTheme` to build responsive media query styles with the
262
- breakpoint functions provided in the theme.
263
-
264
- ```tsx
265
- import {getTheme} from '@workday/canvas-kit-react/common';
266
-
267
- const theme = getTheme();
268
- const {up, down} = theme.canvas.breakpoints;
269
- const small = down('m'); // Returns '@media (max-width: 768px)'
270
- const medium = up('m'); // Returns '@media (min-width: 768px)'
271
- const styles = {
272
- [small]: {
273
- margin: space.m,
274
- },
275
- [medium]: {
276
- margin: space.l,
277
- },
278
- };
279
- ```
280
-
281
- ### useTheme
282
-
283
- `useTheme` is hook to get the full theme object. It should be used only with functional compoents
284
- wrapped in ContextProvider. Function returns a theme object with the Canvas Kit theme under the
285
- canvas key.
286
-
287
- `useTheme` should be used only inside functional component otherwise it will show a warning if the
288
- theme context value has not been found. In that case you will need to use `getTheme`.
80
+ ### Conditional RTL Styles
289
81
 
290
- Below is an example showing how to use `useTheme` in a function component to set `Subtext`'s color
291
- to the error color provided by the theme.
82
+ For styles that need to change based on direction, use the
83
+ [`:dir()` pseudo-class selector](https://developer.mozilla.org/en-US/docs/Web/CSS/:dir):
292
84
 
293
- ```tsx
294
- export const ErrorMessage = () => {
295
- const theme = useTheme();
296
- return (
297
- <Subtext size="large" color={theme.canvas.palette.error.main}>
298
- )
85
+ ```css
86
+ /* Use :dir() for RTL-specific styles */
87
+ .my-component:dir(rtl) {
88
+ /* RTL-specific styles */
299
89
  }
300
90
  ```
301
91
 
302
- ### Overwriting the theme
303
-
304
- You can also use both functions to overwrite the theme object by providing a partial or full theme
305
- object to overwrite the current theme. In the example below, we're setting a custom content
306
- direction, which can be passed to either `useTheme` or `getTheme`. These functions will properly
307
- merge your the partial theme with the default Canvas theme and return a complete theme object.
308
-
309
92
  ```tsx
310
- import {ContentDirection, useTheme, getTheme} from '@workday/canvas-kit-react/common';
93
+ import {createStyles} from '@workday/canvas-kit-styling';
311
94
 
312
- const customTheme = {
313
- canvas: {
314
- // set the content direction to right-to-left
315
- direction: ContentDirection.RTL,
95
+ const styles = createStyles({
96
+ ':dir(rtl)': {
97
+ svg: {
98
+ transform: 'rotate(180deg)',
99
+ },
316
100
  },
317
- };
318
-
319
- // Overwriting the theme with useTheme
320
- const customTheme = useTheme(customTheme);
321
-
322
- // Overwriting the theme with getTheme
323
- const customTheme = getTheme(customTheme);
101
+ });
324
102
  ```
325
103
 
326
104
  ## Breakpoints
327
105
 
328
- Breakpoints are used by media queries to conditionally apply or modify styles based on the viewport
329
- width. This allows the UI to be responsive to various screen sizes.
106
+ Breakpoints are used by media queries to conditionally apply or modify styles based on viewport
107
+ width.
330
108
 
331
109
  ### Values
332
110
 
333
- The canvas theme object provides five breakpoint values that correspond to the min-widths of our
334
- standard screen sizes.
335
-
336
111
  | Name | Size (px) |
337
112
  | ------ | --------- |
338
113
  | `zero` | 0 |
@@ -341,186 +116,71 @@ standard screen sizes.
341
116
  | `l` | 1024 |
342
117
  | `xl` | 1440 |
343
118
 
344
- And these are our standard screen size ranges:
345
-
346
- - `small` (320px - 767px) Used for mobile-sized screens
347
- - `medium` (768px - 1023px) Used for tablet-sized screens
348
- - `large` - (1024px - 1439px) Used for laptop and small desktop screens
349
- - `extra-large` (≥1440px) Used for very large screens
119
+ Standard screen size ranges:
350
120
 
351
- > Note: Some applications may only require a subset of screen sizes and not use all breakpoints.
121
+ - `small` (320px - 767px) - Mobile screens
122
+ - `medium` (768px - 1023px) - Tablet screens
123
+ - `large` (1024px - 1439px) - Laptop/small desktop screens
124
+ - `extra-large` (≥1440px) - Large screens
352
125
 
353
- Our breakpoint system is customized within the theme object. `theme.canvas.breakpoints.values`.
126
+ ### Using Breakpoints
354
127
 
355
- ```ts
356
- import {useTheme} from '@workday/canvas-kit-react/common';
357
- import {space} from '@workday/canvas-kit-react/tokens';
128
+ You can use standard CSS media queries:
358
129
 
359
- const {theme} = useTheme();
360
- const {values} = theme.canvas.breakpoints;
361
- const styles = {
362
- [`@media (min-width: ${values.m}px)`]: {
363
- padding: space.s,
364
- },
365
- };
366
- ```
367
-
368
- ### Functions
369
-
370
- There are also several functions to help with generating media queries:
371
-
372
- - [Up](#Up)
373
- - [Down](#Down)
374
- - [Between](#Between)
375
- - [Only](#Only)
376
-
377
- #### Up
378
-
379
- _Returns a media query above the `min-width` for the range of a given breakpoint_
380
-
381
- Given a `start` breakpoint key ("zero", "s", "m", "l", "xl"), this function returns a media query
382
- (string) using a `min-width`.
383
-
384
- ```ts
385
- import {useTheme} from '@workday/canvas-kit-react/common';
386
- import {space} from '@workday/canvas-kit-react/tokens';
387
-
388
- const theme = useTheme();
389
- const {up} = theme.canvas.breakpoints;
390
- const mediaQuery = up('l'); // Returns '@media (min-width: 1024px)'
391
- const styles = {
392
- [mediaQuery]: {
393
- padding: space.m,
394
- },
395
- };
130
+ ```css
131
+ @media (min-width: 768px) {
132
+ .my-component {
133
+ padding: 1rem;
134
+ }
135
+ }
396
136
  ```
397
137
 
398
- #### Down
399
-
400
- _Returns a media query below the `max-width` for the range of a given breakpoint_
401
-
402
- Given an `end` breakpoint key ("zero", "s", "m", "l", "xl"), this function returns a media query
403
- (string) using a `max-width`.
138
+ ---
404
139
 
405
- > Note: This function subtracts `0.5px` from the next breakpoint value to prevent collisions. For
406
- > example, `breakpoints.values.s`, has a `min-width` of `320px`, and the `max-width` is `767.5px`).
140
+ ## Deprecated API Reference
407
141
 
408
- If the `xl` breakpoint is provided, this function returns a media query with only a `min-width` of
409
- `0`, as seen in the second example below.
142
+ The following APIs are deprecated and should not be used in new code.
410
143
 
411
- ```ts
412
- import {useTheme} from '@workday/canvas-kit-react/common';
413
- import {space} from '@workday/canvas-kit-react/tokens';
144
+ ### ~~CanvasProvider theme prop~~ (Deprecated)
414
145
 
415
- const theme = useTheme();
416
- const {down} = theme.canvas.breakpoints;
417
- const mediaQuery = down('m'); // Returns '@media (max-width: 1023.5px)'
418
- const styles = {
419
- [mediaQuery]: {
420
- padding: space.m,
421
- },
422
- };
146
+ ```tsx
147
+ // DEPRECATED - Do not use
148
+ <CanvasProvider theme={{canvas: {palette: {primary: {main: 'purple'}}}}}>
149
+ <App />
150
+ </CanvasProvider>
423
151
  ```
424
152
 
425
- This example uses the `xl` breakpoint and only adds a `min-width` of `0` to the media query.
426
-
427
- ```ts
428
- import {useTheme} from '@workday/canvas-kit-react/common';
429
- import {space} from '@workday/canvas-kit-react/tokens';
153
+ ### ~~useTheme / getTheme~~ (Deprecated)
430
154
 
155
+ ```tsx
156
+ // DEPRECATED - Use CSS variables instead
431
157
  const theme = useTheme();
432
- const {down} = theme.canvas.breakpoints;
433
- const mediaQuery = down('xl'); // Returns '@media (min-width: 0)'
434
- const styles = {
435
- [mediaQuery]: {
436
- padding: space.m,
437
- },
438
- };
158
+ const theme = getTheme();
439
159
  ```
440
160
 
441
- #### Between
442
-
443
- _Returns a media query between two given breakpoints_
161
+ ### ~~styled~~ (Deprecated)
444
162
 
445
- Given `start` and `end` breakpoint keys ("zero", "s", "m", "l", "xl"), this function returns a media
446
- query (string) using a min-width and max-width.
447
-
448
- > Note: This function subtracts `0.5px` from the next breakpoint value to prevent collisions. For
449
- > example, `breakpoints.values.s`, has a `min-width` of `320px`, and the `max-width` is `767.5px`).
450
-
451
- If the `xl` breakpoint is provided, this function returns a media query with only a `min-width`, as
452
- seen in the second example below.
453
-
454
- ```ts
455
- import {useTheme} from '@workday/canvas-kit-react/common';
456
- import {space} from '@workday/canvas-kit-react/tokens';
457
-
458
- const theme = useTheme();
459
- const {between} = theme.canvas.breakpoints;
460
- // Returns '@media (min-width: 320px) and (max-width: 1023.5px)'
461
- const mediaQuery = between('s', 'm');
462
- const styles = {
463
- [mediaQuery]: {
464
- padding: space.s,
465
- },
466
- };
163
+ ```tsx
164
+ // DEPRECATED - Use createStyles or createStencil instead
165
+ import {styled} from '@workday/canvas-kit-react/common';
467
166
  ```
468
167
 
469
- This example uses `xl` as the `end` breakpoint and only adds a min-width to the media query.
470
-
471
- ```ts
472
- import {useTheme} from '@workday/canvas-kit-react/common';
473
- import {space} from '@workday/canvas-kit-react/tokens';
168
+ ### ~~ContentDirection~~ (Deprecated)
474
169
 
475
- const theme = useTheme();
476
- const {between} = theme.canvas.breakpoints;
477
- const mediaQuery = between('m', 'xl'); // Returns '@media (min-width: 768px)'
478
- const styles = {
479
- [mediaQuery]: {
480
- padding: space.s,
481
- },
482
- };
170
+ ```tsx
171
+ // DEPRECATED - Use :dir() pseudo-class and CSS logical properties instead
172
+ import {ContentDirection} from '@workday/canvas-kit-react/common';
483
173
  ```
484
174
 
485
- #### Only
486
-
487
- _Returns a media query with a `min-width` and `max-width` for a given breakpoint_
175
+ ### ~~defaultCanvasTheme~~ (Deprecated)
488
176
 
489
- Given a breakpoint key ("zero", "s", "m", "l", "xl"), this function returns a media query (string)
490
- using a `min-width` and `max-width`.
491
-
492
- > Note: This function subtracts `0.5px` from the next breakpoint value to prevent collisions.For
493
- > example, `breakpoints.values.s`, has a `min-width` of `320px`, and the `max-width` is `767.5px`).
494
-
495
- If the `xl` breakpoint is provided, this function returns a media query with only a `min-width` of
496
- `1440px`, as seen in the second example below.
497
-
498
- ```ts
499
- import {useTheme} from '@workday/canvas-kit-react/common';
500
- import {space} from '@workday/canvas-kit-react/tokens';
177
+ ```tsx
178
+ // DEPRECATED - Use defaultBranding instead
179
+ import {defaultCanvasTheme} from '@workday/canvas-kit-react/common';
501
180
 
502
- const theme = useTheme();
503
- const {only} = theme.canvas.breakpoints;
504
- const mediaQuery = only('s'); // Returns '@media (min-width: 320px) and (max-width: 767.5px)'
505
- const styles = {
506
- [mediaQuery]: {
507
- padding: space.s,
508
- },
509
- };
181
+ // NEW - Use defaultBranding
182
+ import {defaultBranding} from '@workday/canvas-kit-react/common';
510
183
  ```
511
184
 
512
- This example uses the `xl` breakpoint and only adds a `min-width` of `1440px` to the media query.
513
-
514
- ```ts
515
- import {useTheme} from '@workday/canvas-kit-react/common';
516
- import {space} from '@workday/canvas-kit-react/tokens';
517
-
518
- const theme = useTheme();
519
- const {only} = theme.canvas.breakpoints;
520
- const mediaQuery = only('m', 'xl'); // Returns '@media (min-width: 1440px)'
521
- const styles = {
522
- [mediaQuery]: {
523
- padding: space.s,
524
- },
525
- };
526
- ```
185
+ For detailed migration guidance, see our
186
+ [Theming Documentation](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs).
@@ -11,6 +11,7 @@ export type RecursivePartial<T> = {
11
11
  * This function will also handle nested properties.
12
12
  * @param target A partial object with up to the same shape as the `fallback` object
13
13
  * @param fallback A fallback object. If a property to be accessed from the proxy is not available on the target object, the fallback object will be used
14
+ * @deprecated ⚠️ `getObjectProxy` is deprecated. This utility was used for theme object fallbacks. Now that we're shifting to a global theming approach based on CSS variables, this is no longer needed. For more information, view our [Theming Docs](https://workday.github.io/canvas-kit/?path=/docs/features-theming-overview--docs#-preferred-approach-v14).
14
15
  */
15
16
  export function getObjectProxy<T extends {}>(
16
17
  target: RecursivePartial<T> | undefined,