@7shifts/sous-chef 3.67.2 → 3.69.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/actions/index.d.ts +2 -2
- package/dist/forms/PillSelectField/CreatableOption/CreatableOption.d.ts +11 -0
- package/dist/forms/PillSelectField/CreatableOption/index.d.ts +1 -0
- package/dist/forms/PillSelectField/PillSelectField.d.ts +8 -5
- package/dist/forms/PillSelectField/types.d.ts +4 -0
- package/dist/forms/index.d.ts +1 -0
- package/dist/i18n/locales/en.json +3 -0
- package/dist/i18n/locales/es.json +3 -0
- package/dist/i18n/locales/fr.json +3 -0
- package/dist/icons/components/IconThumbsDown.d.ts +9 -0
- package/dist/icons/components/IconThumbsUp.d.ts +9 -0
- package/dist/icons/components/index.d.ts +2 -0
- package/dist/index.css +52 -14
- package/dist/index.css.map +1 -1
- package/dist/index.js +450 -283
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +443 -284
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/actions/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Toggle from './Toggle';
|
|
2
2
|
import Button from './Button';
|
|
3
|
-
import { ButtonTheme } from './Button/types';
|
|
3
|
+
import { ButtonTheme, ButtonSize } from './Button/types';
|
|
4
4
|
import PaginationControls from './PaginationControls';
|
|
5
5
|
import Link from './Link';
|
|
6
6
|
export { Toggle, Button, PaginationControls, Link };
|
|
7
|
-
export type { ButtonTheme };
|
|
7
|
+
export type { ButtonTheme, ButtonSize };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
name: string;
|
|
4
|
+
createOptionLabel: React.ReactNode;
|
|
5
|
+
onCreate?: (optionLabel: string) => void;
|
|
6
|
+
/** This is used for setting the data-testid */
|
|
7
|
+
testId?: string;
|
|
8
|
+
};
|
|
9
|
+
/** CreatableOption element for PillSelectField. */
|
|
10
|
+
declare const CreatableOption: ({ name, createOptionLabel, onCreate, testId }: Props) => React.JSX.Element;
|
|
11
|
+
export default CreatableOption;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CreatableOption';
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PillSelectOption } from './types';
|
|
3
3
|
type Props<T> = {
|
|
4
4
|
name: string;
|
|
5
5
|
/** If not provided it will generate a random id so the label links properly with the pill select input */
|
|
6
6
|
id?: string;
|
|
7
|
-
value?:
|
|
8
|
-
options:
|
|
9
|
-
onChange?: (e:
|
|
7
|
+
value?: PillSelectOption<T>[];
|
|
8
|
+
options: PillSelectOption<T>[];
|
|
9
|
+
onChange?: (e: PillSelectOption<T>[]) => void;
|
|
10
10
|
label?: React.ReactNode;
|
|
11
11
|
caption?: React.ReactNode;
|
|
12
12
|
error?: React.ReactNode;
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
/** This is used for setting the data-testid */
|
|
15
15
|
testId?: string;
|
|
16
|
+
onCreate?: (optionLabel: string) => void;
|
|
17
|
+
onRemoveOption?: (remainingOptions: PillSelectOption<T>[]) => void;
|
|
18
|
+
createOptionLabel?: React.ReactNode;
|
|
16
19
|
};
|
|
17
20
|
/** PillSelectField form element. */
|
|
18
|
-
declare const PillSelectField: <T extends unknown>({ name, id: inputId, value, options, onChange, label, caption, error, disabled, testId }: Props<T>) => React.JSX.Element;
|
|
21
|
+
declare const PillSelectField: <T extends unknown>({ name, id: inputId, value, options, onChange, label, caption, error, disabled, testId, onCreate, onRemoveOption, createOptionLabel }: Props<T>) => React.JSX.Element;
|
|
19
22
|
export default PillSelectField;
|
package/dist/forms/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ import NumberField from './NumberField';
|
|
|
26
26
|
export { Form, FormRow, TextAreaField, TextField, CheckboxField, PillSelectField, RadioGroupField, RadioGroupOption, RadioGroupBoxOption, PasswordField, MultiSelectField, SelectField, AsyncSelectField, DateField, DateRangeField, WeekField, TimeField, TimeRangeField, CurrencyField, PercentageField, FormSection, FormFooter, FormFeedback, PhoneField, NumberField, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT };
|
|
27
27
|
export type { PasswordCriteria } from './PasswordField/types';
|
|
28
28
|
export type { SelectOption, SelectOptions, GroupOption, CustomOptionProps, SelectedOptionPrefixProps } from './SelectField/types';
|
|
29
|
+
export type { PillSelectOption } from './PillSelectField/types';
|
|
29
30
|
export type { AsyncSelectOptions } from './AsyncSelectField/types';
|
|
30
31
|
export type { FormikType } from './Form/types';
|
|
31
32
|
export type { PhoneFieldCountryCode } from './PhoneField/types';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconSize } from '../types';
|
|
3
|
+
type Props = {
|
|
4
|
+
size?: IconSize;
|
|
5
|
+
color?: string;
|
|
6
|
+
testId?: string;
|
|
7
|
+
} & React.SVGProps<SVGSVGElement>;
|
|
8
|
+
declare const IconThumbsDown: React.ForwardRefExoticComponent<Omit<Props, 'ref'>>;
|
|
9
|
+
export default IconThumbsDown;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconSize } from '../types';
|
|
3
|
+
type Props = {
|
|
4
|
+
size?: IconSize;
|
|
5
|
+
color?: string;
|
|
6
|
+
testId?: string;
|
|
7
|
+
} & React.SVGProps<SVGSVGElement>;
|
|
8
|
+
declare const IconThumbsUp: React.ForwardRefExoticComponent<Omit<Props, 'ref'>>;
|
|
9
|
+
export default IconThumbsUp;
|
|
@@ -132,6 +132,8 @@ export { default as IconSyncExclaimation } from './IconSyncExclaimation';
|
|
|
132
132
|
export { default as IconSync } from './IconSync';
|
|
133
133
|
export { default as IconTable } from './IconTable';
|
|
134
134
|
export { default as IconTachometer } from './IconTachometer';
|
|
135
|
+
export { default as IconThumbsDown } from './IconThumbsDown';
|
|
136
|
+
export { default as IconThumbsUp } from './IconThumbsUp';
|
|
135
137
|
export { default as IconTimesOctagon } from './IconTimesOctagon';
|
|
136
138
|
export { default as IconTimes } from './IconTimes';
|
|
137
139
|
export { default as IconTrash } from './IconTrash';
|
package/dist/index.css
CHANGED
|
@@ -3018,7 +3018,20 @@ input:disabled + ._kmvBP::after {
|
|
|
3018
3018
|
._Yti6k input:hover:not(:disabled) {
|
|
3019
3019
|
cursor: pointer;
|
|
3020
3020
|
}
|
|
3021
|
-
.
|
|
3021
|
+
._Yti6k input._dw-VP {
|
|
3022
|
+
opacity: unset;
|
|
3023
|
+
right: unset;
|
|
3024
|
+
width: calc(100% - 32px + 2px);
|
|
3025
|
+
height: 18px;
|
|
3026
|
+
margin: 10px 16px;
|
|
3027
|
+
padding: 0;
|
|
3028
|
+
border: none;
|
|
3029
|
+
background: transparent;
|
|
3030
|
+
}
|
|
3031
|
+
._Yti6k input._dw-VP:focus, ._Yti6k input._dw-VP:focus-visible {
|
|
3032
|
+
outline: none;
|
|
3033
|
+
}
|
|
3034
|
+
._JXakU, ._MsKVV, ._ZxEwG {
|
|
3022
3035
|
font-family: var(--font-family-body);
|
|
3023
3036
|
font-size: var(--font-size-200);
|
|
3024
3037
|
line-height: var(--font-line-height-200);
|
|
@@ -3028,9 +3041,9 @@ input:disabled + ._kmvBP::after {
|
|
|
3028
3041
|
display: flex;
|
|
3029
3042
|
align-items: center;
|
|
3030
3043
|
justify-content: center;
|
|
3031
|
-
background-color: var(--color-
|
|
3032
|
-
padding: 8px;
|
|
3033
|
-
border: 1px solid var(--color-grey-
|
|
3044
|
+
background-color: var(--color-grey-100);
|
|
3045
|
+
padding: 8px 16px;
|
|
3046
|
+
border: 1px solid var(--color-grey-100);
|
|
3034
3047
|
border-radius: 25px;
|
|
3035
3048
|
min-height: 38px;
|
|
3036
3049
|
min-width: 60px;
|
|
@@ -3042,31 +3055,56 @@ input:disabled + ._kmvBP::after {
|
|
|
3042
3055
|
transition: background-color 0.2s, color 0.2s;
|
|
3043
3056
|
text-transform: capitalize;
|
|
3044
3057
|
box-sizing: border-box;
|
|
3058
|
+
gap: 8px;
|
|
3059
|
+
}
|
|
3060
|
+
._MsKVV, ._ZxEwG {
|
|
3061
|
+
text-transform: none;
|
|
3062
|
+
}
|
|
3063
|
+
._ZxEwG {
|
|
3064
|
+
color: transparent;
|
|
3065
|
+
border-color: var(--color-blackberry-400);
|
|
3066
|
+
}
|
|
3067
|
+
._Odw1V {
|
|
3068
|
+
padding: 0;
|
|
3069
|
+
border: none;
|
|
3070
|
+
background: transparent;
|
|
3071
|
+
cursor: pointer;
|
|
3072
|
+
display: flex;
|
|
3073
|
+
z-index: inherit;
|
|
3074
|
+
z-index: calc(var(--z-index-base) + 1);
|
|
3075
|
+
color: var(--color-grey-500);
|
|
3045
3076
|
}
|
|
3046
|
-
|
|
3077
|
+
._Yti6k:hover > input ~ ._JXakU, ._Yti6k:hover > input ~ ._MsKVV {
|
|
3047
3078
|
background-color: var(--color-grey-200);
|
|
3048
3079
|
border-color: var(--color-grey-200);
|
|
3049
3080
|
}
|
|
3050
|
-
input:checked
|
|
3051
|
-
background-color: var(--color-blackberry-
|
|
3081
|
+
._Yti6k:hover > input:checked ~ ._JXakU {
|
|
3082
|
+
background-color: var(--color-blackberry-100);
|
|
3052
3083
|
border-color: var(--color-blackberry-500);
|
|
3084
|
+
color: var(--color-blackberry-500);
|
|
3085
|
+
}
|
|
3086
|
+
._Yti6k:hover > input:checked ~ ._JXakU ._Odw1V {
|
|
3087
|
+
color: var(--color-blackberry-500);
|
|
3053
3088
|
}
|
|
3054
3089
|
input:checked ~ ._JXakU {
|
|
3055
|
-
background-color: var(--color-blackberry-
|
|
3090
|
+
background-color: var(--color-blackberry-100);
|
|
3056
3091
|
border-color: var(--color-blackberry-400);
|
|
3057
|
-
color: var(--color-
|
|
3092
|
+
color: var(--color-blackberry-400);
|
|
3093
|
+
}
|
|
3094
|
+
input:checked ~ ._JXakU ._Odw1V {
|
|
3095
|
+
color: var(--color-blackberry-400);
|
|
3058
3096
|
}
|
|
3059
3097
|
input:disabled + ._JXakU {
|
|
3060
3098
|
background-color: var(--color-grey-100);
|
|
3061
3099
|
border-color: var(--color-grey-100);
|
|
3062
|
-
color: var(--color-grey-
|
|
3100
|
+
color: var(--color-grey-300);
|
|
3063
3101
|
}
|
|
3064
3102
|
input:disabled:checked + ._JXakU {
|
|
3065
|
-
background-color: var(--color-
|
|
3066
|
-
border-color: var(--color-
|
|
3067
|
-
color: var(--color-
|
|
3103
|
+
background-color: var(--color-blackberry-100);
|
|
3104
|
+
border-color: var(--color-blackberry-300);
|
|
3105
|
+
color: var(--color-blackberry-300);
|
|
3068
3106
|
}
|
|
3069
|
-
input:focus-visible + ._JXakU {
|
|
3107
|
+
input:focus-visible + ._JXakU, input:focus-visible + ._ZxEwG {
|
|
3070
3108
|
border: 1px solid var(--color-blackberry-400);
|
|
3071
3109
|
box-shadow: 0 0 8px var(--color-blackberry-300);
|
|
3072
3110
|
outline: none;
|