@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.modern.js
CHANGED
|
@@ -389,7 +389,9 @@ var TooltipOverlay = function TooltipOverlay(_ref) {
|
|
|
389
389
|
}, []);
|
|
390
390
|
var tooltipRectPosition = tooltipRef === null || tooltipRef === void 0 ? void 0 : (_tooltipRef$current = tooltipRef.current) === null || _tooltipRef$current === void 0 ? void 0 : _tooltipRef$current.getBoundingClientRect();
|
|
391
391
|
var position = calculatePosition(placement, anchorPosition, tooltipRectPosition);
|
|
392
|
-
return React__default.createElement(Portal, null, React__default.createElement("div",
|
|
392
|
+
return React__default.createElement(Portal, null, React__default.createElement("div", {
|
|
393
|
+
role: "tooltip"
|
|
394
|
+
}, React__default.createElement("div", {
|
|
393
395
|
ref: tooltipRef,
|
|
394
396
|
style: _extends({}, position.overlay, {
|
|
395
397
|
zIndex: Z_INDEX_LAYERS.TOOLTIP
|
|
@@ -425,6 +427,7 @@ var Tooltip = function Tooltip(_ref, forwardedRef) {
|
|
|
425
427
|
header = _ref.header,
|
|
426
428
|
extraClass = _ref.extraClass,
|
|
427
429
|
onClose = _ref.onClose,
|
|
430
|
+
onVisibleChange = _ref.onVisibleChange,
|
|
428
431
|
children = _ref.children;
|
|
429
432
|
var checkIsMounted = useIsMounted();
|
|
430
433
|
var internalRef = useRef(null);
|
|
@@ -436,6 +439,11 @@ var Tooltip = function Tooltip(_ref, forwardedRef) {
|
|
|
436
439
|
|
|
437
440
|
var isFocusingOnTooltip = useRef(false);
|
|
438
441
|
var isFocusingOnAnchor = useRef(false);
|
|
442
|
+
useEffect(function () {
|
|
443
|
+
if (isVisible && !header && !overlay) {
|
|
444
|
+
setIsVisible(false);
|
|
445
|
+
}
|
|
446
|
+
}, [isVisible, header, overlay]);
|
|
439
447
|
|
|
440
448
|
var updateOverlayVisibility = function updateOverlayVisibility(shouldShow) {
|
|
441
449
|
setIsVisible(shouldShow);
|
|
@@ -443,6 +451,10 @@ var Tooltip = function Tooltip(_ref, forwardedRef) {
|
|
|
443
451
|
if (!shouldShow) {
|
|
444
452
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
445
453
|
}
|
|
454
|
+
|
|
455
|
+
if (onVisibleChange) {
|
|
456
|
+
onVisibleChange(shouldShow);
|
|
457
|
+
}
|
|
446
458
|
};
|
|
447
459
|
|
|
448
460
|
var onAnchorFocusIn = function onAnchorFocusIn() {
|
|
@@ -1797,6 +1809,25 @@ var IconGavel = function IconGavel(props) {
|
|
|
1797
1809
|
|
|
1798
1810
|
IconGavel.displayName = 'IconGavel';
|
|
1799
1811
|
|
|
1812
|
+
var IconGif = function IconGif(props) {
|
|
1813
|
+
return React__default.createElement("svg", Object.assign({
|
|
1814
|
+
viewBox: "0 0 20 20",
|
|
1815
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1816
|
+
"data-testid": "icon-gif",
|
|
1817
|
+
style: getIconStyles(props)
|
|
1818
|
+
}, props), React__default.createElement("path", {
|
|
1819
|
+
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",
|
|
1820
|
+
stroke: "currentColor",
|
|
1821
|
+
strokeWidth: 0.952,
|
|
1822
|
+
fill: "none"
|
|
1823
|
+
}), React__default.createElement("path", {
|
|
1824
|
+
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",
|
|
1825
|
+
fill: "currentColor"
|
|
1826
|
+
}));
|
|
1827
|
+
};
|
|
1828
|
+
|
|
1829
|
+
IconGif.displayName = 'IconGif';
|
|
1830
|
+
|
|
1800
1831
|
var IconGift = function IconGift(props) {
|
|
1801
1832
|
return React__default.createElement("svg", Object.assign({
|
|
1802
1833
|
viewBox: "0 0 20 20",
|
|
@@ -2458,6 +2489,21 @@ var IconSort = function IconSort(props) {
|
|
|
2458
2489
|
|
|
2459
2490
|
IconSort.displayName = 'IconSort';
|
|
2460
2491
|
|
|
2492
|
+
var IconStarSolid = function IconStarSolid(props) {
|
|
2493
|
+
return React__default.createElement("svg", Object.assign({
|
|
2494
|
+
viewBox: "0 0 20 20",
|
|
2495
|
+
fill: "none",
|
|
2496
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2497
|
+
"data-testid": "icon-star-solid",
|
|
2498
|
+
style: getIconStyles(props)
|
|
2499
|
+
}, props), React__default.createElement("path", {
|
|
2500
|
+
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",
|
|
2501
|
+
fill: "currentColor"
|
|
2502
|
+
}));
|
|
2503
|
+
};
|
|
2504
|
+
|
|
2505
|
+
IconStarSolid.displayName = 'IconStarSolid';
|
|
2506
|
+
|
|
2461
2507
|
var IconStar = function IconStar(props) {
|
|
2462
2508
|
return React__default.createElement("svg", Object.assign({
|
|
2463
2509
|
viewBox: "0 0 20 20",
|
|
@@ -2857,7 +2903,7 @@ var IconWrench = function IconWrench(props) {
|
|
|
2857
2903
|
|
|
2858
2904
|
IconWrench.displayName = 'IconWrench';
|
|
2859
2905
|
|
|
2860
|
-
var styles$6 = {"item":"_3DlpO","
|
|
2906
|
+
var styles$6 = {"item":"_3DlpO","selected":"_NS-B9","clickable":"_2jPpF","item-column":"_3ENNn","actions":"_1FTaE"};
|
|
2861
2907
|
|
|
2862
2908
|
var ResourceTableRow = function ResourceTableRow(_ref) {
|
|
2863
2909
|
var _classnames;
|
|
@@ -3174,7 +3220,7 @@ var useDataTableContext = function useDataTableContext() {
|
|
|
3174
3220
|
return context;
|
|
3175
3221
|
};
|
|
3176
3222
|
|
|
3177
|
-
var styles$9 = {"item":"_1d8Ci","
|
|
3223
|
+
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"};
|
|
3178
3224
|
|
|
3179
3225
|
var DataTableRow = function DataTableRow(_ref) {
|
|
3180
3226
|
var _classnames;
|
|
@@ -3362,7 +3408,7 @@ var DataTable = function DataTable(_ref) {
|
|
|
3362
3408
|
numberOfRows: numberOfRows,
|
|
3363
3409
|
hasVerticalBorders: hasVerticalBorders
|
|
3364
3410
|
}
|
|
3365
|
-
}, React__default.createElement("div", null, React__default.createElement(DataTableHeader, {
|
|
3411
|
+
}, React__default.createElement("div", null, columns && React__default.createElement(DataTableHeader, {
|
|
3366
3412
|
columns: columns,
|
|
3367
3413
|
onSort: onSort,
|
|
3368
3414
|
showActionMenu: showActionMenu
|
|
@@ -3422,7 +3468,7 @@ var DataTableCell = function DataTableCell(_ref) {
|
|
|
3422
3468
|
var _useDataTableContext = useDataTableContext(),
|
|
3423
3469
|
columns = _useDataTableContext.columns;
|
|
3424
3470
|
|
|
3425
|
-
var column = (_columns$columnIndex = columns[columnIndex]) != null ? _columns$columnIndex : null;
|
|
3471
|
+
var column = (_columns$columnIndex = columns === null || columns === void 0 ? void 0 : columns[columnIndex]) != null ? _columns$columnIndex : null;
|
|
3426
3472
|
var isRightAligned = column ? column.isRightAligned : false;
|
|
3427
3473
|
return React__default.createElement("div", {
|
|
3428
3474
|
className: classnames((_classnames = {}, _classnames[styles$b['data-table-cell--right-aligned']] = isRightAligned, _classnames), styles$b['data-table-cell'])
|
|
@@ -3449,49 +3495,33 @@ var getFormikState = function getFormikState(name, formik) {
|
|
|
3449
3495
|
return null;
|
|
3450
3496
|
}
|
|
3451
3497
|
|
|
3452
|
-
|
|
3453
|
-
return {
|
|
3454
|
-
error: formik.touched[name] ? formik.errors[name] : undefined,
|
|
3455
|
-
value: formik.values[name]
|
|
3456
|
-
};
|
|
3457
|
-
}
|
|
3498
|
+
var formikPath = getFormikArrayPath(name);
|
|
3458
3499
|
|
|
3459
|
-
|
|
3500
|
+
if (formikPath.length === 0) {
|
|
3501
|
+
return null;
|
|
3502
|
+
}
|
|
3460
3503
|
|
|
3461
|
-
|
|
3462
|
-
var
|
|
3504
|
+
var formikLatestLevel = formikPath.reduce(function (acc, path) {
|
|
3505
|
+
var _acc$touched, _acc$error, _acc$value;
|
|
3463
3506
|
|
|
3464
|
-
var arrayName = formikArray.arrayName,
|
|
3465
|
-
itemIndex = formikArray.itemIndex,
|
|
3466
|
-
fieldName = formikArray.fieldName;
|
|
3467
3507
|
return {
|
|
3468
|
-
|
|
3469
|
-
|
|
3508
|
+
touched: (_acc$touched = acc.touched) === null || _acc$touched === void 0 ? void 0 : _acc$touched[path],
|
|
3509
|
+
error: (_acc$error = acc.error) === null || _acc$error === void 0 ? void 0 : _acc$error[path],
|
|
3510
|
+
value: (_acc$value = acc.value) === null || _acc$value === void 0 ? void 0 : _acc$value[path]
|
|
3470
3511
|
};
|
|
3471
|
-
}
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
var getFormikArrayPath = function getFormikArrayPath(name) {
|
|
3477
|
-
if (!name.includes('[')) {
|
|
3478
|
-
return false;
|
|
3479
|
-
}
|
|
3480
|
-
|
|
3481
|
-
var _name$split = name.split('['),
|
|
3482
|
-
arrayName = _name$split[0],
|
|
3483
|
-
missingSplit = _name$split[1];
|
|
3484
|
-
|
|
3485
|
-
var _missingSplit$split = missingSplit.split('].'),
|
|
3486
|
-
itemIndex = _missingSplit$split[0],
|
|
3487
|
-
fieldName = _missingSplit$split[1];
|
|
3488
|
-
|
|
3512
|
+
}, {
|
|
3513
|
+
touched: formik.touched,
|
|
3514
|
+
error: formik.errors,
|
|
3515
|
+
value: formik.values
|
|
3516
|
+
});
|
|
3489
3517
|
return {
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
fieldName: fieldName
|
|
3518
|
+
error: formikLatestLevel.touched ? formikLatestLevel.error : undefined,
|
|
3519
|
+
value: formikLatestLevel.value
|
|
3493
3520
|
};
|
|
3494
3521
|
};
|
|
3522
|
+
var getFormikArrayPath = function getFormikArrayPath(name) {
|
|
3523
|
+
return name.split(/[^a-zA-Z0-9]/).filter(Boolean);
|
|
3524
|
+
};
|
|
3495
3525
|
|
|
3496
3526
|
var useFieldControllers = function useFieldControllers(_ref) {
|
|
3497
3527
|
var name = _ref.name,
|
|
@@ -3691,9 +3721,9 @@ var DataTableEditableCell = function DataTableEditableCell(_ref) {
|
|
|
3691
3721
|
columns = _useDataTableContext.columns,
|
|
3692
3722
|
numberOfRows = _useDataTableContext.numberOfRows;
|
|
3693
3723
|
|
|
3694
|
-
var column = (_columns$columnIndex = columns[columnIndex]) != null ? _columns$columnIndex : null;
|
|
3724
|
+
var column = (_columns$columnIndex = columns === null || columns === void 0 ? void 0 : columns[columnIndex]) != null ? _columns$columnIndex : null;
|
|
3695
3725
|
var isRightAligned = column ? column.isRightAligned : false;
|
|
3696
|
-
var numberOfColumns = columns === null || columns === void 0 ? void 0 : columns.length;
|
|
3726
|
+
var numberOfColumns = (columns === null || columns === void 0 ? void 0 : columns.length) || 0;
|
|
3697
3727
|
var isTopLeftCell = columnIndex === 0 && rowIndex === 0;
|
|
3698
3728
|
var isTopRightCell = columnIndex === numberOfColumns - 1 && rowIndex === 0;
|
|
3699
3729
|
var isBottomLeftCell = columnIndex === 0 && rowIndex === numberOfRows - 1;
|
|
@@ -3735,6 +3765,187 @@ var DataTableEditableCell = function DataTableEditableCell(_ref) {
|
|
|
3735
3765
|
}))));
|
|
3736
3766
|
};
|
|
3737
3767
|
|
|
3768
|
+
var useSelectFieldControllers = function useSelectFieldControllers(_ref) {
|
|
3769
|
+
var name = _ref.name,
|
|
3770
|
+
inputId = _ref.id,
|
|
3771
|
+
value = _ref.value,
|
|
3772
|
+
_onChange = _ref.onChange,
|
|
3773
|
+
_onBlur = _ref.onBlur,
|
|
3774
|
+
error = _ref.error;
|
|
3775
|
+
|
|
3776
|
+
var _useFormContext = useFormContext(),
|
|
3777
|
+
formik = _useFormContext.formik;
|
|
3778
|
+
|
|
3779
|
+
var id = useFieldId({
|
|
3780
|
+
name: name,
|
|
3781
|
+
id: inputId
|
|
3782
|
+
});
|
|
3783
|
+
var controllers = {
|
|
3784
|
+
id: id,
|
|
3785
|
+
error: error,
|
|
3786
|
+
value: value,
|
|
3787
|
+
onChange: function onChange(option) {
|
|
3788
|
+
return _onChange && _onChange(option);
|
|
3789
|
+
},
|
|
3790
|
+
onBlur: function onBlur(option) {
|
|
3791
|
+
return _onBlur && _onBlur(option);
|
|
3792
|
+
}
|
|
3793
|
+
};
|
|
3794
|
+
var formikState = getFormikState(name, formik);
|
|
3795
|
+
|
|
3796
|
+
if (formik && formikState) {
|
|
3797
|
+
controllers = _extends({}, controllers, {
|
|
3798
|
+
error: error ? controllers.error : formikState.error,
|
|
3799
|
+
value: value ? controllers.value : formikState.value,
|
|
3800
|
+
onChange: function onChange(option) {
|
|
3801
|
+
if (_onChange) {
|
|
3802
|
+
_onChange(option);
|
|
3803
|
+
}
|
|
3804
|
+
|
|
3805
|
+
formik.setFieldValue(name, option);
|
|
3806
|
+
},
|
|
3807
|
+
onBlur: function onBlur(option) {
|
|
3808
|
+
if (_onBlur) {
|
|
3809
|
+
_onBlur(option);
|
|
3810
|
+
}
|
|
3811
|
+
|
|
3812
|
+
formik.setFieldTouched(name);
|
|
3813
|
+
}
|
|
3814
|
+
});
|
|
3815
|
+
}
|
|
3816
|
+
|
|
3817
|
+
return controllers;
|
|
3818
|
+
};
|
|
3819
|
+
|
|
3820
|
+
var getSelectStyles = function getSelectStyles(_ref) {
|
|
3821
|
+
var _ref$wrapToNextLine = _ref.wrapToNextLine,
|
|
3822
|
+
wrapToNextLine = _ref$wrapToNextLine === void 0 ? false : _ref$wrapToNextLine;
|
|
3823
|
+
return {
|
|
3824
|
+
valueContainer: function valueContainer(base) {
|
|
3825
|
+
return Object.assign({}, base, {
|
|
3826
|
+
flexWrap: wrapToNextLine ? 'wrap' : 'nowrap'
|
|
3827
|
+
});
|
|
3828
|
+
},
|
|
3829
|
+
container: function container(base, state) {
|
|
3830
|
+
return Object.assign({}, base, {
|
|
3831
|
+
flex: '1',
|
|
3832
|
+
fontFamily: FONT_FAMILY,
|
|
3833
|
+
minWidth: '64px',
|
|
3834
|
+
background: state.isDisabled ? GREY100 : WHITE,
|
|
3835
|
+
':hover': {
|
|
3836
|
+
backgroundColor: GREY100
|
|
3837
|
+
},
|
|
3838
|
+
position: 'initial'
|
|
3839
|
+
});
|
|
3840
|
+
},
|
|
3841
|
+
control: function control(base, state) {
|
|
3842
|
+
return Object.assign({}, base, {
|
|
3843
|
+
color: state.isDisabled ? GREY400 : GREY500,
|
|
3844
|
+
boxShadow: 'none',
|
|
3845
|
+
fontSize: '14px',
|
|
3846
|
+
cursor: 'pointer',
|
|
3847
|
+
background: 'none',
|
|
3848
|
+
outline: '1px solid',
|
|
3849
|
+
outlineColor: GREY300,
|
|
3850
|
+
borderRadius: '4px',
|
|
3851
|
+
border: 'none'
|
|
3852
|
+
});
|
|
3853
|
+
},
|
|
3854
|
+
indicatorSeparator: function indicatorSeparator() {
|
|
3855
|
+
return {
|
|
3856
|
+
display: 'none'
|
|
3857
|
+
};
|
|
3858
|
+
},
|
|
3859
|
+
placeholder: function placeholder(base, state) {
|
|
3860
|
+
return _extends({}, base, {
|
|
3861
|
+
color: state.isDisabled ? GREY300 : GREY400,
|
|
3862
|
+
marginRight: 0,
|
|
3863
|
+
position: 'static',
|
|
3864
|
+
transform: 'initial',
|
|
3865
|
+
overflow: 'hidden',
|
|
3866
|
+
textOverflow: 'ellipsis',
|
|
3867
|
+
whiteSpace: 'nowrap'
|
|
3868
|
+
});
|
|
3869
|
+
},
|
|
3870
|
+
singleValue: function singleValue(base, state) {
|
|
3871
|
+
return Object.assign({}, base, {
|
|
3872
|
+
color: state.isDisabled ? GREY400 : null,
|
|
3873
|
+
marginRight: 0,
|
|
3874
|
+
position: 'static',
|
|
3875
|
+
transform: 'initial',
|
|
3876
|
+
overflow: 'hidden',
|
|
3877
|
+
textOverflow: 'ellipsis',
|
|
3878
|
+
whiteSpace: 'nowrap'
|
|
3879
|
+
});
|
|
3880
|
+
},
|
|
3881
|
+
dropdownIndicator: function dropdownIndicator(base) {
|
|
3882
|
+
return Object.assign({}, base, {
|
|
3883
|
+
color: GREY400,
|
|
3884
|
+
padding: '8px'
|
|
3885
|
+
});
|
|
3886
|
+
},
|
|
3887
|
+
option: function option(base, state) {
|
|
3888
|
+
return Object.assign({}, base, {
|
|
3889
|
+
backgroundColor: state.isDisabled ? null : state.isSelected ? EGGPLANT200 : state.isFocused ? GREY100 : WHITE,
|
|
3890
|
+
color: state.isDisabled ? GREY400 : GREY500,
|
|
3891
|
+
cursor: state.isDisabled ? 'default' : 'pointer',
|
|
3892
|
+
fontFamily: FONT_FAMILY,
|
|
3893
|
+
fontSize: '14px'
|
|
3894
|
+
});
|
|
3895
|
+
},
|
|
3896
|
+
group: function group(base) {
|
|
3897
|
+
return Object.assign({}, base, {
|
|
3898
|
+
fontFamily: FONT_FAMILY
|
|
3899
|
+
});
|
|
3900
|
+
},
|
|
3901
|
+
menu: function menu(base) {
|
|
3902
|
+
return _extends({}, base, {
|
|
3903
|
+
zIndex: Z_INDEX_LAYERS.MENU,
|
|
3904
|
+
minWidth: '164px'
|
|
3905
|
+
});
|
|
3906
|
+
},
|
|
3907
|
+
menuPortal: function menuPortal(base) {
|
|
3908
|
+
return _extends({}, base, {
|
|
3909
|
+
zIndex: Z_INDEX_LAYERS.MENU
|
|
3910
|
+
});
|
|
3911
|
+
}
|
|
3912
|
+
};
|
|
3913
|
+
};
|
|
3914
|
+
|
|
3915
|
+
var ToolbarSelect = function ToolbarSelect(_ref) {
|
|
3916
|
+
var name = _ref.name,
|
|
3917
|
+
value = _ref.value,
|
|
3918
|
+
options = _ref.options,
|
|
3919
|
+
onChange = _ref.onChange,
|
|
3920
|
+
onBlur = _ref.onBlur,
|
|
3921
|
+
placeholder = _ref.placeholder,
|
|
3922
|
+
disabled = _ref.disabled,
|
|
3923
|
+
prefix = _ref.prefix;
|
|
3924
|
+
var controllers = useSelectFieldControllers({
|
|
3925
|
+
name: name,
|
|
3926
|
+
value: value,
|
|
3927
|
+
onChange: onChange,
|
|
3928
|
+
onBlur: onBlur
|
|
3929
|
+
});
|
|
3930
|
+
return React__default.createElement(AffixContainer, {
|
|
3931
|
+
prefix: prefix
|
|
3932
|
+
}, React__default.createElement(Select, {
|
|
3933
|
+
inputId: controllers.id,
|
|
3934
|
+
options: options,
|
|
3935
|
+
isDisabled: disabled,
|
|
3936
|
+
value: controllers.value,
|
|
3937
|
+
placeholder: placeholder,
|
|
3938
|
+
styles: getSelectStyles({}),
|
|
3939
|
+
menuPortalTarget: document.body,
|
|
3940
|
+
onChange: controllers.onChange,
|
|
3941
|
+
onBlur: controllers.onBlur,
|
|
3942
|
+
components: {
|
|
3943
|
+
Option: components.Option,
|
|
3944
|
+
Control: components.Control
|
|
3945
|
+
}
|
|
3946
|
+
}));
|
|
3947
|
+
};
|
|
3948
|
+
|
|
3738
3949
|
var styles$h = {"form--standard-size":"_3CaV0"};
|
|
3739
3950
|
|
|
3740
3951
|
var Form = function Form(_ref) {
|
|
@@ -4494,7 +4705,7 @@ var PasswordField = function PasswordField(_ref) {
|
|
|
4494
4705
|
}))));
|
|
4495
4706
|
};
|
|
4496
4707
|
|
|
4497
|
-
var getSelectStyles = function getSelectStyles(_ref) {
|
|
4708
|
+
var getSelectStyles$1 = function getSelectStyles(_ref) {
|
|
4498
4709
|
var isInvalid = _ref.isInvalid,
|
|
4499
4710
|
_ref$asToolbarFilter = _ref.asToolbarFilter,
|
|
4500
4711
|
asToolbarFilter = _ref$asToolbarFilter === void 0 ? false : _ref$asToolbarFilter,
|
|
@@ -4668,7 +4879,7 @@ var MultiSelectField = function MultiSelectField(_ref) {
|
|
|
4668
4879
|
value: controllers.value,
|
|
4669
4880
|
placeholder: placeholder,
|
|
4670
4881
|
noOptionsMessage: typeof noOptionsMessage === 'function' ? noOptionsMessage : defaultNoOptionsMessage,
|
|
4671
|
-
styles: getSelectStyles({
|
|
4882
|
+
styles: getSelectStyles$1({
|
|
4672
4883
|
isInvalid: hasError,
|
|
4673
4884
|
wrapToNextLine: true
|
|
4674
4885
|
}),
|
|
@@ -4700,58 +4911,6 @@ var MultiSelectField = function MultiSelectField(_ref) {
|
|
|
4700
4911
|
}));
|
|
4701
4912
|
};
|
|
4702
4913
|
|
|
4703
|
-
var useSelectFieldControllers = function useSelectFieldControllers(_ref) {
|
|
4704
|
-
var name = _ref.name,
|
|
4705
|
-
inputId = _ref.id,
|
|
4706
|
-
value = _ref.value,
|
|
4707
|
-
_onChange = _ref.onChange,
|
|
4708
|
-
_onBlur = _ref.onBlur,
|
|
4709
|
-
error = _ref.error;
|
|
4710
|
-
|
|
4711
|
-
var _useFormContext = useFormContext(),
|
|
4712
|
-
formik = _useFormContext.formik;
|
|
4713
|
-
|
|
4714
|
-
var id = useFieldId({
|
|
4715
|
-
name: name,
|
|
4716
|
-
id: inputId
|
|
4717
|
-
});
|
|
4718
|
-
var controllers = {
|
|
4719
|
-
id: id,
|
|
4720
|
-
error: error,
|
|
4721
|
-
value: value,
|
|
4722
|
-
onChange: function onChange(option) {
|
|
4723
|
-
return _onChange && _onChange(option);
|
|
4724
|
-
},
|
|
4725
|
-
onBlur: function onBlur(option) {
|
|
4726
|
-
return _onBlur && _onBlur(option);
|
|
4727
|
-
}
|
|
4728
|
-
};
|
|
4729
|
-
var formikState = getFormikState(name, formik);
|
|
4730
|
-
|
|
4731
|
-
if (formik && formikState) {
|
|
4732
|
-
controllers = _extends({}, controllers, {
|
|
4733
|
-
error: error ? controllers.error : formikState.error,
|
|
4734
|
-
value: value ? controllers.value : formikState.value,
|
|
4735
|
-
onChange: function onChange(option) {
|
|
4736
|
-
if (_onChange) {
|
|
4737
|
-
_onChange(option);
|
|
4738
|
-
}
|
|
4739
|
-
|
|
4740
|
-
formik.setFieldValue(name, option);
|
|
4741
|
-
},
|
|
4742
|
-
onBlur: function onBlur(option) {
|
|
4743
|
-
if (_onBlur) {
|
|
4744
|
-
_onBlur(option);
|
|
4745
|
-
}
|
|
4746
|
-
|
|
4747
|
-
formik.setFieldTouched(name);
|
|
4748
|
-
}
|
|
4749
|
-
});
|
|
4750
|
-
}
|
|
4751
|
-
|
|
4752
|
-
return controllers;
|
|
4753
|
-
};
|
|
4754
|
-
|
|
4755
4914
|
var styles$q = {"custom-control":"_1cDCR"};
|
|
4756
4915
|
|
|
4757
4916
|
var _excluded$4 = ["children", "CustomPrefixComponent"];
|
|
@@ -4836,7 +4995,7 @@ var SelectField = function SelectField(_ref) {
|
|
|
4836
4995
|
value: controllers.value,
|
|
4837
4996
|
placeholder: placeholder,
|
|
4838
4997
|
noOptionsMessage: typeof noOptionsMessage === 'function' ? noOptionsMessage : defaultNoOptionsMessage,
|
|
4839
|
-
styles: getSelectStyles({
|
|
4998
|
+
styles: getSelectStyles$1({
|
|
4840
4999
|
isInvalid: hasError,
|
|
4841
5000
|
asToolbarFilter: asToolbarFilter
|
|
4842
5001
|
}),
|
|
@@ -5799,5 +5958,5 @@ var Avatar = function Avatar(_ref) {
|
|
|
5799
5958
|
}, badge));
|
|
5800
5959
|
};
|
|
5801
5960
|
|
|
5802
|
-
export { Avatar, Badge$1 as Badge, Button$1 as Button, CheckboxField, DataTable, DataTableCell, DataTableEditableCell, DataTableRow, DateField, DateRangeField, Form, FormRow, IconAnalytics, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowToTop, IconArrowUp, IconAward, IconBalanceScale, IconBalanceScaleLeft, IconBan, IconBarsH, IconBarsV, IconBell, IconBold, IconBolt, IconBook, IconBriefcase, IconBullseyeArrow, IconCalculator, IconCalendar, IconCalendarAlt, IconCalendarCheck, IconCalendarDay, IconCalendarExclamation, IconCalendarTomorrow, IconCamera, IconCameraSlash, IconCashRegister, IconChartBar, IconCheck, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClipboardList, IconClock, IconCog, IconComment, IconCommentLines, IconCopy, IconCreditCard, IconCreditCardPlus, IconDownload, IconEdit, IconEllipsisV, IconEnvelope, IconExclaimation, IconExclaimationTriangle, IconExpand, IconExternalLink, IconEye, IconEyeSlash, IconFile, IconFilePdf, IconFlag, IconFourDotsCircle, IconFourSquares, IconGavel, IconGift, IconGrinBeam, IconGripVertical, IconHandshake, IconImage, IconInfoCircle, IconIslandTropical, IconItalic, IconLaptopSearch, IconLink, IconList, IconListOI as IconListOi, IconLock, IconMagicSolid, IconMapMarker, IconMegaphone, IconMinus, IconMinusCircle, IconMoneyBill, IconNotesMedical, IconOvertime, IconPaperPlane, IconPaperPlaneClock, IconPaperclip, IconPencil, IconPercentage, IconPhone, IconPlug, IconPlus, IconPrint, IconQuestionCircle, IconRepeat, IconSearch, IconSignOut, IconSitemap, IconSlidersH, IconSort, IconStar, IconStickyNoteLines, IconStopwatch, IconStrikethrough, IconSync, IconSyncExclaimation, IconTachometer, IconTimes, IconTimesOctagon, IconTrash, IconUnderline, IconUndo, IconUserComputer, IconUserLight, IconUserPlus, IconUserSlash, IconUserSolid, IconUserTag, IconUserTie, IconUsers, IconVideo, IconVolume, IconVolumeMute, IconWrench, Inline, Modal, ModalBody, ModalFooter, MultiSelectField, PaginationControls, PasswordField, PillSelectField, RadioGroupField, RadioGroupOption, ResourceTable, ResourceTableRow, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT, SelectField, Spinner, Stack, TextAreaField, TextField, TimeField, Toggle, Tooltip$1 as Tooltip, WeekField };
|
|
5961
|
+
export { Avatar, Badge$1 as Badge, Button$1 as Button, CheckboxField, DataTable, DataTableCell, DataTableEditableCell, DataTableRow, DateField, DateRangeField, Form, FormRow, IconAnalytics, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowToTop, IconArrowUp, IconAward, IconBalanceScale, IconBalanceScaleLeft, IconBan, IconBarsH, IconBarsV, IconBell, IconBold, IconBolt, IconBook, IconBriefcase, IconBullseyeArrow, IconCalculator, IconCalendar, IconCalendarAlt, IconCalendarCheck, IconCalendarDay, IconCalendarExclamation, IconCalendarTomorrow, IconCamera, IconCameraSlash, IconCashRegister, IconChartBar, IconCheck, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClipboardList, IconClock, IconCog, IconComment, IconCommentLines, IconCopy, IconCreditCard, IconCreditCardPlus, IconDownload, IconEdit, IconEllipsisV, IconEnvelope, IconExclaimation, IconExclaimationTriangle, IconExpand, IconExternalLink, IconEye, IconEyeSlash, IconFile, IconFilePdf, IconFlag, IconFourDotsCircle, IconFourSquares, IconGavel, IconGif, IconGift, IconGrinBeam, IconGripVertical, IconHandshake, IconImage, IconInfoCircle, IconIslandTropical, IconItalic, IconLaptopSearch, IconLink, IconList, IconListOI as IconListOi, IconLock, IconMagicSolid, IconMapMarker, IconMegaphone, IconMinus, IconMinusCircle, IconMoneyBill, IconNotesMedical, IconOvertime, IconPaperPlane, IconPaperPlaneClock, IconPaperclip, IconPencil, IconPercentage, IconPhone, IconPlug, IconPlus, IconPrint, IconQuestionCircle, IconRepeat, IconSearch, IconSignOut, IconSitemap, IconSlidersH, IconSort, IconStar, IconStarSolid, IconStickyNoteLines, IconStopwatch, IconStrikethrough, IconSync, IconSyncExclaimation, IconTachometer, IconTimes, IconTimesOctagon, IconTrash, IconUnderline, IconUndo, IconUserComputer, IconUserLight, IconUserPlus, IconUserSlash, IconUserSolid, IconUserTag, IconUserTie, IconUsers, IconVideo, IconVolume, IconVolumeMute, IconWrench, Inline, Modal, ModalBody, ModalFooter, MultiSelectField, PaginationControls, PasswordField, PillSelectField, RadioGroupField, RadioGroupOption, ResourceTable, ResourceTableRow, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT, SelectField, Spinner, Stack, TextAreaField, TextField, TimeField, Toggle, ToolbarSelect, Tooltip$1 as Tooltip, WeekField };
|
|
5803
5962
|
//# sourceMappingURL=index.modern.js.map
|