@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.
@@ -3048,8 +3048,7 @@ var IconMoneyBill = forwardRef(function (_ref, ref) {
3048
3048
  IconMoneyBill.displayName = 'IconMoneyBill';
3049
3049
 
3050
3050
  var _excluded$1v = ["testId"];
3051
-
3052
- var IconMugSaucerSolid = function IconMugSaucerSolid(_ref) {
3051
+ var IconMugSaucerSolid = forwardRef(function (_ref, ref) {
3053
3052
  var _ref$testId = _ref.testId,
3054
3053
  testId = _ref$testId === void 0 ? 'icon-mug-saucer-solid' : _ref$testId,
3055
3054
  props = _objectWithoutPropertiesLoose(_ref, _excluded$1v);
@@ -3059,12 +3058,12 @@ var IconMugSaucerSolid = function IconMugSaucerSolid(_ref) {
3059
3058
  fill: "none",
3060
3059
  xmlns: "http://www.w3.org/2000/svg",
3061
3060
  style: getIconStyles(props),
3062
- "data-testid": testId
3061
+ "data-testid": testId,
3062
+ ref: ref
3063
3063
  }, props), React__default.createElement("path", {
3064
3064
  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"
3065
3065
  }));
3066
- };
3067
-
3066
+ });
3068
3067
  IconMugSaucerSolid.displayName = 'IconMugSaucerSolid';
3069
3068
 
3070
3069
  var _excluded$1w = ["testId"];
