@7shifts/sous-chef 3.4.0 → 3.6.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.
package/dist/index.js CHANGED
@@ -3053,8 +3053,7 @@ var IconMoneyBill = React.forwardRef(function (_ref, ref) {
3053
3053
  IconMoneyBill.displayName = 'IconMoneyBill';
3054
3054
 
3055
3055
  var _excluded$1v = ["testId"];
3056
-
3057
- var IconMugSaucerSolid = function IconMugSaucerSolid(_ref) {
3056
+ var IconMugSaucerSolid = React.forwardRef(function (_ref, ref) {
3058
3057
  var _ref$testId = _ref.testId,
3059
3058
  testId = _ref$testId === void 0 ? 'icon-mug-saucer-solid' : _ref$testId,
3060
3059
  props = _objectWithoutPropertiesLoose(_ref, _excluded$1v);
@@ -3064,12 +3063,12 @@ var IconMugSaucerSolid = function IconMugSaucerSolid(_ref) {
3064
3063
  fill: "none",
3065
3064
  xmlns: "http://www.w3.org/2000/svg",
3066
3065
  style: getIconStyles(props),
3067
- "data-testid": testId
3066
+ "data-testid": testId,
3067
+ ref: ref
3068
3068
  }, props), React__default.createElement("path", {
3069
3069
  d: "M7 14h6a3 3 0 0 0 3-3h1c2.206 0 4-1.794 4-4s-1.794-4-4-4H4.75a.748.748 0 0 0-.75.75V11a3 3 0 0 0 3 3Zm10-9c1.103 0 2 .897 2 2s-.897 2-2 2h-1V5h1Zm1.49 12H2.51c-1.488 0-1.907-2-1.126-2h18.228c.782 0 .369 2-1.122 2Z"
3070
3070
  }));
3071
- };
3072
-
3071
+ });
3073
3072
  IconMugSaucerSolid.displayName = 'IconMugSaucerSolid';
3074
3073
 
3075
3074
  var _excluded$1w = ["testId"];
