nuxt-glorious 1.2.9-9-9-0 → 1.3.0
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/dist/module.json +1 -1
- package/dist/runtime/components/G/File.vue +4 -1
- package/dist/runtime/components/G/Select.vue +1 -1
- package/dist/runtime/components/G/textarea.vue +6 -2
- package/dist/runtime/components/props/Select.d.ts +5 -0
- package/dist/runtime/components/props/Select.mjs +3 -1
- package/dist/runtime/components/props/common/index.d.ts +7 -0
- package/dist/runtime/components/props/common/index.mjs +7 -0
- package/dist/runtime/style/components/select.css +1 -1
- package/dist/runtime/style/components/select.scss +1 -1
- package/dist/runtime/style/components/textarea.css +5 -2
- package/dist/runtime/style/components/textarea.scss +6 -2
- package/package.json +1 -1
package/dist/module.json
CHANGED
@@ -18,7 +18,10 @@ const deleteFile = (event: any) => {
|
|
18
18
|
</script>
|
19
19
|
<template>
|
20
20
|
<div class="flex flex-col">
|
21
|
-
<span
|
21
|
+
<span
|
22
|
+
v-if="props.title !== ''"
|
23
|
+
class="glorious-title text-sm font-medium text-gray-500"
|
24
|
+
>
|
22
25
|
{{ props.title }}
|
23
26
|
<span
|
24
27
|
v-if="props.required"
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<script setup lang="ts">
|
2
2
|
import { ref, watch } from '#imports'
|
3
3
|
import _props from '../props/Textarea'
|
4
|
+
import { hasValidationError } from '../helper'
|
4
5
|
const props = defineProps(_props)
|
5
6
|
const modelValue = defineModel()
|
6
7
|
|
@@ -30,13 +31,16 @@ watch(
|
|
30
31
|
<div class="glorious-textarea">
|
31
32
|
<textarea
|
32
33
|
v-model="inputValue"
|
33
|
-
:class="[
|
34
|
+
:class="[
|
35
|
+
`glorious-textarea-${props.color}`,
|
36
|
+
hasValidationError(props.error) ? 'validation-error' : '',
|
37
|
+
]"
|
34
38
|
:placeholder="props.placeholder"
|
35
39
|
:disabled="props.disabled"
|
36
40
|
:rows="props.rows"
|
37
41
|
/>
|
42
|
+
<GErrorText :error="props.error" />
|
38
43
|
</div>
|
39
|
-
<GErrorText :error="props.error" />
|
40
44
|
</div>
|
41
45
|
</template>
|
42
46
|
|
@@ -7,7 +7,8 @@ import {
|
|
7
7
|
disabled,
|
8
8
|
placeholder,
|
9
9
|
required,
|
10
|
-
displayTextKey
|
10
|
+
displayTextKey,
|
11
|
+
keyOfValue
|
11
12
|
} from "./common/index.mjs";
|
12
13
|
export default {
|
13
14
|
...size(),
|
@@ -16,6 +17,7 @@ export default {
|
|
16
17
|
...color(),
|
17
18
|
...required(),
|
18
19
|
...displayTextKey(),
|
20
|
+
...keyOfValue(),
|
19
21
|
...error,
|
20
22
|
...disabled,
|
21
23
|
...options
|
@@ -54,10 +54,13 @@
|
|
54
54
|
}
|
55
55
|
|
56
56
|
.glorious-textarea {
|
57
|
-
@apply relative w-full;
|
57
|
+
@apply relative w-full flex flex-col;
|
58
58
|
}
|
59
59
|
.glorious-textarea > textarea {
|
60
|
-
@apply w-full;
|
60
|
+
@apply w-full p-2;
|
61
|
+
}
|
62
|
+
.glorious-textarea > textarea.validation-error {
|
63
|
+
@apply ring-red-500 bg-red-50;
|
61
64
|
}
|
62
65
|
.glorious-textarea > textarea::placeholder {
|
63
66
|
@apply text-[14px];
|
@@ -33,9 +33,13 @@
|
|
33
33
|
}
|
34
34
|
|
35
35
|
.glorious-textarea {
|
36
|
-
@apply relative w-full;
|
36
|
+
@apply relative w-full flex flex-col;
|
37
37
|
> textarea {
|
38
|
-
@apply w-full;
|
38
|
+
@apply w-full p-2;
|
39
|
+
|
40
|
+
&.validation-error{
|
41
|
+
@apply ring-red-500 bg-red-50
|
42
|
+
}
|
39
43
|
}
|
40
44
|
> textarea::placeholder {
|
41
45
|
@apply text-[14px];
|
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"version": "1.
|
2
|
+
"version": "1.3.0",
|
3
3
|
"name": "nuxt-glorious",
|
4
4
|
"description": "This package provides many things needed by a project, including server requests and authentication, SEO and other requirements of a project.",
|
5
5
|
"repository": "sajadhzj/nuxt-glorious",
|