diff --git a/app/assets/styles/button.css b/app/assets/styles/button.css index ebc7ca1..46e25a1 100755 --- a/app/assets/styles/button.css +++ b/app/assets/styles/button.css @@ -13,9 +13,51 @@ transition: var(--transition-default); outline: none; border: none; - background: transparent; + background: var(--background); color: var(--color); + &.raised { + box-shadow: var(--box-shadow-z2); + padding: .5em 1.5em; + border-radius: var(--radius-default); + + &.danger { + --background: var(--color-red); + --color: var(--color-white); + } + } + + &.text { + --background: transparent; + --color: var(--color-black); + padding: .5em 1.5em; + border-radius: var(--radius-default); + + &:hover { + --background: rgba(0, 0, 0, 0.05); + } + + &.white { + --color: var(--color-white); + } + + &.danger { + --color: var(--color-red); + + &:hover { + --background: rgba(255, 0, 0, 0.1); + } + } + } + + &.round { + display: flex; + justify-content: center; + align-items: center; + border-radius: 100%; + padding: .5rem; + } + &.cta { background: var(--background); color: var(--color); diff --git a/app/assets/styles/formInput.css b/app/assets/styles/formInput.css index 44d228d..c207605 100755 --- a/app/assets/styles/formInput.css +++ b/app/assets/styles/formInput.css @@ -1,44 +1,52 @@ .Input { - position: relative; - flex: 25% 1 0; - border: 2px solid var(--color-blue); - border-radius: var(--radius-default); - overflow: hidden; - transition: var(--transition-default); - outline: 0 solid var(--color-white); + &.error { + & .input-wrapper { + border-color: var(--color-red); + outline-width: 2px; + } - & label { - position: absolute; - left: .5rem; - font-size: 1.5em; - top: .7rem; - transition: var(--transition-default); - } - - & input { - all: unset; - width: calc(100% - 1rem); - font-size: 1.2em; - padding: 1.3rem .5rem .5rem .5rem; - background: var(--color-white); - - &[type="number"] { - text-align: right; + & span { + color: var(--color-red); } } - &:has(input:invalid) { - border-color: var(--color-red); - outline-width: 2px; + & span { + font-size: .65em; } - & input:focus, - & input:not(:placeholder-shown) { - & + label { - color: var(--color-main); - font-size: 1em; + & .input-wrapper { + position: relative; + flex: 25% 1 0; + border: 2px solid var(--color-blue); + border-radius: var(--radius-default); + overflow: hidden; + transition: var(--transition-default); + outline: 0 solid var(--color-white); + + & label { + position: absolute; + font-size: .8em; top: .3rem; - right: .5rem; + left: .5rem; + transition: var(--transition-default); + } + + & input { + all: unset; + width: calc(100% - 1rem); + padding: 1.3rem .5rem .5rem .5rem; + background: var(--color-white); + + &[type="number"] { + text-align: right; + } + } + + & input:focus, + & input:not(:placeholder-shown) { + & + label { + color: var(--color-main); + } } } } \ No newline at end of file diff --git a/app/assets/styles/general.css b/app/assets/styles/general.css index c206ecb..f6c2d70 100755 --- a/app/assets/styles/general.css +++ b/app/assets/styles/general.css @@ -10,6 +10,7 @@ --color-blue: #2e86de; --color-blue-dark: #1b4b7f; --color-grey: #c7c7c7; + --color-black: #333; --color-orange: #DE9C2F; @@ -127,4 +128,41 @@ body { .gap-default { gap: 1rem; +} + +.bg-blue { + background: var(--color-blue); +} + +.bg-white { + background: var(--color-white); +} + +.padding { + gap: 1rem; + padding: var(--padding-default); +} + +dialog { + top: 50%; + left: 50%; + width: 100vw; + transform: translate(-50%, -50%); + border: none; + border-radius: var(--radius-default); + + font-size: 1rem; + + & header { + justify-content: space-between; + align-items: center; + } + + & footer { + justify-content: space-between; + } + + &::backdrop { + background: rgba(0, 0, 0, 0.5); + } } \ No newline at end of file diff --git a/app/assets/styles/priceCard.css b/app/assets/styles/priceCard.css index 47acd68..9eb4269 100755 --- a/app/assets/styles/priceCard.css +++ b/app/assets/styles/priceCard.css @@ -11,83 +11,66 @@ opacity: 0; } - &.folded { - grid-template-rows: auto 0fr auto; - } - & > header { color: var(--color-white); display: flex; justify-content: space-between; align-items: center; - font-size: 1.3em; + font-size: 1.5rem; + + & .icon { + font-size: 1.2rem; + cursor: pointer; + } + + & > .name-price { + display: flex; + gap: .5rem; + + & > span:nth-child(2)::before { + content: '•'; + margin-right: .5rem; + opacity: .5; + } + } & > .Button { color: var(--color-white); - border: 2px solid var(--color-white); } } - & aside { - overflow: hidden; - } - - & footer { - display: flex; - justify-content: space-between; - align-items: center; - - & > .Button.delete { - scale: 0; - } - - & > .Button.deletable { - scale: 1; - } - } - - & .padding { - gap: 1rem; - padding: var(--padding-default); - } - - & .bg-blue { - background: var(--color-blue); - } - - & .bg-white { - background: var(--color-white); - } - & .wrapper { display: flex; flex-direction: row; width: 100%; gap: 1rem; justify-content: space-between; + padding-top: 0; & > * { - flex-basis: 25%; - flex-grow: 1; + flex-basis: 10%; + flex-grow: 0; } & > .info { + color: var(--color-white); align-items: center; + gap: .25rem; & > .icon { - color: var(--color-blue-light); font-size: 2rem; padding: .2rem; } & > .price { - font-size: 1.2rem; + display: flex; + align-items: center; + gap: .5rem; } & > .pro { - font-size: .8rem; + font-size: .6rem; font-weight: bold; - color: var(--color-main-light); } } } diff --git a/app/components/Pp/DeleteDialog.vue b/app/components/Pp/DeleteDialog.vue new file mode 100644 index 0000000..dd24927 --- /dev/null +++ b/app/components/Pp/DeleteDialog.vue @@ -0,0 +1,39 @@ + + + \ No newline at end of file diff --git a/app/components/Pp/FormInput.vue b/app/components/Pp/FormInput.vue index 66c8a94..cd1ec71 100755 --- a/app/components/Pp/FormInput.vue +++ b/app/components/Pp/FormInput.vue @@ -1,17 +1,20 @@ @@ -22,9 +25,9 @@ type Props = { min ?: number step ?: number required ?: boolean + message ?: string label : string id : string - uid : string } const { @@ -32,15 +35,9 @@ const { required = false, step = 0.01, min = 1, - max, - label, - id, - uid, } = defineProps() const emit = defineEmits(['blur']) const text = defineModel() - -const makeId = () => `${id}_${uid}` diff --git a/app/components/Pp/PriceCard.vue b/app/components/Pp/PriceCard.vue index 0b495bb..7df8199 100755 --- a/app/components/Pp/PriceCard.vue +++ b/app/components/Pp/PriceCard.vue @@ -1,64 +1,47 @@ diff --git a/app/components/Pp/PriceCardDialog.vue b/app/components/Pp/PriceCardDialog.vue new file mode 100644 index 0000000..00dd42f --- /dev/null +++ b/app/components/Pp/PriceCardDialog.vue @@ -0,0 +1,129 @@ + + + \ No newline at end of file diff --git a/app/pages/index.vue b/app/pages/index.vue index cc1abb7..84debe6 100755 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -1,4 +1,15 @@