@7shifts/sous-chef 3.35.0-beta.1 → 3.35.0-beta.2
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { DataProps } from '../../foundation/types';
|
|
2
3
|
type Props = {
|
|
3
4
|
name: string;
|
|
4
5
|
/** If not provided it will generate a random id so the label links properly with the text input */
|
|
@@ -12,7 +13,7 @@ type Props = {
|
|
|
12
13
|
disabled?: boolean;
|
|
13
14
|
/** This is used for setting the data-testid */
|
|
14
15
|
testId?: string;
|
|
15
|
-
};
|
|
16
|
+
} & DataProps;
|
|
16
17
|
/** CheckboxField form element. */
|
|
17
18
|
declare const CheckboxField: React.FC<Props>;
|
|
18
19
|
export default CheckboxField;
|
package/dist/index.js
CHANGED
|
@@ -136,7 +136,61 @@ var usePositionStyles = function usePositionStyles(_ref) {
|
|
|
136
136
|
return positionStyles;
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
-
var
|
|
139
|
+
var capitalizeFirstLetter = function capitalizeFirstLetter(text) {
|
|
140
|
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
141
|
+
};
|
|
142
|
+
var kebabize = function kebabize(str) {
|
|
143
|
+
return str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, function ($, ofs) {
|
|
144
|
+
return (ofs ? '-' : '') + $.toLowerCase();
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
var _excluded = ["m", "margin", "mt", "marginTop", "mr", "marginRight", "mb", "marginBottom", "ml", "marginLeft"];
|
|
149
|
+
var getPositionProps = function getPositionProps(_ref) {
|
|
150
|
+
var m = _ref.m,
|
|
151
|
+
margin = _ref.margin,
|
|
152
|
+
mt = _ref.mt,
|
|
153
|
+
marginTop = _ref.marginTop,
|
|
154
|
+
mr = _ref.mr,
|
|
155
|
+
marginRight = _ref.marginRight,
|
|
156
|
+
mb = _ref.mb,
|
|
157
|
+
marginBottom = _ref.marginBottom,
|
|
158
|
+
ml = _ref.ml,
|
|
159
|
+
marginLeft = _ref.marginLeft,
|
|
160
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
161
|
+
return {
|
|
162
|
+
positionProps: {
|
|
163
|
+
m: m,
|
|
164
|
+
margin: margin,
|
|
165
|
+
mt: mt,
|
|
166
|
+
marginTop: marginTop,
|
|
167
|
+
mr: mr,
|
|
168
|
+
marginRight: marginRight,
|
|
169
|
+
mb: mb,
|
|
170
|
+
marginBottom: marginBottom,
|
|
171
|
+
ml: ml,
|
|
172
|
+
marginLeft: marginLeft
|
|
173
|
+
},
|
|
174
|
+
otherProps: otherProps
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
var getDataProps = function getDataProps(props) {
|
|
178
|
+
return Object.keys(props).reduce(function (acc, key) {
|
|
179
|
+
if (key.startsWith('data')) {
|
|
180
|
+
var _Object$assign;
|
|
181
|
+
acc.dataProps = Object.assign((_Object$assign = {}, _Object$assign[kebabize(key)] = props[key], _Object$assign), acc.dataProps);
|
|
182
|
+
} else {
|
|
183
|
+
var _Object$assign2;
|
|
184
|
+
acc.otherProps = Object.assign((_Object$assign2 = {}, _Object$assign2[key] = props[key], _Object$assign2), acc.otherProps);
|
|
185
|
+
}
|
|
186
|
+
return acc;
|
|
187
|
+
}, {
|
|
188
|
+
dataProps: {},
|
|
189
|
+
otherProps: {}
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
var _excluded$1 = ["children", "space", "flex", "alignItems", "justifyContent", "inlineFlex", "direction", "flexItems", "flexWrap", "flexGrow", "testId", "extraClass"];
|
|
140
194
|
var Flex = function Flex(_ref) {
|
|
141
195
|
var _classNames;
|
|
142
196
|
var children = _ref.children,
|
|
@@ -158,12 +212,17 @@ var Flex = function Flex(_ref) {
|
|
|
158
212
|
flexGrow = _ref.flexGrow,
|
|
159
213
|
testId = _ref.testId,
|
|
160
214
|
extraClass = _ref.extraClass,
|
|
161
|
-
|
|
215
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
216
|
+
var _getPositionProps = getPositionProps(rest),
|
|
217
|
+
positionProps = _getPositionProps.positionProps,
|
|
218
|
+
otherProps = _getPositionProps.otherProps;
|
|
219
|
+
var _getDataProps = getDataProps(otherProps),
|
|
220
|
+
dataProps = _getDataProps.dataProps;
|
|
162
221
|
var positionStyles = usePositionStyles(positionProps);
|
|
163
222
|
var className = classnames(styles['flex'], extraClass, (_classNames = {}, _classNames[styles['align-start']] = alignItems === 'flex-start', _classNames[styles['align-end']] = alignItems === 'flex-end', _classNames[styles['align-center']] = alignItems === 'center', _classNames[styles['justify-start']] = justifyContent === 'start', _classNames[styles['justify-end']] = justifyContent === 'end', _classNames[styles['justify-center']] = justifyContent === 'center', _classNames[styles['justify-space-between']] = justifyContent === 'space-between', _classNames[styles['inline-flex']] = inlineFlex, _classNames));
|
|
164
223
|
var items = React__default.Children.toArray(children).filter(Boolean);
|
|
165
224
|
var gap = typeof space === 'object' ? space.row + "px " + space.column + "px" : space;
|
|
166
|
-
return React__default.createElement("div", {
|
|
225
|
+
return React__default.createElement("div", _extends({
|
|
167
226
|
className: className,
|
|
168
227
|
style: _extends({
|
|
169
228
|
flexDirection: direction,
|
|
@@ -172,7 +231,7 @@ var Flex = function Flex(_ref) {
|
|
|
172
231
|
flexGrow: flexGrow
|
|
173
232
|
}, positionStyles),
|
|
174
233
|
"data-testid": testId
|
|
175
|
-
}, items.map(function (child, i) {
|
|
234
|
+
}, dataProps), items.map(function (child, i) {
|
|
176
235
|
var _classNames2;
|
|
177
236
|
return React__default.createElement("div", {
|
|
178
237
|
key: i,
|
|
@@ -184,11 +243,11 @@ var Flex = function Flex(_ref) {
|
|
|
184
243
|
}));
|
|
185
244
|
};
|
|
186
245
|
|
|
187
|
-
var _excluded$
|
|
246
|
+
var _excluded$2 = ["alignItems"];
|
|
188
247
|
var Stack = function Stack(_ref) {
|
|
189
248
|
var _ref$alignItems = _ref.alignItems,
|
|
190
249
|
alignItems = _ref$alignItems === void 0 ? 'stretch' : _ref$alignItems,
|
|
191
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
250
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
192
251
|
return React.createElement(Flex, _extends({}, props, {
|
|
193
252
|
alignItems: alignItems,
|
|
194
253
|
direction: "column"
|
|
@@ -197,60 +256,6 @@ var Stack = function Stack(_ref) {
|
|
|
197
256
|
|
|
198
257
|
var styles$1 = {"caption":"_3s_-x","label":"_29W-o","label--truncate":"_10hPY","toggle":"_3VC9U","toggle__label":"_LbMlH","toggle__caption":"_15FwS","toggle__switch":"_lHlzh"};
|
|
199
258
|
|
|
200
|
-
var capitalizeFirstLetter = function capitalizeFirstLetter(text) {
|
|
201
|
-
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
202
|
-
};
|
|
203
|
-
var kebabize = function kebabize(str) {
|
|
204
|
-
return str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, function ($, ofs) {
|
|
205
|
-
return (ofs ? '-' : '') + $.toLowerCase();
|
|
206
|
-
});
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
var _excluded$2 = ["m", "margin", "mt", "marginTop", "mr", "marginRight", "mb", "marginBottom", "ml", "marginLeft"];
|
|
210
|
-
var getPositionProps = function getPositionProps(_ref) {
|
|
211
|
-
var m = _ref.m,
|
|
212
|
-
margin = _ref.margin,
|
|
213
|
-
mt = _ref.mt,
|
|
214
|
-
marginTop = _ref.marginTop,
|
|
215
|
-
mr = _ref.mr,
|
|
216
|
-
marginRight = _ref.marginRight,
|
|
217
|
-
mb = _ref.mb,
|
|
218
|
-
marginBottom = _ref.marginBottom,
|
|
219
|
-
ml = _ref.ml,
|
|
220
|
-
marginLeft = _ref.marginLeft,
|
|
221
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
222
|
-
return {
|
|
223
|
-
positionProps: {
|
|
224
|
-
m: m,
|
|
225
|
-
margin: margin,
|
|
226
|
-
mt: mt,
|
|
227
|
-
marginTop: marginTop,
|
|
228
|
-
mr: mr,
|
|
229
|
-
marginRight: marginRight,
|
|
230
|
-
mb: mb,
|
|
231
|
-
marginBottom: marginBottom,
|
|
232
|
-
ml: ml,
|
|
233
|
-
marginLeft: marginLeft
|
|
234
|
-
},
|
|
235
|
-
otherProps: otherProps
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
|
-
var getDataProps = function getDataProps(props) {
|
|
239
|
-
return Object.keys(props).reduce(function (acc, key) {
|
|
240
|
-
if (key.startsWith('data')) {
|
|
241
|
-
var _Object$assign;
|
|
242
|
-
acc.dataProps = Object.assign((_Object$assign = {}, _Object$assign[kebabize(key)] = props[key], _Object$assign), acc.dataProps);
|
|
243
|
-
} else {
|
|
244
|
-
var _Object$assign2;
|
|
245
|
-
acc.otherProps = Object.assign((_Object$assign2 = {}, _Object$assign2[key] = props[key], _Object$assign2), acc.otherProps);
|
|
246
|
-
}
|
|
247
|
-
return acc;
|
|
248
|
-
}, {
|
|
249
|
-
dataProps: {},
|
|
250
|
-
otherProps: {}
|
|
251
|
-
});
|
|
252
|
-
};
|
|
253
|
-
|
|
254
259
|
var _excluded$3 = ["checked", "label", "caption", "onChange", "disabled", "id", "testId"];
|
|
255
260
|
var Toggle = function Toggle(_ref) {
|
|
256
261
|
var checked = _ref.checked,
|
|
@@ -6620,6 +6625,7 @@ var useCheckBoxFieldControllers = function useCheckBoxFieldControllers(_ref) {
|
|
|
6620
6625
|
|
|
6621
6626
|
var styles$H = {"check-box-field":"_2Rbk6","check-box-field__caption":"_1GW-E","check-box-field__custom-input":"_2W10t"};
|
|
6622
6627
|
|
|
6628
|
+
var _excluded$2u = ["name", "id", "checked", "onChange", "onBlur", "label", "caption", "error", "disabled", "testId"];
|
|
6623
6629
|
var CheckboxField = function CheckboxField(_ref) {
|
|
6624
6630
|
var name = _ref.name,
|
|
6625
6631
|
inputId = _ref.id,
|
|
@@ -6630,7 +6636,8 @@ var CheckboxField = function CheckboxField(_ref) {
|
|
|
6630
6636
|
caption = _ref.caption,
|
|
6631
6637
|
error = _ref.error,
|
|
6632
6638
|
disabled = _ref.disabled,
|
|
6633
|
-
testId = _ref.testId
|
|
6639
|
+
testId = _ref.testId,
|
|
6640
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2u);
|
|
6634
6641
|
var controllers = useCheckBoxFieldControllers({
|
|
6635
6642
|
name: name,
|
|
6636
6643
|
id: inputId,
|
|
@@ -6642,12 +6649,12 @@ var CheckboxField = function CheckboxField(_ref) {
|
|
|
6642
6649
|
var hasError = !!controllers.error;
|
|
6643
6650
|
return React__default.createElement(Stack, {
|
|
6644
6651
|
space: 8
|
|
6645
|
-
}, React__default.createElement(Flex, {
|
|
6652
|
+
}, React__default.createElement(Flex, _extends({
|
|
6646
6653
|
space: 8,
|
|
6647
6654
|
alignItems: "center",
|
|
6648
6655
|
flexItems: true,
|
|
6649
6656
|
flex: ['0 0 auto']
|
|
6650
|
-
}, React__default.createElement("div", {
|
|
6657
|
+
}, otherProps), React__default.createElement("div", {
|
|
6651
6658
|
className: styles$H['check-box-field']
|
|
6652
6659
|
}, React__default.createElement("input", {
|
|
6653
6660
|
name: name,
|
|
@@ -6699,7 +6706,7 @@ var useLocalStorage = function useLocalStorage(key, initialValue) {
|
|
|
6699
6706
|
|
|
6700
6707
|
var styles$I = {"hint-modal":"_1b47y","hint-modal--after-open":"_2MB4p","hint-modal--before-close":"_3VYQo","hint-modal__overlay":"_3Enme","hint-modal__image":"_2Nn7v","hint-modal__body":"_bzN9e","hint-modal__close-button":"_3xbis"};
|
|
6701
6708
|
|
|
6702
|
-
var _excluded$
|
|
6709
|
+
var _excluded$2v = ["header", "children", "mediaUrl", "onClose", "modalId", "primaryButton", "testId"];
|
|
6703
6710
|
var HintModal = function HintModal(_ref) {
|
|
6704
6711
|
var header = _ref.header,
|
|
6705
6712
|
children = _ref.children,
|
|
@@ -6708,7 +6715,7 @@ var HintModal = function HintModal(_ref) {
|
|
|
6708
6715
|
modalId = _ref.modalId,
|
|
6709
6716
|
primaryButton = _ref.primaryButton,
|
|
6710
6717
|
testId = _ref.testId,
|
|
6711
|
-
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6718
|
+
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2v);
|
|
6712
6719
|
var _useState = React.useState(false),
|
|
6713
6720
|
doNotShowAgain = _useState[0],
|
|
6714
6721
|
setDoNotShowAgain = _useState[1];
|
|
@@ -6932,7 +6939,7 @@ var DataTableEditableCellElement = function DataTableEditableCellElement(_ref, r
|
|
|
6932
6939
|
};
|
|
6933
6940
|
var DataTableEditableCell = React.forwardRef(DataTableEditableCellElement);
|
|
6934
6941
|
|
|
6935
|
-
var _excluded$
|
|
6942
|
+
var _excluded$2w = ["children", "onClick", "isSelected", "actions", "hasDefaultPadding", "hasDefaultCell", "testId"];
|
|
6936
6943
|
var DataTableRowComponent = function DataTableRowComponent(_ref, ref) {
|
|
6937
6944
|
var _classnames;
|
|
6938
6945
|
var children = _ref.children,
|
|
@@ -6944,7 +6951,7 @@ var DataTableRowComponent = function DataTableRowComponent(_ref, ref) {
|
|
|
6944
6951
|
_ref$hasDefaultCell = _ref.hasDefaultCell,
|
|
6945
6952
|
hasDefaultCell = _ref$hasDefaultCell === void 0 ? true : _ref$hasDefaultCell,
|
|
6946
6953
|
testId = _ref.testId,
|
|
6947
|
-
nativeDivProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6954
|
+
nativeDivProps = _objectWithoutPropertiesLoose(_ref, _excluded$2w);
|
|
6948
6955
|
var _useDataTableContext = useDataTableContext(),
|
|
6949
6956
|
showActionMenu = _useDataTableContext.showActionMenu;
|
|
6950
6957
|
var styleNames = classnames(styles$z['item'], (_classnames = {}, _classnames[styles$z['clickable']] = onClick, _classnames[styles$z['selected']] = isSelected, _classnames));
|
|
@@ -7356,11 +7363,11 @@ var isReactSelectElement = function isReactSelectElement(element) {
|
|
|
7356
7363
|
|
|
7357
7364
|
var styles$M = {"custom-control":"_1JTKu"};
|
|
7358
7365
|
|
|
7359
|
-
var _excluded$
|
|
7366
|
+
var _excluded$2x = ["children"];
|
|
7360
7367
|
function CustomControl(_ref) {
|
|
7361
7368
|
var _props$getValue;
|
|
7362
7369
|
var children = _ref.children,
|
|
7363
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7370
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2x);
|
|
7364
7371
|
var SelectedOptionPrefix = props.selectProps.componentsProps.SelectedOptionPrefix;
|
|
7365
7372
|
var selectedOption = (_props$getValue = props.getValue()) === null || _props$getValue === void 0 ? void 0 : _props$getValue[0];
|
|
7366
7373
|
return React__default.createElement(Select.components.Control, _extends({}, props), SelectedOptionPrefix && selectedOption ? React__default.createElement("div", {
|
|
@@ -7377,10 +7384,10 @@ function CustomControl(_ref) {
|
|
|
7377
7384
|
}, props)), children)) : children);
|
|
7378
7385
|
}
|
|
7379
7386
|
|
|
7380
|
-
var _excluded$
|
|
7387
|
+
var _excluded$2y = ["children"];
|
|
7381
7388
|
function CustomOption(_ref) {
|
|
7382
7389
|
var children = _ref.children,
|
|
7383
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7390
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2y);
|
|
7384
7391
|
var UserCustomOption = props.selectProps.componentsProps.UserCustomOption;
|
|
7385
7392
|
return React__default.createElement(Select.components.Option, _extends({}, props), React__default.createElement(UserCustomOption, _extends({}, props), children));
|
|
7386
7393
|
}
|
|
@@ -7534,10 +7541,10 @@ var CustomContainer = function CustomContainer(props) {
|
|
|
7534
7541
|
|
|
7535
7542
|
var styles$N = {"custom-menu-text-field":"_2bu6-","custom-menu-hr":"_1cgU7","custom-menu-div":"_1khlU"};
|
|
7536
7543
|
|
|
7537
|
-
var _excluded$
|
|
7544
|
+
var _excluded$2z = ["children"];
|
|
7538
7545
|
function CustomMenu(_ref) {
|
|
7539
7546
|
var children = _ref.children,
|
|
7540
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7547
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2z);
|
|
7541
7548
|
var _props$selectProps$co = props.selectProps.componentsProps,
|
|
7542
7549
|
creatableButton = _props$selectProps$co.creatableButton,
|
|
7543
7550
|
onMenuInputFocus = _props$selectProps$co.onMenuInputFocus,
|
|
@@ -8256,11 +8263,11 @@ var TextAreaField = function TextAreaField(_ref) {
|
|
|
8256
8263
|
}, toolbar)));
|
|
8257
8264
|
};
|
|
8258
8265
|
|
|
8259
|
-
var _excluded$
|
|
8266
|
+
var _excluded$2A = ["prefix", "suffix"];
|
|
8260
8267
|
var TextFieldElement = function TextFieldElement(_ref, ref) {
|
|
8261
8268
|
var prefix = _ref.prefix,
|
|
8262
8269
|
suffix = _ref.suffix,
|
|
8263
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8270
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2A);
|
|
8264
8271
|
var _useTextField = useTextField(_extends({}, props, {
|
|
8265
8272
|
ref: ref
|
|
8266
8273
|
})),
|
|
@@ -8848,12 +8855,12 @@ var MultiSelectField = function MultiSelectField(_ref) {
|
|
|
8848
8855
|
|
|
8849
8856
|
var styles$11 = {"custom-list":"_12jq3"};
|
|
8850
8857
|
|
|
8851
|
-
var _excluded$
|
|
8858
|
+
var _excluded$2B = ["children", "hasMoreOptions", "hasMoreOptionsFirstLoad"];
|
|
8852
8859
|
var CustomList = function CustomList(_ref) {
|
|
8853
8860
|
var children = _ref.children,
|
|
8854
8861
|
hasMoreOptions = _ref.hasMoreOptions,
|
|
8855
8862
|
hasMoreOptionsFirstLoad = _ref.hasMoreOptionsFirstLoad,
|
|
8856
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8863
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2B);
|
|
8857
8864
|
var showFooter = hasMoreOptions;
|
|
8858
8865
|
if (props.selectProps.inputValue === '' && typeof hasMoreOptionsFirstLoad === 'boolean') {
|
|
8859
8866
|
showFooter = hasMoreOptionsFirstLoad;
|
|
@@ -8865,10 +8872,10 @@ var CustomList = function CustomList(_ref) {
|
|
|
8865
8872
|
}, getLocalizedString('main.START_TYPING_TO_SEE_MORE_OPTIONS')))));
|
|
8866
8873
|
};
|
|
8867
8874
|
|
|
8868
|
-
var _excluded$
|
|
8875
|
+
var _excluded$2C = ["loadOptions"];
|
|
8869
8876
|
var AsyncSelectField = function AsyncSelectField(_ref) {
|
|
8870
8877
|
var loadOptions = _ref.loadOptions,
|
|
8871
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8878
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2C);
|
|
8872
8879
|
var _useState = React.useState(false),
|
|
8873
8880
|
hasMoreOptions = _useState[0],
|
|
8874
8881
|
setHasMoreOptions = _useState[1];
|
|
@@ -9678,7 +9685,7 @@ var TimeFieldDropdown = function TimeFieldDropdown(_ref) {
|
|
|
9678
9685
|
})));
|
|
9679
9686
|
};
|
|
9680
9687
|
|
|
9681
|
-
var _excluded$
|
|
9688
|
+
var _excluded$2D = ["interval", "startTime", "prefix", "endField", "duration"];
|
|
9682
9689
|
var TimeFieldElement = function TimeFieldElement(_ref, forwardedRef) {
|
|
9683
9690
|
var _ref$interval = _ref.interval,
|
|
9684
9691
|
interval = _ref$interval === void 0 ? 15 : _ref$interval,
|
|
@@ -9687,7 +9694,7 @@ var TimeFieldElement = function TimeFieldElement(_ref, forwardedRef) {
|
|
|
9687
9694
|
_ref$endField = _ref.endField,
|
|
9688
9695
|
endField = _ref$endField === void 0 ? false : _ref$endField,
|
|
9689
9696
|
duration = _ref.duration,
|
|
9690
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9697
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2D);
|
|
9691
9698
|
var internalRef = React.useRef(null);
|
|
9692
9699
|
var ref = forwardedRef || internalRef;
|
|
9693
9700
|
var _useState = React.useState(allOtherProps.defaultValue),
|
|
@@ -9871,13 +9878,13 @@ var styles$14 = {"currency-field__mask-display":"_2K8Ob"};
|
|
|
9871
9878
|
var CURRENCY_DISPLAY_DEFAULT_MARGIN = 8;
|
|
9872
9879
|
var CURRENCY_DISPLAY_MARGIN_BUFFER = 1;
|
|
9873
9880
|
|
|
9874
|
-
var _excluded$
|
|
9881
|
+
var _excluded$2E = ["currencySymbol", "step"];
|
|
9875
9882
|
var CurrencyFieldElement = function CurrencyFieldElement(_ref, forwardedRef) {
|
|
9876
9883
|
var _ref$currencySymbol = _ref.currencySymbol,
|
|
9877
9884
|
currencySymbol = _ref$currencySymbol === void 0 ? '$' : _ref$currencySymbol,
|
|
9878
9885
|
_ref$step = _ref.step,
|
|
9879
9886
|
step = _ref$step === void 0 ? 0.01 : _ref$step,
|
|
9880
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9887
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2E);
|
|
9881
9888
|
var _useState = React.useState(CURRENCY_DISPLAY_DEFAULT_MARGIN),
|
|
9882
9889
|
displayPadding = _useState[0],
|
|
9883
9890
|
setDisplayPadding = _useState[1];
|
|
@@ -9941,7 +9948,7 @@ var CurrencyFieldElement = function CurrencyFieldElement(_ref, forwardedRef) {
|
|
|
9941
9948
|
};
|
|
9942
9949
|
var CurrencyField = React.forwardRef(CurrencyFieldElement);
|
|
9943
9950
|
|
|
9944
|
-
var _excluded$
|
|
9951
|
+
var _excluded$2F = ["max", "min", "precision", "stepSize", "prefix"];
|
|
9945
9952
|
var PercentageElement = function PercentageElement(_ref, ref) {
|
|
9946
9953
|
var _ref$max = _ref.max,
|
|
9947
9954
|
max = _ref$max === void 0 ? 100 : _ref$max,
|
|
@@ -9952,7 +9959,7 @@ var PercentageElement = function PercentageElement(_ref, ref) {
|
|
|
9952
9959
|
_ref$stepSize = _ref.stepSize,
|
|
9953
9960
|
stepSize = _ref$stepSize === void 0 ? 1 : _ref$stepSize,
|
|
9954
9961
|
prefix = _ref.prefix,
|
|
9955
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9962
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2F);
|
|
9956
9963
|
var _useTextField = useTextField(_extends({}, allOtherProps, {
|
|
9957
9964
|
ref: ref
|
|
9958
9965
|
})),
|
|
@@ -10931,12 +10938,12 @@ var CountrySelector = function CountrySelector(_ref) {
|
|
|
10931
10938
|
}))));
|
|
10932
10939
|
};
|
|
10933
10940
|
|
|
10934
|
-
var _excluded$
|
|
10941
|
+
var _excluded$2G = ["disabledCountry"];
|
|
10935
10942
|
var PhoneField = function PhoneField(_ref) {
|
|
10936
10943
|
var _classNames;
|
|
10937
10944
|
var _ref$disabledCountry = _ref.disabledCountry,
|
|
10938
10945
|
disabledCountry = _ref$disabledCountry === void 0 ? false : _ref$disabledCountry,
|
|
10939
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10946
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2G);
|
|
10940
10947
|
var inputRef = React.useRef(null);
|
|
10941
10948
|
var _usePhoneField = usePhoneField(_extends({}, props, {
|
|
10942
10949
|
ref: inputRef
|
|
@@ -11021,14 +11028,14 @@ var PhoneField = function PhoneField(_ref) {
|
|
|
11021
11028
|
|
|
11022
11029
|
var styles$17 = {"badge":"_1QLaK","badge--warning":"_qsFWw","badge--danger":"_359Cc","badge--success":"_2AOEK","badge--info":"_1mLjf"};
|
|
11023
11030
|
|
|
11024
|
-
var _excluded$
|
|
11031
|
+
var _excluded$2H = ["children", "theme", "title", "testId"];
|
|
11025
11032
|
var Badge = function Badge(_ref, forwardedRef) {
|
|
11026
11033
|
var _classnames;
|
|
11027
11034
|
var children = _ref.children,
|
|
11028
11035
|
theme = _ref.theme,
|
|
11029
11036
|
title = _ref.title,
|
|
11030
11037
|
testId = _ref.testId,
|
|
11031
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
11038
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2H);
|
|
11032
11039
|
var internalRef = React.useRef(null);
|
|
11033
11040
|
var ref = forwardedRef || internalRef;
|
|
11034
11041
|
React.useLayoutEffect(function () {
|