@workday/canvas-kit-react 11.0.0-alpha.631-next.0 → 11.0.0-alpha.635-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 (58) hide show
  1. package/badge/lib/CountBadge.tsx +71 -46
  2. package/common/lib/types.ts +2 -2
  3. package/dist/commonjs/badge/lib/CountBadge.d.ts +22 -3
  4. package/dist/commonjs/badge/lib/CountBadge.d.ts.map +1 -1
  5. package/dist/commonjs/badge/lib/CountBadge.js +48 -42
  6. package/dist/commonjs/button/lib/BaseButton.js +17 -17
  7. package/dist/commonjs/button/lib/DeleteButton.js +1 -1
  8. package/dist/commonjs/button/lib/PrimaryButton.js +2 -2
  9. package/dist/commonjs/button/lib/SecondaryButton.js +2 -2
  10. package/dist/commonjs/button/lib/TertiaryButton.js +15 -15
  11. package/dist/commonjs/common/lib/CanvasProvider.js +1 -1
  12. package/dist/commonjs/common/lib/types.d.ts +2 -2
  13. package/dist/commonjs/common/lib/types.d.ts.map +1 -1
  14. package/dist/commonjs/common/lib/types.js +2 -2
  15. package/dist/commonjs/form-field/lib/FormField.d.ts +6 -0
  16. package/dist/commonjs/form-field/lib/FormField.d.ts.map +1 -1
  17. package/dist/commonjs/form-field/lib/FormField.js +3 -0
  18. package/dist/commonjs/form-field/lib/Hint.d.ts +6 -0
  19. package/dist/commonjs/form-field/lib/Hint.d.ts.map +1 -1
  20. package/dist/commonjs/form-field/lib/Hint.js +3 -0
  21. package/dist/commonjs/form-field/lib/Label.d.ts +6 -0
  22. package/dist/commonjs/form-field/lib/Label.d.ts.map +1 -1
  23. package/dist/commonjs/form-field/lib/Label.js +3 -0
  24. package/dist/commonjs/form-field/lib/types.d.ts +6 -0
  25. package/dist/commonjs/form-field/lib/types.d.ts.map +1 -1
  26. package/dist/commonjs/form-field/lib/types.js +3 -0
  27. package/dist/commonjs/select/lib/Select.js +3 -3
  28. package/dist/es6/badge/lib/CountBadge.d.ts +22 -3
  29. package/dist/es6/badge/lib/CountBadge.d.ts.map +1 -1
  30. package/dist/es6/badge/lib/CountBadge.js +47 -37
  31. package/dist/es6/button/lib/BaseButton.js +17 -17
  32. package/dist/es6/button/lib/DeleteButton.js +1 -1
  33. package/dist/es6/button/lib/PrimaryButton.js +2 -2
  34. package/dist/es6/button/lib/SecondaryButton.js +2 -2
  35. package/dist/es6/button/lib/TertiaryButton.js +15 -15
  36. package/dist/es6/common/lib/CanvasProvider.js +1 -1
  37. package/dist/es6/common/lib/types.d.ts +2 -2
  38. package/dist/es6/common/lib/types.d.ts.map +1 -1
  39. package/dist/es6/common/lib/types.js +2 -2
  40. package/dist/es6/form-field/lib/FormField.d.ts +6 -0
  41. package/dist/es6/form-field/lib/FormField.d.ts.map +1 -1
  42. package/dist/es6/form-field/lib/FormField.js +3 -0
  43. package/dist/es6/form-field/lib/Hint.d.ts +6 -0
  44. package/dist/es6/form-field/lib/Hint.d.ts.map +1 -1
  45. package/dist/es6/form-field/lib/Hint.js +3 -0
  46. package/dist/es6/form-field/lib/Label.d.ts +6 -0
  47. package/dist/es6/form-field/lib/Label.d.ts.map +1 -1
  48. package/dist/es6/form-field/lib/Label.js +3 -0
  49. package/dist/es6/form-field/lib/types.d.ts +6 -0
  50. package/dist/es6/form-field/lib/types.d.ts.map +1 -1
  51. package/dist/es6/form-field/lib/types.js +3 -0
  52. package/dist/es6/select/lib/Select.js +3 -3
  53. package/form-field/lib/FormField.tsx +6 -2
  54. package/form-field/lib/Hint.tsx +6 -2
  55. package/form-field/lib/Label.tsx +6 -2
  56. package/form-field/lib/types.ts +6 -1
  57. package/package.json +4 -4
  58. package/select/lib/Select.tsx +2 -2
@@ -49,6 +49,9 @@ const LegendComponent = styled('legend')(...labelStyles, ({ labelPosition }) =>
49
49
  };
50
50
  });
51
51
  const LabelComponent = styled('label')(...labelStyles);
