@nexxtmove/ui 1.1.2 → 1.1.4
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/EnergyLabel/EnergyLabel.vue.d.ts +7 -0
- package/dist/components/TemplateCard/TemplateCard.vue.d.ts +16 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +365 -265
- package/dist/nuxt.js +2 -0
- package/package.json +8 -8
- package/src/components/EnergyLabel/EnergyLabel.vue +55 -0
- package/src/components/TemplateCard/TemplateCard.vue +90 -0
- package/src/components.json +2 -0
- package/src/index.ts +2 -0
package/dist/nuxt.js
CHANGED
|
@@ -47509,6 +47509,7 @@ var Yw, Xw, Zw, Qw, $w, eT = d((() => {
|
|
|
47509
47509
|
NexxtDatePicker: "components/DatePicker/DatePicker.vue",
|
|
47510
47510
|
NexxtDoughnutChart: "components/DoughnutChart/DoughnutChart.vue",
|
|
47511
47511
|
NexxtDropdownButton: "components/DropdownButton/DropdownButton.vue",
|
|
47512
|
+
NexxtEnergyLabel: "components/EnergyLabel/EnergyLabel.vue",
|
|
47512
47513
|
NexxtFloatingPanel: "components/FloatingPanel/FloatingPanel.vue",
|
|
47513
47514
|
NexxtHeader: "components/Header/Header.vue",
|
|
47514
47515
|
NexxtIcon: "components/Icon/Icon.vue",
|
|
@@ -47536,6 +47537,7 @@ var Yw, Xw, Zw, Qw, $w, eT = d((() => {
|
|
|
47536
47537
|
NexxtTabbedContent: "components/TabbedContent/TabbedContent.vue",
|
|
47537
47538
|
NexxtTable: "components/Table/Table.vue",
|
|
47538
47539
|
NexxtTabs: "components/Tabs/Tabs.vue",
|
|
47540
|
+
NexxtTemplateCard: "components/TemplateCard/TemplateCard.vue",
|
|
47539
47541
|
NexxtTimelineEvent: "components/TimelineEvent/TimelineEvent.vue",
|
|
47540
47542
|
NexxtTimelinePhaseblock: "components/TimelinePhaseblock/TimelinePhaseblock.vue",
|
|
47541
47543
|
NexxtToast: "components/Toast/Toast.vue",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexxtmove/ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.4",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"@eslint/js": "^10.0.1",
|
|
35
35
|
"@nuxt/kit": "^4.4.8",
|
|
36
36
|
"@nuxt/schema": "^4.4.4",
|
|
37
|
-
"@storybook/addon-a11y": "^10.5.
|
|
37
|
+
"@storybook/addon-a11y": "^10.5.2",
|
|
38
38
|
"@storybook/addon-designs": "^11.1.4",
|
|
39
|
-
"@storybook/addon-docs": "^10.5.
|
|
40
|
-
"@storybook/addon-vitest": "^10.5.
|
|
41
|
-
"@storybook/builder-vite": "^10.5.
|
|
42
|
-
"@storybook/vue3-vite": "^10.5.
|
|
39
|
+
"@storybook/addon-docs": "^10.5.2",
|
|
40
|
+
"@storybook/addon-vitest": "^10.5.2",
|
|
41
|
+
"@storybook/builder-vite": "^10.5.2",
|
|
42
|
+
"@storybook/vue3-vite": "^10.5.2",
|
|
43
43
|
"@tailwindcss/vite": "^4.3.1",
|
|
44
44
|
"@types/node": "^26.0.1",
|
|
45
45
|
"@types/react": "^19.2.17",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"eslint": "^10.6.0",
|
|
54
54
|
"eslint-config-prettier": "^10.1.8",
|
|
55
55
|
"eslint-plugin-prettier": "^5.5.6",
|
|
56
|
-
"eslint-plugin-storybook": "10.5.
|
|
56
|
+
"eslint-plugin-storybook": "10.5.2",
|
|
57
57
|
"eslint-plugin-vue": "^10.9.2",
|
|
58
58
|
"flag-icons": "^7.5.0",
|
|
59
59
|
"globals": "^17.7.0",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"react": "^19.2.7",
|
|
64
64
|
"react-dom": "^19.2.7",
|
|
65
65
|
"remark-frontmatter": "^5.0.0",
|
|
66
|
-
"storybook": "^10.5.
|
|
66
|
+
"storybook": "^10.5.2",
|
|
67
67
|
"typescript-eslint": "^8.62.0",
|
|
68
68
|
"vite": "^8.1.0",
|
|
69
69
|
"vite-plugin-dts": "^5.0.3",
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
|
|
4
|
+
export type EnergyLabelLetter =
|
|
5
|
+
| 'A++++'
|
|
6
|
+
| 'A+++'
|
|
7
|
+
| 'A++'
|
|
8
|
+
| 'A+'
|
|
9
|
+
| 'A'
|
|
10
|
+
| 'B'
|
|
11
|
+
| 'C'
|
|
12
|
+
| 'D'
|
|
13
|
+
| 'E'
|
|
14
|
+
| 'F'
|
|
15
|
+
| 'G'
|
|
16
|
+
|
|
17
|
+
interface NexxtEnergyLabelProps {
|
|
18
|
+
label: EnergyLabelLetter | Lowercase<EnergyLabelLetter>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const COLORS: Record<EnergyLabelLetter, string> = {
|
|
22
|
+
'A++++': '#00953F',
|
|
23
|
+
'A+++': '#00953F',
|
|
24
|
+
'A++': '#00953F',
|
|
25
|
+
'A+': '#00953F',
|
|
26
|
+
A: '#00953F',
|
|
27
|
+
B: '#52AE32',
|
|
28
|
+
C: '#A5CE6D',
|
|
29
|
+
D: '#FFCC00',
|
|
30
|
+
E: '#F9A93C',
|
|
31
|
+
F: '#EF7D34',
|
|
32
|
+
G: '#E63329',
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
defineOptions({
|
|
36
|
+
name: 'NexxtEnergyLabel',
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
const { label } = defineProps<NexxtEnergyLabelProps>()
|
|
40
|
+
|
|
41
|
+
const normalized = computed(() => label.toUpperCase() as EnergyLabelLetter)
|
|
42
|
+
|
|
43
|
+
const color = computed(() => COLORS[normalized.value])
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<template>
|
|
47
|
+
<span
|
|
48
|
+
role="img"
|
|
49
|
+
:aria-label="`Energielabel ${normalized}`"
|
|
50
|
+
class="relative isolate mr-3 inline-flex h-6 items-center justify-center rounded-l px-2 extra-small-semibold text-white after:absolute after:top-1/2 after:left-full after:size-4.25 after:-translate-x-1/2 after:-translate-y-1/2 after:rotate-45 after:rounded-tr after:bg-(--energy-label-color) after:content-['']"
|
|
51
|
+
:style="{ backgroundColor: color, '--energy-label-color': color }"
|
|
52
|
+
>
|
|
53
|
+
<span aria-hidden="true" class="relative z-10">{{ normalized }}</span>
|
|
54
|
+
</span>
|
|
55
|
+
</template>
|
|
@@ -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
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"NexxtDatePicker": "components/DatePicker/DatePicker.vue",
|
|
17
17
|
"NexxtDoughnutChart": "components/DoughnutChart/DoughnutChart.vue",
|
|
18
18
|
"NexxtDropdownButton": "components/DropdownButton/DropdownButton.vue",
|
|
19
|
+
"NexxtEnergyLabel": "components/EnergyLabel/EnergyLabel.vue",
|
|
19
20
|
"NexxtFloatingPanel": "components/FloatingPanel/FloatingPanel.vue",
|
|
20
21
|
"NexxtHeader": "components/Header/Header.vue",
|
|
21
22
|
"NexxtIcon": "components/Icon/Icon.vue",
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
"NexxtTabbedContent": "components/TabbedContent/TabbedContent.vue",
|
|
44
45
|
"NexxtTable": "components/Table/Table.vue",
|
|
45
46
|
"NexxtTabs": "components/Tabs/Tabs.vue",
|
|
47
|
+
"NexxtTemplateCard": "components/TemplateCard/TemplateCard.vue",
|
|
46
48
|
"NexxtTimelineEvent": "components/TimelineEvent/TimelineEvent.vue",
|
|
47
49
|
"NexxtTimelinePhaseblock": "components/TimelinePhaseblock/TimelinePhaseblock.vue",
|
|
48
50
|
"NexxtToast": "components/Toast/Toast.vue",
|
package/src/index.ts
CHANGED
|
@@ -19,6 +19,7 @@ export { default as NexxtCustomerJourneyTile } from './components/CustomerJourne
|
|
|
19
19
|
export { default as NexxtDatePicker } from './components/DatePicker/DatePicker.vue'
|
|
20
20
|
export { default as NexxtDoughnutChart } from './components/DoughnutChart/DoughnutChart.vue'
|
|
21
21
|
export { default as NexxtDropdownButton } from './components/DropdownButton/DropdownButton.vue'
|
|
22
|
+
export { default as NexxtEnergyLabel } from './components/EnergyLabel/EnergyLabel.vue'
|
|
22
23
|
export { default as NexxtFloatingPanel } from './components/FloatingPanel/FloatingPanel.vue'
|
|
23
24
|
export { default as NexxtHeader } from './components/Header/Header.vue'
|
|
24
25
|
export { default as NexxtIcon } from './components/Icon/Icon.vue'
|
|
@@ -46,6 +47,7 @@ export { default as NexxtSwitch } from './components/Switch/Switch.vue'
|
|
|
46
47
|
export { default as NexxtTabbedContent } from './components/TabbedContent/TabbedContent.vue'
|
|
47
48
|
export { default as NexxtTable } from './components/Table/Table.vue'
|
|
48
49
|
export { default as NexxtTabs } from './components/Tabs/Tabs.vue'
|
|
50
|
+
export { default as NexxtTemplateCard } from './components/TemplateCard/TemplateCard.vue'
|
|
49
51
|
export { default as NexxtTimelineEvent } from './components/TimelineEvent/TimelineEvent.vue'
|
|
50
52
|
export { default as NexxtTimelinePhaseblock } from './components/TimelinePhaseblock/TimelinePhaseblock.vue'
|
|
51
53
|
export { default as NexxtToast } from './components/Toast/Toast.vue'
|