@nexxtmove/ui 1.1.3 → 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/index.d.ts +1 -0
- package/dist/index.js +257 -226
- package/dist/nuxt.js +1 -0
- package/package.json +8 -8
- package/src/components/EnergyLabel/EnergyLabel.vue +55 -0
- package/src/components.json +1 -0
- package/src/index.ts +1 -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",
|
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>
|
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",
|
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'
|