@7shifts/sous-chef 3.55.3-beta.2 → 3.56.0-beta0
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/forms/CurrencyField/CurrencyField.d.ts +1 -1
- package/dist/forms/TextField/useTextField.d.ts +1 -1
- package/dist/forms/TimeField/TimeField.d.ts +10 -6
- package/dist/forms/TimeField/TimeFieldDropdown/TimeFieldDropdown.d.ts +4 -2
- package/dist/forms/TimeField/TimeFieldDropdownTrigger/TimeFieldDropdownTrigger.d.ts +2 -2
- package/dist/forms/TimeField/TimeFieldInput/TimeFieldInput.d.ts +1 -1
- package/dist/forms/TimeRangeField/TimeRangeEnd/TimeRangeEnd.d.ts +6 -3
- package/dist/forms/TimeRangeField/TimeRangeField.d.ts +3 -1
- package/dist/index.css +912 -912
- package/dist/index.js +1925 -2100
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +5681 -5947
- package/dist/index.modern.js.map +1 -1
- package/dist/typography/Text/Text.d.ts +1 -1
- package/package.json +2 -2
|
@@ -6,7 +6,7 @@ import type { Props as TextFieldProps } from '../TextField/TextField';
|
|
|
6
6
|
* At the end, it is just a string formatted nicely. **You are in charge of validating the value and parsing it back to a value that you can use on your application**.
|
|
7
7
|
*/
|
|
8
8
|
declare const CurrencyField: React.ForwardRefExoticComponent<{
|
|
9
|
-
autoComplete?: ("
|
|
9
|
+
autoComplete?: ("on" | "off") | undefined;
|
|
10
10
|
autoFocus?: boolean | undefined;
|
|
11
11
|
caption?: React.ReactNode;
|
|
12
12
|
defaultValue?: string | undefined;
|
|
@@ -9,7 +9,7 @@ export declare const useTextField: ({ autoComplete, autoFocus, defaultValue, dis
|
|
|
9
9
|
inputProps: {
|
|
10
10
|
'aria-describedby': string;
|
|
11
11
|
'aria-invalid': boolean;
|
|
12
|
-
autoComplete: ("
|
|
12
|
+
autoComplete: ("on" | "off") | undefined;
|
|
13
13
|
autoFocus: boolean | undefined;
|
|
14
14
|
className: string;
|
|
15
15
|
'data-testid': string | undefined;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import type { Props as TextFieldProps } from '../TextField/TextField';
|
|
3
|
-
import { StartTime, TimeInterval } from '../../utils/date';
|
|
3
|
+
import { StartTime, TimeInterval, TimeRange } from '../../utils/date';
|
|
4
4
|
type Props = TextFieldProps & {
|
|
5
5
|
onClick?: () => void;
|
|
6
6
|
interval?: TimeInterval;
|
|
7
7
|
startTime?: StartTime;
|
|
8
8
|
prefix?: React.ReactElement;
|
|
9
9
|
endField?: boolean;
|
|
10
|
-
duration?: string;
|
|
10
|
+
duration?: ReactNode | string;
|
|
11
|
+
hideDuration?: boolean;
|
|
11
12
|
subtractDuration?: number;
|
|
13
|
+
calculateDuration?: (e: TimeRange) => string;
|
|
12
14
|
};
|
|
13
15
|
export declare const TimeRangeSelector: React.ForwardRefExoticComponent<{
|
|
14
|
-
autoComplete?: ("
|
|
16
|
+
autoComplete?: ("on" | "off") | undefined;
|
|
15
17
|
autoFocus?: boolean | undefined;
|
|
16
18
|
caption?: React.ReactNode;
|
|
17
19
|
defaultValue?: string | undefined;
|
|
@@ -36,13 +38,15 @@ export declare const TimeRangeSelector: React.ForwardRefExoticComponent<{
|
|
|
36
38
|
startTime?: string | undefined;
|
|
37
39
|
prefix?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
38
40
|
endField?: boolean | undefined;
|
|
39
|
-
duration?:
|
|
41
|
+
duration?: ReactNode | string;
|
|
42
|
+
hideDuration?: boolean | undefined;
|
|
40
43
|
subtractDuration?: number | undefined;
|
|
44
|
+
calculateDuration?: ((e: TimeRange) => string) | undefined;
|
|
41
45
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
42
46
|
/**
|
|
43
47
|
* `TimeField` are like `TextField` but it auto-format the value when the user leaves the field.
|
|
44
48
|
*
|
|
45
49
|
* At the end, it is just a string formatted nicely. **You are in charge of validating the value and parsing it back to a value that you can use on your application**.
|
|
46
50
|
*/
|
|
47
|
-
declare const TimeField: React.ForwardRefExoticComponent<Omit<Props, "prefix" | "
|
|
51
|
+
declare const TimeField: React.ForwardRefExoticComponent<Omit<Props, "prefix" | "suffix" | "subtractDuration"> & React.RefAttributes<HTMLInputElement>>;
|
|
48
52
|
export default TimeField;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { StartTime, TimeInterval } from '../../../utils/date';
|
|
2
|
+
import { StartTime, TimeInterval, TimeRange } from '../../../utils/date';
|
|
3
3
|
type TimeFieldDropdownProps = {
|
|
4
4
|
trigger: React.ReactElement;
|
|
5
5
|
interval: TimeInterval;
|
|
@@ -8,7 +8,9 @@ type TimeFieldDropdownProps = {
|
|
|
8
8
|
inputValue?: string;
|
|
9
9
|
width?: number;
|
|
10
10
|
endField: boolean;
|
|
11
|
+
hideDuration?: boolean;
|
|
11
12
|
subtractDuration?: number;
|
|
13
|
+
calculateDuration?: (e: TimeRange) => string;
|
|
12
14
|
};
|
|
13
|
-
declare const TimeFieldDropdown: ({ trigger, interval, startTime, onOptionClick, inputValue, width, endField, subtractDuration }: TimeFieldDropdownProps) => React.JSX.Element;
|
|
15
|
+
declare const TimeFieldDropdown: ({ trigger, interval, startTime, onOptionClick, inputValue, width, endField, hideDuration, subtractDuration, calculateDuration }: TimeFieldDropdownProps) => React.JSX.Element;
|
|
14
16
|
export default TimeFieldDropdown;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import type { Props as TextFieldProps } from '../../TextField/TextField';
|
|
3
3
|
declare const TimeFieldDropdownTrigger: React.ForwardRefExoticComponent<Omit<TextFieldProps, "suffix"> & {
|
|
4
4
|
onClick?: (() => void) | undefined;
|
|
5
5
|
onInputChange?: ((e: string) => void) | undefined;
|
|
6
6
|
selectedTimeOption?: string | undefined;
|
|
7
7
|
startTime?: string | undefined;
|
|
8
|
-
duration?:
|
|
8
|
+
duration?: ReactNode | string;
|
|
9
9
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
10
10
|
export default TimeFieldDropdownTrigger;
|
|
@@ -4,7 +4,7 @@ type Props = {
|
|
|
4
4
|
allOtherProps: any;
|
|
5
5
|
onInputChange?: (e: string) => void;
|
|
6
6
|
prefix?: React.ReactNode;
|
|
7
|
-
duration?: string;
|
|
7
|
+
duration?: React.ReactNode | string;
|
|
8
8
|
};
|
|
9
9
|
declare const TimeFieldInput: ({ inputProps, allOtherProps, prefix, duration }: Props) => React.JSX.Element;
|
|
10
10
|
export default TimeFieldInput;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { TimeRangeInputProps } from '../types';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { TimeRange } from '../../../utils/date';
|
|
4
|
+
declare const TimeRangeEnd: ({ startTime, onChange, interval, placeholder, duration, disabled, testId, value, subtractDuration, hideDuration, calculateDuration }: TimeRangeInputProps & {
|
|
5
|
+
duration?: ReactNode | string;
|
|
5
6
|
subtractDuration?: number | undefined;
|
|
7
|
+
hideDuration?: boolean | undefined;
|
|
8
|
+
calculateDuration?: ((e: TimeRange) => string) | undefined;
|
|
6
9
|
}) => React.JSX.Element;
|
|
7
10
|
export default TimeRangeEnd;
|
|
@@ -17,6 +17,8 @@ type Props = {
|
|
|
17
17
|
testId?: string;
|
|
18
18
|
/** Subtract this time(in minutes) from total duration*/
|
|
19
19
|
subtractDuration?: number;
|
|
20
|
+
hideDuration?: boolean;
|
|
21
|
+
calculateDuration?: (e: TimeRange) => string;
|
|
20
22
|
};
|
|
21
|
-
declare const TimeRangeField: ({ name, id: inputId, value, interval, startTime, onChange, onBlur, label, caption, error, placeholder, disabled, testId, subtractDuration }: Props) => React.JSX.Element;
|
|
23
|
+
declare const TimeRangeField: ({ name, id: inputId, value, interval, startTime, onChange, onBlur, label, caption, error, placeholder, disabled, testId, subtractDuration, hideDuration, calculateDuration }: Props) => React.JSX.Element;
|
|
22
24
|
export default TimeRangeField;
|