@7shifts/sous-chef 2.3.2 → 2.3.6
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/controls/ToolbarSelect/index.d.ts +1 -0
- package/dist/controls/index.d.ts +2 -0
- package/dist/core/DataTable/DataTable.d.ts +1 -1
- package/dist/core/DataTable/DataTableContext.d.ts +1 -1
- package/dist/forms/Form/types.d.ts +3 -18
- package/dist/icons/components/IconGif.d.ts +11 -0
- package/dist/icons/components/IconStarSolid.d.ts +11 -0
- package/dist/icons/components/index.d.ts +2 -0
- package/dist/index.css +30 -8
- package/dist/index.d.ts +1 -0
- package/dist/index.js +259 -97
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +257 -98
- package/dist/index.modern.js.map +1 -1
- package/dist/overlay/Tooltip/Tooltip.d.ts +1 -0
- package/dist/utils/formik.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -393,7 +393,9 @@ var TooltipOverlay = function TooltipOverlay(_ref) {
|
|
|
393
393
|
}, []);
|
|
394
394
|
var tooltipRectPosition = tooltipRef === null || tooltipRef === void 0 ? void 0 : (_tooltipRef$current = tooltipRef.current) === null || _tooltipRef$current === void 0 ? void 0 : _tooltipRef$current.getBoundingClientRect();
|
|
395
395
|
var position = calculatePosition(placement, anchorPosition, tooltipRectPosition);
|
|
396
|
-
return React__default.createElement(Portal, null, React__default.createElement("div",
|
|
396
|
+
return React__default.createElement(Portal, null, React__default.createElement("div", {
|
|
397
|
+
role: "tooltip"
|
|
398
|
+
}, React__default.createElement("div", {
|
|
397
399
|
ref: tooltipRef,
|
|
398
400
|
style: _extends({}, position.overlay, {
|
|
399
401
|
zIndex: Z_INDEX_LAYERS.TOOLTIP
|
|
@@ -429,6 +431,7 @@ var Tooltip = function Tooltip(_ref, forwardedRef) {
|
|
|
429
431
|
header = _ref.header,
|
|
430
432
|
extraClass = _ref.extraClass,
|
|
431
433
|
onClose = _ref.onClose,
|
|
434
|
+
onVisibleChange = _ref.onVisibleChange,
|
|
432
435
|
children = _ref.children;
|
|
433
436
|
var checkIsMounted = useIsMounted();
|
|
434
437
|
var internalRef = React.useRef(null);
|
|
@@ -440,6 +443,11 @@ var Tooltip = function Tooltip(_ref, forwardedRef) {
|
|
|
440
443
|
|
|
441
444
|
var isFocusingOnTooltip = React.useRef(false);
|
|
442
445
|
var isFocusingOnAnchor = React.useRef(false);
|
|
446
|
+
React.useEffect(function () {
|
|
447
|
+
if (isVisible && !header && !overlay) {
|
|
448
|
+
setIsVisible(false);
|
|
449
|
+
}
|
|
450
|
+
}, [isVisible, header, overlay]);
|
|
443
451
|
|
|
444
452
|
var updateOverlayVisibility = function updateOverlayVisibility(shouldShow) {
|
|
445
453
|
setIsVisible(shouldShow);
|
|
@@ -447,6 +455,10 @@ var Tooltip = function Tooltip(_ref, forwardedRef) {
|
|
|
447
455
|
if (!shouldShow) {
|
|
448
456
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
449
457
|
}
|
|
458
|
+
|
|
459
|
+
if (onVisibleChange) {
|
|
460
|
+
onVisibleChange(shouldShow);
|
|
461
|
+
}
|
|
450
462
|
};
|
|
451
463
|
|
|
452
464
|
var onAnchorFocusIn = function onAnchorFocusIn() {
|
|
@@ -1801,6 +1813,25 @@ var IconGavel = function IconGavel(props) {
|
|
|
1801
1813
|
|
|
1802
1814
|
IconGavel.displayName = 'IconGavel';
|
|
1803
1815
|
|
|
1816
|
+
var IconGif = function IconGif(props) {
|
|
1817
|
+
return React__default.createElement("svg", Object.assign({
|
|
1818
|
+
viewBox: "0 0 20 20",
|
|
1819
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1820
|
+
"data-testid": "icon-gif",
|
|
1821
|
+
style: getIconStyles(props)
|
|
1822
|
+
}, props), React__default.createElement("path", {
|
|
1823
|
+
d: "M18.096 2.85H1.906c-.79 0-1.43.64-1.43 1.429v11.428c0 .79.64 1.429 1.43 1.429h16.19c.789 0 1.428-.64 1.428-1.429V4.28c0-.79-.64-1.429-1.428-1.429Z",
|
|
1824
|
+
stroke: "currentColor",
|
|
1825
|
+
strokeWidth: 0.952,
|
|
1826
|
+
fill: "none"
|
|
1827
|
+
}), React__default.createElement("path", {
|
|
1828
|
+
d: "M7.124 12.541c.876 0 1.592-.373 2.087-.93V9.715H6.804v.785h1.524v.785c-.23.22-.686.457-1.204.457-1.006 0-1.753-.777-1.753-1.836 0-1.074.747-1.836 1.753-1.836a1.64 1.64 0 0 1 1.318.678l.724-.42c-.404-.578-1.052-1.05-2.042-1.05-1.478 0-2.667 1.028-2.667 2.628 0 1.592 1.189 2.636 2.667 2.636Zm3.907-.099V7.36h-.892v5.082h.892Zm1.971 0V10.24h2.538v-.785h-2.538v-1.31h2.59V7.36h-3.481v5.082h.891Z",
|
|
1829
|
+
fill: "currentColor"
|
|
1830
|
+
}));
|
|
1831
|
+
};
|
|
1832
|
+
|
|
1833
|
+
IconGif.displayName = 'IconGif';
|
|
1834
|
+
|
|
1804
1835
|
var IconGift = function IconGift(props) {
|
|
1805
1836
|
return React__default.createElement("svg", Object.assign({
|
|
1806
1837
|
viewBox: "0 0 20 20",
|
|
@@ -2462,6 +2493,21 @@ var IconSort = function IconSort(props) {
|
|
|
2462
2493
|
|
|
2463
2494
|
IconSort.displayName = 'IconSort';
|
|
2464
2495
|
|
|
2496
|
+
var IconStarSolid = function IconStarSolid(props) {
|
|
2497
|
+
return React__default.createElement("svg", Object.assign({
|
|
2498
|
+
viewBox: "0 0 20 20",
|
|
2499
|
+
fill: "none",
|
|
2500
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2501
|
+
"data-testid": "icon-star-solid",
|
|
2502
|
+
style: getIconStyles(props)
|
|
2503
|
+
}, props), React__default.createElement("path", {
|
|
2504
|
+
d: "M8.944 1.591 6.602 6.34l-5.239.763C.423 7.24.047 8.398.73 9.06l3.79 3.694-.897 5.217c-.16.943.832 1.65 1.664 1.209l4.687-2.464 4.686 2.463c.832.438 1.826-.265 1.664-1.208l-.896-5.217 3.79-3.694c.681-.663.305-1.821-.635-1.958l-5.239-.763-2.341-4.748c-.42-.846-1.635-.857-2.058 0Z",
|
|
2505
|
+
fill: "currentColor"
|
|
2506
|
+
}));
|
|
2507
|
+
};
|
|
2508
|
+
|
|
2509
|
+
IconStarSolid.displayName = 'IconStarSolid';
|
|
2510
|
+
|
|
2465
2511
|
var IconStar = function IconStar(props) {
|
|
2466
2512
|
return React__default.createElement("svg", Object.assign({
|
|
2467
2513
|
viewBox: "0 0 20 20",
|
|
@@ -2861,7 +2907,7 @@ var IconWrench = function IconWrench(props) {
|
|
|
2861
2907
|
|
|
2862
2908
|
IconWrench.displayName = 'IconWrench';
|
|
2863
2909
|
|
|
2864
|
-
var styles$6 = {"item":"_3DlpO","
|
|
2910
|
+
var styles$6 = {"item":"_3DlpO","selected":"_NS-B9","clickable":"_2jPpF","item-column":"_3ENNn","actions":"_1FTaE"};
|
|
2865
2911
|
|
|
2866
2912
|
var ResourceTableRow = function ResourceTableRow(_ref) {
|
|
2867
2913
|
var _classnames;
|
|
@@ -3178,7 +3224,7 @@ var useDataTableContext = function useDataTableContext() {
|
|
|
3178
3224
|
return context;
|
|
3179
3225
|
};
|
|
3180
3226
|
|
|
3181
|
-
var styles$9 = {"item":"_1d8Ci","
|
|
3227
|
+
var styles$9 = {"item":"_1d8Ci","selected":"_3tb7U","clickable":"_thFcO","item-column":"_OTcMc","item-column--default-padding":"_lNHQ8","item-column--right-align":"_13YLe","item-column--vertical-border":"_1rrRr","actions":"_azbIG"};
|
|
3182
3228
|
|
|
3183
3229
|
var DataTableRow = function DataTableRow(_ref) {
|
|
3184
3230
|
var _classnames;
|
|
@@ -3366,7 +3412,7 @@ var DataTable = function DataTable(_ref) {
|
|
|
3366
3412
|
numberOfRows: numberOfRows,
|
|
3367
3413
|
hasVerticalBorders: hasVerticalBorders
|
|
3368
3414
|
}
|
|
3369
|
-
}, React__default.createElement("div", null, React__default.createElement(DataTableHeader, {
|
|
3415
|
+
}, React__default.createElement("div", null, columns && React__default.createElement(DataTableHeader, {
|
|
3370
3416
|
columns: columns,
|
|
3371
3417
|
onSort: onSort,
|
|
3372
3418
|
showActionMenu: showActionMenu
|
|
@@ -3426,7 +3472,7 @@ var DataTableCell = function DataTableCell(_ref) {
|
|
|
3426
3472
|
var _useDataTableContext = useDataTableContext(),
|
|
3427
3473
|
columns = _useDataTableContext.columns;
|
|
3428
3474
|
|
|
3429
|
-
var column = (_columns$columnIndex = columns[columnIndex]) != null ? _columns$columnIndex : null;
|
|
3475
|
+
var column = (_columns$columnIndex = columns === null || columns === void 0 ? void 0 : columns[columnIndex]) != null ? _columns$columnIndex : null;
|
|
3430
3476
|
var isRightAligned = column ? column.isRightAligned : false;
|
|
3431
3477
|
return React__default.createElement("div", {
|
|
3432
3478
|
className: classnames((_classnames = {}, _classnames[styles$b['data-table-cell--right-aligned']] = isRightAligned, _classnames), styles$b['data-table-cell'])
|
|
@@ -3453,49 +3499,33 @@ var getFormikState = function getFormikState(name, formik) {
|
|
|
3453
3499
|
return null;
|
|
3454
3500
|
}
|
|
3455
3501
|
|
|
3456
|
-
|
|
3457
|
-
return {
|
|
3458
|
-
error: formik.touched[name] ? formik.errors[name] : undefined,
|
|
3459
|
-
value: formik.values[name]
|
|
3460
|
-
};
|
|
3461
|
-
}
|
|
3502
|
+
var formikPath = getFormikArrayPath(name);
|
|
3462
3503
|
|
|
3463
|
-
|
|
3504
|
+
if (formikPath.length === 0) {
|
|
3505
|
+
return null;
|
|
3506
|
+
}
|
|
3464
3507
|
|
|
3465
|
-
|
|
3466
|
-
var
|
|
3508
|
+
var formikLatestLevel = formikPath.reduce(function (acc, path) {
|
|
3509
|
+
var _acc$touched, _acc$error, _acc$value;
|
|
3467
3510
|
|
|
3468
|
-
var arrayName = formikArray.arrayName,
|
|
3469
|
-
itemIndex = formikArray.itemIndex,
|
|
3470
|
-
fieldName = formikArray.fieldName;
|
|
3471
3511
|
return {
|
|
3472
|
-
|
|
3473
|
-
|
|
3512
|
+
touched: (_acc$touched = acc.touched) === null || _acc$touched === void 0 ? void 0 : _acc$touched[path],
|
|
3513
|
+
error: (_acc$error = acc.error) === null || _acc$error === void 0 ? void 0 : _acc$error[path],
|
|
3514
|
+
value: (_acc$value = acc.value) === null || _acc$value === void 0 ? void 0 : _acc$value[path]
|
|
3474
3515
|
};
|
|
3475
|
-
}
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
var getFormikArrayPath = function getFormikArrayPath(name) {
|
|
3481
|
-
if (!name.includes('[')) {
|
|
3482
|
-
return false;
|
|
3483
|
-
}
|
|
3484
|
-
|
|
3485
|
-
var _name$split = name.split('['),
|
|
3486
|
-
arrayName = _name$split[0],
|
|
3487
|
-
missingSplit = _name$split[1];
|
|
3488
|
-
|
|
3489
|
-
var _missingSplit$split = missingSplit.split('].'),
|
|
3490
|
-
itemIndex = _missingSplit$split[0],
|
|
3491
|
-
fieldName = _missingSplit$split[1];
|
|
3492
|
-
|
|
3516
|
+
}, {
|
|
3517
|
+
touched: formik.touched,
|
|
3518
|
+
error: formik.errors,
|
|
3519
|
+
value: formik.values
|
|
3520
|
+
});
|
|
3493
3521
|
return {
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
fieldName: fieldName
|
|
3522
|
+
error: formikLatestLevel.touched ? formikLatestLevel.error : undefined,
|
|
3523
|
+
value: formikLatestLevel.value
|
|
3497
3524
|
};
|
|
3498
3525
|
};
|
|
3526
|
+
var getFormikArrayPath = function getFormikArrayPath(name) {
|
|
3527
|
+
return name.split(/[^a-zA-Z0-9]/).filter(Boolean);
|
|
3528
|
+
};
|
|
3499
3529
|
|
|
3500
3530
|
var useFieldControllers = function useFieldControllers(_ref) {
|
|
3501
3531
|
var name = _ref.name,
|
|
@@ -3695,9 +3725,9 @@ var DataTableEditableCell = function DataTableEditableCell(_ref) {
|
|
|
3695
3725
|
columns = _useDataTableContext.columns,
|
|
3696
3726
|
numberOfRows = _useDataTableContext.numberOfRows;
|
|
3697
3727
|
|
|
3698
|
-
var column = (_columns$columnIndex = columns[columnIndex]) != null ? _columns$columnIndex : null;
|
|
3728
|
+
var column = (_columns$columnIndex = columns === null || columns === void 0 ? void 0 : columns[columnIndex]) != null ? _columns$columnIndex : null;
|
|
3699
3729
|
var isRightAligned = column ? column.isRightAligned : false;
|
|
3700
|
-
var numberOfColumns = columns === null || columns === void 0 ? void 0 : columns.length;
|
|
3730
|
+
var numberOfColumns = (columns === null || columns === void 0 ? void 0 : columns.length) || 0;
|
|
3701
3731
|
var isTopLeftCell = columnIndex === 0 && rowIndex === 0;
|
|
3702
3732
|
var isTopRightCell = columnIndex === numberOfColumns - 1 && rowIndex === 0;
|
|
3703
3733
|
var isBottomLeftCell = columnIndex === 0 && rowIndex === numberOfRows - 1;
|
|
@@ -3739,6 +3769,187 @@ var DataTableEditableCell = function DataTableEditableCell(_ref) {
|
|
|
3739
3769
|
}))));
|
|
3740
3770
|
};
|
|
3741
3771
|
|
|
3772
|
+
var useSelectFieldControllers = function useSelectFieldControllers(_ref) {
|
|
3773
|
+
var name = _ref.name,
|
|
3774
|
+
inputId = _ref.id,
|
|
3775
|
+
value = _ref.value,
|
|
3776
|
+
_onChange = _ref.onChange,
|
|
3777
|
+
_onBlur = _ref.onBlur,
|
|
3778
|
+
error = _ref.error;
|
|
3779
|
+
|
|
3780
|
+
var _useFormContext = useFormContext(),
|
|
3781
|
+
formik = _useFormContext.formik;
|
|
3782
|
+
|
|
3783
|
+
var id = useFieldId({
|
|
3784
|
+
name: name,
|
|
3785
|
+
id: inputId
|
|
3786
|
+
});
|
|
3787
|
+
var controllers = {
|
|
3788
|
+
id: id,
|
|
3789
|
+
error: error,
|
|
3790
|
+
value: value,
|
|
3791
|
+
onChange: function onChange(option) {
|
|
3792
|
+
return _onChange && _onChange(option);
|
|
3793
|
+
},
|
|
3794
|
+
onBlur: function onBlur(option) {
|
|
3795
|
+
return _onBlur && _onBlur(option);
|
|
3796
|
+
}
|
|
3797
|
+
};
|
|
3798
|
+
var formikState = getFormikState(name, formik);
|
|
3799
|
+
|
|
3800
|
+
if (formik && formikState) {
|
|
3801
|
+
controllers = _extends({}, controllers, {
|
|
3802
|
+
error: error ? controllers.error : formikState.error,
|
|
3803
|
+
value: value ? controllers.value : formikState.value,
|
|
3804
|
+
onChange: function onChange(option) {
|
|
3805
|
+
if (_onChange) {
|
|
3806
|
+
_onChange(option);
|
|
3807
|
+
}
|
|
3808
|
+
|
|
3809
|
+
formik.setFieldValue(name, option);
|
|
3810
|
+
},
|
|
3811
|
+
onBlur: function onBlur(option) {
|
|
3812
|
+
if (_onBlur) {
|
|
3813
|
+
_onBlur(option);
|
|
3814
|
+
}
|
|
3815
|
+
|
|
3816
|
+
formik.setFieldTouched(name);
|
|
3817
|
+
}
|
|
3818
|
+
});
|
|
3819
|
+
}
|
|
3820
|
+
|
|
3821
|
+
return controllers;
|
|
3822
|
+
};
|
|
3823
|
+
|
|
3824
|
+
var getSelectStyles = function getSelectStyles(_ref) {
|
|
3825
|
+
var _ref$wrapToNextLine = _ref.wrapToNextLine,
|
|
3826
|
+
wrapToNextLine = _ref$wrapToNextLine === void 0 ? false : _ref$wrapToNextLine;
|
|
3827
|
+
return {
|
|
3828
|
+
valueContainer: function valueContainer(base) {
|
|
3829
|
+
return Object.assign({}, base, {
|
|
3830
|
+
flexWrap: wrapToNextLine ? 'wrap' : 'nowrap'
|
|
3831
|
+
});
|
|
3832
|
+
},
|
|
3833
|
+
container: function container(base, state) {
|
|
3834
|
+
return Object.assign({}, base, {
|
|
3835
|
+
flex: '1',
|
|
3836
|
+
fontFamily: FONT_FAMILY,
|
|
3837
|
+
minWidth: '64px',
|
|
3838
|
+
background: state.isDisabled ? GREY100 : WHITE,
|
|
3839
|
+
':hover': {
|
|
3840
|
+
backgroundColor: GREY100
|
|
3841
|
+
},
|
|
3842
|
+
position: 'initial'
|
|
3843
|
+
});
|
|
3844
|
+
},
|
|
3845
|
+
control: function control(base, state) {
|
|
3846
|
+
return Object.assign({}, base, {
|
|
3847
|
+
color: state.isDisabled ? GREY400 : GREY500,
|
|
3848
|
+
boxShadow: 'none',
|
|
3849
|
+
fontSize: '14px',
|
|
3850
|
+
cursor: 'pointer',
|
|
3851
|
+
background: 'none',
|
|
3852
|
+
outline: '1px solid',
|
|
3853
|
+
outlineColor: GREY300,
|
|
3854
|
+
borderRadius: '4px',
|
|
3855
|
+
border: 'none'
|
|
3856
|
+
});
|
|
3857
|
+
},
|
|
3858
|
+
indicatorSeparator: function indicatorSeparator() {
|
|
3859
|
+
return {
|
|
3860
|
+
display: 'none'
|
|
3861
|
+
};
|
|
3862
|
+
},
|
|
3863
|
+
placeholder: function placeholder(base, state) {
|
|
3864
|
+
return _extends({}, base, {
|
|
3865
|
+
color: state.isDisabled ? GREY300 : GREY400,
|
|
3866
|
+
marginRight: 0,
|
|
3867
|
+
position: 'static',
|
|
3868
|
+
transform: 'initial',
|
|
3869
|
+
overflow: 'hidden',
|
|
3870
|
+
textOverflow: 'ellipsis',
|
|
3871
|
+
whiteSpace: 'nowrap'
|
|
3872
|
+
});
|
|
3873
|
+
},
|
|
3874
|
+
singleValue: function singleValue(base, state) {
|
|
3875
|
+
return Object.assign({}, base, {
|
|
3876
|
+
color: state.isDisabled ? GREY400 : null,
|
|
3877
|
+
marginRight: 0,
|
|
3878
|
+
position: 'static',
|
|
3879
|
+
transform: 'initial',
|
|
3880
|
+
overflow: 'hidden',
|
|
3881
|
+
textOverflow: 'ellipsis',
|
|
3882
|
+
whiteSpace: 'nowrap'
|
|
3883
|
+
});
|
|
3884
|
+
},
|
|
3885
|
+
dropdownIndicator: function dropdownIndicator(base) {
|
|
3886
|
+
return Object.assign({}, base, {
|
|
3887
|
+
color: GREY400,
|
|
3888
|
+
padding: '8px'
|
|
3889
|
+
});
|
|
3890
|
+
},
|
|
3891
|
+
option: function option(base, state) {
|
|
3892
|
+
return Object.assign({}, base, {
|
|
3893
|
+
backgroundColor: state.isDisabled ? null : state.isSelected ? EGGPLANT200 : state.isFocused ? GREY100 : WHITE,
|
|
3894
|
+
color: state.isDisabled ? GREY400 : GREY500,
|
|
3895
|
+
cursor: state.isDisabled ? 'default' : 'pointer',
|
|
3896
|
+
fontFamily: FONT_FAMILY,
|
|
3897
|
+
fontSize: '14px'
|
|
3898
|
+
});
|
|
3899
|
+
},
|
|
3900
|
+
group: function group(base) {
|
|
3901
|
+
return Object.assign({}, base, {
|
|
3902
|
+
fontFamily: FONT_FAMILY
|
|
3903
|
+
});
|
|
3904
|
+
},
|
|
3905
|
+
menu: function menu(base) {
|
|
3906
|
+
return _extends({}, base, {
|
|
3907
|
+
zIndex: Z_INDEX_LAYERS.MENU,
|
|
3908
|
+
minWidth: '164px'
|
|
3909
|
+
});
|
|
3910
|
+
},
|
|
3911
|
+
menuPortal: function menuPortal(base) {
|
|
3912
|
+
return _extends({}, base, {
|
|
3913
|
+
zIndex: Z_INDEX_LAYERS.MENU
|
|
3914
|
+
});
|
|
3915
|
+
}
|
|
3916
|
+
};
|
|
3917
|
+
};
|
|
3918
|
+
|
|
3919
|
+
var ToolbarSelect = function ToolbarSelect(_ref) {
|
|
3920
|
+
var name = _ref.name,
|
|
3921
|
+
value = _ref.value,
|
|
3922
|
+
options = _ref.options,
|
|
3923
|
+
onChange = _ref.onChange,
|
|
3924
|
+
onBlur = _ref.onBlur,
|
|
3925
|
+
placeholder = _ref.placeholder,
|
|
3926
|
+
disabled = _ref.disabled,
|
|
3927
|
+
prefix = _ref.prefix;
|
|
3928
|
+
var controllers = useSelectFieldControllers({
|
|
3929
|
+
name: name,
|
|
3930
|
+
value: value,
|
|
3931
|
+
onChange: onChange,
|
|
3932
|
+
onBlur: onBlur
|
|
3933
|
+
});
|
|
3934
|
+
return React__default.createElement(AffixContainer, {
|
|
3935
|
+
prefix: prefix
|
|
3936
|
+
}, React__default.createElement(Select__default, {
|
|
3937
|
+
inputId: controllers.id,
|
|
3938
|
+
options: options,
|
|
3939
|
+
isDisabled: disabled,
|
|
3940
|
+
value: controllers.value,
|
|
3941
|
+
placeholder: placeholder,
|
|
3942
|
+
styles: getSelectStyles({}),
|
|
3943
|
+
menuPortalTarget: document.body,
|
|
3944
|
+
onChange: controllers.onChange,
|
|
3945
|
+
onBlur: controllers.onBlur,
|
|
3946
|
+
components: {
|
|
3947
|
+
Option: Select.components.Option,
|
|
3948
|
+
Control: Select.components.Control
|
|
3949
|
+
}
|
|
3950
|
+
}));
|
|
3951
|
+
};
|
|
3952
|
+
|
|
3742
3953
|
var styles$h = {"form--standard-size":"_3CaV0"};
|
|
3743
3954
|
|
|
3744
3955
|
var Form = function Form(_ref) {
|
|
@@ -4498,7 +4709,7 @@ var PasswordField = function PasswordField(_ref) {
|
|
|
4498
4709
|
}))));
|
|
4499
4710
|
};
|
|
4500
4711
|
|
|
4501
|
-
var getSelectStyles = function getSelectStyles(_ref) {
|
|
4712
|
+
var getSelectStyles$1 = function getSelectStyles(_ref) {
|
|
4502
4713
|
var isInvalid = _ref.isInvalid,
|
|
4503
4714
|
_ref$asToolbarFilter = _ref.asToolbarFilter,
|
|
4504
4715
|
asToolbarFilter = _ref$asToolbarFilter === void 0 ? false : _ref$asToolbarFilter,
|
|
@@ -4672,7 +4883,7 @@ var MultiSelectField = function MultiSelectField(_ref) {
|
|
|
4672
4883
|
value: controllers.value,
|
|
4673
4884
|
placeholder: placeholder,
|
|
4674
4885
|
noOptionsMessage: typeof noOptionsMessage === 'function' ? noOptionsMessage : defaultNoOptionsMessage,
|
|
4675
|
-
styles: getSelectStyles({
|
|
4886
|
+
styles: getSelectStyles$1({
|
|
4676
4887
|
isInvalid: hasError,
|
|
4677
4888
|
wrapToNextLine: true
|
|
4678
4889
|
}),
|
|
@@ -4704,58 +4915,6 @@ var MultiSelectField = function MultiSelectField(_ref) {
|
|
|
4704
4915
|
}));
|
|
4705
4916
|
};
|
|
4706
4917
|
|
|
4707
|
-
var useSelectFieldControllers = function useSelectFieldControllers(_ref) {
|
|
4708
|
-
var name = _ref.name,
|
|
4709
|
-
inputId = _ref.id,
|
|
4710
|
-
value = _ref.value,
|
|
4711
|
-
_onChange = _ref.onChange,
|
|
4712
|
-
_onBlur = _ref.onBlur,
|
|
4713
|
-
error = _ref.error;
|
|
4714
|
-
|
|
4715
|
-
var _useFormContext = useFormContext(),
|
|
4716
|
-
formik = _useFormContext.formik;
|
|
4717
|
-
|
|
4718
|
-
var id = useFieldId({
|
|
4719
|
-
name: name,
|
|
4720
|
-
id: inputId
|
|
4721
|
-
});
|
|
4722
|
-
var controllers = {
|
|
4723
|
-
id: id,
|
|
4724
|
-
error: error,
|
|
4725
|
-
value: value,
|
|
4726
|
-
onChange: function onChange(option) {
|
|
4727
|
-
return _onChange && _onChange(option);
|
|
4728
|
-
},
|
|
4729
|
-
onBlur: function onBlur(option) {
|
|
4730
|
-
return _onBlur && _onBlur(option);
|
|
4731
|
-
}
|
|
4732
|
-
};
|
|
4733
|
-
var formikState = getFormikState(name, formik);
|
|
4734
|
-
|
|
4735
|
-
if (formik && formikState) {
|
|
4736
|
-
controllers = _extends({}, controllers, {
|
|
4737
|
-
error: error ? controllers.error : formikState.error,
|
|
4738
|
-
value: value ? controllers.value : formikState.value,
|
|
4739
|
-
onChange: function onChange(option) {
|
|
4740
|
-
if (_onChange) {
|
|
4741
|
-
_onChange(option);
|
|
4742
|
-
}
|
|
4743
|
-
|
|
4744
|
-
formik.setFieldValue(name, option);
|
|
4745
|
-
},
|
|
4746
|
-
onBlur: function onBlur(option) {
|
|
4747
|
-
if (_onBlur) {
|
|
4748
|
-
_onBlur(option);
|
|
4749
|
-
}
|
|
4750
|
-
|
|
4751
|
-
formik.setFieldTouched(name);
|
|
4752
|
-
}
|
|
4753
|
-
});
|
|
4754
|
-
}
|
|
4755
|
-
|
|
4756
|
-
return controllers;
|
|
4757
|
-
};
|
|
4758
|
-
|
|
4759
4918
|
var styles$q = {"custom-control":"_1cDCR"};
|
|
4760
4919
|
|
|
4761
4920
|
var _excluded$4 = ["children", "CustomPrefixComponent"];
|
|
@@ -4840,7 +4999,7 @@ var SelectField = function SelectField(_ref) {
|
|
|
4840
4999
|
value: controllers.value,
|
|
4841
5000
|
placeholder: placeholder,
|
|
4842
5001
|
noOptionsMessage: typeof noOptionsMessage === 'function' ? noOptionsMessage : defaultNoOptionsMessage,
|
|
4843
|
-
styles: getSelectStyles({
|
|
5002
|
+
styles: getSelectStyles$1({
|
|
4844
5003
|
isInvalid: hasError,
|
|
4845
5004
|
asToolbarFilter: asToolbarFilter
|
|
4846
5005
|
}),
|
|
@@ -5873,6 +6032,7 @@ exports.IconFlag = IconFlag;
|
|
|
5873
6032
|
exports.IconFourDotsCircle = IconFourDotsCircle;
|
|
5874
6033
|
exports.IconFourSquares = IconFourSquares;
|
|
5875
6034
|
exports.IconGavel = IconGavel;
|
|
6035
|
+
exports.IconGif = IconGif;
|
|
5876
6036
|
exports.IconGift = IconGift;
|
|
5877
6037
|
exports.IconGrinBeam = IconGrinBeam;
|
|
5878
6038
|
exports.IconGripVertical = IconGripVertical;
|
|
@@ -5911,6 +6071,7 @@ exports.IconSitemap = IconSitemap;
|
|
|
5911
6071
|
exports.IconSlidersH = IconSlidersH;
|
|
5912
6072
|
exports.IconSort = IconSort;
|
|
5913
6073
|
exports.IconStar = IconStar;
|
|
6074
|
+
exports.IconStarSolid = IconStarSolid;
|
|
5914
6075
|
exports.IconStickyNoteLines = IconStickyNoteLines;
|
|
5915
6076
|
exports.IconStopwatch = IconStopwatch;
|
|
5916
6077
|
exports.IconStrikethrough = IconStrikethrough;
|
|
@@ -5958,6 +6119,7 @@ exports.TextAreaField = TextAreaField;
|
|
|
5958
6119
|
exports.TextField = TextField;
|
|
5959
6120
|
exports.TimeField = TimeField;
|
|
5960
6121
|
exports.Toggle = Toggle;
|
|
6122
|
+
exports.ToolbarSelect = ToolbarSelect;
|
|
5961
6123
|
exports.Tooltip = Tooltip$1;
|
|
5962
6124
|
exports.WeekField = WeekField;
|
|
5963
6125
|
//# sourceMappingURL=index.js.map
|