@xelto.npm/xc2-lib 0.0.44 → 0.0.46
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/cjs/index.js +45 -44
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Inputs/datepicker/DatePickerProps.d.ts +2 -2
- package/dist/cjs/types/components/Inputs/select/Select.d.ts +4 -0
- package/dist/cjs/types/components/Inputs/select/SelectProps.d.ts +18 -0
- package/dist/cjs/types/components/Inputs/textfield/TextField.d.ts +5 -1
- package/dist/cjs/types/components/bottomBar/BottomBarComponent.d.ts +13 -5
- package/dist/cjs/types/components/bottomInfoBar/BottomInfoBar.d.ts +3 -16
- package/dist/cjs/types/components/bottomInfoBar/BottomInfoBarProps.d.ts +7 -0
- package/dist/cjs/types/components/buttons/customButton/CustomButtonComponent.d.ts +3 -14
- package/dist/cjs/types/components/buttons/customButton/CustomButtonProps.d.ts +11 -0
- package/dist/cjs/types/components/buttons/iconButton/IconButtonComponent.d.ts +4 -11
- package/dist/cjs/types/components/buttons/iconButton/IconButtonProps.d.ts +10 -0
- package/dist/cjs/types/components/checkbox/CheckboxComponent.d.ts +3 -10
- package/dist/cjs/types/components/checkbox/CheckboxProps.d.ts +9 -0
- package/dist/cjs/types/components/foundations/icon/Icon.d.ts +3 -8
- package/dist/cjs/types/components/foundations/icon/IconProps.d.ts +9 -0
- package/dist/cjs/types/components/foundations/logo/Logo.d.ts +5 -6
- package/dist/esm/index.js +45 -44
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Inputs/datepicker/DatePickerProps.d.ts +2 -2
- package/dist/esm/types/components/Inputs/select/Select.d.ts +4 -0
- package/dist/esm/types/components/Inputs/select/SelectProps.d.ts +18 -0
- package/dist/esm/types/components/Inputs/textfield/TextField.d.ts +5 -1
- package/dist/esm/types/components/bottomBar/BottomBarComponent.d.ts +13 -5
- package/dist/esm/types/components/bottomInfoBar/BottomInfoBar.d.ts +3 -16
- package/dist/esm/types/components/bottomInfoBar/BottomInfoBarProps.d.ts +7 -0
- package/dist/esm/types/components/buttons/customButton/CustomButtonComponent.d.ts +3 -14
- package/dist/esm/types/components/buttons/customButton/CustomButtonProps.d.ts +11 -0
- package/dist/esm/types/components/buttons/iconButton/IconButtonComponent.d.ts +4 -11
- package/dist/esm/types/components/buttons/iconButton/IconButtonProps.d.ts +10 -0
- package/dist/esm/types/components/checkbox/CheckboxComponent.d.ts +3 -10
- package/dist/esm/types/components/checkbox/CheckboxProps.d.ts +9 -0
- package/dist/esm/types/components/foundations/icon/Icon.d.ts +3 -8
- package/dist/esm/types/components/foundations/icon/IconProps.d.ts +9 -0
- package/dist/esm/types/components/foundations/logo/Logo.d.ts +5 -6
- package/dist/index.d.ts +70 -66
- package/package.json +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -19979,7 +19979,9 @@ process.env.NODE_ENV !== "production" ? Button.propTypes /* remove-proptypes */
|
|
|
19979
19979
|
variant: propTypes.exports /* @typescript-to-proptypes-ignore */.oneOfType([propTypes.exports.oneOf(['contained', 'outlined', 'text']), propTypes.exports.string])
|
|
19980
19980
|
} : void 0;
|
|
19981
19981
|
|
|
19982
|
-
var CustomButton = styled(Button
|
|
19982
|
+
var CustomButton = styled(Button, {
|
|
19983
|
+
shouldForwardProp: function (prop) { return prop !== "fluid"; }
|
|
19984
|
+
})(function (_a) {
|
|
19983
19985
|
var fluid = _a.fluid;
|
|
19984
19986
|
return ({
|
|
19985
19987
|
width: fluid ? '100%' : 'auto',
|
|
@@ -20206,13 +20208,11 @@ var CustomButton = styled(Button)(function (_a) {
|
|
|
20206
20208
|
});
|
|
20207
20209
|
// @ts-ignore
|
|
20208
20210
|
var CustomButtonComponent = function (_a) {
|
|
20209
|
-
var type = _a.type, text = _a.text, size = _a.size, fluid = _a.fluid, color = _a.color
|
|
20211
|
+
var type = _a.type, text = _a.text, size = _a.size, fluid = _a.fluid, color = _a.color, onClick = _a.onClick, disabled = _a.disabled, forwardedRef = _a.forwardedRef, props = __rest(_a, ["type", "text", "size", "fluid", "color", "onClick", "disabled", "forwardedRef"]);
|
|
20210
20212
|
var colorClassName = disabled ? 'grey' : color ? color : 'navy-blue'; // navy-blue / red / black / grey / special-green
|
|
20211
20213
|
var typeClassName = type || 'primary'; // primary / secondary / ghost
|
|
20212
20214
|
var sizeClassName = size || 'big'; // null / big / small
|
|
20213
20215
|
// const behaviourClassName = behaviour || '';
|
|
20214
|
-
// const resolutionClassName = resolution === '480x800' ? 'regular' : resolution === '720x1280' ? 'big' :resolution === '1024x768/1440x960/1920x1080' ? 'small' : ''
|
|
20215
|
-
// const widthClassName = width === '100%' ? 'width100' : width === '50%' ? 'width50' : width === '33%' ? 'width33' : '';
|
|
20216
20216
|
var finalClassName = "".concat(typeClassName, " ").concat(colorClassName, " ").concat(sizeClassName);
|
|
20217
20217
|
return (jsxRuntime.exports.jsx(CustomButton, __assign({ disabled: disabled, onClick: onClick, className: finalClassName, fluid: fluid, variant: "contained", disableRipple: true, ref: forwardedRef }, props, { children: text })));
|
|
20218
20218
|
};
|
|
@@ -21686,11 +21686,13 @@ var StyledIconWrapper = styled(Box)(function (_a) {
|
|
|
21686
21686
|
});
|
|
21687
21687
|
// @ts-ignore
|
|
21688
21688
|
var Icon$1 = function (_a) {
|
|
21689
|
-
var _b = _a.iconName, iconName = _b === void 0 ? '' : _b, _c = _a.color, color = _c === void 0 ? 'red-navy' : _c, _d = _a.size, size = _d === void 0 ? 'responsive' : _d,
|
|
21690
|
-
return (jsxRuntime.exports.jsxs(StyledIconWrapper, __assign({}, rest, { ref: forwardedRef, className: "".concat(color, " ").concat(size), color: color,
|
|
21689
|
+
var _b = _a.iconName, iconName = _b === void 0 ? '' : _b, _c = _a.color, color = _c === void 0 ? 'red-navy' : _c, _d = _a.size, size = _d === void 0 ? 'responsive' : _d, forwardedRef = _a.forwardedRef, rest = __rest(_a, ["iconName", "color", "size", "forwardedRef"]);
|
|
21690
|
+
return (jsxRuntime.exports.jsxs(StyledIconWrapper, __assign({}, rest, { ref: forwardedRef, className: "".concat(color, " ").concat(size), color: color, iconName: iconName }, { children: [iconName === 'icon_wf_search' && jsxRuntime.exports.jsx(SvgIconWfSearch, {}), iconName === 'icon_wf_locked' && jsxRuntime.exports.jsx(SvgIconWfLocked, {}), iconName === 'icon_wf_download' && jsxRuntime.exports.jsx(SvgIconWfDownload, {}), iconName === 'icon_wf_remove' && jsxRuntime.exports.jsx(SvgIconWfRemove, {}), iconName === 'icon_wf_logout' && jsxRuntime.exports.jsx(SvgIconWfLogout, {}), iconName === 'icon_wf_edit' && jsxRuntime.exports.jsx(SvgIconWfEdit, {}), iconName === 'icon_wf_settings_or_filter' && jsxRuntime.exports.jsx(SvgIconWfSettingsOrFilter, {}), iconName === 'icon_wf_barcode_1d' && jsxRuntime.exports.jsx(SvgIconWfBarcode1D, {}), iconName === 'icon_wf_barcode_2d' && jsxRuntime.exports.jsx(SvgIconWfBarcode2D, {}), iconName === 'icon_wf_barcode_printer' && jsxRuntime.exports.jsx(SvgIconWfBarcodePrinter, {}), iconName === 'icon_wf_box' && jsxRuntime.exports.jsx(SvgIconWfBox, {}), iconName === 'icon_wf_calculator' && jsxRuntime.exports.jsx(SvgIconWfCalculator, {}), iconName === 'icon_wf_calendar' && jsxRuntime.exports.jsx(SvgIconWfCalendar, {}), iconName === 'icon_wf_car' && jsxRuntime.exports.jsx(SvgIconWfCar, {}), iconName === 'icon_wf_forklift' && jsxRuntime.exports.jsx(SvgIconWfForklift, {}), iconName === 'icon_wf_invoice' && jsxRuntime.exports.jsx(SvgIconWfInvoice, {}), iconName === 'icon_wf_keyboard' && jsxRuntime.exports.jsx(SvgIconWfKeyboard, {}), iconName === 'icon_wf_logs' && jsxRuntime.exports.jsx(SvgIconWfLogs, {}), iconName === 'icon_wf_no_barcode_printer' && jsxRuntime.exports.jsx(SvgIconWfNoBarcodePrinter, {}), iconName === 'icon_wf_no_scan' && jsxRuntime.exports.jsx(SvgIconWfNoScan, {}), iconName === 'icon_wf_pallet' && jsxRuntime.exports.jsx(SvgIconWfPallet, {}), iconName === 'icon_wf_pin' && jsxRuntime.exports.jsx(SvgIconWfPin, {}), iconName === 'icon_wf_scan' && jsxRuntime.exports.jsx(SvgIconWfScan, {}), iconName === 'icon_wf_send' && jsxRuntime.exports.jsx(SvgIconWfSend, {}), iconName === 'icon_wf_status_ksef' && jsxRuntime.exports.jsx(SvgIconWfStatusKsef, {}), iconName === 'icon_wf_stop' && jsxRuntime.exports.jsx(SvgIconWfStop, {}), iconName === 'icon_wf_unpin' && jsxRuntime.exports.jsx(SvgIconWfUnpin, {}), iconName === 'icon_wf_refresh' && jsxRuntime.exports.jsx(SvgIconWfRefresh, {}), iconName === 'icon_ui_close' && jsxRuntime.exports.jsx(SvgIconUiClose, {}), iconName === 'icon_ui_chevron_up' && jsxRuntime.exports.jsx(SvgIconUiChevronUp, {}), iconName === 'icon_ui_chevron_down' && jsxRuntime.exports.jsx(SvgIconUiChevronDown, {}), iconName === 'icon_ui_chevron_right' && jsxRuntime.exports.jsx(SvgIconUiChevronRight, {}), iconName === 'icon_ui_chevron_left' && jsxRuntime.exports.jsx(SvgIconUiChevronLeft, {}), iconName === 'icon_sp_check_mark' && jsxRuntime.exports.jsx(SvgIconSpCheckMark, {}), iconName === 'icon_sp_warning' && jsxRuntime.exports.jsx(SvgIconSpWarning, {}), iconName === 'icon_sp_info' && jsxRuntime.exports.jsx(SvgIconSpInfo, {}), iconName === 'icon_sp_info_2' && jsxRuntime.exports.jsx(SvgIconSpInfo2, {}), iconName === 'icon_burger_menu' && jsxRuntime.exports.jsx(SvgMenuBurger, {}), iconName === 'icon_update' && jsxRuntime.exports.jsx(SvgUpdateIcon, {}), iconName === 'icon_checkbox_default' && jsxRuntime.exports.jsx(SvgCheckboxDefault, {}), iconName === 'icon_checkbox_checked' && jsxRuntime.exports.jsx(SvgCheckboxChecked, {}), iconName === 'icon_checkbox_indeterminate' && jsxRuntime.exports.jsx(SvgChecbkoxIndeterminate, {})] })));
|
|
21691
21691
|
};
|
|
21692
21692
|
|
|
21693
|
-
var CustomIconButton = styled(Button
|
|
21693
|
+
var CustomIconButton = styled(Button, {
|
|
21694
|
+
shouldForwardProp: function (prop) { return prop !== "fluid"; }
|
|
21695
|
+
})(function (_a) {
|
|
21694
21696
|
var fluid = _a.fluid;
|
|
21695
21697
|
return ({
|
|
21696
21698
|
width: fluid ? '100%' : 'auto',
|
|
@@ -21883,9 +21885,8 @@ var CustomIconButton = styled(Button)(function (_a) {
|
|
|
21883
21885
|
},
|
|
21884
21886
|
});
|
|
21885
21887
|
});
|
|
21886
|
-
|
|
21887
|
-
|
|
21888
|
-
var text = _a.text, type = _a.type, icon = _a.icon, color = _a.color, fluid = _a.fluid, onClick = _a.onClick, _b = _a.forwardedRef, forwardedRef = _b === void 0 ? null : _b, props = __rest(_a, ["text", "type", "icon", "color", "fluid", "onClick", "forwardedRef"]);
|
|
21888
|
+
var IconButtonComponent = function (_a) {
|
|
21889
|
+
var text = _a.text, type = _a.type, icon = _a.icon, color = _a.color, fluid = _a.fluid, onClick = _a.onClick, forwardedRef = _a.forwardedRef, props = __rest(_a, ["text", "type", "icon", "color", "fluid", "onClick", "forwardedRef"]);
|
|
21889
21890
|
var colorClassName = color || '';
|
|
21890
21891
|
var typeClassName = type || '';
|
|
21891
21892
|
// const resolutionClassName = resolution === '480x800' ? 'regular' : resolution === '720x1280' ? 'big' :resolution === '1024x768/1440x960/1920x1080' ? 'small' : ''
|
|
@@ -21894,7 +21895,7 @@ function IconButtonComponent(_a) {
|
|
|
21894
21895
|
// const iconVariant = icon === 'download' ? IconDownloadGrey : IconDownloadWhite;
|
|
21895
21896
|
// const iconVariant = `${type} ${icon} ${colorClassName}`;
|
|
21896
21897
|
return (jsxRuntime.exports.jsx(CustomIconButton, __assign({}, props, { onClick: onClick, fluid: fluid, ref: forwardedRef, startIcon: jsxRuntime.exports.jsx(Icon$1, { iconName: icon, color: color === 'grey' ? 'disabled' : type === 'primary' ? 'white' : color }), className: finalClassName, variant: "contained", disableRipple: true }, { children: text })));
|
|
21897
|
-
}
|
|
21898
|
+
};
|
|
21898
21899
|
|
|
21899
21900
|
var _g$t;
|
|
21900
21901
|
function _extends$v() { _extends$v = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$v.apply(this, arguments); }
|
|
@@ -34870,7 +34871,7 @@ var StyledLogoWrapper = styled(Box)(function (_a) {
|
|
|
34870
34871
|
});
|
|
34871
34872
|
// @ts-ignore
|
|
34872
34873
|
var Logo = function (_a) {
|
|
34873
|
-
var logoName = _a.logoName,
|
|
34874
|
+
var logoName = _a.logoName, _b = _a.color, color = _b === void 0 ? 'red-navy' : _b, props = __rest(_a, ["logoName", "color"]);
|
|
34874
34875
|
return (jsxRuntime.exports.jsxs(StyledLogoWrapper, __assign({ className: color, color: color }, props, { children: [logoName === 'logo_xelcode' && jsxRuntime.exports.jsx(SvgLogoXelcode, {}), logoName === 'logo_xelcode_dashboard' && jsxRuntime.exports.jsx(SvgLogoXelcodeDashboard, {})] })));
|
|
34875
34876
|
};
|
|
34876
34877
|
|
|
@@ -34897,7 +34898,6 @@ var StyledBottomBarWrapper = styled(Box)(function (_a) {
|
|
|
34897
34898
|
},
|
|
34898
34899
|
});
|
|
34899
34900
|
});
|
|
34900
|
-
// @ts-ignore
|
|
34901
34901
|
var BottomBarComponent = function (_a) {
|
|
34902
34902
|
var buttons = _a.buttons, props = __rest(_a, ["buttons"]);
|
|
34903
34903
|
return (jsxRuntime.exports.jsx(StyledBottomBarWrapper, __assign({}, props, { children: buttons.map(function (item) {
|
|
@@ -34908,7 +34908,7 @@ var BottomBarComponent = function (_a) {
|
|
|
34908
34908
|
var text = (item === null || item === void 0 ? void 0 : item.text) || '';
|
|
34909
34909
|
var color = (item === null || item === void 0 ? void 0 : item.color) || 'navy-blue';
|
|
34910
34910
|
var size = (item === null || item === void 0 ? void 0 : item.size) || 'small';
|
|
34911
|
-
return (jsxRuntime.exports.jsx(CustomButtonComponent, { disabled: disabled, fluid: fluid, onClick: onClick && typeof onClick === "function" ? onClick :
|
|
34911
|
+
return (jsxRuntime.exports.jsx(CustomButtonComponent, { disabled: disabled, fluid: fluid, onClick: onClick && typeof onClick === "function" ? onClick : undefined, type: type, text: text, color: color, size: size }));
|
|
34912
34912
|
}) })));
|
|
34913
34913
|
};
|
|
34914
34914
|
|
|
@@ -34920,7 +34920,9 @@ var StyledInfoBar = styled('div')(function (_a) { return ({
|
|
|
34920
34920
|
width: '100%',
|
|
34921
34921
|
zIndex: 100,
|
|
34922
34922
|
}); });
|
|
34923
|
-
var StyledInfoRow = styled('div'
|
|
34923
|
+
var StyledInfoRow = styled('div', {
|
|
34924
|
+
shouldForwardProp: function (prop) { return prop !== "noLogo"; }
|
|
34925
|
+
})(function (_a) {
|
|
34924
34926
|
var noLogo = _a.noLogo;
|
|
34925
34927
|
return ({
|
|
34926
34928
|
boxSizing: 'border-box',
|
|
@@ -34943,13 +34945,7 @@ var StyledInfoRow = styled('div')(function (_a) {
|
|
|
34943
34945
|
// @ts-ignore
|
|
34944
34946
|
var BottomInfoBar = function (_a) {
|
|
34945
34947
|
var _b = _a.noLogo, noLogo = _b === void 0 ? false : _b, _c = _a.leftText, leftText = _c === void 0 ? 'left' : _c, _d = _a.rightText, rightText = _d === void 0 ? 'right' : _d, onRightTextClick = _a.onRightTextClick;
|
|
34946
|
-
return (jsxRuntime.exports.jsx(StyledInfoBar, { children: jsxRuntime.exports.jsxs(StyledInfoRow, __assign({ noLogo: noLogo }, { children: [jsxRuntime.exports.jsx("div", { children: jsxRuntime.exports.jsx(CustomButtonComponent, { type: "ghost", text: leftText, color: "grey", disabled: true }) }), !noLogo && (jsxRuntime.exports.jsx("a", __assign({ href: "https://xelcode.com/", target: "_blank" }, { children: jsxRuntime.exports.jsx(Logo, { logoName: "logo_xelcode" }) }))), jsxRuntime.exports.jsx("div", { children: jsxRuntime.exports.jsx(CustomButtonComponent, { type: "ghost", text: rightText, color: "red", onClick: function () { return onRightTextClick && typeof onRightTextClick === "function" ? onRightTextClick() : null; } }) })] })) }));
|
|
34947
|
-
};
|
|
34948
|
-
BottomInfoBar.propTypes = {
|
|
34949
|
-
noLogo: propTypes.exports.bool,
|
|
34950
|
-
leftText: propTypes.exports.string,
|
|
34951
|
-
rightText: propTypes.exports.string,
|
|
34952
|
-
onRightTextClick: propTypes.exports.func,
|
|
34948
|
+
return (jsxRuntime.exports.jsx(StyledInfoBar, { children: jsxRuntime.exports.jsxs(StyledInfoRow, __assign({ noLogo: noLogo }, { children: [jsxRuntime.exports.jsx("div", { children: jsxRuntime.exports.jsx(CustomButtonComponent, { type: "ghost", text: leftText, color: "grey", disabled: true }) }), !noLogo && (jsxRuntime.exports.jsx("a", __assign({ href: "https://xelcode.com/", target: "_blank" }, { children: jsxRuntime.exports.jsx(Logo, { logoName: "logo_xelcode" }) }))), jsxRuntime.exports.jsx("div", { children: jsxRuntime.exports.jsx(CustomButtonComponent, { type: "ghost", text: rightText, color: "red", onClick: function (e) { return onRightTextClick && typeof onRightTextClick === "function" ? onRightTextClick(e) : null; } }) })] })) }));
|
|
34953
34949
|
};
|
|
34954
34950
|
|
|
34955
34951
|
/**
|
|
@@ -36252,7 +36248,7 @@ process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes /* remove-pro
|
|
|
36252
36248
|
value: propTypes.exports.any
|
|
36253
36249
|
} : void 0;
|
|
36254
36250
|
|
|
36255
|
-
var StyledFormControlLabel = styled(
|
|
36251
|
+
var StyledFormControlLabel = styled(FormControlLabel)(function (_a) { return ({
|
|
36256
36252
|
boxSizing: 'border-box',
|
|
36257
36253
|
marginBottom: '30px',
|
|
36258
36254
|
marginLeft: 0,
|
|
@@ -36361,7 +36357,7 @@ var StyledCheckbox = styled(Checkbox)(function () {
|
|
|
36361
36357
|
});
|
|
36362
36358
|
});
|
|
36363
36359
|
var CheckboxComponent = function (_a) {
|
|
36364
|
-
var disabled = _a.disabled, label = _a.label, checked = _a.checked, onChange = _a.onChange, indeterminate = _a.indeterminate,
|
|
36360
|
+
var disabled = _a.disabled, label = _a.label, checked = _a.checked, onChange = _a.onChange, indeterminate = _a.indeterminate, forwardedRef = _a.forwardedRef, props = __rest(_a, ["disabled", "label", "checked", "onChange", "indeterminate", "forwardedRef"]);
|
|
36365
36361
|
return (jsxRuntime.exports.jsx(FormGroup, { children: jsxRuntime.exports.jsx(StyledFormControlLabel, __assign({}, props, { ref: forwardedRef, classes: { disabled: 'disabled' }, control: jsxRuntime.exports.jsx(StyledCheckbox, { indeterminate: indeterminate, checked: checked, onChange: onChange, disabled: disabled, classes: { disabled: 'disabled' }, icon: jsxRuntime.exports.jsx(Icon$1, { iconName: "icon_checkbox_default", color: disabled ? 'disabled' : 'red-navy', style: { display: 'flex' } }), checkedIcon: jsxRuntime.exports.jsx(Icon$1, { iconName: "icon_checkbox_checked", color: disabled ? 'disabled' : 'red-navy', style: { display: 'flex' } }), indeterminateIcon: jsxRuntime.exports.jsx(Icon$1, { iconName: "icon_checkbox_indeterminate", color: disabled ? 'disabled' : 'red-navy', style: { display: 'flex' } }) }), label: label })) }));
|
|
36366
36362
|
};
|
|
36367
36363
|
|
|
@@ -81120,10 +81116,12 @@ process.env.NODE_ENV !== "production" ? DatePicker$1.propTypes = {
|
|
|
81120
81116
|
views: propTypes.exports.arrayOf(propTypes.exports.oneOf(['day', 'month', 'year']).isRequired)
|
|
81121
81117
|
} : void 0;
|
|
81122
81118
|
|
|
81123
|
-
var StyledDatePicker = styled(DatePicker$1
|
|
81119
|
+
var StyledDatePicker = styled(DatePicker$1, {
|
|
81120
|
+
shouldForwardProp: function (prop) { return prop !== "fluid"; }
|
|
81121
|
+
})(function (_a) {
|
|
81124
81122
|
var fluid = _a.fluid;
|
|
81125
81123
|
return ({
|
|
81126
|
-
width: fluid
|
|
81124
|
+
width: fluid ? '100%' : 'min(100%, 368px)',
|
|
81127
81125
|
color: theme.mainPallete.primary.blue,
|
|
81128
81126
|
label: {
|
|
81129
81127
|
zIndex: 0,
|
|
@@ -81162,7 +81160,7 @@ var StyledDatePicker = styled(DatePicker$1)(function (_a) {
|
|
|
81162
81160
|
},
|
|
81163
81161
|
},
|
|
81164
81162
|
'@media(min-width: 720px)': {
|
|
81165
|
-
width: fluid
|
|
81163
|
+
width: fluid ? '100%' : 'min(100%, 468px)',
|
|
81166
81164
|
'& label': {
|
|
81167
81165
|
transform: 'translate(20px,17px) scale(1)',
|
|
81168
81166
|
'&.Mui-focused, &.MuiFormLabel-filled': {
|
|
@@ -81179,7 +81177,7 @@ var StyledDatePicker = styled(DatePicker$1)(function (_a) {
|
|
|
81179
81177
|
},
|
|
81180
81178
|
},
|
|
81181
81179
|
'@media(min-width: 1020px)': {
|
|
81182
|
-
width: fluid
|
|
81180
|
+
width: fluid ? '100%' : 'min(100%, 268px)',
|
|
81183
81181
|
'& label': {
|
|
81184
81182
|
transform: 'translate(20px,10px) scale(1)',
|
|
81185
81183
|
'&.Mui-focused, &.MuiFormLabel-filled': {
|
|
@@ -81197,7 +81195,7 @@ var StyledDatePicker = styled(DatePicker$1)(function (_a) {
|
|
|
81197
81195
|
},
|
|
81198
81196
|
});
|
|
81199
81197
|
});
|
|
81200
|
-
var pickerStyles = function (
|
|
81198
|
+
var pickerStyles = function () { return ({
|
|
81201
81199
|
'&.MuiPaper-root, .MuiPaper-root': {
|
|
81202
81200
|
borderRadius: 2,
|
|
81203
81201
|
boxShadow: '0 3px 6px #252A674D',
|
|
@@ -81299,28 +81297,32 @@ var pickerStyles = function (theme) { return ({
|
|
|
81299
81297
|
},
|
|
81300
81298
|
},
|
|
81301
81299
|
}); };
|
|
81302
|
-
var PickerIcon = React__namespace.forwardRef(function (props, ref) {
|
|
81300
|
+
var PickerIcon = React__namespace.forwardRef(function (props, ref) {
|
|
81301
|
+
return jsxRuntime.exports.jsx(Icon$1, __assign({}, props, { iconName: "icon_wf_calendar",
|
|
81302
|
+
// color={props.disabled ? 'disabled' : 'red-navy'}
|
|
81303
|
+
forwardedRef: ref, style: { display: 'flex' } }));
|
|
81304
|
+
});
|
|
81303
81305
|
var DatePicker = function (_a) {
|
|
81304
|
-
var value = _a.value, onChange = _a.onChange, _b = _a.label, label = _b === void 0 ? 'Date Picker' : _b
|
|
81305
|
-
|
|
81306
|
-
|
|
81307
|
-
// fluid={fluid === true ? 'true' : 'false'}
|
|
81306
|
+
var value = _a.value, onChange = _a.onChange, _b = _a.label, label = _b === void 0 ? 'Date Picker' : _b, _c = _a.fluid, fluid = _c === void 0 ? false : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, forwardedRef = _a.forwardedRef, props = __rest(_a, ["value", "onChange", "label", "fluid", "disabled", "forwardedRef"]);
|
|
81307
|
+
return (jsxRuntime.exports.jsx(LocalizationProvider, __assign({ dateAdapter: AdapterDateFns }, { children: jsxRuntime.exports.jsx(StyledDatePicker, { label: label, value: value, desktopModeMediaQuery: '@media (min-width: 1020px)', disabled: disabled, inputProps: props, inputRef: forwardedRef, fluid: fluid,
|
|
81308
|
+
// @ts-ignore
|
|
81308
81309
|
onChange: onChange, components: {
|
|
81309
81310
|
OpenPickerIcon: function (props) { return jsxRuntime.exports.jsx(PickerIcon, __assign({}, props, { disabled: disabled })); },
|
|
81310
81311
|
SwitchViewButton: undefined,
|
|
81311
81312
|
SwitchViewIcon: undefined,
|
|
81312
81313
|
}, PaperProps: {
|
|
81313
|
-
sx: pickerStyles(
|
|
81314
|
+
sx: pickerStyles()
|
|
81314
81315
|
}, DialogProps: {
|
|
81315
|
-
sx: pickerStyles(
|
|
81316
|
+
sx: pickerStyles()
|
|
81316
81317
|
}, renderInput: function (params) { return jsxRuntime.exports.jsx(TextField$1, __assign({}, params)); } }) })));
|
|
81317
81318
|
};
|
|
81318
81319
|
|
|
81319
|
-
|
|
81320
|
-
|
|
81320
|
+
var StyledTextField = styled(TextField$1, {
|
|
81321
|
+
shouldForwardProp: function (prop) { return prop !== "fluid" && prop !== "small"; }
|
|
81322
|
+
})(function (_a) {
|
|
81321
81323
|
var fluid = _a.fluid, small = _a.small;
|
|
81322
81324
|
return ({
|
|
81323
|
-
width: fluid
|
|
81325
|
+
width: fluid ? '100%' : 'min(100%, 368px)',
|
|
81324
81326
|
'& .MuiOutlinedInput-root': {
|
|
81325
81327
|
color: theme.mainPallete.primary.blue,
|
|
81326
81328
|
borderRadius: 7,
|
|
@@ -81399,7 +81401,7 @@ var StyledTextField = styled(TextField$1)(function (_a) {
|
|
|
81399
81401
|
fontSize: 14,
|
|
81400
81402
|
},
|
|
81401
81403
|
'@media(min-width: 720px)': {
|
|
81402
|
-
width: fluid
|
|
81404
|
+
width: fluid ? '100%' : 'min(100%, 468px)',
|
|
81403
81405
|
'& label': {
|
|
81404
81406
|
transform: small ? 'translate(20px,6px) scale(1)' : 'translate(20px,17px) scale(1)',
|
|
81405
81407
|
'&.Mui-focused, &.MuiFormLabel-filled': {
|
|
@@ -81418,7 +81420,7 @@ var StyledTextField = styled(TextField$1)(function (_a) {
|
|
|
81418
81420
|
},
|
|
81419
81421
|
},
|
|
81420
81422
|
'@media(min-width: 1024px)': {
|
|
81421
|
-
width: fluid
|
|
81423
|
+
width: fluid ? '100%' : 'min(100%, 268px)',
|
|
81422
81424
|
'& label': {
|
|
81423
81425
|
transform: small ? 'translate(20px,6px) scale(1)' : 'translate(20px,10px) scale(1)',
|
|
81424
81426
|
'&.Mui-focused, &.MuiFormLabel-filled': {
|
|
@@ -81440,13 +81442,12 @@ var StyledTextField = styled(TextField$1)(function (_a) {
|
|
|
81440
81442
|
});
|
|
81441
81443
|
var TextField = function (_a) {
|
|
81442
81444
|
var _b = _a.label, label = _b === void 0 ? 'TextField' : _b, _c = _a.error, error = _c === void 0 ? false : _c, _d = _a.icon, icon = _d === void 0 ? 'icon_wf_keyboard' : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.fluid, fluid = _f === void 0 ? false : _f, _g = _a.type, type = _g === void 0 ? 'text' : _g, _h = _a.min, min = _h === void 0 ? '' : _h, _j = _a.max, max = _j === void 0 ? '' : _j, _k = _a.small, small = _k === void 0 ? false : _k, _l = _a.helperText, helperText = _l === void 0 ? '' : _l, _m = _a.value, value = _m === void 0 ? '' : _m, onChange = _a.onChange, onBlur = _a.onBlur, forwardedRef = _a.forwardedRef, _o = _a.endAdornment, endAdornment = _o === void 0 ? '' : _o, props = __rest(_a, ["label", "error", "icon", "disabled", "fluid", "type", "min", "max", "small", "helperText", "value", "onChange", "onBlur", "forwardedRef", "endAdornment"]);
|
|
81443
|
-
|
|
81444
|
-
return (jsxRuntime.exports.jsx(StyledTextField, __assign({}, props, { value: value, onChange: onChange, label: label, type: type, variant: "outlined", error: error, onBlur: onBlur, disabled: disabled, helperText: error ? helperText : '', fluid: fluid === true ? 'true' : 'false', ref: forwardedRef, small: small, InputProps: {
|
|
81445
|
+
return (jsxRuntime.exports.jsx(StyledTextField, __assign({}, props, { value: value, onChange: onChange, label: label, type: type, variant: "outlined", error: error, onBlur: onBlur, disabled: disabled, helperText: error ? helperText : '', fluid: fluid, ref: forwardedRef, small: small, InputProps: {
|
|
81445
81446
|
inputProps: {
|
|
81446
81447
|
min: min,
|
|
81447
81448
|
max: max,
|
|
81448
81449
|
},
|
|
81449
|
-
endAdornment: jsxRuntime.exports.jsx(InputAdornment, __assign({ position: "end" }, { children: endAdornment ? endAdornment : jsxRuntime.exports.jsx(Icon$1, { iconName: icon, color: disabled ? 'disabled' : error ? 'red' : 'red-navy', style: { display: 'flex', alignItems: 'center' }
|
|
81450
|
+
endAdornment: jsxRuntime.exports.jsx(InputAdornment, __assign({ position: "end" }, { children: endAdornment ? endAdornment : jsxRuntime.exports.jsx(Icon$1, { iconName: icon, color: disabled ? 'disabled' : error ? 'red' : 'red-navy', style: { display: 'flex', alignItems: 'center' } }) }))
|
|
81450
81451
|
} })));
|
|
81451
81452
|
};
|
|
81452
81453
|
|