@7shifts/sous-chef 4.6.1 → 4.7.0-beta-20260625201656

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.
@@ -5,6 +5,7 @@ type Props = {
5
5
  /** If not provided it will generate a random id so the label links properly with the text input */
6
6
  id?: string;
7
7
  checked?: boolean;
8
+ indeterminate?: boolean;
8
9
  onChange?: (e: boolean) => void;
9
10
  onBlur?: (e: boolean) => void;
10
11
  label?: React.ReactNode;
@@ -14,6 +14,8 @@ type Props = {
14
14
  defaultValue?: string;
15
15
  criterias?: PasswordCriteria[];
16
16
  testId?: string;
17
+ /** Sets the autocomplete attribute on the input for password manager compatibility (e.g. "current-password", "new-password") */
18
+ autoComplete?: string;
17
19
  };
18
20
  /** A field used for passwords. It obfuscates the input by default, but has the option to reveal the input. Can also include required password criteria. */
19
21
  declare const PasswordField: React.FC<Props>;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ name: string;
4
+ id?: string;
5
+ /** The dates to display as pills, in chronological order. Typically 7 days representing a week. */
6
+ days: Date[];
7
+ value?: Date[];
8
+ onChange?: (selected: Date[]) => void;
9
+ label?: React.ReactNode;
10
+ caption?: React.ReactNode;
11
+ error?: React.ReactNode;
12
+ disabled?: boolean;
13
+ displayFormat?: 'weekday' | 'month';
14
+ testId?: string;
15
+ };
16
+ declare const WeekSelectField: ({ name, id: inputId, days, value: controlledValue, onChange, label, caption, error: errorProp, disabled, displayFormat, testId }: Props) => React.JSX.Element;
17
+ export default WeekSelectField;
@@ -0,0 +1 @@
1
+ export { default } from './WeekSelectField';
@@ -4,6 +4,7 @@ import TextAreaField from './TextAreaField';
4
4
  import TextField from './TextField';
5
5
  import CheckboxField from './CheckboxField';
6
6
  import PillSelectField from './PillSelectField';
7
+ import WeekSelectField from './WeekSelectField';
7
8
  import RadioGroupField from './RadioGroupField';
8
9
  import RadioGroupOption from './RadioGroupOption';
9
10
  import RadioGroupBoxOption from './RadioGroupBoxOption';
@@ -24,7 +25,7 @@ import FormFeedback from './FormFeedback';
24
25
  import PhoneField from './PhoneField';
25
26
  import NumberField from './NumberField';
26
27
  import ColorField from './ColorField';
27
- 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, ColorField, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT };
28
+ export { Form, FormRow, TextAreaField, TextField, CheckboxField, PillSelectField, WeekSelectField, RadioGroupField, RadioGroupOption, RadioGroupBoxOption, PasswordField, MultiSelectField, SelectField, AsyncSelectField, DateField, DateRangeField, WeekField, TimeField, TimeRangeField, CurrencyField, PercentageField, FormSection, FormFooter, FormFeedback, PhoneField, NumberField, ColorField, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT };
28
29
  export type { PasswordCriteria } from './PasswordField/types';
29
30
  export type { SelectOption, SelectOptions, GroupOption, CustomOptionProps, SelectedOptionPrefixProps } from './SelectField/types';
30
31
  export type { PillSelectOption } from './PillSelectField/types';
@@ -25,6 +25,13 @@
25
25
  "thursday": "Thursday",
26
26
  "friday": "Friday",
27
27
  "saturday": "Saturday",
28
+ "sundayShort": "Sun",
29
+ "mondayShort": "Mon",
30
+ "tuesdayShort": "Tue",
31
+ "wednesdayShort": "Wed",
32
+ "thursdayShort": "Thu",
33
+ "fridayShort": "Fri",
34
+ "saturdayShort": "Sat",
28
35
  "january": "January",
