srcdev-nuxt-forms 2.4.18 → 2.4.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/styles/forms/themes/_input-action-underlined.css +20 -0
- package/assets/styles/forms/themes/index.css +1 -0
- package/components/forms/c12/prop-validators/index.ts +1 -1
- package/components/forms/form-errors/InputError.vue +21 -33
- package/components/forms/input-text/variants/InputPasswordWithLabel.vue +5 -1
- package/components/forms/input-text/variants/InputTextWithLabel.vue +6 -5
- package/components/forms/input-textarea/variants/InputTextareaWithLabel.vue +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
[data-btn-theme='input-action-underlined'] {
|
|
3
|
+
--theme-btn-bg: transparent;
|
|
4
|
+
--theme-btn-border: transparent;
|
|
5
|
+
--theme-btn-outline: transparent;
|
|
6
|
+
--theme-btn-text: var(--_input-text-core-color);
|
|
7
|
+
|
|
8
|
+
--theme-btn-bg-hover: var(--blue-8);
|
|
9
|
+
--theme-btn-border-hover: var(--blue-8);
|
|
10
|
+
--theme-btn-outline-hover: var(--blue-8);
|
|
11
|
+
--theme-btn-text-hover: var(--gray-00);
|
|
12
|
+
|
|
13
|
+
--theme-btn-bg-focus: var(--blue-8);
|
|
14
|
+
--theme-btn-border-focus: var(--blue-8);
|
|
15
|
+
--theme-btn-outline-focus: var(--blue-8);
|
|
16
|
+
--theme-btn-text-focus: var(--gray-00);
|
|
17
|
+
|
|
18
|
+
--theme-form-focus-box-shadow: transparent;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -23,7 +23,7 @@ export const propValidators = {
|
|
|
23
23
|
'fvs-wght-800',
|
|
24
24
|
'fvs-wght-900',
|
|
25
25
|
],
|
|
26
|
-
theme: ['primary', 'secondary', 'tertiary', 'ghost', 'error', 'success', 'warning', 'input-action'],
|
|
26
|
+
theme: ['primary', 'secondary', 'tertiary', 'ghost', 'error', 'success', 'warning', 'input-action', 'input-action-underlined'],
|
|
27
27
|
checkboxAppearance: [null, 'with-decorator'],
|
|
28
28
|
checkboxStyle: ['check', 'cross'],
|
|
29
29
|
radioAppearance: [null, 'with-decorator'],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="input-error-message" :id :class="[elementClasses, { show: showError }, { detached: isDetached }, { hide: !showError }]" :data-Testid>
|
|
2
|
+
<div class="input-error-message" :id :class="[inputVariant, elementClasses, { show: showError }, { detached: isDetached }, { hide: !showError }]" :data-Testid>
|
|
3
3
|
<div class="inner" :class="[{ show: showError }]">
|
|
4
4
|
<div class="inner-content">
|
|
5
5
|
<div class="inner-icon">
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script setup lang="ts">
|
|
22
|
+
import propValidators from '../c12/prop-validators';
|
|
23
|
+
|
|
22
24
|
const props = defineProps({
|
|
23
25
|
dataTestid: {
|
|
24
26
|
type: String,
|
|
@@ -48,6 +50,13 @@ const props = defineProps({
|
|
|
48
50
|
type: Boolean,
|
|
49
51
|
required: true,
|
|
50
52
|
},
|
|
53
|
+
inputVariant: {
|
|
54
|
+
type: String as PropType<string>,
|
|
55
|
+
default: 'normal',
|
|
56
|
+
validator(value: string) {
|
|
57
|
+
return propValidators.inputVariant.includes(value);
|
|
58
|
+
},
|
|
59
|
+
},
|
|
51
60
|
});
|
|
52
61
|
|
|
53
62
|
const isArray = computed(() => {
|
|
@@ -72,12 +81,14 @@ const { elementClasses, updateElementClasses } = useStyleClassPassthrough(props.
|
|
|
72
81
|
--_gutter-inline: var(--_gutter);
|
|
73
82
|
--_transition-duration: 500ms;
|
|
74
83
|
--_transition-timing-function: linear;
|
|
75
|
-
--
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
84
|
+
--_padding-message: 1.2rem 1rem;
|
|
85
|
+
|
|
86
|
+
&.show {
|
|
87
|
+
--_grid-template-rows: 1fr;
|
|
88
|
+
--_opacity: var(--_opacity-show);
|
|
89
|
+
--_display: var(--_display-show);
|
|
90
|
+
--_gutter-block: var(--_gutter);
|
|
91
|
+
}
|
|
81
92
|
|
|
82
93
|
grid-row: 2;
|
|
83
94
|
grid-column: 1;
|
|
@@ -98,23 +109,10 @@ const { elementClasses, updateElementClasses } = useStyleClassPassthrough(props.
|
|
|
98
109
|
margin-block-start: 2rem;
|
|
99
110
|
}
|
|
100
111
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
&.hide {
|
|
104
|
-
margin-block-start: 0;
|
|
105
|
-
}
|
|
106
|
-
&.show {
|
|
107
|
-
margin-block-start: 1.2rem;
|
|
108
|
-
}
|
|
109
|
-
} */
|
|
112
|
+
&.outlined {
|
|
113
|
+
}
|
|
110
114
|
|
|
111
|
-
&.
|
|
112
|
-
--_grid-template-rows: 1fr;
|
|
113
|
-
--_opacity: var(--_opacity-show);
|
|
114
|
-
--_display: var(--_display-show);
|
|
115
|
-
--_message-translate-y: var(--_message-translate-y-show);
|
|
116
|
-
--_gutter-block: var(--_gutter);
|
|
117
|
-
--_padding-message: var(--_padding-message-show);
|
|
115
|
+
&.underlined {
|
|
118
116
|
}
|
|
119
117
|
|
|
120
118
|
.inner {
|
|
@@ -123,11 +121,6 @@ const { elementClasses, updateElementClasses } = useStyleClassPassthrough(props.
|
|
|
123
121
|
overflow: hidden;
|
|
124
122
|
transition: opacity var(--_transition-duration) var(--_transition-timing-function), display var(--_transition-duration) var(--_transition-timing-function) allow-discrete;
|
|
125
123
|
|
|
126
|
-
&.show {
|
|
127
|
-
display: var(--_display-show);
|
|
128
|
-
opacity: var(--_opacity-show);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
124
|
.inner-content {
|
|
132
125
|
display: flex;
|
|
133
126
|
align-items: center;
|
|
@@ -150,11 +143,6 @@ const { elementClasses, updateElementClasses } = useStyleClassPassthrough(props.
|
|
|
150
143
|
font-weight: 500;
|
|
151
144
|
padding-block: var(--_padding-message);
|
|
152
145
|
padding-inline: var(--_gutter-inline);
|
|
153
|
-
transform: translateY(var(--_message-translate-y));
|
|
154
|
-
|
|
155
|
-
transition-property: transform, padding;
|
|
156
|
-
transition-duration: var(--_transition-duration);
|
|
157
|
-
transition-timing-function: linear;
|
|
158
146
|
|
|
159
147
|
.message-single {
|
|
160
148
|
color: white;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
@click.stop.prevent="toggleDisplayPassword"
|
|
22
22
|
:is-pending="false"
|
|
23
23
|
:buttonText
|
|
24
|
-
theme="
|
|
24
|
+
:theme="buttonTheme"
|
|
25
25
|
:size
|
|
26
26
|
@focusin="updateFocus(name, true)"
|
|
27
27
|
@focusout="updateFocus(name, false)"
|
|
@@ -102,6 +102,10 @@ const formTheme = computed(() => {
|
|
|
102
102
|
return props.fieldHasError ? 'error' : props.theme;
|
|
103
103
|
});
|
|
104
104
|
|
|
105
|
+
const buttonTheme = computed(() => {
|
|
106
|
+
return props.inputVariant === 'underlined' ? 'input-action-underlined' : 'input-action';
|
|
107
|
+
});
|
|
108
|
+
|
|
105
109
|
const modelValue = defineModel();
|
|
106
110
|
|
|
107
111
|
const { elementClasses, updateElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
</template>
|
|
36
36
|
</InputTextCore>
|
|
37
37
|
|
|
38
|
-
<InputError :errorMessage
|
|
38
|
+
<InputError :errorMessage :showError="fieldHasError" :id="errorId" :isDetached="false" :inputVariant />
|
|
39
39
|
</div>
|
|
40
40
|
|
|
41
41
|
<div v-if="inputVariant !== 'normal' && hasDescriptionSlot" :id="`${id}-description`">
|
|
@@ -179,7 +179,7 @@ watch(
|
|
|
179
179
|
|
|
180
180
|
&.underlined {
|
|
181
181
|
--_label-text-color: var(--theme-form-input-text-label-color-underlined);
|
|
182
|
-
--_label-offset: 1rem 0;
|
|
182
|
+
--_label-offset: 1rem 0.2rem;
|
|
183
183
|
--_input-text-with-label-background-color: color-mix(in srgb, currentColor 5%, transparent);
|
|
184
184
|
|
|
185
185
|
--_input-text-wrapper-underlined-border-radius-top-left: 0;
|
|
@@ -191,7 +191,7 @@ watch(
|
|
|
191
191
|
|
|
192
192
|
&:has(.input-text-wrapper.active),
|
|
193
193
|
&:has(.input-text-wrapper.dirty) {
|
|
194
|
-
--_label-offset: 0 -
|
|
194
|
+
--_label-offset: 0 -3.2rem;
|
|
195
195
|
--_label-text-weight: bolder;
|
|
196
196
|
--_label-text-size: var(--step-1);
|
|
197
197
|
/* line-height: 1.5; */
|
|
@@ -202,10 +202,10 @@ watch(
|
|
|
202
202
|
&.outlined {
|
|
203
203
|
--_label-text-color: var(--theme-form-input-text-label-color-outlined);
|
|
204
204
|
|
|
205
|
-
--_label-offset: 1rem 0;
|
|
205
|
+
--_label-offset: 1rem -0.2rem;
|
|
206
206
|
--_input-text-with-label-background-color: var(--theme-form-input-bg-normal);
|
|
207
207
|
|
|
208
|
-
--_input-text-wrapper-padding-block: 0.4em;
|
|
208
|
+
--_input-text-wrapper-padding-block: 0.4em 0;
|
|
209
209
|
|
|
210
210
|
&:has(.input-text-wrapper.active),
|
|
211
211
|
&:has(.input-text-wrapper.dirty) {
|
|
@@ -240,6 +240,7 @@ watch(
|
|
|
240
240
|
|
|
241
241
|
background-color: var(--_input-text-with-label-background-color);
|
|
242
242
|
border-radius: var(--_input-text-wrapper-border-radius);
|
|
243
|
+
|
|
243
244
|
/* overflow: clip; */
|
|
244
245
|
|
|
245
246
|
&.underlined {
|
|
@@ -160,7 +160,7 @@ watch(
|
|
|
160
160
|
|
|
161
161
|
&:has(.input-textarea-wrapper.active),
|
|
162
162
|
&:has(.input-textarea-wrapper.dirty) {
|
|
163
|
-
--_label-offset: 0 -
|
|
163
|
+
--_label-offset: 0 -3.2rem;
|
|
164
164
|
--_label-textarea-weight: bolder;
|
|
165
165
|
--_label-textarea-size: var(--step-1);
|
|
166
166
|
/* line-height: 1.5; */
|
|
@@ -174,7 +174,7 @@ watch(
|
|
|
174
174
|
--_label-offset: 1rem 0;
|
|
175
175
|
--_input-textarea-with-label-background-color: var(--theme-form-input-bg-normal);
|
|
176
176
|
|
|
177
|
-
--_input-textarea-wrapper-padding-block: 0.4em;
|
|
177
|
+
--_input-textarea-wrapper-padding-block: 0.4em 0;
|
|
178
178
|
--_label-textarea-height: fit-content;
|
|
179
179
|
|
|
180
180
|
&:has(.input-textarea-wrapper.active),
|
package/package.json
CHANGED