ads-nuxt 0.4.0 → 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 -575
- 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/component-tokens.css +6 -2
- 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 -22
- 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 -210
- 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 -139
- 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 -216
- 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 -176
- 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/OverlayLoading.vue +2 -17
- 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/theme/component-tokens.json +6 -2
- package/app/theme/component-tokens.ts +6 -2
- package/app/types/overlay-loading.types.ts +32 -35
- package/app/utils/ads-filter-select.ts +191 -191
- package/app/utils/ads-table.ts +416 -398
- 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 -56
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span
|
|
3
|
-
v-if="mini"
|
|
4
|
-
class="inline-block size-[var(--ads-badge-dot)] shrink-0 rounded-full"
|
|
5
|
-
:class="surfaceClass"
|
|
6
|
-
aria-hidden="true"
|
|
7
|
-
/>
|
|
8
|
-
<span
|
|
9
|
-
v-else
|
|
10
|
-
class="inline-flex size-[var(--ads-badge-size)] shrink-0 items-center justify-center overflow-hidden rounded-full px-[5px] py-1 text-[length:var(--ads-badge-font-size)] [font-weight:var(--ads-badge-weight)] leading-[1.2]"
|
|
11
|
-
:class="surfaceClass"
|
|
12
|
-
>
|
|
13
|
-
{{ value }}
|
|
14
|
-
</span>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script setup lang="ts">
|
|
18
|
-
import { computed } from "vue";
|
|
19
|
-
|
|
20
|
-
export type AdsBadgeColor = "primary" | "success" | "attention" | "warning" | "new" | "blocked";
|
|
21
|
-
|
|
22
|
-
const props = withDefaults(
|
|
23
|
-
defineProps<{
|
|
24
|
-
/** Cor do contador. Sem valor: primary no badge e new (#05b4d8) no mini, como no Figma (Context=Secondary). */
|
|
25
|
-
color?: AdsBadgeColor;
|
|
26
|
-
/** Ponto de 8px, sem número. */
|
|
27
|
-
mini?: boolean;
|
|
28
|
-
value?: string | number;
|
|
29
|
-
}>(),
|
|
30
|
-
{
|
|
31
|
-
color: undefined,
|
|
32
|
-
mini: false,
|
|
33
|
-
value: 2,
|
|
34
|
-
},
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
const surfaces: Record<AdsBadgeColor, string> = {
|
|
38
|
-
primary: "bg-[var(--ads-surface-brand)] text-[var(--ads-badge-text)]",
|
|
39
|
-
success: "bg-[var(--ads-status-success-500)] text-[var(--ads-badge-text)]",
|
|
40
|
-
attention: "bg-[var(--ads-status-attention-500)] text-[var(--ads-badge-text)]",
|
|
41
|
-
warning: "bg-[var(--ads-status-warning-500)] text-[var(--ads-badge-text)]",
|
|
42
|
-
new: "bg-[var(--ads-status-new-500)] text-[var(--ads-badge-text)]",
|
|
43
|
-
blocked: "bg-[var(--ads-status-void-800)] text-[var(--ads-badge-text)]",
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const surfaceClass = computed(() => surfaces[props.color ?? (props.mini ? "new" : "primary")]);
|
|
47
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<span
|
|
3
|
+
v-if="mini"
|
|
4
|
+
class="inline-block size-[var(--ads-badge-dot)] shrink-0 rounded-full"
|
|
5
|
+
:class="surfaceClass"
|
|
6
|
+
aria-hidden="true"
|
|
7
|
+
/>
|
|
8
|
+
<span
|
|
9
|
+
v-else
|
|
10
|
+
class="inline-flex size-[var(--ads-badge-size)] shrink-0 items-center justify-center overflow-hidden rounded-full px-[5px] py-1 text-[length:var(--ads-badge-font-size)] [font-weight:var(--ads-badge-weight)] leading-[1.2]"
|
|
11
|
+
:class="surfaceClass"
|
|
12
|
+
>
|
|
13
|
+
{{ value }}
|
|
14
|
+
</span>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script setup lang="ts">
|
|
18
|
+
import { computed } from "vue";
|
|
19
|
+
|
|
20
|
+
export type AdsBadgeColor = "primary" | "success" | "attention" | "warning" | "new" | "blocked";
|
|
21
|
+
|
|
22
|
+
const props = withDefaults(
|
|
23
|
+
defineProps<{
|
|
24
|
+
/** Cor do contador. Sem valor: primary no badge e new (#05b4d8) no mini, como no Figma (Context=Secondary). */
|
|
25
|
+
color?: AdsBadgeColor;
|
|
26
|
+
/** Ponto de 8px, sem número. */
|
|
27
|
+
mini?: boolean;
|
|
28
|
+
value?: string | number;
|
|
29
|
+
}>(),
|
|
30
|
+
{
|
|
31
|
+
color: undefined,
|
|
32
|
+
mini: false,
|
|
33
|
+
value: 2,
|
|
34
|
+
},
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
const surfaces: Record<AdsBadgeColor, string> = {
|
|
38
|
+
primary: "bg-[var(--ads-surface-brand)] text-[var(--ads-badge-text)]",
|
|
39
|
+
success: "bg-[var(--ads-status-success-500)] text-[var(--ads-badge-text)]",
|
|
40
|
+
attention: "bg-[var(--ads-status-attention-500)] text-[var(--ads-badge-text)]",
|
|
41
|
+
warning: "bg-[var(--ads-status-warning-500)] text-[var(--ads-badge-text)]",
|
|
42
|
+
new: "bg-[var(--ads-status-new-500)] text-[var(--ads-badge-text)]",
|
|
43
|
+
blocked: "bg-[var(--ads-status-void-800)] text-[var(--ads-badge-text)]",
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const surfaceClass = computed(() => surfaces[props.color ?? (props.mini ? "new" : "primary")]);
|
|
47
|
+
</script>
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
AdsBroadcast — atalho de compatibilidade. O Broadcast agora é uma variante da Pill:
|
|
3
|
-
prefira <AdsPill variant="broadcast" />.
|
|
4
|
-
-->
|
|
5
|
-
<template>
|
|
6
|
-
<AdsPill variant="broadcast" :status="status" :label="label" />
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script setup lang="ts">
|
|
10
|
-
import AdsPill from "./AdsPill.vue";
|
|
11
|
-
|
|
12
|
-
export type AdsBroadcastStatus = "warning" | "success";
|
|
13
|
-
|
|
14
|
-
withDefaults(
|
|
15
|
-
defineProps<{
|
|
16
|
-
label?: string;
|
|
17
|
-
status?: AdsBroadcastStatus;
|
|
18
|
-
}>(),
|
|
19
|
-
{
|
|
20
|
-
label: "",
|
|
21
|
-
status: "warning",
|
|
22
|
-
},
|
|
23
|
-
);
|
|
24
|
-
</script>
|
|
1
|
+
<!--
|
|
2
|
+
AdsBroadcast — atalho de compatibilidade. O Broadcast agora é uma variante da Pill:
|
|
3
|
+
prefira <AdsPill variant="broadcast" />.
|
|
4
|
+
-->
|
|
5
|
+
<template>
|
|
6
|
+
<AdsPill variant="broadcast" :status="status" :label="label" />
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts">
|
|
10
|
+
import AdsPill from "./AdsPill.vue";
|
|
11
|
+
|
|
12
|
+
export type AdsBroadcastStatus = "warning" | "success";
|
|
13
|
+
|
|
14
|
+
withDefaults(
|
|
15
|
+
defineProps<{
|
|
16
|
+
label?: string;
|
|
17
|
+
status?: AdsBroadcastStatus;
|
|
18
|
+
}>(),
|
|
19
|
+
{
|
|
20
|
+
label: "",
|
|
21
|
+
status: "warning",
|
|
22
|
+
},
|
|
23
|
+
);
|
|
24
|
+
</script>
|