@7shifts/sous-chef 3.11.2 → 3.13.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.
Files changed (42) hide show
  1. package/dist/forms/TimeField/TimeField.d.ts +18 -7
  2. package/dist/forms/TimeField/TimeFieldDropdown/TimeFieldDropdown.d.ts +4 -3
  3. package/dist/forms/TimeField/TimeFieldDropdownTrigger/TimeFieldDropdownTrigger.d.ts +3 -3
  4. package/dist/forms/TimeField/TimeFieldInput/TimeFieldInput.d.ts +5 -1
  5. package/dist/forms/TimeField/domain.d.ts +2 -1
  6. package/dist/forms/TimeRangeField/TimeRangeEnd/TimeRangeEnd.d.ts +5 -0
  7. package/dist/forms/TimeRangeField/TimeRangeEnd/index.d.ts +1 -0
  8. package/dist/forms/TimeRangeField/TimeRangeField.d.ts +20 -0
  9. package/dist/forms/TimeRangeField/TimeRangeStart/TimeRangeStart.d.ts +5 -0
  10. package/dist/forms/TimeRangeField/TimeRangeStart/index.d.ts +1 -0
  11. package/dist/forms/TimeRangeField/index.d.ts +1 -0
  12. package/dist/forms/TimeRangeField/types.d.ts +9 -0
  13. package/dist/forms/index.d.ts +2 -1
  14. package/dist/foundation/color-codes.d.ts +1 -0
  15. package/dist/foundation/color-constants.d.ts +1 -0
  16. package/dist/foundation/domain.d.ts +2 -0
  17. package/dist/index.css +609 -552
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.js +1506 -1326
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.modern.js +1506 -1327
  22. package/dist/index.modern.js.map +1 -1
  23. package/dist/lists/DataTable/DataTableDefaultItemComponent/DataTableDefaultItemComponent.d.ts +3 -0
  24. package/dist/lists/DataTable/DataTableDefaultItemComponent/index.d.ts +1 -0
  25. package/dist/lists/DataTable/DataTableHeader/ColumnSizes/ColumnSizes.d.ts +7 -0
  26. package/dist/lists/DataTable/DataTableHeader/ColumnSizes/index.d.ts +1 -0
  27. package/dist/lists/DataTable/{DataTableHeader.d.ts → DataTableHeader/DataTableHeader.d.ts} +1 -1
  28. package/dist/lists/DataTable/DataTableHeader/HeaderSortIcon/HeaderSortIcon.d.ts +6 -0
  29. package/dist/lists/DataTable/DataTableHeader/HeaderSortIcon/index.d.ts +1 -0
  30. package/dist/lists/DataTable/DataTableHeader/constants.d.ts +2 -0
  31. package/dist/lists/DataTable/DataTableHeader/domain.d.ts +2 -0
  32. package/dist/lists/DataTable/DataTableHeader/types.d.ts +4 -0
  33. package/dist/lists/DataTable/types.d.ts +1 -1
  34. package/dist/lists/DataTableCell/index.d.ts +1 -0
  35. package/dist/lists/index.d.ts +1 -1
  36. package/dist/overlay/KebabMenu/types.d.ts +1 -0
  37. package/dist/typography/Text/Text.d.ts +2 -1
  38. package/dist/utils/date.d.ts +1 -0
  39. package/package.json +3 -3
  40. package/dist/foundation/colors.d.ts +0 -53
  41. package/dist/lists/DataTable/DataTableCell/index.d.ts +0 -1
  42. /package/dist/lists/{DataTable/DataTableCell → DataTableCell}/DataTableCell.d.ts +0 -0
