@selectwin/kit 0.1.240 → 0.1.241

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.
@@ -18,10 +18,12 @@ export type SelectKpiBandPanelProps = {
18
18
  action?: ReactNode;
19
19
  /** O painel largo: todas as colunas da faixa menos uma. Sem ele, uma coluna. */
20
20
  wide?: boolean;
21
+ /** 0.1.241: o painel da faixa inteira (o gráfico embaixo de todos os números). Vence o `wide`. */
22
+ full?: boolean;
21
23
  /** Os valores ocultos (o olho do cabeçalho): o conteúdo borra, como no `SelectChartCard`. */
22
24
  hideValues?: boolean;
23
25
  children: ReactNode;
24
26
  } & Omit<ComponentPropsWithoutRef<'section'>, 'title' | 'children'>;
25
27
  /** 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;
28
+ export declare function SelectKpiBandPanel({ title, help, action, wide, full, hideValues, children, className, ...rest }: SelectKpiBandPanelProps): import("react").JSX.Element;
27
29
  export {};
@@ -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 { forwardRef as i } from "react";
6
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
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 s = i(function({ children: e, as: t = "div", columns: i, panels: s, className: c, ...l }, u) {
9
- let d = n(), f = `select-kpiband${d ? " select-kpiband--nested" : ""}${i && !d ? ` select-kpiband--cols-${i}` : ""}${c ? " " + c : ""}`;
10
- return t === "dl" ? /* @__PURE__ */ a(r.Provider, {
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__ */ a("dl", {
13
- ref: u,
14
- ...l,
15
- className: f,
12
+ children: /* @__PURE__ */ o("dl", {
13
+ ref: d,
14
+ ...u,
15
+ className: h,
16
16
  children: e
17
17
  })
18
- }) : /* @__PURE__ */ o("div", {
19
- ref: u,
18
+ }) : /* @__PURE__ */ s("div", {
19
+ ref: d,
20
20
  role: "group",
21
- ...l,
22
- className: f,
23
- children: [e, s != null && !d && /* @__PURE__ */ a("div", {
21
+ ...u,
22
+ className: h,
23
+ children: [e, c != null && !f && /* @__PURE__ */ o("div", {
24
24
  className: "select-kpiband__panels",
25
- children: s
25
+ children: c
26
26
  })]
27
27
  });
28
28
  });
29
- function c({ title: n, help: r, action: i, wide: s = !1, hideValues: c = !1, children: l, className: u, ...d }) {
30
- return /* @__PURE__ */ o("section", {
31
- ...d,
32
- className: `select-kpipanel${s ? " select-kpipanel--wide" : ""}${u ? " " + u : ""}`,
33
- children: [/* @__PURE__ */ o("div", {
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__ */ o("h2", {
36
+ children: [/* @__PURE__ */ s("h2", {
36
37
  className: "select-kpipanel__title",
37
- children: [n, r != null && /* @__PURE__ */ a(e, { content: r })]
38
- }), i != null && /* @__PURE__ */ a("div", {
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__ */ a("div", {
43
- className: `select-kpipanel__body${c ? " is-blurred" : ""}`,
44
- children: /* @__PURE__ */ a(t, { children: l })
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 { s as SelectKpiBand, c as SelectKpiBandPanel };
50
+ export { c as SelectKpiBand, l as SelectKpiBandPanel };
50
51
 
51
52
  //# sourceMappingURL=SelectKpiBand.js.map