@7shifts/sous-chef 3.26.0 → 3.27.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.
@@ -6,6 +6,7 @@ declare type Props = {
6
6
  caption?: React.ReactNode;
7
7
  children?: React.ReactNode;
8
8
  testId?: string;
9
+ disabled?: boolean;
9
10
  };
10
- declare const RadioGroupBoxOption: ({ value, id: inputId, label, caption, testId, children }: Props) => JSX.Element;
11
+ declare const RadioGroupBoxOption: ({ value, id: inputId, label, caption, testId, children, disabled }: Props) => JSX.Element;
11
12
  export default RadioGroupBoxOption;
@@ -5,6 +5,7 @@ declare type Props = {
5
5
  label?: React.ReactNode;
6
6
  caption?: React.ReactNode;
7
7
  testId?: string;
8
+ disabled?: boolean;
8
9
  };
9
10
  /** RadioGroupField form element. */
10
11
  declare const RadioGroupOption: React.FC<Props>;
@@ -24,7 +24,7 @@ import FormFeedback from './FormFeedback';
24
24
  import PhoneField from './PhoneField';
25
25
  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, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT };
26
26
  export type { PasswordCriteria } from './PasswordField/types';
27
- export type { SelectOption, SelectOptions, GroupOption } from './SelectField/types';
27
+ export type { SelectOption, SelectOptions, GroupOption, CustomOptionProps, SelectedOptionPrefixProps } from './SelectField/types';
28
28
  export type { AsyncSelectOptions } from './AsyncSelectField/types';
29
29
  export type { FormikType } from './Form/types';
30
30
  export type { PhoneFieldValue, PhoneFieldCountryCode } from './PhoneField/types';
package/dist/index.css CHANGED
@@ -2561,6 +2561,14 @@ input:focus-visible + ._1i2AX {
2561
2561
  text-overflow: ellipsis;
2562
2562
  }
2563
2563
 
