From 7ce5878898c46b280e2f87d8347abac150998583 Mon Sep 17 00:00:00 2001 From: timotheegoguely Date: Wed, 5 Feb 2025 11:45:23 +0100 Subject: [PATCH] fix #106 --- src/assets/css/src/1.0.global.css | 31 ++++++++++++++++++++++++ src/assets/css/src/2.blocks.dialog.css | 8 +++--- src/assets/css/src/3.utilities.icons.css | 1 + src/components/ProjectRequestDialog.vue | 1 + 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/assets/css/src/1.0.global.css b/src/assets/css/src/1.0.global.css index 294019b..7df4c77 100644 --- a/src/assets/css/src/1.0.global.css +++ b/src/assets/css/src/1.0.global.css @@ -16,6 +16,7 @@ body { font-feature-settings: "liga", "clig"; background-color: var(--color-grey-50); color: var(--color-text, currentColor); + accent-color: var(--color-primary); padding: var(--gutter); } @@ -255,6 +256,36 @@ input { -webkit-appearance: none; appearance: none; } +input[type="checkbox"] { + -webkit-appearance: none; + appearance: none; + position: relative; + border: 1px solid var(--color-grey-200); + cursor: pointer; + --icon-color: var(--color-grey-400); +} +input[type="checkbox"]:checked { + background: var(--color-primary); + border-color: var(--color-primary); +} +input[type="checkbox"]:hover { + border-color: var(--color-black-20); + --icon-color: var(--color-grey-800); +} +input[type="checkbox"]::before { + content: ""; + display: inline-block; + width: 100%; + height: 100%; + background: var(--icon-color, currentColor); + mask-repeat: no-repeat; + mask-position: center; + mask-size: 1em; + mask-image: var(--icon-check-2); +} +input[type="checkbox"]:checked::before { + --icon-color: white; +} button { cursor: pointer; } diff --git a/src/assets/css/src/2.blocks.dialog.css b/src/assets/css/src/2.blocks.dialog.css index 8383daa..24ac606 100644 --- a/src/assets/css/src/2.blocks.dialog.css +++ b/src/assets/css/src/2.blocks.dialog.css @@ -266,16 +266,16 @@ position: relative; padding-left: var(--space-64); } +#project-request-dialog #project-dtl.selected { + border-color: var(--color-primary-20); + background-color: var(--color-primary-10); +} #project-request-dialog #project-dtl input[type="checkbox"] { width: 1.75rem; height: 1.75rem; border-radius: var(--rounded-md); - border: 1px solid var(--color-grey-200); position: absolute; left: var(--space-12); - -webkit-appareance: auto; - appearance: auto; - accent-color: var(--color-primary); } #optimization-request-dialog select { background-image: var(--icon-chevron-single-down-grey); diff --git a/src/assets/css/src/3.utilities.icons.css b/src/assets/css/src/3.utilities.icons.css index 06a6474..93b9626 100644 --- a/src/assets/css/src/3.utilities.icons.css +++ b/src/assets/css/src/3.utilities.icons.css @@ -7,6 +7,7 @@ --icon-home: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.875 10L10 1.875L18.125 10M4.375 11.875V18.125H15.625V11.875' stroke='currentColor' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); --icon-calendar: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.125 4.375C2.79348 4.375 2.47554 4.5067 2.24112 4.74112C2 4.97554 1.875 5.29348 1.875 5.625V16.875C1.875 17.2065 2 17.5245 2.24112 17.7589C2.47554 18 2.79348 18.125 3.125 18.125H16.875C17.2065 18.125 17.5245 18 17.7589 17.7589C18 17.5245 18.125 17.2065 18.125 16.875V5.625C18.125 5.29348 18 4.97554 17.7589 4.74112C17.5245 4.5067 17.2065 4.375 16.875 4.375H14.375M1.875 9.375H18.125M5.625 1.875V6.875M14.375 1.875V6.875M5.625 4.375H11.875' stroke='currentColor' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); --icon-check: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.875 11.9375L5.2875 16.325C5.40265 16.4746 5.5502 16.5962 5.71906 16.6806C5.88792 16.7651 6.07372 16.8101 6.2625 16.8125C6.44824 16.8146 6.63213 16.7754 6.80078 16.6975C6.96944 16.6197 7.11863 16.5052 7.2375 16.3625L18.125 3.1875' stroke='currentColor' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); + --icon-check-2: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.875 11.9375L5.2875 16.325C5.40265 16.4746 5.5502 16.5962 5.71906 16.6806C5.88792 16.7651 6.07372 16.8101 6.2625 16.8125C6.44824 16.8146 6.63213 16.7754 6.80078 16.6975C6.96944 16.6197 7.11863 16.5052 7.2375 16.3625L18.125 3.1875' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); --icon-check-3: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.875 11.9375L5.2875 16.325C5.40265 16.4746 5.5502 16.5962 5.71906 16.6806C5.88792 16.7651 6.07372 16.8101 6.2625 16.8125C6.44824 16.8146 6.63213 16.7754 6.80078 16.6975C6.96944 16.6197 7.11863 16.5052 7.2375 16.3625L18.125 3.1875' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); --icon-user: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.6625 16.125C5.2203 15.2094 6.00426 14.4527 6.93901 13.9276C7.87376 13.4025 8.92787 13.1267 10 13.1267C11.0721 13.1267 12.1262 13.4025 13.061 13.9276C14 14.4527 14.7797 15.2094 15.3375 16.125M13.125 8.125C13.125 9.85089 11.7259 11.25 10 11.25C8.27411 11.25 6.875 9.85089 6.875 8.125C6.875 6.39911 8.27411 5 10 5C11.7259 5 13.125 6.39911 13.125 8.125ZM18.125 10C18.125 14.4873 14.4873 18.125 10 18.125C5.51269 18.125 1.875 14.4873 1.875 10C1.875 5.51269 5.51269 1.875 10 1.875C14.4873 1.875 18.125 5.51269 18.125 10Z' stroke='currentColor' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); --icon-megaphone: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.85 14.4624C11.7448 15.3307 11.3125 16.1262 10.6412 16.687C10 17.2477 9.11024 17.5315 8.23708 17.4805C7.36393 17.4295 6.54305 17.0476 5.94162 16.4125C5.34019 15.7775 5.00346 14.937 5 14.0624V12.0749M17.3 16.3374L2.7125 11.2499C2.47448 11.1669 2.26713 11.0138 2.11767 10.8108C1.96821 10.6078 1.88362 10.3644 1.875 10.1124V8.74991C1.87603 8.49151 1.95711 8.23979 2.10709 8.02937C2.25707 7.81895 2.46858 7.66018 2.7125 7.57491L17.3 2.49991C17.3937 2.46828 17.4935 2.45931 17.5913 2.47374C17.6891 2.48817 17.782 2.5256 17.8626 2.58294C17.9431 2.64028 18.0089 2.7159 18.0545 2.8036C18.1 2.89129 18.1243 2.98856 18.125 3.08741V15.7499C18.1243 15.8488 18.1 15.946 18.0545 16.0337C18.0089 16.1214 17.9431 16.197 17.8626 16.2544C17.782 16.3117 17.6891 16.3491 17.5913 16.3636C17.4935 16.378 17.3937 16.369 17.3 16.3374Z' stroke='currentColor' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); diff --git a/src/components/ProjectRequestDialog.vue b/src/components/ProjectRequestDialog.vue index 8770a6a..0d7eea9 100644 --- a/src/components/ProjectRequestDialog.vue +++ b/src/components/ProjectRequestDialog.vue @@ -44,6 +44,7 @@ id="project-dtl" class="w-full text-left rounded-md border border-grey-200 text-grey-800 p-12" style="align-self: flex-start" + :class="{ 'selected': isDTLEnabled }" >