@workday/canvas-kit-preview-react 14.0.0-alpha.1168-next.0 → 14.0.0-alpha.1171-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.
- package/dist/commonjs/color-picker/lib/ColorPicker.js +2 -2
- package/dist/commonjs/color-picker/lib/parts/ColorReset.js +2 -2
- package/dist/commonjs/color-picker/lib/parts/SwatchBook.js +2 -2
- package/dist/commonjs/divider/lib/Divider.js +2 -2
- package/dist/commonjs/information-highlight/lib/InformationHighlight.js +8 -8
- package/dist/commonjs/information-highlight/lib/parts/Body.js +2 -2
- package/dist/commonjs/information-highlight/lib/parts/Heading.js +2 -2
- package/dist/commonjs/information-highlight/lib/parts/Link.js +2 -2
- package/dist/commonjs/loading-sparkles/lib/LoadingSparkles.js +3 -3
- package/dist/commonjs/multi-select/lib/MultiSelectInput.d.ts +22 -16
- package/dist/commonjs/multi-select/lib/MultiSelectInput.d.ts.map +1 -1
- package/dist/commonjs/multi-select/lib/MultiSelectInput.js +4 -4
- package/dist/commonjs/pill/lib/Pill.js +6 -6
- package/dist/commonjs/pill/lib/PillAvatar.js +2 -2
- package/dist/commonjs/pill/lib/PillCount.js +2 -2
- package/dist/commonjs/pill/lib/PillIcon.js +2 -2
- package/dist/commonjs/pill/lib/PillIconButton.js +2 -2
- package/dist/commonjs/pill/lib/PillLabel.js +2 -2
- package/dist/commonjs/radio/lib/RadioGroup.d.ts.map +1 -1
- package/dist/commonjs/radio/lib/RadioGroup.js +4 -4
- package/dist/commonjs/radio/lib/RadioLabel.js +2 -2
- package/dist/commonjs/radio/lib/RadioText.js +5 -5
- package/dist/commonjs/radio/lib/StyledRadioButton.js +7 -7
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.js +17 -17
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.js +5 -5
- package/dist/commonjs/side-panel/lib/SidePanel.js +8 -8
- package/dist/commonjs/side-panel/lib/SidePanelToggleButton.js +12 -12
- package/dist/commonjs/status-indicator/lib/StatusIndicator.js +14 -14
- package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.js +2 -2
- package/dist/commonjs/text-input/lib/TextInputField.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/TextInputField.js +14 -25
- package/dist/es6/color-picker/lib/ColorPicker.js +2 -2
- package/dist/es6/color-picker/lib/parts/ColorReset.js +2 -2
- package/dist/es6/color-picker/lib/parts/SwatchBook.js +2 -2
- package/dist/es6/divider/lib/Divider.js +2 -2
- package/dist/es6/information-highlight/lib/InformationHighlight.js +8 -8
- package/dist/es6/information-highlight/lib/parts/Body.js +2 -2
- package/dist/es6/information-highlight/lib/parts/Heading.js +2 -2
- package/dist/es6/information-highlight/lib/parts/Link.js +2 -2
- package/dist/es6/loading-sparkles/lib/LoadingSparkles.js +3 -3
- package/dist/es6/multi-select/lib/MultiSelectInput.d.ts +22 -16
- package/dist/es6/multi-select/lib/MultiSelectInput.d.ts.map +1 -1
- package/dist/es6/multi-select/lib/MultiSelectInput.js +4 -4
- package/dist/es6/pill/lib/Pill.js +6 -6
- package/dist/es6/pill/lib/PillAvatar.js +2 -2
- package/dist/es6/pill/lib/PillCount.js +2 -2
- package/dist/es6/pill/lib/PillIcon.js +2 -2
- package/dist/es6/pill/lib/PillIconButton.js +2 -2
- package/dist/es6/pill/lib/PillLabel.js +2 -2
- package/dist/es6/radio/lib/RadioGroup.d.ts.map +1 -1
- package/dist/es6/radio/lib/RadioGroup.js +4 -4
- package/dist/es6/radio/lib/RadioLabel.js +2 -2
- package/dist/es6/radio/lib/RadioText.js +5 -5
- package/dist/es6/radio/lib/StyledRadioButton.js +7 -7
- package/dist/es6/segmented-control/lib/SegmentedControlItem.js +17 -17
- package/dist/es6/segmented-control/lib/SegmentedControlList.js +5 -5
- package/dist/es6/side-panel/lib/SidePanel.js +8 -8
- package/dist/es6/side-panel/lib/SidePanelToggleButton.js +12 -12
- package/dist/es6/status-indicator/lib/StatusIndicator.js +14 -14
- package/dist/es6/status-indicator/lib/StatusIndicatorLabel.js +2 -2
- package/dist/es6/text-input/lib/TextInputField.d.ts.map +1 -1
- package/dist/es6/text-input/lib/TextInputField.js +14 -25
- package/multi-select/lib/MultiSelectInput.tsx +12 -9
- package/package.json +4 -4
- package/radio/lib/RadioGroup.tsx +5 -3
- package/text-input/lib/TextInputField.tsx +45 -39
|
@@ -26,7 +26,7 @@ export const multiSelectInputStencil = createStencil({
|
|
|
26
26
|
display: 'flex',
|
|
27
27
|
flexDirection: 'column',
|
|
28
28
|
backgroundColor: system.color.bg.default,
|
|
29
|
-
borderRadius: system.shape.
|
|
29
|
+
borderRadius: system.shape.x1Half,
|
|
30
30
|
boxSizing: 'border-box',
|
|
31
31
|
minHeight: system.space.x10,
|
|
32
32
|
transition: '0.2s box-shadow, 0.2s border-color',
|
|
@@ -100,28 +100,31 @@ export const multiSelectInputStencil = createStencil({
|
|
|
100
100
|
modifiers: {
|
|
101
101
|
error: {
|
|
102
102
|
error: {
|
|
103
|
-
borderColor: brand.
|
|
104
|
-
boxShadow: `inset 0 0 0 ${px2rem(1)} ${brand.
|
|
103
|
+
borderColor: brand.common.errorInner,
|
|
104
|
+
boxShadow: `inset 0 0 0 ${px2rem(1)} ${brand.common.errorInner}`,
|
|
105
|
+
backgroundColor: brand.error.lightest,
|
|
105
106
|
'&:has(:hover, :disabled, :focus-visible), &:is(.hover, .disabled, .focus)': {
|
|
106
|
-
borderColor: brand.
|
|
107
|
+
borderColor: brand.common.errorInner,
|
|
107
108
|
},
|
|
108
109
|
'&:has(:focus-visible:not([disabled])), &.focus': {
|
|
109
|
-
|
|
110
|
+
borderColor: brand.common.errorInner,
|
|
111
|
+
boxShadow: `inset 0 0 0 ${px2rem(1)} ${brand.common.errorInner}, 0 0 0 2px ${
|
|
110
112
|
system.color.border.inverse
|
|
111
113
|
}, 0 0 0 4px ${brand.common.focusOutline}`,
|
|
112
114
|
outlineOffset: px2rem(2),
|
|
113
115
|
},
|
|
114
116
|
},
|
|
115
117
|
alert: {
|
|
116
|
-
borderColor: brand.
|
|
117
|
-
boxShadow: `inset 0 0 0 ${px2rem(2)} ${brand.
|
|
118
|
+
borderColor: brand.common.alertOuter,
|
|
119
|
+
boxShadow: `inset 0 0 0 ${px2rem(2)} ${brand.common.alertInner}`,
|
|
120
|
+
backgroundColor: brand.alert.lightest,
|
|
118
121
|
'&:has(:hover, .hover, :disabled, .disabled, :focus-visible:not([disabled])), .focus:not(:has([disabled]))':
|
|
119
122
|
{
|
|
120
|
-
borderColor: brand.
|
|
123
|
+
borderColor: brand.common.alertOuter,
|
|
121
124
|
},
|
|
122
125
|
|
|
123
126
|
'&:has(:focus-visible, .focus):not(:has([disabled]))': {
|
|
124
|
-
boxShadow: `inset 0 0 0 ${px2rem(2)} ${brand.
|
|
127
|
+
boxShadow: `inset 0 0 0 ${px2rem(2)} ${brand.common.alertInner},
|
|
125
128
|
0 0 0 2px ${system.color.border.inverse},
|
|
126
129
|
0 0 0 4px ${brand.common.focusOutline}`,
|
|
127
130
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-preview-react",
|
|
3
|
-
"version": "14.0.0-alpha.
|
|
3
|
+
"version": "14.0.0-alpha.1171-next.0",
|
|
4
4
|
"description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@emotion/react": "^11.7.1",
|
|
48
48
|
"@emotion/styled": "^11.6.0",
|
|
49
|
-
"@workday/canvas-kit-react": "^14.0.0-alpha.
|
|
50
|
-
"@workday/canvas-kit-styling": "^14.0.0-alpha.
|
|
49
|
+
"@workday/canvas-kit-react": "^14.0.0-alpha.1171-next.0",
|
|
50
|
+
"@workday/canvas-kit-styling": "^14.0.0-alpha.1171-next.0",
|
|
51
51
|
"@workday/canvas-system-icons-web": "^3.0.35",
|
|
52
52
|
"@workday/canvas-tokens-web": "3.0.0-alpha.5",
|
|
53
53
|
"@workday/design-assets-types": "^0.2.10"
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"react-hook-form": "7.36.1",
|
|
59
59
|
"yup": "^0.32.11"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "585934cc7f7bf81c6c86c75f7c3966368a3e1ca8"
|
|
62
62
|
}
|
package/radio/lib/RadioGroup.tsx
CHANGED
|
@@ -20,7 +20,7 @@ const radioGroupStencil = createStencil({
|
|
|
20
20
|
base: {
|
|
21
21
|
display: 'flex',
|
|
22
22
|
flexDirection: 'column',
|
|
23
|
-
borderRadius: system.shape.
|
|
23
|
+
borderRadius: system.shape.x1Half,
|
|
24
24
|
gap: system.space.x2,
|
|
25
25
|
padding: `${px2rem(10)} ${system.space.x3} ${system.space.x2}`,
|
|
26
26
|
margin: `0 ${calc.negate(system.space.x3)}`,
|
|
@@ -31,10 +31,12 @@ const radioGroupStencil = createStencil({
|
|
|
31
31
|
error: {
|
|
32
32
|
error: {
|
|
33
33
|
boxShadow: `inset 0 0 0 ${px2rem(2)} ${brand.error.base}`,
|
|
34
|
+
backgroundColor: brand.error.lightest,
|
|
34
35
|
},
|
|
35
36
|
alert: {
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
backgroundColor: brand.alert.lightest,
|
|
38
|
+
boxShadow: `inset 0 0 0 ${px2rem(1)} ${brand.common.alertInner}, inset 0 0 0 ${px2rem(3)} ${
|
|
39
|
+
brand.common.alertOuter
|
|
38
40
|
}`,
|
|
39
41
|
},
|
|
40
42
|
},
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
borderRadius,
|
|
3
|
-
colors,
|
|
4
|
-
CSSProperties,
|
|
5
|
-
inputColors,
|
|
6
|
-
space,
|
|
7
|
-
type,
|
|
8
|
-
} from '@workday/canvas-kit-react/tokens';
|
|
9
1
|
import {
|
|
10
2
|
createSubcomponent,
|
|
11
3
|
ExtractProps,
|
|
@@ -13,32 +5,56 @@ import {
|
|
|
13
5
|
useThemedRing,
|
|
14
6
|
} from '@workday/canvas-kit-react/common';
|
|
15
7
|
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
8
|
+
import {brand, system} from '@workday/canvas-tokens-web';
|
|
9
|
+
import {createStencil, cssVar, px2rem} from '@workday/canvas-kit-styling';
|
|
10
|
+
import {mergeStyles} from '@workday/canvas-kit-react/layout';
|
|
16
11
|
|
|
17
12
|
import {useTextInputField, useTextInputModel} from './hooks';
|
|
18
13
|
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
backgroundColor: inputColors.disabled.background,
|
|
32
|
-
borderColor: colors.licorice100,
|
|
33
|
-
color: inputColors.disabled.text,
|
|
14
|
+
const textInputFieldStencil = createStencil({
|
|
15
|
+
base: {
|
|
16
|
+
...system.type.subtext.large,
|
|
17
|
+
transition: '0.2s box-shadow, 0.2s border-color',
|
|
18
|
+
border: `${px2rem(1)} solid ${cssVar(system.color.border.input.default)}`,
|
|
19
|
+
padding: system.space.x2,
|
|
20
|
+
margin: 0,
|
|
21
|
+
display: 'block',
|
|
22
|
+
height: system.space.x10,
|
|
23
|
+
minWidth: px2rem(280),
|
|
24
|
+
borderRadius: system.shape.x1,
|
|
25
|
+
backgroundColor: system.color.bg.default,
|
|
34
26
|
'&::placeholder': {
|
|
35
|
-
color:
|
|
27
|
+
color: system.color.text.default,
|
|
28
|
+
},
|
|
29
|
+
'&:hover': {
|
|
30
|
+
borderColor: system.color.border.input.strong,
|
|
31
|
+
},
|
|
32
|
+
'&:focus:not([disabled])': {
|
|
33
|
+
outline: 'none',
|
|
34
|
+
},
|
|
35
|
+
'&:disabled': {
|
|
36
|
+
backgroundColor: system.color.bg.alt.softer,
|
|
37
|
+
borderColor: system.color.border.input.disabled,
|
|
38
|
+
color: system.color.fg.disabled,
|
|
39
|
+
'&::placeholder': {
|
|
40
|
+
color: system.color.fg.disabled,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
'::-ms-clear': {
|
|
44
|
+
display: 'none',
|
|
36
45
|
},
|
|
37
46
|
},
|
|
38
|
-
|
|
39
|
-
|
|
47
|
+
modifiers: {
|
|
48
|
+
error: {
|
|
49
|
+
error: {
|
|
50
|
+
backgroundColor: brand.error.lightest,
|
|
51
|
+
},
|
|
52
|
+
alert: {
|
|
53
|
+
backgroundColor: brand.alert.lightest,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
40
56
|
},
|
|
41
|
-
};
|
|
57
|
+
});
|
|
42
58
|
|
|
43
59
|
/**
|
|
44
60
|
* @deprecated ⚠️ `TextInputField` in Preview has been deprecated and will be removed in a future major version. Please use [`FormField` in Preview](https://workday.github.io/canvas-kit/?path=/story/preview-inputs-form-field--basic) instead.
|
|
@@ -60,21 +76,11 @@ export const TextInputField = createSubcomponent('input')({
|
|
|
60
76
|
boxShadow: `inset 0 0 0 1px ${theme.canvas.palette.common.focusOutline}`,
|
|
61
77
|
},
|
|
62
78
|
};
|
|
63
|
-
|
|
79
|
+
console.log(model.state.error);
|
|
64
80
|
return (
|
|
65
81
|
<FormField.Input
|
|
66
82
|
as="input"
|
|
67
|
-
{...
|
|
68
|
-
cs={[baseStyles, focusStyles]}
|
|
69
|
-
padding={space.xxs}
|
|
70
|
-
margin={0}
|
|
71
|
-
display="block"
|
|
72
|
-
height="40px"
|
|
73
|
-
minWidth="280px"
|
|
74
|
-
border={`1px solid ${inputColors.border}`}
|
|
75
|
-
backgroundColor={inputColors.background}
|
|
76
|
-
borderRadius={borderRadius.m}
|
|
77
|
-
{...elemProps}
|
|
83
|
+
{...mergeStyles(elemProps, [textInputFieldStencil({error: model.state.error}), focusStyles])}
|
|
78
84
|
/>
|
|
79
85
|
);
|
|
80
86
|
});
|