pukaad-ui-lib 1.332.0 → 1.333.0
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/module.json +1 -1
- package/dist/runtime/components/chart/chart-approval-activity.d.vue.ts +35 -0
- package/dist/runtime/components/chart/chart-approval-activity.vue +152 -0
- package/dist/runtime/components/chart/chart-approval-activity.vue.d.ts +35 -0
- package/dist/runtime/components/image/image-cropper.d.vue.ts +2 -2
- package/dist/runtime/components/image/image-cropper.vue.d.ts +2 -2
- package/dist/runtime/components/input/input-autocomplete.d.vue.ts +2 -2
- package/dist/runtime/components/input/input-autocomplete.vue.d.ts +2 -2
- package/dist/runtime/components/input/input-birth-date.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-birth-date.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-combobox.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-combobox.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-date-picker.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-date-picker.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-localized-name.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-localized-name.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-suggest.d.vue.ts +2 -2
- package/dist/runtime/components/input/input-suggest.vue.d.ts +2 -2
- package/dist/runtime/components/input/input-tag.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-tag.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-textarea.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-textarea.vue.d.ts +1 -1
- package/dist/runtime/components/ui/alert-dialog/AlertDialog.vue +2 -1
- package/dist/runtime/components/ui/calendar/Calendar.d.vue.ts +1 -1
- package/dist/runtime/components/ui/calendar/Calendar.vue.d.ts +1 -1
- package/dist/runtime/components/ui/chart/ChartContainer.d.vue.ts +25 -0
- package/dist/runtime/components/ui/chart/ChartContainer.vue +49 -0
- package/dist/runtime/components/ui/chart/ChartContainer.vue.d.ts +25 -0
- package/dist/runtime/components/ui/chart/ChartLegendContent.d.vue.ts +12 -0
- package/dist/runtime/components/ui/chart/ChartLegendContent.vue +52 -0
- package/dist/runtime/components/ui/chart/ChartLegendContent.vue.d.ts +12 -0
- package/dist/runtime/components/ui/chart/ChartStyle.d.vue.ts +7 -0
- package/dist/runtime/components/ui/chart/ChartStyle.vue +32 -0
- package/dist/runtime/components/ui/chart/ChartStyle.vue.d.ts +7 -0
- package/dist/runtime/components/ui/chart/ChartTooltipContent.d.vue.ts +32 -0
- package/dist/runtime/components/ui/chart/ChartTooltipContent.vue +93 -0
- package/dist/runtime/components/ui/chart/ChartTooltipContent.vue.d.ts +32 -0
- package/dist/runtime/components/ui/chart/index.d.ts +27 -0
- package/dist/runtime/components/ui/chart/index.js +8 -0
- package/dist/runtime/components/ui/chart/utils.d.ts +11 -0
- package/dist/runtime/components/ui/chart/utils.js +24 -0
- package/dist/runtime/components/ui/checkbox/Checkbox.vue +4 -2
- package/dist/runtime/components/ui/command/CommandDialog.vue +1 -0
- package/dist/runtime/components/ui/dialog/Dialog.vue +2 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue +1 -0
- package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.d.vue.ts +2 -2
- package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.vue.d.ts +2 -2
- package/dist/runtime/components/ui/native-select/NativeSelectOption.d.vue.ts +2 -2
- package/dist/runtime/components/ui/native-select/NativeSelectOption.vue.d.ts +2 -2
- package/dist/runtime/components/ui/popover/PopoverContent.vue +2 -0
- package/dist/runtime/components/ui/select/Select.vue +1 -0
- package/dist/runtime/components/ui/select/SelectContent.vue +2 -0
- package/dist/runtime/components/ui/separator/Separator.d.vue.ts +1 -1
- package/dist/runtime/components/ui/separator/Separator.vue.d.ts +1 -1
- package/dist/runtime/components/ui/sheet/Sheet.vue +2 -1
- package/dist/runtime/components/ui/tabs/Tabs.d.vue.ts +2 -2
- package/dist/runtime/components/ui/tabs/Tabs.vue.d.ts +2 -2
- package/dist/runtime/components/ui/tooltip/TooltipProvider.vue +2 -1
- package/package.json +5 -3
package/dist/module.json
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type ApprovalStatusKey = "pending" | "approved" | "rejected";
|
|
2
|
+
export interface ApprovalSeriesPoint {
|
|
3
|
+
date: string | Date;
|
|
4
|
+
value: number;
|
|
5
|
+
}
|
|
6
|
+
export interface ApprovalSeries {
|
|
7
|
+
/** เดือนที่โฟกัสของแถวนี้ (controlled โดย parent) */
|
|
8
|
+
month?: string | Date;
|
|
9
|
+
/** ข้อมูลรายวันของแถวนี้ */
|
|
10
|
+
data?: ApprovalSeriesPoint[];
|
|
11
|
+
/** ตัวเลขสรุปของแถว — ถ้าไม่ส่งจะรวมจาก data ให้ */
|
|
12
|
+
summary?: number;
|
|
13
|
+
}
|
|
14
|
+
type __VLS_Props = {
|
|
15
|
+
pending?: ApprovalSeries;
|
|
16
|
+
approved?: ApprovalSeries;
|
|
17
|
+
rejected?: ApprovalSeries;
|
|
18
|
+
/** locale ของชื่อเดือน (default en-US ตาม Figma) */
|
|
19
|
+
locale?: string;
|
|
20
|
+
/** ความสูง component เช่น "600px" หรือ 600 — ไม่ส่ง = เต็ม parent */
|
|
21
|
+
height?: string | number;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
24
|
+
change: (key: ApprovalStatusKey, month: Date) => any;
|
|
25
|
+
prev: (key: ApprovalStatusKey, month: Date) => any;
|
|
26
|
+
next: (key: ApprovalStatusKey, month: Date) => any;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
28
|
+
onChange?: ((key: ApprovalStatusKey, month: Date) => any) | undefined;
|
|
29
|
+
onPrev?: ((key: ApprovalStatusKey, month: Date) => any) | undefined;
|
|
30
|
+
onNext?: ((key: ApprovalStatusKey, month: Date) => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
locale: string;
|
|
33
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
|
+
declare const _default: typeof __VLS_export;
|
|
35
|
+
export default _default;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { VisAxis, VisGroupedBar, VisXYContainer } from "@unovis/vue";
|
|
4
|
+
import { ChartContainer } from "#pukaad-ui/runtime/components/ui/chart";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
pending: { type: Object, required: false },
|
|
7
|
+
approved: { type: Object, required: false },
|
|
8
|
+
rejected: { type: Object, required: false },
|
|
9
|
+
locale: { type: String, required: false, default: "en-US" },
|
|
10
|
+
height: { type: [String, Number], required: false }
|
|
11
|
+
});
|
|
12
|
+
const emit = defineEmits(["change", "prev", "next"]);
|
|
13
|
+
const rows = [
|
|
14
|
+
{ key: "pending", title: "\u0E23\u0E2D\u0E01\u0E32\u0E23\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19", color: "#FEF3C7" },
|
|
15
|
+
{ key: "approved", title: "\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E41\u0E25\u0E49\u0E27", color: "#E3F5E3" },
|
|
16
|
+
{ key: "rejected", title: "\u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18", color: "#FDE3E3" }
|
|
17
|
+
];
|
|
18
|
+
const summaryMeta = [
|
|
19
|
+
{ key: "pending", label: "\u0E23\u0E2D\u0E01\u0E32\u0E23\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19", color: "#F9A825" },
|
|
20
|
+
{ key: "approved", label: "\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E41\u0E25\u0E49\u0E27", color: "#43A047" },
|
|
21
|
+
{ key: "rejected", label: "\u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18", color: "#D32F2F" }
|
|
22
|
+
];
|
|
23
|
+
const chartConfig = {};
|
|
24
|
+
const seriesByKey = computed(() => ({
|
|
25
|
+
pending: props.pending ?? {},
|
|
26
|
+
approved: props.approved ?? {},
|
|
27
|
+
rejected: props.rejected ?? {}
|
|
28
|
+
}));
|
|
29
|
+
const normalizedByKey = computed(() => {
|
|
30
|
+
const out = { pending: [], approved: [], rejected: [] };
|
|
31
|
+
for (const r of rows) {
|
|
32
|
+
out[r.key] = (seriesByKey.value[r.key].data ?? []).map((d) => ({
|
|
33
|
+
_date: d.date instanceof Date ? d.date : new Date(d.date),
|
|
34
|
+
value: d.value ?? 0
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
return out;
|
|
38
|
+
});
|
|
39
|
+
const monthByKey = computed(() => {
|
|
40
|
+
const out = {};
|
|
41
|
+
for (const r of rows) {
|
|
42
|
+
const m = seriesByKey.value[r.key].month;
|
|
43
|
+
out[r.key] = m ? m instanceof Date ? m : new Date(m) : /* @__PURE__ */ new Date();
|
|
44
|
+
}
|
|
45
|
+
return out;
|
|
46
|
+
});
|
|
47
|
+
const summaryByKey = computed(() => {
|
|
48
|
+
const out = {};
|
|
49
|
+
for (const r of rows) {
|
|
50
|
+
const s = seriesByKey.value[r.key].summary;
|
|
51
|
+
out[r.key] = s ?? normalizedByKey.value[r.key].reduce((a, p) => a + p.value, 0);
|
|
52
|
+
}
|
|
53
|
+
return out;
|
|
54
|
+
});
|
|
55
|
+
const rootHeight = computed(
|
|
56
|
+
() => props.height == null ? void 0 : typeof props.height === "number" ? `${props.height}px` : props.height
|
|
57
|
+
);
|
|
58
|
+
const addMonths = (d, delta) => new Date(d.getFullYear(), d.getMonth() + delta, 1);
|
|
59
|
+
const fmtMonth = (d, withYear) => d.toLocaleDateString(props.locale, {
|
|
60
|
+
month: "long",
|
|
61
|
+
...withYear ? { year: "numeric" } : {}
|
|
62
|
+
});
|
|
63
|
+
const monthLabelOf = (k) => fmtMonth(monthByKey.value[k], true);
|
|
64
|
+
const prevLabelOf = (k) => fmtMonth(addMonths(monthByKey.value[k], -1), false);
|
|
65
|
+
const nextLabelOf = (k) => fmtMonth(addMonths(monthByKey.value[k], 1), false);
|
|
66
|
+
const goPrev = (k) => {
|
|
67
|
+
const m = addMonths(monthByKey.value[k], -1);
|
|
68
|
+
emit("prev", k, m);
|
|
69
|
+
emit("change", k, m);
|
|
70
|
+
};
|
|
71
|
+
const goNext = (k) => {
|
|
72
|
+
const m = addMonths(monthByKey.value[k], 1);
|
|
73
|
+
emit("next", k, m);
|
|
74
|
+
emit("change", k, m);
|
|
75
|
+
};
|
|
76
|
+
const indicesOf = (k) => normalizedByKey.value[k].map((_, i) => i);
|
|
77
|
+
const dayLabelOf = (k, i) => {
|
|
78
|
+
const d = normalizedByKey.value[k][i]?._date;
|
|
79
|
+
return d ? String(d.getDate()) : "";
|
|
80
|
+
};
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<template>
|
|
84
|
+
<div
|
|
85
|
+
class="flex flex-col gap-[16px] w-full"
|
|
86
|
+
:class="rootHeight ? '' : 'h-full'"
|
|
87
|
+
:style="rootHeight ? { height: rootHeight } : void 0"
|
|
88
|
+
>
|
|
89
|
+
<div
|
|
90
|
+
v-for="(row, ri) in rows"
|
|
91
|
+
:key="row.key"
|
|
92
|
+
class="flex flex-col gap-[16px] flex-1 min-h-0"
|
|
93
|
+
>
|
|
94
|
+
<div class="flex items-end justify-between gap-[16px]">
|
|
95
|
+
<div class="font-title-small-prominent">{{ row.title }}</div>
|
|
96
|
+
<div v-if="ri === 0" class="flex gap-[17px]">
|
|
97
|
+
<div
|
|
98
|
+
v-for="m in summaryMeta"
|
|
99
|
+
:key="m.key"
|
|
100
|
+
class="flex flex-col items-center border rounded-[8px] py-[8px] px-[16px] min-w-[114px]"
|
|
101
|
+
>
|
|
102
|
+
<div
|
|
103
|
+
class="font-title-medium-prominent"
|
|
104
|
+
:style="{ color: m.color }"
|
|
105
|
+
>
|
|
106
|
+
{{ summaryByKey[m.key] }}
|
|
107
|
+
</div>
|
|
108
|
+
<div class="font-body-large-prominent text-gray">{{ m.label }}</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<ChartContainer
|
|
114
|
+
:config="chartConfig"
|
|
115
|
+
class="flex-1 min-h-0 w-full aspect-auto"
|
|
116
|
+
>
|
|
117
|
+
<VisXYContainer :data="normalizedByKey[row.key]">
|
|
118
|
+
<VisGroupedBar
|
|
119
|
+
:x="(_d, i) => i"
|
|
120
|
+
:y="[(d) => d.value]"
|
|
121
|
+
:color="[row.color]"
|
|
122
|
+
:rounded-corners="4"
|
|
123
|
+
bar-padding="0.25"
|
|
124
|
+
/>
|
|
125
|
+
<VisAxis
|
|
126
|
+
type="x"
|
|
127
|
+
:x="(_d, i) => i"
|
|
128
|
+
:tick-values="indicesOf(row.key)"
|
|
129
|
+
:tick-format="(i) => dayLabelOf(row.key, i)"
|
|
130
|
+
:tick-line="false"
|
|
131
|
+
:domain-line="false"
|
|
132
|
+
:grid-line="false"
|
|
133
|
+
/>
|
|
134
|
+
</VisXYContainer>
|
|
135
|
+
</ChartContainer>
|
|
136
|
+
|
|
137
|
+
<div
|
|
138
|
+
class="flex items-center justify-between font-label-sans-serif-small-prominent text-gray uppercase"
|
|
139
|
+
>
|
|
140
|
+
<div class="flex items-center cursor-pointer" @click="goPrev(row.key)">
|
|
141
|
+
<Icon name="lucide:chevrons-left" size="16" />
|
|
142
|
+
{{ prevLabelOf(row.key) }}
|
|
143
|
+
</div>
|
|
144
|
+
<div>{{ monthLabelOf(row.key) }}</div>
|
|
145
|
+
<div class="flex items-center cursor-pointer" @click="goNext(row.key)">
|
|
146
|
+
{{ nextLabelOf(row.key) }}
|
|
147
|
+
<Icon name="lucide:chevrons-right" size="16" />
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</template>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type ApprovalStatusKey = "pending" | "approved" | "rejected";
|
|
2
|
+
export interface ApprovalSeriesPoint {
|
|
3
|
+
date: string | Date;
|
|
4
|
+
value: number;
|
|
5
|
+
}
|
|
6
|
+
export interface ApprovalSeries {
|
|
7
|
+
/** เดือนที่โฟกัสของแถวนี้ (controlled โดย parent) */
|
|
8
|
+
month?: string | Date;
|
|
9
|
+
/** ข้อมูลรายวันของแถวนี้ */
|
|
10
|
+
data?: ApprovalSeriesPoint[];
|
|
11
|
+
/** ตัวเลขสรุปของแถว — ถ้าไม่ส่งจะรวมจาก data ให้ */
|
|
12
|
+
summary?: number;
|
|
13
|
+
}
|
|
14
|
+
type __VLS_Props = {
|
|
15
|
+
pending?: ApprovalSeries;
|
|
16
|
+
approved?: ApprovalSeries;
|
|
17
|
+
rejected?: ApprovalSeries;
|
|
18
|
+
/** locale ของชื่อเดือน (default en-US ตาม Figma) */
|
|
19
|
+
locale?: string;
|
|
20
|
+
/** ความสูง component เช่น "600px" หรือ 600 — ไม่ส่ง = เต็ม parent */
|
|
21
|
+
height?: string | number;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
24
|
+
change: (key: ApprovalStatusKey, month: Date) => any;
|
|
25
|
+
prev: (key: ApprovalStatusKey, month: Date) => any;
|
|
26
|
+
next: (key: ApprovalStatusKey, month: Date) => any;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
28
|
+
onChange?: ((key: ApprovalStatusKey, month: Date) => any) | undefined;
|
|
29
|
+
onPrev?: ((key: ApprovalStatusKey, month: Date) => any) | undefined;
|
|
30
|
+
onNext?: ((key: ApprovalStatusKey, month: Date) => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
locale: string;
|
|
33
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
|
+
declare const _default: typeof __VLS_export;
|
|
35
|
+
export default _default;
|
|
@@ -64,15 +64,15 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
|
|
|
64
64
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageCropperProps> & Readonly<{}>, {
|
|
65
65
|
src: string;
|
|
66
66
|
center: boolean;
|
|
67
|
-
background: boolean;
|
|
68
|
-
modal: boolean;
|
|
69
67
|
responsive: boolean;
|
|
70
68
|
restore: boolean;
|
|
71
69
|
checkCrossOrigin: boolean;
|
|
72
70
|
checkOrientation: boolean;
|
|
73
71
|
crossorigin: "" | "anonymous" | "use-credentials";
|
|
72
|
+
modal: boolean;
|
|
74
73
|
guides: boolean;
|
|
75
74
|
highlight: boolean;
|
|
75
|
+
background: boolean;
|
|
76
76
|
autoCrop: boolean;
|
|
77
77
|
movable: boolean;
|
|
78
78
|
rotatable: boolean;
|
|
@@ -64,15 +64,15 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
|
|
|
64
64
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageCropperProps> & Readonly<{}>, {
|
|
65
65
|
src: string;
|
|
66
66
|
center: boolean;
|
|
67
|
-
background: boolean;
|
|
68
|
-
modal: boolean;
|
|
69
67
|
responsive: boolean;
|
|
70
68
|
restore: boolean;
|
|
71
69
|
checkCrossOrigin: boolean;
|
|
72
70
|
checkOrientation: boolean;
|
|
73
71
|
crossorigin: "" | "anonymous" | "use-credentials";
|
|
72
|
+
modal: boolean;
|
|
74
73
|
guides: boolean;
|
|
75
74
|
highlight: boolean;
|
|
75
|
+
background: boolean;
|
|
76
76
|
autoCrop: boolean;
|
|
77
77
|
movable: boolean;
|
|
78
78
|
rotatable: boolean;
|
|
@@ -50,15 +50,15 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
50
50
|
required: boolean;
|
|
51
51
|
options: AutocompleteOption[] | string[] | number[];
|
|
52
52
|
description: string;
|
|
53
|
-
|
|
53
|
+
labelKey: string;
|
|
54
54
|
placeholder: string;
|
|
55
|
+
limit: number;
|
|
55
56
|
disabledErrorMessage: boolean;
|
|
56
57
|
disabledBorder: boolean;
|
|
57
58
|
showCounter: boolean;
|
|
58
59
|
returnObject: boolean;
|
|
59
60
|
freeText: boolean;
|
|
60
61
|
valueKey: string;
|
|
61
|
-
labelKey: string;
|
|
62
62
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
63
63
|
declare const _default: typeof __VLS_export;
|
|
64
64
|
export default _default;
|
|
@@ -50,15 +50,15 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
50
50
|
required: boolean;
|
|
51
51
|
options: AutocompleteOption[] | string[] | number[];
|
|
52
52
|
description: string;
|
|
53
|
-
|
|
53
|
+
labelKey: string;
|
|
54
54
|
placeholder: string;
|
|
55
|
+
limit: number;
|
|
55
56
|
disabledErrorMessage: boolean;
|
|
56
57
|
disabledBorder: boolean;
|
|
57
58
|
showCounter: boolean;
|
|
58
59
|
returnObject: boolean;
|
|
59
60
|
freeText: boolean;
|
|
60
61
|
valueKey: string;
|
|
61
|
-
labelKey: string;
|
|
62
62
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
63
63
|
declare const _default: typeof __VLS_export;
|
|
64
64
|
export default _default;
|
|
@@ -30,9 +30,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
30
30
|
id: string;
|
|
31
31
|
name: string;
|
|
32
32
|
required: boolean;
|
|
33
|
+
locale: string;
|
|
33
34
|
placeholder: string;
|
|
34
35
|
disabledErrorMessage: boolean;
|
|
35
|
-
locale: string;
|
|
36
36
|
layout: "month-and-year" | "month-only" | "year-only";
|
|
37
37
|
dateFormat: string;
|
|
38
38
|
minAge: number;
|
|
@@ -30,9 +30,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
30
30
|
id: string;
|
|
31
31
|
name: string;
|
|
32
32
|
required: boolean;
|
|
33
|
+
locale: string;
|
|
33
34
|
placeholder: string;
|
|
34
35
|
disabledErrorMessage: boolean;
|
|
35
|
-
locale: string;
|
|
36
36
|
layout: "month-and-year" | "month-only" | "year-only";
|
|
37
37
|
dateFormat: string;
|
|
38
38
|
minAge: number;
|
|
@@ -55,9 +55,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
55
55
|
}>, {
|
|
56
56
|
pageSize: number;
|
|
57
57
|
name: string;
|
|
58
|
+
labelKey: string;
|
|
58
59
|
limit: number;
|
|
59
60
|
valueKey: string;
|
|
60
|
-
labelKey: string;
|
|
61
61
|
multiple: boolean;
|
|
62
62
|
placeholderSearch: string;
|
|
63
63
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -55,9 +55,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
55
55
|
}>, {
|
|
56
56
|
pageSize: number;
|
|
57
57
|
name: string;
|
|
58
|
+
labelKey: string;
|
|
58
59
|
limit: number;
|
|
59
60
|
valueKey: string;
|
|
60
|
-
labelKey: string;
|
|
61
61
|
multiple: boolean;
|
|
62
62
|
placeholderSearch: string;
|
|
63
63
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -44,9 +44,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
44
44
|
id: string;
|
|
45
45
|
name: string;
|
|
46
46
|
required: boolean;
|
|
47
|
+
locale: string;
|
|
47
48
|
placeholder: string;
|
|
48
49
|
disabledErrorMessage: boolean;
|
|
49
|
-
locale: string;
|
|
50
50
|
layout: "month-and-year" | "month-only" | "year-only";
|
|
51
51
|
dateFormat: string;
|
|
52
52
|
showTime: boolean;
|
|
@@ -44,9 +44,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
44
44
|
id: string;
|
|
45
45
|
name: string;
|
|
46
46
|
required: boolean;
|
|
47
|
+
locale: string;
|
|
47
48
|
placeholder: string;
|
|
48
49
|
disabledErrorMessage: boolean;
|
|
49
|
-
locale: string;
|
|
50
50
|
layout: "month-and-year" | "month-only" | "year-only";
|
|
51
51
|
dateFormat: string;
|
|
52
52
|
showTime: boolean;
|
|
@@ -12,8 +12,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
12
12
|
name: string;
|
|
13
13
|
modelValue: LocalizedNameItem[];
|
|
14
14
|
options: InputSelectItem[];
|
|
15
|
-
limit: number;
|
|
16
15
|
placeholder: string;
|
|
16
|
+
limit: number;
|
|
17
17
|
showCounter: boolean;
|
|
18
18
|
addLabel: string;
|
|
19
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -12,8 +12,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
12
12
|
name: string;
|
|
13
13
|
modelValue: LocalizedNameItem[];
|
|
14
14
|
options: InputSelectItem[];
|
|
15
|
-
limit: number;
|
|
16
15
|
placeholder: string;
|
|
16
|
+
limit: number;
|
|
17
17
|
showCounter: boolean;
|
|
18
18
|
addLabel: string;
|
|
19
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -20,12 +20,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
20
20
|
name: string;
|
|
21
21
|
required: boolean;
|
|
22
22
|
description: string;
|
|
23
|
-
|
|
23
|
+
labelKey: string;
|
|
24
24
|
placeholder: string;
|
|
25
|
+
limit: number;
|
|
25
26
|
disabledErrorMessage: boolean;
|
|
26
27
|
disabledBorder: boolean;
|
|
27
28
|
showCounter: boolean;
|
|
28
|
-
labelKey: string;
|
|
29
29
|
descriptionKey: string;
|
|
30
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -20,12 +20,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
20
20
|
name: string;
|
|
21
21
|
required: boolean;
|
|
22
22
|
description: string;
|
|
23
|
-
|
|
23
|
+
labelKey: string;
|
|
24
24
|
placeholder: string;
|
|
25
|
+
limit: number;
|
|
25
26
|
disabledErrorMessage: boolean;
|
|
26
27
|
disabledBorder: boolean;
|
|
27
28
|
showCounter: boolean;
|
|
28
|
-
labelKey: string;
|
|
29
29
|
descriptionKey: string;
|
|
30
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -26,8 +26,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
26
26
|
}>, {
|
|
27
27
|
name: string;
|
|
28
28
|
state: "user" | "admin";
|
|
29
|
-
limit: number;
|
|
30
29
|
placeholder: string;
|
|
30
|
+
limit: number;
|
|
31
31
|
ignore: string[];
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
@@ -26,8 +26,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
26
26
|
}>, {
|
|
27
27
|
name: string;
|
|
28
28
|
state: "user" | "admin";
|
|
29
|
-
limit: number;
|
|
30
29
|
placeholder: string;
|
|
30
|
+
limit: number;
|
|
31
31
|
ignore: string[];
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
@@ -46,12 +46,12 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
46
46
|
resize: "none" | "both" | "horizontal" | "vertical";
|
|
47
47
|
fullHeight: boolean;
|
|
48
48
|
fullWidth: boolean;
|
|
49
|
+
rows: number;
|
|
49
50
|
limit: number;
|
|
50
51
|
disabledErrorMessage: boolean;
|
|
51
52
|
disabledBorder: boolean;
|
|
52
53
|
showCounter: boolean;
|
|
53
54
|
readonly: boolean;
|
|
54
|
-
rows: number;
|
|
55
55
|
heightScroll: boolean;
|
|
56
56
|
spaceToComma: boolean;
|
|
57
57
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -46,12 +46,12 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
46
46
|
resize: "none" | "both" | "horizontal" | "vertical";
|
|
47
47
|
fullHeight: boolean;
|
|
48
48
|
fullWidth: boolean;
|
|
49
|
+
rows: number;
|
|
49
50
|
limit: number;
|
|
50
51
|
disabledErrorMessage: boolean;
|
|
51
52
|
disabledBorder: boolean;
|
|
52
53
|
showCounter: boolean;
|
|
53
54
|
readonly: boolean;
|
|
54
|
-
rows: number;
|
|
55
55
|
heightScroll: boolean;
|
|
56
56
|
spaceToComma: boolean;
|
|
57
57
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { AlertDialogRoot, useForwardPropsEmits } from "reka-ui";
|
|
3
3
|
const props = defineProps({
|
|
4
4
|
open: { type: Boolean, required: false },
|
|
5
|
-
defaultOpen: { type: Boolean, required: false }
|
|
5
|
+
defaultOpen: { type: Boolean, required: false },
|
|
6
|
+
unmountOnHide: { type: Boolean, required: false }
|
|
6
7
|
});
|
|
7
8
|
const emits = defineEmits(["update:open"]);
|
|
8
9
|
const forwarded = useForwardPropsEmits(props, emits);
|
|
@@ -30,7 +30,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
30
30
|
"onUpdate:modelValue"?: ((date: DateValue | undefined) => any) | undefined;
|
|
31
31
|
"onUpdate:placeholder"?: ((date: DateValue) => any) | undefined;
|
|
32
32
|
}>, {
|
|
33
|
-
modelValue: DateValue | DateValue[];
|
|
33
|
+
modelValue: DateValue | DateValue[] | null;
|
|
34
34
|
layout: "month-and-year" | "month-only" | "year-only";
|
|
35
35
|
reverseYears: boolean;
|
|
36
36
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -30,7 +30,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
30
30
|
"onUpdate:modelValue"?: ((date: DateValue | undefined) => any) | undefined;
|
|
31
31
|
"onUpdate:placeholder"?: ((date: DateValue) => any) | undefined;
|
|
32
32
|
}>, {
|
|
33
|
-
modelValue: DateValue | DateValue[];
|
|
33
|
+
modelValue: DateValue | DateValue[] | null;
|
|
34
34
|
layout: "month-and-year" | "month-only" | "year-only";
|
|
35
35
|
reverseYears: boolean;
|
|
36
36
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "vue";
|
|
2
|
+
import type { ChartConfig } from ".";
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
5
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
6
|
+
id?: HTMLAttributes["id"];
|
|
7
|
+
class?: HTMLAttributes["class"];
|
|
8
|
+
config: ChartConfig;
|
|
9
|
+
cursor?: boolean;
|
|
10
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
11
|
+
id?: HTMLAttributes["id"];
|
|
12
|
+
class?: HTMLAttributes["class"];
|
|
13
|
+
config: ChartConfig;
|
|
14
|
+
cursor?: boolean;
|
|
15
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
16
|
+
default: {
|
|
17
|
+
id: string;
|
|
18
|
+
config: ChartConfig;
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { useId } from "reka-ui";
|
|
3
|
+
import { computed, toRefs } from "vue";
|
|
4
|
+
import { cn } from "#pukaad-ui/runtime/plugins/shadcn";
|
|
5
|
+
import { provideChartContext } from ".";
|
|
6
|
+
import ChartStyle from "./ChartStyle.vue";
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<script setup>
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
id: { type: null, required: false },
|
|
12
|
+
class: { type: null, required: false },
|
|
13
|
+
config: { type: null, required: true },
|
|
14
|
+
cursor: { type: Boolean, required: false }
|
|
15
|
+
});
|
|
16
|
+
defineSlots();
|
|
17
|
+
const { config } = toRefs(props);
|
|
18
|
+
const uniqueId = useId();
|
|
19
|
+
const chartId = computed(() => `chart-${props.id || uniqueId.replace(/:/g, "")}`);
|
|
20
|
+
provideChartContext({
|
|
21
|
+
id: uniqueId,
|
|
22
|
+
config
|
|
23
|
+
});
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<div
|
|
28
|
+
data-slot="chart"
|
|
29
|
+
:data-chart="chartId"
|
|
30
|
+
:class="cn(
|
|
31
|
+
`[&_.tick_text]:!fill-muted-foreground [&_.tick_line]:!stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex flex-col aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden [&_[data-vis-xy-container]]:h-full [&_[data-vis-single-container]]:h-full h-full [&_[data-vis-xy-container]]:w-full [&_[data-vis-single-container]]:w-full w-full `,
|
|
32
|
+
props.class
|
|
33
|
+
)"
|
|
34
|
+
:style="{
|
|
35
|
+
'--vis-tooltip-padding': '0px',
|
|
36
|
+
'--vis-tooltip-background-color': 'transparent',
|
|
37
|
+
'--vis-tooltip-border-color': 'transparent',
|
|
38
|
+
'--vis-tooltip-text-color': 'none',
|
|
39
|
+
'--vis-tooltip-shadow-color': 'none',
|
|
40
|
+
'--vis-tooltip-backdrop-filter': 'none',
|
|
41
|
+
'--vis-crosshair-circle-stroke-color': '#0000',
|
|
42
|
+
'--vis-crosshair-line-stroke-width': cursor ? '1px' : '0px',
|
|
43
|
+
'--vis-font-family': 'var(--font-sans)'
|
|
44
|
+
}"
|
|
45
|
+
>
|
|
46
|
+
<slot :id="uniqueId" :config="config" />
|
|
47
|
+
<ChartStyle :id="chartId" />
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "vue";
|
|
2
|
+
import type { ChartConfig } from ".";
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
5
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
6
|
+
id?: HTMLAttributes["id"];
|
|
7
|
+
class?: HTMLAttributes["class"];
|
|
8
|
+
config: ChartConfig;
|
|
9
|
+
cursor?: boolean;
|
|
10
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
11
|
+
id?: HTMLAttributes["id"];
|
|
12
|
+
class?: HTMLAttributes["class"];
|
|
13
|
+
config: ChartConfig;
|
|
14
|
+
cursor?: boolean;
|
|
15
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
16
|
+
default: {
|
|
17
|
+
id: string;
|
|
18
|
+
config: ChartConfig;
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "vue";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
hideIcon?: boolean;
|
|
4
|
+
nameKey?: string;
|
|
5
|
+
verticalAlign?: "bottom" | "top";
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
+
verticalAlign: "bottom" | "top";
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|