@@ -0,0 +1,3 @@
1
+ import { DataTableCustomComponent } from '../types';
2
+ export declare const DataTableDefaultItemComponent: ({ columns, item, testId }: DataTableCustomComponent<any>) => JSX.Element;
3
+ export default DataTableDefaultItemComponent;
@@ -0,0 +1 @@
1
+ export { default } from './DataTableDefaultItemComponent';
@@ -0,0 +1,7 @@
1
+ import { DataTableColumn } from '../../types';
2
+ declare type Props = {
3
+ columns: DataTableColumn[];
4
+ showActionMenu?: boolean;
5
+ };
6
+ declare const ColumnSizes: ({ columns, showActionMenu }: Props) => JSX.Element;
7
+ export default ColumnSizes;
@@ -0,0 +1 @@
1
+ export { default } from './ColumnSizes';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { DataTableColumn, DataTableSort } from './types';
2
+ import type { DataTableColumn, DataTableSort } from '../types';
3
3
  declare type Props = {
4
4
  columns: DataTableColumn[];
5
5
  onSort?: (sort: DataTableSort) => void;
@@ -0,0 +1,6 @@
1
+ import { DataTableSortDirection } from '../../types';
2
+ declare type Props = {
3
+ sortDirection?: DataTableSortDirection;
4
+ };
5
+ declare const HeaderSortIcon: ({ sortDirection }: Props) => JSX.Element;
6
+ export default HeaderSortIcon;
@@ -0,0 +1 @@
1
+ export { default } from './HeaderSortIcon';
@@ -0,0 +1,2 @@
1
+ import { SortOrder } from './types';
2
+ export declare const SORT_ORDER: SortOrder;
@@ -0,0 +1,2 @@
1
+ import { DataTableColumn, DataTableSortDirection } from '../types';
2
+ export declare const getNextSort: (column: DataTableColumn) => DataTableSortDirection;
@@ -0,0 +1,4 @@
1
+ export declare type SortOrder = {
2
+ ASC: 'asc';
3
+ DESC: 'desc';
4
+ };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import Button from '../../actions/Button/Button';
3
- import { MenuAction } from '../../overlay/Menu/types';
3
+ import { MenuAction } from '../../overlay/KebabMenu/types';
4
4
  export declare type DataTableColumn = {
5
5
  name: string;
6
6
  label?: React.ReactNode;
@@ -0,0 +1 @@
1
+ export { default } from './DataTableCell';
@@ -1,6 +1,6 @@
1
1
  import DataTable from './DataTable';
2
2
  import DataTableRow from './DataTableRow';
3
- import DataTableCell from './DataTable/DataTableCell/DataTableCell';
4
3
  import DataTableEditableCell from './DataTableEditableCell';
4
+ import DataTableCell from './DataTableCell/DataTableCell';
5
5
  export { DataTable, DataTableRow, DataTableCell, DataTableEditableCell };
6
6
  export type { DataTableColumn, DataTableCustomComponent, DataTableSortDirection, DataTableSort, DataTableAction } from './DataTable/types';
@@ -3,4 +3,5 @@ export declare type MenuAction = {
3
3
  action: string;
4
4
  label: React.ReactNode;
5
5
  onAction: (e: React.MouseEvent | React.KeyboardEvent) => void;
6
+ hidden?: boolean;
6
7
  };
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { Color } from '../../foundation/color-types';
2
3
  import { PositionStyles } from '../../foundation/types';
3
4
  import { TextType, Emphasis, Alignment } from './types';
4
5
  declare type Props = {
@@ -6,7 +7,7 @@ declare type Props = {
6
7
  as?: TextType;
7
8
  emphasis?: Emphasis | Emphasis[];
8
9
  alignment?: Alignment;
9
- color?: string;
10
+ color?: Color | string;
10
11
  testId?: string;
11
12
  } & PositionStyles;
12
13
  declare const Text: ({ children, as, emphasis, alignment, color, testId, ...positionProps }: Props) => React.ReactElement<{
@@ -22,6 +22,7 @@ export declare type TimeRange = {
22
22
  start?: string;
23
23
  end?: string;
24
24
  };
25
+ export declare type StartTime = 'now' | string;
25
26
  export declare type BlockedDays = Modifier | Modifier[];
26
27
  export declare type DateRangeError = string | {
27
28
  [K in keyof DateRange]: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7shifts/sous-chef",
3
- "version": "3.11.2",
3
+ "version": "3.13.0",
4
4
  "description": "7shifts component library",
5
5
  "author": "7shifts",
6
6
  "license": "MIT",
@@ -12,14 +12,14 @@
12
12
  "node": ">=10"
13
13
  },
14
14
  "scripts": {
15
- "prebuild": "run-s build-icons",
16
15
  "build": "./scripts/build.sh",
16
+ "build:prod": "./scripts/build.sh --prod",
17
17
  "prebuild:check": "run-s \"build --check\"",
18
18
  "build:check": "source-map-explorer dist/index.js dist/index.js.map",
19
19
  "build-icons": "./scripts/build-icons.sh",
20
+ "build-colors": "./scripts/build-colors.sh",
20
21
  "compile": "microbundle-crl --no-compress --format modern,cjs",
21
22
  "start": "microbundle-crl watch --no-compress --format modern,cjs",
22
- "prepare": "run-s build",
23
23
  "test": "run-s test:unit test:lint test:build",
24
24
  "test:build": "run-s build",
25
25
  "test:lint": "eslint --ext .ts --ext .tsx .",
@@ -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 +0,0 @@
1
- export * from './DataTableCell';