@nexxtmove/ui 0.1.34 → 0.1.35
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/index.d.ts +30 -8
- package/dist/index.js +708 -643
- package/dist/nuxt.js +15 -14
- package/package.json +1 -1
- package/src/components/InputField/InputField.vue +84 -0
- package/src/components.json +1 -0
- package/src/index.ts +1 -0
package/dist/nuxt.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineNuxtModule as c, addComponent as s, addTemplate as a } from "@nuxt/kit";
|
|
2
|
-
const i = "components/AnimatedNumber/AnimatedNumber.vue", m = "components/Avatar/Avatar.vue", x = "components/Button/Button.vue", u = "components/Calendar/Calendar.vue", p = "components/Checkbox/Checkbox.vue", l = "components/Chip/Chip.vue", r = "components/CustomerJourneyTile/CustomerJourneyTile.vue", d = "components/DatePicker/DatePicker.vue", v = "components/DropdownButton/DropdownButton.vue", N = "components/Header/Header.vue", T = "components/Icon/Icon.vue", C = "components/InfoBlock/InfoBlock.vue", S = "components/Pagination/Pagination.vue",
|
|
2
|
+
const i = "components/AnimatedNumber/AnimatedNumber.vue", m = "components/Avatar/Avatar.vue", x = "components/Button/Button.vue", u = "components/Calendar/Calendar.vue", p = "components/Checkbox/Checkbox.vue", l = "components/Chip/Chip.vue", r = "components/CustomerJourneyTile/CustomerJourneyTile.vue", d = "components/DatePicker/DatePicker.vue", v = "components/DropdownButton/DropdownButton.vue", N = "components/Header/Header.vue", T = "components/Icon/Icon.vue", C = "components/InfoBlock/InfoBlock.vue", S = "components/InputField/InputField.vue", b = "components/Pagination/Pagination.vue", f = "components/ProgressBar/ProgressBar.vue", h = "components/SocialIcons/SocialIcons.vue", P = "components/SocialMediaCustomTemplate/SocialMediaCustomTemplate.vue", k = "components/SocialMediaTemplate/SocialMediaTemplate.vue", B = "components/SocialMediaType/SocialMediaType.vue", I = "components/StepperHeader/StepperHeader.vue", M = "components/Table/Table.vue", g = "components/TimelineEvent/TimelineEvent.vue", y = "components/TimelinePhaseblock/TimelinePhaseblock.vue", A = "components/Tooltip/Tooltip.vue", D = {
|
|
3
3
|
NexxtAnimatedNumber: i,
|
|
4
4
|
NexxtAvatar: m,
|
|
5
5
|
NexxtButton: x,
|
|
@@ -12,18 +12,19 @@ const i = "components/AnimatedNumber/AnimatedNumber.vue", m = "components/Avatar
|
|
|
12
12
|
NexxtHeader: N,
|
|
13
13
|
NexxtIcon: T,
|
|
14
14
|
NexxtInfoBlock: C,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
NexxtInputField: S,
|
|
16
|
+
NexxtPagination: b,
|
|
17
|
+
NexxtProgressBar: f,
|
|
18
|
+
NexxtSocialIcons: h,
|
|
19
|
+
NexxtSocialMediaCustomTemplate: P,
|
|
20
|
+
NexxtSocialMediaTemplate: k,
|
|
21
|
+
NexxtSocialMediaType: B,
|
|
22
|
+
NexxtStepperHeader: I,
|
|
22
23
|
NexxtTable: M,
|
|
23
|
-
NexxtTimelineEvent:
|
|
24
|
-
NexxtTimelinePhaseblock:
|
|
25
|
-
NexxtTooltip:
|
|
26
|
-
},
|
|
24
|
+
NexxtTimelineEvent: g,
|
|
25
|
+
NexxtTimelinePhaseblock: y,
|
|
26
|
+
NexxtTooltip: A
|
|
27
|
+
}, w = c({
|
|
27
28
|
meta: {
|
|
28
29
|
name: "@nexxtmove/ui",
|
|
29
30
|
configKey: "nexxtmoveUi",
|
|
@@ -35,7 +36,7 @@ const i = "components/AnimatedNumber/AnimatedNumber.vue", m = "components/Avatar
|
|
|
35
36
|
addCSS: !0
|
|
36
37
|
},
|
|
37
38
|
setup(e, o) {
|
|
38
|
-
for (const [t, n] of Object.entries(
|
|
39
|
+
for (const [t, n] of Object.entries(D))
|
|
39
40
|
s({
|
|
40
41
|
name: t,
|
|
41
42
|
export: "default",
|
|
@@ -54,5 +55,5 @@ const i = "components/AnimatedNumber/AnimatedNumber.vue", m = "components/Avatar
|
|
|
54
55
|
}
|
|
55
56
|
});
|
|
56
57
|
export {
|
|
57
|
-
|
|
58
|
+
w as default
|
|
58
59
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, computed } from 'vue'
|
|
3
|
+
import Icon from '../Icon/Icon.vue'
|
|
4
|
+
|
|
5
|
+
const generateId = () => 'input-field-' + Math.random().toString(36).slice(2, 10)
|
|
6
|
+
const inputId = ref(generateId())
|
|
7
|
+
|
|
8
|
+
defineOptions({
|
|
9
|
+
name: 'NexxtInputField',
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
interface NexxtInputFieldProps {
|
|
13
|
+
placeholder?: string
|
|
14
|
+
label?: string
|
|
15
|
+
error?: boolean
|
|
16
|
+
errorMessage?: string
|
|
17
|
+
focused?: boolean
|
|
18
|
+
leftIcon?: InstanceType<typeof Icon>['name']
|
|
19
|
+
rightIcon?: InstanceType<typeof Icon>['name']
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const props = defineProps<NexxtInputFieldProps>()
|
|
23
|
+
|
|
24
|
+
// ✅ Correct usage
|
|
25
|
+
const modelValue = defineModel<string>()
|
|
26
|
+
|
|
27
|
+
const isFocused = ref(false)
|
|
28
|
+
|
|
29
|
+
const wrapperClasses = computed(() => {
|
|
30
|
+
if (props.error) {
|
|
31
|
+
return 'border-brick-400'
|
|
32
|
+
}
|
|
33
|
+
if (props.focused || isFocused.value) {
|
|
34
|
+
return 'border-cornflower-blue-500'
|
|
35
|
+
}
|
|
36
|
+
return 'border-gray-200'
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
const onFocus = () => {
|
|
40
|
+
isFocused.value = true
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const onBlur = () => {
|
|
44
|
+
isFocused.value = false
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<template>
|
|
49
|
+
<div class="flex w-full flex-col gap-1">
|
|
50
|
+
<label
|
|
51
|
+
v-if="props.label"
|
|
52
|
+
class="text-color-gray-700 justify-start body-normal text-sm"
|
|
53
|
+
:for="inputId"
|
|
54
|
+
>
|
|
55
|
+
{{ props.label }}
|
|
56
|
+
</label>
|
|
57
|
+
|
|
58
|
+
<div
|
|
59
|
+
class="flex items-center gap-2 rounded-lg border px-3 py-2 transition-colors"
|
|
60
|
+
:class="wrapperClasses"
|
|
61
|
+
>
|
|
62
|
+
<span v-if="props.leftIcon" class="flex items-center">
|
|
63
|
+
<Icon :name="props.leftIcon" />
|
|
64
|
+
</span>
|
|
65
|
+
|
|
66
|
+
<input
|
|
67
|
+
:id="inputId"
|
|
68
|
+
v-model="modelValue"
|
|
69
|
+
:placeholder="props.placeholder"
|
|
70
|
+
@focus="onFocus"
|
|
71
|
+
@blur="onBlur"
|
|
72
|
+
class="w-full bg-transparent text-sm text-gray-900 placeholder-gray-400 focus:outline-none"
|
|
73
|
+
/>
|
|
74
|
+
|
|
75
|
+
<span v-if="props.rightIcon" class="flex items-center">
|
|
76
|
+
<Icon :name="props.rightIcon" />
|
|
77
|
+
</span>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<p v-if="props.errorMessage" class="text-sm text-brick-400">
|
|
81
|
+
{{ props.errorMessage }}
|
|
82
|
+
</p>
|
|
83
|
+
</div>
|
|
84
|
+
</template>
|
package/src/components.json
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"NexxtHeader": "components/Header/Header.vue",
|
|
12
12
|
"NexxtIcon": "components/Icon/Icon.vue",
|
|
13
13
|
"NexxtInfoBlock": "components/InfoBlock/InfoBlock.vue",
|
|
14
|
+
"NexxtInputField": "components/InputField/InputField.vue",
|
|
14
15
|
"NexxtPagination": "components/Pagination/Pagination.vue",
|
|
15
16
|
"NexxtProgressBar": "components/ProgressBar/ProgressBar.vue",
|
|
16
17
|
"NexxtSocialIcons": "components/SocialIcons/SocialIcons.vue",
|
package/src/index.ts
CHANGED
|
@@ -11,6 +11,7 @@ export { default as NexxtDropdownButton } from './components/DropdownButton/Drop
|
|
|
11
11
|
export { default as NexxtHeader } from './components/Header/Header.vue'
|
|
12
12
|
export { default as NexxtIcon } from './components/Icon/Icon.vue'
|
|
13
13
|
export { default as NexxtInfoBlock } from './components/InfoBlock/InfoBlock.vue'
|
|
14
|
+
export { default as NexxtInputField } from './components/InputField/InputField.vue'
|
|
14
15
|
export { default as NexxtPagination } from './components/Pagination/Pagination.vue'
|
|
15
16
|
export { default as NexxtProgressBar } from './components/ProgressBar/ProgressBar.vue'
|
|
16
17
|
export { default as NexxtSocialIcons } from './components/SocialIcons/SocialIcons.vue'
|