odaptos_design_system 1.4.37 → 1.4.38
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/DatePicker/DatePicker.d.ts +1 -2
- package/dist/TimePicker/TimePicker.d.ts +1 -2
- package/dist/odaptos_design_system.cjs.development.js +349 -14
- package/dist/odaptos_design_system.cjs.development.js.map +1 -1
- package/dist/odaptos_design_system.cjs.production.min.js +1 -1
- package/dist/odaptos_design_system.cjs.production.min.js.map +1 -1
- package/dist/odaptos_design_system.esm.js +338 -5
- package/dist/odaptos_design_system.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/DatePicker/DatePicker.tsx +1 -3
- package/src/TimePicker/TimePicker.tsx +1 -3
|
@@ -28,5 +28,4 @@ export interface DatePickerProps {
|
|
|
28
28
|
renderLoading?: () => React.ReactNode;
|
|
29
29
|
onChange?: (date: Date | Dayjs | null) => void;
|
|
30
30
|
}
|
|
31
|
-
declare const DatePicker: React.FC<DatePickerProps>;
|
|
32
|
-
export default DatePicker;
|
|
31
|
+
export declare const DatePicker: React.FC<DatePickerProps>;
|
|
@@ -8,7 +8,7 @@ var React = require('react');
|
|
|
8
8
|
var React__default = _interopDefault(React);
|
|
9
9
|
var material = require('@mui/material');
|
|
10
10
|
var Autocomplete = _interopDefault(require('@mui/material/Autocomplete'));
|
|
11
|
-
var styles$
|
|
11
|
+
var styles$H = require('@mui/material/styles');
|
|
12
12
|
var TextField = _interopDefault(require('@mui/material/TextField'));
|
|
13
13
|
var Chip = _interopDefault(require('@mui/material/Chip'));
|
|
14
14
|
var Grid = _interopDefault(require('@mui/material/Grid'));
|
|
@@ -22,16 +22,16 @@ var Popover$1 = _interopDefault(require('@mui/material/Popover'));
|
|
|
22
22
|
var dayjs = _interopDefault(require('dayjs'));
|
|
23
23
|
var utc = _interopDefault(require('dayjs/plugin/utc'));
|
|
24
24
|
var timezone = _interopDefault(require('dayjs/plugin/timezone'));
|
|
25
|
-
require('@mui/x-date-pickers/AdapterDayjs');
|
|
25
|
+
var AdapterDayjs = require('@mui/x-date-pickers/AdapterDayjs');
|
|
26
26
|
require('dayjs/locale/en');
|
|
27
27
|
require('dayjs/locale/en-gb');
|
|
28
28
|
require('dayjs/locale/fr');
|
|
29
29
|
require('dayjs/locale/it');
|
|
30
30
|
require('dayjs/locale/de');
|
|
31
31
|
require('dayjs/locale/es');
|
|
32
|
-
require('@mui/x-date-pickers');
|
|
33
|
-
require('@mui/x-date-pickers/DatePicker');
|
|
34
|
-
require('@mui/x-date-pickers/TimePicker');
|
|
32
|
+
var xDatePickers = require('@mui/x-date-pickers');
|
|
33
|
+
var DatePicker$1 = require('@mui/x-date-pickers/DatePicker');
|
|
34
|
+
var TimePicker$1 = require('@mui/x-date-pickers/TimePicker');
|
|
35
35
|
|
|
36
36
|
function styleInject(css, ref) {
|
|
37
37
|
if ( ref === void 0 ) ref = {};
|
|
@@ -4312,7 +4312,7 @@ var css_248z$4 = ".SingleSelect-modules_newAutocomplete__AgBoW{min-width:16rem;w
|
|
|
4312
4312
|
var styles$4 = {"newAutocomplete":"SingleSelect-modules_newAutocomplete__AgBoW","MuiAutocomplete-endAdornment":"SingleSelect-modules_MuiAutocomplete-endAdornment__3kdFk","tags-container":"SingleSelect-modules_tags-container__bWCQt","input_top_label":"SingleSelect-modules_input_top_label__a6UdT","MuiOutlinedInput-root":"SingleSelect-modules_MuiOutlinedInput-root__RuMrq","MuiInputBase-root":"SingleSelect-modules_MuiInputBase-root__ByCLC","MuiInputBase-formControl":"SingleSelect-modules_MuiInputBase-formControl__5hTna","text_below":"SingleSelect-modules_text_below__9S4k5","icon":"SingleSelect-modules_icon__2WnMK"};
|
|
4313
4313
|
styleInject(css_248z$4);
|
|
4314
4314
|
|
|
4315
|
-
const CssTextField = /*#__PURE__*/styles$
|
|
4315
|
+
const CssTextField = /*#__PURE__*/styles$H.styled(material.TextField)({
|
|
4316
4316
|
'& .MuiInputBase-input': {
|
|
4317
4317
|
color: '#26292E',
|
|
4318
4318
|
fontFamily: 'OpenSans !important',
|
|
@@ -4508,7 +4508,7 @@ var css_248z$5 = ".Checkbox-module_checkboxContainer__1EvhC{align-items:center;d
|
|
|
4508
4508
|
var styles$5 = {"checkboxContainer":"Checkbox-module_checkboxContainer__1EvhC"};
|
|
4509
4509
|
styleInject(css_248z$5);
|
|
4510
4510
|
|
|
4511
|
-
const BpIcon = /*#__PURE__*/styles$
|
|
4511
|
+
const BpIcon = /*#__PURE__*/styles$H.styled('span')(() => ({
|
|
4512
4512
|
borderRadius: '0.25rem',
|
|
4513
4513
|
border: `1px solid #8A8B8E`,
|
|
4514
4514
|
width: '1rem',
|
|
@@ -4527,7 +4527,7 @@ const BpIcon = /*#__PURE__*/styles$F.styled('span')(() => ({
|
|
|
4527
4527
|
cursor: 'not-allowed'
|
|
4528
4528
|
}
|
|
4529
4529
|
}));
|
|
4530
|
-
const BpCheckedIcon = /*#__PURE__*/styles$
|
|
4530
|
+
const BpCheckedIcon = /*#__PURE__*/styles$H.styled(BpIcon)({
|
|
4531
4531
|
backgroundColor: '#0077FF',
|
|
4532
4532
|
backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))',
|
|
4533
4533
|
border: `1px solid #0077FF`,
|
|
@@ -4608,7 +4608,7 @@ var css_248z$6 = ".MultiSelect-modules_newAutocomplete__dsOV3{min-width:16rem;wi
|
|
|
4608
4608
|
var styles$6 = {"newAutocomplete":"MultiSelect-modules_newAutocomplete__dsOV3","MuiAutocomplete-endAdornment":"MultiSelect-modules_MuiAutocomplete-endAdornment__FAnRY","tags_container":"MultiSelect-modules_tags_container__zBxat","MuiOutlinedInput-root":"MultiSelect-modules_MuiOutlinedInput-root__23gRS","MuiInputBase-root":"MultiSelect-modules_MuiInputBase-root__Ha7z-","MuiInputBase-formControl":"MultiSelect-modules_MuiInputBase-formControl__IJ5Za","no_scrollbar":"MultiSelect-modules_no_scrollbar__y-0D5","input_top_label":"MultiSelect-modules_input_top_label__AHEc-","text_below":"MultiSelect-modules_text_below__F3i4T","icon":"MultiSelect-modules_icon__UxL7a"};
|
|
4609
4609
|
styleInject(css_248z$6);
|
|
4610
4610
|
|
|
4611
|
-
const CssTextField$1 = /*#__PURE__*/styles$
|
|
4611
|
+
const CssTextField$1 = /*#__PURE__*/styles$H.styled(TextField)({
|
|
4612
4612
|
'& .MuiInputBase-input': {
|
|
4613
4613
|
color: '#26292E',
|
|
4614
4614
|
fontFamily: 'OpenSans !important',
|
|
@@ -5471,7 +5471,7 @@ var css_248z$i = ".Radio-module_radioBtnWrapper__ZE-oy{align-items:center;displa
|
|
|
5471
5471
|
var styles$i = {"radioBtnWrapper":"Radio-module_radioBtnWrapper__ZE-oy","MuiRadio-root":"Radio-module_MuiRadio-root__1Mw0W"};
|
|
5472
5472
|
styleInject(css_248z$i);
|
|
5473
5473
|
|
|
5474
|
-
const BpIcon$1 = /*#__PURE__*/styles$
|
|
5474
|
+
const BpIcon$1 = /*#__PURE__*/styles$H.styled('span')(() => ({
|
|
5475
5475
|
borderRadius: '50%',
|
|
5476
5476
|
width: 16,
|
|
5477
5477
|
height: 16,
|
|
@@ -5487,7 +5487,7 @@ const BpIcon$1 = /*#__PURE__*/styles$F.styled('span')(() => ({
|
|
|
5487
5487
|
background: 'rgba(206,217,224,.5)'
|
|
5488
5488
|
}
|
|
5489
5489
|
}));
|
|
5490
|
-
const BpCheckedIcon$1 = /*#__PURE__*/styles$
|
|
5490
|
+
const BpCheckedIcon$1 = /*#__PURE__*/styles$H.styled(BpIcon$1)({
|
|
5491
5491
|
backgroundColor: '#0077FF',
|
|
5492
5492
|
border: 'none',
|
|
5493
5493
|
width: 18,
|
|
@@ -5693,7 +5693,7 @@ const TooltipLayout = ({
|
|
|
5693
5693
|
})));
|
|
5694
5694
|
};
|
|
5695
5695
|
|
|
5696
|
-
const StyledTooltip = /*#__PURE__*/styles$
|
|
5696
|
+
const StyledTooltip = /*#__PURE__*/styles$H.styled(material.Tooltip)({
|
|
5697
5697
|
[`& .${Tooltip$1.tooltipClasses.tooltip}`]: {
|
|
5698
5698
|
backgroundColor: '#fff'
|
|
5699
5699
|
}
|
|
@@ -6089,7 +6089,7 @@ var css_248z$t = ".TextInput-modules_input__3djVU{font-family:var(--sdFontFamily
|
|
|
6089
6089
|
var styles$t = {"input":"TextInput-modules_input__3djVU","MuiInputBase-root-MuiOutlinedInput-root":"TextInput-modules_MuiInputBase-root-MuiOutlinedInput-root__RL51v","input_top_label":"TextInput-modules_input_top_label__JRakx","MuiInputBase-input":"TextInput-modules_MuiInputBase-input__P8rMx","text_below":"TextInput-modules_text_below__lGHF-"};
|
|
6090
6090
|
styleInject(css_248z$t);
|
|
6091
6091
|
|
|
6092
|
-
const CssTextField$2 = /*#__PURE__*/styles$
|
|
6092
|
+
const CssTextField$2 = /*#__PURE__*/styles$H.styled(material.TextField)({
|
|
6093
6093
|
'& .MuiInputBase-input': {
|
|
6094
6094
|
color: '#26292E',
|
|
6095
6095
|
fontFamily: 'OpenSans !important',
|
|
@@ -6666,7 +6666,7 @@ var css_248z$C = ".Task-modules_task_container__Iaqc-{align-items:flex-start;bac
|
|
|
6666
6666
|
var styles$C = {"task_container":"Task-modules_task_container__Iaqc-","header":"Task-modules_header__f15OM","header_left":"Task-modules_header_left__JJTGR","header_right":"Task-modules_header_right__AymtU","title":"Task-modules_title__-OmPh","disabled_task":"Task-modules_disabled_task__NI6LL","active_task":"Task-modules_active_task__l-n9Q","taskContent":"Task-modules_taskContent__v3Cm1","taskPopover":"Task-modules_taskPopover__S07XU","notesContainer":"Task-modules_notesContainer__dz0Me","actionBtnsContainer":"Task-modules_actionBtnsContainer__Dz-1j","popover_paper":"Task-modules_popover_paper__Re-kl","MuiPopover-root":"Task-modules_MuiPopover-root__w6O-O","MuiPopover-paper":"Task-modules_MuiPopover-paper__7p4Tk"};
|
|
6667
6667
|
styleInject(css_248z$C);
|
|
6668
6668
|
|
|
6669
|
-
const CustomPopover = /*#__PURE__*/styles$
|
|
6669
|
+
const CustomPopover = /*#__PURE__*/styles$H.styled(Popover$1)({
|
|
6670
6670
|
'& .MuiPopover-root': {
|
|
6671
6671
|
borderRadius: '0.5rem',
|
|
6672
6672
|
background: 'transparent'
|
|
@@ -6853,16 +6853,349 @@ const WelcomeMessage = ({
|
|
|
6853
6853
|
};
|
|
6854
6854
|
|
|
6855
6855
|
var css_248z$F = ".DatePicker-modules_date_picker__wFy4Q{min-width:16rem;width:100%}.DatePicker-modules_date_picker__wFy4Q label,.DatePicker-modules_date_picker__wFy4Q span{font-family:OpenSans;font-size:1rem;font-style:normal;font-weight:400;letter-spacing:.03em;line-height:1.3;margin:unset;text-align:left}.DatePicker-modules_date_picker__wFy4Q .DatePicker-modules_MuiAutocomplete-endAdornment__JKyn2{display:flex;gap:.5rem;margin-top:-.35rem!important}.DatePicker-modules_date_picker__wFy4Q input{font-family:var(--sdFontFamilyOpenSans);font-size:var(--sdTypoTextNoDecorationRegularBase);font-style:normal;font-weight:var(--sdFontWeightRegular);letter-spacing:var(--sdLetterSpacingButtons);line-height:var(--sdLineHeight130);margin:unset;padding:8.5px 14px;text-align:left}.DatePicker-modules_date_picker__wFy4Q svg{height:.75rem;width:.75rem}.DatePicker-modules_input_top_label__Qr2GZ{margin-bottom:.625rem}.DatePicker-modules_MuiOutlinedInput-root__B9JxV.DatePicker-modules_MuiInputBase-root__RWfL0.DatePicker-modules_MuiInputBase-formControl__iPq27{align-items:center;display:flex;flex-direction:row}.DatePicker-modules_text_below__YJl9p{margin:.25rem .5rem .25rem .75rem}.DatePicker-modules_icon__bNSRQ{height:1rem!important;margin-left:.25rem;width:1rem!important}";
|
|
6856
|
+
var styles$F = {"date_picker":"DatePicker-modules_date_picker__wFy4Q","MuiAutocomplete-endAdornment":"DatePicker-modules_MuiAutocomplete-endAdornment__JKyn2","input_top_label":"DatePicker-modules_input_top_label__Qr2GZ","MuiOutlinedInput-root":"DatePicker-modules_MuiOutlinedInput-root__B9JxV","MuiInputBase-root":"DatePicker-modules_MuiInputBase-root__RWfL0","MuiInputBase-formControl":"DatePicker-modules_MuiInputBase-formControl__iPq27","text_below":"DatePicker-modules_text_below__YJl9p","icon":"DatePicker-modules_icon__bNSRQ"};
|
|
6856
6857
|
styleInject(css_248z$F);
|
|
6857
6858
|
|
|
6859
|
+
const CssTextField$3 = /*#__PURE__*/styles$H.styled(material.TextField)({
|
|
6860
|
+
'& .MuiInputBase-input': {
|
|
6861
|
+
color: '#26292E',
|
|
6862
|
+
fontFamily: 'OpenSans !important',
|
|
6863
|
+
fontSize: '1rem'
|
|
6864
|
+
},
|
|
6865
|
+
'& .MuiInputBase-input.Mui-disabled': {
|
|
6866
|
+
color: '#26292E',
|
|
6867
|
+
fontFamily: 'OpenSans !important',
|
|
6868
|
+
fontSize: '1rem'
|
|
6869
|
+
},
|
|
6870
|
+
'& .Mui-error': {
|
|
6871
|
+
color: '#26292E'
|
|
6872
|
+
},
|
|
6873
|
+
'& .MuiFormHelperText-root': {
|
|
6874
|
+
color: '#F54C4C'
|
|
6875
|
+
},
|
|
6876
|
+
'& .MuiFormLabel-asterisk': {
|
|
6877
|
+
color: '#F54C4C'
|
|
6878
|
+
},
|
|
6879
|
+
'& .MuiOutlinedInput-root.Mui-disabled': {
|
|
6880
|
+
cursor: 'not-allowed',
|
|
6881
|
+
color: '#26292E',
|
|
6882
|
+
fieldset: {
|
|
6883
|
+
borderColor: '#BCBDBE'
|
|
6884
|
+
},
|
|
6885
|
+
'&:hover fieldset': {
|
|
6886
|
+
borderColor: '#66adff'
|
|
6887
|
+
}
|
|
6888
|
+
},
|
|
6889
|
+
'& label': {
|
|
6890
|
+
color: '#26292E',
|
|
6891
|
+
fontFamily: 'OpenSans !important',
|
|
6892
|
+
fontSize: '1rem'
|
|
6893
|
+
},
|
|
6894
|
+
'& label.Mui-disabled.Mui-error': {
|
|
6895
|
+
color: '#26292E',
|
|
6896
|
+
opacity: 0.5,
|
|
6897
|
+
fontFamily: 'OpenSans !important',
|
|
6898
|
+
fontSize: '1rem'
|
|
6899
|
+
},
|
|
6900
|
+
'& label.Mui-focused': {
|
|
6901
|
+
color: '#26292E',
|
|
6902
|
+
fontFamily: 'OpenSans',
|
|
6903
|
+
fontSize: '1rem',
|
|
6904
|
+
backgroundColor: '#fff',
|
|
6905
|
+
marginRight: 5,
|
|
6906
|
+
paddingRight: 5
|
|
6907
|
+
},
|
|
6908
|
+
'& .MuiOutlinedInput-root': {
|
|
6909
|
+
fontFamily: 'OpenSans',
|
|
6910
|
+
'& fieldset': {
|
|
6911
|
+
borderColor: '#96989A'
|
|
6912
|
+
},
|
|
6913
|
+
'& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button': {
|
|
6914
|
+
display: 'none'
|
|
6915
|
+
},
|
|
6916
|
+
'& input[type=number]': {
|
|
6917
|
+
MozAppearance: 'textfield'
|
|
6918
|
+
},
|
|
6919
|
+
'&:hover fieldset': {
|
|
6920
|
+
borderColor: '#0077FF'
|
|
6921
|
+
},
|
|
6922
|
+
'&.Mui-focused fieldset': {
|
|
6923
|
+
borderColor: '#0077FF'
|
|
6924
|
+
},
|
|
6925
|
+
'&.Mui-error fieldset': {
|
|
6926
|
+
borderColor: '#F54C4C'
|
|
6927
|
+
},
|
|
6928
|
+
'&.Mui-disabled .Mui-focused fieldset': {
|
|
6929
|
+
borderColor: 'rgba(0, 119, 255, 0.5)'
|
|
6930
|
+
},
|
|
6931
|
+
'& .MuiAutocomplete-endAdornment': {
|
|
6932
|
+
height: '99%',
|
|
6933
|
+
marginTop: '-0.20rem',
|
|
6934
|
+
'& .MuiButtonBase-root': {
|
|
6935
|
+
height: '99%',
|
|
6936
|
+
'&:hover': {
|
|
6937
|
+
background: 'transparent'
|
|
6938
|
+
}
|
|
6939
|
+
}
|
|
6940
|
+
}
|
|
6941
|
+
}
|
|
6942
|
+
});
|
|
6858
6943
|
dayjs.extend(utc);
|
|
6859
6944
|
dayjs.extend(timezone);
|
|
6945
|
+
const DatePicker = ({
|
|
6946
|
+
className,
|
|
6947
|
+
label,
|
|
6948
|
+
value,
|
|
6949
|
+
openTo = 'day',
|
|
6950
|
+
format,
|
|
6951
|
+
disabled,
|
|
6952
|
+
disableFuture,
|
|
6953
|
+
disablePast,
|
|
6954
|
+
loading,
|
|
6955
|
+
locale = 'en',
|
|
6956
|
+
maxDate,
|
|
6957
|
+
minDate,
|
|
6958
|
+
placeholder,
|
|
6959
|
+
required,
|
|
6960
|
+
error,
|
|
6961
|
+
errorText,
|
|
6962
|
+
helperText,
|
|
6963
|
+
timezone = dayjs.tz.guess(),
|
|
6964
|
+
//Guess the user's timezone
|
|
6965
|
+
renderLoading,
|
|
6966
|
+
onChange
|
|
6967
|
+
}) => {
|
|
6968
|
+
//Convert everything to dayjs format
|
|
6969
|
+
if (value && !dayjs.isDayjs(value)) {
|
|
6970
|
+
value = dayjs(value);
|
|
6971
|
+
}
|
|
6972
|
+
if (maxDate && !dayjs.isDayjs(maxDate)) {
|
|
6973
|
+
maxDate = dayjs(maxDate);
|
|
6974
|
+
}
|
|
6975
|
+
if (minDate && !dayjs.isDayjs(minDate)) {
|
|
6976
|
+
minDate = dayjs(minDate);
|
|
6977
|
+
}
|
|
6978
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
6979
|
+
style: {
|
|
6980
|
+
width: '100%'
|
|
6981
|
+
}
|
|
6982
|
+
}, /*#__PURE__*/React__default.createElement(xDatePickers.LocalizationProvider, {
|
|
6983
|
+
dateAdapter: AdapterDayjs.AdapterDayjs,
|
|
6984
|
+
adapterLocale: locale
|
|
6985
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6986
|
+
className: className || styles$F.date_picker
|
|
6987
|
+
}, /*#__PURE__*/React__default.createElement(DatePicker$1.DatePicker, {
|
|
6988
|
+
label: label,
|
|
6989
|
+
value: value,
|
|
6990
|
+
views: ['day', 'month', 'year'],
|
|
6991
|
+
openTo: openTo,
|
|
6992
|
+
format: format,
|
|
6993
|
+
slots: {
|
|
6994
|
+
openPickerIcon: () => /*#__PURE__*/React__default.createElement(AgendaIcon, {
|
|
6995
|
+
fill: disabled ? colors.neutral_500 : colors.black
|
|
6996
|
+
}),
|
|
6997
|
+
clearIcon: () => /*#__PURE__*/React__default.createElement(RemoveCircledIcon, {
|
|
6998
|
+
fill: disabled ? colors.neutral_500 : colors.black
|
|
6999
|
+
}),
|
|
7000
|
+
textField: params => /*#__PURE__*/React__default.createElement(CssTextField$3, Object.assign({}, params, {
|
|
7001
|
+
variant: "outlined",
|
|
7002
|
+
fullWidth: true,
|
|
7003
|
+
label: label,
|
|
7004
|
+
placeholder: placeholder,
|
|
7005
|
+
size: "small",
|
|
7006
|
+
required: required,
|
|
7007
|
+
error: error
|
|
7008
|
+
}))
|
|
7009
|
+
},
|
|
7010
|
+
slotProps: {
|
|
7011
|
+
field: {
|
|
7012
|
+
clearable: true
|
|
7013
|
+
}
|
|
7014
|
+
},
|
|
7015
|
+
disabled: disabled,
|
|
7016
|
+
disableFuture: disableFuture,
|
|
7017
|
+
disablePast: disablePast,
|
|
7018
|
+
loading: loading,
|
|
7019
|
+
maxDate: maxDate,
|
|
7020
|
+
minDate: minDate,
|
|
7021
|
+
timezone: timezone,
|
|
7022
|
+
renderLoading: renderLoading,
|
|
7023
|
+
onChange: onChange
|
|
7024
|
+
}), errorText && /*#__PURE__*/React__default.createElement(Text, {
|
|
7025
|
+
size: "xs",
|
|
7026
|
+
color: "#F54C4C",
|
|
7027
|
+
italic: true,
|
|
7028
|
+
text: errorText,
|
|
7029
|
+
className: styles$F.text_below
|
|
7030
|
+
}), helperText && /*#__PURE__*/React__default.createElement(Text, {
|
|
7031
|
+
size: "xs",
|
|
7032
|
+
italic: true,
|
|
7033
|
+
text: helperText,
|
|
7034
|
+
className: styles$F.text_below
|
|
7035
|
+
}))));
|
|
7036
|
+
};
|
|
6860
7037
|
|
|
6861
7038
|
var css_248z$G = ".TimePicker-modules_time_picker__ZkERd{min-width:16rem;width:100%}.TimePicker-modules_time_picker__ZkERd label,.TimePicker-modules_time_picker__ZkERd span{font-family:OpenSans;font-size:1rem;font-style:normal;font-weight:400;letter-spacing:.03em;line-height:1.3;margin:unset;text-align:left}.TimePicker-modules_time_picker__ZkERd .TimePicker-modules_MuiAutocomplete-endAdornment__P6--J{display:flex;gap:.5rem;margin-top:-.35rem!important}.TimePicker-modules_time_picker__ZkERd input{font-family:var(--sdFontFamilyOpenSans);font-size:var(--sdTypoTextNoDecorationRegularBase);font-style:normal;font-weight:var(--sdFontWeightRegular);letter-spacing:var(--sdLetterSpacingButtons);line-height:var(--sdLineHeight130);margin:unset;text-align:left}.TimePicker-modules_time_picker__ZkERd svg{height:.75rem;width:.75rem}.TimePicker-modules_input_top_label__0eniB{margin-bottom:.625rem}.TimePicker-modules_MuiOutlinedInput-root__BT6Wo.TimePicker-modules_MuiInputBase-root__JnzNf.TimePicker-modules_MuiInputBase-formControl__6jzc3{align-items:center;display:flex;flex-direction:row}.TimePicker-modules_text_below__u9PYB{margin:.25rem .5rem .25rem .75rem}.TimePicker-modules_icon__7nspv{height:1rem!important;margin-left:.25rem;width:1rem!important}";
|
|
7039
|
+
var styles$G = {"time_picker":"TimePicker-modules_time_picker__ZkERd","MuiAutocomplete-endAdornment":"TimePicker-modules_MuiAutocomplete-endAdornment__P6--J","input_top_label":"TimePicker-modules_input_top_label__0eniB","MuiOutlinedInput-root":"TimePicker-modules_MuiOutlinedInput-root__BT6Wo","MuiInputBase-root":"TimePicker-modules_MuiInputBase-root__JnzNf","MuiInputBase-formControl":"TimePicker-modules_MuiInputBase-formControl__6jzc3","text_below":"TimePicker-modules_text_below__u9PYB","icon":"TimePicker-modules_icon__7nspv"};
|
|
6862
7040
|
styleInject(css_248z$G);
|
|
6863
7041
|
|
|
7042
|
+
const CssTextField$4 = /*#__PURE__*/styles$H.styled(material.TextField)({
|
|
7043
|
+
'& .MuiInputBase-input': {
|
|
7044
|
+
color: '#26292E',
|
|
7045
|
+
fontFamily: 'OpenSans !important',
|
|
7046
|
+
fontSize: '1rem'
|
|
7047
|
+
},
|
|
7048
|
+
'& .MuiInputBase-input.Mui-disabled': {
|
|
7049
|
+
color: '#26292E',
|
|
7050
|
+
fontFamily: 'OpenSans !important',
|
|
7051
|
+
fontSize: '1rem'
|
|
7052
|
+
},
|
|
7053
|
+
'& .Mui-error': {
|
|
7054
|
+
color: '#26292E'
|
|
7055
|
+
},
|
|
7056
|
+
'& .MuiFormHelperText-root': {
|
|
7057
|
+
color: '#F54C4C'
|
|
7058
|
+
},
|
|
7059
|
+
'& .MuiFormLabel-asterisk': {
|
|
7060
|
+
color: '#F54C4C'
|
|
7061
|
+
},
|
|
7062
|
+
'& .MuiOutlinedInput-root.Mui-disabled': {
|
|
7063
|
+
cursor: 'not-allowed',
|
|
7064
|
+
color: '#26292E',
|
|
7065
|
+
fieldset: {
|
|
7066
|
+
borderColor: '#BCBDBE'
|
|
7067
|
+
},
|
|
7068
|
+
'&:hover fieldset': {
|
|
7069
|
+
borderColor: '#66adff'
|
|
7070
|
+
}
|
|
7071
|
+
},
|
|
7072
|
+
'& label': {
|
|
7073
|
+
color: '#26292E',
|
|
7074
|
+
fontFamily: 'OpenSans !important',
|
|
7075
|
+
fontSize: '1rem'
|
|
7076
|
+
},
|
|
7077
|
+
'& label.Mui-disabled.Mui-error': {
|
|
7078
|
+
color: '#26292E',
|
|
7079
|
+
opacity: 0.5,
|
|
7080
|
+
fontFamily: 'OpenSans !important',
|
|
7081
|
+
fontSize: '1rem'
|
|
7082
|
+
},
|
|
7083
|
+
'& label.Mui-focused': {
|
|
7084
|
+
color: '#26292E',
|
|
7085
|
+
fontFamily: 'OpenSans',
|
|
7086
|
+
fontSize: '1rem',
|
|
7087
|
+
backgroundColor: '#fff',
|
|
7088
|
+
marginRight: 5,
|
|
7089
|
+
paddingRight: 5
|
|
7090
|
+
},
|
|
7091
|
+
'& .MuiOutlinedInput-root': {
|
|
7092
|
+
fontFamily: 'OpenSans',
|
|
7093
|
+
'& fieldset': {
|
|
7094
|
+
borderColor: '#96989A'
|
|
7095
|
+
},
|
|
7096
|
+
'& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button': {
|
|
7097
|
+
display: 'none'
|
|
7098
|
+
},
|
|
7099
|
+
'& input[type=number]': {
|
|
7100
|
+
MozAppearance: 'textfield'
|
|
7101
|
+
},
|
|
7102
|
+
'&:hover fieldset': {
|
|
7103
|
+
borderColor: '#0077FF'
|
|
7104
|
+
},
|
|
7105
|
+
'&.Mui-focused fieldset': {
|
|
7106
|
+
borderColor: '#0077FF'
|
|
7107
|
+
},
|
|
7108
|
+
'&.Mui-error fieldset': {
|
|
7109
|
+
borderColor: '#F54C4C'
|
|
7110
|
+
},
|
|
7111
|
+
'&.Mui-disabled .Mui-focused fieldset': {
|
|
7112
|
+
borderColor: 'rgba(0, 119, 255, 0.5)'
|
|
7113
|
+
},
|
|
7114
|
+
'& .MuiAutocomplete-endAdornment': {
|
|
7115
|
+
height: '99%',
|
|
7116
|
+
marginTop: '-0.20rem',
|
|
7117
|
+
'& .MuiButtonBase-root': {
|
|
7118
|
+
height: '99%',
|
|
7119
|
+
'&:hover': {
|
|
7120
|
+
background: 'transparent'
|
|
7121
|
+
}
|
|
7122
|
+
}
|
|
7123
|
+
}
|
|
7124
|
+
}
|
|
7125
|
+
});
|
|
6864
7126
|
dayjs.extend(utc);
|
|
6865
7127
|
dayjs.extend(timezone);
|
|
7128
|
+
const TimePicker = ({
|
|
7129
|
+
className,
|
|
7130
|
+
label,
|
|
7131
|
+
value,
|
|
7132
|
+
format,
|
|
7133
|
+
disabled,
|
|
7134
|
+
locale = 'en',
|
|
7135
|
+
placeholder,
|
|
7136
|
+
required,
|
|
7137
|
+
error,
|
|
7138
|
+
errorText,
|
|
7139
|
+
helperText,
|
|
7140
|
+
timezone = dayjs.tz.guess(),
|
|
7141
|
+
//Guess the user's timezone
|
|
7142
|
+
onChange
|
|
7143
|
+
}) => {
|
|
7144
|
+
//If value is not in dayjs format, convert it
|
|
7145
|
+
if (value && !dayjs.isDayjs(value)) {
|
|
7146
|
+
value = dayjs(value);
|
|
7147
|
+
}
|
|
7148
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7149
|
+
style: {
|
|
7150
|
+
width: '100%'
|
|
7151
|
+
}
|
|
7152
|
+
}, /*#__PURE__*/React__default.createElement(xDatePickers.LocalizationProvider, {
|
|
7153
|
+
dateAdapter: AdapterDayjs.AdapterDayjs,
|
|
7154
|
+
adapterLocale: locale
|
|
7155
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7156
|
+
className: className || styles$G.time_picker
|
|
7157
|
+
}, /*#__PURE__*/React__default.createElement(TimePicker$1.TimePicker, {
|
|
7158
|
+
label: label,
|
|
7159
|
+
value: value,
|
|
7160
|
+
format: format,
|
|
7161
|
+
slots: {
|
|
7162
|
+
openPickerIcon: () => /*#__PURE__*/React__default.createElement(ClockIcon, {
|
|
7163
|
+
fill: disabled ? colors.neutral_500 : colors.black
|
|
7164
|
+
}),
|
|
7165
|
+
clearIcon: () => /*#__PURE__*/React__default.createElement(RemoveCircledIcon, {
|
|
7166
|
+
fill: disabled ? colors.neutral_500 : colors.black
|
|
7167
|
+
}),
|
|
7168
|
+
textField: params => /*#__PURE__*/React__default.createElement(CssTextField$4, Object.assign({}, params, {
|
|
7169
|
+
fullWidth: true,
|
|
7170
|
+
variant: "outlined",
|
|
7171
|
+
label: label,
|
|
7172
|
+
placeholder: placeholder,
|
|
7173
|
+
size: "small",
|
|
7174
|
+
required: required,
|
|
7175
|
+
error: error
|
|
7176
|
+
}))
|
|
7177
|
+
},
|
|
7178
|
+
slotProps: {
|
|
7179
|
+
field: {
|
|
7180
|
+
clearable: true
|
|
7181
|
+
}
|
|
7182
|
+
},
|
|
7183
|
+
disabled: disabled,
|
|
7184
|
+
timezone: timezone,
|
|
7185
|
+
onChange: onChange
|
|
7186
|
+
}), errorText && /*#__PURE__*/React__default.createElement(Text, {
|
|
7187
|
+
size: "xs",
|
|
7188
|
+
color: "#F54C4C",
|
|
7189
|
+
italic: true,
|
|
7190
|
+
text: errorText,
|
|
7191
|
+
className: styles$G.text_below
|
|
7192
|
+
}), helperText && /*#__PURE__*/React__default.createElement(Text, {
|
|
7193
|
+
size: "xs",
|
|
7194
|
+
italic: true,
|
|
7195
|
+
text: helperText,
|
|
7196
|
+
className: styles$G.text_below
|
|
7197
|
+
}))));
|
|
7198
|
+
};
|
|
6866
7199
|
|
|
6867
7200
|
exports.Accordion = Accordion;
|
|
6868
7201
|
exports.AccountIcon = AccountIcon;
|
|
@@ -6919,6 +7252,7 @@ exports.ClipIcon = ClipIcon;
|
|
|
6919
7252
|
exports.ClockIcon = ClockIcon;
|
|
6920
7253
|
exports.CopyPasteIcon = CopyPasteIcon;
|
|
6921
7254
|
exports.CreditCardIcon = CreditCardIcon;
|
|
7255
|
+
exports.DatePicker = DatePicker;
|
|
6922
7256
|
exports.DownloadIcon = DownloadIcon;
|
|
6923
7257
|
exports.DragDropIcon = DragDropIcon;
|
|
6924
7258
|
exports.EarthIcon = EarthIcon;
|
|
@@ -7010,6 +7344,7 @@ exports.TextForButton = TextForButton;
|
|
|
7010
7344
|
exports.TextForDropDownItem = TextForDropDownItem;
|
|
7011
7345
|
exports.TextInput = TextInput;
|
|
7012
7346
|
exports.Textarea = Textarea;
|
|
7347
|
+
exports.TimePicker = TimePicker;
|
|
7013
7348
|
exports.Title = Title;
|
|
7014
7349
|
exports.Toast = Toast;
|
|
7015
7350
|
exports.Tooltip = Tooltip;
|