@selectwin/kit 0.1.229 → 0.1.230

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.
@@ -16,7 +16,12 @@ type SelectCarouselOwnProps = {
16
16
  label?: string;
17
17
  /** De quanto em quanto tempo passa sozinho, em ms (padrão 7000). */
18
18
  interval?: number;
19
+ /**
20
+ * 0.1.230: o carrossel ocupa a largura de quem o contém (a coluna de uma grade), sem o teto de 20rem do destaque do
21
+ * cabeçalho.
22
+ */
23
+ fluid?: boolean;
19
24
  };
20
25
  export type SelectCarouselProps = SelectCarouselOwnProps & Omit<ComponentPropsWithoutRef<'section'>, keyof SelectCarouselOwnProps>;
21
- export declare function SelectCarousel({ slides, label, interval, className, ...rest }: SelectCarouselProps): import("react").JSX.Element | null;
26
+ export declare function SelectCarousel({ slides, label, interval, fluid, className, ...rest }: SelectCarouselProps): import("react").JSX.Element | null;
22
27
  export {};
@@ -7,56 +7,56 @@ import { jsx as f, jsxs as p } from "react/jsx-runtime";
7
7
  import { Link as m } from "react-router-dom";
8
8
  //#region src/SelectCarousel.tsx
9
9
  var h = () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
