@7shifts/sous-chef 3.56.0-beta.0 → 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.
Files changed (40) hide show
  1. package/dist/forms/TimeField/TimeField.d.ts +8 -4
  2. package/dist/forms/TimeField/TimeFieldDropdown/TimeFieldDropdown.d.ts +4 -2
  3. package/dist/forms/TimeField/TimeFieldDropdownTrigger/TimeFieldDropdownTrigger.d.ts +2 -2
  4. package/dist/forms/TimeField/TimeFieldInput/TimeFieldInput.d.ts +1 -1
  5. package/dist/forms/TimeRangeField/TimeRangeEnd/TimeRangeEnd.d.ts +6 -3
  6. package/dist/forms/TimeRangeField/TimeRangeField.d.ts +3 -1
  7. package/dist/index.css +1 -0
  8. package/dist/index.css.map +1 -0
  9. package/dist/index.js +48 -14
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.modern.js +48 -14
  12. package/dist/index.modern.js.map +1 -1
  13. package/dist/overlay/DropdownListItem/DropdownListItem.d.ts +1 -1
  14. package/dist/overlay/Tooltip/Tooltip.d.ts +1 -1
  15. package/package.json +1 -1
  16. package/dist/controls/ToolbarSelect/ToolbarSelect.styles.d.ts +0 -5
  17. package/dist/forms/DatePickerCalendar/DatePickerCalendar.d.ts +0 -15
  18. package/dist/forms/DatePickerCalendar/index.d.ts +0 -1
  19. package/dist/forms/hooks/useFieldMask.d.ts +0 -1
  20. package/dist/forms/hooks/useShouldScrollMenuIntoView.d.ts +0 -1
  21. package/dist/foundation/colors.d.ts +0 -53
  22. package/dist/lists/DataTable/DataTableCell/DataTableCell.d.ts +0 -7
  23. package/dist/lists/DataTable/DataTableCell/index.d.ts +0 -1
  24. package/dist/lists/DataTable/DataTableHeader.d.ts +0 -9
  25. package/dist/lists/ResourceTable/ResourceTable.d.ts +0 -28
  26. package/dist/lists/ResourceTable/ResourceTableContext.d.ts +0 -7
  27. package/dist/lists/ResourceTable/ResourceTableHeader.d.ts +0 -12
  28. package/dist/lists/ResourceTable/index.d.ts +0 -1
  29. package/dist/lists/ResourceTable/types.d.ts +0 -26
  30. package/dist/lists/ResourceTableRow/ResourceTableRow.d.ts +0 -13
  31. package/dist/lists/ResourceTableRow/index.d.ts +0 -1
  32. package/dist/overlay/Menu/Menu.d.ts +0 -10
  33. package/dist/overlay/Menu/MenuButton.d.ts +0 -8
  34. package/dist/overlay/Menu/MenuContext.d.ts +0 -9
  35. package/dist/overlay/Menu/MenuItem.d.ts +0 -7
  36. package/dist/overlay/Menu/MenuList.d.ts +0 -6
  37. package/dist/overlay/Menu/index.d.ts +0 -1
  38. package/dist/overlay/Menu/types.d.ts +0 -5
  39. package/dist/utils/i18n.d.ts +0 -1
  40. package/dist/utils/mask.d.ts +0 -18
@@ -16,5 +16,5 @@ type Props = {
16
16
  /** If an `href` is passed `reloadDocument` will control whether the link reloads the page or not. */
17
17
  reloadDocument?: boolean;
18
18
  };
19
- declare const DropdownListItem: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownListItem: ({ onClick, prefix, suffix, caption, selected, disabled, testId, children, href, target, reloadDocument }: Props) => React.JSX.Element;
20
20
  export default DropdownListItem;
@@ -19,5 +19,5 @@ type Props = {
19
19
  testId?: string;
20
20
  maxHeight?: string | number;
21
21
  };
22
- declare const Tooltip: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
22
+ declare const Tooltip: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLElement>>;
23
23
  export default Tooltip;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7shifts/sous-chef",
