@wpic/ui 0.9.18 → 0.9.20

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.9.19
2
+
3
+ - WCard: add a shared Tailwind metric variant with single-line titles, standard value typography, trend actions and optional sparkline slot.
4
+
1
5
  ## 0.9.15
2
6
 
3
7
  ## 0.9.18
package/COMPONENTS.md CHANGED
@@ -216,6 +216,14 @@ click: [e: MouseEvent]
216
216
 
217
217
  ## WCard
218
218
 
219
+ `variant="metric"` is the shared KPI layout: a single-line muted title, optional
220
+ `actions` (trend badge), `value` (`text-2xl font-semibold`), `subtitle` (`text-sm`),
221
+ and optional `visual` slot for a sparkline. Use `dense` for reduced vertical padding.
222
+ `value` can also be a slot for missing-state or formatted content. All metric layout
223
+ and typography use Tailwind utilities. Default content cards retain their existing
224
+ header and body layout.
225
+
226
+
219
227
  Header titles default to `titleSize="lg"` (`text-lg`, 18px) and semibold weight. Use `titleSize="base"` for `text-base` (16px). This styling applies only to the title wrapper (including a heading in the title slot), not action buttons.
220
228
 
221
229
  Body padding uses smaller vertical spacing than horizontal spacing: sm 0.5/0.75rem, md 0.75/1rem, lg 1/1.5rem (vertical/horizontal).
@@ -18,6 +18,10 @@
18
18
  * - padding : shared horizontal spacing for header, body and footer
19
19
  */
20
20
  type __VLS_Props = {
21
+ /** Shared KPI layout: title/actions, value/subtitle and optional visual slot. */
22
+ variant?: 'default' | 'metric';
23
+ value?: string | number;
24
+ dense?: boolean;
21
25
  title?: string;
22
26
  subtitle?: string;
23
27
  empty?: boolean;
@@ -29,23 +33,36 @@ type __VLS_Props = {
29
33
  /** Header title size; does not affect action buttons. */
30
34
  titleSize?: 'base' | 'lg';
31
35
  };
32
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_9: {}, __VLS_11: {}, __VLS_13: {};
36
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_9: {}, __VLS_11: {}, __VLS_13: {}, __VLS_15: {}, __VLS_17: {}, __VLS_19: {}, __VLS_21: {}, __VLS_23: {}, __VLS_25: {};
33
37
  type __VLS_Slots = {} & {
34
- icon?: (props: typeof __VLS_1) => any;
38
+ title?: (props: typeof __VLS_1) => any;
35
39
  } & {
36
- title?: (props: typeof __VLS_3) => any;
40
+ actions?: (props: typeof __VLS_3) => any;
37
41
  } & {
38
- actions?: (props: typeof __VLS_5) => any;
42
+ value?: (props: typeof __VLS_5) => any;
39
43
  } & {
40
44
  subtitle?: (props: typeof __VLS_7) => any;
41
45
  } & {
42
- default?: (props: typeof __VLS_9) => any;
46
+ visual?: (props: typeof __VLS_9) => any;
43
47
  } & {
44
- empty?: (props: typeof __VLS_11) => any;
48
+ default?: (props: typeof __VLS_11) => any;
45
49
  } & {
46
- footer?: (props: typeof __VLS_13) => any;
50
+ icon?: (props: typeof __VLS_13) => any;
51
+ } & {
52
+ title?: (props: typeof __VLS_15) => any;
53
+ } & {
54
+ actions?: (props: typeof __VLS_17) => any;
55
+ } & {
56
+ subtitle?: (props: typeof __VLS_19) => any;
57
+ } & {
58
+ default?: (props: typeof __VLS_21) => any;
59
+ } & {
60
+ empty?: (props: typeof __VLS_23) => any;
61
+ } & {
62
+ footer?: (props: typeof __VLS_25) => any;
47
63
  };
48
64
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
65
+ variant: "default" | "metric";
49
66
  padding: "sm" | "md" | "lg";
50
67
  headerDivider: boolean;
51
68
  titleSize: "base" | "lg";