oolib 2.50.0 → 2.51.0
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.
|
@@ -11,9 +11,9 @@ exports.StyledBodyWrapper = exports.StyledWeekdays = exports.StyledWeekDaysWrapp
|
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
12
|
var themes_1 = require("../../themes");
|
|
13
13
|
var mixins_1 = require("../../themes/mixins");
|
|
14
|
-
var greyColor80 = themes_1.colors.greyColor80, greyColor5 = themes_1.colors.greyColor5, greyColor70 = themes_1.colors.greyColor70, greyColor10 = themes_1.colors.greyColor10, primaryColor100 = themes_1.colors.primaryColor100, greyColor40 = themes_1.colors.greyColor40, white = themes_1.colors.white, primaryColor10 = themes_1.colors.primaryColor10, greyColor15 = themes_1.colors.greyColor15, greyColor3 = themes_1.colors.greyColor3, greyColor100 = themes_1.colors.greyColor100;
|
|
14
|
+
var greyColor80 = themes_1.colors.greyColor80, greyColor5 = themes_1.colors.greyColor5, greyColor70 = themes_1.colors.greyColor70, greyColor10 = themes_1.colors.greyColor10, primaryColor100 = themes_1.colors.primaryColor100, greyColor40 = themes_1.colors.greyColor40, white = themes_1.colors.white, primaryColor10 = themes_1.colors.primaryColor10, greyColor15 = themes_1.colors.greyColor15, greyColor3 = themes_1.colors.greyColor3, greyColor100 = themes_1.colors.greyColor100, primaryColor40 = themes_1.colors.primaryColor40;
|
|
15
15
|
exports.StyledDateInputContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n width: fit-content;\n\n\n &:focus-within .calender-container {\n visibility: visible;\n }\n\n"], ["\n position: relative;\n width: fit-content;\n\n\n &:focus-within .calender-container {\n visibility: visible;\n }\n\n"])));
|
|
16
|
-
exports.StyledInput = styled_components_1.default.input(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n text-align: center;\n background: ", ";\n outline: none;\n border: none;\n font-size: 1.6rem;\n width: 13.2rem;\n height: 4rem;\n color: ", ";\n &:hover {\n background-color: ", ";\n }\n\n &:focus {\n background-color: ", ";\n }\n\n ", "\n\n &::placeholder {\n color: ", "
|
|
16
|
+
exports.StyledInput = styled_components_1.default.input(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n text-align: center;\n background: ", ";\n outline: none;\n border: none;\n font-size: 1.6rem;\n width: 13.2rem;\n height: 4rem;\n color: ", ";\n &:hover {\n background-color: ", ";\n color: ", ";\n\n &::placeholder {\n color: ", ";\n }\n }\n\n &:focus {\n background-color: ", ";\n }\n\n ", "\n\n &::placeholder {\n color: ", ";\n font-size: 1.6rem;\n }\n\n"], ["\n text-align: center;\n background: ", ";\n outline: none;\n border: none;\n font-size: 1.6rem;\n width: 13.2rem;\n height: 4rem;\n color: ", ";\n &:hover {\n background-color: ", ";\n color: ", ";\n\n &::placeholder {\n color: ", ";\n }\n }\n\n &:focus {\n background-color: ", ";\n }\n\n ", "\n\n &::placeholder {\n color: ", ";\n font-size: 1.6rem;\n }\n\n"])), function (_a) {
|
|
17
17
|
var invert = _a.invert;
|
|
18
18
|
return (invert ? greyColor80 : greyColor5);
|
|
19
19
|
}, function (_a) {
|
|
@@ -21,14 +21,20 @@ exports.StyledInput = styled_components_1.default.input(templateObject_2 || (tem
|
|
|
21
21
|
return disabled ? greyColor100 : invert && white;
|
|
22
22
|
}, function (_a) {
|
|
23
23
|
var invert = _a.invert, disabled = _a.disabled;
|
|
24
|
-
return disabled ? greyColor15 : invert ?
|
|
24
|
+
return disabled ? greyColor15 : invert ? primaryColor40 : greyColor10;
|
|
25
|
+
}, function (_a) {
|
|
26
|
+
var invert = _a.invert;
|
|
27
|
+
return invert && greyColor100;
|
|
28
|
+
}, function (_a) {
|
|
29
|
+
var invert = _a.invert;
|
|
30
|
+
return (invert ? greyColor100 : greyColor40);
|
|
25
31
|
}, function (_a) {
|
|
26
32
|
var invert = _a.invert, disabled = _a.disabled;
|
|
27
33
|
return disabled ? greyColor15 : invert ? greyColor70 : greyColor10;
|
|
28
34
|
}, function (_a) {
|
|
29
35
|
var disabled = _a.disabled;
|
|
30
36
|
return disabled &&
|
|
31
|
-
"\n background-color: ".concat(greyColor15, ";\n cursor: not-allowed;\n ");
|
|
37
|
+
"\n color: ".concat(greyColor40, "\n background-color: ").concat(greyColor15, ";\n cursor: not-allowed;\n ");
|
|
32
38
|
}, greyColor40);
|
|
33
39
|
exports.StyledDateInputWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n &::after{\n content: '';\n position: absolute;\n width: 0;\n height: 0.2rem;\n bottom: 0;\n left: 0;\n background-color: ", ";\n ", ";\n }\n\n &:focus-within {\n background-color: ", ";\n &::after {\n width: 100%;\n }\n }\n"], ["\n &::after{\n content: '';\n position: absolute;\n width: 0;\n height: 0.2rem;\n bottom: 0;\n left: 0;\n background-color: ", ";\n ", ";\n }\n\n &:focus-within {\n background-color: ", ";\n &::after {\n width: 100%;\n }\n }\n"])), primaryColor100, (0, mixins_1.transition)('width'), greyColor10);
|
|
34
40
|
exports.StyledCalenderContainer = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-family: sans-serif;\n position: absolute;\n width: 30rem;\n /* height: 319px; */\n box-shadow: 0 0.4rem 0.8rem 0 rgba(0, 0, 0, 0.2);\n background-color: ", ";\n visibility: hidden;\n z-index: 10000;\n\n .disabled-date {\n opacity: 0.5;\n pointer-events: none;\n }\n \n .range {\n background-color: ", ";\n color: ", ";\n }\n\n .today {\n background-color: ", ";\n color: ", ";\n }\n\n .right-class {\n right: 0;\n }\n"], ["\n font-family: sans-serif;\n position: absolute;\n width: 30rem;\n /* height: 319px; */\n box-shadow: 0 0.4rem 0.8rem 0 rgba(0, 0, 0, 0.2);\n background-color: ", ";\n visibility: hidden;\n z-index: 10000;\n\n .disabled-date {\n opacity: 0.5;\n pointer-events: none;\n }\n \n .range {\n background-color: ", ";\n color: ", ";\n }\n\n .today {\n background-color: ", ";\n color: ", ";\n }\n\n .right-class {\n right: 0;\n }\n"])), function (_a) {
|
|
@@ -44,7 +44,7 @@ function DateRangePicker(props) {
|
|
|
44
44
|
react_1.default.createElement(styled_1.StyledDateRangeInputWrapper, { invert: invert, readOnly: readOnly },
|
|
45
45
|
react_1.default.createElement(DatePicker_1.default, { id: 0, value: value && value[0], onChange: handleOnChange, readOnly: readOnly, futureDateOnly: futureDateOnly, previousDateOnly: previousDateOnly, invert: invert, disabled: disabled }),
|
|
46
46
|
react_1.default.createElement(styled_1.StyledDateRangeInputDivider, null, "-"),
|
|
47
|
-
react_1.default.createElement(DatePicker_1.default, { id: 1, from: value && value[0] ? new Date(value[0]) : currentDate, futureDateOnly: futureDateOnly, previousDateOnly: previousDateOnly, value: value && (value[1] === null ? 'Ongoing' : value[1]), onChange: handleOnChange, readOnly: readOnly, disabled: value && value[1] === null ? true : false, invert: invert })),
|
|
47
|
+
react_1.default.createElement(DatePicker_1.default, { id: 1, from: value && value[0] ? new Date(value[0]) : currentDate, futureDateOnly: futureDateOnly, previousDateOnly: previousDateOnly, value: value && (value[1] === null ? 'Ongoing' : value[1]), onChange: handleOnChange, readOnly: readOnly, disabled: value && value[1] === null ? true : disabled ? true : false, invert: invert })),
|
|
48
48
|
!readOnly && allowPresentlyOngoing && (react_1.default.createElement("div", { style: { marginTop: '1rem' } },
|
|
49
49
|
react_1.default.createElement(CheckboxInput_1.CheckboxInput, { option: { display: 'Presently Ongoing', value: 'Ongoing' }, value: value && value[1] === null
|
|
50
50
|
? [{ display: 'Presently Ongoing', value: 'Ongoing' }]
|