@7shifts/sous-chef 3.10.3 → 3.11.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.
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
2
  declare type Props = {
3
3
  isPaywall: Boolean;
4
+ isInsideModal?: Boolean;
4
5
  actions: {
5
6
  primary?: React.ReactElement;
6
7
  secondary?: React.ReactElement;
7
8
  };
8
9
  };
9
- declare const EmptyStateContainerCTA: ({ isPaywall, actions }: Props) => JSX.Element;
10
+ declare const EmptyStateContainerCTA: ({ isPaywall, isInsideModal, actions }: Props) => JSX.Element;
10
11
  export default EmptyStateContainerCTA;
@@ -5,5 +5,11 @@ import type { Props as TextFieldProps } from '../TextField/TextField';
5
5
  *
6
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
7
  */
8
- declare const TimeField: React.ForwardRefExoticComponent<Pick<TextFieldProps, "disabled" | "onBlur" | "onFocus" | "onKeyDown" | "id" | "testId" | "caption" | "label" | "name" | "onChange" | "error" | "placeholder" | "value" | "defaultValue" | "autoComplete" | "autoFocus" | "maxLength"> & React.RefAttributes<HTMLInputElement>>;
8
+ declare const TimeField: React.ForwardRefExoticComponent<Pick<TextFieldProps, "disabled" | "onBlur" | "onFocus" | "onKeyDown" | "id" | "testId" | "caption" | "label" | "name" | "onChange" | "error" | "placeholder" | "value" | "defaultValue" | "autoComplete" | "autoFocus" | "maxLength"> & {
9
+ onClick?: (() => void) | undefined;
10
+ onMouseEnter?: ((event: React.MouseEvent<Element, MouseEvent>) => void) | undefined;
11
+ onMouseLeave?: ((event: React.MouseEvent<Element, MouseEvent>) => void) | undefined;
12
+ interval?: 15 | 30 | undefined;
13
+ startTime?: string | undefined;
14
+ } & React.RefAttributes<HTMLInputElement>>;
9
15
  export default TimeField;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { TimeInterval } from '../../../utils/date';
3
+ declare type TimeFieldDropdownProps = {
4
+ trigger: React.ReactElement;
5
+ interval: TimeInterval;
6
+ startTime?: 'now' | string;
7
+ onOptionClick: (option: any) => void;
8
+ inputValue?: string;
9
+ width?: number;
10
+ };
11
+ declare const TimeFieldDropdown: ({ trigger, interval, startTime, onOptionClick, inputValue, width }: TimeFieldDropdownProps) => JSX.Element;
12
+ export default TimeFieldDropdown;
@@ -0,0 +1 @@
1
+ export { default } from './TimeFieldDropdown';
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { Props as TextFieldProps } from '../../TextField/TextField';
3
+ declare const TimeFieldDropdownTrigger: React.ForwardRefExoticComponent<Pick<TextFieldProps, "disabled" | "onBlur" | "onFocus" | "onKeyDown" | "id" | "testId" | "caption" | "label" | "name" | "onChange" | "error" | "placeholder" | "value" | "defaultValue" | "autoComplete" | "autoFocus" | "maxLength"> & {
4
+ onClick?: (() => void) | undefined;
5
+ onMouseEnter?: ((event: React.MouseEvent<Element, MouseEvent>) => void) | undefined;
6
+ onMouseLeave?: ((event: React.MouseEvent<Element, MouseEvent>) => void) | undefined;
7
+ onInputChange?: ((e: string) => void) | undefined;
8
+ } & React.RefAttributes<HTMLInputElement>>;
9
+ export default TimeFieldDropdownTrigger;
@@ -0,0 +1 @@
1
+ export { default } from './TimeFieldDropdownTrigger';
@@ -0,0 +1,7 @@
1
+ declare type Props = {
2
+ inputProps: any;
3
+ allOtherProps: any;
4
+ onInputChange?: (e: string) => void;
5
+ };
6
+ declare const TimeFieldInput: ({ inputProps, allOtherProps }: Props) => JSX.Element;
7
+ export default TimeFieldInput;
@@ -0,0 +1 @@
1
+ export { default } from './TimeFieldInput';
@@ -0,0 +1 @@
1
+ export declare const getTimeOptions: (interval: number, startTime?: Date) => string[];
@@ -1,19 +1,18 @@
1
1
  /// <reference types="react" />