10
- function g({ slides: g, label: _, interval: v = 7e3, className: y, ...b }) {
11
- let x = c().carousel, S = s(), C = g.length, [w, T] = d(0), [E, D] = d(!1), [O, k] = d(() => !h()), [A, j] = d(!1), M = u(null), N = Math.min(w, Math.max(0, C - 1)), P = O && !A && C > 1;
10
+ function g({ slides: g, label: _, interval: v = 7e3, fluid: y = !1, className: b, ...x }) {
11
+ let S = c().carousel, C = s(), w = g.length, [T, E] = d(0), [D, O] = d(!1), [k, A] = d(() => !h()), [j, M] = d(!1), N = u(null), P = Math.min(T, Math.max(0, w - 1)), F = k && !j && w > 1;
12
12
  l(() => {
13
- if (!P) return;
13
+ if (!F) return;
14
14
  let e = window.setTimeout(() => {
15
- D(!1), T((e) => (e + 1) % C);
15
+ O(!1), E((e) => (e + 1) % w);
16
16
  }, v);
17
17
  return () => window.clearTimeout(e);
18
18
  }, [
19
- P,
20
- C,
19
+ F,
21
20
  w,
21
+ T,
22
22
  v
23
23
  ]);
24
- let F = (e) => {
25
- D(e < N), T((e % C + C) % C);
26
- }, I = g[N];
27
- if (!I) return null;
28
- let L = e(I.to ?? I.href), R = L === void 0 ? null : I.to == null ? /* @__PURE__ */ f("a", {
29
- href: L,
24
+ let I = (e) => {
25
+ O(e < P), E((e % w + w) % w);
26
+ }, L = g[P];
27
+ if (!L) return null;
28
+ let R = e(L.to ?? L.href), z = R === void 0 ? null : L.to == null ? /* @__PURE__ */ f("a", {
29
+ href: R,
30
30
  className: "select-carousel__go",
31
- "aria-label": x.open(I.title),
31
+ "aria-label": S.open(L.title),
32
32
  children: /* @__PURE__ */ f(t, {})
33
33
  }) : /* @__PURE__ */ f(m, {
34
- to: L,
34
+ to: R,
35
35
  className: "select-carousel__go",
36
- "aria-label": x.open(I.title),
36
+ "aria-label": S.open(L.title),
37
37
  children: /* @__PURE__ */ f(t, {})
38
38
  });
39
39
  return /* @__PURE__ */ p("section", {
40
- ...b,
41
- className: `select-carousel${y ? " " + y : ""}`,
42
- "aria-roledescription": x.carousel,
43
- "aria-label": _ ?? x.label,
44
- onMouseEnter: () => j(!0),
45
- onMouseLeave: () => j(!1),
46
- onFocus: () => j(!0),
40
+ ...x,
41
+ className: `select-carousel${y ? " select-carousel--fluid" : ""}${b ? " " + b : ""}`,
42
+ "aria-roledescription": S.carousel,
43
+ "aria-label": _ ?? S.label,
44
+ onMouseEnter: () => M(!0),
45
+ onMouseLeave: () => M(!1),
46
+ onFocus: () => M(!0),
47
47
  onBlur: (e) => {
48
- e.currentTarget.contains(e.relatedTarget) || j(!1);
48
+ e.currentTarget.contains(e.relatedTarget) || M(!1);
49
49
  },
50
50
  onKeyDown: (e) => {
51
- C < 2 || e.key !== "ArrowRight" && e.key !== "ArrowLeft" || (e.preventDefault(), F(N + (e.key === "ArrowRight" ? 1 : -1)));
51
+ w < 2 || e.key !== "ArrowRight" && e.key !== "ArrowLeft" || (e.preventDefault(), I(P + (e.key === "ArrowRight" ? 1 : -1)));
52
52
  },
53
53
  onPointerDown: (e) => {
54
- e.pointerType !== "mouse" && (M.current = e.clientX);
54
+ e.pointerType !== "mouse" && (N.current = e.clientX);
55
55
  },
56
56
  onPointerUp: (e) => {
57
- if (M.current === null) return;
58
- let t = e.clientX - M.current;
59
- M.current = null, C > 1 && Math.abs(t) > 40 && F(N + (t < 0 ? 1 : -1));
57
+ if (N.current === null) return;
58
+ let t = e.clientX - N.current;
59
+ N.current = null, w > 1 && Math.abs(t) > 40 && I(P + (t < 0 ? 1 : -1));
60
60
  },
61
61
  children: [
62
62
  /* @__PURE__ */ f("span", {
@@ -71,30 +71,30 @@ function g({ slides: g, label: _, interval: v = 7e3, className: y, ...b }) {
71
71
  className: "select-carousel__card",
72
72
  children: [/* @__PURE__ */ f("div", {
73
73
  className: "select-carousel__slides",
74
- "aria-live": P ? "off" : "polite",
74
+ "aria-live": F ? "off" : "polite",
75
75
  children: /* @__PURE__ */ p("div", {
76
- className: `select-carousel__slide${E ? " is-back" : ""}`,
76
+ className: `select-carousel__slide${D ? " is-back" : ""}`,
77
77
  role: "group",
78
- "aria-roledescription": x.slide,
79
- "aria-label": x.position(o(N + 1, S), o(C, S)),
78
+ "aria-roledescription": S.slide,
79
+ "aria-label": S.position(o(P + 1, C), o(w, C)),
80
80
  children: [/* @__PURE__ */ p("span", {
81
81
  className: "select-carousel__head",
82
- children: [/* @__PURE__ */ f("span", { children: I.title }), R]
82
+ children: [/* @__PURE__ */ f("span", { children: L.title }), z]
83
83
  }), /* @__PURE__ */ f("span", {
84
84
  className: "select-carousel__text",
85
- children: I.text
85
+ children: L.text
86
86
  })]
87
- }, I.key)
88
- }), C > 1 && /* @__PURE__ */ p("div", {
87
+ }, L.key)
88
+ }), w > 1 && /* @__PURE__ */ p("div", {
89
89
  className: "select-carousel__nav",
90
90
  children: [/* @__PURE__ */ f("span", {
91
91
  className: "select-carousel__dots",
92
92
  children: g.map((e, t) => /* @__PURE__ */ f("button", {
93
93
  type: "button",
94
94
  className: "select-carousel__dot",
95
- "aria-label": `${o(t + 1, S)}: ${e.title}`,
96
- "aria-current": t === N ? "true" : void 0,
97
- onClick: () => F(t)
95
+ "aria-label": `${o(t + 1, C)}: ${e.title}`,
96
+ "aria-current": t === P ? "true" : void 0,
97
+ onClick: () => I(t)
98
98
  }, e.key))
99
99
  }), /* @__PURE__ */ p("span", {
100
100
  className: "select-carousel__ctrl",
@@ -102,22 +102,22 @@ function g({ slides: g, label: _, interval: v = 7e3, className: y, ...b }) {
102
102
  /* @__PURE__ */ f("button", {
103
103
  type: "button",
104
104
  className: "select-carousel__btn",
105
- "aria-label": x.previous,
106
- onClick: () => F(N - 1),
105
+ "aria-label": S.previous,
106
+ onClick: () => I(P - 1),
107
107
  children: /* @__PURE__ */ f(n, {})
108
108
  }),
109
109
  /* @__PURE__ */ f("button", {
110
110
  type: "button",
111
111
  className: "select-carousel__btn",
112
- "aria-label": O ? x.pause : x.play,
113
- onClick: () => k((e) => !e),
114
- children: f(O ? i : a, {})
112
+ "aria-label": k ? S.pause : S.play,
113
+ onClick: () => A((e) => !e),
114
+ children: f(k ? i : a, {})
115
115
  }),
116
116
  /* @__PURE__ */ f("button", {
117
117
  type: "button",
118
118
  className: "select-carousel__btn",
119
- "aria-label": x.next,
120
- onClick: () => F(N + 1),
119
+ "aria-label": S.next,
120
+ onClick: () => I(P + 1),
121
121
  children: /* @__PURE__ */ f(r, {})
122
122
  })
123
123
  ]
@@ -1,4 +1,4 @@
1
- import { ReactNode, ComponentPropsWithoutRef } from 'react';
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
  import { SelectDonutSegment } from './chartUtils';
3
3
  type SelectDonutOwnProps = {
4
4
  segments: SelectDonutSegment[];
@@ -11,6 +11,19 @@ type SelectDonutOwnProps = {
11
11
  gap?: number;
12
12
  /** Render a full pie (no center hole) instead of a ring. */
13
13
  pie?: boolean;
14
+ /**
15
+ * 0.1.230: o nome do gráfico para quem lê tela ("Como terminaram as 13.262 mensagens"). Com ele, o anel recebe o foco
16
+ * e as setas andam pelas fatias.
17
+ */
18
+ ariaLabel?: string;
19
+ /** 0.1.230: a parte de cada fatia, na legenda e na dica ("96,6%"). */
20
+ percent?: boolean;
21
+ /** 0.1.230: o texto da parte (o valor e o total). Padrão: a porcentagem no idioma do kit, com uma casa. */
22
+ formatShare?: (value: number, total: number) => string;
23
+ /** 0.1.230: o rótulo da linha da dica. Padrão: "Valor" (no idioma do kit). */
24
+ valueLabel?: ReactNode;
25
+ /** 0.1.230: `bottom` = a legenda embaixo da rosca, na largura toda. Padrão: ao lado, e embaixo quando não cabe. */
26
+ legendPosition?: 'auto' | 'bottom';
14
27
  };
15
28
  export type SelectDonutProps = SelectDonutOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectDonutOwnProps>;
16
29
  export declare const SelectDonut: import('react').ForwardRefExoticComponent<SelectDonutOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectDonutOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,103 +1,147 @@
1
1
  /* empty css */
2
- import { chartColor as e, donutSegment as t, formatCompact as n, useMeasuredWidth as r } from "./chartUtils.js";
3
- import { ChartTooltip as i, useChartTooltip as a } from "./chartTip.js";
4
- import { forwardRef as o, useId as s, useRef as c } from "react";
5
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
2
+ import { selectIntlLocale as e, useSelectLocale as t, useSelectMessages as n } from "./SelectLocale.js";
3
+ import { chartColor as r, donutSegment as i, formatCompact as a, useMeasuredWidth as o } from "./chartUtils.js";
4
+ import { ChartTooltip as s } from "./chartTip.js";
5
+ import { forwardRef as c, useId as l, useRef as u, useState as d } from "react";
6
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
6
7
  //#region src/SelectDonut.tsx
7
- var d = o(function({ segments: o, size: d = 200, thickness: f = 26, format: p = n, centerLabel: m, legend: h = !0, gap: g = 2, pie: _ = !1, className: v, ...y }, b) {
8
- let x = a(), S = s(), C = c(null), w = r(C, d), T = o.reduce((e, t) => e + t.value, 0) || 1, E = w / 2, D = w / 2, O = w / 2 - 2, k = _ ? 0 : O - f, A = 0;
9
- return /* @__PURE__ */ u("div", {
10
- ref: b,
11
- ...y,
12
- className: `select-donut-wrap${v ? " " + v : ""}`,
8
+ function m(t, n, r) {
9
+ if (n <= 0) return "—";
10
+ let i = t / n * 100, a = (t) => t.toLocaleString(e(r), { maximumFractionDigits: 1 });
11
+ return t > 0 && i < .1 ? `<${a(.1)}%` : `${a(i)}%`;
12
+ }
13
+ var h = c(function({ segments: e, size: c = 200, thickness: h = 26, format: g = a, centerLabel: _, legend: v = !0, gap: y = 2, pie: b = !1, ariaLabel: x, percent: S = !1, formatShare: C, valueLabel: w, legendPosition: T = "auto", className: E, ...D }, O) {
14
+ let k = n(), A = t(), j = l(), M = u(null), [N, P] = d(null), F = o(M, c), I = e.reduce((e, t) => e + t.value, 0), L = I || 1, R = F / 2, z = F / 2, B = F / 2 - 2, V = b ? 0 : B - h, H = (e) => C ? C(e, I) : m(e, I, A), U = 0, W = e.map((e, t) => {
15
+ let n = U / L * 360;
16
+ return U += e.value, {
17
+ ...e,
18
+ index: t,
19
+ color: e.color ?? r(t),
20
+ start: n,
21
+ end: U / L * 360
22
+ };
23
+ }), G = W.filter((e) => e.value > 0), K = x != null && G.length > 0, q = N == null ? void 0 : W[N], J = q && q.value > 0 ? ((e) => {
24
+ let t = ((e.start + e.end) / 2 - 90) * Math.PI / 180, n = R + (B + 6) * Math.cos(t), r = z + (B + 6) * Math.sin(t), i = M.current;
25
+ return {
26
+ x: n + ((i == null ? void 0 : i.offsetLeft) ?? 0),
27
+ y: r + ((i == null ? void 0 : i.offsetTop) ?? 0),
28
+ place: r <= z ? "top" : "bottom",
29
+ title: e.label,
30
+ rows: [{
31
+ label: w ?? k.chart.value,
32
+ value: S ? `${g(e.value)} · ${H(e.value)}` : g(e.value),
33
+ color: e.color
34
+ }]
35
+ };
36
+ })(q) : null, Y = (e) => {
37
+ if (e.key === "Escape") {
38
+ P(null);
39
+ return;
40
+ }
41
+ let t = G.map((e) => e.index), n = N == null ? -1 : t.indexOf(N), r = {
42
+ ArrowRight: n + 1,
43
+ ArrowDown: n + 1,
44
+ ArrowLeft: n - 1,
45
+ ArrowUp: n - 1,
46
+ Home: 0,
47
+ End: t.length - 1
48
+ }[e.key];
49
+ r !== void 0 && (e.preventDefault(), P(t[Math.min(t.length - 1, Math.max(0, r))]));
50
+ };
51
+ return /* @__PURE__ */ p("div", {
52
+ ref: O,
53
+ ...D,
54
+ className: `select-donut-wrap${T === "bottom" ? " select-donut-wrap--bottom" : ""}${E ? " " + E : ""}`,
13
55
  children: [
14
- /* @__PURE__ */ u("div", {
15
- ref: C,
16
- className: "select-donut-ring",
56
+ /* @__PURE__ */ p("div", {
57
+ ref: M,
58
+ className: `select-donut-ring${q ? " has-active" : ""}`,
17
59
  style: {
18
- width: `${d / 16}rem`,
60
+ width: `${c / 16}rem`,
19
61
  aspectRatio: "1"
20
62
  },
21
- children: [/* @__PURE__ */ u("svg", {
22
- width: w,
23
- height: w,
24
- viewBox: `0 0 ${w} ${w}`,
63
+ ...K ? {
64
+ tabIndex: 0,
65
+ role: "img",
66
+ "aria-label": `${x}: ${G.map((e) => `${e.label} ${g(e.value)} (${H(e.value)})`).join(", ")}`,
67
+ onKeyDown: Y,
68
+ onFocus: () => P((e) => e ?? G[0].index),
69
+ onBlur: () => P(null)
70
+ } : {},
71
+ children: [/* @__PURE__ */ p("svg", {
72
+ width: F,
73
+ height: F,
74
+ viewBox: `0 0 ${F} ${F}`,
25
75
  className: "select-chart select-donut",
26
76
  "aria-hidden": "true",
27
- children: [/* @__PURE__ */ l("defs", { children: o.map((t, n) => {
28
- let r = t.color ?? e(n);
29
- return /* @__PURE__ */ u("linearGradient", {
30
- id: `${S}-s${n}`,
31
- gradientUnits: "userSpaceOnUse",
32
- x1: "0",
33
- y1: "0",
34
- x2: "0",
35
- y2: w,
36
- children: [/* @__PURE__ */ l("stop", {
37
- offset: "0%",
38
- stopColor: r,
39
- stopOpacity: 1
40
- }), /* @__PURE__ */ l("stop", {
41
- offset: "100%",
42
- stopColor: r,
43
- stopOpacity: .6
44
- })]
45
- }, n);
46
- }) }), o.map((n, r) => {
47
- let i = A / T * 360;
48
- A += n.value;
49
- let a = A / T * 360, o = n.color ?? e(r), s = a - i > g * 1.5 ? g / 2 : 0, c = i + s, u = Math.max(c + .01, a - s);
50
- return /* @__PURE__ */ l("path", {
51
- d: t(E, D, O, k, c, u),
52
- fill: `url(#${S}-s${r})`,
53
- className: "select-chart__seg",
54
- onMouseEnter: () => {
55
- let e = ((i + a) / 2 - 90) * Math.PI / 180, t = E + (O + 6) * Math.cos(e), r = D + (O + 6) * Math.sin(e);
56
- x.show({
57
- x: t,
58
- y: r,
59
- place: r <= D ? "top" : "bottom",
60
- title: n.label,
61
- rows: [{
62
- label: "Valor",
63
- value: p(n.value),
64
- color: o
65
- }]
66
- });
67
- },
68
- onMouseLeave: x.hide
69
- }, r);
77
+ children: [/* @__PURE__ */ f("defs", { children: W.map((e) => /* @__PURE__ */ p("linearGradient", {
78
+ id: `${j}-s${e.index}`,
79
+ gradientUnits: "userSpaceOnUse",
80
+ x1: "0",
81
+ y1: "0",
82
+ x2: "0",
83
+ y2: F,
84
+ children: [/* @__PURE__ */ f("stop", {
85
+ offset: "0%",
86
+ stopColor: e.color,
87
+ stopOpacity: 1
88
+ }), /* @__PURE__ */ f("stop", {
89
+ offset: "100%",
90
+ stopColor: e.color,
91
+ stopOpacity: .6
92
+ })]
93
+ }, e.index)) }), G.map((e) => {
94
+ let t = e.end - e.start > y * 1.5 ? y / 2 : 0, n = e.start + t, r = Math.max(n + .01, e.end - t);
95
+ return /* @__PURE__ */ f("path", {
96
+ d: i(R, z, B, V, n, r),
97
+ fill: `url(#${j}-s${e.index})`,
98
+ className: `select-chart__seg${N === e.index ? " is-on" : ""}`,
99
+ onMouseEnter: () => P(e.index),
100
+ onMouseLeave: () => P(null),
101
+ onPointerDown: () => P(e.index)
102
+ }, e.index);
70
103
  })]
71
- }), m != null && /* @__PURE__ */ l("div", {
104
+ }), _ != null && /* @__PURE__ */ f("div", {
72
105
  className: "select-donut__center",
73
- children: m
106
+ children: _
74
107
  })]
75
108
  }),
76
- h && /* @__PURE__ */ l("ul", {
109
+ v && /* @__PURE__ */ f("ul", {
77
110
  className: "select-donut__legend",
78
- children: o.map((t, n) => /* @__PURE__ */ u("li", {
79
- className: "select-donut__legitem",
111
+ children: W.map((e) => /* @__PURE__ */ p("li", {
112
+ className: `select-donut__legitem${q && N !== e.index ? " is-dim" : ""}`,
113
+ onMouseEnter: e.value > 0 ? () => P(e.index) : void 0,
114
+ onMouseLeave: e.value > 0 ? () => P(null) : void 0,
80
115
  children: [
81
- /* @__PURE__ */ l("span", {
116
+ /* @__PURE__ */ f("span", {
82
117
  className: "select-donut__dot",
83
- style: { background: t.color ?? e(n) }
118
+ style: { background: e.color }
84
119
  }),
85
- /* @__PURE__ */ l("span", {
120
+ /* @__PURE__ */ f("span", {
86
121
  className: "select-donut__leglabel",
87
- children: t.label
122
+ children: e.label
88
123
  }),
89
- /* @__PURE__ */ l("span", {
124
+ /* @__PURE__ */ f("span", {
90
125
  className: "select-donut__legval",
91
- children: p(t.value)
126
+ children: g(e.value)
127
+ }),
128
+ S && /* @__PURE__ */ f("span", {
129
+ className: "select-donut__legpct",
130
+ children: H(e.value)
92
131
  })
93
132
  ]
94
- }, n))
133
+ }, e.index))
134
+ }),
135
+ K && /* @__PURE__ */ f("span", {
136
+ className: "select-visually-hidden",
137
+ "aria-live": "polite",
138
+ children: q ? `${q.label}: ${g(q.value)} (${H(q.value)})` : ""
95
139
  }),
96
- /* @__PURE__ */ l(i, { tip: x.tip })
140
+ /* @__PURE__ */ f(s, { tip: J })
97
141
  ]
98
142
  });
99
143
  });
100
144
  //#endregion
101
- export { d as SelectDonut };
145
+ export { h as SelectDonut };
102
146
 
103
147
  //# sourceMappingURL=SelectDonut.js.map
@@ -1,10 +1,12 @@
1
1
  import { ReactNode } from 'react';
2
- export declare function SelectFormModal({ open, onClose, onSubmit, title, subtitle, children, submitLabel: submitLabelProp, cancelLabel: cancelLabelProp, submitting, submitDisabled, submitVariant, error, size, theme, }: {
2
+ export declare function SelectFormModal({ open, onClose, onSubmit, title, subtitle, description, children, submitLabel: submitLabelProp, cancelLabel: cancelLabelProp, submitting, submitDisabled, submitVariant, error, size, theme, }: {
3
3
  open: boolean;
4
4
  onClose: () => void;
5
5
  onSubmit: () => void;
6
6
  title: ReactNode;
7
7
  subtitle?: ReactNode;
8
+ /** 0.1.230: a descrição no começo do corpo (o lugar dela no modal novo; o `subtitle` fica na cabeça). */
9
+ description?: ReactNode;
8
10
  children: ReactNode;
9
11
  submitLabel?: string;
10
12
  cancelLabel?: string;
@@ -5,42 +5,43 @@ import { detectSelectTheme as r } from "./detectSelectTheme.js";
5
5
  import { SelectModal as i, SelectModalActions as a } from "./SelectModal.js";
6
6
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
7
  //#region src/SelectFormModal.tsx
8
- function c({ open: c, onClose: l, onSubmit: u, title: d, subtitle: f, children: p, submitLabel: m, cancelLabel: h, submitting: g = !1, submitDisabled: _ = !1, submitVariant: v = "primary", error: y, size: b = "md", theme: x }) {
9
- let S = t().common, C = m ?? S.save, w = h ?? S.cancel;
8
+ function c({ open: c, onClose: l, onSubmit: u, title: d, subtitle: f, description: p, children: m, submitLabel: h, cancelLabel: g, submitting: _ = !1, submitDisabled: v = !1, submitVariant: y = "primary", error: b, size: x = "md", theme: S }) {
9
+ let C = t().common, w = h ?? C.save, T = g ?? C.cancel;
10
10
  return /* @__PURE__ */ s(i, {
11
11
  open: c,
12
12
  onClose: l,
13
13
  title: d,
14
14
  subtitle: f,
15
- size: b,
16
- theme: x ?? r(),
15
+ description: p,
16
+ size: x,
17
+ theme: S ?? r(),
17
18
  footer: /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(e, {
18
19
  variant: "secondary",
19
20
  size: "sm",
20
21
  inline: !0,
21
22
  onClick: l,
22
- disabled: g,
23
- children: w
23
+ disabled: _,
24
+ children: T
24
25
  }), /* @__PURE__ */ o(e, {
25
- variant: v,
26
+ variant: y,
26
27
  size: "sm",
27
28
  inline: !0,
28
- loading: g,
29
- disabled: _,
29
+ loading: _,
30
+ disabled: v,
30
31
  onClick: () => u(),
31
- children: C
32
+ children: w
32
33
  })] }),
33
- children: [y != null && y !== !1 && /* @__PURE__ */ o("div", {
34
+ children: [b != null && b !== !1 && /* @__PURE__ */ o("div", {
34
35
  className: "select-formmodal__error",
35
36
  children: /* @__PURE__ */ o(n, {
36
37
  tone: "critical",
37
- children: y
38
+ children: b
38
39
  })
39
40
  }), /* @__PURE__ */ o("form", {
40
41
  onSubmit: (e) => {
41
42
  e.preventDefault(), u();
42
43
  },
43
- children: p
44
+ children: m
44
45
  })]
45
46
  });
46
47
  }
@@ -3,6 +3,8 @@ 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
+ /** 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. */
7
+ columns?: 2 | 3 | 4;
6
8
  };
7
9
  export type SelectKpiBandProps = SelectKpiBandOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectKpiBandOwnProps>;
8
10
  export declare const SelectKpiBand: import('react').ForwardRefExoticComponent<SelectKpiBandOwnProps & Omit<Omit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectKpiBandOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
@@ -4,21 +4,21 @@ import { KpiListContext as t } from "./internal/kpiList.js";
4
4
  import { forwardRef as n } from "react";
5
5
  import { jsx as r } from "react/jsx-runtime";
6
6
  //#region src/SelectKpiBand.tsx
7
- var i = n(function({ children: n, as: i = "div", className: a, ...o }, s) {
8
- let c = `select-kpiband${e() ? " select-kpiband--nested" : ""}${a ? " " + a : ""}`;
7
+ var i = n(function({ children: n, as: i = "div", columns: a, className: o, ...s }, c) {
8
+ let l = e(), u = `select-kpiband${l ? " select-kpiband--nested" : ""}${a && !l ? ` select-kpiband--cols-${a}` : ""}${o ? " " + o : ""}`;
9
9
  return i === "dl" ? /* @__PURE__ */ r(t.Provider, {
10
10
  value: !0,
11
11
  children: /* @__PURE__ */ r("dl", {
12
- ref: s,
13
- ...o,
14
- className: c,
12
+ ref: c,
13
+ ...s,
14
+ className: u,
15
15
  children: n
16
16
  })
17
17
  }) : /* @__PURE__ */ r("div", {
18
- ref: s,
18
+ ref: c,
19
19
  role: "group",
20
- ...o,
21
- className: c,
20
+ ...s,
21
+ className: u,
22
22
  children: n
23
23
  });
24
24
  });
@@ -81,6 +81,10 @@ export interface SelectKitMessages {
81
81
  progressLabel: string;
82
82
  progress: (done: string, total: string) => string;
83
83
  };
84
+ /** 0.1.230: os textos dos gráficos — a linha da dica da rosca (`SelectDonut`). */
85
+ chart: {
86
+ value: string;
87
+ };
84
88
  sideNav: {
85
89
  pending: (hint: string) => string;
86
90
  };
@@ -86,6 +86,7 @@ var r = {
86
86
  progressLabel: "Progresso",
87
87
  progress: (e, t) => `${e} de ${t}`
88
88
  },
89
+ chart: { value: "Valor" },
89
90
  sideNav: { pending: (e) => `${e} (com pendências)` },
90
91
  auth: {
91
92
  digit: (e) => `Dígito ${e}`,
@@ -250,6 +251,7 @@ var r = {
250
251
  progressLabel: "Progress",
251
252
  progress: (e, t) => `${e} of ${t}`
252
253
  },
254
+ chart: { value: "Value" },
253
255
  sideNav: { pending: (e) => `${e} (pending)` },
254
256
  auth: {
255
257
  digit: (e) => `Digit ${e}`,
@@ -7,13 +7,18 @@ export declare function SelectModalActions({ children, className }: {
7
7
  children: ReactNode;
8
8
  className?: string;
9
9
  }): import("react").JSX.Element;
10
- export declare function SelectModal({ open, onClose, eyebrow, title, subtitle, badge, children, footer, aside, size, showClose, noise, dividedHeader, backdrop, theme, placement, headerAction, flush, dismissible, }: {
10
+ export declare function SelectModal({ open, onClose, eyebrow, title, subtitle, description, badge, children, footer, aside, size, showClose, noise, dividedHeader, backdrop, theme, placement, headerAction, flush, dismissible, }: {
11
11
  open: boolean;
12
12
  onClose: () => void;
13
13
  /** Uma linha de contexto acima do título ("Passo a passo · ponto 1 de 5"). */
14
14
  eyebrow?: ReactNode;
15
15
  title?: ReactNode;
16
16
  subtitle?: ReactNode;
17
+ /**
18
+ * 0.1.230: a descrição do diálogo no COMEÇO do corpo, em texto secundário (o cabeçalho fica só com o título). É o lugar
19
+ * dela no modal novo; o `subtitle` (na cabeça) fica para quem já o usa.
20
+ */
21
+ description?: ReactNode;
17
22
  /** 0.1.184: o selo da situação (`SelectBadge`), na linha do subtítulo, antes dele ("Aberto · Chamado · Estorno"). */
18
23
  badge?: ReactNode;
19
24
  children?: ReactNode;