@@ -3893,10 +3892,39 @@ var IconUserPlus = forwardRef(function (_ref, ref) {
3893
3892
  IconUserPlus.displayName = 'IconUserPlus';
3894
3893
 
3895
3894
  var _excluded$25 = ["testId"];
3895
+ var IconUserSearch = forwardRef(function (_ref, ref) {
3896
+ var _ref$testId = _ref.testId,
3897
+ testId = _ref$testId === void 0 ? 'icon-user-search' : _ref$testId,
3898
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$25);
3899
+
3900
+ return React__default.createElement("svg", Object.assign({
3901
+ viewBox: "0 0 20 20",
3902
+ fill: "none",
3903
+ xmlns: "http://www.w3.org/2000/svg",
3904
+ style: getIconStyles(props),
3905
+ "data-testid": testId,
3906
+ ref: ref
3907
+ }, props), React__default.createElement("g", {
3908
+ clipPath: "url(#icon-user-search_svg__a)",
3909
+ fill: "currentColor"
3910
+ }, React__default.createElement("path", {
3911
+ 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"
3912
+ }), React__default.createElement("path", {
3913
+ 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"
3914
+ })), React__default.createElement("defs", null, React__default.createElement("clipPath", {
3915
+ id: "icon-user-search_svg__a"
3916
+ }, React__default.createElement("path", {
3917
+ fill: "#fff",
3918
+ d: "M0 0h20v20H0z"
3919
+ }))));
3920
+ });
3921
+ IconUserSearch.displayName = 'IconUserSearch';
3922
+
3923
+ var _excluded$26 = ["testId"];
3896
3924
  var IconUserSlash = forwardRef(function (_ref, ref) {
3897
3925
  var _ref$testId = _ref.testId,
3898
3926
  testId = _ref$testId === void 0 ? 'icon-user-slash' : _ref$testId,
3899
- props = _objectWithoutPropertiesLoose(_ref, _excluded$25);
3927
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$26);
3900
3928
 
3901
3929
  return React__default.createElement("svg", Object.assign({
3902
3930
  viewBox: "0 0 20 20",
@@ -3919,11 +3947,11 @@ var IconUserSlash = forwardRef(function (_ref, ref) {
3919
3947
  });
3920
3948
  IconUserSlash.displayName = 'IconUserSlash';
3921
3949
 
3922
- var _excluded$26 = ["testId"];
3950
+ var _excluded$27 = ["testId"];
3923
3951
  var IconUserSolid = forwardRef(function (_ref, ref) {
3924
3952
  var _ref$testId = _ref.testId,
3925
3953
  testId = _ref$testId === void 0 ? 'icon-user-solid' : _ref$testId,
3926
- props = _objectWithoutPropertiesLoose(_ref, _excluded$26);
3954
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$27);
3927
3955
 
3928
3956
  return React__default.createElement("svg", Object.assign({
3929
3957
  viewBox: "0 0 20 20",
@@ -3939,11 +3967,11 @@ var IconUserSolid = forwardRef(function (_ref, ref) {
3939
3967
  });
3940
3968
  IconUserSolid.displayName = 'IconUserSolid';
3941
3969
 
3942
- var _excluded$27 = ["testId"];
3970
+ var _excluded$28 = ["testId"];
3943
3971
  var IconUserTag = forwardRef(function (_ref, ref) {
3944
3972
  var _ref$testId = _ref.testId,
3945
3973
  testId = _ref$testId === void 0 ? 'icon-user-tag' : _ref$testId,
3946
- props = _objectWithoutPropertiesLoose(_ref, _excluded$27);
3974
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$28);
3947
3975
 
3948
3976
  return React__default.createElement("svg", Object.assign({
3949
3977
  viewBox: "0 0 20 20",
@@ -3961,11 +3989,11 @@ var IconUserTag = forwardRef(function (_ref, ref) {
3961
3989
  });
3962
3990
  IconUserTag.displayName = 'IconUserTag';
3963
3991
 
3964
- var _excluded$28 = ["testId"];
3992
+ var _excluded$29 = ["testId"];
3965
3993
  var IconUserTie = forwardRef(function (_ref, ref) {
3966
3994
  var _ref$testId = _ref.testId,
3967
3995
  testId = _ref$testId === void 0 ? 'icon-user-tie' : _ref$testId,
3968
- props = _objectWithoutPropertiesLoose(_ref, _excluded$28);
3996
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$29);
3969
3997
 
3970
3998
  return React__default.createElement("svg", Object.assign({
3971
3999
  viewBox: "0 0 20 20",
@@ -3981,11 +4009,11 @@ var IconUserTie = forwardRef(function (_ref, ref) {
3981
4009
  });
3982
4010
  IconUserTie.displayName = 'IconUserTie';
3983
4011
 
3984
- var _excluded$29 = ["testId"];
4012
+ var _excluded$2a = ["testId"];
3985
4013
  var IconUsers = forwardRef(function (_ref, ref) {
3986
4014
  var _ref$testId = _ref.testId,
3987
4015
  testId = _ref$testId === void 0 ? 'icon-users' : _ref$testId,
3988
- props = _objectWithoutPropertiesLoose(_ref, _excluded$29);
4016
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2a);
3989
4017
 
3990
4018
  return React__default.createElement("svg", Object.assign({
3991
4019
  viewBox: "0 0 20 20",
@@ -4001,11 +4029,11 @@ var IconUsers = forwardRef(function (_ref, ref) {
4001
4029
  });
4002
4030
  IconUsers.displayName = 'IconUsers';
4003
4031
 
4004
- var _excluded$2a = ["testId"];
4032
+ var _excluded$2b = ["testId"];
4005
4033
  var IconVideo = forwardRef(function (_ref, ref) {
4006
4034
  var _ref$testId = _ref.testId,
4007
4035
  testId = _ref$testId === void 0 ? 'icon-video' : _ref$testId,
4008
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2a);
4036
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2b);
4009
4037
 
4010
4038
  return React__default.createElement("svg", Object.assign({
4011
4039
  viewBox: "0 0 20 20",
@@ -4021,11 +4049,11 @@ var IconVideo = forwardRef(function (_ref, ref) {
4021
4049
  });
4022
4050
  IconVideo.displayName = 'IconVideo';
4023
4051
 
4024
- var _excluded$2b = ["testId"];
4052
+ var _excluded$2c = ["testId"];
4025
4053
  var IconVolumeMute = forwardRef(function (_ref, ref) {
4026
4054
  var _ref$testId = _ref.testId,
4027
4055
  testId = _ref$testId === void 0 ? 'icon-volume-mute' : _ref$testId,
4028
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2b);
4056
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2c);
4029
4057
 
4030
4058
  return React__default.createElement("svg", Object.assign({
4031
4059
  viewBox: "0 0 20 20",
@@ -4041,11 +4069,11 @@ var IconVolumeMute = forwardRef(function (_ref, ref) {
4041
4069
  });
4042
4070
  IconVolumeMute.displayName = 'IconVolumeMute';
4043
4071
 
4044
- var _excluded$2c = ["testId"];
4072
+ var _excluded$2d = ["testId"];
4045
4073
  var IconVolume = forwardRef(function (_ref, ref) {
4046
4074
  var _ref$testId = _ref.testId,
4047
4075
  testId = _ref$testId === void 0 ? 'icon-volume' : _ref$testId,
4048
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2c);
4076
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2d);
4049
4077
 
4050
4078
  return React__default.createElement("svg", Object.assign({
4051
4079
  viewBox: "0 0 20 20",
@@ -4061,11 +4089,11 @@ var IconVolume = forwardRef(function (_ref, ref) {
4061
4089
  });
4062
4090
  IconVolume.displayName = 'IconVolume';
4063
4091
 
4064
- var _excluded$2d = ["testId"];
4092
+ var _excluded$2e = ["testId"];
4065
4093
  var IconWrench = forwardRef(function (_ref, ref) {
4066
4094
  var _ref$testId = _ref.testId,
4067
4095
  testId = _ref$testId === void 0 ? 'icon-wrench' : _ref$testId,
4068
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2d);
4096
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2e);
4069
4097
 
4070
4098
  return React__default.createElement("svg", Object.assign({
4071
4099
  viewBox: "0 0 20 20",
@@ -4424,7 +4452,7 @@ var ActionsCell = function ActionsCell(_ref) {
4424
4452
  }));
4425
4453
  };
4426
4454
 
4427
- var _excluded$2e = ["children", "onClick", "isSelected", "actions", "hasDefaultPadding", "testId"];
4455
+ var _excluded$2f = ["children", "onClick", "isSelected", "actions", "hasDefaultPadding", "testId"];
4428
4456
 
4429
4457
  var DataTableRowComponent = function DataTableRowComponent(_ref, ref) {
4430
4458
  var _classnames;
@@ -4438,7 +4466,7 @@ var DataTableRowComponent = function DataTableRowComponent(_ref, ref) {
4438
4466
  _ref$hasDefaultPaddin = _ref.hasDefaultPadding,
4439
4467
  hasDefaultPadding = _ref$hasDefaultPaddin === void 0 ? true : _ref$hasDefaultPaddin,
4440
4468
  testId = _ref.testId,
4441
- nativeDivProps = _objectWithoutPropertiesLoose(_ref, _excluded$2e);
4469
+ nativeDivProps = _objectWithoutPropertiesLoose(_ref, _excluded$2f);
4442
4470
 
4443
4471
  var _useDataTableContext = useDataTableContext(),
4444
4472
  columns = _useDataTableContext.columns,
@@ -4677,136 +4705,7 @@ var DefaultItemComponent = function DefaultItemComponent(_ref2) {
4677
4705
  }));
4678
4706
  };
4679
4707
 
4680
- var styles$c = {"data-table-cell":"_2Ybjx","data-table-cell--right-aligned":"_1cXj6"};
4681
-
4682
- var DataTableCell = function DataTableCell(_ref) {
4683
- var _columns$columnIndex, _classnames;
4684
-
4685
- var children = _ref.children,
4686
- columnIndex = _ref.columnIndex;
4687
-
4688
- var _useDataTableContext = useDataTableContext(),
4689
- columns = _useDataTableContext.columns;
4690
-
4691
- var column = (_columns$columnIndex = columns === null || columns === void 0 ? void 0 : columns[columnIndex]) != null ? _columns$columnIndex : null;
4692
- var isRightAligned = column ? column.isRightAligned : false;
4693
- return React__default.createElement("div", {
4694
- className: classnames((_classnames = {}, _classnames[styles$c['data-table-cell--right-aligned']] = isRightAligned, _classnames), styles$c['data-table-cell'])
4695
- }, children);
4696
- };
4697
-
4698
- var Context$1 = createContext({});
4699
- var useFormContext = function useFormContext() {
4700
- var context = useContext(Context$1);
4701
- return context || {};
4702
- };
4703
-
4704
- var useFieldId = function useFieldId(_ref) {
4705
- var name = _ref.name,
4706
- inputId = _ref.id;
4707
- var id = useMemo(function () {
4708
- return inputId ? inputId : name + "-" + Math.random();
4709
- }, [inputId, name]);
4710
- return id;
4711
- };
4712
-
4713
- var getFormikState = function getFormikState(name, formik) {
4714
- if (formik === undefined) {
4715
- return null;
4716
- }
4717
-
4718
- var formikPath = getFormikArrayPath(name);
4719
-
4720
- if (formikPath.length === 0) {
4721
- return null;
4722
- }
4723
-
4724
- var formikLatestLevel = formikPath.reduce(function (acc, path) {
4725
- var _acc$touched, _acc$error, _acc$value;
4726
-
4727
- return {
4728
- touched: (_acc$touched = acc.touched) === null || _acc$touched === void 0 ? void 0 : _acc$touched[path],
4729
- error: (_acc$error = acc.error) === null || _acc$error === void 0 ? void 0 : _acc$error[path],
4730
- value: (_acc$value = acc.value) === null || _acc$value === void 0 ? void 0 : _acc$value[path]
4731
- };
4732
- }, {
4733
- touched: formik.touched,
4734
- error: formik.errors,
4735
- value: formik.values
4736
- });
4737
- return {
4738
- error: formikLatestLevel.touched ? formikLatestLevel.error : undefined,
4739
- value: formikLatestLevel.value
4740
- };
4741
- };
4742
- var getFormikArrayPath = function getFormikArrayPath(name) {
4743
- return name.split(/[^a-zA-Z0-9]/).filter(Boolean);
4744
- };
4745
-
4746
- var useFieldControllers = function useFieldControllers(_ref) {
4747
- var name = _ref.name,
4748
- inputId = _ref.id,
4749
- value = _ref.value,
4750
- _onChange = _ref.onChange,
4751
- _onBlur = _ref.onBlur,
4752
- _onFocus = _ref.onFocus,
4753
- _onKeyDown = _ref.onKeyDown,
4754
- error = _ref.error,
4755
- _ref$type = _ref.type,
4756
- type = _ref$type === void 0 ? 'text' : _ref$type;
4757
-
4758
- var _useFormContext = useFormContext(),
4759
- formik = _useFormContext.formik;
4760
-
4761
- var id = useFieldId({
4762
- name: name,
4763
- id: inputId
4764
- });
4765
- var controllers = {
4766
- id: id,
4767
- error: error,
4768
- value: value,
4769
- onChange: function onChange(e) {
4770
- return _onChange && _onChange(e.target.value);
4771
- },
4772
- onBlur: function onBlur(e) {
4773
- return _onBlur && _onBlur(e.target.value);
4774
- },
4775
- onFocus: function onFocus(e) {
4776
- return _onFocus && _onFocus(e.target.value);
4777
- },
4778
- onKeyDown: function onKeyDown(e) {
4779
- return _onKeyDown && _onKeyDown(e.key);
4780
- }
4781
- };
4782
- var formikState = getFormikState(name, formik);
4783
-
4784
- if (formik && formikState) {
4785
- var currencyBlur = function currencyBlur() {
4786
- if (type === 'currency') {
4787
- formik.setFieldValue(name, Number(value).toFixed(2));
4788
- }
4789
- };
4790
-
4791
- controllers = _extends({}, controllers, {
4792
- error: error !== undefined ? controllers.error : formikState.error,
4793
- value: value !== undefined ? controllers.value : formikState.value,
4794
- onChange: _onChange ? controllers.onChange : function (e) {
4795
- return formik.setFieldValue(name, e.target.value);
4796
- },
4797
- onBlur: _onBlur ? function (e) {
4798
- _onBlur && _onBlur(e.target.value);
4799
- formik.setFieldTouched(name);
4800
- currencyBlur();
4801
- } : function () {
4802
- formik.setFieldTouched(name);
4803
- currencyBlur();
4804
- }
4805
- });
4806
- }
4807
-
4808
- return controllers;
4809
- };
4708
+ var styles$c = {"data-table-cell":"_2Ybjx","data-table-cell--right-aligned":"_1cXj6","data-table-cell--invalid":"_D73Vx"};
4810
4709
 
4811
4710
  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"};
4812
4711
 
@@ -5194,6 +5093,157 @@ var Calendar = function Calendar(_ref) {
5194
5093
  }))));
5195
5094
  };
5196
5095
 
5096
+ var DataTableCellElement = function DataTableCellElement(_ref) {
5097
+ var _columns$columnIndex, _classnames;
5098
+
5099
+ var children = _ref.children,
5100
+ columnIndex = _ref.columnIndex,
5101
+ error = _ref.error,
5102
+ _ref$delayOnCloseErro = _ref.delayOnCloseError,
5103
+ delayOnCloseError = _ref$delayOnCloseErro === void 0 ? false : _ref$delayOnCloseErro;
5104
+
5105
+ var _useDataTableContext = useDataTableContext(),
5106
+ columns = _useDataTableContext.columns;
5107
+
5108
+ var column = (_columns$columnIndex = columns === null || columns === void 0 ? void 0 : columns[columnIndex]) != null ? _columns$columnIndex : null;
5109
+ var isRightAligned = column ? column.isRightAligned : false;
5110
+ var hasError = !!error;
5111
+ var errorMessage = error;
5112
+ var icon = hasError && React__default.createElement(IconTimesOctagon, {
5113
+ size: "medium",
5114
+ color: RADISH400
5115
+ });
5116
+ var TableCell = React__default.createElement("div", {
5117
+ 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'])
5118
+ }, isRightAligned && icon, children, !isRightAligned && icon);
5119
+
5120
+ if (hasError) {
5121
+ return React__default.createElement(Tooltip$1, {
5122
+ overlay: errorMessage,
5123
+ delayOnClose: delayOnCloseError,
5124
+ placement: "top",
5125
+ theme: "white"
5126
+ }, TableCell);
5127
+ }
5128
+
5129
+ return TableCell;
5130
+ };
5131
+
5132
+ var DataTableCell = forwardRef(DataTableCellElement);
5133
+
5134
+ var Context$1 = createContext({});
5135
+ var useFormContext = function useFormContext() {
5136
+ var context = useContext(Context$1);
5137
+ return context || {};
5138
+ };
5139
+
5140
+ var useFieldId = function useFieldId(_ref) {
5141
+ var name = _ref.name,
5142
+ inputId = _ref.id;
5143
+ var id = useMemo(function () {
5144
+ return inputId ? inputId : name + "-" + Math.random();
5145
+ }, [inputId, name]);
5146
+ return id;
5147
+ };
5148
+
5149
+ var getFormikState = function getFormikState(name, formik) {
5150
+ if (formik === undefined) {
5151
+ return null;
5152
+ }
5153
+
5154
+ var formikPath = getFormikArrayPath(name);
5155
+
5156
+ if (formikPath.length === 0) {
5157
+ return null;
5158
+ }
5159
+
5160
+ var formikLatestLevel = formikPath.reduce(function (acc, path) {
5161
+ var _acc$touched, _acc$error, _acc$value;
5162
+
5163
+ return {
5164
+ touched: (_acc$touched = acc.touched) === null || _acc$touched === void 0 ? void 0 : _acc$touched[path],
5165
+ error: (_acc$error = acc.error) === null || _acc$error === void 0 ? void 0 : _acc$error[path],
5166
+ value: (_acc$value = acc.value) === null || _acc$value === void 0 ? void 0 : _acc$value[path]
5167
+ };
5168
+ }, {
5169
+ touched: formik.touched,
5170
+ error: formik.errors,
5171
+ value: formik.values
5172
+ });
5173
+ return {
5174
+ error: formikLatestLevel.touched ? formikLatestLevel.error : undefined,
5175
+ value: formikLatestLevel.value
5176
+ };
5177
+ };
5178
+ var getFormikArrayPath = function getFormikArrayPath(name) {
5179
+ return name.split(/[^a-zA-Z0-9]/).filter(Boolean);
5180
+ };
5181
+
5182
+ var useFieldControllers = function useFieldControllers(_ref) {
5183
+ var name = _ref.name,
5184
+ inputId = _ref.id,
5185
+ value = _ref.value,
5186
+ _onChange = _ref.onChange,
5187
+ _onBlur = _ref.onBlur,
5188
+ _onFocus = _ref.onFocus,
5189
+ _onKeyDown = _ref.onKeyDown,
5190
+ error = _ref.error,
5191
+ _ref$type = _ref.type,
5192
+ type = _ref$type === void 0 ? 'text' : _ref$type;
5193
+
5194
+ var _useFormContext = useFormContext(),
5195
+ formik = _useFormContext.formik;
5196
+
5197
+ var id = useFieldId({
5198
+ name: name,
5199
+ id: inputId
5200
+ });
5201
+ var controllers = {
5202
+ id: id,
5203
+ error: error,
5204
+ value: value,
5205
+ onChange: function onChange(e) {
5206
+ return _onChange && _onChange(e.target.value);
5207
+ },
5208
+ onBlur: function onBlur(e) {
5209
+ return _onBlur && _onBlur(e.target.value);
5210
+ },
5211
+ onFocus: function onFocus(e) {
5212
+ return _onFocus && _onFocus(e.target.value);
5213
+ },
5214
+ onKeyDown: function onKeyDown(e) {
5215
+ return _onKeyDown && _onKeyDown(e.key);
5216
+ }
5217
+ };
5218
+ var formikState = getFormikState(name, formik);
5219
+
5220
+ if (formik && formikState) {
5221
+ var currencyBlur = function currencyBlur() {
5222
+ if (type === 'currency') {
5223
+ formik.setFieldValue(name, Number(value).toFixed(2));
5224
+ }
5225
+ };
5226
+
5227
+ controllers = _extends({}, controllers, {
5228
+ error: error !== undefined ? controllers.error : formikState.error,
5229
+ value: value !== undefined ? controllers.value : formikState.value,
5230
+ onChange: _onChange ? controllers.onChange : function (e) {
5231
+ return formik.setFieldValue(name, e.target.value);
5232
+ },
5233
+ onBlur: _onBlur ? function (e) {
5234
+ _onBlur && _onBlur(e.target.value);
5235
+ formik.setFieldTouched(name);
5236
+ currencyBlur();
5237
+ } : function () {
5238
+ formik.setFieldTouched(name);
5239
+ currencyBlur();
5240
+ }
5241
+ });
5242
+ }
5243
+
5244
+ return controllers;
5245
+ };
5246
+
5197
5247
  var styles$j = {"label":"_h724f","label--truncate":"_1VUoF"};
5198
5248
 
5199
5249
  var isEllipsisActive = function isEllipsisActive(e) {
@@ -5888,7 +5938,7 @@ var styles$s = {"form--standard-size":"_3CaV0"};
5888
5938
 
5889
5939
  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"};
5890
5940
 
5891
- var _excluded$2f = ["children", "onClick", "isSelected", "actions", "testId"];
5941
+ var _excluded$2g = ["children", "onClick", "isSelected", "actions", "testId"];
5892
5942
 
5893
5943
  var Card = function Card(_ref) {
5894
5944
  var _classnames, _classnames2;
@@ -5899,7 +5949,7 @@ var Card = function Card(_ref) {
5899
5949
  isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
5900
5950
  actions = _ref.actions,
5901
5951
  testId = _ref.testId,
5902
- positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2f);
5952
+ positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2g);
5903
5953
 
5904
5954
  var positionStyles = usePositionStyles(positionProps);
5905
5955
  return React__default.createElement("div", {
@@ -5945,7 +5995,7 @@ var ALIGNMENTS = {
5945
5995
 
5946
5996
  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"};
5947
5997
 
5948
- var _excluded$2g = ["children", "as", "emphasis", "alignment", "color", "testId"];
5998
+ var _excluded$2h = ["children", "as", "emphasis", "alignment", "color", "testId"];
5949
5999
 
5950
6000
  var Text = function Text(_ref) {
5951
6001
  var _classnames;
@@ -5957,7 +6007,7 @@ var Text = function Text(_ref) {
5957
6007
  alignment = _ref.alignment,
5958
6008
  color = _ref.color,
5959
6009
  testId = _ref.testId,
5960
- positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2g);
6010
+ positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2h);
5961
6011
 
5962
6012
  var positionStyles = usePositionStyles(positionProps);
5963
6013
  var elementProps = {
@@ -6427,12 +6477,12 @@ var useTextField = function useTextField(_ref) {
6427
6477
  };
6428
6478
  };
6429
6479
 
6430
- var _excluded$2h = ["prefix", "suffix"];
6480
+ var _excluded$2i = ["prefix", "suffix"];
6431
6481
 
6432
6482
  var TextFieldElement = function TextFieldElement(_ref, ref) {
6433
6483
  var prefix = _ref.prefix,
6434
6484
  suffix = _ref.suffix,
6435
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2h);
6485
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2i);
6436
6486
 
6437
6487
  var _useTextField = useTextField(_extends({}, props, {
6438
6488
  ref: ref
@@ -7191,11 +7241,11 @@ var getSelectStyles$1 = function getSelectStyles(_ref) {
7191
7241
  };
7192
7242
  };
7193
7243
 
7194
- var _excluded$2i = ["children"];
7244
+ var _excluded$2j = ["children"];
7195
7245
 
7196
7246
  function CustomOption(_ref) {
7197
7247
  var children = _ref.children,
7198
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2i);
7248
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2j);
7199
7249
 
7200
7250
  var UserCustomOption = props.selectProps.componentsProps.UserCustomOption;
7201
7251
  return React__default.createElement(components.Option, Object.assign({}, props), React__default.createElement(UserCustomOption, Object.assign({}, props), children));
@@ -7309,13 +7359,13 @@ var MultiSelectField = function MultiSelectField(_ref) {
7309
7359
 
7310
7360
  var styles$J = {"custom-control":"_1cDCR"};
7311
7361
 
7312
- var _excluded$2j = ["children"];
7362
+ var _excluded$2k = ["children"];
7313
7363
 
7314
7364
  function CustomControl(_ref) {
7315
7365
  var _props$getValue;
7316
7366
 
7317
7367
  var children = _ref.children,
7318
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2j);
7368
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2k);
7319
7369
 
7320
7370
  var SelectedOptionPrefix = props.selectProps.componentsProps.SelectedOptionPrefix;
7321
7371
  var selectedOption = (_props$getValue = props.getValue()) === null || _props$getValue === void 0 ? void 0 : _props$getValue[0];
@@ -7335,11 +7385,11 @@ function CustomControl(_ref) {
7335
7385
 
7336
7386
  var styles$K = {"custom-menu-text-field":"_2-zhH","custom-menu-hr":"_3sdnK","custom-menu-div":"_2F1jP"};
7337
7387
 
7338
- var _excluded$2k = ["children"];
7388
+ var _excluded$2l = ["children"];
7339
7389
 
7340
7390
  function CustomMenu(_ref) {
7341
7391
  var children = _ref.children,
7342
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2k);
7392
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2l);
7343
7393
 
7344
7394
  var _props$selectProps$co = props.selectProps.componentsProps,
7345
7395
  creatableButton = _props$selectProps$co.creatableButton,
@@ -7554,13 +7604,13 @@ var SelectField = function SelectField(props) {
7554
7604
 
7555
7605
  var styles$L = {"custom-list":"_uC4zU"};
7556
7606
 
7557
- var _excluded$2l = ["children", "hasMoreOptions", "hasMoreOptionsFirstLoad"];
7607
+ var _excluded$2m = ["children", "hasMoreOptions", "hasMoreOptionsFirstLoad"];
7558
7608
 
7559
7609
  var CustomList = function CustomList(_ref) {
7560
7610
  var children = _ref.children,
7561
7611
  hasMoreOptions = _ref.hasMoreOptions,
7562
7612
  hasMoreOptionsFirstLoad = _ref.hasMoreOptionsFirstLoad,
7563
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2l);
7613
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2m);
7564
7614
 
7565
7615
  var showFooter = hasMoreOptions;
7566
7616
 
@@ -7575,11 +7625,11 @@ var CustomList = function CustomList(_ref) {
7575
7625
  }, getLocalizedString('main.START_TYPING_TO_SEE_MORE_OPTIONS')))));
7576
7626
  };
7577
7627
 
7578
- var _excluded$2m = ["loadOptions"];
7628
+ var _excluded$2n = ["loadOptions"];
7579
7629
 
7580
7630
  var AsyncSelectField = function AsyncSelectField(_ref) {
7581
7631
  var loadOptions = _ref.loadOptions,
7582
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2m);
7632
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2n);
7583
7633
 
7584
7634
  var _useState = useState(false),
7585
7635
  hasMoreOptions = _useState[0],
@@ -8367,14 +8417,14 @@ var WeekField = function WeekField(_ref) {
8367
8417
  })));
8368
8418
  };
8369
8419
 
8370
- var _excluded$2n = ["placeholder", "autoComplete"];
8420
+ var _excluded$2o = ["placeholder", "autoComplete"];
8371
8421
 
8372
8422
  var TimeFieldElement = function TimeFieldElement(_ref, ref) {
8373
8423
  var _ref$placeholder = _ref.placeholder,
8374
8424
  placeholder = _ref$placeholder === void 0 ? '9am' : _ref$placeholder,
8375
8425
  _ref$autoComplete = _ref.autoComplete,
8376
8426
  autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
8377
- allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2n);
8427
+ allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2o);
8378
8428
 
8379
8429
  var _useTextField = useTextField(_extends({}, allOtherProps, {
8380
8430
  placeholder: placeholder,
@@ -8395,12 +8445,12 @@ var TimeFieldElement = function TimeFieldElement(_ref, ref) {
8395
8445
 
8396
8446
  var TimeField = forwardRef(TimeFieldElement);
8397
8447
 
8398
- var _excluded$2o = ["currencySymbol"];
8448
+ var _excluded$2p = ["currencySymbol"];
8399
8449
 
8400
8450
  var CurrencyFieldElement = function CurrencyFieldElement(_ref, ref) {
8401
8451
  var _ref$currencySymbol = _ref.currencySymbol,
8402
8452
  currencySymbol = _ref$currencySymbol === void 0 ? "$" : _ref$currencySymbol,
8403
- allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2o);
8453
+ allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2p);
8404
8454
 
8405
8455
  var _useTextField = useTextField(_extends({}, allOtherProps, {
8406
8456
  ref: ref
@@ -8433,7 +8483,7 @@ var CurrencyFieldElement = function CurrencyFieldElement(_ref, ref) {
8433
8483
 
8434
8484
  var CurrencyField = forwardRef(CurrencyFieldElement);
8435
8485
 
8436
- var _excluded$2p = ["max", "min", "precision", "stepSize"];
8486
+ var _excluded$2q = ["max", "min", "precision", "stepSize"];
8437
8487
 
8438
8488
  var PercentageElement = function PercentageElement(_ref, ref) {
8439
8489
  var _ref$max = _ref.max,
@@ -8444,7 +8494,7 @@ var PercentageElement = function PercentageElement(_ref, ref) {
8444
8494
  precision = _ref$precision === void 0 ? 0 : _ref$precision,
8445
8495
  _ref$stepSize = _ref.stepSize,
8446
8496
  stepSize = _ref$stepSize === void 0 ? 1 : _ref$stepSize,
8447
- allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2p);
8497
+ allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2q);
8448
8498
 
8449
8499
  var _useTextField = useTextField(_extends({}, allOtherProps, {
8450
8500
  ref: ref
@@ -8625,7 +8675,7 @@ var InlineBannerIcon = function InlineBannerIcon(_ref) {
8625
8675
  }
8626
8676
  };
8627
8677
 
8628
- var _excluded$2q = ["children", "theme", "title", "onClose", "caption", "primaryButton", "secondaryButton", "testId"];
8678
+ var _excluded$2r = ["children", "theme", "title", "onClose", "caption", "primaryButton", "secondaryButton", "testId"];
8629
8679
 
8630
8680
  var InlineBanner = function InlineBanner(_ref) {
8631
8681
  var _classnames, _classnames2;
@@ -8639,7 +8689,7 @@ var InlineBanner = function InlineBanner(_ref) {
8639
8689
  primaryButton = _ref.primaryButton,
8640
8690
  secondaryButton = _ref.secondaryButton,
8641
8691
  testId = _ref.testId,
8642
- positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2q);
8692
+ positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2r);
8643
8693
 
8644
8694
  var positionStyles = usePositionStyles(positionProps);
8645
8695
  var multiLine = !!title;
@@ -8860,7 +8910,7 @@ var ProgressBar = function ProgressBar(_ref) {
8860
8910
 
8861
8911
  var styles$S = {"badge":"_2f81N","badge--warning":"_2g1GI","badge--danger":"_2zLnM","badge--success":"_27QOo","badge--info":"_2gmsM"};
8862
8912
 
8863
- var _excluded$2r = ["children", "theme", "title", "testId"];
8913
+ var _excluded$2s = ["children", "theme", "title", "testId"];
8864
8914
 
8865
8915
  var Badge = function Badge(_ref, forwardedRef) {
8866
8916
  var _classnames;
@@ -8869,7 +8919,7 @@ var Badge = function Badge(_ref, forwardedRef) {
8869
8919
  theme = _ref.theme,
8870
8920
  title = _ref.title,
8871
8921
  testId = _ref.testId,
8872
- otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2r);
8922
+ otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2s);
8873
8923
 
8874
8924
  var internalRef = useRef(null);
8875
8925
  var ref = forwardedRef || internalRef;
@@ -9071,5 +9121,5 @@ var Italic = function Italic(_ref) {
9071
9121
  }, children);
9072
9122
  };
9073
9123
 
9074
- export { AsyncSelectField, Avatar, Badge$1 as Badge, Bold, BreadcrumbItem, Breadcrumbs, Button$1 as Button, Calendar, Card, CheckboxField, Chip, CircularProgress, CurrencyField, DataTable, DataTableCell, DataTableEditableCell, DataTableRow, DateField, DateFilter, DateRangeField, Form, FormFeedback, FormFooter, FormRow, FormSection, IconAnalytics, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowToTop, IconArrowTurnDownRight, IconArrowUp, IconAward, IconAwful, IconAwfulMonochromatic, IconBad, IconBadMonochromatic, IconBalanceScale, IconBalanceScaleLeft, IconBan, IconBarsH, IconBarsV, IconBell, IconBirthdayCake, IconBold, IconBolt, IconBook, IconBriefcase, IconBullseyeArrow, IconCalculator, IconCalendar, IconCalendarAlt, IconCalendarCheck, IconCalendarDay, IconCalendarExclamation, IconCalendarStar, IconCalendarTomorrow, IconCamera, IconCameraSlash, IconCashRegister, IconChartBar, IconCheck, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClipboardList, IconClock, IconCog, IconComment, IconCommentLines, IconCopy, IconCreditCard, IconCreditCardPlus, IconDecent, IconDecentMonochromatic, IconDownload, IconEdit, IconEllipsisV, IconEnvelope, IconExclaimation, IconExclaimationTriangle, IconExpand, IconExternalLink, IconEye, IconEyeSlash, IconFile, IconFilePdf, IconFlag, IconFourDotsCircle, IconFourSquares, IconGavel, IconGif, IconGift, IconGood, IconGoodMonochromatic, IconGreat, IconGreatMonochromatic, IconGrinBeam, IconGripVertical, IconHandshake, IconImage, IconInfoCircle, IconIslandTropical, IconItalic, IconLaptopSearch, IconLink, IconList, IconListOI as IconListOi, IconLock, IconMagicSolid, IconMapMarker, IconMegaphone, IconMessages, IconMinus, IconMinusCircle, IconMoneyBill, IconMugSaucerSolid, IconNotesMedical, IconOvertime, IconPaperPlane, IconPaperPlaneClock, IconPaperclip, IconPencil, IconPercentage, IconPhone, IconPlug, IconPlus, IconPrint, IconQuestionCircle, IconRepeat, IconReply, IconSearch, IconSignOut, IconSitemap, IconSlidersH, IconSort, IconStar, IconStarSolid, IconStickyNoteLines, IconStopwatch, IconStrikethrough, IconSync, IconSyncExclaimation, IconTachometer, IconTimes, IconTimesOctagon, IconTrash, IconUnderline, IconUndo, IconUniversity, IconUserComputer, IconUserFriends, IconUserLight, IconUserPlus, IconUserSlash, IconUserSolid, IconUserTag, IconUserTie, IconUsers, IconVideo, IconVolume, IconVolumeMute, IconWrench, Inline, InlineBanner, Italic, Link, Modal, ModalBody, ModalFooter, MultiSelectField, Page, PaginationControls, PasswordField, PercentageField, PersistentBanner, Pill, PillSelectField, ProgressBar, RadioGroupBoxOption, RadioGroupField, RadioGroupOption, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT, SegmentedControl, SelectField, SousChefProvider, Spinner, Stack, Text, TextAreaField, TextField, TimeField, Toggle, ToolbarSelect, Tooltip$1 as Tooltip, Underline, WeekField, toast };
9124
+ export { AsyncSelectField, Avatar, Badge$1 as Badge, Bold, BreadcrumbItem, Breadcrumbs, Button$1 as Button, Calendar, Card, CheckboxField, Chip, CircularProgress, CurrencyField, DataTable, DataTableCell, DataTableEditableCell, DataTableRow, DateField, DateFilter, DateRangeField, Form, FormFeedback, FormFooter, FormRow, FormSection, IconAnalytics, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowToTop, IconArrowTurnDownRight, IconArrowUp, IconAward, IconAwful, IconAwfulMonochromatic, IconBad, IconBadMonochromatic, IconBalanceScale, IconBalanceScaleLeft, IconBan, IconBarsH, IconBarsV, IconBell, IconBirthdayCake, IconBold, IconBolt, IconBook, IconBriefcase, IconBullseyeArrow, IconCalculator, IconCalendar, IconCalendarAlt, IconCalendarCheck, IconCalendarDay, IconCalendarExclamation, IconCalendarStar, IconCalendarTomorrow, IconCamera, IconCameraSlash, IconCashRegister, IconChartBar, IconCheck, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClipboardList, IconClock, IconCog, IconComment, IconCommentLines, IconCopy, IconCreditCard, IconCreditCardPlus, IconDecent, IconDecentMonochromatic, IconDownload, IconEdit, IconEllipsisV, IconEnvelope, IconExclaimation, IconExclaimationTriangle, IconExpand, IconExternalLink, IconEye, IconEyeSlash, IconFile, IconFilePdf, IconFlag, IconFourDotsCircle, IconFourSquares, IconGavel, IconGif, IconGift, IconGood, IconGoodMonochromatic, IconGreat, IconGreatMonochromatic, IconGrinBeam, IconGripVertical, IconHandshake, IconImage, IconInfoCircle, IconIslandTropical, IconItalic, IconLaptopSearch, IconLink, IconList, IconListOI as IconListOi, IconLock, IconMagicSolid, IconMapMarker, IconMegaphone, IconMessages, IconMinus, IconMinusCircle, IconMoneyBill, IconMugSaucerSolid, IconNotesMedical, IconOvertime, IconPaperPlane, IconPaperPlaneClock, IconPaperclip, IconPencil, IconPercentage, IconPhone, IconPlug, IconPlus, IconPrint, IconQuestionCircle, IconRepeat, IconReply, IconSearch, IconSignOut, IconSitemap, IconSlidersH, IconSort, IconStar, IconStarSolid, IconStickyNoteLines, IconStopwatch, IconStrikethrough, IconSync, IconSyncExclaimation, IconTachometer, IconTimes, IconTimesOctagon, IconTrash, IconUnderline, IconUndo, IconUniversity, IconUserComputer, IconUserFriends, IconUserLight, IconUserPlus, IconUserSearch, IconUserSlash, IconUserSolid, IconUserTag, IconUserTie, IconUsers, IconVideo, IconVolume, IconVolumeMute, IconWrench, Inline, InlineBanner, Italic, Link, Modal, ModalBody, ModalFooter, MultiSelectField, Page, PaginationControls, PasswordField, PercentageField, PersistentBanner, Pill, PillSelectField, ProgressBar, RadioGroupBoxOption, RadioGroupField, RadioGroupOption, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT, SegmentedControl, SelectField, SousChefProvider, Spinner, Stack, Text, TextAreaField, TextField, TimeField, Toggle, ToolbarSelect, Tooltip$1 as Tooltip, Underline, WeekField, toast };
9075
9125
  //# sourceMappingURL=index.modern.js.map