29
36
  "february": "February",
30
37
  "march": "March",
@@ -25,6 +25,13 @@
25
25
  "thursday": "Jueves",
26
26
  "friday": "Viernes",
27
27
  "saturday": "Sábado",
28
+ "sundayShort": "Dom",
29
+ "mondayShort": "Lun",
30
+ "tuesdayShort": "Mar",
31
+ "wednesdayShort": "Mié",
32
+ "thursdayShort": "Jue",
33
+ "fridayShort": "Vie",
34
+ "saturdayShort": "Sáb",
28
35
  "january": "Enero",
29
36
  "february": "Febrero",
30
37
  "march": "Marzo",
@@ -25,6 +25,13 @@
25
25
  "thursday": "Jeudi",
26
26
  "friday": "Vendredi",
27
27
  "saturday": "Samedi",
28
+ "sundayShort": "Dim",
29
+ "mondayShort": "Lun",
30
+ "tuesdayShort": "Mar",
31
+ "wednesdayShort": "Mer",
32
+ "thursdayShort": "Jeu",
33
+ "fridayShort": "Ven",
34
+ "saturdayShort": "Sam",
28
35
  "january": "Janvier",
29
36
  "february": "Février",
30
37
  "march": "Mars",
package/dist/index.css CHANGED
@@ -194,7 +194,7 @@
194
194
  --color-neutral-container: #e2ded6;
195
195
  --color-neutral-on-container: #323232;
196
196
  --color-neutral-container-variant: #f1f0ec;
197
- --color-neutral-on-container-variant: #383430;
197
+ --color-neutral-on-container-variant: #413E3E;
198
198
  --color-neutral-black-transparent-05: rgba(var(--color-black-rgb), 0.05);
199
199
  --color-neutral-black-transparent-10: rgba(var(--color-black-rgb), 0.1);
200
200
  --color-neutral-black-transparent-15: rgba(var(--color-black-rgb), 0.15);
@@ -419,7 +419,7 @@
419
419
  --color-neutral-on-color: #323232;
420
420
  --color-neutral-container: #4c4b49;
421
421
  --color-neutral-on-container: #fff;
422
- --color-neutral-container-variant: #383430;
422
+ --color-neutral-container-variant: #413E3E;
423
423
  --color-neutral-on-container-variant: #c7c0b2;
424
424
  --color-shadow-overlay: var(--color-neutral-black-transparent-40);
425
425
  --color-shadow-active: #4570ff;
@@ -2424,6 +2424,7 @@ h5._i2LHD {
2424
2424
  }
