@wgalleti/primevue-components 1.3.0 → 1.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.
Files changed (67) hide show
  1. package/README.md +1 -0
  2. package/dist/components/charts/WChart.vue.d.ts +12 -2
  3. package/dist/components/form/WDateRange.vue.d.ts +2 -0
  4. package/dist/components/index.d.ts +2 -0
  5. package/dist/components/ui/WAttentionList.vue.d.ts +34 -0
  6. package/dist/components/ui/WEmptyState.vue.d.ts +21 -3
  7. package/dist/components/ui/WKanbanBoard.vue.d.ts +2 -2
  8. package/dist/components/ui/WKpiCard.vue.d.ts +29 -7
  9. package/dist/components/ui/WKpiGrid.vue.d.ts +15 -2
  10. package/dist/components/ui/WMeter.vue.d.ts +49 -0
  11. package/dist/components/ui/WTabPane.d.ts +4 -0
  12. package/dist/components-B9N5YvzN.cjs +25 -0
  13. package/dist/components-B9N5YvzN.cjs.map +1 -0
  14. package/dist/{components-BHHLGp-P.js → components-C5a424TI.js} +1785 -1460
  15. package/dist/components-C5a424TI.js.map +1 -0
  16. package/dist/components.cjs +1 -1
  17. package/dist/components.js +2 -2
  18. package/dist/composables/index.d.ts +3 -0
  19. package/dist/composables/useAppConfirm.d.ts +1 -0
  20. package/dist/composables/useFormatters.d.ts +2 -0
  21. package/dist/composables/usePendingForms.d.ts +15 -0
  22. package/dist/composables/usePublishedVersion.d.ts +69 -0
  23. package/dist/composables-BZTlY1QU.cjs +2 -0
  24. package/dist/composables-BZTlY1QU.cjs.map +1 -0
  25. package/dist/composables-Bu1oxAgP.js +763 -0
  26. package/dist/composables-Bu1oxAgP.js.map +1 -0
  27. package/dist/composables.cjs +1 -1
  28. package/dist/composables.js +3 -3
  29. package/dist/index.cjs +1 -1
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.d.ts +8 -5
  32. package/dist/index.js +30 -29
  33. package/dist/index.js.map +1 -1
  34. package/dist/primevue-components.css +1 -1
  35. package/dist/routeTabs-BnVpnSeJ.cjs.map +1 -1
  36. package/dist/routeTabs-D6m8PuP6.js.map +1 -1
  37. package/dist/types/attentionList.d.ts +22 -0
  38. package/dist/types/index.d.ts +2 -1
  39. package/dist/types/kpi.d.ts +22 -1
  40. package/dist/types/manager.d.ts +2 -0
  41. package/dist/types/plugin.d.ts +6 -0
  42. package/dist/{useFormKeyboardNav-DuxPdAeK.js → useFormKeyboardNav-DNaAWyrr.js} +74 -31
  43. package/dist/useFormKeyboardNav-DNaAWyrr.js.map +1 -0
  44. package/dist/{useFormKeyboardNav-CzKY9ZV2.cjs → useFormKeyboardNav-DkUCe_b7.cjs} +3 -3
  45. package/dist/useFormKeyboardNav-DkUCe_b7.cjs.map +1 -0
  46. package/dist/utils/chart.d.ts +26 -0
  47. package/dist/utils/interactiveCard.d.ts +24 -0
  48. package/dist/utils/meter.d.ts +15 -0
  49. package/dist/utils/sparkline.d.ts +15 -0
  50. package/dist/vite/buildIdentity.d.ts +39 -0
  51. package/dist/vite/index.d.ts +2 -0
  52. package/dist/vite.cjs +2 -0
  53. package/dist/vite.cjs.map +1 -0
  54. package/dist/vite.d.ts +2 -0
  55. package/dist/vite.js +26 -0
  56. package/dist/vite.js.map +1 -0
  57. package/package.json +8 -3
  58. package/skill/references/components.md +1 -1
  59. package/dist/components-BHHLGp-P.js.map +0 -1
  60. package/dist/components-Ml8IKELa.cjs +0 -25
  61. package/dist/components-Ml8IKELa.cjs.map +0 -1
  62. package/dist/composables-COb8tdOP.cjs +0 -2
  63. package/dist/composables-COb8tdOP.cjs.map +0 -1
  64. package/dist/composables-DEPrDTmn.js +0 -642
  65. package/dist/composables-DEPrDTmn.js.map +0 -1
  66. package/dist/useFormKeyboardNav-CzKY9ZV2.cjs.map +0 -1
  67. 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, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
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;
@@ -9,6 +9,8 @@ type __VLS_Props = {
9
9
  maxDate?: Date;
10
10
  showButtonBar?: boolean;
11
11
  disabled?: boolean;
12
+ /** `id` do input — para o `<label for>` do formulário. */
13
+ inputId?: string;
12
14
  };
13
15
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
16
  "update:modelValue": (value: Date[] | null) => any;
@@ -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';
@@ -29,6 +30,7 @@ export { default as WProgressFlow } from './ui/WProgressFlow.vue';
29
30
  export { default as WStepFlow } from './ui/WStepFlow.vue';