@@ -3898,10 +3897,39 @@ var IconUserPlus = React.forwardRef(function (_ref, ref) {
3898
3897
  IconUserPlus.displayName = 'IconUserPlus';
3899
3898
 
3900
3899
  var _excluded$25 = ["testId"];
3900
+ var IconUserSearch = React.forwardRef(function (_ref, ref) {
3901
+ var _ref$testId = _ref.testId,
3902
+ testId = _ref$testId === void 0 ? 'icon-user-search' : _ref$testId,
3903
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$25);
3904
+
3905
+ return React__default.createElement("svg", Object.assign({
3906
+ viewBox: "0 0 20 20",
3907
+ fill: "none",
3908
+ xmlns: "http://www.w3.org/2000/svg",
3909
+ style: getIconStyles(props),
3910
+ "data-testid": testId,
3911
+ ref: ref
3912
+ }, props), React__default.createElement("g", {
3913
+ clipPath: "url(#icon-user-search_svg__a)",
3914
+ fill: "currentColor"
3915
+ }, React__default.createElement("path", {
3916
+ d: "M7.838 9.163a4.48 4.48 0 0 0 4.479-4.482 4.48 4.48 0 1 0-8.958 0 4.48 4.48 0 0 0 4.479 4.482Zm0-7.843a3.365 3.365 0 0 1 3.359 3.361 3.365 3.365 0 0 1-3.36 3.361 3.365 3.365 0 0 1-3.358-3.36A3.365 3.365 0 0 1 7.838 1.32ZM19.933 18.928l-2.307-2.308a.225.225 0 0 0-.161-.067h-.251a3.953 3.953 0 1 0-6.943-2.586 3.953 3.953 0 0 0 6.536 2.993v.251c0 .06.025.118.067.162l2.306 2.308c.09.09.234.09.324 0l.429-.43a.228.228 0 0 0 0-.323Zm-5.71-1.919a3.04 3.04 0 0 1-3.04-3.042 3.04 3.04 0 1 1 6.08 0 3.04 3.04 0 0 1-3.04 3.042Z"
3917
+ }), React__default.createElement("path", {
3918
+ d: "M10.81 10.337c-.54.216-1.324.506-2.972.506s-2.128-.56-3.135-.56A4.705 4.705 0 0 0 0 14.99v1.456c0 .928.752 1.68 1.68 1.68h9.671l-1.08-1.081-8.591-.039a.562.562 0 0 1-.56-.56v-1.457a3.586 3.586 0 0 1 3.583-3.585c.686 0 1.368.56 3.135.56 1.763 0 1.892-.328 2-.328.432-.54.973-1.298.973-1.298Z"
3919
+ })), React__default.createElement("defs", null, React__default.createElement("clipPath", {
3920
+ id: "icon-user-search_svg__a"
3921
+ }, React__default.createElement("path", {
3922
+ fill: "#fff",
3923
+ d: "M0 0h20v20H0z"
3924
+ }))));
3925
+ });
3926
+ IconUserSearch.displayName = 'IconUserSearch';
3927
+
3928
+ var _excluded$26 = ["testId"];
3901
3929
  var IconUserSlash = React.forwardRef(function (_ref, ref) {
3902
3930
  var _ref$testId = _ref.testId,
3903
3931
  testId = _ref$testId === void 0 ? 'icon-user-slash' : _ref$testId,
3904
- props = _objectWithoutPropertiesLoose(_ref, _excluded$25);
3932
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$26);
3905
3933
 
3906
3934
  return React__default.createElement("svg", Object.assign({
3907
3935
  viewBox: "0 0 20 20",
@@ -3924,11 +3952,11 @@ var IconUserSlash = React.forwardRef(function (_ref, ref) {
3924
3952
  });
3925
3953
  IconUserSlash.displayName = 'IconUserSlash';
3926
3954
 
3927
- var _excluded$26 = ["testId"];
3955
+ var _excluded$27 = ["testId"];
3928
3956
  var IconUserSolid = React.forwardRef(function (_ref, ref) {
3929
3957
  var _ref$testId = _ref.testId,
3930
3958
  testId = _ref$testId === void 0 ? 'icon-user-solid' : _ref$testId,
3931
- props = _objectWithoutPropertiesLoose(_ref, _excluded$26);
3959
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$27);
3932
3960
 
3933
3961
  return React__default.createElement("svg", Object.assign({
3934
3962
  viewBox: "0 0 20 20",
@@ -3944,11 +3972,11 @@ var IconUserSolid = React.forwardRef(function (_ref, ref) {
3944
3972
  });
3945
3973
  IconUserSolid.displayName = 'IconUserSolid';
3946
3974
 
3947
- var _excluded$27 = ["testId"];
3975
+ var _excluded$28 = ["testId"];
3948
3976
  var IconUserTag = React.forwardRef(function (_ref, ref) {
3949
3977
  var _ref$testId = _ref.testId,
3950
3978
  testId = _ref$testId === void 0 ? 'icon-user-tag' : _ref$testId,
3951
- props = _objectWithoutPropertiesLoose(_ref, _excluded$27);
3979
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$28);
3952
3980
 
3953
3981
  return React__default.createElement("svg", Object.assign({
3954
3982
  viewBox: "0 0 20 20",
@@ -3966,11 +3994,11 @@ var IconUserTag = React.forwardRef(function (_ref, ref) {
3966
3994
  });
3967
3995
  IconUserTag.displayName = 'IconUserTag';
3968
3996
 
3969
- var _excluded$28 = ["testId"];
3997
+ var _excluded$29 = ["testId"];
3970
3998
  var IconUserTie = React.forwardRef(function (_ref, ref) {
3971
3999
  var _ref$testId = _ref.testId,
3972
4000
  testId = _ref$testId === void 0 ? 'icon-user-tie' : _ref$testId,
3973
- props = _objectWithoutPropertiesLoose(_ref, _excluded$28);
4001
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$29);
3974
4002
 
3975
4003
  return React__default.createElement("svg", Object.assign({
3976
4004
  viewBox: "0 0 20 20",
@@ -3986,11 +4014,11 @@ var IconUserTie = React.forwardRef(function (_ref, ref) {
3986
4014
  });
3987
4015
  IconUserTie.displayName = 'IconUserTie';
3988
4016
 
3989
- var _excluded$29 = ["testId"];
4017
+ var _excluded$2a = ["testId"];
3990
4018
  var IconUsers = React.forwardRef(function (_ref, ref) {
3991
4019
  var _ref$testId = _ref.testId,
3992
4020
  testId = _ref$testId === void 0 ? 'icon-users' : _ref$testId,
3993
- props = _objectWithoutPropertiesLoose(_ref, _excluded$29);
4021
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2a);
3994
4022
 
3995
4023
  return React__default.createElement("svg", Object.assign({
3996
4024
  viewBox: "0 0 20 20",
@@ -4006,11 +4034,11 @@ var IconUsers = React.forwardRef(function (_ref, ref) {
4006
4034
  });
4007
4035
  IconUsers.displayName = 'IconUsers';
4008
4036
 
4009
- var _excluded$2a = ["testId"];
4037
+ var _excluded$2b = ["testId"];
4010
4038
  var IconVideo = React.forwardRef(function (_ref, ref) {
4011
4039
  var _ref$testId = _ref.testId,
4012
4040
  testId = _ref$testId === void 0 ? 'icon-video' : _ref$testId,
4013
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2a);
4041
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2b);
4014
4042
 
4015
4043
  return React__default.createElement("svg", Object.assign({
4016
4044
  viewBox: "0 0 20 20",
@@ -4026,11 +4054,11 @@ var IconVideo = React.forwardRef(function (_ref, ref) {
4026
4054
  });
4027
4055
  IconVideo.displayName = 'IconVideo';
4028
4056
 
4029
- var _excluded$2b = ["testId"];
4057
+ var _excluded$2c = ["testId"];
4030
4058
  var IconVolumeMute = React.forwardRef(function (_ref, ref) {
4031
4059
  var _ref$testId = _ref.testId,
4032
4060
  testId = _ref$testId === void 0 ? 'icon-volume-mute' : _ref$testId,
4033
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2b);
4061
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2c);
4034
4062
 
4035
4063
  return React__default.createElement("svg", Object.assign({
4036
4064
  viewBox: "0 0 20 20",
@@ -4046,11 +4074,11 @@ var IconVolumeMute = React.forwardRef(function (_ref, ref) {
4046
4074
  });
4047
4075
  IconVolumeMute.displayName = 'IconVolumeMute';
4048
4076
 
4049
- var _excluded$2c = ["testId"];
4077
+ var _excluded$2d = ["testId"];
4050
4078
  var IconVolume = React.forwardRef(function (_ref, ref) {
4051
4079
  var _ref$testId = _ref.testId,
4052
4080
  testId = _ref$testId === void 0 ? 'icon-volume' : _ref$testId,
4053
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2c);
4081
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2d);
4054
4082
 
4055
4083
  return React__default.createElement("svg", Object.assign({
4056
4084
  viewBox: "0 0 20 20",
@@ -4066,11 +4094,11 @@ var IconVolume = React.forwardRef(function (_ref, ref) {
4066
4094
  });
4067
4095
  IconVolume.displayName = 'IconVolume';
4068
4096
 
4069
- var _excluded$2d = ["testId"];
4097
+ var _excluded$2e = ["testId"];
4070
4098
  var IconWrench = React.forwardRef(function (_ref, ref) {
4071
4099
  var _ref$testId = _ref.testId,
4072
4100
  testId = _ref$testId === void 0 ? 'icon-wrench' : _ref$testId,
4073
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2d);
4101
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2e);
4074
4102
 
4075
4103
  return React__default.createElement("svg", Object.assign({
4076
4104
  viewBox: "0 0 20 20",
@@ -4429,7 +4457,7 @@ var ActionsCell = function ActionsCell(_ref) {
4429
4457
  }));
4430
4458
  };
4431
4459
 
4432
- var _excluded$2e = ["children", "onClick", "isSelected", "actions", "hasDefaultPadding", "testId"];
4460
+ var _excluded$2f = ["children", "onClick", "isSelected", "actions", "hasDefaultPadding", "testId"];
4433
4461
 
4434
4462
  var DataTableRowComponent = function DataTableRowComponent(_ref, ref) {
4435
4463
  var _classnames;
@@ -4443,7 +4471,7 @@ var DataTableRowComponent = function DataTableRowComponent(_ref, ref) {
4443
4471
  _ref$hasDefaultPaddin = _ref.hasDefaultPadding,
4444
4472
  hasDefaultPadding = _ref$hasDefaultPaddin === void 0 ? true : _ref$hasDefaultPaddin,
4445
4473
  testId = _ref.testId,
4446
- nativeDivProps = _objectWithoutPropertiesLoose(_ref, _excluded$2e);
4474
+ nativeDivProps = _objectWithoutPropertiesLoose(_ref, _excluded$2f);
4447
4475
 
4448
4476
  var _useDataTableContext = useDataTableContext(),
4449
4477
  columns = _useDataTableContext.columns,
@@ -4682,136 +4710,7 @@ var DefaultItemComponent = function DefaultItemComponent(_ref2) {
4682
4710
  }));
4683
4711
  };
4684
4712
 
4685
- var styles$c = {"data-table-cell":"_2Ybjx","data-table-cell--right-aligned":"_1cXj6"};
4686
-
4687
- var DataTableCell = function DataTableCell(_ref) {
4688
- var _columns$columnIndex, _classnames;
4689
-
4690
- var children = _ref.children,
4691
- columnIndex = _ref.columnIndex;
4692
-
4693
- var _useDataTableContext = useDataTableContext(),
4694
- columns = _useDataTableContext.columns;
4695
-
4696
- var column = (_columns$columnIndex = columns === null || columns === void 0 ? void 0 : columns[columnIndex]) != null ? _columns$columnIndex : null;
4697
- var isRightAligned = column ? column.isRightAligned : false;
4698
- return React__default.createElement("div", {
4699
- className: classnames((_classnames = {}, _classnames[styles$c['data-table-cell--right-aligned']] = isRightAligned, _classnames), styles$c['data-table-cell'])
4700
- }, children);
4701
- };
4702
-
4703
- var Context$1 = React.createContext({});
4704
- var useFormContext = function useFormContext() {
4705
- var context = React.useContext(Context$1);
4706
- return context || {};
4707
- };
4708
-
4709
- var useFieldId = function useFieldId(_ref) {
4710
- var name = _ref.name,
4711
- inputId = _ref.id;
4712
- var id = React.useMemo(function () {
4713
- return inputId ? inputId : name + "-" + Math.random();
4714
- }, [inputId, name]);
4715
- return id;
4716
- };
4717
-
4718
- var getFormikState = function getFormikState(name, formik) {
4719
- if (formik === undefined) {
4720
- return null;
4721
- }
4722
-
4723
- var formikPath = getFormikArrayPath(name);
4724
-
4725
- if (formikPath.length === 0) {
4726
- return null;
4727
- }
4728
-
4729
- var formikLatestLevel = formikPath.reduce(function (acc, path) {
4730
- var _acc$touched, _acc$error, _acc$value;
4731
-
4732
- return {
4733
- touched: (_acc$touched = acc.touched) === null || _acc$touched === void 0 ? void 0 : _acc$touched[path],
4734
- error: (_acc$error = acc.error) === null || _acc$error === void 0 ? void 0 : _acc$error[path],
4735
- value: (_acc$value = acc.value) === null || _acc$value === void 0 ? void 0 : _acc$value[path]
4736
- };
4737
- }, {
4738
- touched: formik.touched,
4739
- error: formik.errors,
4740
- value: formik.values
4741
- });
4742
- return {
4743
- error: formikLatestLevel.touched ? formikLatestLevel.error : undefined,
4744
- value: formikLatestLevel.value
4745
- };
4746
- };
4747
- var getFormikArrayPath = function getFormikArrayPath(name) {
4748
- return name.split(/[^a-zA-Z0-9]/).filter(Boolean);
4749
- };
4750
-
4751
- var useFieldControllers = function useFieldControllers(_ref) {
4752
- var name = _ref.name,
4753
- inputId = _ref.id,
4754
- value = _ref.value,
4755
- _onChange = _ref.onChange,
4756
- _onBlur = _ref.onBlur,
4757
- _onFocus = _ref.onFocus,
4758
- _onKeyDown = _ref.onKeyDown,
4759
- error = _ref.error,
4760
- _ref$type = _ref.type,
4761
- type = _ref$type === void 0 ? 'text' : _ref$type;
4762
-
4763
- var _useFormContext = useFormContext(),
4764
- formik = _useFormContext.formik;
4765
-
4766
- var id = useFieldId({
4767
- name: name,
4768
- id: inputId
4769
- });
4770
- var controllers = {
4771
- id: id,
4772
- error: error,
4773
- value: value,
4774
- onChange: function onChange(e) {
4775
- return _onChange && _onChange(e.target.value);
4776
- },
4777
- onBlur: function onBlur(e) {
4778
- return _onBlur && _onBlur(e.target.value);
4779
- },
4780
- onFocus: function onFocus(e) {
4781
- return _onFocus && _onFocus(e.target.value);
4782
- },
4783
- onKeyDown: function onKeyDown(e) {
4784
- return _onKeyDown && _onKeyDown(e.key);
4785
- }
4786
- };
4787
- var formikState = getFormikState(name, formik);
4788
-
4789
- if (formik && formikState) {
4790
- var currencyBlur = function currencyBlur() {
4791
- if (type === 'currency') {
4792
- formik.setFieldValue(name, Number(value).toFixed(2));
4793
- }
4794
- };
4795
-
4796
- controllers = _extends({}, controllers, {
4797
- error: error !== undefined ? controllers.error : formikState.error,
4798
- value: value !== undefined ? controllers.value : formikState.value,
4799
- onChange: _onChange ? controllers.onChange : function (e) {
4800
- return formik.setFieldValue(name, e.target.value);
4801
- },
4802
- onBlur: _onBlur ? function (e) {
4803
- _onBlur && _onBlur(e.target.value);
4804
- formik.setFieldTouched(name);
4805
- currencyBlur();
4806
- } : function () {
4807
- formik.setFieldTouched(name);
4808
- currencyBlur();
4809
- }
4810
- });
4811
- }
4812
-
4813
- return controllers;
4814
- };
4713
+ var styles$c = {"data-table-cell":"_2Ybjx","data-table-cell--right-aligned":"_1cXj6","data-table-cell--invalid":"_D73Vx"};
4815
4714
 
4816
4715
  var styles$d = {"overlay":"_2puqJ","overlay--after-open":"_1167h","overlay--before-close":"_t_t7L","content":"_wQQ_2","content--after-open":"_3jwux","content--before-close":"_2c2QP"};
4817
4716
 
@@ -5199,6 +5098,157 @@ var Calendar = function Calendar(_ref) {
5199
5098
  }))));
5200
5099
  };
5201
5100
 
5101
+ var DataTableCellElement = function DataTableCellElement(_ref) {
5102
+ var _columns$columnIndex, _classnames;
5103
+
5104
+ var children = _ref.children,
5105
+ columnIndex = _ref.columnIndex,
5106
+ error = _ref.error,
5107
+ _ref$delayOnCloseErro = _ref.delayOnCloseError,
5108
+ delayOnCloseError = _ref$delayOnCloseErro === void 0 ? false : _ref$delayOnCloseErro;
5109
+
5110
+ var _useDataTableContext = useDataTableContext(),
5111
+ columns = _useDataTableContext.columns;
5112
+
5113
+ var column = (_columns$columnIndex = columns === null || columns === void 0 ? void 0 : columns[columnIndex]) != null ? _columns$columnIndex : null;
5114
+ var isRightAligned = column ? column.isRightAligned : false;
5115
+ var hasError = !!error;
5116
+ var errorMessage = error;
5117
+ var icon = hasError && React__default.createElement(IconTimesOctagon, {
5118
+ size: "medium",
5119
+ color: RADISH400
5120
+ });
5121
+ var TableCell = React__default.createElement("div", {
5122
+ className: classnames((_classnames = {}, _classnames[styles$c['data-table-cell--right-aligned']] = isRightAligned, _classnames[styles$c['data-table-cell--invalid']] = hasError, _classnames), styles$c['data-table-cell'])
5123
+ }, isRightAligned && icon, children, !isRightAligned && icon);
5124
+
5125
+ if (hasError) {
5126
+ return React__default.createElement(Tooltip$1, {
5127
+ overlay: errorMessage,
5128
+ delayOnClose: delayOnCloseError,
5129
+ placement: "top",
5130
+ theme: "white"
5131
+ }, TableCell);
5132
+ }
5133
+
5134
+ return TableCell;
5135
+ };
5136
+
5137
+ var DataTableCell = React.forwardRef(DataTableCellElement);
5138
+
5139
+ var Context$1 = React.createContext({});
5140
+ var useFormContext = function useFormContext() {
5141
+ var context = React.useContext(Context$1);
5142
+ return context || {};
5143
+ };
5144
+
5145
+ var useFieldId = function useFieldId(_ref) {
5146
+ var name = _ref.name,
5147
+ inputId = _ref.id;
5148
+ var id = React.useMemo(function () {
5149
+ return inputId ? inputId : name + "-" + Math.random();
5150
+ }, [inputId, name]);
5151
+ return id;
5152
+ };
5153
+
5154
+ var getFormikState = function getFormikState(name, formik) {
5155
+ if (formik === undefined) {
5156
+ return null;
5157
+ }
5158
+
5159
+ var formikPath = getFormikArrayPath(name);
5160
+
5161
+ if (formikPath.length === 0) {
5162
+ return null;
5163
+ }
5164
+
5165
+ var formikLatestLevel = formikPath.reduce(function (acc, path) {
5166
+ var _acc$touched, _acc$error, _acc$value;
5167
+
5168
+ return {
5169
+ touched: (_acc$touched = acc.touched) === null || _acc$touched === void 0 ? void 0 : _acc$touched[path],
5170
+ error: (_acc$error = acc.error) === null || _acc$error === void 0 ? void 0 : _acc$error[path],
5171
+ value: (_acc$value = acc.value) === null || _acc$value === void 0 ? void 0 : _acc$value[path]
5172
+ };
5173
+ }, {
5174
+ touched: formik.touched,
5175
+ error: formik.errors,
5176
+ value: formik.values
5177
+ });
5178
+ return {
5179
+ error: formikLatestLevel.touched ? formikLatestLevel.error : undefined,
5180
+ value: formikLatestLevel.value
5181
+ };
5182
+ };
5183
+ var getFormikArrayPath = function getFormikArrayPath(name) {
5184
+ return name.split(/[^a-zA-Z0-9]/).filter(Boolean);
5185
+ };
5186
+
5187
+ var useFieldControllers = function useFieldControllers(_ref) {
5188
+ var name = _ref.name,
5189
+ inputId = _ref.id,
5190
+ value = _ref.value,
5191
+ _onChange = _ref.onChange,
5192
+ _onBlur = _ref.onBlur,
5193
+ _onFocus = _ref.onFocus,
5194
+ _onKeyDown = _ref.onKeyDown,
5195
+ error = _ref.error,
5196
+ _ref$type = _ref.type,
5197
+ type = _ref$type === void 0 ? 'text' : _ref$type;
5198
+
5199
+ var _useFormContext = useFormContext(),
5200
+ formik = _useFormContext.formik;
5201
+
5202
+ var id = useFieldId({
5203
+ name: name,
5204
+ id: inputId
5205
+ });
5206
+ var controllers = {
5207
+ id: id,
5208
+ error: error,
5209
+ value: value,
5210
+ onChange: function onChange(e) {
5211
+ return _onChange && _onChange(e.target.value);
5212
+ },
5213
+ onBlur: function onBlur(e) {
5214
+ return _onBlur && _onBlur(e.target.value);
5215
+ },
5216
+ onFocus: function onFocus(e) {
5217
+ return _onFocus && _onFocus(e.target.value);
5218
+ },
5219
+ onKeyDown: function onKeyDown(e) {
5220
+ return _onKeyDown && _onKeyDown(e.key);
5221
+ }
5222
+ };
5223
+ var formikState = getFormikState(name, formik);
5224
+
5225
+ if (formik && formikState) {
5226
+ var currencyBlur = function currencyBlur() {
5227
+ if (type === 'currency') {
5228
+ formik.setFieldValue(name, Number(value).toFixed(2));
5229
+ }
5230
+ };
5231
+
5232
+ controllers = _extends({}, controllers, {
5233
+ error: error !== undefined ? controllers.error : formikState.error,
5234
+ value: value !== undefined ? controllers.value : formikState.value,
5235
+ onChange: _onChange ? controllers.onChange : function (e) {
5236
+ return formik.setFieldValue(name, e.target.value);
5237
+ },
5238
+ onBlur: _onBlur ? function (e) {
5239
+ _onBlur && _onBlur(e.target.value);
5240
+ formik.setFieldTouched(name);
5241
+ currencyBlur();
5242
+ } : function () {
5243
+ formik.setFieldTouched(name);
5244
+ currencyBlur();
5245
+ }
5246
+ });
5247
+ }
5248
+
5249
+ return controllers;
5250
+ };
5251
+
5202
5252
  var styles$j = {"label":"_h724f","label--truncate":"_1VUoF"};
5203
5253
 
5204
5254
  var isEllipsisActive = function isEllipsisActive(e) {
@@ -5893,7 +5943,7 @@ var styles$s = {"form--standard-size":"_3CaV0"};
5893
5943
 
5894
5944
  var styles$t = {"card":"_29ZIp","card__body":"_3Q8NT","card__body--interactive":"_2Fah6","card--focus":"_SGno0","card__body--focus":"_1zqRN","card__body--with-kebab":"_3Hwms","card__kebab":"_TmEUS"};
5895
5945
 
5896
- var _excluded$2f = ["children", "onClick", "isSelected", "actions", "testId"];
5946
+ var _excluded$2g = ["children", "onClick", "isSelected", "actions", "testId"];
5897
5947
 
5898
5948
  var Card = function Card(_ref) {
5899
5949
  var _classnames, _classnames2;
@@ -5904,7 +5954,7 @@ var Card = function Card(_ref) {
5904
5954
  isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
5905
5955
  actions = _ref.actions,
5906
5956
  testId = _ref.testId,
5907
- positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2f);
5957
+ positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2g);
5908
5958
 
5909
5959
  var positionStyles = usePositionStyles(positionProps);
5910
5960
  return React__default.createElement("div", {
@@ -5950,7 +6000,7 @@ var ALIGNMENTS = {
5950
6000
 
5951
6001
  var styles$u = {"text":"_3CIA3","text__body":"_1nnj8","text__caption":"_37K6o","text__insight":"_avqxy","text--bold":"_2TG6E","text--italic":"_2hlsn","text--underline":"_1Pjo6","text--monospace":"_eDdDI","text--align-left":"_2gNwS","text--align-right":"_ufv1W","text--align-center":"_2WMN6","text--align-justify":"_2iH-J"};
5952
6002
 
5953
- var _excluded$2g = ["children", "as", "emphasis", "alignment", "color", "testId"];
6003
+ var _excluded$2h = ["children", "as", "emphasis", "alignment", "color", "testId"];
5954
6004
 
5955
6005
  var Text = function Text(_ref) {
5956
6006
  var _classnames;
@@ -5962,7 +6012,7 @@ var Text = function Text(_ref) {
5962
6012
  alignment = _ref.alignment,
5963
6013
  color = _ref.color,
5964
6014
  testId = _ref.testId,
5965
- positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2g);
6015
+ positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2h);
5966
6016
 
5967
6017
  var positionStyles = usePositionStyles(positionProps);
5968
6018
  var elementProps = {
@@ -6432,12 +6482,12 @@ var useTextField = function useTextField(_ref) {
6432
6482
  };
6433
6483
  };
6434
6484
 
6435
- var _excluded$2h = ["prefix", "suffix"];
6485
+ var _excluded$2i = ["prefix", "suffix"];
6436
6486
 
6437
6487
  var TextFieldElement = function TextFieldElement(_ref, ref) {
6438
6488
  var prefix = _ref.prefix,
6439
6489
  suffix = _ref.suffix,
6440
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2h);
6490
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2i);
6441
6491
 
6442
6492
  var _useTextField = useTextField(_extends({}, props, {
6443
6493
  ref: ref
@@ -7196,11 +7246,11 @@ var getSelectStyles$1 = function getSelectStyles(_ref) {
7196
7246
  };
7197
7247
  };
7198
7248
 
7199
- var _excluded$2i = ["children"];
7249
+ var _excluded$2j = ["children"];
7200
7250
 
7201
7251
  function CustomOption(_ref) {
7202
7252
  var children = _ref.children,
7203
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2i);
7253
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2j);
7204
7254
 
7205
7255
  var UserCustomOption = props.selectProps.componentsProps.UserCustomOption;
7206
7256
  return React__default.createElement(Select.components.Option, Object.assign({}, props), React__default.createElement(UserCustomOption, Object.assign({}, props), children));
@@ -7314,13 +7364,13 @@ var MultiSelectField = function MultiSelectField(_ref) {
7314
7364
 
7315
7365
  var styles$J = {"custom-control":"_1cDCR"};
7316
7366
 
7317
- var _excluded$2j = ["children"];
7367
+ var _excluded$2k = ["children"];
7318
7368
 
7319
7369
  function CustomControl(_ref) {
7320
7370
  var _props$getValue;
7321
7371
 
7322
7372
  var children = _ref.children,
7323
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2j);
7373
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2k);
7324
7374
 
7325
7375
  var SelectedOptionPrefix = props.selectProps.componentsProps.SelectedOptionPrefix;
7326
7376
  var selectedOption = (_props$getValue = props.getValue()) === null || _props$getValue === void 0 ? void 0 : _props$getValue[0];
@@ -7340,11 +7390,11 @@ function CustomControl(_ref) {
7340
7390
 
7341
7391
  var styles$K = {"custom-menu-text-field":"_2-zhH","custom-menu-hr":"_3sdnK","custom-menu-div":"_2F1jP"};
7342
7392
 
7343
- var _excluded$2k = ["children"];
7393
+ var _excluded$2l = ["children"];
7344
7394
 
7345
7395
  function CustomMenu(_ref) {
7346
7396
  var children = _ref.children,
7347
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2k);
7397
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2l);
7348
7398
 
7349
7399
  var _props$selectProps$co = props.selectProps.componentsProps,
7350
7400
  creatableButton = _props$selectProps$co.creatableButton,
@@ -7559,13 +7609,13 @@ var SelectField = function SelectField(props) {
7559
7609
 
7560
7610
  var styles$L = {"custom-list":"_uC4zU"};
7561
7611
 
7562
- var _excluded$2l = ["children", "hasMoreOptions", "hasMoreOptionsFirstLoad"];
7612
+ var _excluded$2m = ["children", "hasMoreOptions", "hasMoreOptionsFirstLoad"];
7563
7613
 
7564
7614
  var CustomList = function CustomList(_ref) {
7565
7615
  var children = _ref.children,
7566
7616
  hasMoreOptions = _ref.hasMoreOptions,
7567
7617
  hasMoreOptionsFirstLoad = _ref.hasMoreOptionsFirstLoad,
7568
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2l);
7618
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2m);
7569
7619
 
7570
7620
  var showFooter = hasMoreOptions;
7571
7621
 
@@ -7580,11 +7630,11 @@ var CustomList = function CustomList(_ref) {
7580
7630
  }, getLocalizedString('main.START_TYPING_TO_SEE_MORE_OPTIONS')))));
7581
7631
  };
7582
7632
 
7583
- var _excluded$2m = ["loadOptions"];
7633
+ var _excluded$2n = ["loadOptions"];
7584
7634
 
7585
7635
  var AsyncSelectField = function AsyncSelectField(_ref) {
7586
7636
  var loadOptions = _ref.loadOptions,
7587
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2m);
7637
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2n);
7588
7638
 
7589
7639
  var _useState = React.useState(false),
7590
7640
  hasMoreOptions = _useState[0],
@@ -8372,14 +8422,14 @@ var WeekField = function WeekField(_ref) {
8372
8422
  })));
8373
8423
  };
8374
8424
 
8375
- var _excluded$2n = ["placeholder", "autoComplete"];
8425
+ var _excluded$2o = ["placeholder", "autoComplete"];
8376
8426
 
8377
8427
  var TimeFieldElement = function TimeFieldElement(_ref, ref) {
8378
8428
  var _ref$placeholder = _ref.placeholder,
8379
8429
  placeholder = _ref$placeholder === void 0 ? '9am' : _ref$placeholder,
8380
8430
  _ref$autoComplete = _ref.autoComplete,
8381
8431
  autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
8382
- allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2n);
8432
+ allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2o);
8383
8433
 
8384
8434
  var _useTextField = useTextField(_extends({}, allOtherProps, {
8385
8435
  placeholder: placeholder,
@@ -8400,12 +8450,12 @@ var TimeFieldElement = function TimeFieldElement(_ref, ref) {
8400
8450
 
8401
8451
  var TimeField = React.forwardRef(TimeFieldElement);
8402
8452
 
8403
- var _excluded$2o = ["currencySymbol"];
8453
+ var _excluded$2p = ["currencySymbol"];
8404
8454
 
8405
8455
  var CurrencyFieldElement = function CurrencyFieldElement(_ref, ref) {
8406
8456
  var _ref$currencySymbol = _ref.currencySymbol,
8407
8457
  currencySymbol = _ref$currencySymbol === void 0 ? "$" : _ref$currencySymbol,
8408
- allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2o);
8458
+ allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2p);
8409
8459
 
8410
8460
  var _useTextField = useTextField(_extends({}, allOtherProps, {
8411
8461
  ref: ref
@@ -8438,7 +8488,7 @@ var CurrencyFieldElement = function CurrencyFieldElement(_ref, ref) {
8438
8488
 
8439
8489
  var CurrencyField = React.forwardRef(CurrencyFieldElement);
8440
8490
 
8441
- var _excluded$2p = ["max", "min", "precision", "stepSize"];
8491
+ var _excluded$2q = ["max", "min", "precision", "stepSize"];
8442
8492
 
8443
8493
  var PercentageElement = function PercentageElement(_ref, ref) {
8444
8494
  var _ref$max = _ref.max,
@@ -8449,7 +8499,7 @@ var PercentageElement = function PercentageElement(_ref, ref) {
8449
8499
  precision = _ref$precision === void 0 ? 0 : _ref$precision,
8450
8500
  _ref$stepSize = _ref.stepSize,
8451
8501
  stepSize = _ref$stepSize === void 0 ? 1 : _ref$stepSize,
8452
- allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2p);
8502
+ allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2q);
8453
8503
 
8454
8504
  var _useTextField = useTextField(_extends({}, allOtherProps, {
8455
8505
  ref: ref
@@ -8630,7 +8680,7 @@ var InlineBannerIcon = function InlineBannerIcon(_ref) {
8630
8680
  }
8631
8681
  };
8632
8682
 
8633
- var _excluded$2q = ["children", "theme", "title", "onClose", "caption", "primaryButton", "secondaryButton", "testId"];
8683
+ var _excluded$2r = ["children", "theme", "title", "onClose", "caption", "primaryButton", "secondaryButton", "testId"];
8634
8684
 
8635
8685
  var InlineBanner = function InlineBanner(_ref) {
8636
8686
  var _classnames, _classnames2;
@@ -8644,7 +8694,7 @@ var InlineBanner = function InlineBanner(_ref) {
8644
8694
  primaryButton = _ref.primaryButton,
8645
8695
  secondaryButton = _ref.secondaryButton,
8646
8696
  testId = _ref.testId,
8647
- positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2q);
8697
+ positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2r);
8648
8698
 
8649
8699
  var positionStyles = usePositionStyles(positionProps);
8650
8700
  var multiLine = !!title;
@@ -8865,7 +8915,7 @@ var ProgressBar = function ProgressBar(_ref) {
8865
8915
 
8866
8916
  var styles$S = {"badge":"_2f81N","badge--warning":"_2g1GI","badge--danger":"_2zLnM","badge--success":"_27QOo","badge--info":"_2gmsM"};
8867
8917
 
8868
- var _excluded$2r = ["children", "theme", "title", "testId"];
8918
+ var _excluded$2s = ["children", "theme", "title", "testId"];
8869
8919
 
8870
8920
  var Badge = function Badge(_ref, forwardedRef) {
8871
8921
  var _classnames;
@@ -8874,7 +8924,7 @@ var Badge = function Badge(_ref, forwardedRef) {
8874
8924
  theme = _ref.theme,
8875
8925
  title = _ref.title,
8876
8926
  testId = _ref.testId,
8877
- otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2r);
8927
+ otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2s);
8878
8928
 
8879
8929
  var internalRef = React.useRef(null);
8880
8930
  var ref = forwardedRef || internalRef;
@@ -9231,6 +9281,7 @@ exports.IconUserComputer = IconUserComputer;
9231
9281
  exports.IconUserFriends = IconUserFriends;
9232
9282
  exports.IconUserLight = IconUserLight;
9233
9283
  exports.IconUserPlus = IconUserPlus;
9284
+ exports.IconUserSearch = IconUserSearch;
9234
9285
  exports.IconUserSlash = IconUserSlash;
9235
9286
  exports.IconUserSolid = IconUserSolid;
9236
9287
  exports.IconUserTag = IconUserTag;