@wgalleti/primevue-components 1.3.0 → 1.4.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 +1 -0
- package/dist/components/charts/WChart.vue.d.ts +12 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/ui/WKanbanBoard.vue.d.ts +2 -2
- package/dist/components/ui/WKpiCard.vue.d.ts +27 -7
- package/dist/components/ui/WKpiGrid.vue.d.ts +15 -2
- package/dist/components/ui/WMeter.vue.d.ts +49 -0
- package/dist/components-BRNk60nY.cjs +25 -0
- package/dist/components-BRNk60nY.cjs.map +1 -0
- package/dist/{components-BHHLGp-P.js → components-DsMEndfN.js} +1809 -1577
- package/dist/components-DsMEndfN.js.map +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.js +2 -2
- package/dist/composables/useFormatters.d.ts +2 -0
- package/dist/{composables-DEPrDTmn.js → composables-B9ywPF1T.js} +89 -81
- package/dist/{composables-DEPrDTmn.js.map → composables-B9ywPF1T.js.map} +1 -1
- package/dist/{composables-COb8tdOP.cjs → composables-BpUFAr7n.cjs} +2 -2
- package/dist/{composables-COb8tdOP.cjs.map → composables-BpUFAr7n.cjs.map} +1 -1
- package/dist/composables.cjs +1 -1
- package/dist/composables.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +39 -39
- package/dist/index.js.map +1 -1
- package/dist/primevue-components.css +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/kpi.d.ts +13 -1
- package/dist/{useFormKeyboardNav-CzKY9ZV2.cjs → useFormKeyboardNav-BTGDH0gB.cjs} +3 -3
- package/dist/useFormKeyboardNav-BTGDH0gB.cjs.map +1 -0
- package/dist/{useFormKeyboardNav-DuxPdAeK.js → useFormKeyboardNav-TqhfyJIg.js} +47 -28
- package/dist/useFormKeyboardNav-TqhfyJIg.js.map +1 -0
- package/dist/utils/chart.d.ts +26 -0
- package/dist/utils/interactiveCard.d.ts +24 -0
- package/dist/utils/meter.d.ts +15 -0
- package/dist/utils/sparkline.d.ts +15 -0
- package/package.json +1 -1
- package/skill/references/components.md +1 -1
- package/dist/components-BHHLGp-P.js.map +0 -1
- package/dist/components-Ml8IKELa.cjs +0 -25
- package/dist/components-Ml8IKELa.cjs.map +0 -1
- package/dist/useFormKeyboardNav-CzKY9ZV2.cjs.map +0 -1
- package/dist/useFormKeyboardNav-DuxPdAeK.js.map +0 -1
package/README.md
CHANGED
|
@@ -225,6 +225,7 @@ Veja [WFormRenderer](./docs/components/w-form-renderer.md) para exemplos complet
|
|
|
225
225
|
- [WActionBar](./docs/components/w-action-bar.md)
|
|
226
226
|
- [WKpiCard](./docs/components/w-kpi-card.md)
|
|
227
227
|
- [WKpiGrid](./docs/components/w-kpi-grid.md)
|
|
228
|
+
- [WMeter](./docs/components/w-meter.md)
|
|
228
229
|
- [WProgressFlow](./docs/components/w-progress-flow.md)
|
|
229
230
|
- [WStepFlow / WStepSection](./docs/components/w-step-flow.md)
|
|
230
231
|
- [WEditableTable](./docs/components/w-editable-table.md)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WChartOption } from '../../utils/chart';
|
|
1
|
+
import { ChartSelectEvent, WChartOption } from '../../utils/chart';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
/** Option do ECharts — série, eixos, tooltip etc. */
|
|
4
4
|
option: WChartOption;
|
|
@@ -13,6 +13,11 @@ type __VLS_Props = {
|
|
|
13
13
|
print?: boolean;
|
|
14
14
|
/** Altura CSS do gráfico (default: token `--chart-h`, senão 18rem). */
|
|
15
15
|
height?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Item de dado clicável: cursor de mão, realce do item sob o mouse e o
|
|
18
|
+
* evento `select` no clique. Desligado, o gráfico não emite nada.
|
|
19
|
+
*/
|
|
20
|
+
clickable?: boolean;
|
|
16
21
|
};
|
|
17
22
|
declare var __VLS_1: {}, __VLS_3: {};
|
|
18
23
|
type __VLS_Slots = {} & {
|
|
@@ -20,13 +25,18 @@ type __VLS_Slots = {} & {
|
|
|
20
25
|
} & {
|
|
21
26
|
unavailable?: (props: typeof __VLS_3) => any;
|
|
22
27
|
};
|
|
23
|
-
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
28
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
|
+
select: (event: ChartSelectEvent) => any;
|
|
30
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
+
onSelect?: ((event: ChartSelectEvent) => any) | undefined;
|
|
32
|
+
}>, {
|
|
24
33
|
emptyMessage: string;
|
|
25
34
|
loading: boolean;
|
|
26
35
|
height: string;
|
|
27
36
|
empty: boolean;
|
|
28
37
|
print: boolean;
|
|
29
38
|
renderer: "canvas" | "svg";
|
|
39
|
+
clickable: boolean;
|
|
30
40
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
31
41
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
42
|
declare const _default: typeof __VLS_export;
|
|
@@ -20,6 +20,7 @@ export { default as WDetailHeader } from './ui/WDetailHeader.vue';
|
|
|
20
20
|
export { default as WInfoCard } from './ui/WInfoCard.vue';
|
|
21
21
|
export { default as WKpiCard } from './ui/WKpiCard.vue';
|
|
22
22
|
export { default as WKpiGrid } from './ui/WKpiGrid.vue';
|
|
23
|
+
export { default as WMeter } from './ui/WMeter.vue';
|
|
23
24
|
export { default as WSectionAccordion } from './ui/WSectionAccordion.vue';
|
|
24
25
|
export { default as WSectionHeader } from './ui/WSectionHeader.vue';
|
|
25
26
|
export { default as WSectionPanel } from './ui/WSectionPanel.vue';
|
|
@@ -41,11 +41,11 @@ type __VLS_Slots = {
|
|
|
41
41
|
}): unknown;
|
|
42
42
|
};
|
|
43
43
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
44
|
-
move: (event: KanbanMoveEvent<Record<string, unknown>>) => any;
|
|
45
44
|
"item-click": (item: Item) => any;
|
|
45
|
+
move: (event: KanbanMoveEvent<Record<string, unknown>>) => any;
|
|
46
46
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
47
|
-
onMove?: ((event: KanbanMoveEvent<Record<string, unknown>>) => any) | undefined;
|
|
48
47
|
"onItem-click"?: ((item: Item) => any) | undefined;
|
|
48
|
+
onMove?: ((event: KanbanMoveEvent<Record<string, unknown>>) => any) | undefined;
|
|
49
49
|
}>, {
|
|
50
50
|
loading: boolean;
|
|
51
51
|
minHeight: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RouteLocationRaw } from 'vue-router';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
label: string;
|
|
3
4
|
value: string | number;
|
|
@@ -9,20 +10,39 @@ type __VLS_Props = {
|
|
|
9
10
|
direction?: 'up' | 'down' | 'neutral';
|
|
10
11
|
};
|
|
11
12
|
loading?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Destino ao clicar: o card vira um RouterLink (exige vue-router instalado).
|
|
15
|
+
* Sem `to`, um listener de `@click` torna o card um botão de teclado.
|
|
16
|
+
*/
|
|
17
|
+
to?: RouteLocationRaw;
|
|
18
|
+
/**
|
|
19
|
+
* Série da sparkline (ordem cronológica). Desenhada na cor da severidade,
|
|
20
|
+
* decorativa (aria-hidden) — o número que importa é o `value`. Pontos
|
|
21
|
+
* NaN/null são descartados.
|
|
22
|
+
*/
|
|
23
|
+
spark?: number[];
|
|
24
|
+
/** `compact`: menos respiro, ícone menor ao lado do rótulo, valor menor. */
|
|
25
|
+
size?: 'default' | 'compact';
|
|
12
26
|
};
|
|
13
|
-
declare var
|
|
27
|
+
declare var __VLS_28: {}, __VLS_30: {}, __VLS_32: {}, __VLS_34: {}, __VLS_36: {};
|
|
14
28
|
type __VLS_Slots = {} & {
|
|
15
|
-
icon?: (props: typeof
|
|
29
|
+
icon?: (props: typeof __VLS_28) => any;
|
|
16
30
|
} & {
|
|
17
|
-
trend?: (props: typeof
|
|
31
|
+
trend?: (props: typeof __VLS_30) => any;
|
|
18
32
|
} & {
|
|
19
|
-
value?: (props: typeof
|
|
33
|
+
value?: (props: typeof __VLS_32) => any;
|
|
20
34
|
} & {
|
|
21
|
-
hint?: (props: typeof
|
|
35
|
+
hint?: (props: typeof __VLS_34) => any;
|
|
22
36
|
} & {
|
|
23
|
-
footer?: (props: typeof
|
|
37
|
+
footer?: (props: typeof __VLS_36) => any;
|
|
24
38
|
};
|
|
25
|
-
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
39
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
40
|
+
click: (event: KeyboardEvent | MouseEvent) => any;
|
|
41
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
42
|
+
onClick?: ((event: KeyboardEvent | MouseEvent) => any) | undefined;
|
|
43
|
+
}>, {
|
|
44
|
+
size: "default" | "compact";
|
|
45
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
26
46
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
47
|
declare const _default: typeof __VLS_export;
|
|
28
48
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KpiItem } from '../../types/kpi';
|
|
1
|
+
import { KpiItem, KpiItemClickEvent } from '../../types/kpi';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
items?: KpiItem[];
|
|
4
4
|
/**
|
|
@@ -7,7 +7,16 @@ type __VLS_Props = {
|
|
|
7
7
|
* aproveitar o máximo da tela.
|
|
8
8
|
*/
|
|
9
9
|
columns?: 2 | 3 | 4 | 5 | 6 | 'auto';
|
|
10
|
+
/**
|
|
11
|
+
* Grade densa: vão menor entre os cards e, sem `size` na grade nem no
|
|
12
|
+
* item, cards no tamanho `compact`.
|
|
13
|
+
*/
|
|
10
14
|
dense?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Tamanho de todos os cards. Precedência: `item.size` → `size` da grade →
|
|
17
|
+
* `dense` (compact) → default.
|
|
18
|
+
*/
|
|
19
|
+
size?: 'default' | 'compact';
|
|
11
20
|
};
|
|
12
21
|
declare var __VLS_1: {
|
|
13
22
|
key: number;
|
|
@@ -17,7 +26,11 @@ declare var __VLS_1: {
|
|
|
17
26
|
type __VLS_Slots = {} & {
|
|
18
27
|
item?: (props: typeof __VLS_1) => any;
|
|
19
28
|
};
|
|
20
|
-
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
30
|
+
"item-click": (event: KpiItemClickEvent) => any;
|
|
31
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
32
|
+
"onItem-click"?: ((event: KpiItemClickEvent) => any) | undefined;
|
|
33
|
+
}>, {
|
|
21
34
|
columns: 2 | 3 | 4 | 5 | 6 | "auto";
|
|
22
35
|
items: KpiItem[];
|
|
23
36
|
dense: boolean;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { RouteLocationRaw } from 'vue-router';
|
|
2
|
+
import { MeterSeverity } from '../../utils/meter';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
label: string;
|
|
5
|
+
/** Realizado até agora. */
|
|
6
|
+
value: number;
|
|
7
|
+
/** Meta do período. `null`/0: sem barra, só o valor e "sem meta". */
|
|
8
|
+
goal?: number | null;
|
|
9
|
+
/** Ritmo: onde o valor deveria estar hoje. Vira o marcador na barra. */
|
|
10
|
+
expected?: number | null;
|
|
11
|
+
/** Formato de valor, meta e ritmo. */
|
|
12
|
+
format?: 'currency' | 'number' | 'percent';
|
|
13
|
+
/** `compact`: `R$ 1,2 mi`; `standard`: `R$ 1.234.567,00`. */
|
|
14
|
+
notation?: 'compact' | 'standard';
|
|
15
|
+
hint?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Cor da barra. Sem valor, sai do ritmo: success no ritmo (ou meta batida,
|
|
18
|
+
* sem ritmo), warning até 10% abaixo do ritmo, danger abaixo disso; sem
|
|
19
|
+
* ritmo e abaixo da meta, primary; sem meta, neutral.
|
|
20
|
+
*/
|
|
21
|
+
severity?: MeterSeverity;
|
|
22
|
+
/** `compact`: menos respiro e valor menor (grade densa de metas). */
|
|
23
|
+
size?: 'default' | 'compact';
|
|
24
|
+
/** Destino ao clicar: vira RouterLink (exige vue-router instalado). */
|
|
25
|
+
to?: RouteLocationRaw;
|
|
26
|
+
};
|
|
27
|
+
declare var __VLS_8: {};
|
|
28
|
+
type __VLS_Slots = {} & {
|
|
29
|
+
hint?: (props: typeof __VLS_8) => any;
|
|
30
|
+
};
|
|
31
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
32
|
+
click: (event: KeyboardEvent | MouseEvent) => any;
|
|
33
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
34
|
+
onClick?: ((event: KeyboardEvent | MouseEvent) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
size: "default" | "compact";
|
|
37
|
+
notation: "compact" | "standard";
|
|
38
|
+
format: "currency" | "number" | "percent";
|
|
39
|
+
goal: number | null;
|
|
40
|
+
expected: number | null;
|
|
41
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
42
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
43
|
+
declare const _default: typeof __VLS_export;
|
|
44
|
+
export default _default;
|
|
45
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|