calcite-react
Version:
Calcite components for React
146 lines (129 loc) • 6.89 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.StyledWeekDay = exports.StyledWeekDayList = exports.StyledMonthYearHeader = exports.StyledYearSelect = exports.StyledMonthSelect = exports.StyledMonthYearSelectContainer = exports.StyledMonthElContainer = exports.StyledDatePickerContainer = void 0;
var _styledComponents = _interopRequireDefault(require("styled-components"));
var _CalciteThemeProvider = require("../CalciteThemeProvider");
var _Select = _interopRequireDefault(require("../Select"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// Copyright 2019 Esri
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// styled-components
// Utils, common elements
// Calcite theme and Esri colors
// Calcite components
// Icons
// Third party libraries
var StyledDatePickerContainer = _styledComponents.default.div.withConfig({
displayName: "StyledDatePickerContainer",
componentId: "sc-13yfng7-0"
})(["position:relative;font-family:", ";font-weight:400 !important;box-sizing:border-box;.PresetDateRangePicker_button{border:2px solid ", ";color:", ";}.PresetDateRangePicker_button__selected{background:", ";}.SingleDatePickerInput__withBorder{border-radius:", ";border:1px solid ", ";}.SingleDatePickerInput_clearDate__default:focus,.SingleDatePickerInput_clearDate__default:hover{background:", ";}.SingleDatePickerInput_calendarIcon{margin:0;padding:9px 6px 9px 12px;display:inline-flex;align-items:center;}.DateInput{width:95px;}.DateInput__small{width:80px;}.DateInput__disabled{color:", ";}.DateInput_input{font-size:0.9375rem;line-height:0.9375rem;color:#565a5c;padding:8px 0.31rem 6px;font-family:", ";font-weight:400;box-sizing:border-box;}.DateInput_input__small{font-size:0.875rem;line-height:0.875rem;padding:4px 0.31rem 2px;font-family:", ";font-weight:400;box-sizing:border-box;}.DateInput_input__focused{border-bottom:2px solid ", ";}.DateInput_fang{margin-top:-20px;}.DateInput_fangStroke{stroke:", ";}.DateRangePickerInput{.DateInput_input{text-align:center;}}.DateRangePickerInput__withBorder{border-radius:", ";border:1px solid ", ";}.DateRangePickerInput_arrow{color:#565a5c;}.DateRangePickerInput_arrow_svg{fill:#565a5c;height:19px;width:19px;html[dir='rtl'] &{transform:rotate(180deg);}}.DateRangePickerInput_clearDates_default:focus,.DateRangePickerInput_clearDates_default:hover{background:", ";}.DateRangePickerInput_calendarIcon{margin:0;padding:9px 6px 9px 12px;display:inline-flex;align-items:center;}"], function (props) {
return props.theme.type.avenirFamily;
}, function (props) {
return props.theme.palette.blue;
}, function (props) {
return props.theme.palette.blue;
}, function (props) {
return props.theme.palette.blue;
}, function (props) {
return props.theme.borderRadius;
}, function (props) {
return props.theme.palette.lightGray;
}, function (props) {
return props.theme.palette.lighterGray;
}, function (props) {
return props.theme.palette.lighterGray;
}, function (props) {
return props.theme.type.avenirFamily;
}, function (props) {
return props.theme.type.avenirFamily;
}, function (props) {
return props.theme.palette.blue;
}, function (props) {
return props.theme.palette.lightestGray;
}, function (props) {
return props.theme.borderRadius;
}, function (props) {
return props.theme.palette.lightGray;
}, function (props) {
return props.theme.palette.lighterGray;
});
exports.StyledDatePickerContainer = StyledDatePickerContainer;
StyledDatePickerContainer.defaultProps = {
theme: _CalciteThemeProvider.CalciteTheme
};
var StyledMonthElContainer = _styledComponents.default.div.withConfig({
displayName: "StyledMonthElContainer",
componentId: "sc-13yfng7-1"
})(["display:flex;flex-direction:column;margin-bottom:-37px;"]);
exports.StyledMonthElContainer = StyledMonthElContainer;
StyledMonthElContainer.defaultProps = {
theme: _CalciteThemeProvider.CalciteTheme
};
var StyledMonthYearSelectContainer = _styledComponents.default.div.withConfig({
displayName: "StyledMonthYearSelectContainer",
componentId: "sc-13yfng7-2"
})(["display:flex;justify-content:center;align-items:center;margin:-4px 0 5px;min-height:32px;"]);
exports.StyledMonthYearSelectContainer = StyledMonthYearSelectContainer;
StyledMonthYearSelectContainer.defaultProps = {
theme: _CalciteThemeProvider.CalciteTheme
};
var StyledMonthSelect = (0, _styledComponents.default)(_Select.default).attrs({
menuStyle: {
minWidth: '100%',
maxHeight: '200px'
},
minimal: true
}).withConfig({
displayName: "StyledMonthSelect",
componentId: "sc-13yfng7-3"
})(["margin-top:0;height:2rem;border-color:#e4e7e7;box-shadow:none;font-size:0.9375rem;font-weight:bold;color:#565a5c;background-size:11px;background-position:right 5px center;"]);
exports.StyledMonthSelect = StyledMonthSelect;
StyledMonthSelect.defaultProps = {
theme: _CalciteThemeProvider.CalciteTheme
};
var StyledYearSelect = (0, _styledComponents.default)(StyledMonthSelect).attrs({
virtualized: true
}).withConfig({
displayName: "StyledYearSelect",
componentId: "sc-13yfng7-4"
})(["margin-left:10px;"]);
exports.StyledYearSelect = StyledYearSelect;
StyledYearSelect.defaultProps = {
theme: _CalciteThemeProvider.CalciteTheme
};
var StyledMonthYearHeader = _styledComponents.default.h6.withConfig({
displayName: "StyledMonthYearHeader",
componentId: "sc-13yfng7-5"
})(["color:#565a5c;font-size:0.9375rem;font-weight:bold;caption-side:initial;margin:0 3px;"]);
exports.StyledMonthYearHeader = StyledMonthYearHeader;
StyledMonthYearHeader.defaultProps = {
theme: _CalciteThemeProvider.CalciteTheme
};
var StyledWeekDayList = _styledComponents.default.ol.withConfig({
displayName: "StyledWeekDayList",
componentId: "sc-13yfng7-6"
})(["text-decoration:none;list-style:none;display:flex;align-items:center;justify-content:space-between;padding:0;margin:0;"]);
exports.StyledWeekDayList = StyledWeekDayList;
StyledWeekDayList.defaultProps = {
theme: _CalciteThemeProvider.CalciteTheme
};
var StyledWeekDay = _styledComponents.default.li.withConfig({
displayName: "StyledWeekDay",
componentId: "sc-13yfng7-7"
})(["color:", ";font-size:smaller;width:39px;"], function (props) {
return props.theme.palette.darkerGray;
});
exports.StyledWeekDay = StyledWeekDay;
StyledWeekDay.defaultProps = {
theme: _CalciteThemeProvider.CalciteTheme
};