@7shifts/sous-chef 2.13.0 → 2.14.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/README.md +7 -3
- package/dist/forms/CheckboxField/CheckboxField.d.ts +1 -1
- package/dist/forms/DateField/DateField.d.ts +1 -1
- package/dist/forms/DateRangeField/DateRangeField.d.ts +1 -1
- package/dist/forms/MultiSelectField/MultiSelectField.d.ts +1 -1
- package/dist/forms/PasswordField/PasswordField.d.ts +1 -1
- package/dist/forms/PillSelectField/PillSelectField.d.ts +1 -1
- package/dist/forms/RadioGroupField/RadioGroupField.d.ts +1 -1
- package/dist/forms/SelectField/SelectField.d.ts +1 -1
- package/dist/forms/SelectField/useSelectField.d.ts +1 -1
- package/dist/forms/TextAreaField/TextAreaField.d.ts +1 -1
- package/dist/forms/TextField/TextField.d.ts +1 -1
- package/dist/forms/TextField/useTextField.d.ts +1 -1
- package/dist/forms/WeekField/WeekField.d.ts +1 -1
- package/dist/forms/hooks/useCheckBoxFieldControllers.d.ts +2 -2
- package/dist/forms/hooks/useDateFieldControllers.d.ts +3 -2
- package/dist/forms/hooks/useFieldControllers.d.ts +2 -2
- package/dist/forms/hooks/useMultiSelectFieldControllers.d.ts +3 -2
- package/dist/forms/hooks/useRadioGroupFieldControllers.d.ts +2 -2
- package/dist/forms/hooks/useRangeFieldControllers.d.ts +3 -2
- package/dist/forms/hooks/useSelectFieldControllers.d.ts +3 -2
- package/dist/icons/components/IconUserFriends.d.ts +11 -0
- package/dist/icons/components/index.d.ts +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +16 -1
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
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)
|
|
@@ -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?:
|
|
17
|
+
error?: React.ReactNode;
|
|
18
18
|
placeholder?: string;
|
|
19
19
|
noOptionsMessage?: string | NoOptionsMessageFunction;
|
|
20
20
|
disabled?: boolean;
|
|
@@ -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?:
|
|
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?:
|
|
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:
|
|
7
|
+
error: React.ReactNode;
|
|
8
8
|
id: string;
|
|
9
9
|
label: React.ReactNode;
|
|
10
10
|
name: string;
|
|
@@ -6,7 +6,7 @@ export declare type Props = {
|
|
|
6
6
|
caption?: React.ReactNode;
|
|
7
7
|
defaultValue?: string;
|
|
8
8
|
disabled?: boolean;
|
|
9
|
-
error?:
|
|
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:
|
|
32
|
+
error: import("react").ReactNode;
|
|
33
33
|
label: import("react").ReactNode;
|
|
34
34
|
id: string;
|
|
35
35
|
name: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare type FieldControls = {
|
|
3
3
|
id: string;
|
|
4
|
-
error?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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 IconUserFriends: {
|
|
8
|
+
(props: Props): JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
export default IconUserFriends;
|
|
@@ -112,6 +112,7 @@ export { default as IconUnderline } from './IconUnderline';
|
|
|
112
112
|
export { default as IconUndo } from './IconUndo';
|
|
113
113
|
export { default as IconUniversity } from './IconUniversity';
|
|
114
114
|
export { default as IconUserComputer } from './IconUserComputer';
|
|
115
|
+
export { default as IconUserFriends } from './IconUserFriends';
|
|
115
116
|
export { default as IconUserLight } from './IconUserLight';
|
|
116
117
|
export { default as IconUserPlus } from './IconUserPlus';
|
|
117
118
|
export { default as IconUserSlash } from './IconUserSlash';
|
package/dist/index.js
CHANGED
|
@@ -2870,6 +2870,21 @@ var IconUserComputer = function IconUserComputer(props) {
|
|
|
2870
2870
|
|
|
2871
2871
|
IconUserComputer.displayName = 'IconUserComputer';
|
|
2872
2872
|
|
|
2873
|
+
var IconUserFriends = function IconUserFriends(props) {
|
|
2874
|
+
return React__default.createElement("svg", Object.assign({
|
|
2875
|
+
viewBox: "0 0 20 20",
|
|
2876
|
+
fill: "none",
|
|
2877
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2878
|
+
"data-testid": "icon-user-friends",
|
|
2879
|
+
style: getIconStyles(props)
|
|
2880
|
+
}, props), React__default.createElement("path", {
|
|
2881
|
+
d: "M15 10a3 3 0 1 0-.002-6.002A3 3 0 0 0 15 10Zm0-5c1.103 0 2 .897 2 2s-.897 2-2 2-2-.897-2-2 .897-2 2-2Zm-9 5c1.934 0 3.5-1.566 3.5-3.5S7.934 3 6 3a3.498 3.498 0 0 0-3.5 3.5C2.5 8.434 4.066 10 6 10Zm0-6c1.378 0 2.5 1.122 2.5 2.5S7.378 9 6 9a2.503 2.503 0 0 1-2.5-2.5C3.5 5.122 4.622 4 6 4Zm2.503 6.625C7.46 10.625 7.2 11 6 11c-1.2 0-1.46-.375-2.503-.375-1.135 0-2.238.506-2.885 1.466A3.581 3.581 0 0 0 0 14.1v1.4A1.5 1.5 0 0 0 1.5 17h9a1.5 1.5 0 0 0 1.5-1.5v-1.4c0-.744-.225-1.434-.613-2.01-.646-.959-1.75-1.465-2.884-1.465ZM11 15.5c0 .275-.225.5-.5.5h-9a.501.501 0 0 1-.5-.5v-1.4c0-.519.153-1.022.44-1.45.432-.64 1.2-1.025 2.054-1.025.856 0 1.162.375 2.506.375 1.344 0 1.65-.375 2.503-.375.853 0 1.622.384 2.053 1.025.288.428.44.931.44 1.45v1.4H11Zm8.49-3.59c-.54-.8-1.459-1.223-2.402-1.223-.87 0-1.088.313-2.088.313s-1.219-.313-2.088-.313a3.05 3.05 0 0 0-1.19.254c.475.48.578.737.631.83a2.05 2.05 0 0 1 .56-.08c.68 0 .937.312 2.087.312 1.15 0 1.406-.312 2.087-.312.657 0 1.244.29 1.576.78.221.329.34.716.34 1.117v1.162a.25.25 0 0 1-.25.25H13c0 .553.01.703-.05 1h5.8c.69 0 1.25-.56 1.25-1.25v-1.166c0-.621-.188-1.197-.51-1.675Z",
|
|
2882
|
+
fill: "currentColor"
|
|
2883
|
+
}));
|
|
2884
|
+
};
|
|
2885
|
+
|
|
2886
|
+
IconUserFriends.displayName = 'IconUserFriends';
|
|
2887
|
+
|
|
2873
2888
|
var IconUserLight = function IconUserLight(props) {
|
|
2874
2889
|
return React__default.createElement("svg", Object.assign({
|
|
2875
2890
|
viewBox: "0 0 20 20",
|
|
@@ -6980,6 +6995,7 @@ exports.IconUnderline = IconUnderline;
|
|
|
6980
6995
|
exports.IconUndo = IconUndo;
|
|
6981
6996
|
exports.IconUniversity = IconUniversity;
|
|
6982
6997
|
exports.IconUserComputer = IconUserComputer;
|
|
6998
|
+
exports.IconUserFriends = IconUserFriends;
|
|
6983
6999
|
exports.IconUserLight = IconUserLight;
|
|
6984
7000
|
exports.IconUserPlus = IconUserPlus;
|
|
6985
7001
|
exports.IconUserSlash = IconUserSlash;
|