@nexxtmove/ui 1.1.1 → 1.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/dist/components/DropdownButton/DropdownButton.vue.d.ts +3 -3
- package/dist/components/TemplateCard/TemplateCard.vue.d.ts +16 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +345 -276
- package/dist/nuxt.js +1 -0
- package/package.json +1 -1
- package/src/components/DropdownButton/DropdownButton.vue +2 -2
- package/src/components/TemplateCard/TemplateCard.vue +90 -0
- package/src/components.json +1 -0
- package/src/index.ts +1 -0
package/dist/nuxt.js
CHANGED
|
@@ -47536,6 +47536,7 @@ var Yw, Xw, Zw, Qw, $w, eT = d((() => {
|
|
|
47536
47536
|
NexxtTabbedContent: "components/TabbedContent/TabbedContent.vue",
|
|
47537
47537
|
NexxtTable: "components/Table/Table.vue",
|
|
47538
47538
|
NexxtTabs: "components/Tabs/Tabs.vue",
|
|
47539
|
+
NexxtTemplateCard: "components/TemplateCard/TemplateCard.vue",
|
|
47539
47540
|
NexxtTimelineEvent: "components/TimelineEvent/TimelineEvent.vue",
|
|
47540
47541
|
NexxtTimelinePhaseblock: "components/TimelinePhaseblock/TimelinePhaseblock.vue",
|
|
47541
47542
|
NexxtToast: "components/Toast/Toast.vue",
|
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@ type NexxtDropdownButtonBase = {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export type NexxtDropdownButtonProps =
|
|
30
|
-
| (NexxtDropdownButtonBase & { iconOnly?: false; label: string; action
|
|
30
|
+
| (NexxtDropdownButtonBase & { iconOnly?: false; label: string; action?: string | (() => void) })
|
|
31
31
|
| (NexxtDropdownButtonBase & { iconOnly: true; label?: string; action?: string | (() => void) })
|
|
32
32
|
|
|
33
33
|
const {
|
|
@@ -134,7 +134,7 @@ const buttonClasses = computed(() => {
|
|
|
134
134
|
<button
|
|
135
135
|
class="flex cursor-pointer items-center gap-2 px-4 py-2 transition-colors duration-200"
|
|
136
136
|
:class="buttonClasses"
|
|
137
|
-
@click="action
|
|
137
|
+
@click="action ? handleAction(action) : toggle()"
|
|
138
138
|
>
|
|
139
139
|
<NexxtIcon v-if="icon" :name="icon" aria-hidden="true" />
|
|
140
140
|
{{ label }}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { IconName } from '@awesome.me/kit-37b149f3ef/icons'
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
import NexxtIcon from '../Icon/Icon.vue'
|
|
5
|
+
import NexxtTooltip from '../Tooltip/Tooltip.vue'
|
|
6
|
+
|
|
7
|
+
export type NexxtTemplateCardContentFeature = 'references' | 'valuation' | 'reviews' | 'packages'
|
|
8
|
+
|
|
9
|
+
export interface NexxtTemplateCardProps {
|
|
10
|
+
image?: string
|
|
11
|
+
title: string
|
|
12
|
+
subtitle?: string
|
|
13
|
+
contentFeatures?: NexxtTemplateCardContentFeature[]
|
|
14
|
+
messages?: Partial<Record<NexxtTemplateCardContentFeature, string>>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
type TemplateCardIcon = {
|
|
18
|
+
icon: IconName
|
|
19
|
+
textColor: string
|
|
20
|
+
backgroundColor: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const ICON_MAP: Record<NexxtTemplateCardContentFeature, TemplateCardIcon> = {
|
|
24
|
+
references: {
|
|
25
|
+
icon: 'house-circle-check',
|
|
26
|
+
textColor: 'text-cornflower-blue-500',
|
|
27
|
+
backgroundColor: 'bg-cornflower-blue-50',
|
|
28
|
+
},
|
|
29
|
+
valuation: { icon: 'circle-euro', textColor: 'text-rose-500', backgroundColor: 'bg-rose-50' },
|
|
30
|
+
reviews: { icon: 'star', textColor: 'text-orange-500', backgroundColor: 'bg-orange-50' },
|
|
31
|
+
packages: { icon: 'piggy-bank', textColor: 'text-green-500', backgroundColor: 'bg-green-50' },
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const DEFAULT_MESSAGES: Record<NexxtTemplateCardContentFeature, string> = {
|
|
35
|
+
references: 'Referenties',
|
|
36
|
+
valuation: 'Waardebepaling',
|
|
37
|
+
reviews: 'Reviews',
|
|
38
|
+
packages: 'Courtage',
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
defineOptions({ name: 'NexxtTemplateCard' })
|
|
42
|
+
|
|
43
|
+
const props = withDefaults(defineProps<NexxtTemplateCardProps>(), {
|
|
44
|
+
image: undefined,
|
|
45
|
+
subtitle: undefined,
|
|
46
|
+
contentFeatures: () => [],
|
|
47
|
+
messages: () => ({}),
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
const featureMessages = computed<Record<NexxtTemplateCardContentFeature, string>>(() => ({
|
|
51
|
+
...DEFAULT_MESSAGES,
|
|
52
|
+
...props.messages,
|
|
53
|
+
}))
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<template>
|
|
57
|
+
<div class="w-full max-w-105 rounded-xl border border-gray-200">
|
|
58
|
+
<picture class="h-38 w-full">
|
|
59
|
+
<img
|
|
60
|
+
v-if="image"
|
|
61
|
+
:src="image"
|
|
62
|
+
:alt="title"
|
|
63
|
+
loading="lazy"
|
|
64
|
+
class="w-full rounded-t-xl object-cover"
|
|
65
|
+
/>
|
|
66
|
+
<div v-else class="flex h-38 w-full items-center justify-center rounded-t-xl bg-gray-100">
|
|
67
|
+
<NexxtIcon name="image" class="text-4xl text-gray-400" />
|
|
68
|
+
</div>
|
|
69
|
+
</picture>
|
|
70
|
+
<div class="rounded-b-xl px-8 pt-3.5 pb-4">
|
|
71
|
+
<h3 class="truncate heading-4 text-gray-900">{{ title }}</h3>
|
|
72
|
+
<p v-if="subtitle" class="truncate body-normal text-gray-700">{{ subtitle }}</p>
|
|
73
|
+
<ul v-if="contentFeatures.length" class="mt-3 flex flex-wrap gap-2">
|
|
74
|
+
<li v-for="feature in contentFeatures" :key="feature">
|
|
75
|
+
<NexxtTooltip>
|
|
76
|
+
<div
|
|
77
|
+
:class="[ICON_MAP[feature].backgroundColor, ICON_MAP[feature].textColor]"
|
|
78
|
+
class="flex size-8 items-center justify-center rounded-full"
|
|
79
|
+
>
|
|
80
|
+
<NexxtIcon :name="ICON_MAP[feature].icon" />
|
|
81
|
+
</div>
|
|
82
|
+
<template #tooltip>
|
|
83
|
+
<span class="body-small text-gray-700">{{ featureMessages[feature] }}</span>
|
|
84
|
+
</template>
|
|
85
|
+
</NexxtTooltip>
|
|
86
|
+
</li>
|
|
87
|
+
</ul>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</template>
|
package/src/components.json
CHANGED
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"NexxtTabbedContent": "components/TabbedContent/TabbedContent.vue",
|
|
44
44
|
"NexxtTable": "components/Table/Table.vue",
|
|
45
45
|
"NexxtTabs": "components/Tabs/Tabs.vue",
|
|
46
|
+
"NexxtTemplateCard": "components/TemplateCard/TemplateCard.vue",
|
|
46
47
|
"NexxtTimelineEvent": "components/TimelineEvent/TimelineEvent.vue",
|
|
47
48
|
"NexxtTimelinePhaseblock": "components/TimelinePhaseblock/TimelinePhaseblock.vue",
|
|
48
49
|
"NexxtToast": "components/Toast/Toast.vue",
|
package/src/index.ts
CHANGED
|
@@ -46,6 +46,7 @@ export { default as NexxtSwitch } from './components/Switch/Switch.vue'
|
|
|
46
46
|
export { default as NexxtTabbedContent } from './components/TabbedContent/TabbedContent.vue'
|
|
47
47
|
export { default as NexxtTable } from './components/Table/Table.vue'
|
|
48
48
|
export { default as NexxtTabs } from './components/Tabs/Tabs.vue'
|
|
49
|
+
export { default as NexxtTemplateCard } from './components/TemplateCard/TemplateCard.vue'
|
|
49
50
|
export { default as NexxtTimelineEvent } from './components/TimelineEvent/TimelineEvent.vue'
|
|
50
51
|
export { default as NexxtTimelinePhaseblock } from './components/TimelinePhaseblock/TimelinePhaseblock.vue'
|
|
51
52
|
export { default as NexxtToast } from './components/Toast/Toast.vue'
|