2
- import { DateRange } from '../../utils/date';
3
- declare type FieldControls = {
2
+ declare type FieldControls<T> = {
4
3
  id: string;
5
4
  error?: React.ReactNode;
6
- value: DateRange;
7
- onChange: (e: DateRange) => void;
5
+ value: any;
6
+ onChange: (e: T) => void;
8
7
  onBlur: () => void;
9
8
  };
10
- declare type Props = {
9
+ declare type Props<T> = {
11
10
  name: string;
12
11
  id?: string;
13
- value?: DateRange;
14
- onChange?: (e: DateRange) => void;
12
+ value?: T;
13
+ onChange?: (e: T) => void;
15
14
  onBlur?: () => void;
16
15
  error?: React.ReactNode;
17
16
  };
18
- export declare const useRangeFieldControllers: ({ name, id: inputId, value, onChange, onBlur, error }: Props) => FieldControls;
17
+ export declare const useRangeFieldControllers: <T extends unknown>({ name, id: inputId, value, onChange, onBlur, error }: Props<T>) => FieldControls<T>;
19
18
  export {};
package/dist/index.css CHANGED
@@ -821,6 +821,7 @@ Just for future references:
821
821
  transform-origin: top right;
822
822
  min-width: 120px;
823
823
  padding: 20px;
824
+ box-sizing: border-box;
824
825
  }
825
826
  ._2rs8m {
826
827
  all: unset;
@@ -836,170 +837,6 @@ Just for future references:
836
837
  ._2rs8m:focus > * {
837
838
  box-shadow: 0 0 8px var(--color-eggplant-300);
838
839
  }
839
- ._1v1df {
840
- font-family: "Proxima Nova", sans-serif;
841
- list-style: none;
842
- margin: -20px;
843
- padding: 0;
844
- }
845
- ._eAjpa {
846
- background-color: var(--color-grey-100);
847
- }
848
- ._3x1F6 {
849
- width: 100%;
850
- height: 1px;
851
- background-color: var(--color-grey-200);
852
- margin: 4px 0;
853
- }
854
- ._B3_I5 {
855
- padding: 12px;
856
- font-size: 14px;
857
- line-height: 20px;
858
- display: flex;
859
- cursor: pointer;
860
- white-space: nowrap;
861
- color: var(--color-grey-400);
862
- gap: 8px;
863
- align-items: center;
864
- }
865
- ._1mr1h {
866
- background-color: var(--color-eggplant-100);
867
- }
868
- ._1mr1h > ._2b7Fg {
869
- color: var(--color-eggplant-500);
870
- }
871
- ._2l0Cb {
872
- cursor: auto;
873
- color: var(--color-grey-500);
874
- }
875
- ._2l0Cb > ._2b7Fg {
876
- color: var(--color-grey-400);
877
- }
878
- ._2b7Fg {
879
- flex: 1;
880
- color: var(--color-grey-500);
881
- }
882
- h1._3CIA3 {
883
- font-size: 1.75rem;
884
- line-height: 2rem;
885
- font-weight: 600;
886
- }
887
-
888
- h2._3CIA3 {
889
- font-size: 1.5rem;
890
- line-height: 1.75rem;
891
- font-weight: 600;
892
- }
893
-
894
- h3._3CIA3 {
895
- font-size: 1.25rem;
896
- line-height: 1.5rem;
897
- font-weight: 600;
898
- }
899
-
900
- h4._3CIA3 {
901
- font-size: 1.25rem;
902
- line-height: 1.5rem;
903
- font-weight: 400;
904
- color: var(--color-grey-400);
905
- }
906
-
907
- h5._3CIA3 {
908
- font-size: 1rem;
909
- line-height: 1.25rem;
910
- font-weight: 400;
911
- color: var(--color-grey-400);
912
- }
913
-
914
- ._3CIA3 {
915
- font-family: "Proxima Nova", sans-serif;
916
- color: var(--color-grey-500);
917
- margin: 0;
918
- }
919
- ._1nnj8 {
920
- font-size: 0.875rem;
921
- line-height: 1.125rem;
922
- font-weight: 400;
923
- }
924
- ._37K6o {
925
- font-size: 0.75rem;
926
- line-height: 1rem;
927
- font-weight: 400;
928
- }
929
- ._avqxy {
930
- font-size: 2.5rem;
931
- line-height: 2.75rem;
932
- font-weight: 600;
933
- }
934
- ._2TG6E {
935
- font-weight: 600;
936
- }
937
- ._2hlsn {
938
- font-style: italic;
939
- }
940
- ._1Pjo6 {
941
- text-decoration: underline;
942
- }
943
- ._eDdDI {
944
- font-variant-numeric: tabular-nums;
945
- }
946
- ._2gNwS {
947
- text-align: left;
948
- }
949
- ._ufv1W {
950
- text-align: right;
951
- }
952
- ._2WMN6 {
953
- text-align: center;
954
- }
955
- ._2iH-J {
956
- text-align: justify;
957
- }
958
- ._2Ybjx {
959
- position: relative;
960
- border-bottom: 1px solid var(--color-grey-200);
961
- padding: 16px;
962
- word-break: break-word;
963
- -webkit-hyphens: auto;
964
- -ms-hyphens: auto;
965
- hyphens: auto;
966
- }
967
- ._2Ybjx:first-of-type {
968
- border-left: 1px solid var(--color-grey-200);
969
- }
970
- ._2Ybjx:last-of-type {
971
- border-right: 1px solid var(--color-grey-200);
972
- }
973
- ._5KXHH {
974
- padding: 0;
975
- }
976
- ._2-I0j:not(:last-child) {
977
- border-right: 1px solid var(--color-grey-200);
978
- }
979
- ._D73Vx {
980
- background: var(--color-radish-100);
981
- color: var(--color-radish-400);
982
- }
983
- ._3A9-M {
984
- height: 100%;
985
- display: flex;
986
- align-items: center;
987
- }
988
- ._17Km7 {
989
- justify-content: flex-end;
990
- }
991
- ._2c6KQ {
992
- justify-content: space-between;
993
- }
994
- ._2hIl3 {
995
- width: 16px;
996
- }
997
- ._8Uhyd {
998
- margin-left: 4px;
999
- }
1000
- ._3X51R {
1001
- margin-right: 4px;
1002
- }
1003
840
  ._2puqJ {
1004
841
  position: fixed;
1005
842
  top: 0px;
@@ -1035,7 +872,7 @@ h5._3CIA3 {
1035
872
  }
1036
873
 
1037
874
  ._wQQ_2 {
1038
- position: initial;
875
+ position: relative;
1039
876
  border: 1px solid var(--color-grey-200);
1040
877
  background: var(--color-white);
1041
878
  overflow: auto;
@@ -1064,6 +901,12 @@ h5._3CIA3 {
1064
901
  font-weight: 600;
1065
902
  font-family: "Proxima Nova", sans-serif;
1066
903
  }
904
+ ._2zYre {
905
+ display: flex;
906
+ justify-content: end;
907
+ margin-bottom: -20px;
908
+ z-index: 2;
909
+ }
1067
910
 
1068
911
  ._2XwRD {
1069
912
  font-size: 20px;
@@ -1078,7 +921,6 @@ h5._3CIA3 {
1078
921
  */
1079
922
  ._2J-ku {
1080
923
  overflow: auto;
1081
- margin-top: 24px;
1082
924
  font-family: "Proxima Nova", sans-serif;
1083
925
  font-size: 14px;
1084
926
  line-height: 16px;
@@ -1573,6 +1415,125 @@ h5._3CIA3 {
1573
1415
  border-top-right-radius: 50%;
1574
1416
  border-bottom-right-radius: 50%;
1575
1417
  }
1418
+ ._1v1df {
1419
+ font-family: "Proxima Nova", sans-serif;
1420
+ list-style: none;
1421
+ margin: -20px;
1422
+ padding: 0;
1423
+ }
1424
+ ._eAjpa {
1425
+ background-color: var(--color-grey-100);
1426
+ }
1427
+ ._3x1F6 {
1428
+ width: 100%;
1429
+ height: 1px;
1430
+ background-color: var(--color-grey-200);
1431
+ margin: 4px 0;
1432
+ }
1433
+ ._B3_I5 {
1434
+ padding: 12px;
1435
+ font-size: 14px;
1436
+ line-height: 20px;
1437
+ display: flex;
1438
+ cursor: pointer;
1439
+ white-space: nowrap;
1440
+ color: var(--color-grey-400);
1441
+ gap: 8px;
1442
+ align-items: center;
1443
+ }
1444
+ ._1mr1h {
1445
+ background-color: var(--color-eggplant-100);
1446
+ }
1447
+ ._1mr1h > ._2b7Fg {
1448
+ color: var(--color-eggplant-500);
1449
+ }
1450
+ ._2l0Cb {
1451
+ cursor: auto;
1452
+ color: var(--color-grey-500);
1453
+ }
1454
+ ._2l0Cb > ._2b7Fg {
1455
+ color: var(--color-grey-400);
1456
+ }
1457
+ ._2b7Fg {
1458
+ flex: 1;
1459
+ color: var(--color-grey-500);
1460
+ }
1461
+ h1._3CIA3 {
1462
+ font-size: 1.75rem;
1463
+ line-height: 2rem;
1464
+ font-weight: 600;
1465
+ }
1466
+
1467
+ h2._3CIA3 {
1468
+ font-size: 1.5rem;
1469
+ line-height: 1.75rem;
1470
+ font-weight: 600;
1471
+ }
1472
+
1473
+ h3._3CIA3 {
1474
+ font-size: 1.25rem;
1475
+ line-height: 1.5rem;
1476
+ font-weight: 600;
1477
+ }
1478
+
1479
+ h4._3CIA3 {
1480
+ font-size: 1.25rem;
1481
+ line-height: 1.5rem;
1482
+ font-weight: 400;
1483
+ color: var(--color-grey-400);
1484
+ }
1485
+
1486
+ h5._3CIA3 {
1487
+ font-size: 1rem;
1488
+ line-height: 1.25rem;
1489
+ font-weight: 400;
1490
+ color: var(--color-grey-400);
1491
+ }
1492
+
1493
+ ._3CIA3 {
1494
+ font-family: "Proxima Nova", sans-serif;
1495
+ color: var(--color-grey-500);
1496
+ margin: 0;
1497
+ }
1498
+ ._1nnj8 {
1499
+ font-size: 0.875rem;
1500
+ line-height: 1.125rem;
1501
+ font-weight: 400;
1502
+ }
1503
+ ._37K6o {
1504
+ font-size: 0.75rem;
1505
+ line-height: 1rem;
1506
+ font-weight: 400;
1507
+ }
1508
+ ._avqxy {
1509
+ font-size: 2.5rem;
1510
+ line-height: 2.75rem;
1511
+ font-weight: 600;
1512
+ }
1513
+ ._2TG6E {
1514
+ font-weight: 600;
1515
+ }
1516
+ ._2hlsn {
1517
+ font-style: italic;
1518
+ }
1519
+ ._1Pjo6 {
1520
+ text-decoration: underline;
1521
+ }
1522
+ ._eDdDI {
1523
+ font-variant-numeric: tabular-nums;
1524
+ }
1525
+ ._2gNwS {
1526
+ text-align: left;
1527
+ }
1528
+ ._ufv1W {
1529
+ text-align: right;
1530
+ }
1531
+ ._2WMN6 {
1532
+ text-align: center;
1533
+ }
1534
+ ._2iH-J {
1535
+ text-align: justify;
1536
+ }
1576
1537
  ._h724f {
1577
1538
  line-height: normal;
1578
1539
  padding: 0;
@@ -1603,6 +1564,90 @@ h5._3CIA3 {
1603
1564
  font-weight: 400;
1604
1565
  font-size: 12px;
1605
1566
  }
1567
+ ._20YOA {
1568
+ padding: 7px;
1569
+ line-height: 22px;
1570
+ border-radius: 4px;
1571
+ font-size: 14px;
1572
+ font-family: "Proxima Nova", sans-serif;
1573
+ color: var(--color-grey-500);
1574
+ box-shadow: none;
1575
+ border: 1px solid var(--color-grey-200);
1576
+ margin: 0;
1577
+ flex: 1;
1578
+ min-width: 90px;
1579
+ }
1580
+ ._20YOA:focus {
1581
+ border: 1px solid var(--color-eggplant-400);
1582
+ box-shadow: 0 0 8px var(--color-eggplant-300);
1583
+ outline: none;
1584
+ }
1585
+ ._20YOA:disabled {
1586
+ background-color: var(--color-grey-100);
1587
+ color: var(--color-grey-400);
1588
+ }
1589
+
1590
+ ._3kUSh {
1591
+ border-color: var(--color-radish-400) !important;
1592
+ }
1593
+
1594
+ ._3IU3Q {
1595
+ border-left: 0 !important;
1596
+ border-top-left-radius: 0 !important;
1597
+ border-bottom-left-radius: 0 !important;
1598
+ color: var(--color-grey-400);
1599
+ }
1600
+
1601
+ ._QXJOD {
1602
+ border-right: 0 !important;
1603
+ border-top-right-radius: 0 !important;
1604
+ border-bottom-right-radius: 0 !important;
1605
+ }
1606
+ ._2Ybjx {
1607
+ position: relative;
1608
+ border-bottom: 1px solid var(--color-grey-200);
1609
+ padding: 16px;
1610
+ word-break: break-word;
1611
+ -webkit-hyphens: auto;
1612
+ -ms-hyphens: auto;
1613
+ hyphens: auto;
1614
+ }
1615
+ ._2Ybjx:first-of-type {
1616
+ border-left: 1px solid var(--color-grey-200);
1617
+ }
1618
+ ._2Ybjx:last-of-type {
1619
+ border-right: 1px solid var(--color-grey-200);
1620
+ }
1621
+ ._5KXHH {
1622
+ padding: 0;
1623
+ }
1624
+ ._2-I0j:not(:last-child) {
1625
+ border-right: 1px solid var(--color-grey-200);
1626
+ }
1627
+ ._D73Vx {
1628
+ background: var(--color-radish-100);
1629
+ color: var(--color-radish-400);
1630
+ }
1631
+ ._3A9-M {
1632
+ height: 100%;
1633
+ display: flex;
1634
+ align-items: center;
1635
+ }
1636
+ ._17Km7 {
1637
+ justify-content: flex-end;
1638
+ }
1639
+ ._2c6KQ {
1640
+ justify-content: space-between;
1641
+ }
1642
+ ._2hIl3 {
1643
+ width: 16px;
1644
+ }
1645
+ ._8Uhyd {
1646
+ margin-left: 4px;
1647
+ }
1648
+ ._3X51R {
1649
+ margin-right: 4px;
1650
+ }
1606
1651
  ._ybKOk {
1607
1652
  position: relative;
1608
1653
  display: flex;
@@ -1953,45 +1998,6 @@ h5._3CIA3 {
1953
1998
  ._2F1jP {
1954
1999
  padding: 8px 4px 8px 4px;
1955
2000
  }
1956
- ._20YOA {
1957
- padding: 7px;
1958
- line-height: 22px;
1959
- border-radius: 4px;
1960
- font-size: 14px;
1961
- font-family: "Proxima Nova", sans-serif;
1962
- color: var(--color-grey-500);
1963
- box-shadow: none;
1964
- border: 1px solid var(--color-grey-200);
1965
- margin: 0;
1966
- flex: 1;
1967
- min-width: 90px;
1968
- }
1969
- ._20YOA:focus {
1970
- border: 1px solid var(--color-eggplant-400);
1971
- box-shadow: 0 0 8px var(--color-eggplant-300);
1972
- outline: none;
1973
- }
1974
- ._20YOA:disabled {
1975
- background-color: var(--color-grey-100);
1976
- color: var(--color-grey-400);
1977
- }
1978
-
1979
- ._3kUSh {
1980
- border-color: var(--color-radish-400) !important;
1981
- }
1982
-
1983
- ._3IU3Q {
1984
- border-left: 0 !important;
1985
- border-top-left-radius: 0 !important;
1986
- border-bottom-left-radius: 0 !important;
1987
- color: var(--color-grey-400);
1988
- }
1989
-
1990
- ._QXJOD {
1991
- border-right: 0 !important;
1992
- border-top-right-radius: 0 !important;
1993
- border-bottom-right-radius: 0 !important;
1994
- }
1995
2001
  ._2X-yg {
1996
2002
  width: 272px;
1997
2003
  }
@@ -3440,7 +3446,7 @@ input:disabled + ._1tMq-::after {
3440
3446
  }
3441
3447
 
3442
3448
  @media screen and (max-width: 900px) {
3443
- ._1Cx9N {
3449
+ ._1Cx9N:not(._WbcaM) {
3444
3450
  justify-content: center;
3445
3451
  }
3446
3452
  }
@@ -3450,6 +3456,11 @@ input:disabled + ._1tMq-::after {
3450
3456
  flex-direction: row;
3451
3457
  justify-content: space-between;
3452
3458
  }
3459
+ ._2sweG {
3460
+ flex-direction: row-reverse;
3461
+ padding-top: 20px;
3462
+ padding-bottom: 20px;
3463
+ }
3453
3464
  ._2jreb {
3454
3465
  display: flex;
3455
3466
  flex-direction: column;
@@ -3466,9 +3477,14 @@ input:disabled + ._1tMq-::after {
3466
3477
  color: var(--color-grey-500);
3467
3478
  font-size: 14px;
3468
3479
  }
3480
+ ._G2VtA {
3481
+ display: flex;
3482
+ flex-direction: column;
3483
+ justify-content: center;
3484
+ }
3469
3485
 
3470
3486
  @media screen and (max-width: 900px) {
3471
- ._eMr1V {
3487
+ ._eMr1V:not(._2sweG) {
3472
3488
  align-items: center;
3473
3489
  text-align: center;
3474
3490
  flex-direction: column-reverse;