@7shifts/sous-chef 2.3.5 → 2.5.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.
@@ -0,0 +1 @@
1
+ export { default } from './ToolbarSelect';
@@ -0,0 +1,2 @@
1
+ import ToolbarSelect from './ToolbarSelect';
2
+ export { ToolbarSelect };
@@ -4,27 +4,28 @@ declare type NoOptionsMessageFunction = (input: {
4
4
  inputValue: string;
5
5
  }) => string | null;
6
6
  declare type Props<T> = {
7
- name: string;
8
- /** If not provided it will generate a random id so the label links properly with the text input */
7
+ asToolbarFilter?: boolean;
8
+ caption?: React.ReactNode;
9
+ disabled?: boolean;
10
+ error?: string;
11
+ /** If not provided it will generate a random id so the l¡abel links properly with the text input */
9
12
  id?: string;
10
- value?: SelectOption<T>;
11
- options: SelectOptions<T>;
13
+ isClearable?: boolean;
14
+ label?: React.ReactNode;
15
+ /** When the user opens the menu, if this prop is `true`, it will scroll the page into to the menu view (if its content falls under a scroll). It is recommended to disable this behaviour when using the `SelectField` inside a modal. */
16
+ menuShouldScrollIntoView?: boolean;
17
+ name: string;
18
+ noOptionsMessage?: string | NoOptionsMessageFunction;
12
19
  onChange?: (e: SelectOption<T>) => void;
13
20
  onBlur?: (e: SelectOption<T>) => void;
14
- CustomOption?: React.ElementType;
15
- SelectedOptionPrefix?: React.ElementType;
16
- label?: React.ReactNode;
17
- caption?: React.ReactNode;
18
- error?: string;
21
+ options: SelectOptions<T>;
19
22
  placeholder?: string;
20
- noOptionsMessage?: string | NoOptionsMessageFunction;
21
- disabled?: boolean;
22
23
  /** Use a prefix for things like currency symbols (“$”, “¥”, “£”) or icons. */
23
24
  prefix?: React.ReactNode;
24
- asToolbarFilter?: boolean;
25
- /** When the user opens the menu, if this prop is `true`, it will scroll the page into to the menu view (if its content falls under a scroll). It is recomended to disable this behaviour when using the `SelectField` inside a modal. */
26
- menuShouldScrollIntoView?: boolean;
25
+ value?: SelectOption<T>;
26
+ CustomOption?: React.ElementType;
27
+ SelectedOptionPrefix?: React.ElementType;
27
28
  };
28
29
  /** Component to make possible choose from a predefined options. */
29
- declare const SelectField: <T extends unknown>({ name, id: inputId, value, options, onChange, onBlur, CustomOption: UserCustomOption, SelectedOptionPrefix, label, caption, error, placeholder, noOptionsMessage, disabled, prefix, asToolbarFilter, menuShouldScrollIntoView }: Props<T>) => JSX.Element;
30
+ declare const SelectField: <T extends unknown>({ asToolbarFilter, caption, disabled, error, id: inputId, isClearable, label, menuShouldScrollIntoView, name, noOptionsMessage, options, onBlur, onChange, placeholder, prefix, value, CustomOption: UserCustomOption, SelectedOptionPrefix }: Props<T>) => JSX.Element;
30
31
  export default SelectField;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { IconSize } from '../types';
3
+ declare type Props = {
4
+ size?: IconSize;
5
+ color?: string;
6
+ } & React.SVGProps<SVGSVGElement>;
7
+ declare const IconBirthdayCake: {
8
+ (props: Props): JSX.Element;
9
+ displayName: string;
10
+ };
11
+ export default IconBirthdayCake;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { IconSize } from '../types';
3
+ declare type Props = {
4
+ size?: IconSize;
5
+ color?: string;
6
+ } & React.SVGProps<SVGSVGElement>;
7
+ declare const IconCalendarStar: {
8
+ (props: Props): JSX.Element;
9
+ displayName: string;
10
+ };
11
+ export default IconCalendarStar;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { IconSize } from '../types';
3
+ declare type Props = {
4
+ size?: IconSize;
5
+ color?: string;
6
+ } & React.SVGProps<SVGSVGElement>;
7
+ declare const IconStarSolid: {
8
+ (props: Props): JSX.Element;
9
+ displayName: string;
10
+ };
11
+ export default IconStarSolid;
@@ -12,6 +12,7 @@ export { default as IconBan } from './IconBan';
12
12
  export { default as IconBarsH } from './IconBarsH';
