nuxt-unified-ui 0.1.1 → 0.1.3
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/app/app.config.js +0 -38
- package/app/assets/css/nuxt-ui-fixes.css +22 -0
- package/app/components/un-form.vue +3 -1
- package/app/dialogs/choice-picker-dialog.vue +3 -3
- package/app/elements/form-element-checkbox.vue +2 -2
- package/app/elements/form-element-date.vue +3 -3
- package/app/elements/form-element-select.vue +2 -2
- package/app/elements/form-element-text.vue +2 -2
- package/app/elements/form-element-textarea.vue +22 -0
- package/app/utils/format-date.ts +1 -1
- package/modules/radash.ts +4 -4
- package/nuxt.config.js +5 -0
- package/package.json +7 -4
package/app/app.config.js
CHANGED
|
@@ -2,48 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
export default defineAppConfig({
|
|
4
4
|
ui: {
|
|
5
|
-
|
|
6
|
-
badge: {
|
|
7
|
-
defaultVariants: {
|
|
8
|
-
color: 'neutral',
|
|
9
|
-
},
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
button: {
|
|
13
|
-
defaultVariants: {
|
|
14
|
-
color: 'neutral',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
calendar: {
|
|
19
|
-
defaultVariants: {
|
|
20
|
-
color: 'neutral',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
|
|
24
5
|
card: {
|
|
25
6
|
slots: {
|
|
26
7
|
body: 'p-3 sm:p-3',
|
|
27
8
|
},
|
|
28
9
|
},
|
|
29
|
-
|
|
30
|
-
input: {
|
|
31
|
-
defaultVariants: {
|
|
32
|
-
color: 'neutral',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
select: {
|
|
37
|
-
defaultVariants: {
|
|
38
|
-
color: 'neutral',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
tabs: {
|
|
43
|
-
defaultVariants: {
|
|
44
|
-
color: 'neutral',
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
|
|
48
10
|
},
|
|
49
11
|
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
/* localization */
|
|
4
|
+
|
|
5
|
+
@utility rtl {
|
|
6
|
+
direction: rtl;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@utility ltr {
|
|
10
|
+
direction: ltr;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/* fixes */
|
|
15
|
+
|
|
16
|
+
body {
|
|
17
|
+
@apply overflow-y-auto! ps-0!;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
table thead tr th {
|
|
21
|
+
@apply text-start whitespace-nowrap;
|
|
22
|
+
}
|
|
@@ -11,6 +11,7 @@ const props = defineProps({
|
|
|
11
11
|
/* elements */
|
|
12
12
|
|
|
13
13
|
import FormElementText from '../elements/form-element-text.vue';
|
|
14
|
+
import FormElementTextarea from '../elements/form-element-textarea.vue';
|
|
14
15
|
import FormElementSelect from '../elements/form-element-select.vue';
|
|
15
16
|
import FormElementSeries from '../elements/form-element-series.vue';
|
|
16
17
|
import FormElementCheckbox from '../elements/form-element-checkbox.vue';
|
|
@@ -19,6 +20,7 @@ import FormElementDate from '../elements/form-element-date.vue';
|
|
|
19
20
|
|
|
20
21
|
const elementsMap = {
|
|
21
22
|
'text': FormElementText,
|
|
23
|
+
'textarea': FormElementTextarea,
|
|
22
24
|
'select': FormElementSelect,
|
|
23
25
|
'series': FormElementSeries,
|
|
24
26
|
'date': FormElementDate,
|
|
@@ -64,4 +66,4 @@ const filteredFields = computed(() => {
|
|
|
64
66
|
/>
|
|
65
67
|
</div>
|
|
66
68
|
</div>
|
|
67
|
-
</template>
|
|
69
|
+
</template>
|
|
@@ -21,7 +21,7 @@ const props = defineProps({
|
|
|
21
21
|
{
|
|
22
22
|
label: 'Submit',
|
|
23
23
|
value: true,
|
|
24
|
-
}
|
|
24
|
+
},
|
|
25
25
|
],
|
|
26
26
|
},
|
|
27
27
|
endButtons: {
|
|
@@ -31,7 +31,7 @@ const props = defineProps({
|
|
|
31
31
|
variant: 'ghost',
|
|
32
32
|
label: 'Cancel',
|
|
33
33
|
value: false,
|
|
34
|
-
}
|
|
34
|
+
},
|
|
35
35
|
],
|
|
36
36
|
},
|
|
37
37
|
});
|
|
@@ -60,7 +60,7 @@ async function handleButtonClick(button) {
|
|
|
60
60
|
<u-modal @update:open="!$event && emit('close')">
|
|
61
61
|
<template #content>
|
|
62
62
|
<u-card>
|
|
63
|
-
|
|
63
|
+
|
|
64
64
|
<un-typography
|
|
65
65
|
:icon="props.icon"
|
|
66
66
|
:title="props.title"
|
|
@@ -12,10 +12,10 @@ const modelValue = defineModel();
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
<template>
|
|
15
|
-
<u-form-field v-bind="radPick(props.field, [ 'fieldLabel' ])">
|
|
15
|
+
<u-form-field v-bind="radPick(props.field, [ 'fieldLabel', 'hint' ])">
|
|
16
16
|
<u-checkbox
|
|
17
17
|
class="w-full"
|
|
18
|
-
v-bind="radOmit(props.field, [ 'key', 'identifier', 'fieldLabel' ])"
|
|
18
|
+
v-bind="radOmit(props.field, [ 'key', 'identifier', 'fieldLabel', 'hint' ])"
|
|
19
19
|
v-model="modelValue"
|
|
20
20
|
/>
|
|
21
21
|
</u-form-field>
|
|
@@ -16,7 +16,7 @@ import { CalendarDate } from '@internationalized/date';
|
|
|
16
16
|
|
|
17
17
|
const internalModel = computed({
|
|
18
18
|
get: () => {
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
if (!modelValue.value) {
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
@@ -48,10 +48,10 @@ const inputTitle = computed(() => {
|
|
|
48
48
|
<template>
|
|
49
49
|
<u-popover>
|
|
50
50
|
|
|
51
|
-
<u-form-field v-bind="radPick(props.field, [ 'label' ])">
|
|
51
|
+
<u-form-field v-bind="radPick(props.field, [ 'label', 'hint' ])">
|
|
52
52
|
<u-input
|
|
53
53
|
class="w-full"
|
|
54
|
-
v-bind="radOmit(props.field, [ 'key', 'identifier', 'label' ])"
|
|
54
|
+
v-bind="radOmit(props.field, [ 'key', 'identifier', 'label', 'hint' ])"
|
|
55
55
|
readonly
|
|
56
56
|
:model-value="inputTitle"
|
|
57
57
|
/>
|
|
@@ -12,10 +12,10 @@ const modelValue = defineModel();
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
<template>
|
|
15
|
-
<u-form-field v-bind="radPick(props.field, [ 'label' ])">
|
|
15
|
+
<u-form-field v-bind="radPick(props.field, [ 'label', 'hint' ])">
|
|
16
16
|
<u-select
|
|
17
17
|
class="w-full"
|
|
18
|
-
v-bind="radOmit(props.field, [ 'key', 'identifier', 'label' ])"
|
|
18
|
+
v-bind="radOmit(props.field, [ 'key', 'identifier', 'label', 'hint' ])"
|
|
19
19
|
v-model="modelValue"
|
|
20
20
|
/>
|
|
21
21
|
</u-form-field>
|
|
@@ -12,10 +12,10 @@ const modelValue = defineModel();
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
<template>
|
|
15
|
-
<u-form-field v-bind="radPick(props.field, [ 'label' ])">
|
|
15
|
+
<u-form-field v-bind="radPick(props.field, [ 'label', 'hint' ])">
|
|
16
16
|
<u-input
|
|
17
17
|
class="w-full"
|
|
18
|
-
v-bind="radOmit(props.field, [ 'key', 'identifier', 'label' ])"
|
|
18
|
+
v-bind="radOmit(props.field, [ 'key', 'identifier', 'label', 'hint' ])"
|
|
19
19
|
v-model="modelValue"
|
|
20
20
|
/>
|
|
21
21
|
</u-form-field>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
|
|
3
|
+
/* interface */
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
field: Object,
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const modelValue = defineModel();
|
|
10
|
+
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<u-form-field v-bind="radPick(props.field, [ 'label', 'hint' ])">
|
|
16
|
+
<u-textarea
|
|
17
|
+
class="w-full"
|
|
18
|
+
v-bind="radOmit(props.field, [ 'key', 'identifier', 'label', 'hint' ])"
|
|
19
|
+
v-model="modelValue"
|
|
20
|
+
/>
|
|
21
|
+
</u-form-field>
|
|
22
|
+
</template>
|
package/app/utils/format-date.ts
CHANGED
package/modules/radash.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineNuxtModule, addImports } from
|
|
2
|
-
import * as radash from
|
|
1
|
+
import { defineNuxtModule, addImports } from '@nuxt/kit';
|
|
2
|
+
import * as radash from 'radash';
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
export default defineNuxtModule({
|
|
6
6
|
meta: {
|
|
7
|
-
name:
|
|
7
|
+
name: 'nuxt-radash',
|
|
8
8
|
},
|
|
9
9
|
setup() {
|
|
10
10
|
for (const name of Object.keys(radash)) {
|
|
@@ -15,7 +15,7 @@ export default defineNuxtModule({
|
|
|
15
15
|
addImports({
|
|
16
16
|
name,
|
|
17
17
|
as,
|
|
18
|
-
from:
|
|
18
|
+
from: 'radash',
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
}
|
package/nuxt.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-unified-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.3",
|
|
5
5
|
"main": "./nuxt.config.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./nuxt.config.js",
|
|
8
|
+
"./nuxt-ui-fixes.css": "./app/assets/css/nuxt-ui-fixes.css"
|
|
9
|
+
},
|
|
6
10
|
"files": [
|
|
7
11
|
"nuxt.config.js",
|
|
8
12
|
"package.json",
|
|
9
13
|
"app",
|
|
10
|
-
"layers",
|
|
11
14
|
"modules"
|
|
12
15
|
],
|
|
13
16
|
"dependencies": {
|
|
14
17
|
"@formkit/tempo": "0.1.2",
|
|
15
|
-
"@iconify-json/lucide": "1.2.
|
|
18
|
+
"@iconify-json/lucide": "1.2.74",
|
|
16
19
|
"@nuxt/kit": "4.2.1",
|
|
17
|
-
"@nuxt/ui": "4.1
|
|
20
|
+
"@nuxt/ui": "4.2.1",
|
|
18
21
|
"@vueuse/core": "14.0.0",
|
|
19
22
|
"@vueuse/nuxt": "14.0.0",
|
|
20
23
|
"radash": "12.1.1",
|