@workday/canvas-kit-react 15.0.0-alpha.0177-next.0 → 15.0.0-alpha.0179-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 (254) hide show
  1. package/action-bar/lib/ActionBarList.tsx +11 -9
  2. package/button/lib/BaseButton.tsx +108 -65
  3. package/button/lib/DeleteButton.tsx +67 -20
  4. package/button/lib/PrimaryButton.tsx +107 -27
  5. package/button/lib/SecondaryButton.tsx +107 -30
  6. package/button/lib/TertiaryButton.tsx +153 -55
  7. package/button/lib/ToolbarDropdownButton.tsx +65 -18
  8. package/button/lib/ToolbarIconButton.tsx +88 -24
  9. package/checkbox/lib/CheckboxInput.tsx +10 -21
  10. package/collection/lib/ListBox.tsx +5 -3
  11. package/color-picker/lib/ColorPreview.tsx +3 -2
  12. package/combobox/lib/ComboboxCard.tsx +12 -1
  13. package/combobox/lib/ComboboxMenuList.tsx +2 -1
  14. package/dist/commonjs/action-bar/lib/ActionBarList.d.ts.map +1 -1
  15. package/dist/commonjs/action-bar/lib/ActionBarList.js +2 -2
  16. package/dist/commonjs/avatar/lib/Avatar.d.ts +5 -5
  17. package/dist/commonjs/avatar/lib/BaseAvatar.d.ts +5 -5
  18. package/dist/commonjs/banner/lib/Banner.js +2 -2
  19. package/dist/commonjs/button/lib/BaseButton.d.ts +26 -34
  20. package/dist/commonjs/button/lib/BaseButton.d.ts.map +1 -1
  21. package/dist/commonjs/button/lib/BaseButton.js +27 -27
  22. package/dist/commonjs/button/lib/DeleteButton.d.ts.map +1 -1
  23. package/dist/commonjs/button/lib/DeleteButton.js +2 -2
  24. package/dist/commonjs/button/lib/PrimaryButton.d.ts.map +1 -1
  25. package/dist/commonjs/button/lib/PrimaryButton.js +3 -3
  26. package/dist/commonjs/button/lib/SecondaryButton.d.ts.map +1 -1
  27. package/dist/commonjs/button/lib/SecondaryButton.js +3 -3
  28. package/dist/commonjs/button/lib/TertiaryButton.d.ts.map +1 -1
  29. package/dist/commonjs/button/lib/TertiaryButton.js +18 -18
  30. package/dist/commonjs/button/lib/ToolbarDropdownButton.d.ts +26 -34
  31. package/dist/commonjs/button/lib/ToolbarDropdownButton.d.ts.map +1 -1
  32. package/dist/commonjs/button/lib/ToolbarDropdownButton.js +4 -4
  33. package/dist/commonjs/button/lib/ToolbarIconButton.d.ts +52 -68
  34. package/dist/commonjs/button/lib/ToolbarIconButton.d.ts.map +1 -1
  35. package/dist/commonjs/button/lib/ToolbarIconButton.js +2 -2
  36. package/dist/commonjs/card/lib/CardBody.d.ts +86 -86
  37. package/dist/commonjs/card/lib/CardHeading.d.ts +86 -86
  38. package/dist/commonjs/checkbox/lib/CheckboxInput.d.ts.map +1 -1
  39. package/dist/commonjs/checkbox/lib/CheckboxInput.js +4 -4
  40. package/dist/commonjs/collection/lib/ListBox.d.ts.map +1 -1
  41. package/dist/commonjs/collection/lib/ListBox.js +8 -6
  42. package/dist/commonjs/color-picker/lib/ColorPreview.d.ts.map +1 -1
  43. package/dist/commonjs/color-picker/lib/ColorPreview.js +2 -2
  44. package/dist/commonjs/combobox/lib/ComboboxCard.d.ts +1 -0
  45. package/dist/commonjs/combobox/lib/ComboboxCard.d.ts.map +1 -1
  46. package/dist/commonjs/combobox/lib/ComboboxCard.js +7 -2
  47. package/dist/commonjs/combobox/lib/ComboboxMenuList.d.ts.map +1 -1
  48. package/dist/commonjs/combobox/lib/ComboboxMenuList.js +3 -1
  49. package/dist/commonjs/expandable/lib/ExpandableAvatar.d.ts +10 -10
  50. package/dist/commonjs/form-field/lib/FormFieldGroupLabel.d.ts +43 -43
  51. package/dist/commonjs/form-field/lib/FormFieldHint.d.ts +43 -43
  52. package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +43 -43
  53. package/dist/commonjs/menu/lib/MenuCard.d.ts.map +1 -1
  54. package/dist/commonjs/menu/lib/MenuCard.js +2 -2
  55. package/dist/commonjs/menu/lib/MenuDivider.d.ts.map +1 -1
  56. package/dist/commonjs/menu/lib/MenuDivider.js +2 -2
  57. package/dist/commonjs/menu/lib/MenuGroup.d.ts.map +1 -1
  58. package/dist/commonjs/menu/lib/MenuGroup.js +2 -2
  59. package/dist/commonjs/menu/lib/MenuItem.d.ts +0 -20
  60. package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
  61. package/dist/commonjs/menu/lib/MenuItem.js +2 -2
  62. package/dist/commonjs/menu/lib/MenuList.d.ts.map +1 -1
  63. package/dist/commonjs/menu/lib/MenuList.js +4 -4
  64. package/dist/commonjs/modal/lib/ModalBody.d.ts.map +1 -1
  65. package/dist/commonjs/modal/lib/ModalBody.js +2 -2
  66. package/dist/commonjs/modal/lib/ModalCard.d.ts.map +1 -1
  67. package/dist/commonjs/modal/lib/ModalCard.js +2 -2
  68. package/dist/commonjs/modal/lib/ModalHeading.d.ts.map +1 -1
  69. package/dist/commonjs/modal/lib/ModalHeading.js +2 -2
  70. package/dist/commonjs/modal/lib/ModalOverlay.d.ts.map +1 -1
  71. package/dist/commonjs/modal/lib/ModalOverlay.js +3 -3
  72. package/dist/commonjs/pagination/lib/Pagination/PageButton.d.ts +26 -34
  73. package/dist/commonjs/pagination/lib/Pagination/PageButton.d.ts.map +1 -1
  74. package/dist/commonjs/pagination/lib/Pagination/PageButton.js +2 -2
  75. package/dist/commonjs/pill/lib/Pill.d.ts +26 -34
  76. package/dist/commonjs/pill/lib/Pill.d.ts.map +1 -1
  77. package/dist/commonjs/pill/lib/Pill.js +3 -3
  78. package/dist/commonjs/pill/lib/PillAvatar.d.ts +10 -10
  79. package/dist/commonjs/pill/lib/PillIconButton.d.ts +52 -68
  80. package/dist/commonjs/pill/lib/PillIconButton.d.ts.map +1 -1
  81. package/dist/commonjs/pill/lib/PillIconButton.js +1 -1
  82. package/dist/commonjs/popup/lib/PopupBody.d.ts.map +1 -1
  83. package/dist/commonjs/popup/lib/PopupBody.js +2 -2
  84. package/dist/commonjs/popup/lib/PopupCard.d.ts.map +1 -1
  85. package/dist/commonjs/popup/lib/PopupCard.js +9 -7
  86. package/dist/commonjs/popup/lib/PopupCloseIcon.d.ts.map +1 -1
  87. package/dist/commonjs/popup/lib/PopupCloseIcon.js +2 -2
  88. package/dist/commonjs/popup/lib/PopupHeading.d.ts.map +1 -1
  89. package/dist/commonjs/popup/lib/PopupHeading.js +2 -2
  90. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts +37 -42
  91. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -1
  92. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.js +17 -17
  93. package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts +0 -5
  94. package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts.map +1 -1
  95. package/dist/commonjs/segmented-control/lib/SegmentedControlList.js +4 -8
  96. package/dist/commonjs/select/lib/SelectCard.js +1 -1
  97. package/dist/commonjs/skeleton/lib/parts/SkeletonShape.js +1 -1
  98. package/dist/commonjs/switch/lib/Switch.d.ts.map +1 -1
  99. package/dist/commonjs/switch/lib/Switch.js +7 -7
  100. package/dist/commonjs/tabs/lib/Tabs.d.ts +36 -4
  101. package/dist/commonjs/tabs/lib/Tabs.d.ts.map +1 -1
  102. package/dist/commonjs/tabs/lib/TabsItem.d.ts.map +1 -1
  103. package/dist/commonjs/tabs/lib/TabsItem.js +2 -2
  104. package/dist/commonjs/tabs/lib/TabsList.d.ts +1 -1
  105. package/dist/commonjs/tabs/lib/TabsList.js +7 -7
  106. package/dist/commonjs/text/lib/Text.d.ts +43 -43
  107. package/dist/commonjs/text/lib/Text.d.ts.map +1 -1
  108. package/dist/commonjs/text/lib/Text.js +20 -17
  109. package/dist/commonjs/text-input/lib/TextInput.js +6 -6
  110. package/dist/commonjs/toast/lib/Toast.d.ts.map +1 -1
  111. package/dist/commonjs/toast/lib/Toast.js +2 -2
  112. package/dist/commonjs/toast/lib/ToastBody.d.ts.map +1 -1
  113. package/dist/commonjs/toast/lib/ToastBody.js +2 -2
  114. package/dist/commonjs/toast/lib/ToastIcon.d.ts.map +1 -1
  115. package/dist/commonjs/toast/lib/ToastIcon.js +2 -2
  116. package/dist/commonjs/toast/lib/ToastMessage.d.ts.map +1 -1
  117. package/dist/commonjs/toast/lib/ToastMessage.js +2 -3
  118. package/dist/commonjs/tooltip/lib/TooltipContainer.d.ts +1 -1
  119. package/dist/commonjs/tooltip/lib/TooltipContainer.d.ts.map +1 -1
  120. package/dist/commonjs/tooltip/lib/TooltipContainer.js +5 -5
  121. package/dist/es6/action-bar/lib/ActionBarList.d.ts.map +1 -1
  122. package/dist/es6/action-bar/lib/ActionBarList.js +4 -4
  123. package/dist/es6/avatar/lib/Avatar.d.ts +5 -5
  124. package/dist/es6/avatar/lib/BaseAvatar.d.ts +5 -5
  125. package/dist/es6/banner/lib/Banner.js +2 -2
  126. package/dist/es6/button/lib/BaseButton.d.ts +26 -34
  127. package/dist/es6/button/lib/BaseButton.d.ts.map +1 -1
  128. package/dist/es6/button/lib/BaseButton.js +30 -30
  129. package/dist/es6/button/lib/DeleteButton.d.ts.map +1 -1
  130. package/dist/es6/button/lib/DeleteButton.js +4 -4
  131. package/dist/es6/button/lib/PrimaryButton.d.ts.map +1 -1
  132. package/dist/es6/button/lib/PrimaryButton.js +5 -5
  133. package/dist/es6/button/lib/SecondaryButton.d.ts.map +1 -1
  134. package/dist/es6/button/lib/SecondaryButton.js +4 -4
  135. package/dist/es6/button/lib/TertiaryButton.d.ts.map +1 -1
  136. package/dist/es6/button/lib/TertiaryButton.js +20 -20
  137. package/dist/es6/button/lib/ToolbarDropdownButton.d.ts +26 -34
  138. package/dist/es6/button/lib/ToolbarDropdownButton.d.ts.map +1 -1
  139. package/dist/es6/button/lib/ToolbarDropdownButton.js +6 -6
  140. package/dist/es6/button/lib/ToolbarIconButton.d.ts +52 -68
  141. package/dist/es6/button/lib/ToolbarIconButton.d.ts.map +1 -1
  142. package/dist/es6/button/lib/ToolbarIconButton.js +3 -3
  143. package/dist/es6/card/lib/CardBody.d.ts +86 -86
  144. package/dist/es6/card/lib/CardHeading.d.ts +86 -86
  145. package/dist/es6/checkbox/lib/CheckboxInput.d.ts.map +1 -1
  146. package/dist/es6/checkbox/lib/CheckboxInput.js +4 -4
  147. package/dist/es6/collection/lib/ListBox.d.ts.map +1 -1
  148. package/dist/es6/collection/lib/ListBox.js +8 -6
  149. package/dist/es6/color-picker/lib/ColorPreview.d.ts.map +1 -1
  150. package/dist/es6/color-picker/lib/ColorPreview.js +3 -3
  151. package/dist/es6/combobox/lib/ComboboxCard.d.ts +1 -0
  152. package/dist/es6/combobox/lib/ComboboxCard.d.ts.map +1 -1
  153. package/dist/es6/combobox/lib/ComboboxCard.js +6 -1
  154. package/dist/es6/combobox/lib/ComboboxMenuList.d.ts.map +1 -1
  155. package/dist/es6/combobox/lib/ComboboxMenuList.js +3 -1
  156. package/dist/es6/expandable/lib/ExpandableAvatar.d.ts +10 -10
  157. package/dist/es6/form-field/lib/FormFieldGroupLabel.d.ts +43 -43
  158. package/dist/es6/form-field/lib/FormFieldHint.d.ts +43 -43
  159. package/dist/es6/form-field/lib/FormFieldLabel.d.ts +43 -43
  160. package/dist/es6/menu/lib/MenuCard.d.ts.map +1 -1
  161. package/dist/es6/menu/lib/MenuCard.js +3 -3
  162. package/dist/es6/menu/lib/MenuDivider.d.ts.map +1 -1
  163. package/dist/es6/menu/lib/MenuDivider.js +3 -3
  164. package/dist/es6/menu/lib/MenuGroup.d.ts.map +1 -1
  165. package/dist/es6/menu/lib/MenuGroup.js +4 -4
  166. package/dist/es6/menu/lib/MenuItem.d.ts +0 -20
  167. package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
  168. package/dist/es6/menu/lib/MenuItem.js +4 -4
  169. package/dist/es6/menu/lib/MenuList.d.ts.map +1 -1
  170. package/dist/es6/menu/lib/MenuList.js +4 -4
  171. package/dist/es6/modal/lib/ModalBody.d.ts.map +1 -1
  172. package/dist/es6/modal/lib/ModalBody.js +3 -3
  173. package/dist/es6/modal/lib/ModalCard.d.ts.map +1 -1
  174. package/dist/es6/modal/lib/ModalCard.js +4 -4
  175. package/dist/es6/modal/lib/ModalHeading.d.ts.map +1 -1
  176. package/dist/es6/modal/lib/ModalHeading.js +3 -3
  177. package/dist/es6/modal/lib/ModalOverlay.d.ts.map +1 -1
  178. package/dist/es6/modal/lib/ModalOverlay.js +3 -3
  179. package/dist/es6/pagination/lib/Pagination/PageButton.d.ts +26 -34
  180. package/dist/es6/pagination/lib/Pagination/PageButton.d.ts.map +1 -1
  181. package/dist/es6/pagination/lib/Pagination/PageButton.js +2 -2
  182. package/dist/es6/pill/lib/Pill.d.ts +26 -34
  183. package/dist/es6/pill/lib/Pill.d.ts.map +1 -1
  184. package/dist/es6/pill/lib/Pill.js +3 -3
  185. package/dist/es6/pill/lib/PillAvatar.d.ts +10 -10
  186. package/dist/es6/pill/lib/PillIconButton.d.ts +52 -68
  187. package/dist/es6/pill/lib/PillIconButton.d.ts.map +1 -1
  188. package/dist/es6/pill/lib/PillIconButton.js +1 -1
  189. package/dist/es6/popup/lib/PopupBody.d.ts.map +1 -1
  190. package/dist/es6/popup/lib/PopupBody.js +3 -3
  191. package/dist/es6/popup/lib/PopupCard.d.ts.map +1 -1
  192. package/dist/es6/popup/lib/PopupCard.js +11 -9
  193. package/dist/es6/popup/lib/PopupCloseIcon.d.ts.map +1 -1
  194. package/dist/es6/popup/lib/PopupCloseIcon.js +3 -3
  195. package/dist/es6/popup/lib/PopupHeading.d.ts.map +1 -1
  196. package/dist/es6/popup/lib/PopupHeading.js +3 -3
  197. package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts +37 -42
  198. package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -1
  199. package/dist/es6/segmented-control/lib/SegmentedControlItem.js +19 -19
  200. package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts +0 -5
  201. package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts.map +1 -1
  202. package/dist/es6/segmented-control/lib/SegmentedControlList.js +6 -10
  203. package/dist/es6/select/lib/SelectCard.js +1 -1
  204. package/dist/es6/skeleton/lib/parts/SkeletonShape.js +1 -1
  205. package/dist/es6/switch/lib/Switch.d.ts.map +1 -1
  206. package/dist/es6/switch/lib/Switch.js +7 -7
  207. package/dist/es6/tabs/lib/Tabs.d.ts +36 -4
  208. package/dist/es6/tabs/lib/Tabs.d.ts.map +1 -1
  209. package/dist/es6/tabs/lib/TabsItem.d.ts.map +1 -1
  210. package/dist/es6/tabs/lib/TabsItem.js +3 -3
  211. package/dist/es6/tabs/lib/TabsList.d.ts +1 -1
  212. package/dist/es6/tabs/lib/TabsList.js +7 -7
  213. package/dist/es6/text/lib/Text.d.ts +43 -43
  214. package/dist/es6/text/lib/Text.d.ts.map +1 -1
  215. package/dist/es6/text/lib/Text.js +22 -19
  216. package/dist/es6/text-input/lib/TextInput.js +7 -7
  217. package/dist/es6/toast/lib/Toast.d.ts.map +1 -1
  218. package/dist/es6/toast/lib/Toast.js +3 -3
  219. package/dist/es6/toast/lib/ToastBody.d.ts.map +1 -1
  220. package/dist/es6/toast/lib/ToastBody.js +3 -3
  221. package/dist/es6/toast/lib/ToastIcon.d.ts.map +1 -1
  222. package/dist/es6/toast/lib/ToastIcon.js +4 -4
  223. package/dist/es6/toast/lib/ToastMessage.d.ts.map +1 -1
  224. package/dist/es6/toast/lib/ToastMessage.js +2 -3
  225. package/dist/es6/tooltip/lib/TooltipContainer.d.ts +1 -1
  226. package/dist/es6/tooltip/lib/TooltipContainer.d.ts.map +1 -1
  227. package/dist/es6/tooltip/lib/TooltipContainer.js +6 -6
  228. package/menu/lib/MenuCard.tsx +7 -3
  229. package/menu/lib/MenuDivider.tsx +6 -4
  230. package/menu/lib/MenuGroup.tsx +14 -7
  231. package/menu/lib/MenuItem.tsx +36 -16
  232. package/menu/lib/MenuList.tsx +8 -5
  233. package/modal/lib/ModalBody.tsx +3 -2
  234. package/modal/lib/ModalCard.tsx +14 -10
  235. package/modal/lib/ModalHeading.tsx +3 -2
  236. package/modal/lib/ModalOverlay.tsx +7 -6
  237. package/package.json +5 -5
  238. package/popup/lib/PopupBody.tsx +3 -2
  239. package/popup/lib/PopupCard.tsx +25 -11
  240. package/popup/lib/PopupCloseIcon.tsx +5 -3
  241. package/popup/lib/PopupHeading.tsx +3 -2
  242. package/segmented-control/lib/SegmentedControlItem.tsx +96 -33
  243. package/segmented-control/lib/SegmentedControlList.tsx +13 -13
  244. package/skeleton/lib/parts/SkeletonShape.tsx +1 -1
  245. package/switch/lib/Switch.tsx +3 -4
  246. package/tabs/lib/TabsItem.tsx +7 -5
  247. package/tabs/lib/TabsList.tsx +1 -1
  248. package/text/lib/Text.tsx +113 -29
  249. package/text-input/lib/TextInput.tsx +6 -6
  250. package/toast/lib/Toast.tsx +8 -4
  251. package/toast/lib/ToastBody.tsx +5 -4
  252. package/toast/lib/ToastIcon.tsx +4 -3
  253. package/toast/lib/ToastMessage.tsx +1 -3
  254. package/tooltip/lib/TooltipContainer.tsx +28 -13
