ads-nuxt 0.4.1 → 0.4.2
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 -21
- package/README.md +574 -574
- package/app/app.config.ts +25 -25
- package/app/assets/ads/checkbox-check.svg +5 -5
- package/app/assets/ads/checkbox-minus.svg +5 -5
- package/app/assets/brand/farmarcas.svg +6 -6
- package/app/assets/brand/radar-symbol.svg +9 -9
- package/app/assets/brand/radar.svg +9 -9
- package/app/assets/css/ads-colors.css +257 -257
- package/app/assets/css/main.css +585 -585
- package/app/components/AdsBadge.vue +47 -47
- package/app/components/AdsBroadcast.vue +24 -24
- package/app/components/AdsButton.vue +547 -547
- package/app/components/AdsButtonGroup.vue +39 -39
- package/app/components/AdsButtonMenu.vue +48 -48
- package/app/components/AdsCard.vue +188 -188
- package/app/components/AdsCardHint.vue +56 -56
- package/app/components/AdsCardPeriod.vue +43 -43
- package/app/components/AdsCardVariation.vue +31 -31
- package/app/components/AdsCharttip.vue +79 -79
- package/app/components/AdsDatePicker.vue +509 -509
- package/app/components/AdsDropdownMenu.vue +30 -30
- package/app/components/AdsEmptyState.vue +61 -61
- package/app/components/AdsFeatureCard.vue +292 -292
- package/app/components/AdsFileCard.vue +98 -98
- package/app/components/AdsFooter.vue +25 -25
- package/app/components/AdsHeavyAccountCell.vue +59 -59
- package/app/components/AdsHeavyHeaderCell.vue +70 -70
- package/app/components/AdsHeavyTable.vue +135 -135
- package/app/components/AdsInput.vue +148 -148
- package/app/components/AdsLoading.vue +217 -217
- package/app/components/AdsMenuBar.vue +110 -110
- package/app/components/AdsMetricCard.vue +226 -226
- package/app/components/AdsModal.vue +160 -160
- package/app/components/AdsMonthPicker.vue +80 -80
- package/app/components/AdsNavbarApp.vue +67 -67
- package/app/components/AdsNavbarDesk.vue +67 -67
- package/app/components/AdsNotabilityPill.vue +24 -24
- package/app/components/AdsNumberInput.vue +173 -173
- package/app/components/AdsPanelCard.vue +99 -99
- package/app/components/AdsPill.vue +144 -144
- package/app/components/AdsProductTag.vue +80 -80
- package/app/components/AdsSearchInput.vue +122 -122
- package/app/components/AdsSegmentedTabs.vue +62 -62
- package/app/components/AdsSelect.vue +283 -283
- package/app/components/AdsSelectItem.vue +128 -128
- package/app/components/AdsSelectPanel.vue +221 -221
- package/app/components/AdsSideMenu.vue +101 -101
- package/app/components/AdsSmalltip.vue +44 -44
- package/app/components/AdsStepper.vue +222 -222
- package/app/components/AdsTable.vue +172 -172
- package/app/components/AdsTableHeaderCell.vue +80 -80
- package/app/components/AdsTableSkeleton.vue +113 -113
- package/app/components/AdsTableToolbar.vue +44 -44
- package/app/components/AdsTabs.vue +51 -51
- package/app/components/AdsTextarea.vue +116 -116
- package/app/components/AdsToast.vue +184 -184
- package/app/components/AdsTooltip.vue +73 -73
- package/app/components/ProgressBarLoading.vue +235 -235
- package/app/composables/useOverlayLoading.ts +88 -88
- package/app/constants/ads-color-swatches.ts +240 -240
- package/app/locale/pt-br.ts +6 -6
- package/app/plugins/ads-toast.client.ts +24 -24
- package/app/theme/ads-theme.ts +374 -374
- package/app/theme/ads-tokens.ts +391 -391
- package/app/types/overlay-loading.types.ts +32 -32
- package/app/utils/ads-filter-select.ts +191 -191
- package/app/utils/ads-table.ts +416 -416
- package/app/utils/calendar-date.ts +163 -163
- package/app/utils/category-role.ts +45 -45
- package/app/utils/money.ts +77 -77
- package/app/utils/notability.ts +8 -8
- package/app/utils/parser.ts +134 -134
- package/app/utils/percentage.ts +54 -54
- package/nuxt.config.ts +31 -31
- package/package.json +57 -57
package/app/utils/parser.ts
CHANGED
|
@@ -1,134 +1,134 @@
|
|
|
1
|
-
export const parseToPercentage = (value: number) =>
|
|
2
|
-
Number((value * 100).toFixed(2));
|
|
3
|
-
|
|
4
|
-
export const parsePercentageToFloat = (value: string | number) => {
|
|
5
|
-
if (typeof value === "string") {
|
|
6
|
-
value = value.replace(",", ".");
|
|
7
|
-
return Number(value) / 100;
|
|
8
|
-
}
|
|
9
|
-
return value / 100;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const parseFloatToDecimal = (value: number) => {
|
|
13
|
-
return value.toLocaleString("pt-BR", {
|
|
14
|
-
minimumFractionDigits: 2,
|
|
15
|
-
maximumFractionDigits: 2,
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const DATE_ONLY_REGEX = /^\d{4}-\d{2}-\d{2}$/;
|
|
20
|
-
|
|
21
|
-
const BUSINESS_CALENDAR_TIMEZONE = "America/Sao_Paulo";
|
|
22
|
-
|
|
23
|
-
const getCalendarPart = (
|
|
24
|
-
parts: Intl.DateTimeFormatPart[],
|
|
25
|
-
type: Intl.DateTimeFormatPartTypes,
|
|
26
|
-
): string | undefined => parts.find((part) => part.type === type)?.value;
|
|
27
|
-
|
|
28
|
-
export function getTodayDateString(now: Date = new Date()): string {
|
|
29
|
-
const parts = new Intl.DateTimeFormat("en-CA", {
|
|
30
|
-
timeZone: BUSINESS_CALENDAR_TIMEZONE,
|
|
31
|
-
year: "numeric",
|
|
32
|
-
month: "2-digit",
|
|
33
|
-
day: "2-digit",
|
|
34
|
-
}).formatToParts(now);
|
|
35
|
-
|
|
36
|
-
const year = getCalendarPart(parts, "year");
|
|
37
|
-
const month = getCalendarPart(parts, "month");
|
|
38
|
-
const day = getCalendarPart(parts, "day");
|
|
39
|
-
|
|
40
|
-
if (!year || !month || !day) {
|
|
41
|
-
throw new Error(
|
|
42
|
-
"Não foi possível obter a data civil em America/Sao_Paulo",
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return `${year}-${month}-${day}`;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export function toDateOnlyString(dateStr: string): string {
|
|
50
|
-
return dateStr.includes("T") ? dateStr.slice(0, 10) : dateStr;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export const extractDateOnly = (value: string | Date): string => {
|
|
54
|
-
if (typeof value === "string") {
|
|
55
|
-
if (DATE_ONLY_REGEX.test(value)) return value;
|
|
56
|
-
const iso = value.trim();
|
|
57
|
-
if (iso.length >= 10) return iso.slice(0, 10);
|
|
58
|
-
return "";
|
|
59
|
-
}
|
|
60
|
-
const iso = value.toISOString();
|
|
61
|
-
return iso.slice(0, 10);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
export const formatDateOnlyToPtBr = (value: string | Date): string => {
|
|
66
|
-
const yyyyMmDd = extractDateOnly(value);
|
|
67
|
-
if (!yyyyMmDd || !DATE_ONLY_REGEX.test(yyyyMmDd)) return "";
|
|
68
|
-
|
|
69
|
-
const [y, m, d] = yyyyMmDd.split("-").map(Number);
|
|
70
|
-
const day = String(d).padStart(2, "0");
|
|
71
|
-
const month = String(m).padStart(2, "0");
|
|
72
|
-
const year = String(y);
|
|
73
|
-
|
|
74
|
-
return `${day}/${month}/${year}`;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export const daysBetweenDateOnly = (start: string, end: string): number => {
|
|
78
|
-
const startStr = extractDateOnly(start);
|
|
79
|
-
const endStr = extractDateOnly(end);
|
|
80
|
-
if (!startStr || !endStr) return 0;
|
|
81
|
-
|
|
82
|
-
const startDate = new Date(startStr + "T12:00:00");
|
|
83
|
-
const endDate = new Date(endStr + "T12:00:00");
|
|
84
|
-
const diffMs = endDate.getTime() - startDate.getTime();
|
|
85
|
-
return Math.round(diffMs / (1000 * 60 * 60 * 24));
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
export const daysFromTodayToDateOnly = (isoOrDateStr: string): number => {
|
|
89
|
-
const endStr = extractDateOnly(isoOrDateStr);
|
|
90
|
-
if (!endStr) return 0;
|
|
91
|
-
|
|
92
|
-
const todayStr = getTodayDateString();
|
|
93
|
-
const todayNoon = new Date(todayStr + "T12:00:00");
|
|
94
|
-
const endNoon = new Date(endStr + "T12:00:00");
|
|
95
|
-
const diffMs = endNoon.getTime() - todayNoon.getTime();
|
|
96
|
-
return Math.round(diffMs / (1000 * 60 * 60 * 24));
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
export const formatDateToPtBr = (date: Date | string, onlyDate = false): string => {
|
|
100
|
-
const d = new Date(date);
|
|
101
|
-
if (isNaN(d.getTime())) return "";
|
|
102
|
-
|
|
103
|
-
if (onlyDate) {
|
|
104
|
-
return d.toLocaleDateString("pt-BR");
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return d.toLocaleDateString("pt-BR") + " " + d.toLocaleTimeString("pt-BR", {
|
|
108
|
-
hour: "2-digit",
|
|
109
|
-
minute: "2-digit"
|
|
110
|
-
});
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
export const normalizePercentage = (
|
|
114
|
-
value: string | number | undefined,
|
|
115
|
-
fallback?: number
|
|
116
|
-
): number => {
|
|
117
|
-
if (value === undefined || value === null || value === "") {
|
|
118
|
-
return fallback ?? 0;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
if (typeof value === "string") {
|
|
122
|
-
const numericValue = Number(value.replace(",", "."));
|
|
123
|
-
if (Number.isNaN(numericValue)) {
|
|
124
|
-
return fallback ?? 0;
|
|
125
|
-
}
|
|
126
|
-
return parsePercentageToFloat(numericValue);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
if (typeof value === "number") {
|
|
130
|
-
return parsePercentageToFloat(value);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
return fallback ?? 0;
|
|
134
|
-
};
|
|
1
|
+
export const parseToPercentage = (value: number) =>
|
|
2
|
+
Number((value * 100).toFixed(2));
|
|
3
|
+
|
|
4
|
+
export const parsePercentageToFloat = (value: string | number) => {
|
|
5
|
+
if (typeof value === "string") {
|
|
6
|
+
value = value.replace(",", ".");
|
|
7
|
+
return Number(value) / 100;
|
|
8
|
+
}
|
|
9
|
+
return value / 100;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const parseFloatToDecimal = (value: number) => {
|
|
13
|
+
return value.toLocaleString("pt-BR", {
|
|
14
|
+
minimumFractionDigits: 2,
|
|
15
|
+
maximumFractionDigits: 2,
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const DATE_ONLY_REGEX = /^\d{4}-\d{2}-\d{2}$/;
|
|
20
|
+
|
|
21
|
+
const BUSINESS_CALENDAR_TIMEZONE = "America/Sao_Paulo";
|
|
22
|
+
|
|
23
|
+
const getCalendarPart = (
|
|
24
|
+
parts: Intl.DateTimeFormatPart[],
|
|
25
|
+
type: Intl.DateTimeFormatPartTypes,
|
|
26
|
+
): string | undefined => parts.find((part) => part.type === type)?.value;
|
|
27
|
+
|
|
28
|
+
export function getTodayDateString(now: Date = new Date()): string {
|
|
29
|
+
const parts = new Intl.DateTimeFormat("en-CA", {
|
|
30
|
+
timeZone: BUSINESS_CALENDAR_TIMEZONE,
|
|
31
|
+
year: "numeric",
|
|
32
|
+
month: "2-digit",
|
|
33
|
+
day: "2-digit",
|
|
34
|
+
}).formatToParts(now);
|
|
35
|
+
|
|
36
|
+
const year = getCalendarPart(parts, "year");
|
|
37
|
+
const month = getCalendarPart(parts, "month");
|
|
38
|
+
const day = getCalendarPart(parts, "day");
|
|
39
|
+
|
|
40
|
+
if (!year || !month || !day) {
|
|
41
|
+
throw new Error(
|
|
42
|
+
"Não foi possível obter a data civil em America/Sao_Paulo",
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return `${year}-${month}-${day}`;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function toDateOnlyString(dateStr: string): string {
|
|
50
|
+
return dateStr.includes("T") ? dateStr.slice(0, 10) : dateStr;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const extractDateOnly = (value: string | Date): string => {
|
|
54
|
+
if (typeof value === "string") {
|
|
55
|
+
if (DATE_ONLY_REGEX.test(value)) return value;
|
|
56
|
+
const iso = value.trim();
|
|
57
|
+
if (iso.length >= 10) return iso.slice(0, 10);
|
|
58
|
+
return "";
|
|
59
|
+
}
|
|
60
|
+
const iso = value.toISOString();
|
|
61
|
+
return iso.slice(0, 10);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
export const formatDateOnlyToPtBr = (value: string | Date): string => {
|
|
66
|
+
const yyyyMmDd = extractDateOnly(value);
|
|
67
|
+
if (!yyyyMmDd || !DATE_ONLY_REGEX.test(yyyyMmDd)) return "";
|
|
68
|
+
|
|
69
|
+
const [y, m, d] = yyyyMmDd.split("-").map(Number);
|
|
70
|
+
const day = String(d).padStart(2, "0");
|
|
71
|
+
const month = String(m).padStart(2, "0");
|
|
72
|
+
const year = String(y);
|
|
73
|
+
|
|
74
|
+
return `${day}/${month}/${year}`;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const daysBetweenDateOnly = (start: string, end: string): number => {
|
|
78
|
+
const startStr = extractDateOnly(start);
|
|
79
|
+
const endStr = extractDateOnly(end);
|
|
80
|
+
if (!startStr || !endStr) return 0;
|
|
81
|
+
|
|
82
|
+
const startDate = new Date(startStr + "T12:00:00");
|
|
83
|
+
const endDate = new Date(endStr + "T12:00:00");
|
|
84
|
+
const diffMs = endDate.getTime() - startDate.getTime();
|
|
85
|
+
return Math.round(diffMs / (1000 * 60 * 60 * 24));
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const daysFromTodayToDateOnly = (isoOrDateStr: string): number => {
|
|
89
|
+
const endStr = extractDateOnly(isoOrDateStr);
|
|
90
|
+
if (!endStr) return 0;
|
|
91
|
+
|
|
92
|
+
const todayStr = getTodayDateString();
|
|
93
|
+
const todayNoon = new Date(todayStr + "T12:00:00");
|
|
94
|
+
const endNoon = new Date(endStr + "T12:00:00");
|
|
95
|
+
const diffMs = endNoon.getTime() - todayNoon.getTime();
|
|
96
|
+
return Math.round(diffMs / (1000 * 60 * 60 * 24));
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export const formatDateToPtBr = (date: Date | string, onlyDate = false): string => {
|
|
100
|
+
const d = new Date(date);
|
|
101
|
+
if (isNaN(d.getTime())) return "";
|
|
102
|
+
|
|
103
|
+
if (onlyDate) {
|
|
104
|
+
return d.toLocaleDateString("pt-BR");
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return d.toLocaleDateString("pt-BR") + " " + d.toLocaleTimeString("pt-BR", {
|
|
108
|
+
hour: "2-digit",
|
|
109
|
+
minute: "2-digit"
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export const normalizePercentage = (
|
|
114
|
+
value: string | number | undefined,
|
|
115
|
+
fallback?: number
|
|
116
|
+
): number => {
|
|
117
|
+
if (value === undefined || value === null || value === "") {
|
|
118
|
+
return fallback ?? 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (typeof value === "string") {
|
|
122
|
+
const numericValue = Number(value.replace(",", "."));
|
|
123
|
+
if (Number.isNaN(numericValue)) {
|
|
124
|
+
return fallback ?? 0;
|
|
125
|
+
}
|
|
126
|
+
return parsePercentageToFloat(numericValue);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (typeof value === "number") {
|
|
130
|
+
return parsePercentageToFloat(value);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return fallback ?? 0;
|
|
134
|
+
};
|
package/app/utils/percentage.ts
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Formata um número como porcentagem para exibição.
|
|
3
|
-
* Exibe casas decimais apenas quando o valor não for inteiro.
|
|
4
|
-
*
|
|
5
|
-
* @param value - Valor numérico da porcentagem (ex: 3.25, 50, 100)
|
|
6
|
-
* @returns String formatada com o símbolo % (ex: "3.25%", "50%", "100%")
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* formatPercentage(3.25) // "3.25%"
|
|
10
|
-
* formatPercentage(50) // "50%"
|
|
11
|
-
* formatPercentage(100) // "100%"
|
|
12
|
-
* formatPercentage(0) // "0%"
|
|
13
|
-
*/
|
|
14
|
-
export const formatPercentage = (value: number): string => {
|
|
15
|
-
// Se for inteiro, não mostra casas decimais
|
|
16
|
-
if (Number.isInteger(value)) {
|
|
17
|
-
return `${value}%`;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// Caso contrário, mostra 2 casas decimais
|
|
21
|
-
return `${value.toFixed(2)}%`;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Formata um número como porcentagem com um número específico de casas decimais.
|
|
26
|
-
*
|
|
27
|
-
* @param value - Valor numérico da porcentagem
|
|
28
|
-
* @param decimals - Número de casas decimais (padrão: 2)
|
|
29
|
-
* @returns String formatada com o símbolo %
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* formatPercentageWithDecimals(3.256, 2) // "3.26%"
|
|
33
|
-
* formatPercentageWithDecimals(50, 1) // "50.0%"
|
|
34
|
-
*/
|
|
35
|
-
export const formatPercentageWithDecimals = (
|
|
36
|
-
value: number,
|
|
37
|
-
decimals: number = 2
|
|
38
|
-
): string => {
|
|
39
|
-
return `${value.toFixed(decimals)}%`;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const formatPercentagePtBr = (
|
|
43
|
-
value: number | undefined | null,
|
|
44
|
-
decimals: number = 1
|
|
45
|
-
): string => {
|
|
46
|
-
if (value == null || Number.isNaN(value)) return "-";
|
|
47
|
-
|
|
48
|
-
const formatted = new Intl.NumberFormat("pt-BR", {
|
|
49
|
-
minimumFractionDigits: decimals,
|
|
50
|
-
maximumFractionDigits: decimals,
|
|
51
|
-
}).format(value);
|
|
52
|
-
|
|
53
|
-
return `${formatted}%`;
|
|
54
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Formata um número como porcentagem para exibição.
|
|
3
|
+
* Exibe casas decimais apenas quando o valor não for inteiro.
|
|
4
|
+
*
|
|
5
|
+
* @param value - Valor numérico da porcentagem (ex: 3.25, 50, 100)
|
|
6
|
+
* @returns String formatada com o símbolo % (ex: "3.25%", "50%", "100%")
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* formatPercentage(3.25) // "3.25%"
|
|
10
|
+
* formatPercentage(50) // "50%"
|
|
11
|
+
* formatPercentage(100) // "100%"
|
|
12
|
+
* formatPercentage(0) // "0%"
|
|
13
|
+
*/
|
|
14
|
+
export const formatPercentage = (value: number): string => {
|
|
15
|
+
// Se for inteiro, não mostra casas decimais
|
|
16
|
+
if (Number.isInteger(value)) {
|
|
17
|
+
return `${value}%`;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Caso contrário, mostra 2 casas decimais
|
|
21
|
+
return `${value.toFixed(2)}%`;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Formata um número como porcentagem com um número específico de casas decimais.
|
|
26
|
+
*
|
|
27
|
+
* @param value - Valor numérico da porcentagem
|
|
28
|
+
* @param decimals - Número de casas decimais (padrão: 2)
|
|
29
|
+
* @returns String formatada com o símbolo %
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* formatPercentageWithDecimals(3.256, 2) // "3.26%"
|
|
33
|
+
* formatPercentageWithDecimals(50, 1) // "50.0%"
|
|
34
|
+
*/
|
|
35
|
+
export const formatPercentageWithDecimals = (
|
|
36
|
+
value: number,
|
|
37
|
+
decimals: number = 2
|
|
38
|
+
): string => {
|
|
39
|
+
return `${value.toFixed(decimals)}%`;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const formatPercentagePtBr = (
|
|
43
|
+
value: number | undefined | null,
|
|
44
|
+
decimals: number = 1
|
|
45
|
+
): string => {
|
|
46
|
+
if (value == null || Number.isNaN(value)) return "-";
|
|
47
|
+
|
|
48
|
+
const formatted = new Intl.NumberFormat("pt-BR", {
|
|
49
|
+
minimumFractionDigits: decimals,
|
|
50
|
+
maximumFractionDigits: decimals,
|
|
51
|
+
}).format(value);
|
|
52
|
+
|
|
53
|
+
return `${formatted}%`;
|
|
54
|
+
};
|
package/nuxt.config.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { dirname, join } from "node:path";
|
|
2
|
-
import { fileURLToPath } from "node:url";
|
|
3
|
-
|
|
4
|
-
const currentDir = dirname(fileURLToPath(import.meta.url));
|
|
5
|
-
|
|
6
|
-
export default defineNuxtConfig({
|
|
7
|
-
$meta: {
|
|
8
|
-
name: "design-system",
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
compatibilityDate: "2025-06-17",
|
|
12
|
-
|
|
13
|
-
modules: ["@nuxt/fonts", "@nuxt/icon", "@nuxt/ui", "@vueuse/nuxt"],
|
|
14
|
-
|
|
15
|
-
css: [
|
|
16
|
-
join(currentDir, "app/assets/css/main.css"),
|
|
17
|
-
join(currentDir, "app/assets/css/component-tokens.css"),
|
|
18
|
-
],
|
|
19
|
-
|
|
20
|
-
ui: {
|
|
21
|
-
colorMode: false,
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
icon: {
|
|
25
|
-
collections: ["lucide"],
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
fonts: {
|
|
29
|
-
families: [{ name: "Inter", weights: [300, 400, 500, 700, 800] }],
|
|
30
|
-
},
|
|
31
|
-
});
|
|
1
|
+
import { dirname, join } from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
|
|
4
|
+
const currentDir = dirname(fileURLToPath(import.meta.url));
|
|
5
|
+
|
|
6
|
+
export default defineNuxtConfig({
|
|
7
|
+
$meta: {
|
|
8
|
+
name: "design-system",
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
compatibilityDate: "2025-06-17",
|
|
12
|
+
|
|
13
|
+
modules: ["@nuxt/fonts", "@nuxt/icon", "@nuxt/ui", "@vueuse/nuxt"],
|
|
14
|
+
|
|
15
|
+
css: [
|
|
16
|
+
join(currentDir, "app/assets/css/main.css"),
|
|
17
|
+
join(currentDir, "app/assets/css/component-tokens.css"),
|
|
18
|
+
],
|
|
19
|
+
|
|
20
|
+
ui: {
|
|
21
|
+
colorMode: false,
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
icon: {
|
|
25
|
+
collections: ["lucide"],
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
fonts: {
|
|
29
|
+
families: [{ name: "Inter", weights: [300, 400, 500, 700, 800] }],
|
|
30
|
+
},
|
|
31
|
+
});
|
package/package.json
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ads-nuxt",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"license": "MIT",
|
|
5
|
-
"description": "Alquimia Design System para Nuxt, construído sobre Nuxt UI",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/jbfarmarcas/alquimia-design-system.git"
|
|
9
|
-
},
|
|
10
|
-
"publishConfig": {
|
|
11
|
-
"access": "public"
|
|
12
|
-
},
|
|
13
|
-
"type": "module",
|
|
14
|
-
"packageManager": "pnpm@10.4.1",
|
|
15
|
-
"main": "./nuxt.config.ts",
|
|
16
|
-
"files": [
|
|
17
|
-
"app",
|
|
18
|
-
"nuxt.config.ts"
|
|
19
|
-
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"dev": "nuxt dev playground --port 3010",
|
|
22
|
-
"build": "nuxt build playground",
|
|
23
|
-
"preview": "nuxt preview playground --port 3010",
|
|
24
|
-
"prepare": "nuxt prepare playground",
|
|
25
|
-
"skill:reference": "node scripts/generate-skill-reference.mjs",
|
|
26
|
-
"skill:check": "node scripts/generate-skill-reference.mjs --check"
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"@iconify-json/lucide": "^1.2.104",
|
|
30
|
-
"@tanstack/vue-virtual": "^3.13.49",
|
|
31
|
-
"tailwind-merge": "^3.7.0"
|
|
32
|
-
},
|
|
33
|
-
"peerDependencies": {
|
|
34
|
-
"@internationalized/date": "^3.12.4",
|
|
35
|
-
"@nuxt/fonts": "^0.12.1 || ^0.14.0",
|
|
36
|
-
"@nuxt/icon": "^2.2.0",
|
|
37
|
-
"@nuxt/ui": "^4.3.0",
|
|
38
|
-
"@vueuse/core": "^14.0.0",
|
|
39
|
-
"@vueuse/nuxt": "^14.0.0",
|
|
40
|
-
"nuxt": "^4.0.0",
|
|
41
|
-
"tailwindcss": "^4.0.15",
|
|
42
|
-
"vue": "^3.5.18"
|
|
43
|
-
},
|
|
44
|
-
"devDependencies": {
|
|
45
|
-
"@internationalized/date": "^3.12.4",
|
|
46
|
-
"@nuxt/fonts": "^0.12.1",
|
|
47
|
-
"@nuxt/icon": "^2.2.0",
|
|
48
|
-
"@nuxt/ui": "^4.3.0",
|
|
49
|
-
"@vueuse/core": "^14.0.0",
|
|
50
|
-
"@vueuse/nuxt": "^14.0.0",
|
|
51
|
-
"nuxt": "^4.0.0",
|
|
52
|
-
"tailwindcss": "^4.0.15",
|
|
53
|
-
"typescript": "^5.6.3",
|
|
54
|
-
"vue": "^3.5.18",
|
|
55
|
-
"vue-router": "^4.5.0"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "ads-nuxt",
|
|
3
|
+
"version": "0.4.2",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "Alquimia Design System para Nuxt, construído sobre Nuxt UI",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/jbfarmarcas/alquimia-design-system.git"
|
|
9
|
+
},
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"packageManager": "pnpm@10.4.1",
|
|
15
|
+
"main": "./nuxt.config.ts",
|
|
16
|
+
"files": [
|
|
17
|
+
"app",
|
|
18
|
+
"nuxt.config.ts"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"dev": "nuxt dev playground --port 3010",
|
|
22
|
+
"build": "nuxt build playground",
|
|
23
|
+
"preview": "nuxt preview playground --port 3010",
|
|
24
|
+
"prepare": "nuxt prepare playground",
|
|
25
|
+
"skill:reference": "node scripts/generate-skill-reference.mjs",
|
|
26
|
+
"skill:check": "node scripts/generate-skill-reference.mjs --check"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@iconify-json/lucide": "^1.2.104",
|
|
30
|
+
"@tanstack/vue-virtual": "^3.13.49",
|
|
31
|
+
"tailwind-merge": "^3.7.0"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"@internationalized/date": "^3.12.4",
|
|
35
|
+
"@nuxt/fonts": "^0.12.1 || ^0.14.0",
|
|
36
|
+
"@nuxt/icon": "^2.2.0",
|
|
37
|
+
"@nuxt/ui": "^4.3.0",
|
|
38
|
+
"@vueuse/core": "^14.0.0",
|
|
39
|
+
"@vueuse/nuxt": "^14.0.0",
|
|
40
|
+
"nuxt": "^4.0.0",
|
|
41
|
+
"tailwindcss": "^4.0.15",
|
|
42
|
+
"vue": "^3.5.18"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@internationalized/date": "^3.12.4",
|
|
46
|
+
"@nuxt/fonts": "^0.12.1",
|
|
47
|
+
"@nuxt/icon": "^2.2.0",
|
|
48
|
+
"@nuxt/ui": "^4.3.0",
|
|
49
|
+
"@vueuse/core": "^14.0.0",
|
|
50
|
+
"@vueuse/nuxt": "^14.0.0",
|
|
51
|
+
"nuxt": "^4.0.0",
|
|
52
|
+
"tailwindcss": "^4.0.15",
|
|
53
|
+
"typescript": "^5.6.3",
|
|
54
|
+
"vue": "^3.5.18",
|
|
55
|
+
"vue-router": "^4.5.0"
|
|
56
|
+
}
|
|
57
|
+
}
|