52
+ /**
53
+ * @deprecated ⚠️ `Label` in Main 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--custom) instead.
54
+ */
52
55
  class Label extends React.Component {
53
56
  render() {
54
57
  const { labelPosition = Label.Position.Top, isLegend = false, required, ...elemProps } = this.props;
@@ -1,11 +1,17 @@
1
1
  /**
2
+ *
2
3
  * The position of the FormField label (Top vs Left vs Hidden).
4
+ *
5
+ * @deprecated ⚠️ `FormFieldLabelPosition` in Main 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--custom) instead.
3
6
  */
4
7
  export declare enum FormFieldLabelPosition {
5
8
  Top = 0,
6
9
  Left = 1,
7
10
  Hidden = 2
8
11
  }
12
+ /**
13
+ * @deprecated ⚠️ `FormFieldLabelPositionBehavior` in Main 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--custom) instead.
14
+ */
9
15
  export interface FormFieldLabelPositionBehavior {
10
16
  labelPosition?: FormFieldLabelPosition;
11
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,sBAAsB;IAChC,GAAG,IAAA;IACH,IAAI,IAAA;IACJ,MAAM,IAAA;CACP;AAED,MAAM,WAAW,8BAA8B;IAC7C,aAAa,CAAC,EAAE,sBAAsB,CAAC;CACxC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oBAAY,sBAAsB;IAChC,GAAG,IAAA;IACH,IAAI,IAAA;IACJ,MAAM,IAAA;CACP;AACD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,aAAa,CAAC,EAAE,sBAAsB,CAAC;CACxC"}
@@ -1,5 +1,8 @@
1
1
  /**
2
+ *
2
3
  * The position of the FormField label (Top vs Left vs Hidden).
4
+ *
5
+ * @deprecated ⚠️ `FormFieldLabelPosition` in Main 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--custom) instead.
3
6
  */
4
7
  export var FormFieldLabelPosition;
5
8
  (function (FormFieldLabelPosition) {
@@ -9,12 +9,12 @@ import { useSelectModel } from './hooks/useSelectModel';
9
9
  import { useSelectCard } from './hooks/useSelectCard';
10
10
  import { useSelectInput } from './hooks/useSelectInput';
11
11
  import { createStyles } from '@workday/canvas-kit-styling';
12
- const selectInputStyles = createStyles({ name: "hqkw12", styles: "caret-color:transparent;cursor:default;&::selection{background-color:transparent;}" });
12
+ const selectInputStyles = createStyles({ name: "jif512", styles: "caret-color:transparent;cursor:default;&::selection{background-color:transparent;}" });
13
13
  export const SelectInput = createSubcomponent(TextInput)({
14
14
  modelHook: useSelectModel,
15
15
  elemPropsHook: useSelectInput,
16
- })(({ placeholder = 'Choose an option', inputStartIcon, ...elemProps }, Element, model) => {
17
- return (React.createElement(InputGroup, null,
16
+ })(({ placeholder = 'Choose an option', inputStartIcon, width, ...elemProps }, Element, model) => {
17
+ return (React.createElement(InputGroup, { width: width },
18
18
  inputStartIcon && model.state.selectedIds.length > 0 && (React.createElement(InputGroup.InnerStart, { pointerEvents: "none" },
19
19
  React.createElement(SystemIcon, { icon: inputStartIcon }))),
20
20
  React.createElement(InputGroup.Input, Object.assign({ as: Element, placeholder: placeholder }, mergeStyles(elemProps, [selectInputStyles]))),
@@ -10,7 +10,9 @@ import {
10
10
  import {Hint} from './Hint';
11
11
  import {Label} from './Label';
12
12
  import {FormFieldLabelPosition, FormFieldLabelPositionBehavior} from './types';
13
-
13
+ /**
14
+ * @deprecated ⚠️ `FormFieldProps` in Main 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--custom) instead.
15
+ */
14
16
  export interface FormFieldProps
15
17
  extends Themeable,
16
18
  React.HTMLAttributes<HTMLDivElement>,
@@ -136,7 +138,9 @@ const FormFieldInputContainer = styled('div')<GrowthBehavior & FormFieldLabelPos
136
138
  };
137
139
  }
138
140
  );
139
-
141
+ /**
142
+ * @deprecated ⚠️ `FormField` in Main 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--custom) instead.
143
+ */
140
144
  export class FormField extends React.Component<React.PropsWithChildren<FormFieldProps>> {
141
145
  static LabelPosition = FormFieldLabelPosition;
142
146
  static ErrorType = ErrorType;
@@ -2,7 +2,9 @@ import * as React from 'react';
2
2
  import {ErrorType, Themeable, styled} from '@workday/canvas-kit-react/common';
3
3
  import {space} from '@workday/canvas-kit-react/tokens';
4
4
  import {Subtext, Text} from '@workday/canvas-kit-react/text';
5
-
5
+ /**
6
+ * @deprecated ⚠️ `HintProps` in Main 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--custom) instead.
7
+ */
6
8
  export interface HintProps extends Themeable, React.HTMLAttributes<HTMLParagraphElement> {
7
9
  /**
8
10
  * The type of error associated with the Hint (if applicable).
@@ -23,7 +25,9 @@ export interface HintProps extends Themeable, React.HTMLAttributes<HTMLParagraph
23
25
  const Message = styled(Subtext)<Pick<HintProps, 'error'>>(
24
26
  ({error, theme}) => error === ErrorType.Error && {color: theme.canvas.palette.error.main}
25
27
  );
26
-
28
+ /**
29
+ * @deprecated ⚠️ `Hint` in Main 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--custom) instead.
30
+ */
27
31
  class Hint extends React.Component<HintProps> {
28
32
  static ErrorType = ErrorType;
29
33
 
@@ -2,7 +2,9 @@ import * as React from 'react';
2
2
  import {colors, space, type} from '@workday/canvas-kit-react/tokens';
3
3
  import {accessibleHide as accessibleHideCSS, styled} from '@workday/canvas-kit-react/common';
4
4
  import {FormFieldLabelPosition, FormFieldLabelPositionBehavior} from './types';
5
-
5
+ /**
6
+ * @deprecated ⚠️ `LabelProps` in Main 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--custom) instead.
7
+ */
6
8
  export interface LabelProps extends FormFieldLabelPositionBehavior {
7
9
  /**
8
10
  * The position of the Label.
@@ -87,7 +89,9 @@ const LegendComponent = styled('legend')<LabelProps>(...labelStyles, ({labelPosi
87
89
  });
88
90
 
89
91
  const LabelComponent = styled('label')<LabelProps>(...labelStyles);
90
-
92
+ /**
93
+ * @deprecated ⚠️ `Label` in Main 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--custom) instead.
94
+ */
91
95
  class Label extends React.Component<React.PropsWithChildren<LabelProps>> {
92
96
  static Position = FormFieldLabelPosition;
93
97
 
@@ -1,12 +1,17 @@
1
1
  /**
2
+ *
2
3
  * The position of the FormField label (Top vs Left vs Hidden).
4
+ *
5
+ * @deprecated ⚠️ `FormFieldLabelPosition` in Main 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--custom) instead.
3
6
  */
4
7
  export enum FormFieldLabelPosition {
5
8
  Top,
6
9
  Left,
7
10
  Hidden,
8
11
  }
9
-
12
+ /**
13
+ * @deprecated ⚠️ `FormFieldLabelPositionBehavior` in Main 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--custom) instead.
14
+ */
10
15
  export interface FormFieldLabelPositionBehavior {
11
16
  labelPosition?: FormFieldLabelPosition;
12
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-react",
3
- "version": "11.0.0-alpha.631-next.0",
3
+ "version": "11.0.0-alpha.635-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",
@@ -50,8 +50,8 @@
50
50
  "@emotion/styled": "^11.6.0",
51
51
  "@popperjs/core": "^2.5.4",
52
52
  "@workday/canvas-colors-web": "^2.0.0",
53
- "@workday/canvas-kit-popup-stack": "^11.0.0-alpha.631-next.0",
54
- "@workday/canvas-kit-styling": "^11.0.0-alpha.631-next.0",
53
+ "@workday/canvas-kit-popup-stack": "^11.0.0-alpha.635-next.0",
54
+ "@workday/canvas-kit-styling": "^11.0.0-alpha.635-next.0",
55
55
  "@workday/canvas-system-icons-web": "^3.0.0",
56
56
  "@workday/canvas-tokens-web": "^1.0.0",
57
57
  "@workday/design-assets-types": "^0.2.8",
@@ -69,5 +69,5 @@
69
69
  "@workday/canvas-accent-icons-web": "^3.0.0",
70
70
  "@workday/canvas-applet-icons-web": "^2.0.0"
71
71
  },
72
- "gitHead": "338888ac52e610f0a8898ee4a3aa2463886aed56"
72
+ "gitHead": "b522b22caa5815a97f8ce46c0da521da319b4282"
73
73
  }
@@ -38,9 +38,9 @@ export const SelectInput = createSubcomponent(TextInput)({
38
38
  modelHook: useSelectModel,
39
39
  elemPropsHook: useSelectInput,
40
40
  })<SelectInputProps>(
41
- ({placeholder = 'Choose an option', inputStartIcon, ...elemProps}, Element, model) => {
41
+ ({placeholder = 'Choose an option', inputStartIcon, width, ...elemProps}, Element, model) => {
42
42
  return (
43
- <InputGroup>
43
+ <InputGroup width={width}>
44
44
  {inputStartIcon && model.state.selectedIds.length > 0 && (
45
45
  <InputGroup.InnerStart pointerEvents="none">
46
46
  <SystemIcon icon={inputStartIcon} />