@tailwind components; @layer components { .refine-button { @apply shadow-sm text-white hover:text-white bg-blue-500 hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-600 hover:no-underline; &.button-red { @apply bg-red-500 hover:bg-red-600 focus:ring-red-600; } } .refine-button-secondary { @apply text-blue-600 hover:text-blue-600 hover:underline; &.button-increase-contrast { @apply text-blue-700 hover:text-blue-900; } &.button-red { @apply text-red-500 hover:text-red-600; &.button-increase-contrast { @apply text-red-700 hover:text-red-900; } } } .refine-button, .refine-button-secondary { @apply py-2 px-4 border border-transparent rounded-md; @apply inline-flex items-center whitespace-nowrap; &.button-smaller { @apply py-1 px-3 text-xs; } } /* _head.html.erb */ .refine-stored-filter-head-container { @apply flex w-full py-4; } .refine-stored-filter-header { @apply text-gray-800 font-semibold text-base; } .refine-stored-filter-link { @apply text-blue-600 bg-transparent font-bold underline text-xs ml-auto leading-6 outline-none focus:outline-none; } /* edit.html.erb / new.html.erb */ .refine-stored-filter-container { @apply py-4; } .refine-stored-filter-form { @apply flex w-full; } .refine-stored-filter-error { @apply mb-2 text-xs text-red-600; } .refine-stored-filter-input { @apply w-full mr-4 block w-full pl-9 rounded border border-solid border-gray-200 focus:ring-blue-500 focus:border-blue-500 sm:text-sm; } .refine-stored-filter-button-cancel { @apply refine-button-secondary ml-auto mr-4; } .refine-stored-filter-button-submit { @apply refine-button text-center; } /* _find.html.erb */ .refine-stored-filter-search-container { @apply flex w-full py-4; } .refine-stored-filter-search-form { @apply flex w-full; } .refine-stored-filter-search-selector-container { @apply w-full mr-4; } .refine-stored-filter-search-button-cancel { @apply refine-button-secondary ml-auto mr-4; } .refine-stored-filter-search-button-submit { @apply refine-button text-center; } /* _filter_builder_dropdown.html.erb */ .refine-filter-builder-dropdown-container { @apply px-8 hidden md:block w-auto p-6 relative; } .refine-filter-builder-dropdown-search-box { @apply px-4 mt-2 origin-top-right absolute z-[100] right-0 rounded shadow-2xl bg-white opacity-100 scale-100 w-screen sm:max-w-max; } .refine-filter-builder-dropdown-toggle-button { @apply px-8 bg-transparent hover:bg-blue-500 text-blue-700 font-semibold hover:text-white py-2 px-4 border border-blue-500 hover:border-transparent rounded; } .refine-filter-builder-dropdown-button-container { @apply py-6 flex sticky bottom-0 bg-white; } .refine-filter-builder-dropdown-cancel-button { @apply refine-button-secondary ml-auto mr-4; } .refine-filter-builder-dropdown-apply-button { @apply refine-button text-center mr-4; } .refine-filter-builder-dropdown-loading-container { @apply py-4; } .postfixed { /* keep it because the dropdown select uses it */ } /* _filter_condition.html.erb */ .refine-filter-condition-container { @apply w-full mt-3 sm:w-auto sm:flex-shrink-0 sm:mr-3 flex postfixed; } .refine-filter-condition-select { @apply font-sans mt-1 block pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md; } .refine-filter-condition-postfix { @apply flex-shrink-0 bg-gray-50 border border-gray-300 rounded-md rounded-l-none p-2; } /* _option_condition.html.erb */ .refine-option-condition-container { @apply w-full mt-3 sm:w-auto sm:flex-shrink-0 sm:mr-3 flex postfixed; } .refine-option-condition-select { @apply font-sans mt-1 block pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md; } .refine-option-condition-postfix { @apply flex-shrink-0 bg-gray-50 border border-gray-300 rounded-md rounded-l-none p-2; } /* _add_and.html.erb */ .refine-add-container { @apply pt-4 flex; } .refine-add-button { @apply refine-button-secondary text-gray-900 uppercase font-semibold text-center cursor-pointer px-3 block; } .refine-add-button-text { } .refine-add-icon { @apply pl-2 text-gray-500; } /* _add_group.html.erb */ .refine-add-group-container { @apply flex items-center; } .refine-add-group { @apply cursor-pointer text-blue-600 bg-transparent font-bold underline pt-4 text-sm outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150; } .refine-add-group.refine-add-disabled { cursor: not-allowed; } .prefixed { /* keep it because the dropdown select uses it */ } /* _clause_select.html.erb */ .refine-clause-select-prefixed { @apply flex prefixed; } .refine-clause-select-prefix { @apply flex-shrink-0 bg-gray-50 border border-gray-300 rounded-md rounded-r-none p-2; } .refine-clause-select { @apply w-full flex-grow flex-shrink-0 sm:w-auto; } /* _condition_select.html.erb */ .refine-condition-select { @apply w-full sm:w-auto; } /* _criterion_errors.html.erb */ .refine-criterion-error { @apply mt-2 text-xs text-red-600; } /* _criterion.html.erb */ .refine-criterion-container { @apply flex flex-wrap flex-grow items-baseline w-full sm:w-auto sm:pr-12; } .refine-criterion-condition-container { @apply w-full sm:w-auto sm:flex-shrink-0 sm:mr-3 pt-3; } .refine-criterion-clause-container { @apply w-full pt-3 sm:w-auto sm:flex-shrink-0 sm:mr-3; } .refine-criterion-refinement-container { @apply w-full pt-3 sm:w-auto sm:flex-shrink-0 sm:mr-3; } /* _delete_criterion.html.erb */ .refine-delete-container { @apply pt-5 ml-auto flex-none; } .refine-delete-button { @apply ml-auto flex items-center; } .refine-delete-criterion-icon { @apply text-gray-600; } .refine-delete-criterion-label { @apply text-gray-500 pl-2 hidden; } /* _group.html.erb */ .refine-group-container { @apply bg-gray-50 rounded p-4 font-sans; } .refine-group-criterion-container { @apply flex items-start pb-3 flex-wrap; } .refine-group-and { @apply text-gray-400 pl-2; } /* _query.html.erb */ .refine-query-container { @apply relative; } .refine-query-content-container { @apply relative w-full h-full; } .refine-query-loading-container { @apply flex items-center justify-center absolute left-0 top-0 w-full h-full bg-gray-300 bg-opacity-50 z-10 rounded; } .refine-query-loading-text { @apply text-black text-xl; } .refine-query-or { @apply py-3; } /* _date_picker.html.erb */ .refine-date-picker-container { @apply relative; } .refine-date-picker-input { @apply rounded w-36 border border-solid border-gray-200 focus:ring-blue-500 focus:border-blue-500 sm:text-sm; } /* _text_condition.html.erb */ .refine-text-condition-container { @apply mt-3 mr-3; } .refine-text-condition-input { @apply rounded border border-solid border-gray-200 focus:ring-blue-500 focus:border-blue-500 sm:text-sm; } /* _numeric_condition_html.erb */ .refine-numeric-condition-container { @apply flex-grow-0 mt-3; } .refine-numeric-condition-container-btwn { @apply flex-grow-0 mt-3 sm:mr-3; } .refine-numeric-condition-input { @apply shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border-gray-300 rounded-md; } .refine-numeric-condition-and { @apply px-2 mt-3; } .refine-numeric-condition-second-container { @apply flex-grow-0 mt-3 sm:mr-3; } .refine-numeric-condition-second-input { @apply shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border-gray-300 rounded-md; } /* _date_condition.html.erb */ .refine-date-condition-days-container { @apply mt-3; } .refine-date-condition-days-input { @apply shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block sm:text-sm border-gray-300 rounded-md w-28; } .refine-date-condition-days-text { @apply px-2 mt-3; } .refine-date-condition-days-modifier-container { @apply w-32 mt-3 sm:mr-3; } .refine-date-condition-days-modifier-select { @apply w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md; } .refine-date-condition-first-date-container { @apply flex-grow-0 mt-3 sm:mr-3; } .refine-date-condition-first-date-container-btwn { @apply flex-grow-0 mt-3; } .refine-date-condition-and { @apply px-2 mt-3; } .refine-date-condition-second-date-container { @apply flex-grow-0 mt-3 sm:mr-3; } } /* ********************************************* Inline ********************************************* */ /* buttons and popups */ .refine--inline-popup { position: absolute; z-index: 100; margin-top: 0.5rem; width: 100vw; border-radius: 0.25rem; background-color: white; padding-left: 1rem; padding-right: 1rem; max-width: max-content; max-height: 66vh; overflow: visible; display: block; } /* groups and filter pills */ .refine--filter-wrapper { font-size: 14px; display: flex; flex-direction: column; gap: 12px; margin-top: 12px; } .refine--filter-row { display: flex; gap: 10px; row-gap: 15px; align-items: center; flex-wrap: wrap; } .refine--groups-wrapper { display: flex; gap: 10px; row-gap: 15px; align-items: center; flex-wrap: wrap; } .refine--group-join, .refine--condition-join { position: relative; padding: 5px 0; width: 35px; text-align: center; border-radius: 6px; cursor: default; &:hover { background-color: #f8f8f8; } } .refine--group { display: flex; gap: 10px; align-items: center; position: relative; flex-wrap: wrap; } .refine--group-conditions-wrapper { display: flex; gap: 5px; position: relative; padding: 0 10px; &:before , &:after { content: ""; position: absolute; top: -2px; bottom: -2px; border: 2px solid #eee; width: 3px; } &:hover { &:before, &:after { border-color: #aaa; } } &:before { border-radius: 6px 0 0 6px; left: 0; border-right: none; } &:after { border-radius: 0 6px 6px 0; right: 0; border-left: none; } } .refine--group-conditions { display: flex; gap: 5px; align-items: center; } /* Condition List */ .refine--condition-list { margin-top: 5px; max-height: 180px; overflow: auto; } .refine--condition-list-item { color: black; display: block; padding: 3px 5px; color: #111; border-radius: 6px; line-height: 1.15; } .refine--condition-list-item:hover { background-color: #eee; color: #111; text-decoration: none; } .refine--condition-pill-wrapper-wrapper { display: flex; align-items: center; gap: 5px; position: relative; } .refine--condition-pill { background-color: #fff; border: 1px solid #bbb; border-bottom-color: #999; box-shadow: 0 1px 1px rgba(0,0,0,0.1); border-radius: 6px; font-size: 14px; cursor: pointer; position: relative; white-space: nowrap; &:hover { border-color: #999; .refine--remove-condition { display: block; } } &:not(:hover){ .refine--condition-value-wrapper { display: none; } } } .refine--filter-condition { display: flex; align-items: center; font-size: 14px; position: relative; background-color: #efeff2; border-radius: 6px; padding: 4px; } .refine--condition-pill-name { padding: 4px 8px; display: block; } .refine--remove-condition { display: none; border: 2px solid #fff; padding: 6px 4px; border-radius: 50%; position: absolute; top: -8px; right:-8px; background-color: #aaa; z-index: 999; &:hover { background-color: #ee3f3f; } &:before { display: block; content: ""; width: 6px; height: 2px; background-color: #fff; } } &:hover { border-color: #999; .remove-applied-condition { display: block; } } .refine--condition-value-wrapper { position: absolute; top: 100%; background-color: #000; box-shadow: 0 2px 4px 0 rgba(0,0,0,0.1); border-radius: 6px; color: #fff; padding: 5px 10px; display: flex; gap: 5px; font-size: 12px; z-index: 9999; left: 50%; transform: translate3d(-50%, 4px, 0); animation: 0.25s cubic-bezier(.45,1.1,.7,1) 0s pillValueTooltip; animation-fill-mode: both; } .refine--condition-value-clause { color: rgba(255,255,255,0.7); } /* Form widgets */ .refine--select { line-height: 1.125; color: #111; border: 1px solid #ddd; border-bottom-color: #aaa; box-shadow: 0 1px 2px rgba(0,0,0,.1); border-radius: 6px; padding: 3px 3px 3px 6px; background-color: #fff; } .refine--clause-select { flex: 1; margin-left: 10px; } .refine--criterion-fields { width: 100%; padding: 0.5rem 0; } /* _date_condition.html.erb */ .refine--date-condition-days-text { margin-top: 0.75rem; } .refine--date-condition-days-modifier-container { margin-top: 0.75rem; } .refine--date-picker-input { font-size: 0.875rem; line-height: 1.25rem; border-radius: 4px; border-width: 1px; border-style: solid; border-color: rgba(183, 198, 206, 1); } .refine--date-picker-container { position: relative; } .refine--date-picker-input { font-size: 0.875rem; line-height: 1.25rem; border-radius: 4px; border-width: 1px; border-style: solid; border-color: rgba(183, 198, 206, 1); } .refine-date-condition-first-date-container-btwn { margin-top: 0px; padding-top: 0; margin-right: 6px; margin-top: 0; flex: 1; } .refine--date-condition-and { margin-top: 0.75rem; } .refine--date-condition-second-date-container { margin-top: 0.75rem; } .refine--date-condition-days-modifier-select { font-size: 0.875rem; line-height: 1.25rem; width: 100%; border-radius: 0.375rem; border-color: rgba(209, 213, 219, 1); padding-top: 0.5rem; padding-bottom: 0.5rem; padding-left: 0.75rem; padding-right: 2.5rem; font-size: 1rem; line-height: 1.5rem; } /* _numeric_condition_html.erb */ .refine--numeric-condition-container { margin-top: 0.75rem; flex-grow: 0; } .refine--numeric-condition-container-btwn { margin-top: 0.75rem; flex-grow: 0; } .refine--numeric-condition-and { margin-top: 0.75rem; } .refine--numeric-condition-second-container { margin-top: 0.75rem; flex-grow: 0; } @media (min-width: 640px) { .refine--numeric-condition-second-container { margin-right: 0.75rem; } } .refine--numeric-condition-second-input { display: block; width: 100%; border-radius: 0.375rem; border-color: rgba(209, 213, 219, 1); } .refine--numeric-condition-second-input:focus { border-color: rgba(99, 102, 241, 1); } @media (min-width: 640px) { .refine--numeric-condition-second-input { font-size: 0.875rem; line-height: 1.25rem; } } /* _option_condition.html.erb */ .refine--option-condition-container { /* keep it because the dropdown select uses it */ width: 100%; } @media (min-width: 640px) { .refine--option-condition-container { margin-right: 0.75rem; width: auto; flex-shrink: 0; } } .refine--option-label { cursor: pointer; display: flex; align-items: center; border-radius: 6px; padding: 4px 5px; &:hover { background-color: #eee; } } .refine--option-input { margin-right: 5px; } .refine--option-condition-postfix { flex-shrink: 0; border-radius: 0.375rem; border-top-left-radius: 0px; border-bottom-left-radius: 0px; border-width: 1px; border-color: rgba(209, 213, 219, 1); background-color: rgba(249, 250, 251, 1); padding: 0.5rem; } /* _text_condition.html.erb */ input.refine--input { width: 100%; font-size: 14px; display: block; /* TODO 25px L for icon */ padding: 5px; border: 1px solid #bbb; border-radius: 6px; outline: 0; line-height: 1.125; } input.refine--input::placeholder { color: #aaa; } input.refine--text-condition-input:focus { border-color: rgba(59, 130, 246, 1); } /* stored filters */ .refine--stored-filter-list { padding: 10px; max-height: 180px; overflow: auto; } .refine--stored-filter-list-item { color: black; display: block; padding: 3px 5px; color: #111; border-radius: 6px; line-height: 1.15; } .refine--stored-filter-list-item:hover { background-color: #eee; color: #111; text-decoration: none; } .refine--save-filter-link-label { border-bottom: 1px dotted #111; } /* ********************************************* Inline Final Styles ********************************************* */ .refine--filter-label { white-space: nowrap; color: #767676; } .refine--add-condition-button.refine--add-first-condition-button, .refine--add-condition-group-button.refine--add-first-condition-button { border: 1px dotted #aaa; padding-right: 8px; line-height: 16px; &:hover { background-color: #fff; border-style: solid; color: #111; } } .refine--add-condition-button, .refine--add-group-button { display: flex; gap: 5px; color: #767676; font-size: 14px; border-radius: 6px; padding: 5px; align-items: center; background-color: #fff; &:hover { color: #111; background-color: #f8f8f8; } } .refine--has-many-groups .refine--add-button-label { display: none; } .refine--has-many-groups .refine--add-condition-button .refine--add-button-icon { position: relative; top: 0; } .refine--inline-popup-container { display: block; width: auto; position: relative; } .refine--inline-popup { animation: .15s cubic-bezier(.45,1.1,.7,1) 0s up10; animation-fill-mode: both; box-shadow: 0 2px 4px -1px rgba(0,0,0,.3), 0 8px 30px -3px rgba(0,0,0,.25); border-radius: 8px; z-index: 9999; background-color: #ffffff; position: absolute; /* TODO see if these are still needed */ margin-top: 3px; width: 100vw; padding: 0 0.5rem; max-width: max-content; max-height: 66vh; overflow: visible; display: block; } .refine--stored-filter-list-popup { animation: .15s cubic-bezier(.45,1.1,.7,1) 0s up10; animation-fill-mode: both; box-shadow: 0 2px 4px -1px rgba(0,0,0,.3), 0 8px 30px -3px rgba(0,0,0,.25); border-radius: 8px; z-index: 9999; background-color: #ffffff; position: absolute; top: -8px; left: 100%; /* TODO see if these are still needed */ margin-top: 3px; width: 100vw; padding: 0 0.5rem; max-width: max-content; max-height: 66vh; display: block; } .refine--separator { height: 1px; background-color: #eee; margin: 5px 0; } .refine--separator-m0 { height: 1px; background-color: #eee; } button.refine--apply-button { padding: 4px 6px; cursor: pointer; border: 1px solid #ddd; font-weight: 500; box-shadow: 0 2px 2px rgba(0,0,0,.08), 0 1px 5px -2px rgba(0,0,0,.04); font-size: 14px; border-radius: 6px; margin-left: 4px; background-color: #0c5cef; color: #fff; border-color: #0c5cef; } .refine--stored-filters-link { color: black; display: flex; align-items: center; padding: 3px 5px; color: #111; border-radius: 6px; line-height: 1.15; margin-bottom: 5px; &:hover { background-color: #eee; color: #111; text-decoration: none; } &:before { content: "chevron_right"; font-family: "Material Icons"; font-size: 14px; position: absolute; right: 0; top: 50%; transform: translateY(-50%); } } .refine--save-filter-link { display: flex; align-items: center; gap: 5px; font-size: 14px; padding: 3px 0; border: 1px solid transparent; border-radius: 6px; } .refine--save-filter-input-wrapper { display: flex; gap: 5px; align-items: center; color: #111; position: relative; } input.refine--save-filter-input { border: none; padding: 0; font-size: 14px; &:focus { outline: unset; border: none; box-shadow: none; } } .refine--save-filter-input-wrapper .refine--tooltip { display: block; transform: translate3d(-50%,-4px,0); position: absolute; left: 50%; bottom: 100%; white-space: nowrap; background-color: #000; color: #fff; border-radius: 6px; box-shadow: 0 2px 12px -2px rgba(0,0,0,.15); padding: 4px 8px; font-size: 12px; z-index: 9999; } .refine--hotkey { border-radius: 4px; background-color: rgba(255,255,255,.3); display: inline-block; padding: 0 4px; } .refine--condition-list .refine--list-icon, .refine--stored-filters-link .refine--list-icon { width: 16px; text-align: center; margin-right: 10px; font-size: 16px; } .material-icons-outlined.refine--icon-sm, .material-icons.refine--icon-sm, .icon.refine--icon-sm { font-size: 14px; } .refine--search-box { position: relative; padding: 10px; margin-left: -6px; margin-right: 6px; } input.refine--search-trigger[type="text"] { width: 100%; font-size: 14px; display: block; padding: 5px 5px 5px 25px; border: 1px solid #bbb; border-radius: 6px; outline: 0; line-height: 1.15; } .material-icons.refine--icon-search { position: absolute; top: 50%; left: 16px; font-size: 16px; color: #999; transform: translateY(-50%); line-height: 18px; }