@workday/canvas-kit-preview-react 14.0.0-alpha.1206-next.0 → 14.0.0-alpha.1211-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 +1 -1
- package/dist/commonjs/color-picker/lib/parts/ColorReset.js +1 -1
- package/dist/commonjs/color-picker/lib/parts/SwatchBook.js +1 -1
- package/dist/commonjs/divider/lib/Divider.js +1 -1
- package/dist/commonjs/information-highlight/lib/InformationHighlight.d.ts +4 -4
- package/dist/commonjs/information-highlight/lib/InformationHighlight.js +7 -7
- package/dist/commonjs/information-highlight/lib/hooks/useInformationHighlightModel.d.ts +5 -5
- package/dist/commonjs/information-highlight/lib/parts/Body.js +1 -1
- package/dist/commonjs/information-highlight/lib/parts/Heading.js +1 -1
- package/dist/commonjs/information-highlight/lib/parts/Icon.d.ts +1 -1
- package/dist/commonjs/information-highlight/lib/parts/Link.js +1 -1
- package/dist/commonjs/loading-sparkles/lib/LoadingSparkles.js +2 -2
- package/dist/commonjs/multi-select/lib/MultiSelectInput.js +3 -3
- package/dist/commonjs/pill/lib/Pill.js +3 -3
- package/dist/commonjs/pill/lib/PillAvatar.js +1 -1
- package/dist/commonjs/pill/lib/PillCount.js +1 -1
- package/dist/commonjs/pill/lib/PillIcon.js +1 -1
- package/dist/commonjs/pill/lib/PillIconButton.js +1 -1
- package/dist/commonjs/pill/lib/PillLabel.js +1 -1
- package/dist/commonjs/radio/lib/RadioGroup.js +3 -3
- package/dist/commonjs/radio/lib/RadioLabel.js +1 -1
- package/dist/commonjs/radio/lib/RadioText.js +4 -4
- package/dist/commonjs/radio/lib/StyledRadioButton.js +5 -5
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.js +16 -16
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.js +4 -4
- package/dist/commonjs/side-panel/lib/SidePanel.js +7 -7
- package/dist/commonjs/side-panel/lib/SidePanelToggleButton.js +11 -11
- package/dist/commonjs/status-indicator/index.d.ts +1 -1
- package/dist/commonjs/status-indicator/index.d.ts.map +1 -1
- package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts +83 -15
- package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts.map +1 -1
- package/dist/commonjs/status-indicator/lib/StatusIndicator.js +97 -27
- package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.js +1 -1
- package/dist/commonjs/text-area/lib/TextArea.d.ts +2 -2
- package/dist/commonjs/text-area/lib/TextArea.js +1 -1
- package/dist/commonjs/text-area/lib/TextAreaField.d.ts +1 -1
- package/dist/commonjs/text-area/lib/TextAreaField.js +1 -1
- package/dist/commonjs/text-input/lib/TextInput.d.ts +2 -2
- package/dist/commonjs/text-input/lib/TextInput.js +1 -1
- package/dist/commonjs/text-input/lib/TextInputField.d.ts +1 -1
- package/dist/commonjs/text-input/lib/TextInputField.js +4 -4
- package/dist/es6/color-picker/lib/ColorPicker.js +1 -1
- package/dist/es6/color-picker/lib/parts/ColorReset.js +1 -1
- package/dist/es6/color-picker/lib/parts/SwatchBook.js +1 -1
- package/dist/es6/divider/lib/Divider.js +1 -1
- package/dist/es6/information-highlight/lib/InformationHighlight.d.ts +4 -4
- package/dist/es6/information-highlight/lib/InformationHighlight.js +7 -7
- package/dist/es6/information-highlight/lib/hooks/useInformationHighlightModel.d.ts +5 -5
- package/dist/es6/information-highlight/lib/parts/Body.js +1 -1
- package/dist/es6/information-highlight/lib/parts/Heading.js +1 -1
- package/dist/es6/information-highlight/lib/parts/Icon.d.ts +1 -1
- package/dist/es6/information-highlight/lib/parts/Link.js +1 -1
- package/dist/es6/loading-sparkles/lib/LoadingSparkles.js +2 -2
- package/dist/es6/multi-select/lib/MultiSelectInput.js +3 -3
- package/dist/es6/pill/lib/Pill.js +3 -3
- package/dist/es6/pill/lib/PillAvatar.js +1 -1
- package/dist/es6/pill/lib/PillCount.js +1 -1
- package/dist/es6/pill/lib/PillIcon.js +1 -1
- package/dist/es6/pill/lib/PillIconButton.js +1 -1
- package/dist/es6/pill/lib/PillLabel.js +1 -1
- package/dist/es6/radio/lib/RadioGroup.js +3 -3
- package/dist/es6/radio/lib/RadioLabel.js +1 -1
- package/dist/es6/radio/lib/RadioText.js +4 -4
- package/dist/es6/radio/lib/StyledRadioButton.js +5 -5
- package/dist/es6/segmented-control/lib/SegmentedControlItem.js +16 -16
- package/dist/es6/segmented-control/lib/SegmentedControlList.js +4 -4
- package/dist/es6/side-panel/lib/SidePanel.js +7 -7
- package/dist/es6/side-panel/lib/SidePanelToggleButton.js +11 -11
- package/dist/es6/status-indicator/index.d.ts +1 -1
- package/dist/es6/status-indicator/index.d.ts.map +1 -1
- package/dist/es6/status-indicator/index.js +1 -1
- package/dist/es6/status-indicator/lib/StatusIndicator.d.ts +83 -15
- package/dist/es6/status-indicator/lib/StatusIndicator.d.ts.map +1 -1
- package/dist/es6/status-indicator/lib/StatusIndicator.js +97 -27
- package/dist/es6/status-indicator/lib/StatusIndicatorLabel.js +1 -1
- package/dist/es6/text-area/lib/TextArea.d.ts +2 -2
- package/dist/es6/text-area/lib/TextArea.js +1 -1
- package/dist/es6/text-area/lib/TextAreaField.d.ts +1 -1
- package/dist/es6/text-area/lib/TextAreaField.js +1 -1
- package/dist/es6/text-input/lib/TextInput.d.ts +2 -2
- package/dist/es6/text-input/lib/TextInput.js +1 -1
- package/dist/es6/text-input/lib/TextInputField.d.ts +1 -1
- package/dist/es6/text-input/lib/TextInputField.js +4 -4
- package/package.json +4 -4
- package/status-indicator/index.ts +5 -1
- package/status-indicator/lib/StatusIndicator.tsx +159 -78
- package/text-area/lib/TextArea.tsx +2 -2
- package/text-area/lib/TextAreaField.tsx +1 -1
- package/text-input/lib/TextInput.tsx +2 -2
- package/text-input/lib/TextInputField.tsx +1 -1
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
+
import { ExtractStencilProps } from '@workday/canvas-kit-styling';
|
|
3
4
|
import { Flex } from '@workday/canvas-kit-react/layout';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* @default 'low'
|
|
11
|
-
*/
|
|
12
|
-
emphasis?: 'high' | 'low';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated This is being deprecated and will be removed in a future release. Use
|
|
7
|
+
* `StatusIndicatorProps['variant']` instead.
|
|
8
|
+
*/
|
|
9
|
+
export type StatusIndicatorVariant = 'info' | 'neutral' | 'caution' | 'positive' | 'critical' | 'ai' | 'transparent' | 'blue' | 'green' | 'orange' | 'red' | 'gray';
|
|
10
|
+
export interface StatusIndicatorProps extends ExtractProps<typeof Flex, never>, Omit<ExtractStencilProps<typeof statusIndicatorStencil>, 'variant'> {
|
|
13
11
|
/**
|
|
14
12
|
* Defines the color of the `StatusIndicator`.
|
|
15
|
-
*
|
|
13
|
+
* * `info` | `blue` - Uses the info system color and is used for informational status indications
|
|
14
|
+
* * `positive` | `green` - Uses the positive system color and is used for positive status indications
|
|
15
|
+
* * `caution` | `orange` - Uses the caution system color and is used for warnings or required actions
|
|
16
|
+
* * `critical` | `red` - Uses the error system color and is used for critical or negative status indications
|
|
17
|
+
* * `neutral` | `gray` - Uses the neutral system color and generally doesn't have positive or negative connotations
|
|
18
|
+
* * `illuminate` - Uses the AI system color and is used for AI generated content
|
|
19
|
+
* * `transparent` - Uses the transparent system color and is used for overlays on top of images or videos
|
|
20
|
+
*
|
|
21
|
+
* @default 'neutral'
|
|
16
22
|
*/
|
|
17
23
|
variant?: StatusIndicatorVariant;
|
|
18
24
|
/**
|
|
@@ -20,20 +26,81 @@ export interface StatusIndicatorProps extends ExtractProps<typeof Flex, never> {
|
|
|
20
26
|
*/
|
|
21
27
|
children: React.ReactNode;
|
|
22
28
|
}
|
|
29
|
+
declare const statusIndicatorStencil: import("@workday/canvas-kit-styling").Stencil<{
|
|
30
|
+
/**
|
|
31
|
+
* Defines the color of the `StatusIndicator`.
|
|
32
|
+
* * `info` | `blue` - Uses the info system color and is used for informational status indications
|
|
33
|
+
* * `positive` | `green` - Uses the positive system color and is used for positive status indications
|
|
34
|
+
* * `caution` | `orange` - Uses the caution system color and is used for warnings or required actions
|
|
35
|
+
* * `critical` | `red` - Uses the error system color and is used for critical or negative status indications
|
|
36
|
+
* * `neutral` | `gray` - Uses the neutral system color and generally doesn't have positive or negative connotations
|
|
37
|
+
* * `illuminate` - Uses the AI system color and is used for AI generated content
|
|
38
|
+
* * `transparent` - Uses the transparent system color and is used for overlays on top of images or videos
|
|
39
|
+
*
|
|
40
|
+
* @default 'neutral'
|
|
41
|
+
*/
|
|
42
|
+
variant: {
|
|
43
|
+
info: {
|
|
44
|
+
color: "--cnvs-sys-color-fg-info-strong";
|
|
45
|
+
backgroundColor: "--cnvs-sys-color-bg-info-softer";
|
|
46
|
+
};
|
|
47
|
+
positive: {
|
|
48
|
+
color: "--cnvs-sys-color-fg-positive-strong";
|
|
49
|
+
backgroundColor: "--cnvs-sys-color-fg-positive-softer";
|
|
50
|
+
};
|
|
51
|
+
caution: {
|
|
52
|
+
color: "--cnvs-sys-color-fg-caution-soft";
|
|
53
|
+
backgroundColor: "--cnvs-sys-color-bg-caution-softer";
|
|
54
|
+
};
|
|
55
|
+
critical: {
|
|
56
|
+
color: "--cnvs-sys-color-fg-critical-strong";
|
|
57
|
+
backgroundColor: "--cnvs-sys-color-bg-critical-softer";
|
|
58
|
+
};
|
|
59
|
+
neutral: {
|
|
60
|
+
color: "--cnvs-sys-color-fg-muted-strong";
|
|
61
|
+
backgroundColor: "--cnvs-sys-color-bg-alt-default";
|
|
62
|
+
};
|
|
63
|
+
ai: {
|
|
64
|
+
color: "--cnvs-sys-color-fg-ai";
|
|
65
|
+
backgroundColor: "--cnvs-sys-color-bg-ai-default";
|
|
66
|
+
};
|
|
67
|
+
transparent: {
|
|
68
|
+
color: "--cnvs-sys-color-fg-inverse";
|
|
69
|
+
backgroundColor: "--cnvs-sys-color-bg-translucent";
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Defines the emphasis of the `StatusIndicator`. `low` should be used in almost all cases.
|
|
74
|
+
* `high` is being deprecated and will be removed in a future release.
|
|
75
|
+
* * `low` - Normal emphasis and will visually fit in with other components.
|
|
76
|
+
* * `high` - High emphasis has been used to make the `StatusIndicator` stand out more, but
|
|
77
|
+
* tends to overpower other components. It will be removed and should not be used.
|
|
78
|
+
*
|
|
79
|
+
* @default 'low'
|
|
80
|
+
*
|
|
81
|
+
* @deprecated This is being deprecated and will be removed in a future release. `high` is being removed
|
|
82
|
+
*/
|
|
83
|
+
emphasis: {
|
|
84
|
+
low: {};
|
|
85
|
+
/**
|
|
86
|
+
* @deprecated This is being deprecated and will be removed in a future release.
|
|
87
|
+
*/
|
|
88
|
+
high: {};
|
|
89
|
+
};
|
|
90
|
+
}, {}, {}, never, never>;
|
|
23
91
|
/**
|
|
24
|
-
* `StatusIndicator` is a container component
|
|
25
|
-
* apply spacing evenly between its children. It has a default maximum width of `200px`.
|
|
92
|
+
* `StatusIndicator` is a container component has a default maximum width of `200px`.
|
|
26
93
|
*
|
|
27
94
|
* ```tsx
|
|
28
|
-
* <StatusIndicator
|
|
95
|
+
* <StatusIndicator variant="info">
|
|
29
96
|
* {Child components}
|
|
30
97
|
* </StatusIndicator>
|
|
31
98
|
* ```
|
|
32
99
|
*/
|
|
33
100
|
export declare const StatusIndicator: import("@workday/canvas-kit-react/common").ElementComponent<"div", StatusIndicatorProps> & {
|
|
34
101
|
/**
|
|
35
|
-
* `StatusIndicator.Label`
|
|
36
|
-
*
|
|
102
|
+
* `StatusIndicator.Label` will apply an ellipsis if its contents exceed the component's maximum
|
|
103
|
+
* width.
|
|
37
104
|
*
|
|
38
105
|
* ```tsx
|
|
39
106
|
* <StatusIndicator.Label>{The text to be rendered}</StatusIndicator.Label>
|
|
@@ -50,4 +117,5 @@ export declare const StatusIndicator: import("@workday/canvas-kit-react/common")
|
|
|
50
117
|
*/
|
|
51
118
|
Icon: import("@workday/canvas-kit-react/common").ElementComponent<"span", import("@workday/canvas-kit-react/icon").SystemIconProps>;
|
|
52
119
|
};
|
|
120
|
+
export {};
|
|
53
121
|
//# sourceMappingURL=StatusIndicator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIndicator.d.ts","sourceRoot":"","sources":["../../../../status-indicator/lib/StatusIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,YAAY,EAAkB,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"StatusIndicator.d.ts","sourceRoot":"","sources":["../../../../status-indicator/lib/StatusIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,YAAY,EAAkB,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAC,mBAAmB,EAAwB,MAAM,6BAA6B,CAAC;AAEvF,OAAO,EAAC,IAAI,EAAc,MAAM,kCAAkC,CAAC;AAKnE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAC9B,MAAM,GACN,SAAS,GACT,SAAS,GACT,UAAU,GACV,UAAU,GACV,IAAI,GACJ,aAAa,GACb,MAAM,GACN,OAAO,GACP,QAAQ,GACR,KAAK,GACL,MAAM,CAAC;AAEX,MAAM,WAAW,oBACf,SAAQ,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC,EACtC,IAAI,CAAC,mBAAmB,CAAC,OAAO,sBAAsB,CAAC,EAAE,SAAS,CAAC;IACrE;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAWD,QAAA,MAAM,sBAAsB;IAaxB;;;;;;;;;;;OAWG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+BH;;;;;;;;;;OAUG;;;QAGD;;WAEG;;;wBA4DP,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;IAGxB;;;;;;;OAOG;;IAEH;;;;;;;OAOG;;CAuBL,CAAC"}
|
|
@@ -6,41 +6,104 @@ import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
|
6
6
|
import { systemIconStencil } from '@workday/canvas-kit-react/icon';
|
|
7
7
|
import { StatusIndicatorIcon } from './StatusIndicatorIcon';
|
|
8
8
|
import { StatusIndicatorLabel } from './StatusIndicatorLabel';
|
|
9
|
+
// TODO: Remove this in a future release
|
|
10
|
+
const deprecatedVariantsMap = {
|
|
11
|
+
blue: 'info',
|
|
12
|
+
green: 'positive',
|
|
13
|
+
orange: 'caution',
|
|
14
|
+
red: 'critical',
|
|
15
|
+
gray: 'neutral',
|
|
16
|
+
};
|
|
9
17
|
const statusIndicatorStencil = createStencil({
|
|
10
|
-
base: { name: "
|
|
18
|
+
base: { name: "4ar91m", styles: "box-sizing:border-box;display:inline-flex;gap:var(--cnvs-sys-space-x1);max-width:12.5rem;align-items:center;border-radius:var(--cnvs-sys-shape-round);height:1.25rem;padding:var(--cnvs-sys-space-zero) var(--cnvs-sys-space-x2);outline:0.0625rem solid transparent;--color-system-icon-3a4847:currentColor;" },
|
|
11
19
|
modifiers: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Defines the color of the `StatusIndicator`.
|
|
22
|
+
* * `info` | `blue` - Uses the info system color and is used for informational status indications
|
|
23
|
+
* * `positive` | `green` - Uses the positive system color and is used for positive status indications
|
|
24
|
+
* * `caution` | `orange` - Uses the caution system color and is used for warnings or required actions
|
|
25
|
+
* * `critical` | `red` - Uses the error system color and is used for critical or negative status indications
|
|
26
|
+
* * `neutral` | `gray` - Uses the neutral system color and generally doesn't have positive or negative connotations
|
|
27
|
+
* * `illuminate` - Uses the AI system color and is used for AI generated content
|
|
28
|
+
* * `transparent` - Uses the transparent system color and is used for overlays on top of images or videos
|
|
29
|
+
*
|
|
30
|
+
* @default 'neutral'
|
|
31
|
+
*/
|
|
32
|
+
variant: {
|
|
33
|
+
info: { name: "u566s", styles: "color:var(--cnvs-sys-color-fg-info-strong);background-color:var(--cnvs-sys-color-bg-info-softer);" },
|
|
34
|
+
positive: { name: "1it0c3", styles: "color:var(--cnvs-sys-color-fg-positive-strong);background-color:var(--cnvs-sys-color-fg-positive-softer);" },
|
|
35
|
+
caution: { name: "3lnrys", styles: "color:var(--cnvs-sys-color-fg-caution-soft);background-color:var(--cnvs-sys-color-bg-caution-softer);" },
|
|
36
|
+
critical: { name: "kyqxd", styles: "color:var(--cnvs-sys-color-fg-critical-strong);background-color:var(--cnvs-sys-color-bg-critical-softer);" },
|
|
37
|
+
neutral: { name: "3hiv6f", styles: "color:var(--cnvs-sys-color-fg-muted-strong);background-color:var(--cnvs-sys-color-bg-alt-default);" },
|
|
38
|
+
ai: { name: "4cat41", styles: "color:var(--cnvs-sys-color-fg-ai);background-color:var(--cnvs-sys-color-bg-ai-default);" },
|
|
39
|
+
transparent: { name: "rm6jo", styles: "color:var(--cnvs-sys-color-fg-inverse);background-color:var(--cnvs-sys-color-bg-translucent);" }
|
|
15
40
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Defines the emphasis of the `StatusIndicator`. `low` should be used in almost all cases.
|
|
43
|
+
* `high` is being deprecated and will be removed in a future release.
|
|
44
|
+
* * `low` - Normal emphasis and will visually fit in with other components.
|
|
45
|
+
* * `high` - High emphasis has been used to make the `StatusIndicator` stand out more, but
|
|
46
|
+
* tends to overpower other components. It will be removed and should not be used.
|
|
47
|
+
*
|
|
48
|
+
* @default 'low'
|
|
49
|
+
*
|
|
50
|
+
* @deprecated This is being deprecated and will be removed in a future release. `high` is being removed
|
|
51
|
+
*/
|
|
52
|
+
emphasis: {
|
|
53
|
+
low: { name: "232b15", styles: "" },
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated This is being deprecated and will be removed in a future release.
|
|
56
|
+
*/
|
|
57
|
+
high: { name: "2oxxn1", styles: "" }
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
compound: [
|
|
61
|
+
{
|
|
62
|
+
modifiers: {
|
|
63
|
+
variant: 'info',
|
|
64
|
+
emphasis: 'high',
|
|
65
|
+
},
|
|
66
|
+
styles: { name: "4c7ptp", styles: "background-color:var(--cnvs-sys-color-bg-info-default);color:var(--cnvs-sys-color-fg-inverse);" }
|
|
19
67
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
68
|
+
{
|
|
69
|
+
modifiers: {
|
|
70
|
+
variant: 'positive',
|
|
71
|
+
emphasis: 'high',
|
|
72
|
+
},
|
|
73
|
+
styles: { name: "h7oux", styles: "background-color:var(--cnvs-sys-color-bg-positive-default);color:var(--cnvs-sys-color-fg-inverse);" }
|
|
23
74
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
75
|
+
{
|
|
76
|
+
modifiers: {
|
|
77
|
+
variant: 'caution',
|
|
78
|
+
emphasis: 'high',
|
|
79
|
+
},
|
|
80
|
+
styles: { name: "2ya3jf", styles: "background-color:var(--cnvs-sys-color-bg-caution-default);color:var(--cnvs-sys-color-fg-caution-strong);" }
|
|
27
81
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
82
|
+
{
|
|
83
|
+
modifiers: {
|
|
84
|
+
variant: 'critical',
|
|
85
|
+
emphasis: 'high',
|
|
86
|
+
},
|
|
87
|
+
styles: { name: "py0vx", styles: "background-color:var(--cnvs-sys-color-bg-critical-default);color:var(--cnvs-sys-color-fg-inverse);" }
|
|
31
88
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
89
|
+
{
|
|
90
|
+
modifiers: {
|
|
91
|
+
variant: 'neutral',
|
|
92
|
+
emphasis: 'high',
|
|
93
|
+
},
|
|
94
|
+
styles: { name: "20cwyw", styles: "background-color:var(--cnvs-sys-color-bg-muted-default);color:var(--cnvs-sys-color-fg-inverse);" }
|
|
35
95
|
}
|
|
96
|
+
],
|
|
97
|
+
defaultModifiers: {
|
|
98
|
+
variant: 'neutral',
|
|
99
|
+
emphasis: 'low',
|
|
36
100
|
}
|
|
37
|
-
}, "status-indicator-
|
|
101
|
+
}, "status-indicator-c55f02");
|
|
38
102
|
/**
|
|
39
|
-
* `StatusIndicator` is a container component
|
|
40
|
-
* apply spacing evenly between its children. It has a default maximum width of `200px`.
|
|
103
|
+
* `StatusIndicator` is a container component has a default maximum width of `200px`.
|
|
41
104
|
*
|
|
42
105
|
* ```tsx
|
|
43
|
-
* <StatusIndicator
|
|
106
|
+
* <StatusIndicator variant="info">
|
|
44
107
|
* {Child components}
|
|
45
108
|
* </StatusIndicator>
|
|
46
109
|
* ```
|
|
@@ -49,8 +112,8 @@ export const StatusIndicator = createComponent('div')({
|
|
|
49
112
|
displayName: 'StatusIndicator',
|
|
50
113
|
subComponents: {
|
|
51
114
|
/**
|
|
52
|
-
* `StatusIndicator.Label`
|
|
53
|
-
*
|
|
115
|
+
* `StatusIndicator.Label` will apply an ellipsis if its contents exceed the component's maximum
|
|
116
|
+
* width.
|
|
54
117
|
*
|
|
55
118
|
* ```tsx
|
|
56
119
|
* <StatusIndicator.Label>{The text to be rendered}</StatusIndicator.Label>
|
|
@@ -67,7 +130,14 @@ export const StatusIndicator = createComponent('div')({
|
|
|
67
130
|
*/
|
|
68
131
|
Icon: StatusIndicatorIcon,
|
|
69
132
|
},
|
|
70
|
-
Component: ({
|
|
71
|
-
return (_jsx(Element, { ref: ref, ...mergeStyles(elemProps, statusIndicatorStencil({
|
|
133
|
+
Component: ({ variant, emphasis, children, ...elemProps }, ref, Element) => {
|
|
134
|
+
return (_jsx(Element, { ref: ref, ...mergeStyles(elemProps, statusIndicatorStencil({
|
|
135
|
+
variant:
|
|
136
|
+
// collapse the type to only the allowed modifiers. Look them up in the map, then
|
|
137
|
+
// fallback to the passed variant.
|
|
138
|
+
deprecatedVariantsMap[variant] ||
|
|
139
|
+
variant,
|
|
140
|
+
emphasis,
|
|
141
|
+
})), children: children }));
|
|
72
142
|
},
|
|
73
143
|
});
|
|
@@ -6,7 +6,7 @@ import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
|
6
6
|
import { system } from '@workday/canvas-tokens-web';
|
|
7
7
|
const statusIndicatorLabelStencil = createStencil({
|
|
8
8
|
extends: textStencil,
|
|
9
|
-
base: { name: "
|
|
9
|
+
base: { name: "2i1xii", styles: "box-sizing:border-box;font-weight:var(--cnvs-sys-font-weight-bold);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-transform:capitalize;color:inherit;" },
|
|
10
10
|
defaultModifiers: { typeLevel: 'subtext.large' }
|
|
11
11
|
}, "status-indicator-label-63258e");
|
|
12
12
|
export const StatusIndicatorLabel = createComponent('span')({
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { FormField } from '@workday/canvas-kit-react/form-field';
|
|
4
4
|
/**
|
|
5
|
-
* @deprecated ⚠️ `TextAreaProps` in Preview has been deprecated and will be removed in a future major version. Please use [`
|
|
5
|
+
* @deprecated ⚠️ `TextAreaProps` in Preview has been deprecated and will be removed in a future major version. Please use [`TextArea` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-textarea--docs) instead.
|
|
6
6
|
*/
|
|
7
7
|
export interface TextAreaProps extends ExtractProps<typeof FormField, never> {
|
|
8
8
|
/**
|
|
@@ -12,7 +12,7 @@ export interface TextAreaProps extends ExtractProps<typeof FormField, never> {
|
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* @stencil formFieldStencil
|
|
15
|
-
* @deprecated ⚠️ `TextArea` in Preview has been deprecated and will be removed in a future major version. Please use [`
|
|
15
|
+
* @deprecated ⚠️ `TextArea` in Preview has been deprecated and will be removed in a future major version. Please use [`TextArea` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-textarea--docs) instead.
|
|
16
16
|
*/
|
|
17
17
|
export declare const TextArea: import("@workday/canvas-kit-react/common").ElementComponentM<"div", TextAreaProps & Partial<{
|
|
18
18
|
error: "error" | "alert" | undefined;
|
|
@@ -6,7 +6,7 @@ import { TextAreaField } from './TextAreaField';
|
|
|
6
6
|
import { useTextInputModel } from '@workday/canvas-kit-preview-react/text-input';
|
|
7
7
|
/**
|
|
8
8
|
* @stencil formFieldStencil
|
|
9
|
-
* @deprecated ⚠️ `TextArea` in Preview has been deprecated and will be removed in a future major version. Please use [`
|
|
9
|
+
* @deprecated ⚠️ `TextArea` in Preview has been deprecated and will be removed in a future major version. Please use [`TextArea` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-textarea--docs) instead.
|
|
10
10
|
*/
|
|
11
11
|
export const TextArea = createContainer('div')({
|
|
12
12
|
displayName: 'TextArea',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @deprecated ⚠️ `TextAreaField` in Preview has been deprecated and will be removed in a future major version. Please use [`FormField`](https://workday.github.io/canvas-kit/?path=/
|
|
2
|
+
* @deprecated ⚠️ `TextAreaField` in Preview has been deprecated and will be removed in a future major version. Please use [`FormField`](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-form-field--docs) in Preview instead.
|
|
3
3
|
*/
|
|
4
4
|
export declare const TextAreaField: import("@workday/canvas-kit-react/common").ElementComponentM<"textarea", import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("@workday/canvas-kit-react/layout/lib/utils/border/color").BorderColorStyleProps & import("@workday/canvas-kit-react/layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("@workday/canvas-kit-react/layout/lib/utils/border/radius").BorderRadiusStyleProps & import("@workday/canvas-kit-react/layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("@workday/canvas-kit-react/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 & import("@workday/canvas-kit-react/common").PropsWithModel<{
|
|
5
5
|
state: {
|
|
@@ -28,7 +28,7 @@ const baseStyles = {
|
|
|
28
28
|
},
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
|
-
* @deprecated ⚠️ `TextAreaField` in Preview has been deprecated and will be removed in a future major version. Please use [`FormField`](https://workday.github.io/canvas-kit/?path=/
|
|
31
|
+
* @deprecated ⚠️ `TextAreaField` in Preview has been deprecated and will be removed in a future major version. Please use [`FormField`](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-form-field--docs) in Preview instead.
|
|
32
32
|
*/
|
|
33
33
|
export const TextAreaField = createSubcomponent('textarea')({
|
|
34
34
|
displayName: 'TextArea.Field',
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { FormField } from '@workday/canvas-kit-react/form-field';
|
|
4
4
|
/**
|
|
5
|
-
* @deprecated ⚠️ `TextInputProps` in Preview has been deprecated and will be removed in a future major version. Please use [`
|
|
5
|
+
* @deprecated ⚠️ `TextInputProps` in Preview has been deprecated and will be removed in a future major version. Please use [`TextInput` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-text-input--docs) instead.
|
|
6
6
|
*/
|
|
7
7
|
export interface TextInputProps extends ExtractProps<typeof FormField, never> {
|
|
8
8
|
/**
|
|
@@ -12,7 +12,7 @@ export interface TextInputProps extends ExtractProps<typeof FormField, never> {
|
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* @stencil formFieldStencil
|
|
15
|
-
* @deprecated ⚠️ `TextInput` in Preview has been deprecated and will be removed in a future major version. Please use [`
|
|
15
|
+
* @deprecated ⚠️ `TextInput` in Preview has been deprecated and will be removed in a future major version. Please use [`TextInput` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-textinput--docs) instead.
|
|
16
16
|
*/
|
|
17
17
|
export declare const TextInput: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("@workday/canvas-kit-react/form-field").FormFieldProps & Partial<{
|
|
18
18
|
error: "error" | "alert" | undefined;
|
|
@@ -5,7 +5,7 @@ import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
|
5
5
|
import { TextInputField } from './TextInputField';
|
|
6
6
|
/**
|
|
7
7
|
* @stencil formFieldStencil
|
|
8
|
-
* @deprecated ⚠️ `TextInput` in Preview has been deprecated and will be removed in a future major version. Please use [`
|
|
8
|
+
* @deprecated ⚠️ `TextInput` in Preview has been deprecated and will be removed in a future major version. Please use [`TextInput` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-textinput--docs) instead.
|
|
9
9
|
*/
|
|
10
10
|
export const TextInput = createContainer('div')({
|
|
11
11
|
displayName: 'TextInput',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @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=/
|
|
2
|
+
* @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=/docs/components-inputs-form-field--docs) instead.
|
|
3
3
|
*/
|
|
4
4
|
export declare const TextInputField: import("@workday/canvas-kit-react/common").ElementComponentM<"input", import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("@workday/canvas-kit-react/layout/lib/utils/border/color").BorderColorStyleProps & import("@workday/canvas-kit-react/layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("@workday/canvas-kit-react/layout/lib/utils/border/radius").BorderRadiusStyleProps & import("@workday/canvas-kit-react/layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("@workday/canvas-kit-react/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 & import("@workday/canvas-kit-react/common").PropsWithModel<{
|
|
5
5
|
state: {
|
|
@@ -6,16 +6,16 @@ import { createStencil, cssVar, px2rem } from '@workday/canvas-kit-styling';
|
|
|
6
6
|
import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
7
7
|
import { useTextInputField, useTextInputModel } from './hooks';
|
|
8
8
|
const textInputFieldStencil = createStencil({
|
|
9
|
-
base: { name: "
|
|
9
|
+
base: { name: "1vx3rt", styles: "box-sizing:border-box;font-family:var(--cnvs-sys-font-family-default);font-weight:var(--cnvs-sys-font-weight-normal);line-height:var(--cnvs-sys-line-height-subtext-large);font-size:var(--cnvs-sys-font-size-subtext-large);letter-spacing:var(--cnvs-base-letter-spacing-150);transition:0.2s box-shadow, 0.2s border-color;border:0.0625rem solid var(--cnvs-sys-color-border-input-default);padding:var(--cnvs-sys-space-x2);margin:0;display:block;height:var(--cnvs-sys-space-x10);min-width:17.5rem;border-radius:var(--cnvs-sys-shape-x1);background-color:var(--cnvs-sys-color-bg-default);&::placeholder{color:var(--cnvs-sys-color-text-default);}&:hover{border-color:var(--cnvs-sys-color-border-input-strong);}&:focus:not([disabled]){outline:none;}&:disabled{background-color:var(--cnvs-sys-color-bg-alt-softer);border-color:var(--cnvs-sys-color-border-input-disabled);color:var(--cnvs-sys-color-fg-disabled);&::placeholder{color:var(--cnvs-sys-color-fg-disabled);}}::-ms-clear{display:none;}" },
|
|
10
10
|
modifiers: {
|
|
11
11
|
error: {
|
|
12
|
-
error: { name: "
|
|
13
|
-
alert: { name: "
|
|
12
|
+
error: { name: "2m2z9v", styles: "background-color:var(--cnvs-brand-error-lightest);" },
|
|
13
|
+
alert: { name: "3oljbn", styles: "background-color:var(--cnvs-brand-alert-lightest);" }
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
}, "text-input-field-d4e5d8");
|
|
17
17
|
/**
|
|
18
|
-
* @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=/
|
|
18
|
+
* @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=/docs/components-inputs-form-field--docs) instead.
|
|
19
19
|
*/
|
|
20
20
|
export const TextInputField = createSubcomponent('input')({
|
|
21
21
|
displayName: 'TextInput.Field',
|
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.1211-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.1211-next.0",
|
|
50
|
+
"@workday/canvas-kit-styling": "^14.0.0-alpha.1211-next.0",
|
|
51
51
|
"@workday/canvas-system-icons-web": "^3.0.35",
|
|
52
52
|
"@workday/canvas-tokens-web": "3.0.0-alpha.12",
|
|
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": "ea68386b221f4e06e84726aad21c22687919d139"
|
|
62
62
|
}
|