3
- "version": "3.56.0-beta.0",
3
+ "version": "3.56.0-beta0",
4
4
  "description": "7shifts component library",
5
5
  "author": "7shifts",
6
6
  "license": "MIT",
@@ -1,5 +0,0 @@
1
- type GetSelectStylesControls = {
2
- wrapToNextLine?: boolean;
3
- };
4
- export declare const getSelectStyles: ({ wrapToNextLine }: GetSelectStylesControls) => Object;
5
- export {};
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import styles from './date-picker-calendar.scss';
3
- declare type Props = {
4
- classNames: typeof styles;
5
- inputNode: HTMLElement;
6
- onBlur: () => void;
7
- onFocus: () => void;
8
- tabIndex: number;
9
- children: React.ReactNode;
10
- showCalendar: boolean;
11
- onClickOutside: () => void;
12
- testId?: string;
13
- };
14
- declare const DatePickerCalendar: React.FC<Props>;
15
- export default DatePickerCalendar;
@@ -1 +0,0 @@
1
- export { default } from './DatePickerCalendar';
@@ -1 +0,0 @@
1
- export declare const useFieldMask: (format: string) => (input: HTMLInputElement) => void;
@@ -1 +0,0 @@
1
- export declare const useShouldScrollMenuIntoView: (menuShouldScrollIntoView?: boolean) => boolean;
@@ -1,53 +0,0 @@
1
- export declare const WHITE: '#ffffff';
2
- export declare const BLACK: '#000000';
3
- export declare const TANGERINE100: '#fef1ed';
4
- export declare const TANGERINE200: '#fdd5c8';
5
- export declare const TANGERINE300: '#fcab91';
6
- export declare const TANGERINE400: '#fb7448';
7
- export declare const TANGERINE500: '#e16840';
8
- export declare const TANGERINE600: '#96452b';
9
- export declare const EGGPLANT100: '#f0f3fb';
10
- export declare const EGGPLANT200: '#d3dbf4';
11
- export declare const EGGPLANT300: '#a7b7ea';
12
- export declare const EGGPLANT400: '#6d87dd';
13
- export declare const EGGPLANT500: '#6179c6';
14
- export declare const EGGPLANT600: '#415184';
15
- export declare const MINT100: '#ecfaf8';
16
- export declare const MINT200: '#c6f1eb';
17
- export declare const MINT300: '#8de4d7';
18
- export declare const MINT400: '#3abda9';
19
- export declare const MINT500: '#35ac9a';
20
- export declare const MINT600: '#277e71';
21
- export declare const RADISH100: '#fcf0f0';
22
- export declare const RADISH200: '#f7d1d1';
23
- export declare const RADISH300: '#f0a3a3';
24
- export declare const RADISH400: '#e76767';
25
- export declare const RADISH500: '#cf5c5c';
26
- export declare const RADISH600: '#8a3d3d';
27
- export declare const BLUEBERRY100: '#f6fdff';
28
- export declare const BLUEBERRY200: '#ceecf5';
29
- export declare const BLUEBERRY300: '#9cd9eb';
30
- export declare const BLUEBERRY400: '#5bc0de';
31
- export declare const BLUEBERRY500: '#51acc7';
32
- export declare const BLUEBERRY600: '#367385';
33
- export declare const BANANA100: '#fff9ed';
34
- export declare const BANANA200: '#ffeec9';
35
- export declare const BANANA300: '#ffdd92';
36
- export declare const BANANA400: '#ffc74a';
37
- export declare const BANANA500: '#e5b242';
38
- export declare const BANANA600: '#99772c';
39
- export declare const GREY100: '#F3F3F3';
40
- export declare const GREY200: '#D5D5D5';
41
- export declare const GREY300: '#949494';
42
- export declare const GREY400: '#767676';
43
- export declare const GREY500: '#464646';
44
- export declare const GREY600: '#323232';
45
- export declare const COLORS: {
46
- TANGERINE: string;
47
- EGGPLANT: string;
48
- MINT: string;
49
- RADISH: string;
50
- BLUEBERRY: string;
51
- BANANA: string;
52
- };
53
- export declare type Color = typeof WHITE | typeof BLACK | typeof TANGERINE100 | typeof TANGERINE200 | typeof TANGERINE300 | typeof TANGERINE400 | typeof TANGERINE500 | typeof TANGERINE600 | typeof EGGPLANT100 | typeof EGGPLANT200 | typeof EGGPLANT300 | typeof EGGPLANT400 | typeof EGGPLANT500 | typeof EGGPLANT600 | typeof MINT100 | typeof MINT200 | typeof MINT300 | typeof MINT400 | typeof MINT500 | typeof MINT600 | typeof RADISH100 | typeof RADISH200 | typeof RADISH300 | typeof RADISH400 | typeof RADISH500 | typeof RADISH600 | typeof BLUEBERRY100 | typeof BLUEBERRY200 | typeof BLUEBERRY300 | typeof BLUEBERRY400 | typeof BLUEBERRY500 | typeof BLUEBERRY600 | typeof BANANA100 | typeof BANANA200 | typeof BANANA300 | typeof BANANA400 | typeof BANANA500 | typeof BANANA600 | typeof GREY100 | typeof GREY200 | typeof GREY300 | typeof GREY400 | typeof GREY500 | typeof GREY600;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- declare type Props = {
3
- children: React.ReactNode;
4
- columnIndex: number;
5
- };
6
- declare const DataTableCell: ({ children, columnIndex }: Props) => JSX.Element;
7
- export default DataTableCell;
@@ -1 +0,0 @@
1
- export * from './DataTableCell';
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { Column, Sort } from './types';
3
- declare type Props = {
4
- columns: Column[];
5
- onSort?: (sort: Sort) => void;
6
- showActionMenu?: boolean;
7
- };
8
- declare const DataTableHeader: React.FC<Props>;
9
- export default DataTableHeader;
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
- import type { Column, CustomComponent, Item, Sort } from './types';
3
- declare type Props<T> = {
4
- /** Each element represents a row and each key of the object represents a column */
5
- items: Item<T>[];
6
- /** For each column element, the `name` property should match the key on `items` */
7
- columns?: Column[];
8
- /** A custom component for customizing how the each item is rendered. It pass as props: `item`, `index`, `columnSizes` and `columns` */
9
- itemComponent?: React.ComponentType<CustomComponent<T>>;
10
- maxHeight?: number;
11
- /** Used for pagination */
12
- hasPrevious?: boolean;
13
- /** Used for pagination */
14
- hasNext?: boolean;
15
- /** Used for pagination */
16
- onPreviousClick?: () => void;
17
- /** Used for pagination */
18
- onNextClick?: () => void;
19
- isLoading?: boolean;
20
- /** It is fired when a sorted column is clicked to be sorted */
21
- onSort?: (sort: Sort) => void;
22
- showActionMenu?: boolean;
23
- };
24
- /**
25
- * @deprecated On v2.0 we introduced the `DataTable` that should be used for tabular data. This component will be removed on v3.0.
26
- */
27
- declare const ResourceTable: <T extends unknown>({ items, columns, itemComponent, maxHeight, hasPrevious, hasNext, onPreviousClick, onNextClick, onSort, isLoading, showActionMenu }: Props<T>) => JSX.Element;
28
- export default ResourceTable;
@@ -1,7 +0,0 @@
1
- export declare type ResourceTableContextType = {
2
- columnSizes?: number[];
3
- showActionMenu?: boolean;
4
- };
5
- declare const Context: import("react").Context<ResourceTableContextType>;
6
- export declare const useResourceTableContext: () => ResourceTableContextType;
7
- export default Context;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import type { Column, Sort } from './types';
3
- declare type Props = {
4
- columns: Column[];
5
- onSort?: (sort: Sort) => void;
6
- showActionMenu?: boolean;
7
- };
8
- /**
9
- * @deprecated On v2.0 we introduced the `DataTable` that should be used for tabular data. This component will be removed on v3.0.
10
- */
11
- declare const ResourceTableHeader: React.FC<Props>;
12
- export default ResourceTableHeader;
@@ -1 +0,0 @@
1
- export { default } from './ResourceTable';
@@ -1,26 +0,0 @@
1
- import React from 'react';
2
- export declare type Column = {
3
- name: string;
4
- label?: React.ReactNode;
5
- size?: number;
6
- isSortable?: boolean;
7
- currentSort?: SortDirection;
8
- };
9
- export declare type SortDirection = 'asc' | 'desc' | null;
10
- export declare type Sort = {
11
- columnName: string;
12
- direction: SortDirection;
13
- };
14
- export declare type Item<T> = T | (T & {
15
- actions?: Action[];
16
- });
17
- export declare type CustomComponent<T> = {
18
- item: Item<T>;
19
- index: number;
20
- columnSizes?: number[];
21
- columns?: Column[];
22
- };
23
- export declare type Action = {
24
- label: React.ReactNode;
25
- onAction: () => void;
26
- };
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import type { Action } from '../ResourceTable/types';
3
- declare type Props = {
4
- children: React.ReactNode;
5
- onClick?: () => void;
6
- isSelected?: boolean;
7
- actions?: Action[];
8
- };
9
- /**
10
- * @deprecated On v2.0 we introduced the `DataTable` that should be used for tabular data. This component will be removed on v3.0.
11
- */
12
- declare const ResourceTableRow: React.FC<Props>;
13
- export default ResourceTableRow;
@@ -1 +0,0 @@
1
- export { default } from './ResourceTableRow';
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- declare type Props = {
3
- children: React.ReactNode;
4
- };
5
- /**
6
- * STATUS: IN DRAFT (Don't use this component yet)
7
- * It is working to cover the ResourceTable actions menu but there are some functionalities pending such as `dividers` and `direction`.
8
- */
9
- declare const Menu: React.FC<Props>;
10
- export default Menu;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- declare type ButtonTheme = 'default' | 'primary' | 'danger' | 'upsell' | 'marketing' | 'hollow' | 'link-primary' | 'link-danger' | 'link-upsell' | 'link-toolbar' | 'link-contrast' | 'link-icon';
3
- declare type Props = {
4
- children: React.ReactNode;
5
- theme?: ButtonTheme;
6
- };
7
- declare const MenuButton: React.FC<Props>;
8
- export default MenuButton;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- export declare type MenuContextType = {
3
- onToggleMenu: () => void;
4
- isOpen: boolean;
5
- triggerRef: any;
6
- };
7
- declare const MenuContext: React.Context<MenuContextType>;
8
- export declare const useMenuContext: () => MenuContextType;
9
- export default MenuContext;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- declare type Props = {
3
- onClick: (e: React.MouseEvent | React.KeyboardEvent) => void;
4
- children: React.ReactNode;
5
- };
6
- declare const MenuItem: React.FC<Props>;
7
- export default MenuItem;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- declare type Props = {
3
- children: React.ReactNode;
4
- };
5
- declare const MenuList: React.FC<Props>;
6
- export default MenuList;
@@ -1 +0,0 @@
1
- export { default } from './Menu';
@@ -1,5 +0,0 @@
1
- export declare type MenuAction = {
2
- action?: string;
3
- label: React.ReactNode;
4
- onAction: (e: React.MouseEvent | React.KeyboardEvent) => void;
5
- };
@@ -1 +0,0 @@
1
- export declare const getLocalizedString: (key: string) => string;
@@ -1,18 +0,0 @@
1
- type CursorPosition = {
2
- selectionStart: number;
3
- selectionEnd: number;
4
- };
5
- type MaskParams = {
6
- value: string;
7
- format: string;
8
- cursorPosition: CursorPosition;
9
- slots?: string;
10
- };
11
- export declare const maskfy: (params: MaskParams) => {
12
- maskedValue: string;
13
- cursorPosition: {
14
- selectionStart: number;
15
- selectionEnd: number;
16
- };
17
- };
18
- export {};