@nexxtmove/ui 0.1.50 → 0.1.52
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 +107 -42
- package/dist/index.js +953 -862
- package/dist/nuxt.js +35 -33
- package/package.json +1 -1
- package/src/components/ContactInfoCard/ContactInfoCard.vue +12 -0
- package/src/components/DoughnutChart/DoughnutChart.vue +120 -0
- package/src/components.json +2 -0
- package/src/index.ts +2 -0
package/dist/nuxt.js
CHANGED
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
import { defineNuxtModule as c, addComponent as s, addTemplate as a } from "@nuxt/kit";
|
|
2
|
-
const
|
|
3
|
-
NexxtAnimatedNumber:
|
|
4
|
-
NexxtAvatar:
|
|
5
|
-
NexxtButton:
|
|
6
|
-
NexxtCalendar:
|
|
2
|
+
const x = "components/AnimatedNumber/AnimatedNumber.vue", i = "components/Avatar/Avatar.vue", u = "components/Button/Button.vue", m = "components/Calendar/Calendar.vue", p = "components/Checkbox/Checkbox.vue", r = "components/Chip/Chip.vue", l = "components/Combobox/Combobox.vue", d = "components/ContactInfoCard/ContactInfoCard.vue", v = "components/CustomerJourneyTile/CustomerJourneyTile.vue", N = "components/DatePicker/DatePicker.vue", C = "components/DoughnutChart/DoughnutChart.vue", T = "components/DropdownButton/DropdownButton.vue", b = "components/Header/Header.vue", S = "components/Icon/Icon.vue", h = "components/InfoBlock/InfoBlock.vue", I = "components/InputField/InputField.vue", f = "components/Modal/Modal.vue", P = "components/Pagination/Pagination.vue", M = "components/PresenceIndicator/PresenceIndicator.vue", k = "components/ProgressBar/ProgressBar.vue", B = "components/SocialIcons/SocialIcons.vue", g = "components/SocialMediaCustomTemplate/SocialMediaCustomTemplate.vue", D = "components/SocialMediaTemplate/SocialMediaTemplate.vue", y = "components/SocialMediaType/SocialMediaType.vue", A = "components/Source/Source.vue", H = "components/StepperHeader/StepperHeader.vue", w = "components/TabbedContent/TabbedContent.vue", E = "components/Table/Table.vue", F = "components/Tabs/Tabs.vue", J = "components/TimelineEvent/TimelineEvent.vue", j = "components/TimelinePhaseblock/TimelinePhaseblock.vue", $ = "components/Tooltip/Tooltip.vue", K = {
|
|
3
|
+
NexxtAnimatedNumber: x,
|
|
4
|
+
NexxtAvatar: i,
|
|
5
|
+
NexxtButton: u,
|
|
6
|
+
NexxtCalendar: m,
|
|
7
7
|
NexxtCheckbox: p,
|
|
8
|
-
NexxtChip:
|
|
9
|
-
NexxtCombobox:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
8
|
+
NexxtChip: r,
|
|
9
|
+
NexxtCombobox: l,
|
|
10
|
+
NexxtContactInfoCard: d,
|
|
11
|
+
NexxtCustomerJourneyTile: v,
|
|
12
|
+
NexxtDatePicker: N,
|
|
13
|
+
NexxtDoughnutChart: C,
|
|
14
|
+
NexxtDropdownButton: T,
|
|
15
|
+
NexxtHeader: b,
|
|
16
|
+
NexxtIcon: S,
|
|
17
|
+
NexxtInfoBlock: h,
|
|
18
|
+
NexxtInputField: I,
|
|
19
|
+
NexxtModal: f,
|
|
20
|
+
NexxtPagination: P,
|
|
21
|
+
NexxtPresenceIndicator: M,
|
|
22
|
+
NexxtProgressBar: k,
|
|
23
|
+
NexxtSocialIcons: B,
|
|
24
|
+
NexxtSocialMediaCustomTemplate: g,
|
|
25
|
+
NexxtSocialMediaTemplate: D,
|
|
26
|
+
NexxtSocialMediaType: y,
|
|
27
|
+
NexxtSource: A,
|
|
28
|
+
NexxtStepperHeader: H,
|
|
29
|
+
NexxtTabbedContent: w,
|
|
30
|
+
NexxtTable: E,
|
|
31
|
+
NexxtTabs: F,
|
|
32
|
+
NexxtTimelineEvent: J,
|
|
33
|
+
NexxtTimelinePhaseblock: j,
|
|
34
|
+
NexxtTooltip: $
|
|
35
|
+
}, U = c({
|
|
34
36
|
meta: {
|
|
35
37
|
name: "@nexxtmove/ui",
|
|
36
38
|
configKey: "nexxtmoveUi",
|
|
@@ -42,7 +44,7 @@ const i = "components/AnimatedNumber/AnimatedNumber.vue", x = "components/Avatar
|
|
|
42
44
|
addCSS: !0
|
|
43
45
|
},
|
|
44
46
|
setup(e, o) {
|
|
45
|
-
for (const [t, n] of Object.entries(
|
|
47
|
+
for (const [t, n] of Object.entries(K))
|
|
46
48
|
s({
|
|
47
49
|
name: t,
|
|
48
50
|
export: "default",
|
|
@@ -61,5 +63,5 @@ const i = "components/AnimatedNumber/AnimatedNumber.vue", x = "components/Avatar
|
|
|
61
63
|
}
|
|
62
64
|
});
|
|
63
65
|
export {
|
|
64
|
-
|
|
66
|
+
U as default
|
|
65
67
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts" setup></script>
|
|
2
|
+
|
|
3
|
+
<template>
|
|
4
|
+
<div class="rounded-xl border border-gray-200">
|
|
5
|
+
<div class="border-b border-gray-200 px-8 py-2.5">
|
|
6
|
+
<slot name="title">Title</slot>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="px-8 py-5">
|
|
9
|
+
<slot name="content" />
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, onMounted, ref, type CSSProperties } from 'vue'
|
|
3
|
+
|
|
4
|
+
type ColorScale =
|
|
5
|
+
| 'gray'
|
|
6
|
+
| 'cornflower-blue'
|
|
7
|
+
| 'orange'
|
|
8
|
+
| 'purple'
|
|
9
|
+
| 'rose'
|
|
10
|
+
| 'green'
|
|
11
|
+
| 'sapphire'
|
|
12
|
+
| 'yale-blue'
|
|
13
|
+
| 'brick'
|
|
14
|
+
type ColorShade = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950
|
|
15
|
+
type BrandColor = `brands-${'facebook' | 'instagram' | 'linkedin' | 'x' | 'google' | 'tiktok'}`
|
|
16
|
+
type TailwindColor = `${ColorScale}-${ColorShade}` | 'white' | BrandColor
|
|
17
|
+
type Color = (CSSProperties['color'] & {}) | TailwindColor
|
|
18
|
+
|
|
19
|
+
interface NexxtDoughnutChartProps {
|
|
20
|
+
value: number
|
|
21
|
+
percentage: number
|
|
22
|
+
color?: Color
|
|
23
|
+
backgroundColor?: Color
|
|
24
|
+
size?: number
|
|
25
|
+
thickness?: number
|
|
26
|
+
delay?: number
|
|
27
|
+
duration?: number
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
defineOptions({
|
|
31
|
+
name: 'NexxtDoughnutChart',
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
const {
|
|
35
|
+
value,
|
|
36
|
+
percentage,
|
|
37
|
+
backgroundColor,
|
|
38
|
+
color = 'orange-500',
|
|
39
|
+
size = 160,
|
|
40
|
+
thickness = 20,
|
|
41
|
+
delay = 0,
|
|
42
|
+
duration = 800,
|
|
43
|
+
} = defineProps<NexxtDoughnutChartProps>()
|
|
44
|
+
|
|
45
|
+
const animated = ref(false)
|
|
46
|
+
|
|
47
|
+
onMounted(() => {
|
|
48
|
+
setTimeout(() => {
|
|
49
|
+
animated.value = true
|
|
50
|
+
}, delay)
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
const radius = computed(() => (size - thickness) / 2)
|
|
54
|
+
const circumference = computed(() => 2 * Math.PI * radius.value)
|
|
55
|
+
const center = computed(() => size / 2)
|
|
56
|
+
|
|
57
|
+
const arc = computed(() => {
|
|
58
|
+
const fraction = Math.min(1, Math.max(0, percentage / 100))
|
|
59
|
+
return fraction * circumference.value
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
const resolveColor = (value: Color) => {
|
|
63
|
+
if (/^(#|rgb|hsl|oklch|lch|lab|hwb|var\(|color\()/.test(value)) return value
|
|
64
|
+
if (!value.includes('-')) return value
|
|
65
|
+
return `var(--color-${value})`
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const resolvedColor = computed(() => resolveColor(color))
|
|
69
|
+
const resolvedBackgroundColor = computed(() =>
|
|
70
|
+
backgroundColor ? resolveColor(backgroundColor) : undefined,
|
|
71
|
+
)
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<template>
|
|
75
|
+
<svg
|
|
76
|
+
:width="size"
|
|
77
|
+
:height="size"
|
|
78
|
+
:viewBox="`0 0 ${size} ${size}`"
|
|
79
|
+
role="img"
|
|
80
|
+
:aria-label="`${value}`"
|
|
81
|
+
>
|
|
82
|
+
<g :transform="`scale(-1, 1) translate(-${size}, 0) rotate(-90, ${center}, ${center})`">
|
|
83
|
+
<circle
|
|
84
|
+
v-if="backgroundColor"
|
|
85
|
+
:cx="center"
|
|
86
|
+
:cy="center"
|
|
87
|
+
:r="radius"
|
|
88
|
+
fill="none"
|
|
89
|
+
:stroke="resolvedBackgroundColor"
|
|
90
|
+
:stroke-width="thickness"
|
|
91
|
+
/>
|
|
92
|
+
<circle
|
|
93
|
+
:cx="center"
|
|
94
|
+
:cy="center"
|
|
95
|
+
:r="radius"
|
|
96
|
+
fill="none"
|
|
97
|
+
:stroke="resolvedColor"
|
|
98
|
+
:stroke-width="thickness"
|
|
99
|
+
stroke-linecap="butt"
|
|
100
|
+
:stroke-dasharray="`${animated ? arc : 0} ${circumference}`"
|
|
101
|
+
:style="{ transition: `stroke-dasharray ${duration}ms ease-out` }"
|
|
102
|
+
/>
|
|
103
|
+
</g>
|
|
104
|
+
<foreignObject
|
|
105
|
+
:x="thickness"
|
|
106
|
+
:y="thickness"
|
|
107
|
+
:width="size - thickness * 2"
|
|
108
|
+
:height="size - thickness * 2"
|
|
109
|
+
>
|
|
110
|
+
<div
|
|
111
|
+
xmlns="http://www.w3.org/1999/xhtml"
|
|
112
|
+
class="flex h-full w-full items-center justify-center"
|
|
113
|
+
>
|
|
114
|
+
<slot>
|
|
115
|
+
<span class="heading-1 text-sapphire-900">{{ value }}</span>
|
|
116
|
+
</slot>
|
|
117
|
+
</div>
|
|
118
|
+
</foreignObject>
|
|
119
|
+
</svg>
|
|
120
|
+
</template>
|
package/src/components.json
CHANGED
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
"NexxtCheckbox": "components/Checkbox/Checkbox.vue",
|
|
7
7
|
"NexxtChip": "components/Chip/Chip.vue",
|
|
8
8
|
"NexxtCombobox": "components/Combobox/Combobox.vue",
|
|
9
|
+
"NexxtContactInfoCard": "components/ContactInfoCard/ContactInfoCard.vue",
|
|
9
10
|
"NexxtCustomerJourneyTile": "components/CustomerJourneyTile/CustomerJourneyTile.vue",
|
|
10
11
|
"NexxtDatePicker": "components/DatePicker/DatePicker.vue",
|
|
12
|
+
"NexxtDoughnutChart": "components/DoughnutChart/DoughnutChart.vue",
|
|
11
13
|
"NexxtDropdownButton": "components/DropdownButton/DropdownButton.vue",
|
|
12
14
|
"NexxtHeader": "components/Header/Header.vue",
|
|
13
15
|
"NexxtIcon": "components/Icon/Icon.vue",
|
package/src/index.ts
CHANGED
|
@@ -6,8 +6,10 @@ export { default as NexxtCalendar } from './components/Calendar/Calendar.vue'
|
|
|
6
6
|
export { default as NexxtCheckbox } from './components/Checkbox/Checkbox.vue'
|
|
7
7
|
export { default as NexxtChip } from './components/Chip/Chip.vue'
|
|
8
8
|
export { default as NexxtCombobox } from './components/Combobox/Combobox.vue'
|
|
9
|
+
export { default as NexxtContactInfoCard } from './components/ContactInfoCard/ContactInfoCard.vue'
|
|
9
10
|
export { default as NexxtCustomerJourneyTile } from './components/CustomerJourneyTile/CustomerJourneyTile.vue'
|
|
10
11
|
export { default as NexxtDatePicker } from './components/DatePicker/DatePicker.vue'
|
|
12
|
+
export { default as NexxtDoughnutChart } from './components/DoughnutChart/DoughnutChart.vue'
|
|
11
13
|
export { default as NexxtDropdownButton } from './components/DropdownButton/DropdownButton.vue'
|
|
12
14
|
export { default as NexxtHeader } from './components/Header/Header.vue'
|
|
13
15
|
export { default as NexxtIcon } from './components/Icon/Icon.vue'
|