13
13
  export { default as IconBarsV } from './IconBarsV';
14
14
  export { default as IconBell } from './IconBell';
15
+ export { default as IconBirthdayCake } from './IconBirthdayCake';
15
16
  export { default as IconBold } from './IconBold';
16
17
  export { default as IconBolt } from './IconBolt';
17
18
  export { default as IconBook } from './IconBook';
@@ -22,6 +23,7 @@ export { default as IconCalendarAlt } from './IconCalendarAlt';
22
23
  export { default as IconCalendarCheck } from './IconCalendarCheck';
23
24
  export { default as IconCalendarDay } from './IconCalendarDay';
24
25
  export { default as IconCalendarExclamation } from './IconCalendarExclamation';
26
+ export { default as IconCalendarStar } from './IconCalendarStar';
25
27
  export { default as IconCalendarTomorrow } from './IconCalendarTomorrow';
26
28
  export { default as IconCalendar } from './IconCalendar';
27
29
  export { default as IconCameraSlash } from './IconCameraSlash';
@@ -94,6 +96,7 @@ export { default as IconSignOut } from './IconSignOut';
94
96
  export { default as IconSitemap } from './IconSitemap';
95
97
  export { default as IconSlidersH } from './IconSlidersH';
96
98
  export { default as IconSort } from './IconSort';
99
+ export { default as IconStarSolid } from './IconStarSolid';
97
100
  export { default as IconStar } from './IconStar';
98
101
  export { default as IconStickyNoteLines } from './IconStickyNoteLines';
99
102
  export { default as IconStopwatch } from './IconStopwatch';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './core';
2
+ export * from './controls';
2
3
  export * from './forms';
3
4
  export * from './feedback';
4
5
  export * from './actions';
