@workday/canvas-kit-preview-react 14.0.0-alpha.1203-next.0 → 14.0.0-alpha.1210-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 (90) 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/information-highlight/lib/InformationHighlight.d.ts +4 -4
  6. package/dist/commonjs/information-highlight/lib/InformationHighlight.js +7 -7
  7. package/dist/commonjs/information-highlight/lib/hooks/useInformationHighlightModel.d.ts +5 -5
  8. package/dist/commonjs/information-highlight/lib/parts/Body.js +1 -1
  9. package/dist/commonjs/information-highlight/lib/parts/Heading.js +1 -1
  10. package/dist/commonjs/information-highlight/lib/parts/Icon.d.ts +1 -1
  11. package/dist/commonjs/information-highlight/lib/parts/Link.js +1 -1
  12. package/dist/commonjs/loading-sparkles/lib/LoadingSparkles.js +2 -2
  13. package/dist/commonjs/multi-select/lib/MultiSelectInput.js +3 -3
  14. package/dist/commonjs/pill/lib/Pill.js +3 -3
  15. package/dist/commonjs/pill/lib/PillAvatar.js +1 -1
  16. package/dist/commonjs/pill/lib/PillCount.js +1 -1
  17. package/dist/commonjs/pill/lib/PillIcon.js +1 -1
  18. package/dist/commonjs/pill/lib/PillIconButton.js +1 -1
  19. package/dist/commonjs/pill/lib/PillLabel.js +1 -1
  20. package/dist/commonjs/radio/lib/RadioGroup.js +3 -3
  21. package/dist/commonjs/radio/lib/RadioLabel.js +1 -1
  22. package/dist/commonjs/radio/lib/RadioText.js +4 -4
  23. package/dist/commonjs/radio/lib/StyledRadioButton.js +5 -5
  24. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.js +16 -16
  25. package/dist/commonjs/segmented-control/lib/SegmentedControlList.js +4 -4
  26. package/dist/commonjs/side-panel/lib/SidePanel.js +7 -7
  27. package/dist/commonjs/side-panel/lib/SidePanelToggleButton.js +11 -11
  28. package/dist/commonjs/status-indicator/index.d.ts +1 -1
  29. package/dist/commonjs/status-indicator/index.d.ts.map +1 -1
  30. package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts +83 -15
  31. package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts.map +1 -1
  32. package/dist/commonjs/status-indicator/lib/StatusIndicator.js +97 -27
  33. package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.js +1 -1
  34. package/dist/commonjs/text-area/lib/TextArea.d.ts +2 -2
  35. package/dist/commonjs/text-area/lib/TextArea.js +1 -1
  36. package/dist/commonjs/text-area/lib/TextAreaField.d.ts +1 -1
  37. package/dist/commonjs/text-area/lib/TextAreaField.js +1 -1
  38. package/dist/commonjs/text-input/lib/TextInput.d.ts +2 -2
  39. package/dist/commonjs/text-input/lib/TextInput.js +1 -1
  40. package/dist/commonjs/text-input/lib/TextInputField.d.ts +1 -1
  41. package/dist/commonjs/text-input/lib/TextInputField.js +4 -4
  42. package/dist/es6/color-picker/lib/ColorPicker.js +1 -1
  43. package/dist/es6/color-picker/lib/parts/ColorReset.js +1 -1
  44. package/dist/es6/color-picker/lib/parts/SwatchBook.js +1 -1
  45. package/dist/es6/divider/lib/Divider.js +1 -1
  46. package/dist/es6/information-highlight/lib/InformationHighlight.d.ts +4 -4
  47. package/dist/es6/information-highlight/lib/InformationHighlight.js +7 -7
  48. package/dist/es6/information-highlight/lib/hooks/useInformationHighlightModel.d.ts +5 -5
  49. package/dist/es6/information-highlight/lib/parts/Body.js +1 -1
  50. package/dist/es6/information-highlight/lib/parts/Heading.js +1 -1
  51. package/dist/es6/information-highlight/lib/parts/Icon.d.ts +1 -1
  52. package/dist/es6/information-highlight/lib/parts/Link.js +1 -1
  53. package/dist/es6/loading-sparkles/lib/LoadingSparkles.js +2 -2
  54. package/dist/es6/multi-select/lib/MultiSelectInput.js +3 -3
  55. package/dist/es6/pill/lib/Pill.js +3 -3
  56. package/dist/es6/pill/lib/PillAvatar.js +1 -1
  57. package/dist/es6/pill/lib/PillCount.js +1 -1
  58. package/dist/es6/pill/lib/PillIcon.js +1 -1
  59. package/dist/es6/pill/lib/PillIconButton.js +1 -1
  60. package/dist/es6/pill/lib/PillLabel.js +1 -1
  61. package/dist/es6/radio/lib/RadioGroup.js +3 -3
  62. package/dist/es6/radio/lib/RadioLabel.js +1 -1
  63. package/dist/es6/radio/lib/RadioText.js +4 -4
  64. package/dist/es6/radio/lib/StyledRadioButton.js +5 -5
  65. package/dist/es6/segmented-control/lib/SegmentedControlItem.js +16 -16
  66. package/dist/es6/segmented-control/lib/SegmentedControlList.js +4 -4
  67. package/dist/es6/side-panel/lib/SidePanel.js +7 -7
  68. package/dist/es6/side-panel/lib/SidePanelToggleButton.js +11 -11
  69. package/dist/es6/status-indicator/index.d.ts +1 -1
  70. package/dist/es6/status-indicator/index.d.ts.map +1 -1
  71. package/dist/es6/status-indicator/index.js +1 -1
  72. package/dist/es6/status-indicator/lib/StatusIndicator.d.ts +83 -15
  73. package/dist/es6/status-indicator/lib/StatusIndicator.d.ts.map +1 -1
  74. package/dist/es6/status-indicator/lib/StatusIndicator.js +97 -27
  75. package/dist/es6/status-indicator/lib/StatusIndicatorLabel.js +1 -1
  76. package/dist/es6/text-area/lib/TextArea.d.ts +2 -2
  77. package/dist/es6/text-area/lib/TextArea.js +1 -1
  78. package/dist/es6/text-area/lib/TextAreaField.d.ts +1 -1
  79. package/dist/es6/text-area/lib/TextAreaField.js +1 -1
  80. package/dist/es6/text-input/lib/TextInput.d.ts +2 -2
  81. package/dist/es6/text-input/lib/TextInput.js +1 -1
  82. package/dist/es6/text-input/lib/TextInputField.d.ts +1 -1
  83. package/dist/es6/text-input/lib/TextInputField.js +4 -4
  84. package/package.json +4 -4
  85. package/status-indicator/index.ts +5 -1
  86. package/status-indicator/lib/StatusIndicator.tsx +159 -78
  87. package/text-area/lib/TextArea.tsx +2 -2
  88. package/text-area/lib/TextAreaField.tsx +1 -1
  89. package/text-input/lib/TextInput.tsx +2 -2
  90. 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
