@@ -2,7 +2,9 @@ export default [
2
2
{
3
3
name : "Accordion" ,
4
4
value : "accordion" ,
5
- instructions : [ "Remember to add the accordion animations to your tailwind.config.js" ] ,
5
+ instructions : [
6
+ "Remember to add the accordion animations to your tailwind.config.js" ,
7
+ ] ,
6
8
files : [
7
9
{
8
10
fileName : "Accordion/Accordion.vue" ,
@@ -349,7 +351,9 @@ export default [
349
351
value : "calendar" ,
350
352
devDeps : [ "@samk-dev/nuxt-vcalendar" ] ,
351
353
nuxtModules : [ "@samk-dev/nuxt-vcalendar" ] ,
352
- instructions : [ "You can customize the calendar by adding options to your nuxt.config.js file" ] ,
354
+ instructions : [
355
+ "You can customize the calendar by adding options to your nuxt.config.js file" ,
356
+ ] ,
353
357
files : [
354
358
{
355
359
fileName : "Calendar.vue" ,
@@ -1040,8 +1044,8 @@ export default [
1040
1044
{
1041
1045
name : "Form" ,
1042
1046
value : "form" ,
1043
- deps : [ "@vee-validate/nuxt" ] ,
1044
- nuxtModules : [ "@vee-validate/nuxt" ] ,
1047
+ deps : [ "@vee-validate/nuxt" , "@morev/vue-transitions" ] ,
1048
+ nuxtModules : [ "@vee-validate/nuxt" , "@morev/vue-transitions/nuxt" ] ,
1045
1049
composables : [
1046
1050
{
1047
1051
fileName : "useFormField.ts" ,
@@ -2230,7 +2234,9 @@ export default [
2230
2234
'import type { ToastProps } from "@/components/Ui/Toast/Toast.vue";\n\nconst TOAST_LIMIT = 3;\nconst TOAST_REMOVE_DELAY = 7000;\n\nexport type StringOrVNode = string | VNode | (() => VNode);\n\ntype ToasterToast = ToastProps & {\n id: string;\n title?: string;\n description?: StringOrVNode;\n action?: Component;\n icon?: string;\n};\n\nconst actionTypes = {\n ADD_TOAST: "ADD_TOAST",\n UPDATE_TOAST: "UPDATE_TOAST",\n DISMISS_TOAST: "DISMISS_TOAST",\n REMOVE_TOAST: "REMOVE_TOAST",\n} as const;\n\nlet count = 0;\n\nfunction genId() {\n count = (count + 1) % Number.MAX_VALUE;\n return count.toString();\n}\n\ntype ActionType = typeof actionTypes;\n\ntype Action =\n | {\n type: ActionType["ADD_TOAST"];\n toast: ToasterToast;\n }\n | {\n type: ActionType["UPDATE_TOAST"];\n toast: Partial<ToasterToast>;\n }\n | {\n type: ActionType["DISMISS_TOAST"];\n toastId?: ToasterToast["id"];\n }\n | {\n type: ActionType["REMOVE_TOAST"];\n toastId?: ToasterToast["id"];\n };\n\ninterface State {\n toasts: ToasterToast[];\n}\n\nconst toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>();\n\nfunction addToRemoveQueue(toastId: string) {\n if (toastTimeouts.has(toastId)) return;\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId);\n dispatch({\n type: actionTypes.REMOVE_TOAST,\n toastId,\n });\n }, TOAST_REMOVE_DELAY);\n\n toastTimeouts.set(toastId, timeout);\n}\n\nconst state = ref<State>({\n toasts: [],\n});\n\nfunction dispatch(action: Action) {\n switch (action.type) {\n case actionTypes.ADD_TOAST:\n state.value.toasts = [action.toast, ...state.value.toasts].slice(0, TOAST_LIMIT);\n break;\n\n case actionTypes.UPDATE_TOAST:\n state.value.toasts = state.value.toasts.map((t) =>\n t.id === action.toast.id ? { ...t, ...action.toast } : t\n );\n break;\n\n case actionTypes.DISMISS_TOAST: {\n const { toastId } = action;\n\n if (toastId) {\n addToRemoveQueue(toastId);\n } else {\n state.value.toasts.forEach((toast) => {\n addToRemoveQueue(toast.id);\n });\n }\n\n state.value.toasts = state.value.toasts.map((t) =>\n t.id === toastId || toastId === undefined\n ? {\n ...t,\n open: false,\n }\n : t\n );\n break;\n }\n\n case actionTypes.REMOVE_TOAST:\n if (action.toastId === undefined) state.value.toasts = [];\n else state.value.toasts = state.value.toasts.filter((t) => t.id !== action.toastId);\n\n break;\n }\n}\n\nfunction useToast() {\n return {\n toasts: computed(() => state.value.toasts),\n toast,\n dismiss: (toastId?: string) => dispatch({ type: actionTypes.DISMISS_TOAST, toastId }),\n };\n}\n\ntype Toast = Omit<ToasterToast, "id">;\n\nfunction toast(props: Toast) {\n const id = genId();\n\n const update = (props: ToasterToast) =>\n dispatch({\n type: actionTypes.UPDATE_TOAST,\n toast: { ...props, id },\n });\n\n const dismiss = () => dispatch({ type: actionTypes.DISMISS_TOAST, toastId: id });\n\n dispatch({\n type: actionTypes.ADD_TOAST,\n toast: {\n ...props,\n id,\n open: true,\n onOpenChange: (open: boolean) => {\n if (!open) dismiss();\n },\n },\n });\n\n return {\n id,\n dismiss,\n update,\n };\n}\n\nexport { toast, useToast };\n' ,
2231
2235
} ,
2232
2236
] ,
2233
- instructions : [ "Remeber to add <UiToastToaster /> to your app.vue/layout file." ] ,
2237
+ instructions : [
2238
+ "Remeber to add <UiToastToaster /> to your app.vue/layout file." ,
2239
+ ] ,
2234
2240
files : [
2235
2241
{
2236
2242
fileName : "Toast/Action.vue" ,
@@ -2406,7 +2412,11 @@ export default [
2406
2412
{
2407
2413
name : "VeeDateField" ,
2408
2414
value : "vee-date-field" ,
2409
- deps : [ "@vee-validate/nuxt" , "@morev/vue-transitions" , "@internationalized/date" ] ,
2415
+ deps : [
2416
+ "@vee-validate/nuxt" ,
2417
+ "@morev/vue-transitions" ,
2418
+ "@internationalized/date" ,
2419
+ ] ,
2410
2420
askValidator : true ,
2411
2421
nuxtModules : [ "@vee-validate/nuxt" , "@morev/vue-transitions/nuxt" ] ,
2412
2422
components : [ "date-field" , "label" ] ,
@@ -2482,7 +2492,11 @@ export default [
2482
2492
{
2483
2493
name : "VeeMultiSelect" ,
2484
2494
value : "vee-multi-select" ,
2485
- deps : [ "@vee-validate/nuxt" , "@morev/vue-transitions" , "@vueform/multiselect" ] ,
2495
+ deps : [
2496
+ "@vee-validate/nuxt" ,
2497
+ "@morev/vue-transitions" ,
2498
+ "@vueform/multiselect" ,
2499
+ ] ,
2486
2500
askValidator : true ,
2487
2501
nuxtModules : [ "@vee-validate/nuxt" , "@morev/vue-transitions/nuxt" ] ,
2488
2502
components : [ "label" ] ,
@@ -2501,7 +2515,11 @@ export default [
2501
2515
{
2502
2516
name : "VeeNumberField" ,
2503
2517
value : "vee-number-field" ,
2504
- deps : [ "@vee-validate/nuxt" , "@morev/vue-transitions" , "@internationalized/number" ] ,
2518
+ deps : [
2519
+ "@vee-validate/nuxt" ,
2520
+ "@morev/vue-transitions" ,
2521
+ "@internationalized/number" ,
2522
+ ] ,
2505
2523
askValidator : true ,
2506
2524
nuxtModules : [ "@vee-validate/nuxt" , "@morev/vue-transitions/nuxt" ] ,
2507
2525
components : [ "label" , "number-field" ] ,
@@ -2616,7 +2634,9 @@ export default [
2616
2634
name : "Vue Sonner" ,
2617
2635
value : "vue-sonner" ,
2618
2636
deps : [ "vue-sonner" ] ,
2619
- instructions : [ "Remember to add the <UiVueSonner /> tag to your app.vue/layout file." ] ,
2637
+ instructions : [
2638
+ "Remember to add the <UiVueSonner /> tag to your app.vue/layout file." ,
2639
+ ] ,
2620
2640
files : [
2621
2641
{
2622
2642
fileName : "VueSonner.client.vue" ,
0 commit comments