srcdev-nuxt-forms 2.4.14 → 2.4.16

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.
@@ -28,3 +28,9 @@ a {
28
28
  font-family: var(--font-family);
29
29
  font-size: var(--step-1);
30
30
  }
31
+
32
+ body {
33
+ &.page-theme-grey {
34
+ background-color: lightseagreen;
35
+ }
36
+ }
@@ -169,10 +169,13 @@ onMounted(() => {
169
169
  --_input-text-wrapper-opacity: 1;
170
170
  --_input-text-wrapper-box-shadow: var(--_focus-box-shadow);
171
171
  --_input-text-wrapper-margin-inline: 0;
172
+ --_input-text-wrapper-padding-block: 0;
172
173
 
173
174
  &.underlined {
174
175
  --_input-text-core-color: var(--theme-form-input-text-color-underlined);
175
- --_input-text-wrapper-background-color: var(--theme-form-input-bg-underlined);
176
+ /* --_input-text-wrapper-background-color: var(--theme-form-input-bg-underlined); */
177
+ --_input-text-wrapper-background-color: transparent;
178
+ --_input-text-wrapper-padding-block: 0.5rem;
176
179
  }
177
180
 
178
181
  &.outlined {
@@ -229,6 +232,7 @@ onMounted(() => {
229
232
  opacity: var(--_input-text-wrapper-opacity);
230
233
 
231
234
  margin-inline: var(--_input-text-wrapper-margin-inline);
235
+ padding-block: var(--_input-text-wrapper-padding-block);
232
236
 
233
237
  &:not(.normal) {
234
238
  transition: opacity 0.2s ease-in-out;
@@ -172,20 +172,29 @@ watch(
172
172
  /* Label vars */
173
173
  --_label-text-color: var(--theme-form-input-text-label-color-normal);
174
174
  --_label-text-margin-block: 0.8rem;
175
- --_label-text-size: var(--step-1);
175
+ --_label-text-size: var(--step-2);
176
176
  --_label-text-weight: normal;
177
177
  --_label-text-line-height: 1.5;
178
+ --_label-text-background-color: var(--_input-text-with-label-background-color);
178
179
 
179
180
  &.underlined {
180
181
  --_label-text-color: var(--theme-form-input-text-label-color-underlined);
181
- --_label-offset: 0 0;
182
- --_input-text-with-label-background-color: var(--theme-form-input-bg-underlined);
183
- --_input-text-wrapper-border-radius: 0;
182
+ --_label-offset: 1rem 0;
183
+ /* --_input-text-with-label-background-color: var(--theme-form-input-bg-underlined); */
184
+ --_input-text-with-label-background-color: rgba(255, 255, 255, 0.1);
185
+
186
+ --_input-text-wrapper-underlined-border-radius-top-left: 0;
187
+ --_input-text-wrapper-underlined-border-radius-top-right: 0;
188
+ --_input-text-wrapper-underlined-border-radius-bottom-left: 4px;
189
+ --_input-text-wrapper-underlined-border-radius-bottom-right: 4px;
190
+
191
+ --_label-text-background-color: transparent;
184
192
 
185
193
  &:has(.input-text-wrapper.active),
186
194
  &:has(.input-text-wrapper.dirty) {
187
- --_label-offset: 0 -2.8rem;
188
- /* font-size: var(--step-1); */
195
+ --_label-offset: 0 -4.2rem;
196
+ --_label-text-weight: bolder;
197
+ --_label-text-size: var(--step-1);
189
198
  /* line-height: 1.5; */
190
199
  /* padding: 0.2rem 1.2rem; */
191
200
  }
@@ -202,14 +211,15 @@ watch(
202
211
  &:has(.input-text-wrapper.active),
203
212
  &:has(.input-text-wrapper.dirty) {
204
213
  --_label-offset: 1rem -2.8rem;
205
- /* font-size: var(--step-1); */
214
+ --_label-text-weight: normal;
215
+ /* --_label-text-size: var(--step-1); */
206
216
  /* line-height: 1.5; */
207
217
  /* padding: 0.2rem 1.2rem; */
208
218
  }
209
219
  }
210
220
 
211
221
  &:not(.normal) {
212
- --_input-text-with-label-margin-block-start: 2em;
222
+ --_input-text-with-label-margin-block-start: 3em;
213
223
 
214
224
  &:has(.input-text-wrapper.active),
215
225
  &:has(.input-text-wrapper.dirty) {
@@ -231,9 +241,14 @@ watch(
231
241
 
232
242
  background-color: var(--_input-text-with-label-background-color);
233
243
  border-radius: var(--_input-text-wrapper-border-radius);
244
+ /* overflow: clip; */
234
245
 
235
246
  &.underlined {
236
247
  border-bottom: var(--_input-text-wrapper-border-underlined);
248
+ border-top-left-radius: var(--_input-text-wrapper-underlined-border-radius-top-left);
249
+ border-top-right-radius: var(--_input-text-wrapper-underlined-border-radius-top-right);
250
+ border-bottom-left-radius: var(--_input-text-wrapper-underlined-border-radius-bottom-left);
251
+ border-bottom-right-radius: var(--_input-text-wrapper-underlined-border-radius-bottom-right);
237
252
  }
238
253
 
239
254
  &.outlined {
@@ -262,14 +277,21 @@ watch(
262
277
  }
263
278
 
264
279
  .input-text-label {
265
- display: block;
280
+ display: inline-block;
266
281
  color: var(--_label-text-color);
282
+ background-color: var(--_label-text-background-color);
267
283
  margin-block: var(--_label-text-margin-block);
268
284
  font-size: var(--_label-text-size);
269
285
  font-weight: var(--_label-text-weight);
270
286
  line-height: var(--_label-text-line-height);
271
287
  translate: var(--_label-offset);
288
+ width: fit-content;
272
289
  transition: font-size 0.2s ease-in-out, translate 0.2s ease-in-out;
290
+
291
+ &:not(.normal) {
292
+ display: flex;
293
+ align-items: center;
294
+ }
273
295
  }
274
296
  }
275
297
  </style>
@@ -32,10 +32,10 @@ defineProps({
32
32
  .form-field {
33
33
  --_gutter-width: 0rem;
34
34
  --_max-width: 400px;
35
- --_background-color: var(--page-bg);
35
+ --_background-color: transparent;
36
36
  --_border-radius: 0.4rem;
37
37
 
38
- background-color: var(--gray-2);
38
+ background-color: var(--_background-color);
39
39
  border-radius: var(--_border-radius);
40
40
  margin-inline: auto;
41
41
  margin-block: 1lh;
@@ -47,6 +47,10 @@ defineProps({
47
47
  background-color: var(--theme-error-surface);
48
48
  }
49
49
 
50
+ &:has(.underline) {
51
+ --_background-color: var(--theme-form-input-bg-underlined);
52
+ }
53
+
50
54
  .form-field-inner {
51
55
  background-color: var(--_background-color);
52
56
  border-radius: var(--_border-radius);
@@ -1,4 +1,3 @@
1
- import { ref, reactive, toRaw, type Ref } from 'vue';
2
1
  import { z, ZodError } from 'zod';
3
2
  import type { ApiErrorResponse } from '../types/types.forms';
4
3
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-forms",
3
3
  "type": "module",
4
- "version": "2.4.14",
4
+ "version": "2.4.16",
5
5
  "main": "nuxt.config.ts",
6
6
  "scripts": {
7
7
  "clean": "rm -rf .nuxt && rm -rf .output && rm -rf .playground/.nuxt && rm -rf .playground/.output",