@c3labsbr/vuetify-elements 1.0.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/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/components/dialogs/ConfirmDialog.vue.d.ts +25 -0
- package/dist/components/table/GenericHeaderActions.vue.d.ts +15 -0
- package/dist/components/table/GenericItemActions.vue.d.ts +30 -0
- package/dist/components/table/GenericTable.vue.d.ts +69 -0
- package/dist/components/table/GenericTablePagination.vue.d.ts +21 -0
- package/dist/helpers/formatters.d.ts +42 -0
- package/dist/helpers/masks.d.ts +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/interfaces/app.d.ts +18 -0
- package/dist/utils/export.d.ts +2 -0
- package/dist/vuetify-elements.cjs.js +4 -0
- package/dist/vuetify-elements.css +1 -0
- package/dist/vuetify-elements.es.js +12407 -0
- package/package.json +62 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-present, C3Labs - https://c3labs.com.br
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# C3Labs Vuetify Elements
|
|
2
|
+
|
|
3
|
+
C3Labs Vuetify Elements is a comprehensive library of Vue 3 components built with Vuetify 3, designed to enhance C3Labs developers experience. This package offers a wide range of customizable components that seamlessly integrate with Vuetify, allowing you to create stunning user interfaces with ease.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
confirmationQuestion: string;
|
|
3
|
+
isDialogVisible: boolean;
|
|
4
|
+
confirmTitle: string;
|
|
5
|
+
confirmMsg: string;
|
|
6
|
+
cancelTitle: string;
|
|
7
|
+
cancelMsg: string;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
"update:isDialogVisible": (value: boolean) => void;
|
|
11
|
+
confirm: (value: boolean) => void;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<Props>>> & {
|
|
13
|
+
"onUpdate:isDialogVisible"?: ((value: boolean) => any) | undefined;
|
|
14
|
+
onConfirm?: ((value: boolean) => any) | undefined;
|
|
15
|
+
}, {}, {}>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
18
|
+
type __VLS_TypePropsToOption<T> = {
|
|
19
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
20
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
21
|
+
} : {
|
|
22
|
+
type: import('vue').PropType<T[K]>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IHeader } from '../../interfaces/app';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
headers: IHeader[];
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}, {}>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
8
|
+
type __VLS_TypePropsToOption<T> = {
|
|
9
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
10
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
11
|
+
} : {
|
|
12
|
+
type: import('vue').PropType<T[K]>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IHeader } from '../../interfaces/app';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
headers: IHeader[];
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: HTMLDivElement;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}, {}>;
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
18
|
+
type __VLS_TypePropsToOption<T> = {
|
|
19
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
20
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
21
|
+
} : {
|
|
22
|
+
type: import('vue').PropType<T[K]>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { IPagination, IHeader } from '../../interfaces/app';
|
|
2
|
+
declare const loading: import('vue').ModelRef<boolean, string>;
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
keyWord: string;
|
|
5
|
+
noItemsText: any;
|
|
6
|
+
hideCreate?: boolean;
|
|
7
|
+
hideSearch?: boolean;
|
|
8
|
+
hideHeader?: boolean;
|
|
9
|
+
variant?: "flat" | "text" | "elevated" | "tonal" | "outlined" | "plain" | undefined;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_PublicProps = {
|
|
12
|
+
"search"?: any;
|
|
13
|
+
"headers"?: IHeader[];
|
|
14
|
+
"items"?: any;
|
|
15
|
+
"pagination"?: IPagination;
|
|
16
|
+
"loading"?: typeof loading['value'];
|
|
17
|
+
"confirmDeleteDialog"?: boolean;
|
|
18
|
+
} & __VLS_Props;
|
|
19
|
+
declare function __VLS_template(): {
|
|
20
|
+
attrs: Partial<{}>;
|
|
21
|
+
slots: Partial<Record<string, (_: {
|
|
22
|
+
item: any;
|
|
23
|
+
}) => any>> & {
|
|
24
|
+
'custom-btn'?(_: {}): any;
|
|
25
|
+
actions?(_: {
|
|
26
|
+
item: unknown;
|
|
27
|
+
}): any;
|
|
28
|
+
};
|
|
29
|
+
refs: {
|
|
30
|
+
refHeadersBoard: HTMLDivElement;
|
|
31
|
+
};
|
|
32
|
+
rootEl: any;
|
|
33
|
+
};
|
|
34
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
35
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToOption<__VLS_PublicProps>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
36
|
+
"update:options": (...args: any[]) => void;
|
|
37
|
+
createItem: (...args: any[]) => void;
|
|
38
|
+
"update:search": (...args: any[]) => void;
|
|
39
|
+
"update:pagination": (value: IPagination) => void;
|
|
40
|
+
"update:headers": (value: IHeader[]) => void;
|
|
41
|
+
"update:items": (value: any) => void;
|
|
42
|
+
"update:loading": (value: boolean) => void;
|
|
43
|
+
"update:confirmDeleteDialog": (value: boolean) => void;
|
|
44
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
|
|
45
|
+
"onUpdate:options"?: ((...args: any[]) => any) | undefined;
|
|
46
|
+
"onUpdate:pagination"?: ((value: IPagination) => any) | undefined;
|
|
47
|
+
onCreateItem?: ((...args: any[]) => any) | undefined;
|
|
48
|
+
"onUpdate:search"?: ((...args: any[]) => any) | undefined;
|
|
49
|
+
"onUpdate:headers"?: ((value: IHeader[]) => any) | undefined;
|
|
50
|
+
"onUpdate:items"?: ((value: any) => any) | undefined;
|
|
51
|
+
"onUpdate:loading"?: ((value: boolean) => any) | undefined;
|
|
52
|
+
"onUpdate:confirmDeleteDialog"?: ((value: boolean) => any) | undefined;
|
|
53
|
+
}, {}, {}>;
|
|
54
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
55
|
+
export default _default;
|
|
56
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
57
|
+
type __VLS_TypePropsToOption<T> = {
|
|
58
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
59
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
60
|
+
} : {
|
|
61
|
+
type: import('vue').PropType<T[K]>;
|
|
62
|
+
required: true;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
66
|
+
new (): {
|
|
67
|
+
$slots: S;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IPagination } from '../../interfaces/app';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<{
|
|
3
|
+
headers: ArrayConstructor;
|
|
4
|
+
data: ArrayConstructor;
|
|
5
|
+
pagination: {
|
|
6
|
+
type: import('vue').PropType<IPagination>;
|
|
7
|
+
};
|
|
8
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
"update:options": (...args: any[]) => void;
|
|
10
|
+
"update:pagination": (value: IPagination) => void;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
12
|
+
headers: ArrayConstructor;
|
|
13
|
+
data: ArrayConstructor;
|
|
14
|
+
pagination: {
|
|
15
|
+
type: import('vue').PropType<IPagination>;
|
|
16
|
+
};
|
|
17
|
+
}>> & {
|
|
18
|
+
"onUpdate:options"?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
"onUpdate:pagination"?: ((value: IPagination) => any) | undefined;
|
|
20
|
+
}, {}, {}>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare const isToday: (date: Date) => boolean;
|
|
2
|
+
export declare const avatarText: (value: string) => string;
|
|
3
|
+
export declare const kFormatter: (num: number) => string;
|
|
4
|
+
export declare const formatDateToYearMonthDay: (date: string | Date) => string;
|
|
5
|
+
/**
|
|
6
|
+
* Format and return date in Humanize format
|
|
7
|
+
* Intl docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format
|
|
8
|
+
* Intl Constructor: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat
|
|
9
|
+
* @param {string} value date to format
|
|
10
|
+
* @param {Intl.DateTimeFormatOptions} formatting Intl object to format with
|
|
11
|
+
*/
|
|
12
|
+
export declare const formatDate: (value: string, formatting?: Intl.DateTimeFormatOptions) => string;
|
|
13
|
+
export declare const formatDateNotString: (date: string | Date) => string;
|
|
14
|
+
export declare function parseLocalDate(dateStr: string): Date | string;
|
|
15
|
+
export declare const formatPhone: (phone: string) => string;
|
|
16
|
+
export declare const maskNCM: (ncm: string) => string;
|
|
17
|
+
/**
|
|
18
|
+
* Return short human friendly month representation of date
|
|
19
|
+
* Can also convert date to only time if date is of today (Better UX)
|
|
20
|
+
* @param {string} value date to format
|
|
21
|
+
* @param {boolean} toTimeForCurrentDay Shall convert to time if day is today/current
|
|
22
|
+
*/
|
|
23
|
+
export declare const formatDateToMonthShort: (value: string, toTimeForCurrentDay?: boolean) => string;
|
|
24
|
+
export declare const prefixWithPlus: (value: number) => string | number;
|
|
25
|
+
export declare function maskCnpj(cnpj: string): string;
|
|
26
|
+
export declare function maskCuit(cuit: string): string;
|
|
27
|
+
export declare function maskNuc(nuc: string): string;
|
|
28
|
+
export declare function maskCpf(cpf: string): string;
|
|
29
|
+
export declare function maskCep(cep: string): string;
|
|
30
|
+
export declare function formatCurrency(value: string | number): string;
|
|
31
|
+
export declare function formatBrl(value: string | number): string;
|
|
32
|
+
export declare function formatBrlToInput(value: string | number): string;
|
|
33
|
+
export declare function formatBrlToInputFiveHouses(value: string | number): string;
|
|
34
|
+
export declare function formatKg(value: string): string;
|
|
35
|
+
export declare function formatWeight(value: string): string;
|
|
36
|
+
export declare function formatHour(value: string): string;
|
|
37
|
+
export declare function parseFormattedValue(value: string): number;
|
|
38
|
+
export declare function parseFormattedValueWithFiveHouses(value: string): number;
|
|
39
|
+
export declare function formatToBrazilian(valueString: string): string;
|
|
40
|
+
export declare function formatLicensePlate(licensePlate: string): string;
|
|
41
|
+
export declare const formatStringToDate: (date: string) => Date;
|
|
42
|
+
export declare const formatDateToConditionalYear: (isoString: Date | string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getMask: (mask: string | undefined, value: any) => any;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface IPagination {
|
|
2
|
+
page: number;
|
|
3
|
+
pageSize: number;
|
|
4
|
+
total: number;
|
|
5
|
+
numPages: number;
|
|
6
|
+
sortBy: Array<string>;
|
|
7
|
+
sortDesc: Array<boolean>;
|
|
8
|
+
}
|
|
9
|
+
export interface IHeader {
|
|
10
|
+
id: number;
|
|
11
|
+
title: string;
|
|
12
|
+
value: string;
|
|
13
|
+
sequence: number;
|
|
14
|
+
isVisible: boolean;
|
|
15
|
+
sortable: boolean;
|
|
16
|
+
rules?: Array<(v: string) => boolean | string>;
|
|
17
|
+
mask?: string;
|
|
18
|
+
}
|