Skip to content

Commit 24d604b

Browse files
committed
feat: signup form uses form module fields
1 parent 596ad8e commit 24d604b

File tree

7 files changed

+91
-184
lines changed

7 files changed

+91
-184
lines changed

assets/scss/theme/typography.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ $fontAssetPath: 'assets/fonts';
292292

293293
@mixin formFieldErrorMessage {
294294
font-size: toRem(14);
295-
line-height: leading(21, 14);
295+
line-height: 1;
296296
font-weight: 400;
297297
letter-spacing: 0.01em;
298298
}

components/form/field-container.vue

+5-4
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ const handleFocus = (state, toggleState) => {
9696
9797
// ///////////////////////////////////////////////////////////////////// General
9898
.field-container {
99+
position: relative;
99100
&:hover,
100101
&:focus-within {
101102
.tooltip {
@@ -193,11 +194,11 @@ const handleFocus = (state, toggleState) => {
193194
194195
// ////////////////////////////////////////////////////////////////// Validation
195196
:deep(.validation-message) {
196-
margin-top: 0.5rem;
197-
font-size: 0.75rem;
198-
font-weight: 500;
197+
position: absolute;
198+
right: toRem(3);
199+
margin-top: toRem(6);
200+
@include formFieldErrorMessage;
199201
color: $burntSienna;
200-
font-style: italic;
201202
sup {
202203
top: -0.125rem;
203204
margin-right: 0.0625rem;

components/form/field/input.vue

+6-7
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@ const props = defineProps({
2525
</script>
2626

2727
<style lang="scss" scoped>
28-
$height: toRem(35);
28+
$height: toRem(41);
2929
3030
// ///////////////////////////////////////////////////////////////////// General
3131
.field-input {
32-
max-width: toRem(500);
32+
// max-width: toRem(500);
3333
height: $height;
3434
border: 2px solid $sageGreen;
35-
background-color: $sageGreen;
3635
border-radius: toRem(5);
3736
transition: 150ms ease-in-out;
3837
&:not(.disabled) {
@@ -60,7 +59,7 @@ $height: toRem(35);
6059
&.disabled {
6160
cursor: no-drop;
6261
:deep(.input) {
63-
// color: rgba($whisper, 0.7);
62+
color: rgba(var(--primary-text-color), 0.7);
6463
}
6564
:deep(.step-control) {
6665
cursor: no-drop;
@@ -94,10 +93,10 @@ $height: toRem(35);
9493
align-items: center;
9594
padding: 0 toRem(12);
9695
padding-top: toRem(3);
96+
@include formFieldText;
9797
@include placeholder {
98-
// color: $whisper;
99-
font-weight: 400;
100-
opacity: 0.7;
98+
@include formFieldPlaceholder;
99+
opacity: 0.9;
101100
}
102101
}
103102

components/form/field/select.vue

+22-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<template>
22
<ZeroFieldSelect
3+
class="field-select"
34
v-bind="{...props, ...$attrs}"
45
:options="options">
56

@@ -92,19 +93,19 @@ const getSelectedOptionLabels = (selection, placeholder) => {
9293
</script>
9394

9495
<style lang="scss" scoped>
95-
$height: toRem(35);
96+
$height: toRem(41);
9697
9798
// ///////////////////////////////////////////////////////////////////// General
9899
div.field-select {
99-
max-width: toRem(380);
100+
// max-width: toRem(380);
100101
height: $height;
101102
padding: 0 toRem(12);
102103
border: 2px solid $sageGreen;
103-
background-color: $sageGreen;
104104
border-radius: toRem(5);
105105
transition: 150ms ease-in-out;
106106
&:not(.disabled) {
107-
&:hover {
107+
&:hover,
108+
&.error:hover {
108109
border-color: rgba($chardonnay, 0.5);
109110
.icon-container {
110111
transition: 150ms ease-in;
@@ -114,6 +115,11 @@ div.field-select {
114115
&.in-progress {
115116
transition: border-color 150ms ease-in;
116117
border-color: rgba($chardonnay, 0.9);
118+
&.dropdown-open {
119+
border-bottom-color: transparent;
120+
border-bottom-left-radius: 0;
121+
border-bottom-right-radius: 0;
122+
}
117123
}
118124
&.error {
119125
transition: border-color 150ms ease-in;
@@ -152,10 +158,14 @@ div.field-select {
152158
transition: scale 150ms ease-out;
153159
max-height: calc(#{$height} * 5.5);
154160
width: calc(100% + 4px);
161+
top: 100%;
155162
left: -2px;
156-
background-color: $sageGreen;
157-
// border: 2px solid rgba($whisper, 0.5);
158-
border-radius: 0.3125rem;
163+
border: 2px solid $chardonnay;
164+
border-top: none;
165+
background-color: $codGray;
166+
border-radius: toRem(5);
167+
border-top-left-radius: 0;
168+
border-top-right-radius: 0;
159169
}
160170
161171
.selection-window {
@@ -174,8 +184,9 @@ div.field-select {
174184
text-overflow: ellipsis;
175185
overflow: hidden;
176186
white-space: nowrap;
187+
@include formFieldText;
177188
&.is-placeholder {
178-
// color: rgba($whisper, 0.7);
189+
@include formFieldPlaceholder;
179190
}
180191
}
181192
.icon-container {
@@ -201,10 +212,12 @@ div.field-select {
201212
padding: 0.5rem 0.75rem;
202213
cursor: pointer;
203214
transition: 150ms ease-out;
215+
@include formFieldPlaceholder;
204216
&:hover,
205217
&.highlighted,
206218
&.selected {
207-
// background-color: rgba($whisper, 0.1);
219+
background-color: var(--secondary-text-color);
220+
color: var(--background-color);
208221
}
209222
}
210223

0 commit comments

Comments
 (0)