2564
+ ._3LIBo {
2565
+ color: var(--color-grey-500);
2566
+ font-family: "Proxima Nova", sans-serif;
2567
+ font-weight: 400;
2568
+ font-size: 12px;
2569
+ line-height: 16px;
2570
+ }
2571
+
2564
2572
  ._2OGKE {
2565
2573
  display: block;
2566
2574
  text-align: center;
@@ -2598,6 +2606,12 @@ input:checked ~ ._23M9k {
2598
2606
  ._23M9k:hover {
2599
2607
  box-shadow: 0 0 8px var(--color-grey-200);
2600
2608
  }
2609
+ ._BoPCr {
2610
+ background: var(--color-grey-100);
2611
+ box-shadow: none;
2612
+ color: var(--color-grey-300);
2613
+ pointer-events: none;
2614
+ }
2601
2615
  ._1r-Wg {
2602
2616
  line-height: normal;
2603
2617
  padding: 0;
@@ -2609,6 +2623,19 @@ input:checked ~ ._23M9k {
2609
2623
  font-size: 14px;
2610
2624
  min-height: 16px;
2611
2625
  }
2626
+ ._3N9Vg {
2627
+ color: var(--color-grey-300);
2628
+ }
2629
+ ._2083y {
2630
+ color: var(--color-grey-500);
2631
+ font-family: "Proxima Nova", sans-serif;
2632
+ font-weight: 400;
2633
+ font-size: 12px;
2634
+ line-height: 16px;
2635
+ }
2636
+ ._14Zxw {
2637
+ color: var(--color-grey-300);
2638
+ }
2612
2639
  ._1Clmp {
2613
2640
  position: relative;
2614
2641
  }
package/dist/index.js CHANGED
@@ -8703,15 +8703,18 @@ var useRadioGroupFieldContext = function useRadioGroupFieldContext() {
8703
8703
 
8704
8704
  var styles$V = {"label":"_1WGz2","label--truncate":"_mQ9Rd","radio-group-field__label":"_RXyG_"};
8705
8705
 
8706
- var styles$W = {"label":"_1Tw96","label--truncate":"_1o8rK","radio-group-box-option":"_2OGKE","radio-group-box-option__box":"_23M9k","radio-group-box-option__label":"_1r-Wg"};
8706
+ var styles$W = {"label":"_1Tw96","label--truncate":"_1o8rK","caption":"_3LIBo","radio-group-box-option":"_2OGKE","radio-group-box-option__box":"_23M9k","radio-group-box-option__box--disabled":"_BoPCr","radio-group-box-option__label":"_1r-Wg","radio-group-box-option__label--disabled":"_3N9Vg","radio-group-box-option__caption":"_2083y","radio-group-box-option__caption--disabled":"_14Zxw"};
8707
8707
 
8708
8708
  var RadioGroupBoxOption = function RadioGroupBoxOption(_ref) {
8709
+ var _classNames, _classNames2, _classNames3;
8710
+
8709
8711
  var value = _ref.value,
8710
8712
  inputId = _ref.id,
8711
8713
  label = _ref.label,
8712
8714
  caption = _ref.caption,
8713
8715
  testId = _ref.testId,
8714
- children = _ref.children;
8716
+ children = _ref.children,
8717
+ disabled = _ref.disabled;
8715
8718
  var radioGroupContext = useRadioGroupFieldContext();
8716
8719
  var id = useFieldId({
8717
8720
  name: radioGroupContext.name,
@@ -8727,9 +8730,9 @@ var RadioGroupBoxOption = function RadioGroupBoxOption(_ref) {
8727
8730
  value: value,
8728
8731
  onChange: radioGroupContext.onChange,
8729
8732
  checked: radioGroupContext.value !== undefined ? radioGroupContext.value === value : undefined,
8730
- disabled: radioGroupContext.disabled
8733
+ disabled: radioGroupContext.disabled || disabled
8731
8734
  }), React__default.createElement("div", {
8732
- className: styles$W['radio-group-box-option__box']
8735
+ className: classnames(styles$W['radio-group-box-option__box'], (_classNames = {}, _classNames[styles$W['radio-group-box-option__box--disabled']] = radioGroupContext.disabled || disabled, _classNames))
8733
8736
  }, React__default.createElement(Stack, {
8734
8737
  space: 16,
8735
8738
  alignItems: "center",
@@ -8738,9 +8741,9 @@ var RadioGroupBoxOption = function RadioGroupBoxOption(_ref) {
8738
8741
  space: 8,
8739
8742
  alignItems: "center"
8740
8743
  }, label && React__default.createElement("div", {
8741
- className: styles$W['radio-group-box-option__label']
8742
- }, label), caption && React__default.createElement(Caption, {
8743
- fieldId: id
8744
+ className: classnames(styles$W['radio-group-box-option__label'], (_classNames2 = {}, _classNames2[styles$W['radio-group-box-option__label--disabled']] = radioGroupContext.disabled || disabled, _classNames2))
8745
+ }, label), caption && React__default.createElement("div", {
8746
+ className: classnames(styles$W['radio-group-box-option__caption'], (_classNames3 = {}, _classNames3[styles$W['radio-group-box-option__caption--disabled']] = radioGroupContext.disabled || disabled, _classNames3))
8744
8747
  }, caption)))));
8745
8748
  };
8746
8749
 
@@ -8751,7 +8754,8 @@ var RadioGroupOption = function RadioGroupOption(_ref) {
8751
8754
  inputId = _ref.id,
8752
8755
  label = _ref.label,
8753
8756
  caption = _ref.caption,
8754
- testId = _ref.testId;
8757
+ testId = _ref.testId,
8758
+ disabled = _ref.disabled;
8755
8759
  var radioGroupContext = useRadioGroupFieldContext();
8756
8760
  var id = useFieldId({
8757
8761
  name: radioGroupContext.name,
@@ -8772,7 +8776,7 @@ var RadioGroupOption = function RadioGroupOption(_ref) {
8772
8776
  value: value,
8773
8777
  onChange: radioGroupContext.onChange,
8774
8778
  checked: radioGroupContext.value !== undefined ? radioGroupContext.value === value : undefined,
8775
- disabled: radioGroupContext.disabled
8779
+ disabled: radioGroupContext.disabled || disabled
8776
8780
  }), React__default.createElement("span", {
8777
8781
  className: styles$X['radio-group-option__custom-input']
8778
8782
  })), label && React__default.createElement(Label, {