react-js-cron-nextui
Version:
A React cron editor with nextui inspired by jqCron
143 lines (142 loc) • 3.82 kB
CSS
.react-js-cron {
display: flex;
align-items: flex-start;
flex-wrap: wrap;
}
.react-js-cron > div,
.react-js-cron-field {
display: flex;
align-items: center;
flex-wrap: nowrap;
}
.react-js-cron-field {
margin-bottom: 10px;
}
.react-js-cron-field > span {
margin-left: 5px;
}
div.react-js-cron-select {
margin-left: 5px;
}
.react-js-cron-select.react-js-cron-select-no-prefix {
margin-left: 0;
}
.react-js-cron-select .ant-select-selection-wrap {
position: relative;
align-items: center;
}
/* Absolute position only when there are one child, meaning when no items are selected. */
.react-js-cron-select
.ant-select-selection-overflow:has(> :nth-child(-n + 1):last-child) {
position: absolute;
top: 0;
left: 0;
}
/* Center placeholder vertically. */
.react-js-cron-select .ant-select-selection-placeholder {
margin-top: -2px;
}
div.react-js-cron-error .react-js-cron-select .ant-select-selector {
border-color: #ff4d4f;
background: #fff6f6;
}
div.react-js-cron-custom-select {
min-width: 70px;
z-index: 1;
}
div.react-js-cron-error div.react-js-cron-custom-select {
background: #fff6f6;
}
div.react-js-cron-select.react-js-cron-custom-select.ant-select
div.ant-select-selector {
padding-left: 11px;
padding-right: 30px;
}
.react-js-cron-read-only
div.react-js-cron-select.react-js-cron-custom-select.ant-select
div.ant-select-selector {
padding-right: 11px;
}
div.react-js-cron-custom-select .ant-select-selection-search {
width: 0 ;
margin: 0 ;
}
div.react-js-cron-custom-select .ant-select-selection-placeholder {
position: static;
top: 50%;
right: auto;
left: auto;
transform: none;
transition: none;
opacity: 1;
color: inherit;
}
.react-js-cron-week-days-placeholder
.react-js-cron-custom-select
.ant-select-selection-placeholder,
.react-js-cron-month-days-placeholder
.react-js-cron-custom-select
.ant-select-selection-placeholder {
opacity: 0.4;
}
.react-js-cron-custom-select-dropdown {
min-width: 0 ;
width: 174px ;
}
.react-js-cron-custom-select-dropdown .rc-virtual-list {
max-height: none ;
}
.react-js-cron-custom-select-dropdown-grid .rc-virtual-list-holder {
max-height: initial ;
}
.react-js-cron-custom-select-dropdown-grid .rc-virtual-list-holder-inner {
display: grid ;
grid-template-columns: repeat(4, 1fr);
}
.react-js-cron-custom-select-dropdown-grid
.rc-virtual-list-holder-inner
.ant-select-item-option-content {
text-align: center;
}
.react-js-cron-custom-select-dropdown-hours-twelve-hour-clock {
width: 260px ;
}
.react-js-cron-custom-select-dropdown-minutes-large {
width: 300px ;
}
.react-js-cron-custom-select-dropdown-minutes-large
.rc-virtual-list-holder-inner {
grid-template-columns: repeat(6, 1fr);
}
.react-js-cron-custom-select-dropdown-minutes-medium {
width: 220px ;
}
.react-js-cron-custom-select-dropdown-minutes-medium
.rc-virtual-list-holder-inner {
grid-template-columns: repeat(5, 1fr);
}
.react-js-cron-period > span:first-child {
margin-left: 0 ;
}
.react-js-cron-period
.react-js-cron-select.ant-select-single.ant-select-open
.ant-select-selection-item {
opacity: 1;
}
.react-js-cron-select-dropdown-period {
min-width: 0 ;
width: auto ;
}
.react-js-cron-clear-button {
margin-left: 10px;
margin-bottom: 10px;
}
.react-js-cron-disabled .react-js-cron-select.ant-select-disabled {
background: #f5f5f5;
}
div.react-js-cron-select.react-js-cron-custom-select.ant-select
div.ant-select-selector
> .ant-select-selection-overflow {
align-items: center;
flex: initial;
}