@selectwin/kit 0.1.240 → 0.1.242
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/dist/SelectKpiBand.d.ts +7 -2
- package/dist/SelectKpiBand.js +28 -27
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/SelectKpiBand.d.ts
CHANGED
|
@@ -3,7 +3,10 @@ type SelectKpiBandOwnProps = {
|
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
/** 0.1.210: `dl` para a faixa de números só de leitura (os `SelectKpiCard` viram `<dt>` e `<dd>`). Padrão `div`. */
|
|
5
5
|
as?: 'div' | 'dl';
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* 0.1.230: as colunas da faixa (4 → 4/2/1, 3 → 3/1, 2 → 2/1), sem o buraco da grade. Padrão: quebra sozinha — desde a
|
|
8
|
+
* 0.1.242 em flex, esticando a última linha (5 números numa largura média viram 4 + 1 sem células vazias).
|
|
9
|
+
*/
|
|
7
10
|
columns?: 2 | 3 | 4;
|
|
8
11
|
/** 0.1.235: os painéis embaixo dos números, no mesmo card (`SelectKpiBandPanel`). Só na faixa `div`. */
|
|
9
12
|
panels?: ReactNode;
|
|
@@ -18,10 +21,12 @@ export type SelectKpiBandPanelProps = {
|
|
|
18
21
|
action?: ReactNode;
|
|
19
22
|
/** O painel largo: todas as colunas da faixa menos uma. Sem ele, uma coluna. */
|
|
20
23
|
wide?: boolean;
|
|
24
|
+
/** 0.1.241: o painel da faixa inteira (o gráfico embaixo de todos os números). Vence o `wide`. */
|
|
25
|
+
full?: boolean;
|
|
21
26
|
/** Os valores ocultos (o olho do cabeçalho): o conteúdo borra, como no `SelectChartCard`. */
|
|
22
27
|
hideValues?: boolean;
|
|
23
28
|
children: ReactNode;
|
|
24
29
|
} & Omit<ComponentPropsWithoutRef<'section'>, 'title' | 'children'>;
|
|
25
30
|
/** Um painel embaixo dos números da `SelectKpiBand` (0.1.235): o título na faixa, o conteúdo na caixa de dentro. */
|
|
26
|
-
export declare function SelectKpiBandPanel({ title, help, action, wide, hideValues, children, className, ...rest }: SelectKpiBandPanelProps): import("react").JSX.Element;
|
|
31
|
+
export declare function SelectKpiBandPanel({ title, help, action, wide, full, hideValues, children, className, ...rest }: SelectKpiBandPanelProps): import("react").JSX.Element;
|
|
27
32
|
export {};
|
package/dist/SelectKpiBand.js
CHANGED
|
@@ -2,50 +2,51 @@
|
|
|
2
2
|
import { SelectInfoTip as e } from "./SelectInfoTip.js";
|
|
3
3
|
import { FrameBody as t, useInsideFrame as n } from "./internal/frame.js";
|
|
4
4
|
import { KpiListContext as r } from "./internal/kpiList.js";
|
|
5
|
-
import {
|
|
6
|
-
import { jsx as
|
|
5
|
+
import { Children as i, forwardRef as a } from "react";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
//#region src/SelectKpiBand.tsx
|
|
8
|
-
var
|
|
9
|
-
let
|
|
10
|
-
return t === "dl" ? /* @__PURE__ */
|
|
8
|
+
var c = a(function({ children: e, as: t = "div", columns: a, panels: c, className: l, ...u }, d) {
|
|
9
|
+
let f = n(), p = i.toArray(e).length, m = a ?? (c != null && p >= 2 && p <= 4 ? p : void 0), h = `select-kpiband${f ? " select-kpiband--nested" : ""}${m && !f ? ` select-kpiband--cols-${m}` : ""}${l ? " " + l : ""}`;
|
|
10
|
+
return t === "dl" ? /* @__PURE__ */ o(r.Provider, {
|
|
11
11
|
value: !0,
|
|
12
|
-
children: /* @__PURE__ */
|
|
13
|
-
ref:
|
|
14
|
-
...
|
|
15
|
-
className:
|
|
12
|
+
children: /* @__PURE__ */ o("dl", {
|
|
13
|
+
ref: d,
|
|
14
|
+
...u,
|
|
15
|
+
className: h,
|
|
16
16
|
children: e
|
|
17
17
|
})
|
|
18
|
-
}) : /* @__PURE__ */
|
|
19
|
-
ref:
|
|
18
|
+
}) : /* @__PURE__ */ s("div", {
|
|
19
|
+
ref: d,
|
|
20
20
|
role: "group",
|
|
21
|
-
...
|
|
22
|
-
className:
|
|
23
|
-
children: [e,
|
|
21
|
+
...u,
|
|
22
|
+
className: h,
|
|
23
|
+
children: [e, c != null && !f && /* @__PURE__ */ o("div", {
|
|
24
24
|
className: "select-kpiband__panels",
|
|
25
|
-
children:
|
|
25
|
+
children: c
|
|
26
26
|
})]
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
|
-
function
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
function l({ title: n, help: r, action: i, wide: a = !1, full: c = !1, hideValues: l = !1, children: u, className: d, ...f }) {
|
|
30
|
+
let p = c ? " select-kpipanel--full" : a ? " select-kpipanel--wide" : "";
|
|
31
|
+
return /* @__PURE__ */ s("section", {
|
|
32
|
+
...f,
|
|
33
|
+
className: `select-kpipanel${p}${d ? " " + d : ""}`,
|
|
34
|
+
children: [/* @__PURE__ */ s("div", {
|
|
34
35
|
className: "select-kpipanel__head",
|
|
35
|
-
children: [/* @__PURE__ */
|
|
36
|
+
children: [/* @__PURE__ */ s("h2", {
|
|
36
37
|
className: "select-kpipanel__title",
|
|
37
|
-
children: [n, r != null && /* @__PURE__ */
|
|
38
|
-
}), i != null && /* @__PURE__ */
|
|
38
|
+
children: [n, r != null && /* @__PURE__ */ o(e, { content: r })]
|
|
39
|
+
}), i != null && /* @__PURE__ */ o("div", {
|
|
39
40
|
className: "select-kpipanel__action",
|
|
40
41
|
children: i
|
|
41
42
|
})]
|
|
42
|
-
}), /* @__PURE__ */
|
|
43
|
-
className: `select-kpipanel__body${
|
|
44
|
-
children: /* @__PURE__ */
|
|
43
|
+
}), /* @__PURE__ */ o("div", {
|
|
44
|
+
className: `select-kpipanel__body${l ? " is-blurred" : ""}`,
|
|
45
|
+
children: /* @__PURE__ */ o(t, { children: u })
|
|
45
46
|
})]
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
49
|
//#endregion
|
|
49
|
-
export {
|
|
50
|
+
export { c as SelectKpiBand, l as SelectKpiBandPanel };
|
|
50
51
|
|
|
51
52
|
//# sourceMappingURL=SelectKpiBand.js.map
|