ads-nuxt 0.4.1 → 0.5.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 -21
- package/README.md +573 -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 +334 -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
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
AdsDropdownMenu — menu de ações (UDropdownMenu com o tema ADS).
|
|
3
|
-
Para escolher valores (simples, múltipla, busca, subtítulo, selo), use o AdsSelect.
|
|
4
|
-
-->
|
|
5
|
-
<template>
|
|
6
|
-
<UDropdownMenu :items="items" :content="content" :ui="adsDropdownMenuUi">
|
|
7
|
-
<slot />
|
|
8
|
-
</UDropdownMenu>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script setup lang="ts">
|
|
12
|
-
import type { DropdownMenuItem } from "@nuxt/ui";
|
|
13
|
-
import { adsDropdownMenuUi } from "../theme/ads-theme";
|
|
14
|
-
|
|
15
|
-
withDefaults(
|
|
16
|
-
defineProps<{
|
|
17
|
-
/** Ações do menu. Grupos em arrays aninhados ganham separador. */
|
|
18
|
-
items?: DropdownMenuItem[] | DropdownMenuItem[][];
|
|
19
|
-
content?: {
|
|
20
|
-
side?: "top" | "right" | "bottom" | "left";
|
|
21
|
-
align?: "start" | "center" | "end";
|
|
22
|
-
sideOffset?: number;
|
|
23
|
-
};
|
|
24
|
-
}>(),
|
|
25
|
-
{
|
|
26
|
-
items: () => [],
|
|
27
|
-
content: undefined,
|
|
28
|
-
},
|
|
29
|
-
);
|
|
30
|
-
</script>
|
|
1
|
+
<!--
|
|
2
|
+
AdsDropdownMenu — menu de ações (UDropdownMenu com o tema ADS).
|
|
3
|
+
Para escolher valores (simples, múltipla, busca, subtítulo, selo), use o AdsSelect.
|
|
4
|
+
-->
|
|
5
|
+
<template>
|
|
6
|
+
<UDropdownMenu :items="items" :content="content" :ui="adsDropdownMenuUi">
|
|
7
|
+
<slot />
|
|
8
|
+
</UDropdownMenu>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
import type { DropdownMenuItem } from "@nuxt/ui";
|
|
13
|
+
import { adsDropdownMenuUi } from "../theme/ads-theme";
|
|
14
|
+
|
|
15
|
+
withDefaults(
|
|
16
|
+
defineProps<{
|
|
17
|
+
/** Ações do menu. Grupos em arrays aninhados ganham separador. */
|
|
18
|
+
items?: DropdownMenuItem[] | DropdownMenuItem[][];
|
|
19
|
+
content?: {
|
|
20
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
21
|
+
align?: "start" | "center" | "end";
|
|
22
|
+
sideOffset?: number;
|
|
23
|
+
};
|
|
24
|
+
}>(),
|
|
25
|
+
{
|
|
26
|
+
items: () => [],
|
|
27
|
+
content: undefined,
|
|
28
|
+
},
|
|
29
|
+
);
|
|
30
|
+
</script>
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="flex flex-col items-center text-center"
|
|
4
|
-
:class="small ? 'gap-[var(--ads-empty-gap-sm)]' : 'gap-[var(--ads-empty-gap)]'"
|
|
5
|
-
>
|
|
6
|
-
<svg
|
|
7
|
-
viewBox="0 0 24 24"
|
|
8
|
-
fill="none"
|
|
9
|
-
aria-hidden="true"
|
|
10
|
-
class="text-[var(--ads-empty-icon-color)]"
|
|
11
|
-
:class="small ? 'size-[var(--ads-empty-icon-sm)]' : 'size-[var(--ads-empty-icon)]'"
|
|
12
|
-
>
|
|
13
|
-
<circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="1.6" />
|
|
14
|
-
<path d="M9 9l6 6M15 9l-6 6" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" />
|
|
15
|
-
</svg>
|
|
16
|
-
<div
|
|
17
|
-
class="flex flex-col items-center"
|
|
18
|
-
:class="small ? 'max-w-[208px] gap-[var(--ads-empty-text-gap-sm)]' : 'max-w-xs gap-[var(--ads-empty-text-gap)]'"
|
|
19
|
-
>
|
|
20
|
-
<p
|
|
21
|
-
class="font-bold leading-[1.3] text-[var(--ads-text-primary)]"
|
|
22
|
-
:class="small ? 'text-[length:var(--ads-empty-title-size-sm)]' : 'text-[length:var(--ads-empty-title-size)]'"
|
|
23
|
-
>
|
|
24
|
-
{{ title }}
|
|
25
|
-
</p>
|
|
26
|
-
<p v-if="subtitle" class="text-[length:var(--ads-empty-subtitle-size)] leading-[1.2] text-[var(--ads-text-secondary)]">
|
|
27
|
-
{{ subtitle }}
|
|
28
|
-
</p>
|
|
29
|
-
</div>
|
|
30
|
-
<div v-if="showActions" class="flex flex-col items-center gap-2">
|
|
31
|
-
<slot>
|
|
32
|
-
<AdsButton :label="primaryLabel" :size="small ? 'sm' : 'md'" leading trailing />
|
|
33
|
-
<AdsButton type="unfilled" :label="secondaryLabel" :size="small ? 'sm' : 'md'" leading trailing />
|
|
34
|
-
</slot>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
<script setup lang="ts">
|
|
40
|
-
import AdsButton from "./AdsButton.vue";
|
|
41
|
-
|
|
42
|
-
withDefaults(
|
|
43
|
-
defineProps<{
|
|
44
|
-
title?: string;
|
|
45
|
-
subtitle?: string;
|
|
46
|
-
/** Figma `Small=Yes`. */
|
|
47
|
-
small?: boolean;
|
|
48
|
-
showActions?: boolean;
|
|
49
|
-
primaryLabel?: string;
|
|
50
|
-
secondaryLabel?: string;
|
|
51
|
-
}>(),
|
|
52
|
-
{
|
|
53
|
-
title: "Título do empty state",
|
|
54
|
-
subtitle: "Coloque aqui um texto explicando e direcionando o usuário. Uso opcional.",
|
|
55
|
-
small: false,
|
|
56
|
-
showActions: true,
|
|
57
|
-
primaryLabel: "Button Test",
|
|
58
|
-
secondaryLabel: "Button Test",
|
|
59
|
-
},
|
|
60
|
-
);
|
|
61
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="flex flex-col items-center text-center"
|
|
4
|
+
:class="small ? 'gap-[var(--ads-empty-gap-sm)]' : 'gap-[var(--ads-empty-gap)]'"
|
|
5
|
+
>
|
|
6
|
+
<svg
|
|
7
|
+
viewBox="0 0 24 24"
|
|
8
|
+
fill="none"
|
|
9
|
+
aria-hidden="true"
|
|
10
|
+
class="text-[var(--ads-empty-icon-color)]"
|
|
11
|
+
:class="small ? 'size-[var(--ads-empty-icon-sm)]' : 'size-[var(--ads-empty-icon)]'"
|
|
12
|
+
>
|
|
13
|
+
<circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="1.6" />
|
|
14
|
+
<path d="M9 9l6 6M15 9l-6 6" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" />
|
|
15
|
+
</svg>
|
|
16
|
+
<div
|
|
17
|
+
class="flex flex-col items-center"
|
|
18
|
+
:class="small ? 'max-w-[208px] gap-[var(--ads-empty-text-gap-sm)]' : 'max-w-xs gap-[var(--ads-empty-text-gap)]'"
|
|
19
|
+
>
|
|
20
|
+
<p
|
|
21
|
+
class="font-bold leading-[1.3] text-[var(--ads-text-primary)]"
|
|
22
|
+
:class="small ? 'text-[length:var(--ads-empty-title-size-sm)]' : 'text-[length:var(--ads-empty-title-size)]'"
|
|
23
|
+
>
|
|
24
|
+
{{ title }}
|
|
25
|
+
</p>
|
|
26
|
+
<p v-if="subtitle" class="text-[length:var(--ads-empty-subtitle-size)] leading-[1.2] text-[var(--ads-text-secondary)]">
|
|
27
|
+
{{ subtitle }}
|
|
28
|
+
</p>
|
|
29
|
+
</div>
|
|
30
|
+
<div v-if="showActions" class="flex flex-col items-center gap-2">
|
|
31
|
+
<slot>
|
|
32
|
+
<AdsButton :label="primaryLabel" :size="small ? 'sm' : 'md'" leading trailing />
|
|
33
|
+
<AdsButton type="unfilled" :label="secondaryLabel" :size="small ? 'sm' : 'md'" leading trailing />
|
|
34
|
+
</slot>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script setup lang="ts">
|
|
40
|
+
import AdsButton from "./AdsButton.vue";
|
|
41
|
+
|
|
42
|
+
withDefaults(
|
|
43
|
+
defineProps<{
|
|
44
|
+
title?: string;
|
|
45
|
+
subtitle?: string;
|
|
46
|
+
/** Figma `Small=Yes`. */
|
|
47
|
+
small?: boolean;
|
|
48
|
+
showActions?: boolean;
|
|
49
|
+
primaryLabel?: string;
|
|
50
|
+
secondaryLabel?: string;
|
|
51
|
+
}>(),
|
|
52
|
+
{
|
|
53
|
+
title: "Título do empty state",
|
|
54
|
+
subtitle: "Coloque aqui um texto explicando e direcionando o usuário. Uso opcional.",
|
|
55
|
+
small: false,
|
|
56
|
+
showActions: true,
|
|
57
|
+
primaryLabel: "Button Test",
|
|
58
|
+
secondaryLabel: "Button Test",
|
|
59
|
+
},
|
|
60
|
+
);
|
|
61
|
+
</script>
|