@7shifts/sous-chef 3.87.0-beta.2 → 3.87.1-beta.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/Button/Button.d.ts +12 -1
- package/dist/actions/PaginationControls/PaginationControls.d.ts +5 -0
- package/dist/core/SousChefProvider/context/ProviderConfigContext.d.ts +0 -1
- package/dist/feedback/InlineBanner/InlineBanner.d.ts +7 -0
- package/dist/feedback/MicroBanner/MicroBanner.d.ts +7 -1
- package/dist/forms/PhoneField/usePhoneField.d.ts +0 -1
- package/dist/forms/SelectField/useSelectField.d.ts +0 -1
- package/dist/forms/TextField/useTextField.d.ts +0 -1
- package/dist/forms/hooks/useDateFieldControllers.d.ts +0 -1
- package/dist/forms/hooks/useMultiSelectFieldControllers.d.ts +0 -1
- package/dist/forms/hooks/usePhoneFieldControllers.d.ts +0 -1
- package/dist/forms/hooks/useRangeFieldControllers.d.ts +0 -1
- package/dist/forms/hooks/useSelectFieldControllers.d.ts +0 -1
- package/dist/foundation/types.d.ts +40 -10
- package/dist/hooks/usePositionStyles.d.ts +0 -1
- package/dist/i18n/TranslationsContext.d.ts +0 -1
- package/dist/index.css +10 -3
- package/dist/index.css.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +3 -2
- package/dist/index.modern.js.map +1 -1
- package/dist/lists/DataTable/DataTableContext.d.ts +0 -1
- package/dist/lists/hooks/useDataTableScrollState.d.ts +0 -1
- package/dist/overlay/KebabMenu/types.d.ts +0 -1
- package/dist/overlay/hooks/useListKeyboardNavigation/types.d.ts +0 -1
- package/dist/utils/elements.d.ts +0 -1
- package/dist/utils/types.d.ts +0 -1
- package/package.json +15 -18
|
@@ -3,9 +3,11 @@ import type { ButtonTheme, ButtonSize, ButtonType, ButtonTarget } from './types'
|
|
|
3
3
|
import type { PositionStyles, DataProps } from '../../foundation/types';
|
|
4
4
|
declare const Button: React.ForwardRefExoticComponent<{
|
|
5
5
|
children: React.ReactNode;
|
|
6
|
+
/** Native HTML button type. If `submit` it will trigger the form `onSubmit`. */
|
|
6
7
|
type?: ButtonType | undefined;
|
|
7
|
-
/**
|
|
8
|
+
/** Button design theme */
|
|
8
9
|
theme?: ButtonTheme | undefined;
|
|
10
|
+
/** It turns the disabled state of the button on. */
|
|
9
11
|
disabled?: boolean | undefined;
|
|
10
12
|
onClick?: React.MouseEventHandler<Element> | undefined;
|
|
11
13
|
onMouseEnter?: React.MouseEventHandler<Element> | undefined;
|
|
@@ -14,10 +16,19 @@ declare const Button: React.ForwardRefExoticComponent<{
|
|
|
14
16
|
onFocus?: React.FocusEventHandler<Element> | undefined;
|
|
15
17
|
onKeyDown?: React.KeyboardEventHandler<Element> | undefined;
|
|
16
18
|
id?: string | undefined;
|
|
19
|
+
/** It turns the loading state of the button on. */
|
|
17
20
|
loading?: boolean | undefined;
|
|
18
21
|
/** This will show a black tooltip when the user hover the button */
|
|
19
22
|
title?: string | React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* @description It will show a black tooltip when the user hover the button.
|
|
25
|
+
* @category Acting as Link
|
|
26
|
+
*/
|
|
20
27
|
href?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* @description It will open the link in a new tab or the same tab depending on the value.
|
|
30
|
+
* @category Acting as Link
|
|
31
|
+
*/
|
|
21
32
|
target?: ButtonTarget | undefined;
|
|
22
33
|
testId?: string | undefined;
|
|
23
34
|
/**
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DataProps } from '../../foundation/types';
|
|
3
3
|
type Props = {
|
|
4
|
+
/** It will enable or disable the `Previous` button. */
|
|
4
5
|
hasPrevious?: boolean;
|
|
6
|
+
/** It will enable or disable the `Next` button. */
|
|
5
7
|
hasNext?: boolean;
|
|
8
|
+
/** It will be fired when the `Previous` button is clicked */
|
|
6
9
|
onPreviousClick: () => void;
|
|
10
|
+
/** It will be fired when the `Next` button is clicked */
|
|
7
11
|
onNextClick: () => void;
|
|
8
12
|
testId?: string;
|
|
13
|
+
/** It is a target element that will be scrolled to the top when the buttons are clicked */
|
|
9
14
|
scrollTarget?: React.RefObject<HTMLElement>;
|
|
10
15
|
} & DataProps;
|
|
11
16
|
/**
|
|
@@ -3,12 +3,19 @@ import { InlineBannerTheme } from './types';
|
|
|
3
3
|
import { PositionStyles } from '../../foundation/types';
|
|
4
4
|
type Props = {
|
|
5
5
|
children: React.ReactNode;
|
|
6
|
+
/** Banner design theme */
|
|
6
7
|
theme?: InlineBannerTheme;
|
|
8
|
+
/** Overrides the default icon determined by the theme. Generally you should not use this prop in order to maintain visual consistency between banner colours and icons. It is recommended to only use icons that are already in Sous Chef. */
|
|
7
9
|
icon?: React.ReactElement;
|
|
10
|
+
/** It adds a title to the banner and changes the banner format to multi-line */
|
|
8
11
|
title?: string;
|
|
12
|
+
/** It is the callback function to close the banner */
|
|
9
13
|
onClose?: () => void;
|
|
14
|
+
/** It describes the CTA options */
|
|
10
15
|
caption?: React.ReactNode;
|
|
16
|
+
/** It is the primary CTA button */
|
|
11
17
|
primaryButton?: React.ReactElement;
|
|
18
|
+
/** It is the secondary CTA button */
|
|
12
19
|
secondaryButton?: React.ReactElement;
|
|
13
20
|
testId?: string;
|
|
14
21
|
} & PositionStyles;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MicroBannerTheme } from './types';
|
|
3
|
+
import { PositionStyles } from 'foundation/types';
|
|
3
4
|
type Props = {
|
|
4
5
|
children?: React.ReactNode;
|
|
6
|
+
/** Banner design theme */
|
|
5
7
|
theme?: MicroBannerTheme;
|
|
8
|
+
/** Overrides the default icon determined by the theme. Generally you should not use this prop in order to maintain visual consistency between banner colours and icons. It is recommended to only use icons that are already in Sous Chef. */
|
|
6
9
|
icon?: React.ReactElement;
|
|
10
|
+
/** Turns off the display of the icon */
|
|
7
11
|
hideIcon?: boolean;
|
|
12
|
+
/** Adds a title to the banner above the body content */
|
|
8
13
|
title?: string;
|
|
14
|
+
/** The primary CTA button */
|
|
9
15
|
primaryButton?: React.ReactElement;
|
|
10
16
|
testId?: string;
|
|
11
|
-
};
|
|
17
|
+
} & PositionStyles;
|
|
12
18
|
declare const MicroBanner: React.FC<Props>;
|
|
13
19
|
export default MicroBanner;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { Props } from './SelectField';
|
|
3
2
|
import { CustomComponentsExtraProps } from './types';
|
|
4
3
|
export declare const useSelectField: <T extends unknown>({ asToolbarFilter, caption, disabled, error, id, isClearable, label, menuShouldScrollIntoView, name, noOptionsMessage, options, onBlur, onChange, placeholder, value, defaultValue, CustomOption: UserCustomOption, SelectedOptionPrefix, testId, creatableButton, onCreate, isSearchable, autoFocus, ...rest }: Props<T>) => {
|
|
@@ -1,23 +1,53 @@
|
|
|
1
1
|
export type PositionStyles = {
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @description Shortcut for `margin`.
|
|
4
|
+
* @category Positioning
|
|
5
|
+
*/
|
|
3
6
|
m?: string | number;
|
|
4
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* @description Defines the margin around of the element.
|
|
9
|
+
* @category Positioning
|
|
10
|
+
*/
|
|
5
11
|
margin?: string | number;
|
|
6
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* @description Shortcut for `marginTop`.
|
|
14
|
+
* @category Positioning
|
|
15
|
+
*/
|
|
7
16
|
mt?: string | number;
|
|
8
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* @description Defines the margin on the top of the element.
|
|
19
|
+
* @category Positioning
|
|
20
|
+
*/
|
|
9
21
|
marginTop?: string | number;
|
|
10
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* @description Shortcut for `marginRight`.
|
|
24
|
+
* @category Positioning
|
|
25
|
+
*/
|
|
11
26
|
mr?: string | number;
|
|
12
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* @description Defines the margin on the right side of the element.
|
|
29
|
+
* @category Positioning
|
|
30
|
+
*/
|
|
13
31
|
marginRight?: string | number;
|
|
14
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* @description Shortcut for `marginBottom`.
|
|
34
|
+
* @category Positioning
|
|
35
|
+
*/
|
|
15
36
|
mb?: string | number;
|
|
16
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* @description Defines the margin on the bottom of the element.
|
|
39
|
+
* @category Positioning
|
|
40
|
+
*/
|
|
17
41
|
marginBottom?: string | number;
|
|
18
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* @description Shortcut for `marginLeft`.
|
|
44
|
+
* @category Positioning
|
|
45
|
+
*/
|
|
19
46
|
ml?: string | number;
|
|
20
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* @description Defines the margin on the left side of the element.
|
|
49
|
+
* @category Positioning
|
|
50
|
+
*/
|
|
21
51
|
marginLeft?: string | number;
|
|
22
52
|
};
|
|
23
53
|
export type DataProps = {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PositionStyles } from '../foundation/types';
|
|
3
2
|
type CSSPositionStyles = Pick<React.CSSProperties, 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft'>;
|
|
4
3
|
export declare const usePositionStyles: ({ m, margin, marginTop, mt, marginRight, mr, marginBottom, mb, marginLeft, ml }: PositionStyles) => CSSPositionStyles;
|
package/dist/index.css
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
unicode-range: U+0000-00FF; /* Basic Latin */
|
|
24
24
|
}
|
|
25
25
|
:root {
|
|
26
|
-
--font-family-heading: "
|
|
26
|
+
--font-family-heading: "SF Pro", sans-serif;
|
|
27
27
|
--font-family-body: "SF Pro", sans-serif;
|
|
28
28
|
--font-size-100: 0.75rem;
|
|
29
29
|
--font-size-200: 0.875rem;
|
|
@@ -4180,12 +4180,20 @@ input:disabled + ._Yfxkl::after {
|
|
|
4180
4180
|
border-top-left-radius: 0;
|
|
4181
4181
|
border-bottom-left-radius: 0;
|
|
4182
4182
|
}
|
|
4183
|
+
._GyYnE {
|
|
4184
|
+
color: transparent;
|
|
4185
|
+
}
|
|
4186
|
+
._GyYnE:focus {
|
|
4187
|
+
color: var(--color-surface-on-color);
|
|
4188
|
+
}
|
|
4189
|
+
._GyYnE:disabled {
|
|
4190
|
+
color: transparent;
|
|
4191
|
+
}
|
|
4183
4192
|
._ddacu {
|
|
4184
4193
|
font-family: var(--font-family-body);
|
|
4185
4194
|
font-size: var(--font-size-200);
|
|
4186
4195
|
line-height: var(--font-line-height-200);
|
|
4187
4196
|
font-weight: var(--p-font-weight-normal);
|
|
4188
|
-
background-color: var(--color-surface-container);
|
|
4189
4197
|
position: absolute;
|
|
4190
4198
|
height: 36px;
|
|
4191
4199
|
margin-top: 1px;
|
|
@@ -4196,7 +4204,6 @@ input:disabled + ._Yfxkl::after {
|
|
|
4196
4204
|
}
|
|
4197
4205
|
._o1-zA {
|
|
4198
4206
|
color: var(--color-surface-on-container-disabled);
|
|
4199
|
-
background-color: var(--color-surface-container-disabled);
|
|
4200
4207
|
}
|
|
4201
4208
|
._Q0GfJ {
|
|
4202
4209
|
flex-grow: 1;
|