@jcdecor/vue 0.1.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/README.md +68 -0
- package/dist/brand/Brand.d.ts +83 -0
- package/dist/brand/index.d.ts +2 -0
- package/dist/brand/paths.d.ts +43 -0
- package/dist/brand-CeSffe5P.js +320 -0
- package/dist/brand-CeSffe5P.js.map +1 -0
- package/dist/brand.d.ts +1 -0
- package/dist/brand.js +2 -0
- package/dist/charts/ChartCard.d.ts +32 -0
- package/dist/charts/charts.d.ts +124 -0
- package/dist/charts/echartsTheme.d.ts +19 -0
- package/dist/charts/index.d.ts +8 -0
- package/dist/charts/palette.d.ts +59 -0
- package/dist/charts.d.ts +1 -0
- package/dist/charts.js +473 -0
- package/dist/charts.js.map +1 -0
- package/dist/chat/ChatComposer.d.ts +34 -0
- package/dist/chat/ChatLayout.d.ts +53 -0
- package/dist/chat/ChatMessage.d.ts +26 -0
- package/dist/chat/ChatThread.d.ts +36 -0
- package/dist/chat/ConversationList.d.ts +22 -0
- package/dist/chat/TypingIndicator.d.ts +8 -0
- package/dist/chat/index.d.ts +9 -0
- package/dist/chat/node.d.ts +12 -0
- package/dist/chat/types.d.ts +38 -0
- package/dist/chat/utils.d.ts +25 -0
- package/dist/chat.d.ts +1 -0
- package/dist/chat.js +661 -0
- package/dist/chat.js.map +1 -0
- package/dist/colors-DUSEhAuo.js +32 -0
- package/dist/colors-DUSEhAuo.js.map +1 -0
- package/dist/components/ContentCard/ContentCard.d.ts +8 -0
- package/dist/components/ContentCard/ContentCard.types.d.ts +34 -0
- package/dist/components/ContentCard/ContentCard.vue.d.ts +35 -0
- package/dist/components/ContentCard/index.d.ts +1 -0
- package/dist/components/CouponCode/CouponCode.d.ts +20 -0
- package/dist/components/CouponCode/index.d.ts +1 -0
- package/dist/components/DataTable/DataTable.d.ts +95 -0
- package/dist/components/DataTable/index.d.ts +1 -0
- package/dist/components/KpiCard/KpiCard.d.ts +12 -0
- package/dist/components/KpiCard/KpiCard.types.d.ts +44 -0
- package/dist/components/KpiCard/KpiCard.vars.d.ts +3 -0
- package/dist/components/KpiCard/KpiCard.vue.d.ts +42 -0
- package/dist/components/KpiCard/KpiGroup.d.ts +10 -0
- package/dist/components/KpiCard/index.d.ts +1 -0
- package/dist/components/PageHeader/PageHeader.d.ts +29 -0
- package/dist/components/PageHeader/index.d.ts +1 -0
- package/dist/components/PriceTag/PriceTag.d.ts +21 -0
- package/dist/components/PriceTag/index.d.ts +1 -0
- package/dist/components/ProductCard/ProductCard.d.ts +12 -0
- package/dist/components/ProductCard/ProductCard.types.d.ts +53 -0
- package/dist/components/ProductCard/ProductCard.vue.d.ts +45 -0
- package/dist/components/ProductCard/index.d.ts +1 -0
- package/dist/components/PromoBanner/PromoBanner.d.ts +12 -0
- package/dist/components/PromoBanner/PromoBanner.types.d.ts +50 -0
- package/dist/components/PromoBanner/PromoBanner.vars.d.ts +2 -0
- package/dist/components/PromoBanner/PromoBanner.vue.d.ts +41 -0
- package/dist/components/PromoBanner/index.d.ts +1 -0
- package/dist/components/Tag/Tag.d.ts +18 -0
- package/dist/components/Tag/index.d.ts +1 -0
- package/dist/components/ThemeToggle/ThemeToggle.d.ts +10 -0
- package/dist/components/ThemeToggle/index.d.ts +1 -0
- package/dist/components/TokenSwatch/TokenSwatch.d.ts +21 -0
- package/dist/components/TokenSwatch/index.d.ts +1 -0
- package/dist/components/TopNav/TopNav.d.ts +9 -0
- package/dist/components/TopNav/TopNav.types.d.ts +50 -0
- package/dist/components/TopNav/TopNav.vue.d.ts +33 -0
- package/dist/components/TopNav/index.d.ts +1 -0
- package/dist/components/Typography/Typography.d.ts +41 -0
- package/dist/components/Typography/index.d.ts +1 -0
- package/dist/components/index.d.ts +13 -0
- package/dist/format-D40SMATK.js +108 -0
- package/dist/format-D40SMATK.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +2239 -0
- package/dist/index.js.map +1 -0
- package/dist/provider/JcProvider.d.ts +285 -0
- package/dist/styles.css +2 -0
- package/dist/theme/colors.d.ts +26 -0
- package/dist/theme/components/buttons.d.ts +2 -0
- package/dist/theme/components/combobox.d.ts +2 -0
- package/dist/theme/components/dataDisplay.d.ts +2 -0
- package/dist/theme/components/feedback.d.ts +2 -0
- package/dist/theme/components/index.d.ts +3 -0
- package/dist/theme/components/inputs.d.ts +2 -0
- package/dist/theme/components/layout.d.ts +2 -0
- package/dist/theme/components/misc.d.ts +2 -0
- package/dist/theme/components/navigation.d.ts +2 -0
- package/dist/theme/components/overlays.d.ts +2 -0
- package/dist/theme/components/types.d.ts +11 -0
- package/dist/theme/components/typography.d.ts +2 -0
- package/dist/theme/controls.d.ts +44 -0
- package/dist/theme/cssVariablesResolver.d.ts +2 -0
- package/dist/theme/theme.d.ts +3 -0
- package/dist/theme/themeDefaults.d.ts +18 -0
- package/dist/theme/tokens.d.ts +457 -0
- package/dist/theme/variantColorResolver.d.ts +9 -0
- package/dist/themeDefaults-Ckd05FUY.js +29 -0
- package/dist/themeDefaults-Ckd05FUY.js.map +1 -0
- package/dist/tokens-CDSk_JkY.js +315 -0
- package/dist/tokens-CDSk_JkY.js.map +1 -0
- package/dist/tokens.d.ts +2 -0
- package/dist/tokens.js +3 -0
- package/dist/utils/format.d.ts +14 -0
- package/dist/utils/styles-api.d.ts +15 -0
- package/dist/utils/vue.d.ts +27 -0
- package/package.json +109 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { Component, VNodeChild } from 'vue';
|
|
2
|
+
import type { CardProps, Factory, MantineNode } from '@mantine-vue/core';
|
|
3
|
+
import type { JcStylesApiProps } from '../../utils/styles-api';
|
|
4
|
+
import type { PriceTagProps } from '../PriceTag';
|
|
5
|
+
export type ProductCardStylesNames = 'root' | 'media' | 'badges' | 'favorite' | 'category' | 'name' | 'price' | 'action';
|
|
6
|
+
/** Props declaradas pelo próprio ProductCard. As demais (props do Card/Box) vão para o Card raiz. */
|
|
7
|
+
export interface ProductCardOwnProps extends JcStylesApiProps<ProductCardFactory> {
|
|
8
|
+
name: string;
|
|
9
|
+
image: string;
|
|
10
|
+
href?: string;
|
|
11
|
+
category?: string;
|
|
12
|
+
price: number;
|
|
13
|
+
oldPrice?: number;
|
|
14
|
+
installments?: PriceTagProps['installments'];
|
|
15
|
+
pixDiscount?: number;
|
|
16
|
+
unit?: string;
|
|
17
|
+
/** Selos extras (ex.: "Novo", "Frete grátis"). Também aceita o slot `badges` (renderizado depois destes). */
|
|
18
|
+
badges?: MantineNode[];
|
|
19
|
+
/** Mostra selo "-X%" calculado a partir de oldPrice @default true */
|
|
20
|
+
showDiscount?: boolean;
|
|
21
|
+
rating?: number;
|
|
22
|
+
reviews?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Estado do favorito (use `v-model:favorite`). O botão de favoritar aparece quando esta prop é
|
|
25
|
+
* passada ou quando há listener de `update:favorite`.
|
|
26
|
+
*/
|
|
27
|
+
favorite?: boolean;
|
|
28
|
+
/** Texto do CTA, exibido quando há listener de `action` (`@action`) @default 'Comprar' */
|
|
29
|
+
actionLabel?: string;
|
|
30
|
+
/** Proporção da imagem (largura/altura) @default 1 */
|
|
31
|
+
imageRatio?: number;
|
|
32
|
+
/** Componente do link (ex.: `RouterLink` do vue-router) @default 'a' */
|
|
33
|
+
linkComponent?: string | Component;
|
|
34
|
+
}
|
|
35
|
+
export interface ProductCardProps extends Omit<CardProps, keyof ProductCardOwnProps>, ProductCardOwnProps {
|
|
36
|
+
}
|
|
37
|
+
export interface ProductCardSlots {
|
|
38
|
+
/** Selos extras, depois do selo de desconto e da prop `badges` */
|
|
39
|
+
badges?: () => VNodeChild;
|
|
40
|
+
}
|
|
41
|
+
export interface ProductCardEmits {
|
|
42
|
+
/** `v-model:favorite` — clique no coração, com o novo estado */
|
|
43
|
+
'update:favorite': [favorite: boolean];
|
|
44
|
+
/** Clique no CTA. O botão só é renderizado quando há listener (`@action`), como `onAction` no React. */
|
|
45
|
+
action: [event: MouseEvent];
|
|
46
|
+
}
|
|
47
|
+
export type ProductCardFactory = Factory<{
|
|
48
|
+
props: ProductCardProps;
|
|
49
|
+
slots: ProductCardSlots;
|
|
50
|
+
emits: ProductCardEmits;
|
|
51
|
+
ref: HTMLDivElement;
|
|
52
|
+
stylesNames: ProductCardStylesNames;
|
|
53
|
+
}>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ProductCardEmits, ProductCardOwnProps, ProductCardSlots } from './ProductCard.types';
|
|
2
|
+
type __VLS_Slots = ProductCardSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<ProductCardOwnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
|
+
action: (event: MouseEvent) => any;
|
|
5
|
+
"update:favorite": (favorite: boolean) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<ProductCardOwnProps> & Readonly<{
|
|
7
|
+
onAction?: ((event: MouseEvent) => any) | undefined;
|
|
8
|
+
"onUpdate:favorite"?: ((favorite: boolean) => any) | undefined;
|
|
9
|
+
}>, {
|
|
10
|
+
href: string;
|
|
11
|
+
unit: string;
|
|
12
|
+
vars: import("@mantine-vue/core").FactoryPartialVarsResolver<{
|
|
13
|
+
props: import("./ProductCard.types").ProductCardProps;
|
|
14
|
+
slots: ProductCardSlots;
|
|
15
|
+
emits: ProductCardEmits;
|
|
16
|
+
ref: HTMLDivElement;
|
|
17
|
+
stylesNames: import("./ProductCard.types").ProductCardStylesNames;
|
|
18
|
+
} & import("@mantine-vue/core").FactoryPayload>;
|
|
19
|
+
classNames: Partial<Record<"media" | "name" | "root" | "action" | "badges" | "favorite" | "category" | "price", string>> | ((theme: import("@mantine-vue/core").MantineTheme, props: import("./ProductCard.types").ProductCardProps & Record<string, any>, ctx: Record<string, any>) => Partial<Record<"media" | "name" | "root" | "action" | "badges" | "favorite" | "category" | "price", string>>);
|
|
20
|
+
styles: Partial<Record<"media" | "name" | "root" | "action" | "badges" | "favorite" | "category" | "price", import("vue").CSSProperties>> | ((theme: import("@mantine-vue/core").MantineTheme, props: import("./ProductCard.types").ProductCardProps & Record<string, any>, ctx: Record<string, any>) => Partial<Record<"media" | "name" | "root" | "action" | "badges" | "favorite" | "category" | "price", import("vue").CSSProperties>>);
|
|
21
|
+
unstyled: boolean;
|
|
22
|
+
rating: number;
|
|
23
|
+
linkComponent: string | import("vue").Component;
|
|
24
|
+
installments: {
|
|
25
|
+
count: number;
|
|
26
|
+
interestFree?: boolean;
|
|
27
|
+
};
|
|
28
|
+
pixDiscount: number;
|
|
29
|
+
badges: import("@mantine-vue/core").MantineNode[];
|
|
30
|
+
favorite: boolean;
|
|
31
|
+
category: string;
|
|
32
|
+
oldPrice: number;
|
|
33
|
+
showDiscount: boolean;
|
|
34
|
+
reviews: number;
|
|
35
|
+
actionLabel: string;
|
|
36
|
+
imageRatio: number;
|
|
37
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
39
|
+
declare const _default: typeof __VLS_export;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ProductCard';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Banner promocional (topo do site / campanhas). Suporta `v-model:opened`. */
|
|
2
|
+
export declare const PromoBanner: import("@mantine-vue/core").MantineComponent<{
|
|
3
|
+
props: import("./PromoBanner.types").PromoBannerProps;
|
|
4
|
+
slots: import("./PromoBanner.types").PromoBannerSlots;
|
|
5
|
+
emits: import("./PromoBanner.types").PromoBannerEmits;
|
|
6
|
+
ref: HTMLDivElement;
|
|
7
|
+
element: "div";
|
|
8
|
+
stylesNames: import("./PromoBanner.types").PromoBannerStylesNames;
|
|
9
|
+
vars: import("./PromoBanner.types").PromoBannerCssVariables;
|
|
10
|
+
variant: import("./PromoBanner.types").PromoBannerVariant;
|
|
11
|
+
}>;
|
|
12
|
+
export type { PromoBannerCssVariables, PromoBannerEmits, PromoBannerFactory, PromoBannerOwnProps, PromoBannerProps, PromoBannerSlots, PromoBannerStylesNames, PromoBannerVariant, } from './PromoBanner.types';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { VNodeChild } from 'vue';
|
|
2
|
+
import type { BoxProps, Factory, MantineNode, MantineRadius } from '@mantine-vue/core';
|
|
3
|
+
import type { JcStylesApiProps } from '../../utils/styles-api';
|
|
4
|
+
export type PromoBannerVariant = 'horizon' | 'electric' | 'obsidian';
|
|
5
|
+
export type PromoBannerStylesNames = 'root' | 'content' | 'highlight' | 'close';
|
|
6
|
+
export type PromoBannerCssVariables = {
|
|
7
|
+
root: '--banner-bg' | '--banner-color' | '--banner-highlight' | '--banner-radius';
|
|
8
|
+
};
|
|
9
|
+
/** Props declaradas pelo próprio PromoBanner. As demais (style props do Box, atributos) vão para a raiz. */
|
|
10
|
+
export interface PromoBannerOwnProps extends JcStylesApiProps<PromoBannerFactory> {
|
|
11
|
+
/** `horizon` = azul com destaque Electric · `electric` = amarelo com destaque Horizon · `obsidian` @default 'horizon' */
|
|
12
|
+
variant?: PromoBannerVariant;
|
|
13
|
+
/**
|
|
14
|
+
* Trecho destacado ao final (ex.: cupom). Também é possível usar `<strong>` dentro do slot padrão.
|
|
15
|
+
* Também aceita o slot `highlight` (o slot tem prioridade).
|
|
16
|
+
*/
|
|
17
|
+
highlight?: MantineNode;
|
|
18
|
+
/** Ícone/elemento à esquerda do texto. Também aceita o slot `icon` (o slot tem prioridade). */
|
|
19
|
+
icon?: MantineNode;
|
|
20
|
+
/** Exibe botão de fechar; o banner some e emite `close` (e `update:opened` com `false`) */
|
|
21
|
+
withCloseButton?: boolean;
|
|
22
|
+
/** Controle externo da visibilidade (opcional, use `v-model:opened`) */
|
|
23
|
+
opened?: boolean;
|
|
24
|
+
/** Arredonda os cantos (por padrão o banner é full-bleed, sem raio) */
|
|
25
|
+
radius?: MantineRadius;
|
|
26
|
+
}
|
|
27
|
+
export interface PromoBannerProps extends Omit<BoxProps, keyof PromoBannerOwnProps>, PromoBannerOwnProps {
|
|
28
|
+
}
|
|
29
|
+
export interface PromoBannerSlots {
|
|
30
|
+
/** Texto do banner */
|
|
31
|
+
default?: () => VNodeChild;
|
|
32
|
+
highlight?: () => VNodeChild;
|
|
33
|
+
icon?: () => VNodeChild;
|
|
34
|
+
}
|
|
35
|
+
export interface PromoBannerEmits {
|
|
36
|
+
/** Clique no botão de fechar */
|
|
37
|
+
close: [];
|
|
38
|
+
/** `v-model:opened` — emitido com `false` ao fechar */
|
|
39
|
+
'update:opened': [opened: boolean];
|
|
40
|
+
}
|
|
41
|
+
export type PromoBannerFactory = Factory<{
|
|
42
|
+
props: PromoBannerProps;
|
|
43
|
+
slots: PromoBannerSlots;
|
|
44
|
+
emits: PromoBannerEmits;
|
|
45
|
+
ref: HTMLDivElement;
|
|
46
|
+
element: 'div';
|
|
47
|
+
stylesNames: PromoBannerStylesNames;
|
|
48
|
+
vars: PromoBannerCssVariables;
|
|
49
|
+
variant: PromoBannerVariant;
|
|
50
|
+
}>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { PromoBannerEmits, PromoBannerOwnProps, PromoBannerSlots } from './PromoBanner.types';
|
|
2
|
+
type __VLS_Slots = PromoBannerSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<PromoBannerOwnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
|
+
close: () => any;
|
|
5
|
+
"update:opened": (opened: boolean) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<PromoBannerOwnProps> & Readonly<{
|
|
7
|
+
onClose?: (() => any) | undefined;
|
|
8
|
+
"onUpdate:opened"?: ((opened: boolean) => any) | undefined;
|
|
9
|
+
}>, {
|
|
10
|
+
variant: import("./PromoBanner.types").PromoBannerVariant;
|
|
11
|
+
radius: import("@mantine-vue/core").MantineRadius;
|
|
12
|
+
vars: import("@mantine-vue/core").FactoryPartialVarsResolver<{
|
|
13
|
+
props: import("./PromoBanner.types").PromoBannerProps;
|
|
14
|
+
slots: PromoBannerSlots;
|
|
15
|
+
emits: PromoBannerEmits;
|
|
16
|
+
ref: HTMLDivElement;
|
|
17
|
+
element: "div";
|
|
18
|
+
stylesNames: import("./PromoBanner.types").PromoBannerStylesNames;
|
|
19
|
+
vars: import("./PromoBanner.types").PromoBannerCssVariables;
|
|
20
|
+
variant: import("./PromoBanner.types").PromoBannerVariant;
|
|
21
|
+
} & import("@mantine-vue/core").FactoryPayload>;
|
|
22
|
+
icon: string | number | boolean | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}> | import("vue").VNodeArrayChildren | (() => import("vue").VNodeChild) | null;
|
|
25
|
+
classNames: Partial<Record<"content" | "close" | "root" | "highlight", string>> | ((theme: import("@mantine-vue/core").MantineTheme, props: import("./PromoBanner.types").PromoBannerProps & Record<string, any>, ctx: Record<string, any>) => Partial<Record<"content" | "close" | "root" | "highlight", string>>);
|
|
26
|
+
styles: Partial<Record<"content" | "close" | "root" | "highlight", import("vue").CSSProperties>> | ((theme: import("@mantine-vue/core").MantineTheme, props: import("./PromoBanner.types").PromoBannerProps & Record<string, any>, ctx: Record<string, any>) => Partial<Record<"content" | "close" | "root" | "highlight", import("vue").CSSProperties>>);
|
|
27
|
+
unstyled: boolean;
|
|
28
|
+
withCloseButton: boolean;
|
|
29
|
+
opened: boolean;
|
|
30
|
+
highlight: string | number | boolean | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
}> | import("vue").VNodeArrayChildren | (() => import("vue").VNodeChild) | null;
|
|
33
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PromoBanner';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type DefineSetupFnComponent, type SlotsType, type VNodeChild } from 'vue';
|
|
2
|
+
import { type BadgeProps } from '@mantine-vue/core';
|
|
3
|
+
export type TagTone = 'primary' | 'success' | 'warn' | 'error' | 'neutral';
|
|
4
|
+
export interface TagProps extends Omit<BadgeProps, 'color' | 'variant'> {
|
|
5
|
+
/** Tom semântico (ds-tag-*) @default 'primary' */
|
|
6
|
+
tone?: TagTone;
|
|
7
|
+
/** Mostra o ícone padrão do tom (✓ ⚠ ✕ ⓘ). Use o slot/prop `leftSection` para outro ícone. */
|
|
8
|
+
withIcon?: boolean;
|
|
9
|
+
/** `light` = selo suave (padrão) · `filled` = cor sólida · `outline` · `dot` */
|
|
10
|
+
variant?: 'light' | 'filled' | 'outline' | 'dot';
|
|
11
|
+
}
|
|
12
|
+
export interface TagSlots {
|
|
13
|
+
default?: () => VNodeChild;
|
|
14
|
+
leftSection?: () => VNodeChild;
|
|
15
|
+
rightSection?: () => VNodeChild;
|
|
16
|
+
}
|
|
17
|
+
/** Selo / tag de status — preset de Badge com os tons do ds.css. */
|
|
18
|
+
export declare const Tag: DefineSetupFnComponent<TagProps, {}, SlotsType<TagSlots>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tag';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type DefineSetupFnComponent } from 'vue';
|
|
2
|
+
import { type ActionIconProps } from '@mantine-vue/core';
|
|
3
|
+
export interface ThemeToggleProps extends ActionIconProps {
|
|
4
|
+
/** `icon` = ActionIcon · `button` = botão "Alternar tema" (como no DS) @default 'icon' */
|
|
5
|
+
as?: 'icon' | 'button';
|
|
6
|
+
/** @default 'Alternar tema' */
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Alterna entre tema claro e escuro (persistido pelo JcProvider no localStorage). */
|
|
10
|
+
export declare const ThemeToggle: DefineSetupFnComponent<ThemeToggleProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ThemeToggle';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';
|
|
2
|
+
export interface TokenSwatchProps extends Omit<ButtonHTMLAttributes, 'value' | 'name'> {
|
|
3
|
+
name: string;
|
|
4
|
+
/** Cor (hex) exibida e copiada */
|
|
5
|
+
value: string;
|
|
6
|
+
/** Variável CSS correspondente (ex.: --dc-horizon) */
|
|
7
|
+
cssVar?: string;
|
|
8
|
+
/** O que copiar ao clicar @default 'value' */
|
|
9
|
+
copy?: 'value' | 'cssVar';
|
|
10
|
+
}
|
|
11
|
+
/** Amostra de cor clicável (copia hex ou var CSS). */
|
|
12
|
+
export declare const TokenSwatch: DefineSetupFnComponent<TokenSwatchProps>;
|
|
13
|
+
export interface ColorRampProps extends HTMLAttributes {
|
|
14
|
+
steps: {
|
|
15
|
+
label: string;
|
|
16
|
+
value: string;
|
|
17
|
+
derived?: boolean;
|
|
18
|
+
}[];
|
|
19
|
+
}
|
|
20
|
+
/** Rampa de cor horizontal (base → 50). Clique copia o hex. */
|
|
21
|
+
export declare const ColorRamp: DefineSetupFnComponent<ColorRampProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TokenSwatch';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Barra de navegação Obsidian dos painéis (ds-nav). */
|
|
2
|
+
export declare const TopNav: import("@mantine-vue/core").MantineComponent<{
|
|
3
|
+
props: import("./TopNav.types").TopNavProps;
|
|
4
|
+
ref: HTMLDivElement;
|
|
5
|
+
slots: import("./TopNav.types").TopNavSlots;
|
|
6
|
+
element: "div";
|
|
7
|
+
stylesNames: import("./TopNav.types").TopNavStylesNames;
|
|
8
|
+
}>;
|
|
9
|
+
export type { TopNavFactory, TopNavLink, TopNavOwnProps, TopNavProps, TopNavSlots, TopNavStylesNames } from './TopNav.types';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Component, VNodeChild } from 'vue';
|
|
2
|
+
import type { BoxProps, ClassNames, Factory, MantineNode, Styles, Vars } from '@mantine-vue/core';
|
|
3
|
+
export type TopNavStylesNames = 'root' | 'brand' | 'links' | 'link' | 'right' | 'burger' | 'mobileLinks';
|
|
4
|
+
export interface TopNavLink {
|
|
5
|
+
/** Texto (ou conteúdo) do link */
|
|
6
|
+
label: MantineNode;
|
|
7
|
+
/** Destino; sem `href` o item vira `<button type="button">` */
|
|
8
|
+
href?: string;
|
|
9
|
+
/** Marca o link da página atual (`data-active` + `aria-current="page"`) */
|
|
10
|
+
active?: boolean;
|
|
11
|
+
/** Chamado no clique (antes de fechar o menu mobile) */
|
|
12
|
+
onClick?: (event: MouseEvent) => void;
|
|
13
|
+
}
|
|
14
|
+
/** Props declaradas pelo próprio `TopNav`. Veja `TopNavProps` para o tipo público completo. */
|
|
15
|
+
export interface TopNavOwnProps {
|
|
16
|
+
/** Classes por parte (`root`, `brand`, `links`, `link`, `right`, `burger`, `mobileLinks`) */
|
|
17
|
+
classNames?: ClassNames<TopNavFactory>;
|
|
18
|
+
/** Estilos inline por parte */
|
|
19
|
+
styles?: Styles<TopNavFactory>;
|
|
20
|
+
/** Variáveis CSS por parte */
|
|
21
|
+
vars?: Vars<TopNavFactory>;
|
|
22
|
+
/** Remove as classes do TopNav (classNames/styles continuam valendo) @default false */
|
|
23
|
+
unstyled?: boolean;
|
|
24
|
+
/** Marca à esquerda (o slot `brand` tem prioridade) @default <JcLogo variant="dark" :size="28" /> (a barra é navy em ambos os temas) */
|
|
25
|
+
brand?: MantineNode;
|
|
26
|
+
/** Link da marca; `null` renderiza a marca como texto @default '/' */
|
|
27
|
+
brandHref?: string | null;
|
|
28
|
+
links?: TopNavLink[];
|
|
29
|
+
/** Componente usado nos links (ex.: `RouterLink` do vue-router, recebe `to`/`href`) @default 'a' */
|
|
30
|
+
linkComponent?: string | Component;
|
|
31
|
+
/** Conteúdo à direita, ex.: ThemeToggle, avatar (o slot `rightSection` tem prioridade) */
|
|
32
|
+
rightSection?: MantineNode;
|
|
33
|
+
/** Esconde os links em telas pequenas e mostra um hambúrguer @default true */
|
|
34
|
+
collapseOnMobile?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface TopNavProps extends Omit<BoxProps, keyof TopNavOwnProps>, TopNavOwnProps {
|
|
37
|
+
}
|
|
38
|
+
export interface TopNavSlots {
|
|
39
|
+
/** Marca à esquerda (sobrepõe a prop `brand`) */
|
|
40
|
+
brand?: () => VNodeChild;
|
|
41
|
+
/** Conteúdo à direita (sobrepõe a prop `rightSection`) */
|
|
42
|
+
rightSection?: () => VNodeChild;
|
|
43
|
+
}
|
|
44
|
+
export type TopNavFactory = Factory<{
|
|
45
|
+
props: TopNavProps;
|
|
46
|
+
ref: HTMLDivElement;
|
|
47
|
+
slots: TopNavSlots;
|
|
48
|
+
element: 'div';
|
|
49
|
+
stylesNames: TopNavStylesNames;
|
|
50
|
+
}>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type Component, type VNodeChild } from 'vue';
|
|
2
|
+
import type { TopNavLink, TopNavOwnProps, TopNavSlots } from './TopNav.types';
|
|
3
|
+
type __VLS_Slots = TopNavSlots;
|
|
4
|
+
declare const __VLS_base: import("vue").DefineComponent<TopNavOwnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TopNavOwnProps> & Readonly<{}>, {
|
|
5
|
+
links: TopNavLink[];
|
|
6
|
+
vars: import("@mantine-vue/core").FactoryPartialVarsResolver<{
|
|
7
|
+
props: import("./TopNav.types").TopNavProps;
|
|
8
|
+
ref: HTMLDivElement;
|
|
9
|
+
slots: TopNavSlots;
|
|
10
|
+
element: "div";
|
|
11
|
+
stylesNames: import("./TopNav.types").TopNavStylesNames;
|
|
12
|
+
} & import("@mantine-vue/core").FactoryPayload>;
|
|
13
|
+
classNames: Partial<Record<"right" | "link" | "links" | "root" | "burger" | "brand" | "mobileLinks", string>> | ((theme: import("@mantine-vue/core").MantineTheme, props: import("./TopNav.types").TopNavProps & Record<string, any>, ctx: Record<string, any>) => Partial<Record<"right" | "link" | "links" | "root" | "burger" | "brand" | "mobileLinks", string>>);
|
|
14
|
+
styles: Partial<Record<"right" | "link" | "links" | "root" | "burger" | "brand" | "mobileLinks", import("vue").CSSProperties>> | ((theme: import("@mantine-vue/core").MantineTheme, props: import("./TopNav.types").TopNavProps & Record<string, any>, ctx: Record<string, any>) => Partial<Record<"right" | "link" | "links" | "root" | "burger" | "brand" | "mobileLinks", import("vue").CSSProperties>>);
|
|
15
|
+
unstyled: boolean;
|
|
16
|
+
rightSection: string | number | boolean | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}> | import("vue").VNodeArrayChildren | (() => VNodeChild) | null;
|
|
19
|
+
linkComponent: string | Component;
|
|
20
|
+
brand: string | number | boolean | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}> | import("vue").VNodeArrayChildren | (() => VNodeChild) | null;
|
|
23
|
+
brandHref: string | null;
|
|
24
|
+
collapseOnMobile: boolean;
|
|
25
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TopNav';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type DefineSetupFnComponent, type SlotsType, type VNodeChild } from 'vue';
|
|
2
|
+
import { type MantineElementType, type TextProps } from '@mantine-vue/core';
|
|
3
|
+
type Scale = 'lg' | 'md' | 'sm';
|
|
4
|
+
type TextSlots = SlotsType<{
|
|
5
|
+
default?: () => VNodeChild;
|
|
6
|
+
}>;
|
|
7
|
+
export interface DisplayProps extends Omit<TextProps, 'size'> {
|
|
8
|
+
/** display-large · display-medium · display-small @default 'sm' */
|
|
9
|
+
size?: Scale;
|
|
10
|
+
}
|
|
11
|
+
/** Títulos de impacto (hero, landing). Bold, tracking levemente negativo. */
|
|
12
|
+
export declare const Display: DefineSetupFnComponent<DisplayProps & {
|
|
13
|
+
component?: MantineElementType;
|
|
14
|
+
}, {}, TextSlots>;
|
|
15
|
+
export interface HeadlineProps extends Omit<TextProps, 'size'> {
|
|
16
|
+
/** headline-large (Bold) · headline-medium · headline-small (SemiBold) @default 'md' */
|
|
17
|
+
size?: Scale;
|
|
18
|
+
}
|
|
19
|
+
/** Títulos de seção e de cards. */
|
|
20
|
+
export declare const Headline: DefineSetupFnComponent<HeadlineProps & {
|
|
21
|
+
component?: MantineElementType;
|
|
22
|
+
}, {}, TextSlots>;
|
|
23
|
+
export interface SubheadlineProps extends Omit<TextProps, 'size'> {
|
|
24
|
+
/** subheadline-large (Medium) · regular · small @default 'md' */
|
|
25
|
+
size?: Scale;
|
|
26
|
+
}
|
|
27
|
+
/** Texto de apoio / corpo. */
|
|
28
|
+
export declare const Subheadline: DefineSetupFnComponent<SubheadlineProps & {
|
|
29
|
+
component?: MantineElementType;
|
|
30
|
+
}, {}, TextSlots>;
|
|
31
|
+
export type DisclaimerProps = Omit<TextProps, 'size'>;
|
|
32
|
+
/** Microcopy para notas, orientação e suporte legal (12px Medium, texto-3). */
|
|
33
|
+
export declare const Disclaimer: DefineSetupFnComponent<DisclaimerProps & {
|
|
34
|
+
component?: MantineElementType;
|
|
35
|
+
}, {}, TextSlots>;
|
|
36
|
+
export type KickerProps = Omit<TextProps, 'size'>;
|
|
37
|
+
/** Sobretítulo em caixa-alta na cor primária (ex.: "JC Decor · DS"). Caixa-alta pede tracking positivo. */
|
|
38
|
+
export declare const Kicker: DefineSetupFnComponent<KickerProps & {
|
|
39
|
+
component?: MantineElementType;
|
|
40
|
+
}, {}, TextSlots>;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Typography';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './Typography';
|
|
2
|
+
export * from './Tag';
|
|
3
|
+
export * from './PromoBanner';
|
|
4
|
+
export * from './ContentCard';
|
|
5
|
+
export * from './KpiCard';
|
|
6
|
+
export * from './PageHeader';
|
|
7
|
+
export * from './DataTable';
|
|
8
|
+
export * from './ThemeToggle';
|
|
9
|
+
export * from './TokenSwatch';
|
|
10
|
+
export * from './PriceTag';
|
|
11
|
+
export * from './ProductCard';
|
|
12
|
+
export * from './CouponCode';
|
|
13
|
+
export * from './TopNav';
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { p as e } from "./tokens-CDSk_JkY.js";
|
|
2
|
+
import { Text as t } from "@mantine-vue/core";
|
|
3
|
+
import { defineComponent as n, h as r } from "vue";
|
|
4
|
+
//#region src/components/Typography/Typography.ts
|
|
5
|
+
function i(t) {
|
|
6
|
+
let n = e[t];
|
|
7
|
+
return {
|
|
8
|
+
fz: n.size,
|
|
9
|
+
fw: n.weight,
|
|
10
|
+
lh: n.lineHeight,
|
|
11
|
+
lts: n.letterSpacing === "0" ? void 0 : n.letterSpacing
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function a(e, i, a) {
|
|
15
|
+
return n({
|
|
16
|
+
name: e,
|
|
17
|
+
inheritAttrs: !1,
|
|
18
|
+
props: {
|
|
19
|
+
size: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: void 0
|
|
22
|
+
},
|
|
23
|
+
component: {
|
|
24
|
+
type: [
|
|
25
|
+
String,
|
|
26
|
+
Object,
|
|
27
|
+
Function
|
|
28
|
+
],
|
|
29
|
+
default: void 0
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
setup(e, { attrs: n, slots: o }) {
|
|
33
|
+
return () => r(t, {
|
|
34
|
+
component: e.component ?? i,
|
|
35
|
+
m: 0,
|
|
36
|
+
...a(e.size, e.component),
|
|
37
|
+
...n
|
|
38
|
+
}, o);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
var o = {
|
|
43
|
+
lg: "displayLg",
|
|
44
|
+
md: "displayMd",
|
|
45
|
+
sm: "displaySm"
|
|
46
|
+
}, s = a("Display", "h1", (e = "sm") => i(o[e])), c = {
|
|
47
|
+
lg: "headlineLg",
|
|
48
|
+
md: "headlineMd",
|
|
49
|
+
sm: "headlineSm"
|
|
50
|
+
}, l = {
|
|
51
|
+
lg: "h2",
|
|
52
|
+
md: "h3",
|
|
53
|
+
sm: "h4"
|
|
54
|
+
}, u = a("Headline", "h3", (e = "md", t) => ({
|
|
55
|
+
...i(c[e]),
|
|
56
|
+
component: t ?? l[e]
|
|
57
|
+
})), d = {
|
|
58
|
+
lg: "subheadlineLg",
|
|
59
|
+
md: "subheadlineRg",
|
|
60
|
+
sm: "subheadlineSm"
|
|
61
|
+
}, f = a("Subheadline", "p", (e = "md") => i(d[e])), p = a("Disclaimer", "p", () => ({
|
|
62
|
+
c: "var(--ds-text-3)",
|
|
63
|
+
...i("disclaimer")
|
|
64
|
+
})), m = a("Kicker", "div", () => ({
|
|
65
|
+
fz: 12,
|
|
66
|
+
fw: 600,
|
|
67
|
+
lh: 1.33,
|
|
68
|
+
tt: "uppercase",
|
|
69
|
+
lts: "0.06em",
|
|
70
|
+
c: "var(--ds-primary)",
|
|
71
|
+
m: void 0
|
|
72
|
+
})), h = "pt-BR";
|
|
73
|
+
function g(e, t) {
|
|
74
|
+
return new Intl.NumberFormat(h, t).format(e);
|
|
75
|
+
}
|
|
76
|
+
function _(e, t) {
|
|
77
|
+
return new Intl.NumberFormat(h, {
|
|
78
|
+
style: "currency",
|
|
79
|
+
currency: "BRL",
|
|
80
|
+
...t
|
|
81
|
+
}).format(e);
|
|
82
|
+
}
|
|
83
|
+
function v(e, { digits: t = 1, signed: n = !1 } = {}) {
|
|
84
|
+
return `${new Intl.NumberFormat(h, {
|
|
85
|
+
minimumFractionDigits: t,
|
|
86
|
+
maximumFractionDigits: t,
|
|
87
|
+
signDisplay: n ? "exceptZero" : "auto"
|
|
88
|
+
}).format(e)}%`;
|
|
89
|
+
}
|
|
90
|
+
function y(e) {
|
|
91
|
+
return new Intl.NumberFormat(h, {
|
|
92
|
+
notation: "compact",
|
|
93
|
+
maximumFractionDigits: 1
|
|
94
|
+
}).format(e);
|
|
95
|
+
}
|
|
96
|
+
function b(e, t = { dateStyle: "short" }) {
|
|
97
|
+
return new Intl.DateTimeFormat(h, t).format(new Date(e));
|
|
98
|
+
}
|
|
99
|
+
function x(e) {
|
|
100
|
+
return new Intl.DateTimeFormat(h, {
|
|
101
|
+
hour: "2-digit",
|
|
102
|
+
minute: "2-digit"
|
|
103
|
+
}).format(new Date(e));
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
export { g as a, p as c, m as d, f, b as i, s as l, y as n, v as o, _ as r, x as s, h as t, u };
|
|
107
|
+
|
|
108
|
+
//# sourceMappingURL=format-D40SMATK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-D40SMATK.js","names":["typography","scaleProps","t","token","createTextPreset","defineComponent","h","Text","props","defaultComponent","getDefaults","attrs","slots","displayToken","Display","size","headlineToken","headlineTag","Headline","component","subToken","Subheadline","Disclaimer","Kicker","LOCALE","formatNumber","options","value","formatCurrency","formatPercent","digits","signed","formatCompact","formatDate","formatTime"],"sources":["../src/components/Typography/Typography.ts","../src/utils/format.ts"],"sourcesContent":["import { defineComponent, h, type DefineSetupFnComponent, type PropType, type SlotsType, type VNodeChild } from 'vue';\nimport { Text, type MantineElementType, type TextProps } from '@mantine-vue/core';\nimport { typography, type TypographyToken } from '../../theme/tokens';\n\ntype Scale = 'lg' | 'md' | 'sm';\ntype TextSlots = SlotsType<{ default?: () => VNodeChild }>;\n\nfunction scaleProps(token: TypographyToken) {\n const t = typography[token];\n return { fz: t.size, fw: t.weight, lh: t.lineHeight, lts: t.letterSpacing === '0' ? undefined : t.letterSpacing };\n}\n\n/**\n * Preset de `Text` com a escala tipográfica do DS. Atributos e props do Text passados pelo usuário\n * (`c`, `mt`, `component`…) vêm por último e sobrepõem os padrões, como no @jcdecor/ui.\n */\nfunction createTextPreset<P>(\n name: string,\n defaultComponent: string,\n getDefaults: (size: Scale | undefined, component: MantineElementType | undefined) => Record<string, unknown>,\n) {\n return defineComponent({\n name,\n inheritAttrs: false,\n props: {\n size: { type: String as PropType<Scale>, default: undefined },\n component: { type: [String, Object, Function] as PropType<MantineElementType>, default: undefined },\n },\n setup(props, { attrs, slots }) {\n return () =>\n h(\n Text as any,\n { component: props.component ?? defaultComponent, m: 0, ...getDefaults(props.size, props.component), ...attrs },\n slots,\n );\n },\n }) as unknown as DefineSetupFnComponent<P & { component?: MantineElementType }, {}, TextSlots>;\n}\n\nexport interface DisplayProps extends Omit<TextProps, 'size'> {\n /** display-large · display-medium · display-small @default 'sm' */\n size?: Scale;\n}\n\nconst displayToken: Record<Scale, TypographyToken> = { lg: 'displayLg', md: 'displayMd', sm: 'displaySm' };\n\n/** Títulos de impacto (hero, landing). Bold, tracking levemente negativo. */\nexport const Display = createTextPreset<DisplayProps>('Display', 'h1', (size = 'sm') => scaleProps(displayToken[size]));\n\nexport interface HeadlineProps extends Omit<TextProps, 'size'> {\n /** headline-large (Bold) · headline-medium · headline-small (SemiBold) @default 'md' */\n size?: Scale;\n}\n\nconst headlineToken: Record<Scale, TypographyToken> = { lg: 'headlineLg', md: 'headlineMd', sm: 'headlineSm' };\nconst headlineTag: Record<Scale, string> = { lg: 'h2', md: 'h3', sm: 'h4' };\n\n/** Títulos de seção e de cards. */\nexport const Headline = createTextPreset<HeadlineProps>('Headline', 'h3', (size = 'md', component) => ({\n ...scaleProps(headlineToken[size]),\n component: component ?? headlineTag[size],\n}));\n\nexport interface SubheadlineProps extends Omit<TextProps, 'size'> {\n /** subheadline-large (Medium) · regular · small @default 'md' */\n size?: Scale;\n}\n\nconst subToken: Record<Scale, TypographyToken> = { lg: 'subheadlineLg', md: 'subheadlineRg', sm: 'subheadlineSm' };\n\n/** Texto de apoio / corpo. */\nexport const Subheadline = createTextPreset<SubheadlineProps>('Subheadline', 'p', (size = 'md') => scaleProps(subToken[size]));\n\nexport type DisclaimerProps = Omit<TextProps, 'size'>;\n\n/** Microcopy para notas, orientação e suporte legal (12px Medium, texto-3). */\nexport const Disclaimer = createTextPreset<DisclaimerProps>('Disclaimer', 'p', () => ({\n c: 'var(--ds-text-3)',\n ...scaleProps('disclaimer'),\n}));\n\nexport type KickerProps = Omit<TextProps, 'size'>;\n\n/** Sobretítulo em caixa-alta na cor primária (ex.: \"JC Decor · DS\"). Caixa-alta pede tracking positivo. */\nexport const Kicker = createTextPreset<KickerProps>('Kicker', 'div', () => ({\n fz: 12,\n fw: 600,\n lh: 1.33,\n tt: 'uppercase',\n lts: '0.06em',\n c: 'var(--ds-primary)',\n m: undefined,\n}));\n","// @generated sincronizado de packages/ui/src/utils/format.ts — edite lá e rode `npm run sync -w @jcdecor/vue`\n/** Formatação pt-BR usada pelos componentes (KPIs, tabelas, preços, gráficos). */\n\nexport const LOCALE = 'pt-BR';\n\nexport function formatNumber(value: number, options?: Intl.NumberFormatOptions) {\n return new Intl.NumberFormat(LOCALE, options).format(value);\n}\n\n/** 1234.5 → \"R$ 1.234,50\" */\nexport function formatCurrency(value: number, options?: Intl.NumberFormatOptions) {\n return new Intl.NumberFormat(LOCALE, { style: 'currency', currency: 'BRL', ...options }).format(value);\n}\n\n/** -5.6 → \"-5,6%\" (recebe valor em pontos percentuais). `signed` adiciona \"+\" em positivos. */\nexport function formatPercent(value: number, { digits = 1, signed = false } = {}) {\n const formatted = new Intl.NumberFormat(LOCALE, {\n minimumFractionDigits: digits,\n maximumFractionDigits: digits,\n signDisplay: signed ? 'exceptZero' : 'auto',\n }).format(value);\n return `${formatted}%`;\n}\n\n/** 54959 → \"55 mil\" */\nexport function formatCompact(value: number) {\n return new Intl.NumberFormat(LOCALE, { notation: 'compact', maximumFractionDigits: 1 }).format(value);\n}\n\nexport function formatDate(value: Date | string | number, options: Intl.DateTimeFormatOptions = { dateStyle: 'short' }) {\n return new Intl.DateTimeFormat(LOCALE, options).format(new Date(value));\n}\n\nexport function formatTime(value: Date | string | number) {\n return new Intl.DateTimeFormat(LOCALE, { hour: '2-digit', minute: '2-digit' }).format(new Date(value));\n}\n"],"mappings":";;;;AAOA,SAASC,EAAW,GAAwB;CAC1C,IAAMC,IAAIF,EAAWG;CACrB,OAAO;EAAE,IAAID,EAAE;EAAM,IAAIA,EAAE;EAAQ,IAAIA,EAAE;EAAY,KAAKA,EAAE,kBAAkB,MAAM,KAAA,IAAYA,EAAE;CAAc;AAClH;AAMA,SAASE,EACP,GACA,GACA,GACA;CACA,OAAOC,EAAgB;EACrB;EACA,cAAc;EACd,OAAO;GACL,MAAM;IAAE,MAAM;IAA2B,SAAS,KAAA;GAAU;GAC5D,WAAW;IAAE,MAAM;KAAC;KAAQ;KAAQ;IAAQ;IAAmC,SAAS,KAAA;GAAU;EACpG;EACA,MAAM,GAAO,EAAE,UAAO,YAAS;GAC7B,aACEC,EACEC,GACA;IAAE,WAAWC,EAAM,aAAaC;IAAkB,GAAG;IAAG,GAAGC,EAAYF,EAAM,MAAMA,EAAM,SAAS;IAAG,GAAGG;GAAM,GAC9GC,CACF;EACJ;CACF,CAAC;AACH;AAOA,IAAMC,IAA+C;CAAE,IAAI;CAAa,IAAI;CAAa,IAAI;AAAY,GAG5FC,IAAUV,EAA+B,WAAW,OAAO,IAAO,SAASH,EAAWY,EAAaE,EAAK,CAAC,GAOhHC,IAAgD;CAAE,IAAI;CAAc,IAAI;CAAc,IAAI;AAAa,GACvGC,IAAqC;CAAE,IAAI;CAAM,IAAI;CAAM,IAAI;AAAK,GAG7DC,IAAWd,EAAgC,YAAY,OAAO,IAAO,MAAM,OAAe;CACrG,GAAGH,EAAWe,EAAcD,EAAK;CACjC,WAAWI,KAAaF,EAAYF;AACtC,EAAE,GAOIK,IAA2C;CAAE,IAAI;CAAiB,IAAI;CAAiB,IAAI;AAAgB,GAGpGC,IAAcjB,EAAmC,eAAe,MAAM,IAAO,SAASH,EAAWmB,EAASL,EAAK,CAAC,GAKhHO,IAAalB,EAAkC,cAAc,YAAY;CACpF,GAAG;CACH,GAAGH,EAAW,YAAY;AAC5B,EAAE,GAKWsB,IAASnB,EAA8B,UAAU,cAAc;CAC1E,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,KAAK;CACL,GAAG;CACH,GAAG,KAAA;AACL,EAAE,GCzFWoB,IAAS;AAEtB,SAAgBC,EAAa,GAAe,GAAoC;CAC9E,OAAO,IAAI,KAAK,aAAaD,GAAQE,CAAO,CAAC,CAAC,OAAOC,CAAK;AAC5D;AAGA,SAAgBC,EAAe,GAAe,GAAoC;CAChF,OAAO,IAAI,KAAK,aAAaJ,GAAQ;EAAE,OAAO;EAAY,UAAU;EAAO,GAAGE;CAAQ,CAAC,CAAC,CAAC,OAAOC,CAAK;AACvG;AAGA,SAAgBE,EAAc,GAAe,EAAE,YAAS,GAAG,YAAS,OAAU,CAAC,GAAG;CAMhF,OAAO,GALW,IAAI,KAAK,aAAaL,GAAQ;EAC9C,uBAAuBM;EACvB,uBAAuBA;EACvB,aAAaC,IAAS,eAAe;CACvC,CAAC,CAAC,CAAC,OAAOJ,CACA,EAAU;AACtB;AAGA,SAAgBK,EAAc,GAAe;CAC3C,OAAO,IAAI,KAAK,aAAaR,GAAQ;EAAE,UAAU;EAAW,uBAAuB;CAAE,CAAC,CAAC,CAAC,OAAOG,CAAK;AACtG;AAEA,SAAgBM,EAAW,GAA+B,IAAsC,EAAE,WAAW,QAAQ,GAAG;CACtH,OAAO,IAAI,KAAK,eAAeT,GAAQE,CAAO,CAAC,CAAC,OAAO,IAAI,KAAKC,CAAK,CAAC;AACxE;AAEA,SAAgBO,EAAW,GAA+B;CACxD,OAAO,IAAI,KAAK,eAAeV,GAAQ;EAAE,MAAM;EAAW,QAAQ;CAAU,CAAC,CAAC,CAAC,OAAO,IAAI,KAAKG,CAAK,CAAC;AACvG"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import './styles/global.css';
|
|
2
|
+
export * from '@mantine-vue/core';
|
|
3
|
+
export { Card, Cascader, CheckboxIndicator, Combobox, FileInput, FloatingWindow, NumberFormatter, NumberInput, PillsInput, Table, Tooltip, withThemeDefaults, } from './theme/themeDefaults';
|
|
4
|
+
export { jcTheme } from './theme/theme';
|
|
5
|
+
export { jcCssVariablesResolver } from './theme/cssVariablesResolver';
|
|
6
|
+
export { jcVariantColorResolver } from './theme/variantColorResolver';
|
|
7
|
+
export { jcColors } from './theme/colors';
|
|
8
|
+
export type { JcColor } from './theme/colors';
|
|
9
|
+
export { tokens } from './theme/tokens';
|
|
10
|
+
export { JcProvider, COLOR_SCHEME_STORAGE_KEY } from './provider/JcProvider';
|
|
11
|
+
export type { JcProviderProps } from './provider/JcProvider';
|
|
12
|
+
export * from './components';
|
|
13
|
+
export * from './brand';
|
|
14
|
+
export * from './utils/format';
|
|
15
|
+
export { formatNumber } from './utils/format';
|