@workday/canvas-kit-preview-react 16.0.0-alpha.0444-next.0 → 16.0.0-alpha.0449-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 (55) hide show
  1. package/dist/commonjs/color-picker/lib/ColorPicker.js +1 -1
  2. package/dist/commonjs/color-picker/lib/parts/ColorReset.js +1 -1
  3. package/dist/commonjs/color-picker/lib/parts/SwatchBook.js +1 -1
  4. package/dist/commonjs/divider/lib/Divider.js +1 -1
  5. package/dist/commonjs/loading-sparkles/lib/LoadingSparkles.js +2 -2
  6. package/dist/commonjs/multi-select/lib/MultiSelectInput.js +3 -3
  7. package/dist/commonjs/radio/lib/RadioGroup.d.ts.map +1 -1
  8. package/dist/commonjs/radio/lib/RadioGroup.js +5 -4
  9. package/dist/commonjs/radio/lib/RadioLabel.js +2 -2
  10. package/dist/commonjs/radio/lib/RadioText.js +3 -3
  11. package/dist/commonjs/radio/lib/StyledRadioButton.d.ts +2 -2
  12. package/dist/commonjs/radio/lib/StyledRadioButton.d.ts.map +1 -1
  13. package/dist/commonjs/radio/lib/StyledRadioButton.js +7 -7
  14. package/dist/commonjs/side-panel/lib/SidePanel.js +7 -7
  15. package/dist/commonjs/side-panel/lib/SidePanelToggleButton.js +11 -11
  16. package/dist/commonjs/status-indicator/lib/StatusIndicator.js +14 -14
  17. package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.js +1 -1
  18. package/dist/commonjs/switch/lib/SwitchBackground.js +2 -2
  19. package/dist/commonjs/switch/lib/SwitchCircle.js +3 -3
  20. package/dist/commonjs/switch/lib/SwitchContainer.js +2 -2
  21. package/dist/commonjs/switch/lib/SwitchIcon.js +2 -2
  22. package/dist/commonjs/switch/lib/SwitchInput.js +3 -3
  23. package/dist/commonjs/version/lib/version.js +1 -1
  24. package/dist/es6/color-picker/lib/ColorPicker.js +1 -1
  25. package/dist/es6/color-picker/lib/parts/ColorReset.js +1 -1
  26. package/dist/es6/color-picker/lib/parts/SwatchBook.js +1 -1
  27. package/dist/es6/divider/lib/Divider.js +1 -1
  28. package/dist/es6/loading-sparkles/lib/LoadingSparkles.js +2 -2
  29. package/dist/es6/multi-select/lib/MultiSelectInput.js +3 -3
  30. package/dist/es6/radio/lib/RadioGroup.d.ts.map +1 -1
  31. package/dist/es6/radio/lib/RadioGroup.js +6 -5
  32. package/dist/es6/radio/lib/RadioLabel.js +3 -3
  33. package/dist/es6/radio/lib/RadioText.js +3 -3
  34. package/dist/es6/radio/lib/StyledRadioButton.d.ts +2 -2
  35. package/dist/es6/radio/lib/StyledRadioButton.d.ts.map +1 -1
  36. package/dist/es6/radio/lib/StyledRadioButton.js +8 -8
  37. package/dist/es6/side-panel/lib/SidePanel.js +7 -7
  38. package/dist/es6/side-panel/lib/SidePanelToggleButton.js +11 -11
  39. package/dist/es6/status-indicator/lib/StatusIndicator.js +14 -14
  40. package/dist/es6/status-indicator/lib/StatusIndicatorLabel.js +1 -1
  41. package/dist/es6/switch/lib/SwitchBackground.js +3 -3
  42. package/dist/es6/switch/lib/SwitchCircle.js +4 -4
  43. package/dist/es6/switch/lib/SwitchContainer.js +3 -3
  44. package/dist/es6/switch/lib/SwitchIcon.js +2 -2
  45. package/dist/es6/switch/lib/SwitchInput.js +3 -3
  46. package/dist/es6/version/lib/version.js +1 -1
  47. package/package.json +4 -4
  48. package/radio/lib/RadioGroup.tsx +9 -5
  49. package/radio/lib/RadioLabel.tsx +2 -2
  50. package/radio/lib/StyledRadioButton.tsx +18 -16
  51. package/switch/lib/SwitchBackground.tsx +4 -4
  52. package/switch/lib/SwitchCircle.tsx +5 -5
  53. package/switch/lib/SwitchContainer.tsx +2 -2
  54. package/switch/lib/SwitchIcon.tsx +2 -2
  55. package/switch/lib/SwitchInput.tsx +2 -2
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import {ExtractProps, StyledType, createComponent} from '@workday/canvas-kit-react/common';
4
4
  import {Box, Flex, mergeStyles} from '@workday/canvas-kit-react/layout';