- export type StatusIndicatorVariant = 'gray' | 'orange' | 'blue' | 'green' | 'red' | 'transparent';
5
- export interface StatusIndicatorProps extends ExtractProps<typeof Flex, never> {
6
- /**
7
- * Defines the emphasis of the `StatusIndicator`.
8
- * `high` emphasis will create more contrast between the background and text colors.
9
- * `low` emphasis will create less contrast between the background and text colors.
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
- * @default 'gray'
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 which renders an {@link Flex} under the hood to
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 emphasis="low" variant="blue">
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` renders {@link Text} under the hood. It will apply an ellipsis if its
36
- * contents exceed the component's maximum width.
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;AAG/E,OAAO,EAAC,IAAI,EAAc,MAAM,kCAAkC,CAAC;AAKnE,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,aAAa,CAAC;AAElG,MAAM,WAAW,oBAAqB,SAAQ,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC;IAC5E;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAyFD;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;IAGxB;;;;;;;OAOG;;IAEH;;;;;;;OAOG;;CAcL,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: "27iw2b", 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-half);height:1.25rem;padding:var(--cnvs-sys-space-zero) var(--cnvs-sys-space-x1);outline:0.0625rem solid transparent;" },
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
- gray: {
13
- high: { name: "2dllcf", styles: "color:var(--cnvs-sys-color-static-white);--color-system-icon-3a4847:var(--cnvs-sys-color-static-white);background:var(--cnvs-sys-color-static-gray-default);" },
14
- low: { name: "3jjwxe", styles: "color:var(--cnvs-sys-color-fg-muted-default);--color-system-icon-3a4847:var(--cnvs-sys-color-static-gray-strong);background:var(--cnvs-sys-color-bg-alt-softer);" }
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
- orange: {
17
- high: { name: "48qu4h", styles: "color:var(--cnvs-sys-color-static-gray-stronger);--color-system-icon-3a4847:var(--cnvs-sys-color-static-gray-stronger);background:var(--cnvs-sys-color-static-amber-default);" },
18
- low: { name: "2kutww", styles: "color:var(--cnvs-sys-color-static-amber-strongest);--color-system-icon-3a4847:var(--cnvs-sys-color-static-amber-strongest);background:var(--cnvs-sys-color-static-amber-softer);" }
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
- blue: {
21
- high: { name: "2x7kok", styles: "color:var(--cnvs-sys-color-static-white);--color-system-icon-3a4847:var(--cnvs-sys-color-static-white);background:var(--cnvs-sys-color-static-blue-default);" },
22
- low: { name: "1i728h", styles: "color:var(--cnvs-sys-color-static-blue-strong);--color-system-icon-3a4847:var(--cnvs-sys-color-static-blue-strong);background:var(--cnvs-sys-color-static-blue-softer);" }
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
- green: {
25
- high: { name: "2czl9s", styles: "color:var(--cnvs-sys-color-static-white);--color-system-icon-3a4847:var(--cnvs-sys-color-static-white);background:var(--cnvs-sys-color-static-green-strong);" },
26
- low: { name: "1b3123", styles: "color:var(--cnvs-sys-color-static-green-strong);--color-system-icon-3a4847:var(--cnvs-sys-color-static-green-strong);background:var(--cnvs-sys-color-static-green-softer);" }
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
- red: {
29
- high: { name: "3r0ax7", styles: "color:var(--cnvs-sys-color-static-white);--color-system-icon-3a4847:var(--cnvs-sys-color-static-white);background:var(--cnvs-sys-color-static-red-default);" },
30
- low: { name: "3h3nq6", styles: "color:var(--cnvs-sys-color-static-red-strong);--color-system-icon-3a4847:var(--cnvs-sys-color-static-red-strong);background:var(--cnvs-sys-color-static-red-softer);" }
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
- transparent: {
33
- high: { name: "rktyo", styles: "color:var(--cnvs-sys-color-static-white);--color-system-icon-3a4847:var(--cnvs-sys-color-static-white);background:var(--cnvs-sys-color-bg-translucent);" },
34
- low: { name: "q2kqx", styles: "color:var(--cnvs-sys-color-static-white);--color-system-icon-3a4847:var(--cnvs-sys-color-static-white);background:var(--cnvs-sys-color-bg-translucent);" }
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-1a565e");
101
+ }, "status-indicator-c55f02");
38
102
  /**
39
- * `StatusIndicator` is a container component which renders an {@link Flex} under the hood to
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 emphasis="low" variant="blue">
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` renders {@link Text} under the hood. It will apply an ellipsis if its
53
- * contents exceed the component's maximum width.
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: ({ emphasis = 'low', variant = 'gray', children, ...elemProps }, ref, Element) => {
71
- return (_jsx(Element, { ref: ref, ...mergeStyles(elemProps, statusIndicatorStencil({ [variant]: emphasis })), children: children }));
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: "2bq1ol", 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;" },
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 [`FormField`](https://workday.github.io/canvas-kit/?path=/story/preview-inputs-form-field--basic) in Preview instead.
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 [`FormField` in Preview](https://workday.github.io/canvas-kit/?path=/story/preview-inputs-form-field--basic) instead.
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 [`FormField` in Preview](https://workday.github.io/canvas-kit/?path=/story/preview-inputs-form-field--basic) instead.
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=/story/preview-inputs-form-field--basic) in Preview instead.
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=/story/preview-inputs-form-field--basic) in Preview instead.
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 [`FormField` in Preview](https://workday.github.io/canvas-kit/?path=/story/preview-inputs-form-field--basic) instead.
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 [`FormField` in Preview](https://workday.github.io/canvas-kit/?path=/story/preview-inputs-form-field--basic) instead.
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 [`FormField` in Preview](https://workday.github.io/canvas-kit/?path=/story/preview-inputs-form-field--basic) instead.
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=/story/preview-inputs-form-field--basic) instead.
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: "1cba05", 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;}" },
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: "2dg4kd", styles: "background-color:var(--cnvs-brand-error-lightest);" },
13
- alert: { name: "3pm52w", styles: "background-color:var(--cnvs-brand-alert-lightest);" }
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=/story/preview-inputs-form-field--basic) instead.
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.1203-next.0",
3
+ "version": "14.0.0-alpha.1210-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.1203-next.0",
50
- "@workday/canvas-kit-styling": "^14.0.0-alpha.1203-next.0",
49
+ "@workday/canvas-kit-react": "^14.0.0-alpha.1210-next.0",
50
+ "@workday/canvas-kit-styling": "^14.0.0-alpha.1210-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": "07c76a815a238c1a08f47fd6a33e1a0a2e65eea1"
61
+ "gitHead": "8ef8c7a0b7515a9341550c564b84bed91598e9f7"
62
62
  }
@@ -1 +1,5 @@
1
- export {StatusIndicator, StatusIndicatorProps, StatusIndicatorVariant} from './lib/StatusIndicator';
1
+ export {
2
+ StatusIndicator,
3
+ type StatusIndicatorProps,
4
+ type StatusIndicatorVariant,
5
+ } from './lib/StatusIndicator';