package/dist/index.js CHANGED
@@ -974,6 +974,21 @@ var IconBell = function IconBell(props) {
974
974
 
975
975
  IconBell.displayName = 'IconBell';
976
976
 
977
+ var IconBirthdayCake = function IconBirthdayCake(props) {
978
+ return React__default.createElement("svg", Object.assign({
979
+ viewBox: "0 0 20 20",
980
+ fill: "none",
981
+ xmlns: "http://www.w3.org/2000/svg",
982
+ "data-testid": "icon-birthday-cake",
983
+ style: getIconStyles(props)
984
+ }, props), React__default.createElement("path", {
985
+ d: "M5 3.75c-.693 0-1.25-.557-1.25-1.25C3.75 1.29 5 1.602 5 0c.469 0 1.25 1.152 1.25 2.188C6.25 3.223 5.693 3.75 5 3.75Zm5 0c-.693 0-1.25-.557-1.25-1.25C8.75 1.29 10 1.602 10 0c.469 0 1.25 1.152 1.25 2.188 0 1.035-.557 1.562-1.25 1.562Zm5 0c-.693 0-1.25-.557-1.25-1.25C13.75 1.29 15 1.602 15 0c.469 0 1.25 1.152 1.25 2.188 0 1.035-.557 1.562-1.25 1.562ZM16.875 10h-1.25V4.375h-1.25V10h-3.75V4.375h-1.25V10h-3.75V4.375h-1.25V10h-1.25c-1.035 0-1.875.84-1.875 1.875V20h17.5v-8.125c0-1.035-.84-1.875-1.875-1.875Zm.625 8.75h-15v-2.814c.634-.37.935-.936 1.67-.936 1.092 0 1.22 1.25 2.92 1.25C8.763 16.25 8.934 15 10 15c1.1 0 1.219 1.25 2.92 1.25 1.694 0 1.827-1.25 2.92-1.25.722 0 1.025.565 1.66.936v2.814Zm0-4.39c-.376-.307-.829-.61-1.66-.61-1.697 0-1.83 1.25-2.92 1.25-1.082 0-1.229-1.25-2.92-1.25-1.674 0-1.844 1.25-2.91 1.25-1.1 0-1.219-1.25-2.92-1.25-.838 0-1.293.304-1.67.612v-2.487c0-.345.28-.625.625-.625h13.75c.345 0 .625.28.625.625v2.485Z",
986
+ fill: "currentColor"
987
+ }));
988
+ };
989
+
990
+ IconBirthdayCake.displayName = 'IconBirthdayCake';
991
+
977
992
  var IconBold = function IconBold(props) {
978
993
  return React__default.createElement("svg", Object.assign({
979
994
  viewBox: "0 0 20 20",
@@ -1149,6 +1164,21 @@ var IconCalendarExclamation = function IconCalendarExclamation(props) {
1149
1164
 
1150
1165
  IconCalendarExclamation.displayName = 'IconCalendarExclamation';
1151
1166
 
1167
+ var IconCalendarStar = function IconCalendarStar(props) {
1168
+ return React__default.createElement("svg", Object.assign({
1169
+ viewBox: "0 0 20 20",
1170
+ fill: "none",
1171
+ xmlns: "http://www.w3.org/2000/svg",
1172
+ "data-testid": "icon-calendar-star",
1173
+ style: getIconStyles(props)
1174
+ }, props), React__default.createElement("path", {
1175
+ d: "m6.952 14.406-.325 1.808c-.074.414.103.824.461 1.07a1.186 1.186 0 0 0 1.211.082l1.71-.851 1.71.85a1.2 1.2 0 0 0 1.215-.081c.358-.246.536-.656.461-1.07l-.325-1.808 1.38-1.276c.317-.293.428-.723.292-1.12a1.127 1.127 0 0 0-.93-.743l-1.912-.265-.853-1.644a1.166 1.166 0 0 0-1.038-.613c-.44 0-.836.235-1.03.61l-.853 1.643-1.911.266a1.127 1.127 0 0 0-.931.741c-.136.398-.025.828.292 1.12l1.376 1.281Zm2.044-2.268 1.013-1.948 1.014 1.948 2.265.312-1.64 1.52.388 2.139-2.027-1.008-2.027 1.011.387-2.139-1.64-1.519 2.267-.316Zm8.263-9.64h-1.977V.313a.322.322 0 0 0-.33-.312h-.659c-.18 0-.33.14-.33.312V2.5H6.055V.312A.322.322 0 0 0 5.724 0h-.658c-.182 0-.33.14-.33.312V2.5H2.759C1.667 2.499.78 3.338.78 4.373v13.742c0 1.035.886 1.874 1.978 1.874h14.5c1.092 0 1.978-.84 1.978-1.874V4.373c0-1.035-.886-1.874-1.977-1.874Zm.66 15.617c0 .344-.297.625-.66.625H2.76c-.363 0-.66-.281-.66-.625V7.496h15.82v10.62Zm0-11.868H2.099V4.373c0-.344.297-.625.66-.625h14.5c.363 0 .66.281.66.625v1.874Z",
1176
+ fill: "currentColor"
1177
+ }));
1178
+ };
1179
+
1180
+ IconCalendarStar.displayName = 'IconCalendarStar';
1181
+
1152
1182
  var IconCalendarTomorrow = function IconCalendarTomorrow(props) {
1153
1183
  return React__default.createElement("svg", Object.assign({
1154
1184
  viewBox: "0 0 20 20",
@@ -2493,6 +2523,21 @@ var IconSort = function IconSort(props) {
2493
2523
 
2494
2524
  IconSort.displayName = 'IconSort';
2495
2525
 
2526
+ var IconStarSolid = function IconStarSolid(props) {
2527
+ return React__default.createElement("svg", Object.assign({
2528
+ viewBox: "0 0 20 20",
2529
+ fill: "none",
2530
+ xmlns: "http://www.w3.org/2000/svg",
2531
+ "data-testid": "icon-star-solid",
2532
+ style: getIconStyles(props)
2533
+ }, props), React__default.createElement("path", {
2534
+ d: "M8.944 1.591 6.602 6.34l-5.239.763C.423 7.24.047 8.398.73 9.06l3.79 3.694-.897 5.217c-.16.943.832 1.65 1.664 1.209l4.687-2.464 4.686 2.463c.832.438 1.826-.265 1.664-1.208l-.896-5.217 3.79-3.694c.681-.663.305-1.821-.635-1.958l-5.239-.763-2.341-4.748c-.42-.846-1.635-.857-2.058 0Z",
2535
+ fill: "currentColor"
2536
+ }));
2537
+ };
2538
+
2539
+ IconStarSolid.displayName = 'IconStarSolid';
2540
+
2496
2541
  var IconStar = function IconStar(props) {
2497
2542
  return React__default.createElement("svg", Object.assign({
2498
2543
  viewBox: "0 0 20 20",
@@ -3397,7 +3442,7 @@ var DataTable = function DataTable(_ref) {
3397
3442
  numberOfRows: numberOfRows,
3398
3443
  hasVerticalBorders: hasVerticalBorders
3399
3444
  }
3400
- }, React__default.createElement("div", null, columns && React__default.createElement(DataTableHeader, {
3445
+ }, columns && React__default.createElement(DataTableHeader, {
3401
3446
  columns: columns,
3402
3447
  onSort: onSort,
3403
3448
  showActionMenu: showActionMenu
@@ -3425,7 +3470,7 @@ var DataTable = function DataTable(_ref) {
3425
3470
  hasNext: hasNext && !isLoading,
3426
3471
  onPreviousClick: onPreviousClick,
3427
3472
  onNextClick: onNextClick
3428
- }))));
3473
+ })));
3429
3474
  };
3430
3475
 
3431
3476
  var DefaultItemComponent$1 = function DefaultItemComponent(_ref2) {
@@ -3754,6 +3799,187 @@ var DataTableEditableCell = function DataTableEditableCell(_ref) {
3754
3799
  }))));
3755
3800
  };
3756
3801
 
3802
+ var useSelectFieldControllers = function useSelectFieldControllers(_ref) {
3803
+ var name = _ref.name,
3804
+ inputId = _ref.id,
3805
+ value = _ref.value,
3806
+ _onChange = _ref.onChange,
3807
+ _onBlur = _ref.onBlur,
3808
+ error = _ref.error;
3809
+
3810
+ var _useFormContext = useFormContext(),
3811
+ formik = _useFormContext.formik;
3812
+
3813
+ var id = useFieldId({
3814
+ name: name,
3815
+ id: inputId
3816
+ });
3817
+ var controllers = {
3818
+ id: id,
3819
+ error: error,
3820
+ value: value,
3821
+ onChange: function onChange(option) {
3822
+ return _onChange && _onChange(option);
3823
+ },
3824
+ onBlur: function onBlur(option) {
3825
+ return _onBlur && _onBlur(option);
3826
+ }
3827
+ };
3828
+ var formikState = getFormikState(name, formik);
3829
+
3830
+ if (formik && formikState) {
3831
+ controllers = _extends({}, controllers, {
3832
+ error: error ? controllers.error : formikState.error,
3833
+ value: value ? controllers.value : formikState.value,
3834
+ onChange: function onChange(option) {
3835
+ if (_onChange) {
3836
+ _onChange(option);
3837
+ }
3838
+
3839
+ formik.setFieldValue(name, option);
3840
+ },
3841
+ onBlur: function onBlur(option) {
3842
+ if (_onBlur) {
3843
+ _onBlur(option);
3844
+ }
3845
+
3846
+ formik.setFieldTouched(name);
3847
+ }
3848
+ });
3849
+ }
3850
+
3851
+ return controllers;
3852
+ };
3853
+
3854
+ var getSelectStyles = function getSelectStyles(_ref) {
3855
+ var _ref$wrapToNextLine = _ref.wrapToNextLine,
3856
+ wrapToNextLine = _ref$wrapToNextLine === void 0 ? false : _ref$wrapToNextLine;
3857
+ return {
3858
+ valueContainer: function valueContainer(base) {
3859
+ return Object.assign({}, base, {
3860
+ flexWrap: wrapToNextLine ? 'wrap' : 'nowrap'
3861
+ });
3862
+ },
3863
+ container: function container(base, state) {
3864
+ return Object.assign({}, base, {
3865
+ flex: '1',
3866
+ fontFamily: FONT_FAMILY,
3867
+ minWidth: '64px',
3868
+ background: state.isDisabled ? GREY100 : WHITE,
3869
+ ':hover': {
3870
+ backgroundColor: GREY100
3871
+ },
3872
+ position: 'initial'
3873
+ });
3874
+ },
3875
+ control: function control(base, state) {
3876
+ return Object.assign({}, base, {
3877
+ color: state.isDisabled ? GREY400 : GREY500,
3878
+ boxShadow: 'none',
3879
+ fontSize: '14px',
3880
+ cursor: 'pointer',
3881
+ background: 'none',
3882
+ outline: '1px solid',
3883
+ outlineColor: GREY300,
3884
+ borderRadius: '4px',
3885
+ border: 'none'
3886
+ });
3887
+ },
3888
+ indicatorSeparator: function indicatorSeparator() {
3889
+ return {
3890
+ display: 'none'
3891
+ };
3892
+ },
3893
+ placeholder: function placeholder(base, state) {
3894
+ return _extends({}, base, {
3895
+ color: state.isDisabled ? GREY300 : GREY400,
3896
+ marginRight: 0,
3897
+ position: 'static',
3898
+ transform: 'initial',
3899
+ overflow: 'hidden',
3900
+ textOverflow: 'ellipsis',
3901
+ whiteSpace: 'nowrap'
3902
+ });
3903
+ },
3904
+ singleValue: function singleValue(base, state) {
3905
+ return Object.assign({}, base, {
3906
+ color: state.isDisabled ? GREY400 : null,
3907
+ marginRight: 0,
3908
+ position: 'static',
3909
+ transform: 'initial',
3910
+ overflow: 'hidden',
3911
+ textOverflow: 'ellipsis',
3912
+ whiteSpace: 'nowrap'
3913
+ });
3914
+ },
3915
+ dropdownIndicator: function dropdownIndicator(base) {
3916
+ return Object.assign({}, base, {
3917
+ color: GREY400,
3918
+ padding: '8px'
3919
+ });
3920
+ },
3921
+ option: function option(base, state) {
3922
+ return Object.assign({}, base, {
3923
+ backgroundColor: state.isDisabled ? null : state.isSelected ? EGGPLANT200 : state.isFocused ? GREY100 : WHITE,
3924
+ color: state.isDisabled ? GREY400 : GREY500,
3925
+ cursor: state.isDisabled ? 'default' : 'pointer',
3926
+ fontFamily: FONT_FAMILY,
3927
+ fontSize: '14px'
3928
+ });
3929
+ },
3930
+ group: function group(base) {
3931
+ return Object.assign({}, base, {
3932
+ fontFamily: FONT_FAMILY
3933
+ });
3934
+ },
3935
+ menu: function menu(base) {
3936
+ return _extends({}, base, {
3937
+ zIndex: Z_INDEX_LAYERS.MENU,
3938
+ minWidth: '164px'
3939
+ });
3940
+ },
3941
+ menuPortal: function menuPortal(base) {
3942
+ return _extends({}, base, {
3943
+ zIndex: Z_INDEX_LAYERS.MENU
3944
+ });
3945
+ }
3946
+ };
3947
+ };
3948
+
3949
+ var ToolbarSelect = function ToolbarSelect(_ref) {
3950
+ var name = _ref.name,
3951
+ value = _ref.value,
3952
+ options = _ref.options,
3953
+ onChange = _ref.onChange,
3954
+ onBlur = _ref.onBlur,
3955
+ placeholder = _ref.placeholder,
3956
+ disabled = _ref.disabled,
3957
+ prefix = _ref.prefix;
3958
+ var controllers = useSelectFieldControllers({
3959
+ name: name,
3960
+ value: value,
3961
+ onChange: onChange,
3962
+ onBlur: onBlur
3963
+ });
3964
+ return React__default.createElement(AffixContainer, {
3965
+ prefix: prefix
3966
+ }, React__default.createElement(Select__default, {
3967
+ inputId: controllers.id,
3968
+ options: options,
3969
+ isDisabled: disabled,
3970
+ value: controllers.value,
3971
+ placeholder: placeholder,
3972
+ styles: getSelectStyles({}),
3973
+ menuPortalTarget: document.body,
3974
+ onChange: controllers.onChange,
3975
+ onBlur: controllers.onBlur,
3976
+ components: {
3977
+ Option: Select.components.Option,
3978
+ Control: Select.components.Control
3979
+ }
3980
+ }));
3981
+ };
3982
+
3757
3983
  var styles$h = {"form--standard-size":"_3CaV0"};
3758
3984
 
3759
3985
  var Form = function Form(_ref) {
@@ -4513,7 +4739,7 @@ var PasswordField = function PasswordField(_ref) {
4513
4739
  }))));
4514
4740
  };
4515
4741
 
4516
- var getSelectStyles = function getSelectStyles(_ref) {
4742
+ var getSelectStyles$1 = function getSelectStyles(_ref) {
4517
4743
  var isInvalid = _ref.isInvalid,
4518
4744
  _ref$asToolbarFilter = _ref.asToolbarFilter,
4519
4745
  asToolbarFilter = _ref$asToolbarFilter === void 0 ? false : _ref$asToolbarFilter,
@@ -4687,7 +4913,7 @@ var MultiSelectField = function MultiSelectField(_ref) {
4687
4913
  value: controllers.value,
4688
4914
  placeholder: placeholder,
4689
4915
  noOptionsMessage: typeof noOptionsMessage === 'function' ? noOptionsMessage : defaultNoOptionsMessage,
4690
- styles: getSelectStyles({
4916
+ styles: getSelectStyles$1({
4691
4917
  isInvalid: hasError,
4692
4918
  wrapToNextLine: true
4693
4919
  }),
@@ -4719,58 +4945,6 @@ var MultiSelectField = function MultiSelectField(_ref) {
4719
4945
  }));
4720
4946
  };
4721
4947
 
4722
- var useSelectFieldControllers = function useSelectFieldControllers(_ref) {
4723
- var name = _ref.name,
4724
- inputId = _ref.id,
4725
- value = _ref.value,
4726
- _onChange = _ref.onChange,
4727
- _onBlur = _ref.onBlur,
4728
- error = _ref.error;
4729
-
4730
- var _useFormContext = useFormContext(),
4731
- formik = _useFormContext.formik;
4732
-
4733
- var id = useFieldId({
4734
- name: name,
4735
- id: inputId
4736
- });
4737
- var controllers = {
4738
- id: id,
4739
- error: error,
4740
- value: value,
4741
- onChange: function onChange(option) {
4742
- return _onChange && _onChange(option);
4743
- },
4744
- onBlur: function onBlur(option) {
4745
- return _onBlur && _onBlur(option);
4746
- }
4747
- };
4748
- var formikState = getFormikState(name, formik);
4749
-
4750
- if (formik && formikState) {
4751
- controllers = _extends({}, controllers, {
4752
- error: error ? controllers.error : formikState.error,
4753
- value: value ? controllers.value : formikState.value,
4754
- onChange: function onChange(option) {
4755
- if (_onChange) {
4756
- _onChange(option);
4757
- }
4758
-
4759
- formik.setFieldValue(name, option);
4760
- },
4761
- onBlur: function onBlur(option) {
4762
- if (_onBlur) {
4763
- _onBlur(option);
4764
- }
4765
-
4766
- formik.setFieldTouched(name);
4767
- }
4768
- });
4769
- }
4770
-
4771
- return controllers;
4772
- };
4773
-
4774
4948
  var styles$q = {"custom-control":"_1cDCR"};
4775
4949
 
4776
4950
  var _excluded$4 = ["children", "CustomPrefixComponent"];
@@ -4808,40 +4982,42 @@ function CustomOption$1(_ref) {
4808
4982
  }
4809
4983
 
4810
4984
  var SelectField = function SelectField(_ref) {
4811
- var name = _ref.name,
4985
+ var _ref$asToolbarFilter = _ref.asToolbarFilter,
4986
+ asToolbarFilter = _ref$asToolbarFilter === void 0 ? false : _ref$asToolbarFilter,
4987
+ caption = _ref.caption,
4988
+ disabled = _ref.disabled,
4989
+ error = _ref.error,
4812
4990
  inputId = _ref.id,
4813
- value = _ref.value,
4991
+ _ref$isClearable = _ref.isClearable,
4992
+ isClearable = _ref$isClearable === void 0 ? false : _ref$isClearable,
4993
+ label = _ref.label,
4994
+ _ref$menuShouldScroll = _ref.menuShouldScrollIntoView,
4995
+ menuShouldScrollIntoView = _ref$menuShouldScroll === void 0 ? true : _ref$menuShouldScroll,
4996
+ name = _ref.name,
4997
+ noOptionsMessage = _ref.noOptionsMessage,
4814
4998
  options = _ref.options,
4815
- onChange = _ref.onChange,
4816
4999
  onBlur = _ref.onBlur,
4817
- UserCustomOption = _ref.CustomOption,
4818
- SelectedOptionPrefix = _ref.SelectedOptionPrefix,
4819
- label = _ref.label,
4820
- caption = _ref.caption,
4821
- error = _ref.error,
5000
+ onChange = _ref.onChange,
4822
5001
  placeholder = _ref.placeholder,
4823
- noOptionsMessage = _ref.noOptionsMessage,
4824
- disabled = _ref.disabled,
4825
5002
  prefix = _ref.prefix,
4826
- _ref$asToolbarFilter = _ref.asToolbarFilter,
4827
- asToolbarFilter = _ref$asToolbarFilter === void 0 ? false : _ref$asToolbarFilter,
4828
- _ref$menuShouldScroll = _ref.menuShouldScrollIntoView,
4829
- menuShouldScrollIntoView = _ref$menuShouldScroll === void 0 ? true : _ref$menuShouldScroll;
5003
+ value = _ref.value,
5004
+ UserCustomOption = _ref.CustomOption,
5005
+ SelectedOptionPrefix = _ref.SelectedOptionPrefix;
4830
5006
  var controllers = useSelectFieldControllers({
4831
- name: name,
5007
+ error: error,
4832
5008
  id: inputId,
4833
- value: value,
5009
+ name: name,
4834
5010
  onChange: onChange,
4835
5011
  onBlur: onBlur,
4836
- error: error
5012
+ value: value
4837
5013
  });
4838
5014
  var hasError = !!controllers.error;
4839
5015
  var fieldProps = {
4840
- name: name,
5016
+ caption: caption,
5017
+ error: controllers.error,
4841
5018
  id: controllers.id,
4842
5019
  label: label,
4843
- caption: caption,
4844
- error: controllers.error
5020
+ name: name
4845
5021
  };
4846
5022
  var defaultNoOptionsMessage = noOptionsMessage && typeof noOptionsMessage === 'string' ? function () {
4847
5023
  return noOptionsMessage;
@@ -4849,19 +5025,16 @@ var SelectField = function SelectField(_ref) {
4849
5025
  return React__default.createElement(Field, Object.assign({}, fieldProps), React__default.createElement(AffixContainer, {
4850
5026
  prefix: prefix
4851
5027
  }, React__default.createElement(Select__default, {
4852
- inputId: controllers.id,
4853
- options: options,
4854
- isDisabled: disabled,
4855
- value: controllers.value,
4856
- placeholder: placeholder,
4857
- noOptionsMessage: typeof noOptionsMessage === 'function' ? noOptionsMessage : defaultNoOptionsMessage,
4858
- styles: getSelectStyles({
4859
- isInvalid: hasError,
4860
- asToolbarFilter: asToolbarFilter
4861
- }),
4862
- menuPortalTarget: document.body,
4863
- onChange: controllers.onChange,
4864
- onBlur: controllers.onBlur,
5028
+ closeMenuOnScroll: function closeMenuOnScroll(e) {
5029
+ if (menuShouldScrollIntoView || !e.target) {
5030
+ return false;
5031
+ }
5032
+
5033
+ var target = e.target;
5034
+ var firstOption = target.children[0];
5035
+ var isScrollingTheMenu = firstOption && typeof firstOption.id === 'string' && firstOption.id.includes('react-select');
5036
+ return !isScrollingTheMenu;
5037
+ },
4865
5038
  components: {
4866
5039
  Option: UserCustomOption ? function (props) {
4867
5040
  return React__default.createElement(CustomOption$1, Object.assign({
@@ -4874,19 +5047,23 @@ var SelectField = function SelectField(_ref) {
4874
5047
  }, props));
4875
5048
  } : Select.components.Control
4876
5049
  },
4877
- menuShouldScrollIntoView: menuShouldScrollIntoView,
5050
+ inputId: controllers.id,
5051
+ isClearable: isClearable,
5052
+ isDisabled: disabled,
5053
+ menuPortalTarget: document.body,
4878
5054
  menuPlacement: menuShouldScrollIntoView ? 'bottom' : 'auto',
4879
5055
  menuPosition: menuShouldScrollIntoView ? 'absolute' : 'fixed',
4880
- closeMenuOnScroll: function closeMenuOnScroll(e) {
4881
- if (menuShouldScrollIntoView || !e.target) {
4882
- return false;
4883
- }
4884
-
4885
- var target = e.target;
4886
- var firstOption = target.children[0];
4887
- var isScrollingTheMenu = firstOption && typeof firstOption.id === 'string' && firstOption.id.includes('react-select');
4888
- return !isScrollingTheMenu;
4889
- }
5056
+ noOptionsMessage: typeof noOptionsMessage === 'function' ? noOptionsMessage : defaultNoOptionsMessage,
5057
+ menuShouldScrollIntoView: menuShouldScrollIntoView,
5058
+ onBlur: controllers.onBlur,
5059
+ onChange: controllers.onChange,
5060
+ options: options,
5061
+ placeholder: placeholder,
5062
+ styles: getSelectStyles$1({
5063
+ isInvalid: hasError,
5064
+ asToolbarFilter: asToolbarFilter
5065
+ }),
5066
+ value: controllers.value
4890
5067
  })));
4891
5068
  };
4892
5069
 
@@ -5843,6 +6020,7 @@ exports.IconBan = IconBan;
5843
6020
  exports.IconBarsH = IconBarsH;
5844
6021
  exports.IconBarsV = IconBarsV;
5845
6022
  exports.IconBell = IconBell;
6023
+ exports.IconBirthdayCake = IconBirthdayCake;
5846
6024
  exports.IconBold = IconBold;
5847
6025
  exports.IconBolt = IconBolt;
5848
6026
  exports.IconBook = IconBook;
@@ -5854,6 +6032,7 @@ exports.IconCalendarAlt = IconCalendarAlt;
5854
6032
  exports.IconCalendarCheck = IconCalendarCheck;
5855
6033
  exports.IconCalendarDay = IconCalendarDay;
5856
6034
  exports.IconCalendarExclamation = IconCalendarExclamation;
6035
+ exports.IconCalendarStar = IconCalendarStar;
5857
6036
  exports.IconCalendarTomorrow = IconCalendarTomorrow;
5858
6037
  exports.IconCamera = IconCamera;
5859
6038
  exports.IconCameraSlash = IconCameraSlash;
@@ -5927,6 +6106,7 @@ exports.IconSitemap = IconSitemap;
5927
6106
  exports.IconSlidersH = IconSlidersH;
5928
6107
  exports.IconSort = IconSort;
5929
6108
  exports.IconStar = IconStar;
6109
+ exports.IconStarSolid = IconStarSolid;
5930
6110
  exports.IconStickyNoteLines = IconStickyNoteLines;
5931
6111
  exports.IconStopwatch = IconStopwatch;
5932
6112
  exports.IconStrikethrough = IconStrikethrough;
@@ -5974,6 +6154,7 @@ exports.TextAreaField = TextAreaField;
5974
6154
  exports.TextField = TextField;
5975
6155
  exports.TimeField = TimeField;
5976
6156
  exports.Toggle = Toggle;
6157
+ exports.ToolbarSelect = ToolbarSelect;
5977
6158
  exports.Tooltip = Tooltip$1;
5978
6159
  exports.WeekField = WeekField;
5979
6160
  //# sourceMappingURL=index.js.map