5
5
  import {CSProps, createStencil, handleCsProp, px2rem} from '@workday/canvas-kit-styling';
6
- import {base, system} from '@workday/canvas-tokens-web';
6
+ import {system} from '@workday/canvas-tokens-web';
7
7
 
8
8
  import {RadioLabelContext} from './RadioLabel';
9
9
 
@@ -17,23 +17,23 @@ export const radioInputStencil = createStencil({
17
17
  },
18
18
  base: {
19
19
  cursor: 'pointer',
20
- height: base.legacy.size225,
21
- width: base.legacy.size225,
20
+ height: system.legacy.size.xs,
21
+ width: system.legacy.size.xs,
22
22
  borderRadius: system.legacy.shape.full,
23
23
  position: 'absolute',
24
24
  margin: 0,
25
+ opacity: system.opacity.zero,
25
26
  '&:focus-visible, &.focus, &:active': {
26
- outline: 'transparent',
27
+ outline: `${px2rem(1)} solid transparent`,
27
28
  },
28
29
  '&:disabled, &.disabled': {
29
30
  cursor: 'auto',
30
- opacity: system.opacity.disabled,
31
31
  // This creates the inner circle when the Radio is checked.
32
32
  // The backgroundColor represents the dot in the middle of the radio.
33
33
  // The borderColor represents the border around the middle dot of the radio.
34
34
  '&:checked + .cnvs-radio-check, &.checked + .cnvs-radio-check': {
35
35
  backgroundColor: system.legacy.color.surface.default, // inner circle background color
36
- border: `${px2rem(5)} solid ${system.legacy.color.brand.accent.primary}`, // inner circle border color
36
+ border: `${px2rem(5)} solid ${system.legacy.color.brand.accent.positive}`, // inner circle border color
37
37
  },
38
38
  },
39
39
 
@@ -45,8 +45,8 @@ export const radioInputStencil = createStencil({
45
45
  backgroundColor: system.color.bg.default,
46
46
  boxSizing: 'border-box',
47
47
  border: `${px2rem(1)} solid ${system.color.border.input.default}`,
48
- height: base.legacy.size225,
49
- width: base.legacy.size225,
48
+ height: system.legacy.size.xxxs,
49
+ width: system.legacy.size.xxxs,
50
50
  borderRadius: system.legacy.shape.full,
51
51
  justifyContent: 'center',
52
52
  pointerEvents: 'none',
@@ -69,7 +69,7 @@ export const radioInputStencil = createStencil({
69
69
  // The borderColor represents the border around the middle dot of the radio.
70
70
  '&:checked + .cnvs-radio-check, &.checked + .cnvs-radio-check': {
71
71
  backgroundColor: system.legacy.color.surface.default, // inner circle background color
72
- border: `${px2rem(5)} solid ${system.legacy.color.brand.accent.primary}`, // inner circle border color
72
+ border: `${px2rem(5)} solid ${system.legacy.color.brand.accent.positive}`, // inner circle border color
73
73
  },
74
74
 
75
75
  '&:focus-visible:checked + .cnvs-radio-check, &:focus-visible:hover:checked + .cnvs-radio-check, &.focus:checked + .cnvs-radio-check, &.focus:hover:checked + .cnvs-radio-check':
@@ -96,7 +96,7 @@ export const radioInputStencil = createStencil({
96
96
  // The backgroundColor represents the dot in the middle of the radio.
97
97
  // The borderColor represents the border around the middle dot of the radio.
98
98
  [`&:checked + ${checkPart}, &.checked + ${checkPart}`]: {
99
- backgroundColor: system.legacy.color.brand.accent.primary, // inner circle background color
99
+ backgroundColor: system.legacy.color.brand.accent.positive, // inner circle background color
100
100
  borderColor: system.legacy.color.border.inverse.default, // inner circle border color
101
101
  },
102
102
  },
@@ -135,29 +135,31 @@ const StyledRadioInput = createComponent('input')<StyledRadioButtonProps & Style
135
135
 
136
136
  export const radioInputWrapperStencil = createStencil({
137
137
  base: {
138
- height: base.legacy.size225,
139
- width: base.legacy.size225,
138
+ height: system.legacy.size.xxs,
139
+ width: system.legacy.size.xxs,
140
140
  flex: '0 0 auto',
141
+ alignItems: 'center',
142
+ justifyContent: 'center',
141
143
  // Hover Ripple element
142
144
  '::before': {
143
145
  content: "''",
144
146
  position: 'absolute',
145
147
  borderRadius: system.legacy.shape.full,
146
- height: base.legacy.size225,
148
+ height: system.legacy.size.xxxs,
147
149
  transition: 'box-shadow 150ms ease-out',
148
- width: base.legacy.size225,
150
+ width: system.legacy.size.xxxs,
149
151
  pointerEvents: 'none',
150
152
  opacity: system.opacity.full,
151
153
  },
152
154
  '&:hover:before, &.hover:before': {
153
- boxShadow: `0 0 0 ${px2rem(7)} ${system.legacy.color.surface.overlay.hover.default}`,
155
+ boxShadow: `0 0 0 ${px2rem(4)} ${system.legacy.color.surface.overlay.hover.default}`,
154
156
  },
155
157
  },
156
158
  modifiers: {
157
159
  variant: {
158
160
  inverse: {
159
161
  '&:hover:before, &.hover:before': {
160
- boxShadow: `0 0 0 ${px2rem(7)} ${system.legacy.color.surface.overlay.hover.inverse}`,
162
+ boxShadow: `0 0 0 ${px2rem(4)} ${system.legacy.color.surface.overlay.hover.inverse}`,
161
163
  },
162
164
  },
163
165
  },
@@ -1,6 +1,6 @@
1
1
  import {createComponent} from '@workday/canvas-kit-react/common';
2
2
  import {createStencil, handleCsProp, px2rem} from '@workday/canvas-kit-styling';
3
- import {base, system} from '@workday/canvas-tokens-web';
3
+ import {system} from '@workday/canvas-tokens-web';
4
4
 
5
5
  export const switchBackgroundStencil = createStencil({
6
6
  base: {
@@ -10,14 +10,14 @@ export const switchBackgroundStencil = createStencil({
10
10
  pointerEvents: 'none',
11
11
  // This is used in "High Contrast Mode" to show a border on the Switch background.
12
12
  border: `${px2rem(1)} solid transparent`,
13
- height: base.legacy.size225,
13
+ height: system.legacy.size.xxs,
14
14
  // This value is in the spec and there is no token for this size.
15
15
  // calc() does not work inside of cssVar() as the first value.
16
16
  width: px2rem(34),
17
17
  borderRadius: system.legacy.shape.full,
18
- padding: `0 ${px2rem(2)}`,
18
+ padding: `0 ${px2rem(1)}`,
19
19
  transition: 'background-color 200ms ease',
20
- backgroundColor: system.legacy.color.accent.muted.soft,
20
+ backgroundColor: system.legacy.color.accent.muted.default,
21
21
  },
22
22
  });
23
23
 
@@ -1,13 +1,13 @@
1
1
  import {createComponent} from '@workday/canvas-kit-react/common';
2
2
  import {createStencil, handleCsProp, px2rem} from '@workday/canvas-kit-styling';
3
- import {base, system} from '@workday/canvas-tokens-web';
3
+ import {system} from '@workday/canvas-tokens-web';
4
4
 
5
5
  import {SwitchProps} from './Switch';
6
6
 
7
7
  export const switchCircleStencil = createStencil({
8
8
  base: {
9
- width: base.legacy.size150,
10
- height: base.legacy.size150,
9
+ width: system.legacy.size.xxxs,
10
+ height: system.legacy.size.xxxs,
11
11
  borderRadius: system.legacy.shape.full,
12
12
  // This is used in "High Contrast Mode" to show a border on the Switch thumb.
13
13
  border: `${px2rem(1)} solid transparent`,
@@ -20,9 +20,9 @@ export const switchCircleStencil = createStencil({
20
20
  modifiers: {
21
21
  checked: {
22
22
  true: {
23
- transform: `translateX(${px2rem(16)})`,
23
+ transform: `translateX(${px2rem(14)})`,
24
24
  ':dir(rtl)': {
25
- transform: `translateX(${px2rem(-16)})`,
25
+ transform: `translateX(${px2rem(-14)})`,
26
26
  },
27
27
  },
28
28
  },
@@ -1,12 +1,12 @@
1
1
  import {createComponent} from '@workday/canvas-kit-react/common';
2
2
  import {createStencil, handleCsProp, px2rem} from '@workday/canvas-kit-styling';
3
- import {base, system} from '@workday/canvas-tokens-web';
3
+ import {system} from '@workday/canvas-tokens-web';
4
4
 
5
5
  export const switchContainerStencil = createStencil({
6
6
  base: {
7
7
  position: 'relative',
8
8
  marginBlockStart: system.legacy.gap.xs,
9
- height: base.legacy.size225,
9
+ height: system.legacy.size.xxs,
10
10
  // This value is in the spec and there is no token for this size.
11
11
  // calc() does not work inside of cssVar() as the first value.
12
12
  width: px2rem(34),
@@ -13,9 +13,9 @@ export const switchIconStencil = createStencil({
13
13
  position: 'absolute',
14
14
  transition: 'transform 0ms',
15
15
  pointerEvents: 'none',
16
- transform: `translateX(${px2rem(12)})`,
16
+ transform: `translateX(${px2rem(14)})`,
17
17
  ':dir(rtl)': {
18
- transform: `translateX(${px2rem(-12)})`,
18
+ transform: `translateX(${px2rem(-14)})`,
19
19
  },
20
20
  },
21
21
  modifiers: {
@@ -10,7 +10,7 @@ export const switchInputStencil = createStencil({
10
10
  position: 'absolute',
11
11
  // This allows for the input to be the same size as the clickable area for the Switch
12
12
  margin: 0,
13
- height: base.legacy.size225,
13
+ height: system.legacy.size.xs,
14
14
  // This value is in the spec and there is no token for this size.
15
15
  // calc() does not work inside of cssVar() as the first value.
16
16
  width: px2rem(34),
@@ -23,7 +23,7 @@ export const switchInputStencil = createStencil({
23
23
  },
24
24
  '&:checked, &.checked': {
25
25
  '& ~ div:first-of-type': {
26
- backgroundColor: system.legacy.color.brand.accent.primary,
26
+ backgroundColor: system.legacy.color.brand.accent.positive,
27
27
  },
28
28
  '&:disabled, &.disabled': {
29
29
  '& ~ div:first-of-type': {