2425
2425
  ._kmvBP {
2426
2426
  display: block;
2427
+ position: relative;
2427
2428
  top: 0;
2428
2429
  left: 0;
2429
2430
  height: 14px;
@@ -2439,11 +2440,11 @@ h5._i2LHD {
2439
2440
  opacity: 0;
2440
2441
  }
2441
2442
  input:checked ~ ._kmvBP {
2442
- background-color: var(--color-primary-color);
2443
+ background-color: var(--color-surface-inverse);
2443
2444
  border-radius: 4px;
2444
2445
  transform: rotate(0deg) scale(1);
2445
2446
  opacity: 1;
2446
- border: 1px solid var(--color-primary-color);
2447
+ border: 1px solid var(--color-surface-inverse);
2447
2448
  }
2448
2449
  input:checked ~ ._kmvBP::after {
2449
2450
  opacity: 1;
@@ -2452,26 +2453,46 @@ input:checked ~ ._kmvBP::after {
2452
2453
  top: 1px;
2453
2454
  width: 4px;
2454
2455
  height: 8px;
2455
- border: solid var(--color-primary-on-color);
2456
+ border: solid var(--color-surface-on-inverse);
2456
2457
  border-width: 0 2px 2px 0;
2457
2458
  background-color: transparent;
2458
2459
  border-radius: 0;
2459
2460
  }
2460
- input:focus-visible + ._kmvBP {
2461
+ input[data-indeterminate=true] ~ ._kmvBP {
2462
+ background-color: var(--color-surface-inverse);
2463
+ border: 1px solid var(--color-surface-inverse);
2464
+ opacity: 1;
2465
+ }
2466
+ input[data-indeterminate=true] ~ ._kmvBP::after {
2467
+ opacity: 1;
2468
+ left: 3px;
2469
+ top: 6px;
2470
+ width: 8px;
2471
+ height: 0;
2472
+ transform: rotate(0deg) scale(1);
2473
+ border: solid var(--color-surface-on-inverse);
2474
+ border-width: 0 0 2px 0;
2475
+ background-color: transparent;
2476
+ border-radius: 0;
2477
+ }
2478
+ input:focus-visible ~ ._kmvBP {
2461
2479
  outline: var(--color-primary-color) solid 1px;
2462
2480
  }
2463
2481
  ._Id4qm input:disabled {
2464
2482
  cursor: default;
2465
2483
  }
2466
- input:disabled + ._kmvBP {
2484
+ input:disabled ~ ._kmvBP {
2467
2485
  background-color: var(--color-surface-container-disabled);
2468
2486
  border: 1px solid var(--color-outline);
2469
2487
  }
2470
- input:disabled + ._kmvBP::after {
2488
+ input:disabled ~ ._kmvBP::after {
2471
2489
  box-shadow: none;
2472
- border: solid #9f9f9f !important;
2490
+ border: solid var(--color-surface-on-container-disabled) !important;
2473
2491
  border-width: 0 2px 2px 0 !important;
2474
2492
  }
2493
+ input:disabled[data-indeterminate=true] ~ ._kmvBP::after {
2494
+ border-width: 0 0 2px 0 !important;
2495
+ }
2475
2496
  ._NwD6V {
2476
2497
  box-shadow: 0 0 12px -3px var(--color-shadow-overlay);
2477
2498
  border: 1px solid var(--color-outline);
@@ -3989,6 +4010,78 @@ input:focus-visible + ._JXakU, input:focus-visible + ._ZxEwG {
3989
4010
  box-shadow: 0 0 8px 0 var(--color-shadow-active);
3990
4011
  outline: none;
3991
4012
  }
4013
+ ._IYHYX {
4014
+ display: flex;
4015
+ width: 100%;
4016
+ gap: 4px;
4017
+ }
4018
+ ._JnbPv {
4019
+ position: relative;
4020
+ flex: 1 0 0;
4021
+ min-width: 40px;
4022
+ }
4023
+ ._JnbPv input {
4024
+ position: absolute;
4025
+ opacity: 0;
4026
+ z-index: var(--z-index-base);
4027
+ width: 100%;
4028
+ height: 100%;
4029
+ margin: 0;
4030
+ box-sizing: border-box;
4031
+ }
4032
+ ._JnbPv input:hover:not(:disabled) {
4033
+ cursor: pointer;
4034
+ }
4035
+ ._9GwLj {
4036
+ display: flex;
4037
+ flex-direction: column;
4038
+ align-items: center;
4039
+ justify-content: center;
4040
+ height: 54px;
4041
+ padding: 10px 16px;
4042
+ border-radius: 8px;
4043
+ background-color: var(--color-surface-container-high);
4044
+ color: var(--color-surface-on-color-bold);
4045
+ box-sizing: border-box;
4046
+ transition: background-color 0.2s, color 0.2s;
4047
+ -webkit-user-select: none;
4048
+ -moz-user-select: none;
4049
+ user-select: none;
4050
+ }
4051
+ ._WcKdi {
4052
+ font-size: var(--font-size-100);
4053
+ line-height: var(--font-line-height-100);
4054
+ font-weight: var(--p-font-weight-normal);
4055
+ }
4056
+ ._MQ3xL {
4057
+ font-size: var(--font-size-300);
4058
+ line-height: var(--font-line-height-200);
4059
+ font-weight: var(--p-font-weight-semibold);
4060
+ }
4061
+ ._JnbPv:hover > input:not(:disabled) ~ ._9GwLj {
4062
+ background: linear-gradient(0deg, var(--color-hover-darken) 0%, var(--color-hover-darken) 100%), var(--color-surface-container-high);
4063
+ cursor: pointer;
4064
+ }
4065
+ ._JnbPv:hover > input:not(:disabled):checked ~ ._9GwLj {
4066
+ background: linear-gradient(0deg, var(--color-hover-lighten) 0%, var(--color-hover-lighten) 100%), var(--color-surface-inverse);
4067
+ color: var(--color-surface-on-inverse);
4068
+ }
4069
+ ._JnbPv input:checked ~ ._9GwLj {
4070
+ background-color: var(--color-surface-inverse);
4071
+ color: var(--color-surface-on-inverse);
4072
+ }
4073
+ ._JnbPv input:disabled ~ ._9GwLj {
4074
+ background-color: var(--color-surface-container-disabled);
4075
+ color: var(--color-surface-on-container-disabled);
4076
+ }
4077
+ ._JnbPv input:disabled:checked ~ ._9GwLj {
4078
+ background-color: var(--color-surface-inverse);
4079
+ color: var(--color-surface-on-inverse-disabled);
4080
+ }
4081
+ ._JnbPv input:focus-visible ~ ._9GwLj {
4082
+ box-shadow: 0 0 8px 0 var(--color-shadow-active);
4083
+ outline: none;
4084
+ }
3992
4085
  ._xzukU {
3993
4086
  font-family: var(--font-family-body);
3994
4087
  font-size: var(--font-size-200);
@@ -6303,12 +6396,12 @@ input._TEU6N {
6303
6396
  align-items: center;
6304
6397
  gap: 8px;
6305
6398
  height: 42px;
6306
- padding: 0 20px;
6399
+ padding: 0 16px;
6307
6400
  border-radius: var(--border-radius-400) var(--border-radius-400) 0 0;
6308
6401
  border: none;
6309
6402
  border-bottom: 2px solid transparent;
6310
6403
  background: transparent;
6311
- color: var(--color-surface-on-color-subtle);
6404
+ color: var(--color-surface-on-color);
6312
6405
  cursor: pointer;
6313
6406
  white-space: nowrap;
6314
6407
  box-sizing: border-box;
@@ -6316,6 +6409,7 @@ input._TEU6N {
6316
6409
  }
6317
6410
  ._-BgMZ:hover {
6318
6411
  color: var(--color-surface-on-color-bold);
6412
+ border-bottom-color: var(--color-surface-on-color-bold);
6319
6413
  }
6320
6414
  ._-BgMZ:focus-visible {
6321
6415
  outline: 2px solid var(--color-primary-color);
@@ -6324,7 +6418,7 @@ input._TEU6N {
6324
6418
  }
6325
6419
  ._tZ-HE {
6326
6420
  background: var(--color-neutral-container-variant);
6327
- border-bottom-color: var(--color-surface-inverse);
6421
+ border-bottom-color: var(--color-surface-on-color-bold);
6328
6422
  color: var(--color-surface-on-color-bold);
6329
6423
  font-family: var(--font-family-body);
6330
6424
  font-size: var(--font-size-200);
@@ -6359,7 +6453,10 @@ input._TEU6N {
6359
6453
  flex-shrink: 0;
6360
6454
  }
6361
6455
  ._GW3Wi {
6362
- padding: 16px;
6456
+ padding-top: 20px;
6457
+ padding-bottom: 20px;
6458
+ padding-left: 0px;
6459
+ padding-right: 20px;
6363
6460
  }
6364
6461
  ._DVRRE {
6365
6462
  display: none;