@7shifts/sous-chef 2.5.1 → 2.8.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/dist/feedback/Spinner/Spinner.d.ts +1 -1
- package/dist/forms/CurrencyField/CurrencyField.d.ts +11 -0
- package/dist/forms/CurrencyField/index.d.ts +1 -0
- package/dist/forms/DatePickerCalendar/DatePickerCalendar.d.ts +2 -0
- package/dist/forms/DateRangeField/DateRangeField.d.ts +3 -1
- package/dist/forms/DateRangeField/FromDate/FromDate.d.ts +3 -2
- package/dist/forms/DateRangeField/ToDate/ToDate.d.ts +3 -1
- package/dist/forms/PercentageField/PercentageField.d.ts +13 -0
- package/dist/forms/PercentageField/index.d.ts +1 -0
- package/dist/forms/index.d.ts +3 -1
- package/dist/icons/components/IconUniversity.d.ts +11 -0
- package/dist/icons/components/index.d.ts +1 -0
- package/dist/index.css +7 -3
- package/dist/index.js +389 -31
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +387 -32
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/date.d.ts +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Props as TextFieldProps } from '../TextField/TextField';
|
|
3
|
+
/**
|
|
4
|
+
* `CurrencyField` is like `TextField` but it auto-format the value when the user leaves the field.
|
|
5
|
+
*
|
|
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
|
+
*/
|
|
8
|
+
declare const CurrencyField: React.ForwardRefExoticComponent<TextFieldProps & {
|
|
9
|
+
currencySymbol: string;
|
|
10
|
+
} & Pick<TextFieldProps, "disabled" | "id" | "caption" | "label" | "error" | "onChange" | "name" | "value" | "onBlur" | "placeholder" | "autoFocus" | "onFocus" | "onKeyDown" | "defaultValue" | "autoComplete" | "maxLength"> & React.RefAttributes<HTMLInputElement>>;
|
|
11
|
+
export default CurrencyField;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CurrencyField';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { WeekStart, DateRange } from '../../utils/date';
|
|
2
|
+
import { WeekStart, DateRange, BlockedDays } from '../../utils/date';
|
|
3
3
|
declare type Props = {
|
|
4
4
|
name: string;
|
|
5
5
|
/** If not provided it will generate a random id so the label links properly with the text input */
|
|
6
6
|
id?: string;
|
|
7
7
|
value?: DateRange;
|
|
8
|
+
/** It disable some dates so the user can't click on them. Refer to this [doc](https://react-day-picker.js.org/api/types/matcher) to see what values you can use. */
|
|
9
|
+
disabledDays?: BlockedDays;
|
|
8
10
|
/** Reference this for valid formats: https://date-fns.org/v2.18.0/docs/format */
|
|
9
11
|
format?: string;
|
|
10
12
|
onChange?: (e: DateRange) => void;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { WeekStart } from '../../../utils/date';
|
|
1
|
+
import { WeekStart, BlockedDays } from '../../../utils/date';
|
|
2
2
|
declare type Props = {
|
|
3
3
|
name: string;
|
|
4
4
|
id: string;
|
|
5
5
|
format: string;
|
|
6
|
+
disabledDays?: BlockedDays;
|
|
6
7
|
start?: Date;
|
|
7
8
|
end?: Date;
|
|
8
9
|
placeholder: string;
|
|
@@ -12,5 +13,5 @@ declare type Props = {
|
|
|
12
13
|
onChange: (e: Date) => void;
|
|
13
14
|
onDayClick: () => void;
|
|
14
15
|
};
|
|
15
|
-
declare const FromDate: ({ name, id, format, start, end, placeholder, weekStart, disabled, readOnly, onChange, onDayClick }: Props) => JSX.Element;
|
|
16
|
+
declare const FromDate: ({ name, id, format, disabledDays, start, end, placeholder, weekStart, disabled, readOnly, onChange, onDayClick }: Props) => JSX.Element;
|
|
16
17
|
export default FromDate;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { WeekStart } from '../../../utils/date';
|
|
2
|
+
import { WeekStart, BlockedDays } from '../../../utils/date';
|
|
3
3
|
declare type Props = {
|
|
4
4
|
name: string;
|
|
5
5
|
format: string;
|
|
6
|
+
disabledDays?: BlockedDays;
|
|
6
7
|
start?: Date;
|
|
7
8
|
end?: Date;
|
|
8
9
|
placeholder: string;
|
|
@@ -10,6 +11,7 @@ declare type Props = {
|
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
readOnly: boolean;
|
|
12
13
|
onChange: (e: Date) => void;
|
|
14
|
+
onBlur: () => void;
|
|
13
15
|
};
|
|
14
16
|
declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLInputElement>>;
|
|
15
17
|
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Props as TextFieldProps } from '../TextField/TextField';
|
|
3
|
+
/**
|
|
4
|
+
* `PercentageField` is an extended `TextField` input with validation and formatting in place to properly display percentage values.
|
|
5
|
+
* In its default state it only allows integers between 0 and 100, but it can be configured to allow decimals and negative values.
|
|
6
|
+
*/
|
|
7
|
+
declare const PercentageField: React.ForwardRefExoticComponent<{
|
|
8
|
+
max?: number | undefined;
|
|
9
|
+
min?: number | undefined;
|
|
10
|
+
precision?: number | undefined;
|
|
11
|
+
stepSize?: number | undefined;
|
|
12
|
+
} & Pick<TextFieldProps, "disabled" | "id" | "caption" | "label" | "error" | "onChange" | "name" | "value" | "onBlur" | "placeholder" | "prefix" | "autoFocus" | "onFocus" | "onKeyDown" | "defaultValue" | "autoComplete"> & React.RefAttributes<HTMLInputElement>>;
|
|
13
|
+
export default PercentageField;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './PercentageField';
|
package/dist/forms/index.d.ts
CHANGED
|
@@ -13,7 +13,9 @@ import DateField from './DateField';
|
|
|
13
13
|
import DateRangeField from './DateRangeField';
|
|
14
14
|
import WeekField from './WeekField';
|
|
15
15
|
import TimeField from './TimeField';
|
|
16
|
-
|
|
16
|
+
import CurrencyField from './CurrencyField';
|
|
17
|
+
import PercentageField from './PercentageField';
|
|
18
|
+
export { Form, FormRow, TextAreaField, TextField, CheckboxField, PillSelectField, RadioGroupField, RadioGroupOption, PasswordField, MultiSelectField, SelectField, DateField, DateRangeField, WeekField, TimeField, CurrencyField, PercentageField, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT };
|
|
17
19
|
export type { PasswordCriteria } from './PasswordField/types';
|
|
18
20
|
export type { SelectOption, SelectOptions } from './SelectField/types';
|
|
19
21
|
export type { FormikType } from './Form/types';
|
|
@@ -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 IconUniversity: {
|
|
8
|
+
(props: Props): JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
export default IconUniversity;
|
|
@@ -109,6 +109,7 @@ export { default as IconTimes } from './IconTimes';
|
|
|
109
109
|
export { default as IconTrash } from './IconTrash';
|
|
110
110
|
export { default as IconUnderline } from './IconUnderline';
|
|
111
111
|
export { default as IconUndo } from './IconUndo';
|
|
112
|
+
export { default as IconUniversity } from './IconUniversity';
|
|
112
113
|
export { default as IconUserComputer } from './IconUserComputer';
|
|
113
114
|
export { default as IconUserLight } from './IconUserLight';
|
|
114
115
|
export { default as IconUserPlus } from './IconUserPlus';
|
package/dist/index.css
CHANGED
|
@@ -139,6 +139,10 @@ Please ask a designer if you have questions about which colours to use.
|
|
|
139
139
|
stroke: #fff;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
._e0OH1 {
|
|
143
|
+
stroke: url(#prideGradient);
|
|
144
|
+
}
|
|
145
|
+
|
|
142
146
|
@-webkit-keyframes _3ZqYM {
|
|
143
147
|
0% {
|
|
144
148
|
stroke-dashoffset: 187;
|
|
@@ -1785,7 +1789,7 @@ Please ask a designer if you have questions about which colours to use.
|
|
|
1785
1789
|
cursor: default;
|
|
1786
1790
|
}
|
|
1787
1791
|
|
|
1788
|
-
._276GV {
|
|
1792
|
+
._276GV:not(._3vJkw) {
|
|
1789
1793
|
color: #c1c1c1;
|
|
1790
1794
|
cursor: default;
|
|
1791
1795
|
}
|
|
@@ -2003,7 +2007,7 @@ Please ask a designer if you have questions about which colours to use.
|
|
|
2003
2007
|
cursor: default;
|
|
2004
2008
|
}
|
|
2005
2009
|
|
|
2006
|
-
._CRqyX {
|
|
2010
|
+
._CRqyX:not(._2pgnH) {
|
|
2007
2011
|
color: #c1c1c1;
|
|
2008
2012
|
cursor: default;
|
|
2009
2013
|
}
|
|
@@ -2331,7 +2335,7 @@ Please ask a designer if you have questions about which colours to use.
|
|
|
2331
2335
|
cursor: default;
|
|
2332
2336
|
}
|
|
2333
2337
|
|
|
2334
|
-
._1PIJa {
|
|
2338
|
+
._1PIJa:not(._1M4ZF) {
|
|
2335
2339
|
color: #c1c1c1;
|
|
2336
2340
|
cursor: default;
|
|
2337
2341
|
}
|