techsbcn-storybook 0.21.2 → 0.21.3
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/index.d.ts +1 -0
- package/dist/techsbcn-storybook.cjs.development.js +78 -0
- package/dist/techsbcn-storybook.cjs.development.js.map +1 -1
- package/dist/techsbcn-storybook.cjs.production.min.js +1 -1
- package/dist/techsbcn-storybook.cjs.production.min.js.map +1 -1
- package/dist/techsbcn-storybook.esm.js +78 -1
- package/dist/techsbcn-storybook.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -20,3 +20,4 @@ export * from './components/forms/ResetPasswordForm';
|
|
|
20
20
|
export * from './components/modals/ModalComponent';
|
|
21
21
|
export * from './components/wrappers/TabsComponent/TabsComponent';
|
|
22
22
|
export * from './components/wrappers/LinearProgressComponent/LinearProgressComponent';
|
|
23
|
+
export * from './components/fields/DatePickerComponent/DatePickerComponent';
|
|
@@ -18,6 +18,8 @@ var yup = require('yup');
|
|
|
18
18
|
var reactHookForm = require('react-hook-form');
|
|
19
19
|
var yup$1 = require('@hookform/resolvers/yup');
|
|
20
20
|
var lab = require('@mui/lab');
|
|
21
|
+
var xDatePickers = require('@mui/x-date-pickers');
|
|
22
|
+
var AdapterDayjs = require('@mui/x-date-pickers/AdapterDayjs');
|
|
21
23
|
|
|
22
24
|
function styleInject(css, ref) {
|
|
23
25
|
if ( ref === void 0 ) ref = {};
|
|
@@ -3121,10 +3123,86 @@ var TabsComponent = function TabsComponent(props) {
|
|
|
3121
3123
|
}))));
|
|
3122
3124
|
};
|
|
3123
3125
|
|
|
3126
|
+
var css_248z$h = ".data-picker-component .MuiFormLabel-root {\n color: #666666 !important;\n font-size: calc(12pt + (14 - 12) * calc(100vw - 300px)/1300) !important;\n transform: translate(0, 0.5px) scale(0.85);\n transform-origin: top left;\n text-overflow: initial !important;\n}\n.data-picker-component .MuiFormLabel-root + .MuiInputBase-formControl {\n margin-top: 25px !important;\n}\n.data-picker-component .MuiInputBase-root.no-border {\n border: none !important;\n padding: 0 !important;\n width: fit-content !important;\n}\n.data-picker-component .MuiInputBase-root {\n color: #666666 !important;\n border: 1px solid grey;\n padding: 0.43rem 0.87rem;\n background-color: white !important;\n border-radius: 3px !important;\n}\n.data-picker-component .MuiInputBase-root.Mui-error {\n border: 1px solid #F24726 !important;\n}\n.data-picker-component .MuiInputBase-root:not(.Mui-disabled):hover {\n border: 1px solid grey;\n}\n.data-picker-component .MuiInputBase-root.Mui-focused {\n border: 1px solid #3299C7;\n}\n.data-picker-component .MuiInputBase-root .MuiInputBase-input {\n color: #666666 !important;\n background-color: white !important;\n}\n.data-picker-component .MuiInputBase-root .MuiInputBase-input::placeholder {\n text-overflow: ellipsis !important;\n color: #666666 !important;\n opacity: 1;\n}\n.data-picker-component .MuiInputBase-root .Mui-disabled {\n -webkit-text-fill-color: #666666 !important;\n}\n.data-picker-component .MuiFormHelperText-root {\n padding: 0 !important;\n font-size: 0.85rem !important;\n color: #666666;\n}";
|
|
3127
|
+
styleInject(css_248z$h);
|
|
3128
|
+
|
|
3129
|
+
var DatePickerComponent = function DatePickerComponent(props) {
|
|
3130
|
+
var _React$useState = React__default.useState(props.value),
|
|
3131
|
+
value = _React$useState[0],
|
|
3132
|
+
setValue = _React$useState[1];
|
|
3133
|
+
|
|
3134
|
+
var _React$useState2 = React__default.useState(false),
|
|
3135
|
+
hover = _React$useState2[0],
|
|
3136
|
+
setHover = _React$useState2[1];
|
|
3137
|
+
|
|
3138
|
+
return React__default.createElement(_.Box, {
|
|
3139
|
+
className: "data-picker-component",
|
|
3140
|
+
width: "100%"
|
|
3141
|
+
}, React__default.createElement(xDatePickers.LocalizationProvider, {
|
|
3142
|
+
dateAdapter: AdapterDayjs.AdapterDayjs
|
|
3143
|
+
}, React__default.createElement(xDatePickers.DatePicker, {
|
|
3144
|
+
value: value,
|
|
3145
|
+
maxDate: props.maxDate,
|
|
3146
|
+
minDate: props.minDate,
|
|
3147
|
+
disabled: props.disabled,
|
|
3148
|
+
inputFormat: props.inputFormat,
|
|
3149
|
+
inputRef: props.inputRef,
|
|
3150
|
+
disableMaskedInput: true,
|
|
3151
|
+
onChange: function onChange(d, e) {
|
|
3152
|
+
setValue(d);
|
|
3153
|
+
props.onChange(d, e);
|
|
3154
|
+
},
|
|
3155
|
+
renderDay: function renderDay(_day, _selectedDays, pickersDayProps) {
|
|
3156
|
+
return React__default.createElement(xDatePickers.PickersDay, Object.assign({}, pickersDayProps, {
|
|
3157
|
+
classes: {
|
|
3158
|
+
selected: 'main-background-color'
|
|
3159
|
+
}
|
|
3160
|
+
}));
|
|
3161
|
+
},
|
|
3162
|
+
renderInput: function renderInput(params) {
|
|
3163
|
+
var _params$InputProps;
|
|
3164
|
+
|
|
3165
|
+
return React__default.createElement(_.TextField, Object.assign({}, params, {
|
|
3166
|
+
onMouseEnter: function onMouseEnter() {
|
|
3167
|
+
return setHover(true);
|
|
3168
|
+
},
|
|
3169
|
+
onMouseLeave: function onMouseLeave() {
|
|
3170
|
+
return setHover(false);
|
|
3171
|
+
},
|
|
3172
|
+
name: props.name,
|
|
3173
|
+
error: props.error,
|
|
3174
|
+
id: props.id,
|
|
3175
|
+
label: props.label,
|
|
3176
|
+
className: props.className,
|
|
3177
|
+
required: props.required,
|
|
3178
|
+
variant: "standard",
|
|
3179
|
+
InputProps: {
|
|
3180
|
+
className: (props.noBorders ? 'no-border' : '') + " " + (!props.disabled && hover ? 'main-border-color' : ''),
|
|
3181
|
+
disableUnderline: true,
|
|
3182
|
+
startAdornment: props.startIcon,
|
|
3183
|
+
endAdornment: (_params$InputProps = params.InputProps) == null ? void 0 : _params$InputProps.endAdornment,
|
|
3184
|
+
classes: {
|
|
3185
|
+
focused: 'main-border-color'
|
|
3186
|
+
}
|
|
3187
|
+
},
|
|
3188
|
+
InputLabelProps: {
|
|
3189
|
+
shrink: true
|
|
3190
|
+
},
|
|
3191
|
+
helperText: props.helperText,
|
|
3192
|
+
fullWidth: props.fullWidth
|
|
3193
|
+
}));
|
|
3194
|
+
}
|
|
3195
|
+
})));
|
|
3196
|
+
};
|
|
3197
|
+
DatePickerComponent.defaultProps = {
|
|
3198
|
+
fullWidth: true
|
|
3199
|
+
};
|
|
3200
|
+
|
|
3124
3201
|
exports.AppHeader = AppHeader;
|
|
3125
3202
|
exports.AppSidebar = AppSidebar;
|
|
3126
3203
|
exports.ButtonComponent = ButtonComponent;
|
|
3127
3204
|
exports.ChangePasswordForm = ChangePasswordForm;
|
|
3205
|
+
exports.DatePickerComponent = DatePickerComponent;
|
|
3128
3206
|
exports.DrawerSidebar = DrawerSidebar;
|
|
3129
3207
|
exports.LinearProgressComponent = LinearProgressComponent;
|
|
3130
3208
|
exports.LoginForm = LoginForm;
|