@workday/canvas-kit-react 14.0.0-alpha.1237-next.0 → 14.0.0-alpha.1238-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/checkbox/lib/CheckBackground.tsx +1 -1
- package/common/lib/styles/errorRing.ts +2 -2
- package/common/lib/theming/README.md +1 -1
- package/common/lib/types.ts +1 -1
- package/dist/commonjs/checkbox/lib/CheckBackground.d.ts +1 -1
- package/dist/commonjs/checkbox/lib/CheckBackground.js +1 -1
- package/dist/commonjs/common/lib/styles/errorRing.js +2 -2
- package/dist/commonjs/common/lib/types.d.ts +1 -1
- package/dist/commonjs/common/lib/types.d.ts.map +1 -1
- package/dist/commonjs/common/lib/types.js +1 -1
- package/dist/commonjs/form-field/lib/FormField.d.ts +7 -7
- package/dist/commonjs/form-field/lib/FormFieldContainer.d.ts +1 -1
- package/dist/commonjs/form-field/lib/FormFieldField.d.ts +1 -1
- package/dist/commonjs/form-field/lib/FormFieldGroup.d.ts +7 -7
- package/dist/commonjs/form-field/lib/FormFieldGroupInput.d.ts +2 -2
- package/dist/commonjs/form-field/lib/FormFieldGroupLabel.d.ts +1 -1
- package/dist/commonjs/form-field/lib/FormFieldGroupList.d.ts +1 -1
- package/dist/commonjs/form-field/lib/FormFieldGroupList.js +1 -1
- package/dist/commonjs/form-field/lib/FormFieldHint.d.ts +2 -2
- package/dist/commonjs/form-field/lib/FormFieldHint.js +1 -1
- package/dist/commonjs/form-field/lib/FormFieldInput.d.ts +1 -1
- package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +1 -1
- package/dist/commonjs/form-field/lib/formFieldStencil.d.ts +1 -1
- package/dist/commonjs/form-field/lib/formFieldStencil.js +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +2 -2
- package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +1 -4
- package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts +10 -10
- package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.js +1 -1
- package/dist/commonjs/select/lib/SelectInput.d.ts +1 -1
- package/dist/commonjs/select/lib/SelectInput.js +1 -1
- package/dist/commonjs/switch/lib/Switch.js +6 -6
- package/dist/commonjs/text-area/lib/TextArea.d.ts +1 -1
- package/dist/commonjs/text-input/lib/TextInput.d.ts +1 -1
- package/dist/commonjs/text-input/lib/TextInput.js +1 -1
- package/dist/es6/checkbox/lib/CheckBackground.d.ts +1 -1
- package/dist/es6/checkbox/lib/CheckBackground.js +1 -1
- package/dist/es6/common/lib/styles/errorRing.js +2 -2
- package/dist/es6/common/lib/types.d.ts +1 -1
- package/dist/es6/common/lib/types.d.ts.map +1 -1
- package/dist/es6/common/lib/types.js +1 -1
- package/dist/es6/form-field/lib/FormField.d.ts +7 -7
- package/dist/es6/form-field/lib/FormFieldContainer.d.ts +1 -1
- package/dist/es6/form-field/lib/FormFieldField.d.ts +1 -1
- package/dist/es6/form-field/lib/FormFieldGroup.d.ts +7 -7
- package/dist/es6/form-field/lib/FormFieldGroupInput.d.ts +2 -2
- package/dist/es6/form-field/lib/FormFieldGroupLabel.d.ts +1 -1
- package/dist/es6/form-field/lib/FormFieldGroupList.d.ts +1 -1
- package/dist/es6/form-field/lib/FormFieldGroupList.js +1 -1
- package/dist/es6/form-field/lib/FormFieldHint.d.ts +2 -2
- package/dist/es6/form-field/lib/FormFieldHint.js +1 -1
- package/dist/es6/form-field/lib/FormFieldInput.d.ts +1 -1
- package/dist/es6/form-field/lib/FormFieldLabel.d.ts +1 -1
- package/dist/es6/form-field/lib/formFieldStencil.d.ts +1 -1
- package/dist/es6/form-field/lib/formFieldStencil.js +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts +2 -2
- package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts +1 -4
- package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts +10 -10
- package/dist/es6/form-field/lib/hooks/useFormFieldModel.js +1 -1
- package/dist/es6/select/lib/SelectInput.d.ts +1 -1
- package/dist/es6/select/lib/SelectInput.js +1 -1
- package/dist/es6/switch/lib/Switch.js +6 -6
- package/dist/es6/text-area/lib/TextArea.d.ts +1 -1
- package/dist/es6/text-input/lib/TextInput.d.ts +1 -1
- package/dist/es6/text-input/lib/TextInput.js +1 -1
- package/form-field/lib/FormFieldGroupList.tsx +1 -1
- package/form-field/lib/FormFieldHint.tsx +1 -1
- package/form-field/lib/formFieldStencil.ts +1 -1
- package/form-field/lib/hooks/useFormFieldModel.tsx +2 -2
- package/package.json +4 -4
- package/select/lib/SelectInput.tsx +1 -1
- package/switch/lib/Switch.tsx +1 -1
- package/text-input/lib/TextInput.tsx +1 -1
|
@@ -17,7 +17,7 @@ export function getErrorColors(error, theme) {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
else if (error === ErrorType.
|
|
20
|
+
else if (error === ErrorType.Caution) {
|
|
21
21
|
if (theme) {
|
|
22
22
|
const palette = theme.canvas.palette;
|
|
23
23
|
return {
|
|
@@ -37,7 +37,7 @@ export function getErrorColors(error, theme) {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
export function errorRing(error, theme) {
|
|
40
|
-
if (error !== ErrorType.Error && error !== ErrorType.
|
|
40
|
+
if (error !== ErrorType.Error && error !== ErrorType.Caution) {
|
|
41
41
|
return {};
|
|
42
42
|
}
|
|
43
43
|
const errorColors = getErrorColors(error, theme);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../common/lib/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACxC,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;CACvC;AAED;;GAEG;AACH,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../common/lib/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACxC,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;CACvC;AAED;;GAEG;AACH,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,GAAG,SAAS,MAAM,CAAC,EAAE,IAAI,SAAS,MAAM,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,GAC7F,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC"}
|
|
@@ -23,14 +23,14 @@ export interface FormFieldProps extends FlexProps, GrowthBehavior {
|
|
|
23
23
|
* @stencil formFieldStencil
|
|
24
24
|
*/
|
|
25
25
|
export declare const FormField: import("@workday/canvas-kit-react/common").ElementComponentM<"div", FormFieldProps & Partial<{
|
|
26
|
-
error: "error" | "
|
|
26
|
+
error: "error" | "caution" | undefined;
|
|
27
27
|
id: string;
|
|
28
28
|
isRequired: boolean;
|
|
29
29
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
30
30
|
}> & {} & {}, {
|
|
31
31
|
state: {
|
|
32
32
|
id: string;
|
|
33
|
-
error: "error" | "
|
|
33
|
+
error: "error" | "caution" | undefined;
|
|
34
34
|
isRequired: boolean;
|
|
35
35
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
36
36
|
};
|
|
@@ -52,7 +52,7 @@ export declare const FormField: import("@workday/canvas-kit-react/common").Eleme
|
|
|
52
52
|
Input: import("@workday/canvas-kit-react/common").ElementComponentM<"input", import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & import("@workday/canvas-kit-styling").CSProps, {
|
|
53
53
|
state: {
|
|
54
54
|
id: string;
|
|
55
|
-
error: "error" | "
|
|
55
|
+
error: "error" | "caution" | undefined;
|
|
56
56
|
isRequired: boolean;
|
|
57
57
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
58
58
|
};
|
|
@@ -73,7 +73,7 @@ export declare const FormField: import("@workday/canvas-kit-react/common").Eleme
|
|
|
73
73
|
Label: import("@workday/canvas-kit-react/common").ElementComponentM<"label", import("./FormFieldLabel").FormFieldLabelProps, {
|
|
74
74
|
state: {
|
|
75
75
|
id: string;
|
|
76
|
-
error: "error" | "
|
|
76
|
+
error: "error" | "caution" | undefined;
|
|
77
77
|
isRequired: boolean;
|
|
78
78
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
79
79
|
};
|
|
@@ -96,7 +96,7 @@ export declare const FormField: import("@workday/canvas-kit-react/common").Eleme
|
|
|
96
96
|
Hint: import("@workday/canvas-kit-react/common").ElementComponentM<"p", import("../..").TextProps, {
|
|
97
97
|
state: {
|
|
98
98
|
id: string;
|
|
99
|
-
error: "error" | "
|
|
99
|
+
error: "error" | "caution" | undefined;
|
|
100
100
|
isRequired: boolean;
|
|
101
101
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
102
102
|
};
|
|
@@ -121,7 +121,7 @@ export declare const FormField: import("@workday/canvas-kit-react/common").Eleme
|
|
|
121
121
|
Container: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("@workday/canvas-kit-styling").CSProps, {
|
|
122
122
|
state: {
|
|
123
123
|
id: string;
|
|
124
|
-
error: "error" | "
|
|
124
|
+
error: "error" | "caution" | undefined;
|
|
125
125
|
isRequired: boolean;
|
|
126
126
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
127
127
|
};
|
|
@@ -142,7 +142,7 @@ export declare const FormField: import("@workday/canvas-kit-react/common").Eleme
|
|
|
142
142
|
Field: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("@workday/canvas-kit-styling").CSProps, {
|
|
143
143
|
state: {
|
|
144
144
|
id: string;
|
|
145
|
-
error: "error" | "
|
|
145
|
+
error: "error" | "caution" | undefined;
|
|
146
146
|
isRequired: boolean;
|
|
147
147
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
148
148
|
};
|
|
@@ -9,7 +9,7 @@ export declare const formFieldContainerStencil: import("@workday/canvas-kit-styl
|
|
|
9
9
|
export declare const FormFieldContainer: import("@workday/canvas-kit-react/common").ElementComponentM<"div", CSProps, {
|
|
10
10
|
state: {
|
|
11
11
|
id: string;
|
|
12
|
-
error: "error" | "
|
|
12
|
+
error: "error" | "caution" | undefined;
|
|
13
13
|
isRequired: boolean;
|
|
14
14
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
15
15
|
};
|
|
@@ -3,7 +3,7 @@ export declare const formFieldFieldStencil: import("@workday/canvas-kit-styling"
|
|
|
3
3
|
export declare const FormFieldField: import("@workday/canvas-kit-react/common").ElementComponentM<"div", CSProps, {
|
|
4
4
|
state: {
|
|
5
5
|
id: string;
|
|
6
|
-
error: "error" | "
|
|
6
|
+
error: "error" | "caution" | undefined;
|
|
7
7
|
isRequired: boolean;
|
|
8
8
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
9
9
|
};
|
|
@@ -27,14 +27,14 @@ export interface FormFieldGroupProps extends FlexProps, GrowthBehavior {
|
|
|
27
27
|
* @stencil formFieldStencil
|
|
28
28
|
*/
|
|
29
29
|
export declare const FormFieldGroup: import("@workday/canvas-kit-react/common").ElementComponentM<"div", FormFieldGroupProps & Partial<{
|
|
30
|
-
error: "error" | "
|
|
30
|
+
error: "error" | "caution" | undefined;
|
|
31
31
|
id: string;
|
|
32
32
|
isRequired: boolean;
|
|
33
33
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
34
34
|
}> & {} & {}, {
|
|
35
35
|
state: {
|
|
36
36
|
id: string;
|
|
37
|
-
error: "error" | "
|
|
37
|
+
error: "error" | "caution" | undefined;
|
|
38
38
|
isRequired: boolean;
|
|
39
39
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
40
40
|
};
|
|
@@ -59,7 +59,7 @@ export declare const FormFieldGroup: import("@workday/canvas-kit-react/common").
|
|
|
59
59
|
Input: import("@workday/canvas-kit-react/common").ElementComponentM<"input", import("./FormFieldGroupInput").FormFieldGroupInputProps, {
|
|
60
60
|
state: {
|
|
61
61
|
id: string;
|
|
62
|
-
error: "error" | "
|
|
62
|
+
error: "error" | "caution" | undefined;
|
|
63
63
|
isRequired: boolean;
|
|
64
64
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
65
65
|
};
|
|
@@ -80,7 +80,7 @@ export declare const FormFieldGroup: import("@workday/canvas-kit-react/common").
|
|
|
80
80
|
Label: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("./FormFieldGroupLabel").FormFieldGroupLabelProps, {
|
|
81
81
|
state: {
|
|
82
82
|
id: string;
|
|
83
|
-
error: "error" | "
|
|
83
|
+
error: "error" | "caution" | undefined;
|
|
84
84
|
isRequired: boolean;
|
|
85
85
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
86
86
|
};
|
|
@@ -92,7 +92,7 @@ export declare const FormFieldGroup: import("@workday/canvas-kit-react/common").
|
|
|
92
92
|
List: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("./FormFieldGroupList").FormFieldGroupListProps, {
|
|
93
93
|
state: {
|
|
94
94
|
id: string;
|
|
95
|
-
error: "error" | "
|
|
95
|
+
error: "error" | "caution" | undefined;
|
|
96
96
|
isRequired: boolean;
|
|
97
97
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
98
98
|
};
|
|
@@ -116,7 +116,7 @@ export declare const FormFieldGroup: import("@workday/canvas-kit-react/common").
|
|
|
116
116
|
Hint: import("@workday/canvas-kit-react/common").ElementComponentM<"p", import("../..").TextProps, {
|
|
117
117
|
state: {
|
|
118
118
|
id: string;
|
|
119
|
-
error: "error" | "
|
|
119
|
+
error: "error" | "caution" | undefined;
|
|
120
120
|
isRequired: boolean;
|
|
121
121
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
122
122
|
};
|
|
@@ -142,7 +142,7 @@ export declare const FormFieldGroup: import("@workday/canvas-kit-react/common").
|
|
|
142
142
|
Field: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("@workday/canvas-kit-styling").CSProps, {
|
|
143
143
|
state: {
|
|
144
144
|
id: string;
|
|
145
|
-
error: "error" | "
|
|
145
|
+
error: "error" | "caution" | undefined;
|
|
146
146
|
isRequired: boolean;
|
|
147
147
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
148
148
|
};
|
|
@@ -7,7 +7,7 @@ export interface FormFieldGroupInputProps extends CSProps {
|
|
|
7
7
|
export declare const useFormFieldGroupInput: import("@workday/canvas-kit-react/common").BehaviorHook<{
|
|
8
8
|
state: {
|
|
9
9
|
id: string;
|
|
10
|
-
error: "error" | "
|
|
10
|
+
error: "error" | "caution" | undefined;
|
|
11
11
|
isRequired: boolean;
|
|
12
12
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
13
13
|
};
|
|
@@ -20,7 +20,7 @@ export declare const useFormFieldGroupInput: import("@workday/canvas-kit-react/c
|
|
|
20
20
|
export declare const FormFieldGroupInput: import("@workday/canvas-kit-react/common").ElementComponentM<"input", FormFieldGroupInputProps, {
|
|
21
21
|
state: {
|
|
22
22
|
id: string;
|
|
23
|
-
error: "error" | "
|
|
23
|
+
error: "error" | "caution" | undefined;
|
|
24
24
|
isRequired: boolean;
|
|
25
25
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
26
26
|
};
|
|
@@ -114,7 +114,7 @@ export declare const formFieldGroupLabelStencil: import("@workday/canvas-kit-sty
|
|
|
114
114
|
export declare const FormFieldGroupLabel: import("@workday/canvas-kit-react/common").ElementComponentM<"div", FormFieldGroupLabelProps, {
|
|
115
115
|
state: {
|
|
116
116
|
id: string;
|
|
117
|
-
error: "error" | "
|
|
117
|
+
error: "error" | "caution" | undefined;
|
|
118
118
|
isRequired: boolean;
|
|
119
119
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
120
120
|
};
|
|
@@ -5,7 +5,7 @@ export interface FormFieldGroupListProps extends CSProps, FlexProps {
|
|
|
5
5
|
export declare const FormFieldGroupList: import("@workday/canvas-kit-react/common").ElementComponentM<"div", FormFieldGroupListProps, {
|
|
6
6
|
state: {
|
|
7
7
|
id: string;
|
|
8
|
-
error: "error" | "
|
|
8
|
+
error: "error" | "caution" | undefined;
|
|
9
9
|
isRequired: boolean;
|
|
10
10
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
11
11
|
};
|
|
@@ -8,7 +8,7 @@ const formFieldGroupListStencil = createStencil({
|
|
|
8
8
|
modifiers: {
|
|
9
9
|
error: {
|
|
10
10
|
error: { name: "2yydnm", styles: "background-color:var(--cnvs-brand-error-lightest);box-shadow:inset 0 0 0 0.125rem var(--cnvs-brand-common-error-inner);" },
|
|
11
|
-
|
|
11
|
+
caution: { name: "476kge", styles: "background-color:var(--cnvs-brand-alert-lightest);box-shadow:inset 0 0 0 0.0625rem var(--cnvs-brand-common-alert-outer), inset 0 0 0 0.1875rem var(--cnvs-brand-common-alert-inner);" }
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}, "form-field-group-list-9f0751");
|
|
@@ -3,7 +3,7 @@ export declare const formFieldHintStencil: import("@workday/canvas-kit-styling")
|
|
|
3
3
|
error: {
|
|
4
4
|
color: "--cnvs-brand-error-base";
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
caution: {
|
|
7
7
|
color: "--cnvs-sys-color-text-caution-default";
|
|
8
8
|
};
|
|
9
9
|
};
|
|
@@ -113,7 +113,7 @@ export declare const formFieldHintStencil: import("@workday/canvas-kit-styling")
|
|
|
113
113
|
export declare const FormFieldHint: import("@workday/canvas-kit-react/common").ElementComponentM<"p", import("@workday/canvas-kit-react/text").TextProps, {
|
|
114
114
|
state: {
|
|
115
115
|
id: string;
|
|
116
|
-
error: "error" | "
|
|
116
|
+
error: "error" | "caution" | undefined;
|
|
117
117
|
isRequired: boolean;
|
|
118
118
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
119
119
|
};
|
|
@@ -11,7 +11,7 @@ export const formFieldHintStencil = createStencil({
|
|
|
11
11
|
modifiers: {
|
|
12
12
|
error: {
|
|
13
13
|
error: { name: "3fnxnx", styles: "color:var(--cnvs-brand-error-base);" },
|
|
14
|
-
|
|
14
|
+
caution: { name: "138w19", styles: "color:var(--cnvs-sys-color-text-caution-default);" }
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
defaultModifiers: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const FormFieldInput: import("@workday/canvas-kit-react/common").ElementComponentM<"input", import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & import("@workday/canvas-kit-styling").CSProps, {
|
|
2
2
|
state: {
|
|
3
3
|
id: string;
|
|
4
|
-
error: "error" | "
|
|
4
|
+
error: "error" | "caution" | undefined;
|
|
5
5
|
isRequired: boolean;
|
|
6
6
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
7
7
|
};
|
|
@@ -118,7 +118,7 @@ export declare const formFieldLabelStencil: import("@workday/canvas-kit-styling"
|
|
|
118
118
|
export declare const FormFieldLabel: import("@workday/canvas-kit-react/common").ElementComponentM<"label", FormFieldLabelProps, {
|
|
119
119
|
state: {
|
|
120
120
|
id: string;
|
|
121
|
-
error: "error" | "
|
|
121
|
+
error: "error" | "caution" | undefined;
|
|
122
122
|
isRequired: boolean;
|
|
123
123
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
124
124
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
export declare const useFormFieldHint: import("@workday/canvas-kit-react/common").BehaviorHook<{
|
|
6
6
|
state: {
|
|
7
7
|
id: string;
|
|
8
|
-
error: "error" | "
|
|
8
|
+
error: "error" | "caution" | undefined;
|
|
9
9
|
isRequired: boolean;
|
|
10
10
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
11
11
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
export declare const useFormFieldInput: import("@workday/canvas-kit-react/common").BehaviorHook<{
|
|
6
6
|
state: {
|
|
7
7
|
id: string;
|
|
8
|
-
error: "error" | "
|
|
8
|
+
error: "error" | "caution" | undefined;
|
|
9
9
|
isRequired: boolean;
|
|
10
10
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
11
11
|
};
|
|
@@ -22,6 +22,6 @@ export declare const useFormFieldInput: import("@workday/canvas-kit-react/common
|
|
|
22
22
|
* Provide an `id` to link the input via the `for` attribute on a `label`
|
|
23
23
|
*/
|
|
24
24
|
readonly id: string | undefined;
|
|
25
|
-
readonly error: "error" | "
|
|
25
|
+
readonly error: "error" | "caution" | undefined;
|
|
26
26
|
}>;
|
|
27
27
|
//# sourceMappingURL=useFormFieldInput.d.ts.map
|
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
export declare const useFormFieldLabel: import("@workday/canvas-kit-react/common").BehaviorHook<{
|
|
6
6
|
state: {
|
|
7
7
|
id: string;
|
|
8
|
-
error: "error" | "
|
|
9
|
-
* Provide an `id` attribute for `id/aria-labelledby` links between the label and any other
|
|
10
|
-
* element
|
|
11
|
-
*/
|
|
8
|
+
error: "error" | "caution" | undefined;
|
|
12
9
|
isRequired: boolean;
|
|
13
10
|
orientation: "vertical" | "horizontalEnd" | "horizontalStart";
|
|
14
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldLabel.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"useFormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldLabel.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;IAE1B;;OAEG;;IAEH;;;OAGG;;EAGL,CAAC"}
|
|
@@ -2,9 +2,9 @@ export declare const useFormFieldModel: (<TT_Special_Generic>(config?: (Partial<
|
|
|
2
2
|
/**
|
|
3
3
|
* Optional flag to denote if this field has an error or warning to display.
|
|
4
4
|
* If value is `error`: `aria-invalid` is added to the `FormField.Input` and the red error ring is added.
|
|
5
|
-
* If value is `
|
|
5
|
+
* If value is `cautiion`: A visual orange warning ring is added to the `FormField.Input`.
|
|
6
6
|
*/
|
|
7
|
-
error: "error" | "
|
|
7
|
+
error: "error" | "caution" | undefined;
|
|
8
8
|
/**
|
|
9
9
|
* Optional `id` provided to `FormField`'s subcomponents as HTML attributes:
|
|
10
10
|
* - `FormField.Input` will set `aria-describedby` to `hint-${id}`
|
|
@@ -28,9 +28,9 @@ export declare const useFormFieldModel: (<TT_Special_Generic>(config?: (Partial<
|
|
|
28
28
|
/**
|
|
29
29
|
* Optional flag to denote if this field has an error or warning to display.
|
|
30
30
|
* If value is `error`: `aria-invalid` is added to the `FormField.Input` and the red error ring is added.
|
|
31
|
-
* If value is `
|
|
31
|
+
* If value is `cautiion`: A visual orange warning ring is added to the `FormField.Input`.
|
|
32
32
|
*/
|
|
33
|
-
error: "error" | "
|
|
33
|
+
error: "error" | "caution" | undefined;
|
|
34
34
|
/**
|
|
35
35
|
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
36
36
|
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
@@ -43,9 +43,9 @@ export declare const useFormFieldModel: (<TT_Special_Generic>(config?: (Partial<
|
|
|
43
43
|
/**
|
|
44
44
|
* Optional flag to denote if this field has an error or warning to display.
|
|
45
45
|
* If value is `error`: `aria-invalid` is added to the `FormField.Input` and the red error ring is added.
|
|
46
|
-
* If value is `
|
|
46
|
+
* If value is `cautiion`: A visual orange warning ring is added to the `FormField.Input`.
|
|
47
47
|
*/
|
|
48
|
-
error: "error" | "
|
|
48
|
+
error: "error" | "caution" | undefined;
|
|
49
49
|
/**
|
|
50
50
|
* Optional `id` provided to `FormField`'s subcomponents as HTML attributes:
|
|
51
51
|
* - `FormField.Input` will set `aria-describedby` to `hint-${id}`
|
|
@@ -68,9 +68,9 @@ export declare const useFormFieldModel: (<TT_Special_Generic>(config?: (Partial<
|
|
|
68
68
|
/**
|
|
69
69
|
* Optional flag to denote if this field has an error or warning to display.
|
|
70
70
|
* If value is `error`: `aria-invalid` is added to the `FormField.Input` and the red error ring is added.
|
|
71
|
-
* If value is `
|
|
71
|
+
* If value is `cautiion`: A visual orange warning ring is added to the `FormField.Input`.
|
|
72
72
|
*/
|
|
73
|
-
error: "error" | "
|
|
73
|
+
error: "error" | "caution" | undefined;
|
|
74
74
|
/**
|
|
75
75
|
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
76
76
|
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
@@ -83,9 +83,9 @@ export declare const useFormFieldModel: (<TT_Special_Generic>(config?: (Partial<
|
|
|
83
83
|
/**
|
|
84
84
|
* Optional flag to denote if this field has an error or warning to display.
|
|
85
85
|
* If value is `error`: `aria-invalid` is added to the `FormField.Input` and the red error ring is added.
|
|
86
|
-
* If value is `
|
|
86
|
+
* If value is `cautiion`: A visual orange warning ring is added to the `FormField.Input`.
|
|
87
87
|
*/
|
|
88
|
-
error: "error" | "
|
|
88
|
+
error: "error" | "caution" | undefined;
|
|
89
89
|
/**
|
|
90
90
|
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
91
91
|
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
@@ -4,7 +4,7 @@ export const useFormFieldModel = createModelHook({
|
|
|
4
4
|
/**
|
|
5
5
|
* Optional flag to denote if this field has an error or warning to display.
|
|
6
6
|
* If value is `error`: `aria-invalid` is added to the `FormField.Input` and the red error ring is added.
|
|
7
|
-
* If value is `
|
|
7
|
+
* If value is `cautiion`: A visual orange warning ring is added to the `FormField.Input`.
|
|
8
8
|
*/
|
|
9
9
|
error: undefined,
|
|
10
10
|
/**
|
|
@@ -25,7 +25,7 @@ export declare const selectInputStencil: import("@workday/canvas-kit-styling").S
|
|
|
25
25
|
backgroundColor: "--cnvs-brand-error-lightest";
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
caution: ({ visualInputPart }: {} & import("@workday/canvas-kit-styling").StencilVarsParts<{
|
|
29
29
|
readonly caret: "select-caret-icon";
|
|
30
30
|
readonly caretContainer: "select-caret-container";
|
|
31
31
|
readonly startIconContainer: "select-start-icon-container";
|
|
@@ -21,7 +21,7 @@ export const selectInputStencil = createStencil({
|
|
|
21
21
|
modifiers: {
|
|
22
22
|
error: {
|
|
23
23
|
error: { name: "3chqdl", styles: "[data-part=\"select-visual-input\"]{background-color:var(--cnvs-brand-error-lightest);}" },
|
|
24
|
-
|
|
24
|
+
caution: { name: "2oc0yg", styles: "[data-part=\"select-visual-input\"]{background-color:var(--cnvs-brand-alert-lightest);}" }
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}, "select-input-b33740");
|
|
@@ -17,7 +17,7 @@ const switchInputStencil = createStencil({
|
|
|
17
17
|
modifiers: {
|
|
18
18
|
error: {
|
|
19
19
|
error: { name: "166muk", styles: "& ~ div:first-of-type{box-shadow:\n 0 0 0 0.125rem var(--cnvs-sys-color-border-inverse),\n 0 0 0 var(--cnvs-sys-space-x1) var(--cnvs-brand-common-error-inner),\n 0 0 0 0.3125rem transparent;}" },
|
|
20
|
-
|
|
20
|
+
caution: { name: "20t65f", styles: "& ~ div:first-of-type{box-shadow:\n 0 0 0 0.125rem var(--cnvs-sys-color-border-inverse),\n 0 0 0 var(--cnvs-sys-space-x1) var(--cnvs-brand-common-alert-inner),\n 0 0 0 0.3125rem var(--cnvs-brand-common-alert-outer);}" }
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
}, "switch-input-7f69d7");
|
|
@@ -28,8 +28,8 @@ const SwitchInput = createComponent('input')({
|
|
|
28
28
|
},
|
|
29
29
|
});
|
|
30
30
|
const switchBackgroundStencil = createStencil({
|
|
31
|
-
base: { name: "
|
|
32
|
-
}, "switch-background-
|
|
31
|
+
base: { name: "3egbg5", styles: "box-sizing:border-box;position:absolute;display:flex;align-items:center;pointer-events:none;margin-top:var(--cnvs-sys-space-x1);width:var(--cnvs-sys-space-x8);height:var(--cnvs-sys-space-x4);border-radius:var(--cnvs-sys-shape-round);padding:var(--cnvs-sys-space-zero) 0.125rem;transition:background-color 200ms ease;background-color:var(--cnvs-sys-color-bg-muted-soft);" }
|
|
32
|
+
}, "switch-background-96fe08");
|
|
33
33
|
const SwitchBackground = createComponent('div')({
|
|
34
34
|
displayName: 'SwitchBackground',
|
|
35
35
|
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
@@ -37,13 +37,13 @@ const SwitchBackground = createComponent('div')({
|
|
|
37
37
|
},
|
|
38
38
|
});
|
|
39
39
|
const switchCircleStencil = createStencil({
|
|
40
|
-
base: { name: "
|
|
40
|
+
base: { name: "49jzlb", styles: "box-sizing:border-box;width:var(--cnvs-sys-space-x3);height:var(--cnvs-sys-space-x3);border-radius:var(--cnvs-sys-shape-round);box-shadow:var(--cnvs-sys-depth-1);transition:transform 150ms ease;pointer-events:none;background-color:var(--cnvs-brand-primary-accent);transform:translateX(var(--cnvs-sys-space-zero));" },
|
|
41
41
|
modifiers: {
|
|
42
42
|
checked: {
|
|
43
|
-
true: { name: "
|
|
43
|
+
true: { name: "28li63", styles: "transform:translateX(var(--cnvs-sys-space-x4));:dir(rtl){transform:translateX(calc(var(--cnvs-sys-space-x4) * -1));}" }
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
}, "switch-circle-
|
|
46
|
+
}, "switch-circle-cac9b6");
|
|
47
47
|
const SwitchCircle = createComponent('div')({
|
|
48
48
|
displayName: 'SwitchCircle',
|
|
49
49
|
Component: ({ checked, ...elemProps }, ref, Element) => {
|
|
@@ -55,7 +55,7 @@ export declare const textAreaStencil: import("@workday/canvas-kit-styling").Sten
|
|
|
55
55
|
outlineOffset: string;
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
|
-
|
|
58
|
+
caution: {
|
|
59
59
|
borderColor: "--cnvs-brand-common-alert-outer";
|
|
60
60
|
boxShadow: `inset 0 0 0 ${string} --cnvs-brand-common-alert-inner`;
|
|
61
61
|
backgroundColor: "--cnvs-brand-alert-lightest";
|
|
@@ -33,7 +33,7 @@ export declare const textInputStencil: import("@workday/canvas-kit-styling").Ste
|
|
|
33
33
|
outlineOffset: string;
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
caution: {
|
|
37
37
|
borderColor: "--cnvs-brand-common-alert-outer";
|
|
38
38
|
boxShadow: `inset 0 0 0 ${string} --cnvs-brand-common-alert-inner`;
|
|
39
39
|
backgroundColor: "--cnvs-brand-alert-lightest";
|
|
@@ -15,7 +15,7 @@ export const textInputStencil = createStencil({
|
|
|
15
15
|
},
|
|
16
16
|
error: {
|
|
17
17
|
error: { name: "15ahlp", styles: "border-color:var(--cnvs-brand-common-error-inner);border-width:0.125rem;background-color:var(--cnvs-brand-error-lightest);&:is(:hover, .hover, :disabled, .disabled, :focus-visible:not([disabled]), .focus:not([disabled])){border-color:var(--cnvs-brand-common-error-inner);}&:is(:focus-visible, .focus):not([disabled]){box-shadow:0 0 0 2px var(--cnvs-sys-color-border-inverse), 0 0 0 4px var(--cnvs-brand-common-focus-outline);outline-offset:0.125rem;}" },
|
|
18
|
-
|
|
18
|
+
caution: { name: "2er8do", styles: "border-color:var(--cnvs-brand-common-alert-outer);box-shadow:inset 0 0 0 0.125rem var(--cnvs-brand-common-alert-inner);background-color:var(--cnvs-brand-alert-lightest);&:is(:hover, .hover, :disabled, .disabled, :focus-visible:not([disabled]), .focus:not([disabled])){border-color:var(--cnvs-brand-common-alert-outer);}&:is(:focus-visible, .focus):not([disabled]){box-shadow:inset 0 0 0 0.125rem var(--cnvs-brand-common-alert-inner),\n 0 0 0 2px var(--cnvs-sys-color-border-inverse),\n 0 0 0 4px var(--cnvs-brand-common-focus-outline);}outline-offset:0.125rem;" }
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
defaultModifiers: {
|
|
@@ -26,7 +26,7 @@ const formFieldGroupListStencil = createStencil({
|
|
|
26
26
|
backgroundColor: brand.error.lightest,
|
|
27
27
|
boxShadow: `inset 0 0 0 ${px2rem(2)} ${brand.common.errorInner}`,
|
|
28
28
|
},
|
|
29
|
-
|
|
29
|
+
caution: {
|
|
30
30
|
backgroundColor: brand.alert.lightest,
|
|
31
31
|
boxShadow: `inset 0 0 0 ${px2rem(1)} ${brand.common.alertOuter}, inset 0 0 0 ${px2rem(3)} ${
|
|
32
32
|
brand.common.alertInner
|
|
@@ -5,9 +5,9 @@ export const useFormFieldModel = createModelHook({
|
|
|
5
5
|
/**
|
|
6
6
|
* Optional flag to denote if this field has an error or warning to display.
|
|
7
7
|
* If value is `error`: `aria-invalid` is added to the `FormField.Input` and the red error ring is added.
|
|
8
|
-
* If value is `
|
|
8
|
+
* If value is `cautiion`: A visual orange warning ring is added to the `FormField.Input`.
|
|
9
9
|
*/
|
|
10
|
-
error: undefined as undefined | 'error' | '
|
|
10
|
+
error: undefined as undefined | 'error' | 'caution',
|
|
11
11
|
/**
|
|
12
12
|
* Optional `id` provided to `FormField`'s subcomponents as HTML attributes:
|
|
13
13
|
* - `FormField.Input` will set `aria-describedby` to `hint-${id}`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "14.0.0-alpha.
|
|
3
|
+
"version": "14.0.0-alpha.1238-next.0",
|
|
4
4
|
"description": "The parent module that contains all Workday Canvas Kit React components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"@popperjs/core": "^2.5.4",
|
|
53
53
|
"@tanstack/react-virtual": "^3.13.9",
|
|
54
54
|
"@workday/canvas-colors-web": "^2.0.0",
|
|
55
|
-
"@workday/canvas-kit-popup-stack": "^14.0.0-alpha.
|
|
56
|
-
"@workday/canvas-kit-styling": "^14.0.0-alpha.
|
|
55
|
+
"@workday/canvas-kit-popup-stack": "^14.0.0-alpha.1238-next.0",
|
|
56
|
+
"@workday/canvas-kit-styling": "^14.0.0-alpha.1238-next.0",
|
|
57
57
|
"@workday/canvas-system-icons-web": "^3.0.35",
|
|
58
58
|
"@workday/canvas-tokens-web": "3.0.0-alpha.12",
|
|
59
59
|
"@workday/design-assets-types": "^0.2.10",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"@workday/canvas-accent-icons-web": "^3.0.0",
|
|
69
69
|
"@workday/canvas-applet-icons-web": "^2.0.0"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "ddfa0ae8c1be2e17cd6133b84fa8a76825267f5b"
|
|
72
72
|
}
|
package/switch/lib/Switch.tsx
CHANGED