30
31
  export { default as WStepSection } from './ui/WStepSection.vue';
31
32
  export { default as WCheckList } from './ui/WCheckList.vue';
33
+ export { default as WAttentionList } from './ui/WAttentionList.vue';
32
34
  export { default as WMapSelect } from './ui/WMapSelect.vue';
33
35
  export { default as WMarkdownView } from './ui/WMarkdownView.vue';
34
36
  export { default as WMarkdownEditor } from './form/WMarkdownEditor.vue';
@@ -0,0 +1,34 @@
1
+ import { AttentionItem, AttentionItemClickEvent } from '../../types/attentionList';
2
+ /**
3
+ * Pontos de atenção de uma tela operacional ("Sem anamnese · 100", "Lotadas · 2"): o que pede
4
+ * ação, com a contagem e o atalho para o filtro ou a tela. A ordem é de quem chama — ponha o
5
+ * que pede ação primeiro no topo.
6
+ */
7
+ type __VLS_Props = {
8
+ title?: string;
9
+ subtitle?: string;
10
+ items?: AttentionItem[];
11
+ emptyMessage?: string;
12
+ };
13
+ declare var __VLS_1: {}, __VLS_9: {};
14
+ type __VLS_Slots = {} & {
15
+ actions?: (props: typeof __VLS_1) => any;
16
+ } & {
17
+ empty?: (props: typeof __VLS_9) => any;
18
+ };
19
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
+ "item-click": (event: AttentionItemClickEvent) => any;
21
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
22
+ "onItem-click"?: ((event: AttentionItemClickEvent) => any) | undefined;
23
+ }>, {
24
+ emptyMessage: string;
25
+ items: AttentionItem[];
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
27
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
30
+ type __VLS_WithSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
@@ -1,14 +1,32 @@
1
+ /**
2
+ * Estado vazio: ícone (ou ilustração do produto pelo slot `illustration`), título, descrição e
3
+ * ação opcional. `compact` cabe dentro de card ou painel lateral.
4
+ */
1
5
  type __VLS_Props = {
2
- icon: string;
6
+ icon?: string;
3
7
  title: string;
4
8
  description?: string;
5
9
  actionLabel?: string;
6
10
  actionIcon?: string;
11
+ compact?: boolean;
12
+ };
13
+ type __VLS_Slots = {
14
+ /** Substitui o ícone: a arte do produto (SVG, imagem). */
15
+ illustration?: () => unknown;
7
16
  };
8
- declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
18
  action: () => any;
10
19
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
11
20
  onAction?: (() => any) | undefined;
12
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ }>, {
22
+ compact: boolean;
23
+ icon: string;
24
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
25
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
26
  declare const _default: typeof __VLS_export;
14
27
  export default _default;
28
+ type __VLS_WithSlots<T, S> = T & {
29
+ new (): {
30
+ $slots: S;
31
+ };
32
+ };
@@ -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,41 @@ 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';
26
+ /** Card usado como filtro e aplicado agora: destaca e anuncia `aria-pressed`. */
27
+ active?: boolean;
12
28
  };
13
- declare var __VLS_21: {}, __VLS_23: {}, __VLS_25: {}, __VLS_27: {}, __VLS_29: {};
29
+ declare var __VLS_28: {}, __VLS_30: {}, __VLS_32: {}, __VLS_34: {}, __VLS_36: {};
14
30
  type __VLS_Slots = {} & {
15
- icon?: (props: typeof __VLS_21) => any;
31
+ icon?: (props: typeof __VLS_28) => any;
16
32
  } & {
17
- trend?: (props: typeof __VLS_23) => any;
33
+ trend?: (props: typeof __VLS_30) => any;
18
34
  } & {
19
- value?: (props: typeof __VLS_25) => any;
35
+ value?: (props: typeof __VLS_32) => any;
20
36
  } & {
21
- hint?: (props: typeof __VLS_27) => any;
37
+ hint?: (props: typeof __VLS_34) => any;
22
38
  } & {
23
- footer?: (props: typeof __VLS_29) => any;
39
+ footer?: (props: typeof __VLS_36) => any;
24
40
  };
25
- declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
41
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
42
+ click: (event: KeyboardEvent | MouseEvent) => any;
43
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
44
+ onClick?: ((event: KeyboardEvent | MouseEvent) => any) | undefined;
45
+ }>, {
46
+ size: "default" | "compact";
47
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
26
48
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
27
49
  declare const _default: typeof __VLS_export;
28
50
  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, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
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
+ };
@@ -12,6 +12,10 @@ import { RouteTab, RouteTabsApi } from '../../types/routeTabs';
12
12
  *
13
13
  * Os registros (guards/hooks) são desfeitos via `onScopeDispose` no escopo de
14
14
  * QUEM registrou — assim um `reload()` (remount) não acumula guard morto.
15
+ *
16
+ * Renderiza um `RouterView` preso ao snapshot da aba (prop `route`), na mesma
17
+ * profundidade em que o viewport está: com rotas aninhadas, o layout do módulo
18
+ * aparece e o `RouterView` dele mostra a tela filha — também congelada.
15
19
  */
16
20
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
17
21
  tab: {