@@ -3,8 +3,8 @@ import * as React from 'react';
3
3
  import {useListRenderItems, useOverflowListMeasure} from '@workday/canvas-kit-react/collection';
4
4
  import {ExtractProps, createSubcomponent} from '@workday/canvas-kit-react/common';
5
5
  import {Flex, mergeStyles} from '@workday/canvas-kit-react/layout';
6
- import {createStencil, cssVar} from '@workday/canvas-kit-styling';
7
- import {system} from '@workday/canvas-tokens-web';
6
+ import {createStencil, cssVar, px2rem} from '@workday/canvas-kit-styling';
7
+ import {base, system} from '@workday/canvas-tokens-web';
8
8
 
9
9
  import {useActionBarModel} from './useActionBarModel';
10
10
 
@@ -34,19 +34,21 @@ export interface ActionBarListProps<T = any>
34
34
  export const actionBarListStencil = createStencil({
35
35
  base: {
36
36
  display: 'flex',
37
- boxShadow: system.depth[1],
37
+ boxShadow: system.depth[2],
38
38
  // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
39
39
  gap: cssVar(system.gap.md, system.space.x4),
40
- background: system.color.bg.default,
41
40
  // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
42
- borderBlockStart: `solid 1px ${cssVar(system.color.border.default, system.color.border.divider)}`,
43
- padding: `${cssVar(system.space.x4)} ${cssVar(system.space.x10)} `,
41
+ background: cssVar(system.color.surface.default, system.color.bg.default),
42
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
43
+ borderBlockStart: `solid ${px2rem(1)} ${cssVar(system.color.border.default, system.color.border.divider)}`,
44
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
45
+ padding: `${cssVar(system.padding.md, system.space.x4)} ${cssVar(base.size500, system.space.x10)} `,
44
46
  position: 'fixed',
45
47
  insetBlockEnd: 0,
46
- insetInlineStart: 0,
47
- insetInlineEnd: 0,
48
+ insetInline: 0,
48
49
  '@media (max-width: 767.5px)': {
49
- padding: system.space.x4,
50
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
51
+ padding: cssVar(system.size.xxxs, system.space.x4),
50
52
  '> *': {
51
53
  flex: 1,
52
54
  },
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
2
 
3
- import {GrowthBehavior, createComponent, focusRing} from '@workday/canvas-kit-react/common';
3
+ import {GrowthBehavior, createComponent} from '@workday/canvas-kit-react/common';
4
4
  import {SystemIconProps, systemIconStencil} from '@workday/canvas-kit-react/icon';
5
5
  import {mergeStyles} from '@workday/canvas-kit-react/layout';
6
- import {calc, createStencil, createVars, cssVar, px2rem} from '@workday/canvas-kit-styling';
7
- import {brand, system} from '@workday/canvas-tokens-web';
6
+ import {createStencil, createVars, cssVar, px2rem} from '@workday/canvas-kit-styling';
7
+ import {base, brand, system} from '@workday/canvas-tokens-web';
8
8
  import {CanvasSystemIcon} from '@workday/design-assets-types';
9
9
 
10
10
  import {ButtonLabel} from '../lib/parts/ButtonLabel';
@@ -122,9 +122,12 @@ export const buttonStencil = createStencil({
122
122
  base: ({background, border, boxShadowInner, boxShadowOuter, label, opacity, borderRadius}) => ({
123
123
  // Default Styles
124
124
  fontFamily: system.fontFamily.default,
125
- fontSize: '0.875rem',
126
- lineHeight: 'normal',
127
- letterSpacing: '0.015rem',
125
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
126
+ fontSize: cssVar(system.fontSize.subtext.lg, system.fontSize.subtext.large),
127
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
128
+ lineHeight: cssVar(system.lineHeight.subtext.lg, system.lineHeight.subtext.large),
129
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
130
+ letterSpacing: cssVar(system.letterSpacing.subtext.lg, base.letterSpacing150),
128
131
  fontWeight: system.fontWeight.bold,
129
132
  backgroundColor: cssVar(
130
133
  buttonColorPropVars.default.background,
@@ -141,7 +144,6 @@ export const buttonStencil = createStencil({
141
144
  boxShadow: 'none',
142
145
  alignItems: 'center',
143
146
  justifyContent: 'center',
144
- boxSizing: 'border-box',
145
147
  outline: `${px2rem(2)} transparent`,
146
148
  whiteSpace: 'nowrap',
147
149
  WebkitFontSmoothing: 'antialiased',
@@ -178,18 +180,13 @@ export const buttonStencil = createStencil({
178
180
  ),
179
181
  outline: `${px2rem(2)} solid transparent`,
180
182
  outlineOffset: px2rem(2),
181
- ...focusRing({
182
- width: 2,
183
- separation: 2,
184
- innerColor: cssVar(
185
- buttonColorPropVars.focus.boxShadowInner,
186
- cssVar(boxShadowInner, system.color.border.inverse.default)
187
- ),
188
- outerColor: cssVar(
189
- buttonColorPropVars.focus.boxShadowOuter,
190
- cssVar(boxShadowOuter, brand.common.focusOutline)
191
- ),
192
- }),
183
+ boxShadow: `0 0 0 ${px2rem(2)} ${cssVar(
184
+ buttonColorPropVars.focus.boxShadowInner,
185
+ cssVar(boxShadowInner, cssVar(system.color.border.inverse.default, base.neutral0))
186
+ )},0 0 0 ${px2rem(4)} ${cssVar(
187
+ buttonColorPropVars.focus.boxShadowOuter,
188
+ cssVar(boxShadowOuter, cssVar(system.color.brand.focus.primary, brand.common.focusOutline))
189
+ )}`,
193
190
  },
194
191
  // Hover Styles
195
192
  '&:hover, &.hover': {
@@ -226,10 +223,7 @@ export const buttonStencil = createStencil({
226
223
  ),
227
224
  borderColor: cssVar(buttonColorPropVars.disabled.border, cssVar(border, 'transparent')),
228
225
  color: cssVar(buttonColorPropVars.disabled.label, cssVar(label, system.color.fg.strong)),
229
- [systemIconStencil.vars.color]: cssVar(
230
- buttonColorPropVars.disabled.icon,
231
- system.color.fg.strong
232
- ),
226
+ [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.disabled.icon, 'currentColor'),
233
227
  },
234
228
  // for Windows high contrast desktop themes
235
229
  '@media (prefers-contrast: more)': {
@@ -259,34 +253,63 @@ export const buttonStencil = createStencil({
259
253
  */
260
254
  size: {
261
255
  large: {
262
- ...system.type.body.small,
263
- fontWeight: system.fontWeight.bold,
264
- height: px2rem(48),
265
- paddingInline: system.space.x8,
266
- minWidth: px2rem(112),
256
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
257
+ fontSize: cssVar(system.fontSize.body.sm, system.fontSize.body.small),
258
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
259
+ lineHeight: cssVar(system.lineHeight.body.sm, system.lineHeight.body.small),
260
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
261
+ letterSpacing: cssVar(system.letterSpacing.body.sm, base.letterSpacing200),
262
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
263
+ height: cssVar(system.size.lg, px2rem(48)),
264
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
265
+ paddingInline: cssVar(system.padding.xxl, system.space.x8),
266
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
267
+ minWidth: cssVar(base.size1400, px2rem(112)),
267
268
  },
268
269
  medium: {
269
- ...system.type.subtext.large,
270
- fontWeight: system.fontWeight.bold,
271
- minWidth: px2rem(96),
272
- paddingInline: system.space.x6,
273
- height: system.space.x10,
270
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
271
+ fontSize: cssVar(system.fontSize.subtext.lg, system.fontSize.subtext.large),
272
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
273
+ lineHeight: cssVar(system.lineHeight.subtext.lg, system.lineHeight.subtext.large),
274
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
275
+ letterSpacing: cssVar(system.letterSpacing.subtext.lg, base.letterSpacing150),
276
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
277
+ minWidth: cssVar(base.size1200, px2rem(96)),
278
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
279
+ paddingInline: cssVar(system.padding.xl, system.space.x6),
280
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
281
+ height: cssVar(system.size.md, system.space.x10),
274
282
  },
275
283
  small: {
276
- ...system.type.subtext.large,
277
- fontWeight: system.fontWeight.bold,
278
- height: system.space.x8,
279
- minWidth: system.space.x20,
280
- paddingInline: system.space.x4,
281
- gap: system.space.x1,
284
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
285
+ fontSize: cssVar(system.fontSize.subtext.lg, system.fontSize.subtext.large),
286
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
287
+ lineHeight: cssVar(system.lineHeight.subtext.lg, system.lineHeight.subtext.large),
288
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
289
+ letterSpacing: cssVar(system.letterSpacing.subtext.lg, base.letterSpacing150),
290
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
291
+ height: cssVar(system.size.sm, system.space.x8),
292
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
293
+ minWidth: cssVar(base.size1000, system.space.x20),
294
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
295
+ paddingInline: cssVar(system.padding.md, system.space.x4),
296
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
297
+ gap: cssVar(system.gap.xs, system.space.x1),
282
298
  },
283
299
  extraSmall: {
284
- ...system.type.subtext.medium,
285
- fontWeight: system.fontWeight.bold,
286
- height: system.space.x6,
300
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
301
+ fontSize: cssVar(system.fontSize.subtext.md, system.fontSize.subtext.medium),
302
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
303
+ lineHeight: cssVar(system.lineHeight.subtext.md, system.lineHeight.subtext.medium),
304
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
305
+ letterSpacing: cssVar(system.letterSpacing.subtext.md, base.letterSpacing100),
306
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
307
+ height: cssVar(system.size.xs, system.space.x6),
287
308
  minWidth: 'auto',
288
- paddingInline: system.space.x3,
289
- gap: system.space.x1,
309
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
310
+ paddingInline: cssVar(system.padding.sm, system.space.x3),
311
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
312
+ gap: cssVar(system.gap.xs, system.space.x1),
290
313
  },
291
314
  },
292
315
  grow: {
@@ -297,7 +320,7 @@ export const buttonStencil = createStencil({
297
320
  },
298
321
  // IconPosition Styles
299
322
  iconPosition: {
300
- only: {padding: system.space.zero},
323
+ only: {padding: 0},
301
324
  start: {},
302
325
  end: {},
303
326
  },
@@ -307,81 +330,101 @@ export const buttonStencil = createStencil({
307
330
  {
308
331
  modifiers: {size: 'large', iconPosition: 'only'},
309
332
  styles: {
310
- minWidth: calc.multiply(system.space.x4, 3),
333
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
334
+ minWidth: cssVar(system.size.lg, px2rem(48)),
311
335
  },
312
336
  },
313
337
  {
314
338
  modifiers: {size: 'large', iconPosition: 'start'},
315
339
  styles: {
316
- paddingInlineStart: system.space.x6,
317
- paddingInlineEnd: system.space.x8,
340
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
341
+ paddingInlineStart: cssVar(system.padding.xl, system.space.x6),
342
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
343
+ paddingInlineEnd: cssVar(system.padding.xxl, system.space.x8),
318
344
  },
319
345
  },
320
346
  {
321
347
  modifiers: {size: 'large', iconPosition: 'end'},
322
348
  styles: {
323
- paddingInlineStart: system.space.x8,
324
- paddingInlineEnd: system.space.x6,
349
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
350
+ paddingInlineStart: cssVar(system.padding.xxl, system.space.x8),
351
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
352
+ paddingInlineEnd: cssVar(system.padding.xl, system.space.x6),
325
353
  },
326
354
  },
327
355
  {
328
356
  modifiers: {size: 'medium', iconPosition: 'only'},
329
357
  styles: {
330
- minWidth: system.space.x10,
358
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
359
+ minWidth: cssVar(system.size.md, system.space.x10),
331
360
  },
332
361
  },
333
362
  {
334
363
  modifiers: {size: 'medium', iconPosition: 'start'},
335
364
  styles: {
336
- paddingInlineStart: calc.multiply(system.space.x1, 5),
337
- paddingInlineEnd: system.space.x6,
365
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
366
+ paddingInlineStart: cssVar(system.padding.lg, px2rem(20)),
367
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
368
+ paddingInlineEnd: cssVar(system.padding.xl, system.space.x6),
338
369
  },
339
370
  },
340
371
  {
341
372
  modifiers: {size: 'medium', iconPosition: 'end'},
342
373
  styles: {
343
- paddingInlineStart: system.space.x6,
344
- paddingInlineEnd: calc.multiply(system.space.x1, 5),
374
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
375
+ paddingInlineStart: cssVar(system.padding.xl, system.space.x6),
376
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
377
+ paddingInlineEnd: cssVar(system.padding.lg, px2rem(20)),
345
378
  },
346
379
  },
347
380
  {
348
381
  modifiers: {size: 'small', iconPosition: 'only'},
349
382
  styles: {
350
- minWidth: system.space.x8,
383
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
384
+ minWidth: cssVar(system.size.sm, system.space.x8),
351
385
  },
352
386
  },
353
387
  {
354
388
  modifiers: {size: 'small', iconPosition: 'start'},
355
389
  styles: {
356
- paddingInlineStart: system.space.x3,
357
- paddingInlineEnd: system.space.x4,
390
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
391
+ paddingInlineStart: cssVar(system.padding.sm, system.space.x3),
392
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
393
+ paddingInlineEnd: cssVar(system.padding.md, system.space.x4),
358
394
  },
359
395
  },
360
396
  {
361
397
  modifiers: {size: 'small', iconPosition: 'end'},
362
398
  styles: {
363
- paddingInlineStart: system.space.x4,
364
- paddingInlineEnd: system.space.x3,
399
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
400
+ paddingInlineStart: cssVar(system.padding.md, system.space.x4),
401
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
402
+ paddingInlineEnd: cssVar(system.padding.sm, system.space.x3),
365
403
  },
366
404
  },
367
405
  {
368
406
  modifiers: {size: 'extraSmall', iconPosition: 'only'},
369
407
  styles: {
370
- minWidth: system.space.x6,
408
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
409
+ minWidth: cssVar(system.size.xs, system.space.x6),
371
410
  },
372
411
  },
373
412
  {
374
413
  modifiers: {size: 'extraSmall', iconPosition: 'start'},
375
414
  styles: {
376
- paddingInlineStart: system.space.x2,
377
- paddingInlineEnd: system.space.x3,
415
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
416
+ paddingInlineStart: cssVar(system.padding.xs, system.space.x2),
417
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
418
+ paddingInlineEnd: cssVar(system.padding.sm, system.space.x3),
378
419
  },
379
420
  },
380
421
  {
381
422
  modifiers: {size: 'extraSmall', iconPosition: 'end'},
382
423
  styles: {
383
- paddingInlineStart: system.space.x3,
384
- paddingInlineEnd: system.space.x2,
424
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
425
+ paddingInlineStart: cssVar(system.padding.sm, system.space.x3),
426
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
427
+ paddingInlineEnd: cssVar(system.padding.xs, system.space.x2),
385
428
  },
386
429
  },
387
430
  ],
@@ -1,7 +1,7 @@
1
1
  import {createComponent} from '@workday/canvas-kit-react/common';
2
2
  import {systemIconStencil} from '@workday/canvas-kit-react/icon';
3
- import {createStencil, cssVar} from '@workday/canvas-kit-styling';
4
- import {brand, system} from '@workday/canvas-tokens-web';
3
+ import {colorSpace, createStencil, cssVar} from '@workday/canvas-kit-styling';
4
+ import {base, brand, system} from '@workday/canvas-tokens-web';
5
5
 
6
6
  import {buttonColorPropVars, buttonStencil} from './BaseButton';
7
7
  import {Button, ButtonProps} from './Button';
@@ -17,36 +17,83 @@ const deleteButtonStencil = createStencil({
17
17
  extends: buttonStencil,
18
18
  base: {
19
19
  // Base Styles
20
- [buttonStencil.vars.background]: brand.error.base,
21
- [buttonStencil.vars.borderRadius]: system.shape.round,
22
- [buttonStencil.vars.label]: brand.error.accent,
23
- [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.default.icon, brand.error.accent),
20
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
21
+ [buttonStencil.vars.background]: cssVar(system.color.brand.accent.critical, brand.error.base),
22
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
23
+ [buttonStencil.vars.borderRadius]: cssVar(system.shape.full, system.shape.round),
24
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
25
+ [buttonStencil.vars.label]: cssVar(system.color.fg.inverse, brand.error.accent),
26
+ [systemIconStencil.vars.color]: cssVar(
27
+ buttonColorPropVars.default.icon,
28
+ cssVar(system.color.fg.inverse, brand.error.accent)
29
+ ),
24
30
  // Focus Styles
25
31
  '&:focus-visible, &.focus': {
26
- [buttonStencil.vars.background]: brand.error.base,
27
- [buttonStencil.vars.label]: brand.error.accent,
28
- [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.focus.icon, brand.error.accent),
29
- [buttonStencil.vars.boxShadowInner]: system.color.border.inverse.default,
30
- [buttonStencil.vars.boxShadowOuter]: brand.common.focusOutline,
32
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
33
+ [buttonStencil.vars.background]: cssVar(system.color.brand.accent.critical, brand.error.base),
34
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
35
+ [buttonStencil.vars.label]: cssVar(system.color.fg.inverse, brand.error.accent),
36
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
37
+ [systemIconStencil.vars.color]: cssVar(
38
+ buttonColorPropVars.focus.icon,
39
+ cssVar(system.color.fg.inverse, brand.error.accent)
40
+ ),
41
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
42
+ [buttonStencil.vars.boxShadowInner]: cssVar(
43
+ system.color.focus.inverse,
44
+ cssVar(system.color.border.inverse.default, base.neutral0)
45
+ ),
46
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
47
+ [buttonStencil.vars.boxShadowOuter]: cssVar(
48
+ system.color.brand.focus.primary,
49
+ brand.common.focusOutline
50
+ ),
31
51
  },
32
52
  // Hover Styles
33
53
  '&:hover, &.hover': {
34
- [buttonStencil.vars.background]: brand.error.dark,
35
- [buttonStencil.vars.label]: brand.error.accent,
36
- [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.hover.icon, brand.error.accent),
54
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
55
+ [buttonStencil.vars.background]: colorSpace.darken(
56
+ system.color.brand.accent.critical,
57
+ brand.error.dark,
58
+ system.color.accent.overlay.mixin,
59
+ system.opacity.accent.hover
60
+ ),
61
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
62
+ [buttonStencil.vars.label]: cssVar(system.color.fg.inverse, brand.error.accent),
63
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
64
+ [systemIconStencil.vars.color]: cssVar(
65
+ buttonColorPropVars.hover.icon,
66
+ cssVar(system.color.fg.inverse, brand.error.accent)
67
+ ),
37
68
  },
38
69
  // Active Styles
39
70
  '&:active, &.active': {
40
- [buttonStencil.vars.background]: brand.error.darkest,
41
- [buttonStencil.vars.label]: brand.error.accent,
42
- [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.active.icon, brand.error.accent),
71
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
72
+ [buttonStencil.vars.background]: colorSpace.darken(
73
+ system.color.brand.accent.critical,
74
+ brand.error.darkest,
75
+ system.color.accent.overlay.mixin,
76
+ system.opacity.accent.pressed
77
+ ),
78
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
79
+ [buttonStencil.vars.label]: cssVar(system.color.fg.inverse, brand.error.accent),
80
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
81
+ [systemIconStencil.vars.color]: cssVar(
82
+ buttonColorPropVars.active.icon,
83
+ cssVar(system.color.fg.inverse, brand.error.accent)
84
+ ),
43
85
  },
44
86
  // Disabled Styles
45
87
  '&:disabled, &.disabled': {
46
- [buttonStencil.vars.background]: brand.error.base,
47
- [buttonStencil.vars.label]: brand.error.accent,
48
- [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.disabled.icon, brand.error.accent),
49
88
  [buttonStencil.vars.opacity]: system.opacity.disabled,
89
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
90
+ [buttonStencil.vars.background]: cssVar(system.color.brand.accent.critical, brand.error.base),
91
+ [systemIconStencil.vars.color]: cssVar(
92
+ buttonColorPropVars.disabled.icon,
93
+ cssVar(system.color.fg.inverse, brand.error.accent)
94
+ ),
95
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
96
+ [buttonStencil.vars.label]: cssVar(system.color.fg.inverse, brand.error.accent),
50
97
  },
51
98
  },
52
99
  });
@@ -1,7 +1,7 @@
1
1
  import {createComponent} from '@workday/canvas-kit-react/common';
2
2
  import {systemIconStencil} from '@workday/canvas-kit-react/icon';
3
- import {createStencil, cssVar} from '@workday/canvas-kit-styling';
4
- import {brand, system} from '@workday/canvas-tokens-web';
3
+ import {colorSpace, createStencil, cssVar} from '@workday/canvas-kit-styling';
4
+ import {base, brand, system} from '@workday/canvas-tokens-web';
5
5
 
6
6
  import {buttonColorPropVars, buttonStencil} from './BaseButton';
7
7
  import {Button, type ButtonProps} from './Button';
@@ -22,69 +22,149 @@ const primaryButtonStencil = createStencil({
22
22
  extends: buttonStencil,
23
23
  base: {
24
24
  // Base Styles
25
- [buttonStencil.vars.background]: cssVar(brand.action.base, brand.primary.base),
25
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
26
+ [buttonStencil.vars.background]: cssVar(
27
+ brand.action.base,
28
+ cssVar(system.color.brand.accent.primary, brand.primary.base)
29
+ ),
30
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
26
31
  [buttonStencil.vars.borderRadius]: cssVar(system.shape.full, system.shape.round),
27
- [buttonStencil.vars.label]: cssVar(brand.action.accent, brand.primary.accent),
32
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
33
+ [buttonStencil.vars.label]: cssVar(
34
+ brand.action.accent,
35
+ cssVar(system.color.fg.inverse, brand.primary.accent)
36
+ ),
28
37
  [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.default.icon, 'currentColor'),
29
38
  // Focus Styles
30
39
  '&:focus-visible, &.focus': {
31
- [buttonStencil.vars.background]: cssVar(brand.action.base, brand.primary.base),
32
- [buttonStencil.vars.label]: cssVar(brand.action.accent, brand.primary.accent),
33
- [buttonStencil.vars.boxShadowInner]: system.color.focus.inverse,
34
- [buttonStencil.vars.boxShadowOuter]: brand.common.focusOutline,
40
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
41
+ [buttonStencil.vars.background]: cssVar(
42
+ brand.action.base,
43
+ cssVar(system.color.brand.accent.primary, brand.primary.base)
44
+ ),
45
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
46
+ [buttonStencil.vars.label]: cssVar(
47
+ brand.action.accent,
48
+ cssVar(system.color.fg.inverse, brand.primary.accent)
49
+ ),
50
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
51
+ [buttonStencil.vars.boxShadowInner]: cssVar(
52
+ system.color.focus.inverse,
53
+ cssVar(system.color.border.inverse.default, base.neutral0)
54
+ ),
55
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
56
+ [buttonStencil.vars.boxShadowOuter]: cssVar(
57
+ system.color.brand.focus.primary,
58
+ brand.common.focusOutline
59
+ ),
35
60
  [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.focus.icon, 'currentColor'),
36
61
  },
37
62
  // Hover Styles
38
63
  '&:hover, &.hover': {
39
- [buttonStencil.vars.background]: cssVar(brand.action.dark, brand.primary.dark),
40
- [buttonStencil.vars.label]: cssVar(brand.action.accent, brand.primary.accent),
64
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
65
+ [buttonStencil.vars.background]: colorSpace.darken(
66
+ brand.action.dark,
67
+ cssVar(system.color.brand.accent.primary, brand.primary.dark),
68
+ system.color.accent.overlay.mixin,
69
+ system.opacity.accent.hover
70
+ ),
71
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
72
+ [buttonStencil.vars.label]: cssVar(
73
+ brand.action.accent,
74
+ cssVar(system.color.fg.inverse, brand.primary.accent)
75
+ ),
41
76
  [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.hover.icon, 'currentColor'),
42
77
  },
43
78
  // Active Styles
44
79
  '&:active, &.active': {
45
- [buttonStencil.vars.background]: cssVar(brand.action.darkest, brand.primary.darkest),
46
- [buttonStencil.vars.label]: cssVar(brand.action.accent, brand.primary.accent),
80
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
81
+ [buttonStencil.vars.background]: colorSpace.darken(
82
+ brand.action.darkest,
83
+ cssVar(system.color.brand.accent.primary, brand.primary.darkest),
84
+ system.color.accent.overlay.mixin,
85
+ system.opacity.accent.pressed
86
+ ),
87
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
88
+ [buttonStencil.vars.label]: cssVar(
89
+ brand.action.accent,
90
+ cssVar(system.color.fg.inverse, brand.primary.accent)
91
+ ),
47
92
  [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.active.icon, 'currentColor'),
48
93
  },
49
94
  // Disabled Styles
50
95
  '&:disabled, &.disabled': {
51
- [buttonStencil.vars.background]: cssVar(brand.action.base, brand.primary.base),
52
- [buttonStencil.vars.label]: cssVar(brand.action.accent, brand.primary.accent),
53
96
  [buttonStencil.vars.opacity]: system.opacity.disabled,
54
- [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.disabled.icon, 'currentColor'),
97
+ [buttonStencil.vars.background]: cssVar(
98
+ brand.action.base,
99
+ cssVar(system.color.brand.accent.primary, brand.primary.base)
100
+ ),
101
+ [buttonStencil.vars.label]: cssVar(
102
+ brand.action.accent,
103
+ cssVar(system.color.fg.inverse, brand.primary.accent)
104
+ ),
105
+ [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.default.icon, 'currentColor'),
55
106
  },
56
107
  },
57
108
  modifiers: {
58
109
  variant: {
59
110
  // Inverse Styles
60
111
  inverse: {
61
- [buttonStencil.vars.background]: cssVar(brand.action.lightest, brand.primary.lightest),
62
- [buttonStencil.vars.borderRadius]: system.shape.round,
112
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
113
+ [buttonStencil.vars.background]: cssVar(
114
+ brand.action.lightest,
115
+ cssVar(system.color.surface.inverse, brand.primary.lightest)
116
+ ),
117
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
118
+ [buttonStencil.vars.borderRadius]: cssVar(system.shape.full, system.shape.round),
63
119
  [buttonStencil.vars.label]: system.color.fg.strong,
64
120
  [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.default.icon, 'currentColor'),
121
+ // Hover Styles
122
+ '&:hover, &.hover': {
123
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
124
+ [buttonStencil.vars.background]: colorSpace.darken(
125
+ brand.action.lighter,
126
+ cssVar(system.color.surface.inverse, brand.primary.lighter),
127
+ system.color.accent.overlay.mixin,
128
+ system.opacity.accent.hover
129
+ ),
130
+ [buttonStencil.vars.label]: system.color.fg.stronger,
131
+ [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.hover.icon, 'currentColor'),
132
+ },
65
133
  // Focus Styles
66
134
  '&:focus-visible, &.focus': {
67
- [buttonStencil.vars.background]: cssVar(brand.action.lightest, brand.primary.lightest),
135
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
136
+ [buttonStencil.vars.background]: cssVar(
137
+ brand.action.lightest,
138
+ cssVar(system.color.surface.inverse, brand.primary.lightest)
139
+ ),
68
140
  [buttonStencil.vars.label]: system.color.fg.strong,
69
141
  [buttonStencil.vars.boxShadowInner]: system.color.border.contrast.default,
70
- [buttonStencil.vars.boxShadowOuter]: system.color.focus.inverse,
142
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
143
+ [buttonStencil.vars.boxShadowOuter]: cssVar(
144
+ system.color.focus.inverse,
145
+ cssVar(system.color.border.inverse.default, base.neutral0)
146
+ ),
71
147
  [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.focus.icon, 'currentColor'),
72
148
  },
73
- // Hover Styles
74
- '&:hover, &.hover': {
75
- [buttonStencil.vars.background]: cssVar(brand.action.lighter, brand.primary.lightest),
76
- [buttonStencil.vars.label]: system.color.fg.stronger,
77
- [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.hover.icon, 'currentColor'),
78
- },
79
149
  // Active Styles
80
150
  '&:active, &.active': {
81
- [buttonStencil.vars.background]: cssVar(brand.action.light, brand.primary.light),
151
+ // TODO (forwardfit token): Revisit token, using v4 token and fallback to v3 token
152
+ [buttonStencil.vars.background]: colorSpace.darken(
153
+ brand.action.light,
154
+ cssVar(system.color.surface.inverse, brand.primary.light),
155
+ system.color.accent.overlay.mixin,
156
+ system.opacity.accent.pressed
157
+ ),
82
158
  [buttonStencil.vars.label]: system.color.fg.stronger,
83
159
  [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.active.icon, 'currentColor'),
84
160
  },
85
161
  // Disabled Styles
86
162
  '&:disabled, &.disabled': {
87
- [buttonStencil.vars.background]: cssVar(brand.action.lightest, brand.primary.lightest),
163
+ [buttonStencil.vars.opacity]: system.opacity.disabled,
164
+ [buttonStencil.vars.background]: cssVar(
165
+ brand.action.lightest,
166
+ cssVar(system.color.surface.inverse, brand.primary.lightest)
167
+ ),
88
168
  [buttonStencil.vars.label]: system.color.fg.strong,
89
169
  [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.disabled.icon, 'currentColor'),
90
170
  },