@7shifts/sous-chef 2.12.2 → 2.13.1

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/README.md CHANGED
@@ -31,13 +31,13 @@ class Example extends Component {
31
31
  {
32
32
  employeeName: 'Steve Lawrence',
33
33
  date: 'Jun 22, 2019',
34
- hours: 15,
34
+ hours: 15
35
35
  },
36
36
  {
37
37
  employeeName: 'Alex Andrade',
38
38
  date: 'Jan 15, 2020',
39
- hours: <span style={{ color: 'red' }}>8</span>,
40
- },
39
+ hours: <span style={{ color: 'red' }}>8</span>
40
+ }
41
41
  ];
42
42
  render() {
43
43
  return <ResourceTable items={items} />;
@@ -50,6 +50,10 @@ class Example extends Component {
50
50
  You can find the components documentation in [here](https://zeroheight.com/31613d024/p/94f423-introducing-sous-chef--components).
51
51
  just to trigger a CI
52
52
 
53
+ ## Contributing
54
+
55
+ Check out our [contributing guide](./CONTRIBUTING.md).
56
+
53
57
  ## License
54
58
 
55
59
  MIT © [7shifts](https://github.com/7shifts)
@@ -8,7 +8,7 @@ declare type Props = {
8
8
  onBlur?: (e: boolean) => void;
9
9
  label?: React.ReactNode;
10
10
  caption?: React.ReactNode;
11
- error?: string;
11
+ error?: React.ReactNode;
12
12
  disabled?: boolean;
13
13
  };
14
14
  /** CheckboxField form element. */
@@ -12,7 +12,7 @@ declare type Props = {
12
12
  onBlur?: () => void;
13
13
  label?: React.ReactNode;
14
14
  caption?: React.ReactNode;
15
- error?: string;
15
+ error?: React.ReactNode;
16
16
  placeholder?: string;
17
17
  disabled?: boolean;
18
18
  defaultValue?: Date;
@@ -13,7 +13,7 @@ declare type Props = {
13
13
  onBlur?: () => void;
14
14
  label?: React.ReactNode;
15
15
  caption?: React.ReactNode;
16
- error?: string;
16
+ error?: React.ReactNode;
17
17
  placeholder?: string;
18
18
  disabled?: boolean;
19
19
  readOnly?: boolean;
@@ -14,7 +14,7 @@ declare type Props<T> = {
14
14
  CustomOption?: React.ElementType;
15
15
  label?: React.ReactNode;
16
16
  caption?: React.ReactNode;
17
- error?: string;
17
+ error?: React.ReactNode;
18
18
  placeholder?: string;
19
19
  noOptionsMessage?: string | NoOptionsMessageFunction;
20
20
  disabled?: boolean;
@@ -8,7 +8,7 @@ declare type Props = {
8
8
  onChange?: (e: string) => void;
9
9
  onBlur?: (e: string) => void;
10
10
  label?: React.ReactNode;
11
- error?: string;
11
+ error?: React.ReactNode;
12
12
  placeholder?: string;
13
13
  disabled?: boolean;
14
14
  defaultValue?: string;
@@ -9,7 +9,7 @@ declare type Props<T> = {
9
9
  onChange?: (e: SelectOption<T>[]) => void;
10
10
  label?: React.ReactNode;
11
11
  caption?: React.ReactNode;
12
- error?: string;
12
+ error?: React.ReactNode;
13
13
  disabled?: boolean;
14
14
  };
15
15
  /** PillSelectField form element. */
@@ -4,7 +4,7 @@ declare type Props = {
4
4
  value?: string | number;
5
5
  onChange?: (e: string | number) => void;
6
6
  label?: React.ReactNode;
7
- error?: string;
7
+ error?: React.ReactNode;
8
8
  /** When true it will place the options on the same line up to 4 options per line. */
9
9
  inline?: boolean;
10
10
  disabled?: boolean;
@@ -7,7 +7,7 @@ export declare type Props<T> = {
7
7
  asToolbarFilter?: boolean;
8
8
  caption?: React.ReactNode;
9
9
  disabled?: boolean;
10
- error?: string;
10
+ error?: React.ReactNode;
11
11
  /** If not provided it will generate a random id so the l¡abel links properly with the text input */
12
12
  id?: string;
13
13
  isClearable?: boolean;
@@ -4,7 +4,7 @@ export declare const useSelectField: <T extends unknown>({ asToolbarFilter, capt
4
4
  selectProps: Pick<import("react-select").Props<import("react-select").OptionTypeBase, boolean, import("react-select").GroupTypeBase<any>>, React.ReactText> & import("react-select/src/stateManager").Props<import("react-select").OptionTypeBase, boolean, import("react-select").GroupTypeBase<any>> & import("react-select").Props<import("react-select").OptionTypeBase, boolean, import("react-select").GroupTypeBase<any>>;
5
5
  fieldProps: {
6
6
  caption: React.ReactNode;
7
- error: string | undefined;
7
+ error: React.ReactNode;
8
8
  id: string;
9
9
  label: React.ReactNode;
10
10
  name: string;
@@ -8,7 +8,7 @@ declare type Props = {
8
8
  onBlur?: (e: string) => void;
9
9
  label?: React.ReactNode;
10
10
  caption?: React.ReactNode;
11
- error?: string;
11
+ error?: React.ReactNode;
12
12
  placeholder?: string;
13
13
  disabled?: boolean;
14
14
  defaultValue?: string;
@@ -6,7 +6,7 @@ export declare type Props = {
6
6
  caption?: React.ReactNode;
7
7
  defaultValue?: string;
8
8
  disabled?: boolean;
9
- error?: string;
9
+ error?: React.ReactNode;
10
10
  /** If not provided it will generate a random id so the label links properly with the text input */
11
11
  id?: string;
12
12
  label?: React.ReactNode;
@@ -29,7 +29,7 @@ export declare const useTextField: ({ autoComplete, autoFocus, defaultValue, dis
29
29
  };
30
30
  fieldProps: {
31
31
  caption: import("react").ReactNode;
32
- error: string | undefined;
32
+ error: import("react").ReactNode;
33
33
  label: import("react").ReactNode;
34
34
  id: string;
35
35
  name: string;
@@ -13,7 +13,7 @@ declare type Props = {
13
13
  onBlur?: () => void;
14
14
  label?: React.ReactNode;
15
15
  caption?: React.ReactNode;
16
- error?: string;
16
+ error?: React.ReactNode;
17
17
  placeholder?: string;
18
18
  disabled?: boolean;
19
19
  defaultValue?: Date;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  declare type FieldControls = {
3
3
  id: string;
4
- error?: string;
4
+ error?: React.ReactNode;
5
5
  checked?: boolean;
6
6
  onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
7
7
  onBlur: (e: React.ChangeEvent<HTMLInputElement>) => void;
@@ -12,7 +12,7 @@ declare type Props = {
12
12
  checked?: boolean;
13
13
  onChange?: (e: boolean) => void;
14
14
  onBlur?: (e: boolean) => void;
15
- error?: string;
15
+ error?: React.ReactNode;
16
16
  };
17
17
  export declare const useCheckBoxFieldControllers: ({ name, id: inputId, checked, onChange, onBlur, error }: Props) => FieldControls;
18
18
  export {};
@@ -1,6 +1,7 @@
1
+ /// <reference types="react" />
1
2
  declare type FieldControls = {
2
3
  id: string;
3
- error?: string;
4
+ error?: React.ReactNode;
4
5
  value?: Date;
5
6
  onChange: (e: Date) => void;
6
7
  onBlur: () => void;
@@ -11,7 +12,7 @@ declare type Props = {
11
12
  value?: Date;
12
13
  onChange?: (e: Date) => void;
13
14
  onBlur?: () => void;
14
- error?: string;
15
+ error?: React.ReactNode;
15
16
  };
16
17
  export declare const useDateFieldControllers: ({ name, id: inputId, value, onChange, onBlur, error }: Props) => FieldControls;
17
18
  export {};
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  declare type InputElement = HTMLInputElement | HTMLTextAreaElement;
3
3
  declare type FieldControls = {
4
4
  id: string;
5
- error?: string;
5
+ error?: React.ReactNode;
6
6
  value?: string;
7
7
  onChange: (e: React.ChangeEvent<InputElement>) => void;
8
8
  onBlur: (e: React.ChangeEvent<InputElement>) => void;
@@ -17,7 +17,7 @@ declare type Props = {
17
17
  onBlur?: (value: string) => void;
18
18
  onFocus?: (value: string) => void;
19
19
  onKeyDown?: (key: string) => void;
20
- error?: string;
20
+ error?: React.ReactNode;
21
21
  type?: 'text' | 'currency';
22
22
  };
23
23
  export declare const useFieldControllers: ({ name, id: inputId, value, onChange, onBlur, onFocus, onKeyDown, error, type }: Props) => FieldControls;
@@ -1,7 +1,8 @@
1
+ /// <reference types="react" />
1
2
  import type { SelectOption } from '../SelectField/types';
2
3
  declare type FieldControls<T> = {
3
4
  id: string;
4
- error?: string;
5
+ error?: React.ReactNode;
5
6
  value?: SelectOption<T>[];
6
7
  onChange: (e: SelectOption<T>[]) => void;
7
8
  onBlur: (e: SelectOption<T>[]) => void;
@@ -12,7 +13,7 @@ declare type Props<T> = {
12
13
  value?: SelectOption<T>[];
13
14
  onChange?: (e: SelectOption<T>[]) => void;
14
15
  onBlur?: (e: SelectOption<T>[]) => void;
15
- error?: string;
16
+ error?: React.ReactNode;
16
17
  };
17
18
  export declare const useMultiSelectFieldControllers: <T>({ name, id: inputId, value, onChange, onBlur, error }: Props<T>) => FieldControls<T>;
18
19
  export {};
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  declare type RadioValue = string | number;
3
3
  declare type FieldControls = {
4
- error?: string;
4
+ error?: React.ReactNode;
5
5
  value?: RadioValue;
6
6
  onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
7
7
  };
@@ -9,7 +9,7 @@ declare type Props = {
9
9
  name: string;
10
10
  value?: RadioValue;
11
11
  onChange?: (value: RadioValue) => void;
12
- error?: string;
12
+ error?: React.ReactNode;
13
13
  };
14
14
  export declare const useRadioGroupFieldControllers: ({ name, value, onChange, error }: Props) => FieldControls;
15
15
  export {};
@@ -1,7 +1,8 @@
1
+ /// <reference types="react" />
1
2
  import { DateRange } from '../../utils/date';
2
3
  declare type FieldControls = {
3
4
  id: string;
4
- error?: string;
5
+ error?: React.ReactNode;
5
6
  value: DateRange;
6
7
  onChange: (e: DateRange) => void;
7
8
  onBlur: () => void;
@@ -12,7 +13,7 @@ declare type Props = {
12
13
  value?: DateRange;
13
14
  onChange?: (e: DateRange) => void;
14
15
  onBlur?: () => void;
15
- error?: string;
16
+ error?: React.ReactNode;
16
17
  };
17
18
  export declare const useRangeFieldControllers: ({ name, id: inputId, value, onChange, onBlur, error }: Props) => FieldControls;
18
19
  export {};
@@ -1,7 +1,8 @@
1
+ /// <reference types="react" />
1
2
  import type { SelectOption } from '../SelectField/types';
2
3
  declare type FieldControls<T> = {
3
4
  id: string;
4
- error?: string;
5
+ error?: React.ReactNode;
5
6
  value?: SelectOption<T>;
6
7
  onChange: (e: SelectOption<T>) => void;
7
8
  onBlur: (e: SelectOption<T>) => void;
@@ -12,7 +13,7 @@ declare type Props<T> = {
12
13
  value?: SelectOption<T>;
13
14
  onChange?: (e: SelectOption<T>) => void;
14
15
  onBlur?: (e: SelectOption<T>) => void;
15
- error?: string;
16
+ error?: React.ReactNode;
16
17
  };
17
18
  export declare const useSelectFieldControllers: <T>({ name, id: inputId, value, onChange, onBlur, error }: Props<T>) => FieldControls<T>;
18
19
  export {};
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { IconSize } from '../types';
3
+ declare type Props = {
4
+ size?: IconSize;
5
+ color?: string;
6
+ } & React.SVGProps<SVGSVGElement>;
7
+ declare const IconReply: {
8
+ (props: Props): JSX.Element;
9
+ displayName: string;
10
+ };
11
+ export default IconReply;
@@ -91,6 +91,7 @@ export { default as IconPlus } from './IconPlus';
91
91
  export { default as IconPrint } from './IconPrint';
92
92
  export { default as IconQuestionCircle } from './IconQuestionCircle';
93
93
  export { default as IconRepeat } from './IconRepeat';
94
+ export { default as IconReply } from './IconReply';
94
95
  export { default as IconSearch } from './IconSearch';
95
96
  export { default as IconSignOut } from './IconSignOut';
96
97
  export { default as IconSitemap } from './IconSitemap';
package/dist/index.js CHANGED
@@ -2509,6 +2509,21 @@ var IconRepeat = function IconRepeat(props) {
2509
2509
 
2510
2510
  IconRepeat.displayName = 'IconRepeat';
2511
2511
 
2512
+ var IconReply = function IconReply(props) {
2513
+ return React__default.createElement("svg", Object.assign({
2514
+ viewBox: "0 0 20 20",
2515
+ fill: "none",
2516
+ xmlns: "http://www.w3.org/2000/svg",
2517
+ "data-testid": "icon-reply",
2518
+ style: getIconStyles(props)
2519
+ }, props), React__default.createElement("path", {
2520
+ d: "m.788 9.854 5.893 6.161c.828.866 2.307.288 2.307-.926v-2.94c5.17.06 7.335.56 6.067 5.058-.28.988.852 1.749 1.663 1.156 1.115-.815 2.985-2.665 2.985-5.845 0-5.729-5.175-6.731-10.715-6.798V2.77c0-1.215-1.48-1.79-2.307-.926L.788 8.003a1.34 1.34 0 0 0 0 1.851Zm.775-1.11 5.893-6.161a.268.268 0 0 1 .461.185v4.018c5.26 0 10.714.374 10.714 5.732 0 2.49-1.339 4.09-2.545 4.972 1.719-6.093-2.43-6.418-8.169-6.418v4.017a.268.268 0 0 1-.461.186L1.563 9.114a.267.267 0 0 1 0-.37Z",
2521
+ fill: "currentColor"
2522
+ }));
2523
+ };
2524
+
2525
+ IconReply.displayName = 'IconReply';
2526
+
2512
2527
  var IconSearch = function IconSearch(props) {
2513
2528
  return React__default.createElement("svg", Object.assign({
2514
2529
  viewBox: "0 0 20 20",
@@ -6944,6 +6959,7 @@ exports.IconPlus = IconPlus;
6944
6959
  exports.IconPrint = IconPrint;
6945
6960
  exports.IconQuestionCircle = IconQuestionCircle;
6946
6961
  exports.IconRepeat = IconRepeat;
6962
+ exports.IconReply = IconReply;
6947
6963
  exports.IconSearch = IconSearch;
6948
6964
  exports.IconSignOut = IconSignOut;
6949
6965
  exports.IconSitemap = IconSitemap;