@selectwin/kit 0.1.256 → 0.1.258

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 (44) hide show
  1. package/README.md +57 -0
  2. package/dist/SelectActionList.d.ts +5 -0
  3. package/dist/SelectActionList.js +55 -39
  4. package/dist/SelectAppFrame.d.ts +8 -2
  5. package/dist/SelectAppFrame.js +124 -119
  6. package/dist/SelectAvatarGroup.d.ts +31 -0
  7. package/dist/SelectAvatarGroup.js +39 -0
  8. package/dist/SelectBadge.d.ts +1 -1
  9. package/dist/SelectChannelPreview.d.ts +15 -5
  10. package/dist/SelectChannelPreview.js +94 -54
  11. package/dist/SelectConversationNote.d.ts +37 -0
  12. package/dist/SelectConversationNote.js +93 -0
  13. package/dist/SelectFieldset.d.ts +14 -0
  14. package/dist/SelectFieldset.js +27 -0
  15. package/dist/SelectFilterBar.d.ts +6 -1
  16. package/dist/SelectFilterBar.js +153 -123
  17. package/dist/SelectImageUploadField.d.ts +5 -3
  18. package/dist/SelectImageUploadField.js +26 -26
  19. package/dist/SelectKanban.d.ts +13 -1
  20. package/dist/SelectKanban.js +72 -50
  21. package/dist/SelectLocale.d.ts +40 -0
  22. package/dist/SelectLocale.js +560 -511
  23. package/dist/SelectMail.d.ts +17 -2
  24. package/dist/SelectMail.js +9 -6
  25. package/dist/SelectModal.d.ts +10 -4
  26. package/dist/SelectModal.js +158 -137
  27. package/dist/SelectSegmented.d.ts +7 -0
  28. package/dist/SelectSegmented.js +51 -43
  29. package/dist/SelectSideNav.d.ts +2 -1
  30. package/dist/SelectSideNav.js +156 -135
  31. package/dist/SelectSortable.d.ts +47 -1
  32. package/dist/SelectSortable.js +138 -19
  33. package/dist/SelectSteps.d.ts +3 -0
  34. package/dist/SelectSteps.js +42 -31
  35. package/dist/SelectTimeline.d.ts +4 -0
  36. package/dist/SelectTimeline.js +20 -9
  37. package/dist/SelectTriggerMenu.d.ts +77 -0
  38. package/dist/SelectTriggerMenu.js +98 -0
  39. package/dist/index.d.ts +11 -0
  40. package/dist/index.js +186 -182
  41. package/dist/internal/navCount.d.ts +21 -0
  42. package/dist/internal/navCount.js +27 -0
  43. package/dist/style.css +1 -1
  44. package/package.json +1 -1
@@ -2,161 +2,166 @@ import { ChevronDownIcon as e, CloseIcon as t, MenuIcon as n } from "./icons.js"
2
2
  import { useSelectMessages as r } from "./SelectLocale.js";
3
3
  import { SelectIconButton as i } from "./SelectIconButton.js";
4
4
  import { selectScrollClass as a } from "./SelectScrollArea.js";
5
- import { createContext as o, forwardRef as s, useContext as c, useEffect as l, useLayoutEffect as u, useRef as d, useState as f } from "react";
6
- import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
7
- import { Link as g } from "react-router-dom";
5
+ import { NavCount as o, useNavCountName as s } from "./internal/navCount.js";
6
+ import { createContext as c, forwardRef as l, useContext as u, useEffect as d, useLayoutEffect as f, useRef as p, useState as m } from "react";
7
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
8
+ import { Link as v } from "react-router-dom";
8
9
  //#region src/SelectAppFrame.tsx
9
- var _ = (...e) => e.filter(Boolean).join(" "), v = o(!1);
10
- function y({ skip: e, contained: t = !1, className: n, children: r, ...i }) {
11
- return /* @__PURE__ */ h("div", {
10
+ var y = (...e) => e.filter(Boolean).join(" "), b = c(!1);
11
+ function x({ skip: e, contained: t = !1, className: n, children: r, ...i }) {
12
+ return /* @__PURE__ */ _("div", {
12
13
  ...i,
13
- className: _("select-appframe", t && "select-appframe--contained", n),
14
- children: [e && /* @__PURE__ */ m("a", {
14
+ className: y("select-appframe", t && "select-appframe--contained", n),
15
+ children: [e && /* @__PURE__ */ g("a", {
15
16
  href: e.to,
16
17
  className: "select-appframe__skip",
17
18
  children: e.label
18
- }), t ? /* @__PURE__ */ m(v.Provider, {
19
+ }), t ? /* @__PURE__ */ g(b.Provider, {
19
20
  value: !0,
20
21
  children: r
21
22
  }) : r]
22
23
  });
23
24
  }
24
- function b({ rail: e, scrollRef: t, fill: n = !1, className: r, children: i, ...o }) {
25
- let s = c(v);
26
- return /* @__PURE__ */ h("div", {
25
+ function S({ rail: e, scrollRef: t, fill: n = !1, className: r, children: i, ...o }) {
26
+ let s = u(b);
27
+ return /* @__PURE__ */ _("div", {
27
28
  ...o,
28
- className: _("select-appframe__panel", r),
29
- children: [e, s ? /* @__PURE__ */ m("div", {
29
+ className: y("select-appframe__panel", r),
30
+ children: [e, s ? /* @__PURE__ */ g("div", {
30
31
  ref: t,
31
- className: _("select-appframe__scroll", a("y"), n && "select-appframe__scroll--fill"),
32
+ className: y("select-appframe__scroll", a("y"), n && "select-appframe__scroll--fill"),
32
33
  children: i
33
34
  }) : i]
34
35
  });
35
36
  }
36
- var x = s(function({ aside: e, asideCompact: t, className: n, children: r, ...i }, a) {
37
+ var C = l(function({ aside: e, asideCompact: t, className: n, children: r, ...i }, a) {
37
38
  let o = e != null || t != null;
38
- return /* @__PURE__ */ h("main", {
39
+ return /* @__PURE__ */ _("main", {
39
40
  ref: a,
40
41
  ...i,
41
- className: _("select-appframe__main", o && "select-appframe__main--aside", n),
42
- children: [o && /* @__PURE__ */ h("div", {
42
+ className: y("select-appframe__main", o && "select-appframe__main--aside", n),
43
+ children: [o && /* @__PURE__ */ _("div", {
43
44
  className: "select-appframe__aside",
44
- children: [e != null && /* @__PURE__ */ m("div", {
45
+ children: [e != null && /* @__PURE__ */ g("div", {
45
46
  className: "select-appframe__asidenav",
46
47
  children: e
47
- }), t != null && /* @__PURE__ */ m("div", {
48
+ }), t != null && /* @__PURE__ */ g("div", {
48
49
  className: "select-appframe__asidecompact",
49
50
  children: t
50
51
  })]
51
52
  }), r]
52
53
  });
53
54
  });
54
- function S({ pages: e, onPick: t }) {
55
- return /* @__PURE__ */ m(p, { children: e.map((e) => /* @__PURE__ */ m(g, {
55
+ function w({ pages: e, onPick: t }) {
56
+ return /* @__PURE__ */ g(h, { children: e.map((e) => /* @__PURE__ */ _(v, {
56
57
  to: e.to,
57
- className: _("select-apprail__page", e.current && "is-active"),
58
+ className: y("select-apprail__page", e.current && "is-active"),
58
59
  "aria-current": e.current ? "page" : void 0,
59
60
  onClick: t,
60
- children: e.label
61
+ children: [e.label, /* @__PURE__ */ g(o, { item: e })]
61
62
  }, e.id)) });
62
63
  }
63
- function C({ items: t, wide: n, open: r, setOpen: i, flyout: a, setFlyout: o, up: s = !1, t: c }) {
64
- var f, p;
65
- let v = t.findIndex((e) => e.active), y = d(0);
66
- v >= 0 && (y.current = v);
67
- let b = n ? t.findIndex((e) => {
64
+ function T({ items: t, wide: n, open: r, setOpen: i, flyout: a, setFlyout: c, up: l = !1, t: u }) {
65
+ var m, h;
66
+ let b = t.findIndex((e) => e.active), x = p(0);
67
+ b >= 0 && (x.current = b);
68
+ let S = n ? t.findIndex((e) => {
68
69
  var t;
69
70
  return e.id === r && (((t = e.pages) == null ? void 0 : t.length) ?? 0) > 0;
70
- }) : -1, x = b >= 0 && b < y.current ? ((f = t[b].pages) == null ? void 0 : f.length) ?? 0 : 0, C = d(null), w = d(null), T = (p = t.flatMap((e) => e.pages ?? []).find((e) => e.current)) == null ? void 0 : p.id;
71
- return u(() => {
72
- let e = w.current;
73
- e && (e.style.setProperty("--rail-i", String(y.current)), e.style.setProperty("--rail-pn", String(x)), e.style.setProperty("--rail-pb", x > 0 ? "1" : "0"));
74
- }), l(() => {
71
+ }) : -1, C = S >= 0 && S < x.current ? ((m = t[S].pages) == null ? void 0 : m.length) ?? 0 : 0, T = p(null), E = p(null), D = (h = t.flatMap((e) => e.pages ?? []).find((e) => e.current)) == null ? void 0 : h.id, O = s();
72
+ return f(() => {
73
+ let e = E.current;
74
+ e && (e.style.setProperty("--rail-i", String(x.current)), e.style.setProperty("--rail-pn", String(C)), e.style.setProperty("--rail-pb", C > 0 ? "1" : "0"));
75
+ }), d(() => {
75
76
  var e, t;
76
- n && ((e = C.current) == null || (e = e.querySelector(".select-apprail__page[aria-current=\"page\"]")) == null || (t = e.scrollIntoView) == null || t.call(e, { block: "nearest" }));
77
+ n && ((e = T.current) == null || (e = e.querySelector(".select-apprail__page[aria-current=\"page\"]")) == null || (t = e.scrollIntoView) == null || t.call(e, { block: "nearest" }));
77
78
  }, [
78
- T,
79
+ D,
79
80
  r,
80
81
  n
81
- ]), /* @__PURE__ */ h("div", {
82
- ref: C,
83
- className: _("select-apprail__pill", n && "is-wide"),
84
- children: [/* @__PURE__ */ m("span", {
85
- ref: w,
86
- className: _("select-apprail__ind", v >= 0 && "is-on"),
82
+ ]), /* @__PURE__ */ _("div", {
83
+ ref: T,
84
+ className: y("select-apprail__pill", n && "is-wide"),
85
+ children: [/* @__PURE__ */ g("span", {
86
+ ref: E,
87
+ className: y("select-apprail__ind", b >= 0 && "is-on"),
87
88
  "aria-hidden": "true"
88
89
  }), t.map((t) => {
89
- let l = t.pages ?? [], u = l.length > 0, d = n && u && r === t.id, f = !n && u && a === t.id;
90
- return /* @__PURE__ */ h("div", {
90
+ let s = t.pages ?? [], d = s.length > 0, f = n && d && r === t.id, p = !n && d && a === t.id;
91
+ return /* @__PURE__ */ _("div", {
91
92
  className: "select-apprail__slot",
92
93
  children: [
93
- /* @__PURE__ */ h(g, {
94
+ /* @__PURE__ */ _(v, {
94
95
  to: t.to,
95
- className: _("select-apprail__btn", t.active && "is-active"),
96
- "aria-label": t.label,
96
+ className: y("select-apprail__btn", t.active && "is-active"),
97
+ "aria-label": O(t.label, t),
97
98
  "aria-current": t.active ? "true" : void 0,
98
- "aria-expanded": u ? d || f : void 0,
99
+ "aria-expanded": d ? f || p : void 0,
99
100
  onClick: (e) => {
100
- if (!u) {
101
- o(null);
101
+ if (!d) {
102
+ c(null);
102
103
  return;
103
104
  }
104
105
  if (!n) {
105
- e.preventDefault(), o(f ? null : t.id);
106
+ e.preventDefault(), c(p ? null : t.id);
106
107
  return;
107
108
  }
108
- d && t.active && e.preventDefault(), i(d ? null : t.id);
109
+ f && t.active && e.preventDefault(), i(f ? null : t.id);
109
110
  },
110
111
  children: [
111
- /* @__PURE__ */ m("span", {
112
+ /* @__PURE__ */ _("span", {
112
113
  className: "select-apprail__icon",
113
114
  "aria-hidden": "true",
114
- children: t.icon
115
+ children: [t.icon, /* @__PURE__ */ g(o, {
116
+ item: t,
117
+ corner: !0,
118
+ spoken: !1
119
+ })]
115
120
  }),
116
- /* @__PURE__ */ m("span", {
121
+ /* @__PURE__ */ g("span", {
117
122
  className: "select-apprail__label",
118
123
  "aria-hidden": "true",
119
124
  children: t.label
120
125
  }),
121
- u && /* @__PURE__ */ m("span", {
122
- className: _("select-apprail__chev", d && "is-open"),
126
+ d && /* @__PURE__ */ g("span", {
127
+ className: y("select-apprail__chev", f && "is-open"),
123
128
  "aria-hidden": "true",
124
- children: /* @__PURE__ */ m(e, {})
129
+ children: /* @__PURE__ */ g(e, {})
125
130
  }),
126
- !n && !f && /* @__PURE__ */ h("span", {
131
+ !n && !p && /* @__PURE__ */ _("span", {
127
132
  className: "select-apprail__tip",
128
133
  "aria-hidden": "true",
129
- children: [/* @__PURE__ */ m("span", {
134
+ children: [/* @__PURE__ */ g("span", {
130
135
  className: "select-apprail__name",
131
136
  children: t.label
132
- }), u && /* @__PURE__ */ m("span", {
137
+ }), d && /* @__PURE__ */ g("span", {
133
138
  className: "select-apprail__hint",
134
- children: c.seePages
139
+ children: u.seePages
135
140
  })]
136
141
  })
137
142
  ]
138
143
  }),
139
- f && /* @__PURE__ */ h("div", {
140
- className: _("select-apprail__fly", s && "select-apprail__fly--up"),
144
+ p && /* @__PURE__ */ _("div", {
145
+ className: y("select-apprail__fly", l && "select-apprail__fly--up"),
141
146
  role: "group",
142
- "aria-label": c.sectionPages(t.label),
143
- children: [/* @__PURE__ */ m("span", {
147
+ "aria-label": u.sectionPages(t.label),
148
+ children: [/* @__PURE__ */ g("span", {
144
149
  className: "select-apprail__flytitle",
145
150
  children: t.label
146
- }), /* @__PURE__ */ m(S, {
147
- pages: l,
148
- onPick: () => o(null)
151
+ }), /* @__PURE__ */ g(w, {
152
+ pages: s,
153
+ onPick: () => c(null)
149
154
  })]
150
155
  }),
151
- u && /* @__PURE__ */ m("div", {
152
- className: _("select-apprail__pagesw", d && "is-open"),
153
- children: /* @__PURE__ */ m("div", {
156
+ d && /* @__PURE__ */ g("div", {
157
+ className: y("select-apprail__pagesw", f && "is-open"),
158
+ children: /* @__PURE__ */ g("div", {
154
159
  className: "select-apprail__pagesclip",
155
- children: /* @__PURE__ */ m("div", {
160
+ children: /* @__PURE__ */ g("div", {
156
161
  className: "select-apprail__pages",
157
162
  role: "group",
158
- "aria-label": c.sectionPages(t.label),
159
- children: /* @__PURE__ */ m(S, { pages: l })
163
+ "aria-label": u.sectionPages(t.label),
164
+ children: /* @__PURE__ */ g(w, { pages: s })
160
165
  })
161
166
  })
162
167
  })
@@ -165,20 +170,20 @@ function C({ items: t, wide: n, open: r, setOpen: i, flyout: a, setFlyout: o, up
165
170
  })]
166
171
  });
167
172
  }
168
- function w({ label: e, wide: t, onToggle: i, items: a, bottom: o = [], shortcutKey: s = "[", toggleIcon: c, messages: u }) {
169
- var p, g;
170
- let v = {
173
+ function E({ label: e, wide: t, onToggle: i, items: a, bottom: o = [], shortcutKey: s = "[", toggleIcon: c, messages: l }) {
174
+ var u, f;
175
+ let h = {
171
176
  ...r().appFrame.rail,
172
- ...u
173
- }, y = [...a, ...o], b = ((p = y.find((e) => e.active)) == null ? void 0 : p.id) ?? null, x = ((g = y.flatMap((e) => e.pages ?? []).find((e) => e.current)) == null ? void 0 : g.id) ?? null, [S, w] = f(b);
174
- l(() => w(b), [b]);
175
- let [T, E] = f(null), D = d(null);
176
- l(() => E(null), [
177
+ ...l
178
+ }, v = [...a, ...o], b = ((u = v.find((e) => e.active)) == null ? void 0 : u.id) ?? null, x = ((f = v.flatMap((e) => e.pages ?? []).find((e) => e.current)) == null ? void 0 : f.id) ?? null, [S, C] = m(b);
179
+ d(() => C(b), [b]);
180
+ let [w, E] = m(null), D = p(null);
181
+ d(() => E(null), [
177
182
  b,
178
183
  x,
179
184
  t
180
- ]), l(() => {
181
- if (!T) return;
185
+ ]), d(() => {
186
+ if (!w) return;
182
187
  let e = (e) => {
183
188
  var t;
184
189
  (t = D.current) != null && t.contains(e.target) || E(null);
@@ -188,9 +193,9 @@ function w({ label: e, wide: t, onToggle: i, items: a, bottom: o = [], shortcutK
188
193
  return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
189
194
  document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
190
195
  };
191
- }, [T]);
192
- let O = d(i);
193
- O.current = i, l(() => {
196
+ }, [w]);
197
+ let O = p(i);
198
+ O.current = i, d(() => {
194
199
  if (!s) return;
195
200
  let e = (e) => {
196
201
  if (e.key !== s || e.metaKey || e.ctrlKey || e.altKey) return;
@@ -199,50 +204,50 @@ function w({ label: e, wide: t, onToggle: i, items: a, bottom: o = [], shortcutK
199
204
  };
200
205
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
201
206
  }, [s]);
202
- let k = t ? v.collapse : v.expand, A = (e, n = !1) => /* @__PURE__ */ m(C, {
207
+ let k = t ? h.collapse : h.expand, A = (e, n = !1) => /* @__PURE__ */ g(T, {
203
208
  items: e,
204
209
  wide: t,
205
210
  open: S,
206
- setOpen: w,
207
- flyout: T,
211
+ setOpen: C,
212
+ flyout: w,
208
213
  setFlyout: E,
209
214
  up: n,
210
- t: v
215
+ t: h
211
216
  });
212
- return /* @__PURE__ */ h("nav", {
217
+ return /* @__PURE__ */ _("nav", {
213
218
  ref: D,
214
219
  "aria-label": e,
215
- className: _("select-apprail", t && "is-wide"),
216
- children: [/* @__PURE__ */ h("div", {
220
+ className: y("select-apprail", t && "is-wide"),
221
+ children: [/* @__PURE__ */ _("div", {
217
222
  className: "select-apprail__top",
218
- children: [/* @__PURE__ */ h("button", {
223
+ children: [/* @__PURE__ */ _("button", {
219
224
  type: "button",
220
225
  className: "select-apprail__toggle",
221
226
  "aria-expanded": t,
222
227
  "aria-label": k,
223
228
  onClick: i,
224
229
  children: [
225
- /* @__PURE__ */ m("span", {
230
+ /* @__PURE__ */ g("span", {
226
231
  className: "select-apprail__icon",
227
232
  "aria-hidden": "true",
228
- children: c ?? /* @__PURE__ */ m(n, {})
233
+ children: c ?? /* @__PURE__ */ g(n, {})
229
234
  }),
230
- /* @__PURE__ */ m("span", {
235
+ /* @__PURE__ */ g("span", {
231
236
  className: "select-apprail__label",
232
237
  "aria-hidden": "true",
233
238
  children: k
234
239
  }),
235
- s && /* @__PURE__ */ m("kbd", {
240
+ s && /* @__PURE__ */ g("kbd", {
236
241
  className: "select-apprail__kbd",
237
242
  "aria-hidden": "true",
238
243
  children: s
239
244
  }),
240
- !t && /* @__PURE__ */ m("span", {
245
+ !t && /* @__PURE__ */ g("span", {
241
246
  className: "select-apprail__tip",
242
247
  "aria-hidden": "true",
243
- children: /* @__PURE__ */ m("span", {
248
+ children: /* @__PURE__ */ g("span", {
244
249
  className: "select-apprail__name",
245
- children: s ? v.shortcut(k, s) : k
250
+ children: s ? h.shortcut(k, s) : k
246
251
  })
247
252
  })
248
253
  ]
@@ -250,40 +255,40 @@ function w({ label: e, wide: t, onToggle: i, items: a, bottom: o = [], shortcutK
250
255
  }), o.length > 0 && A(o, !0)]
251
256
  });
252
257
  }
253
- function T({ id: e, open: n, onClose: a, label: o, logo: s, closeLabel: c, closeIcon: u, context: f, children: p }) {
254
- let g = r().appFrame, _ = d(null);
255
- return l(() => {
258
+ function D({ id: e, open: n, onClose: a, label: o, logo: s, closeLabel: c, closeIcon: l, context: u, children: f }) {
259
+ let m = r().appFrame, h = p(null);
260
+ return d(() => {
256
261
  var e, t;
257
- let r = _.current;
262
+ let r = h.current;
258
263
  r && (n && !r.open ? (e = r.showModal) == null || e.call(r) : !n && r.open && ((t = r.close) == null || t.call(r)));
259
- }, [n]), /* @__PURE__ */ m("dialog", {
260
- ref: _,
264
+ }, [n]), /* @__PURE__ */ g("dialog", {
265
+ ref: h,
261
266
  id: e,
262
267
  "aria-label": o,
263
268
  className: "select-appdrawer",
264
269
  onClose: a,
265
270
  onClick: (e) => e.target === e.currentTarget && a(),
266
- children: /* @__PURE__ */ h("div", {
271
+ children: /* @__PURE__ */ _("div", {
267
272
  className: "select-appdrawer__box",
268
273
  children: [
269
- /* @__PURE__ */ h("div", {
274
+ /* @__PURE__ */ _("div", {
270
275
  className: "select-appdrawer__head",
271
- children: [s, /* @__PURE__ */ m(i, {
272
- label: c ?? g.drawerClose,
273
- icon: u ?? /* @__PURE__ */ m(t, {}),
276
+ children: [s, /* @__PURE__ */ g(i, {
277
+ label: c ?? m.drawerClose,
278
+ icon: l ?? /* @__PURE__ */ g(t, {}),
274
279
  onClick: a
275
280
  })]
276
281
  }),
277
- f != null && /* @__PURE__ */ m("div", {
282
+ u != null && /* @__PURE__ */ g("div", {
278
283
  className: "select-appdrawer__context",
279
- children: f
284
+ children: u
280
285
  }),
281
- p
286
+ f
282
287
  ]
283
288
  })
284
289
  });
285
290
  }
286
291
  //#endregion
287
- export { T as SelectAppDrawer, y as SelectAppFrame, x as SelectAppMain, b as SelectAppPanel, w as SelectAppRail };
292
+ export { D as SelectAppDrawer, x as SelectAppFrame, C as SelectAppMain, S as SelectAppPanel, E as SelectAppRail };
288
293
 
289
294
  //# sourceMappingURL=SelectAppFrame.js.map
@@ -0,0 +1,31 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ export interface SelectAvatarGroupPerson {
3
+ /** O nome: as iniciais do rosto e o rótulo do grupo. */
4
+ name: string;
5
+ /** A foto; sem ela (ou quando ela não carrega), as iniciais. */
6
+ src?: string;
7
+ /** A sigla pronta, até 3 letras (vence o nome no rosto). */
8
+ monogram?: string;
9
+ /** A chave da lista (padrão: a posição e o nome). */
10
+ id?: string;
11
+ }
12
+ type SelectAvatarGroupOwnProps = {
13
+ /** As pessoas, na ordem em que aparecem. */
14
+ people: readonly SelectAvatarGroupPerson[];
15
+ /** O máximo de círculos, contando o "+N" (padrão 4; no mínimo 1). */
16
+ max?: number;
17
+ /** Quantas pessoas são, quando `people` é só uma amostra (padrão: o tamanho de `people`). */
18
+ total?: number;
19
+ /** O tamanho do `SelectAvatar`: `sm` (20px), `md` (36px, o padrão) ou `lg` (60px). */
20
+ size?: 'sm' | 'md' | 'lg';
21
+ /** O rótulo para o leitor de tela (padrão: "Ana, Bruno e mais 3"). */
22
+ label?: string;
23
+ };
24
+ export type SelectAvatarGroupProps = SelectAvatarGroupOwnProps & Omit<ComponentPropsWithoutRef<'span'>, keyof SelectAvatarGroupOwnProps | 'children'>;
25
+ /** Os rostos à vista e quantos ficam no "+N", pelo `max` e pelo `total`. */
26
+ export declare function avatarGroupSlots(count: number, people: number, max: number): {
27
+ faces: number;
28
+ rest: number;
29
+ };
30
+ export declare const SelectAvatarGroup: import('react').ForwardRefExoticComponent<SelectAvatarGroupOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, "children" | keyof SelectAvatarGroupOwnProps> & import('react').RefAttributes<HTMLSpanElement>>;
31
+ export {};
@@ -0,0 +1,39 @@
1
+ import { formatSelectNumber as e, useSelectLocale as t, useSelectMessages as n } from "./SelectLocale.js";
2
+ import { SelectAvatar as r } from "./SelectAvatar.js";
3
+ import { forwardRef as i } from "react";
4
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
+ //#region src/SelectAvatarGroup.tsx
6
+ function s(e, t, n) {
7
+ let r = Number.isFinite(n) ? Math.max(1, Math.floor(n)) : Infinity, i = Math.max(e, t), a = Math.min(t, i <= r ? r : r - 1);
8
+ return {
9
+ faces: a,
10
+ rest: i - a
11
+ };
12
+ }
13
+ var c = i(function({ people: i, max: c = 4, total: l, size: u = "md", label: d, className: f, ...p }, m) {
14
+ let h = n().avatarGroup, g = t(), { faces: _, rest: v } = s(l ?? i.length, i.length, c);
15
+ if (_ + v === 0) return null;
16
+ let y = i.slice(0, _), b = y.map((e) => e.name.trim()).filter(Boolean), x = d ?? h.label(b, v + (y.length - b.length));
17
+ return /* @__PURE__ */ o("span", {
18
+ ref: m,
19
+ role: "img",
20
+ "aria-label": x,
21
+ ...p,
22
+ className: `select-avatargroup select-avatargroup--${u}${f ? ` ${f}` : ""}`,
23
+ children: [y.map((e, t) => /* @__PURE__ */ a(r, {
24
+ name: e.name,
25
+ src: e.src,
26
+ monogram: e.monogram,
27
+ initials: u === "sm" ? 1 : 2,
28
+ size: u
29
+ }, e.id ?? `${t}:${e.name}`)), v > 0 && /* @__PURE__ */ o("span", {
30
+ className: "select-avatargroup__more",
31
+ "aria-hidden": "true",
32
+ children: ["+", e(v, g)]
33
+ })]
34
+ });
35
+ });
36
+ //#endregion
37
+ export { c as SelectAvatarGroup, s as avatarGroupSlots };
38
+
39
+ //# sourceMappingURL=SelectAvatarGroup.js.map
@@ -1,7 +1,7 @@
1
1
  import { ReactNode, ComponentPropsWithoutRef } from 'react';
2
2
  type SelectBadgeOwnProps = {
3
3
  children: ReactNode;
4
- tone?: 'neutral' | 'brand' | 'pro' | 'success' | 'info' | 'warning' | 'critical' | 'outline';
4
+ tone?: 'neutral' | 'brand' | 'pro' | 'success' | 'info' | 'warning' | 'critical' | 'outline' | 'teal' | 'amber';
5
5
  icon?: ReactNode;
6
6
  /** 'sm' compacts the pill for dense surfaces. Cells of .select-datatable adopt the
7
7
  * compact metrics automatically — pass 'sm' only for dense chrome OUTSIDE tables. */
@@ -3,14 +3,24 @@ import { ReactNode } from 'react';
3
3
  export declare function SelectPreviewStage({ children }: {
4
4
  children: ReactNode;
5
5
  }): import("react").JSX.Element;
6
- /** O celular: o cabeçalho do app (o do WhatsApp verde, o do SMS com o contato no meio) e a conversa. */
7
- export declare function SelectDeviceFrame({ variant, title, subtitle, children, }: {
8
- variant: 'whatsapp' | 'sms';
9
- /** Quem manda (o nome da loja; no SMS, o número ou o remetente). */
6
+ export interface SelectDeviceFrameProps {
7
+ /** `whatsapp` e `sms`: o celular da conversa. 0.1.258, `page`: a página inteira, no navegador ou no celular. */
8
+ variant: 'whatsapp' | 'sms' | 'page';
9
+ /** Quem manda (o nome da loja; no SMS, o número ou o remetente). Só na conversa. */
10
10
  title?: string;
11
11
  subtitle?: string;
12
+ /** 0.1.258, só na página: `desktop` (o padrão, o navegador na largura toda) ou `mobile` (o celular de 390 px). */
13
+ device?: 'desktop' | 'mobile';
14
+ /** 0.1.258, só na página: o endereço na barra, sem o `https://` ("contato.loja.com.br/f/orcamento"). */
15
+ address?: string;
16
+ /** 0.1.258, só na página: a altura visível (px ou CSS); a página rola por dentro, no scroll padrão. Sem ela, a moldura cresce com a página. */
17
+ height?: number | string;
18
+ /** 0.1.258, só na página com `height`: o nome da área que rola (padrão "Pré-visualização da página"). */
19
+ label?: string;
12
20
  children: ReactNode;
13
- }): import("react").JSX.Element;
21
+ }
22
+ /** O celular: o cabeçalho do app (o do WhatsApp verde, o do SMS com o contato no meio) e a conversa. 0.1.258: ou a página. */
23
+ export declare function SelectDeviceFrame({ variant, title, subtitle, device, address, height, label, children }: SelectDeviceFrameProps): import("react").JSX.Element;
14
24
  /**
15
25
  * O balão da mensagem. `media` é o rótulo do anexo ("Imagem", "nota.pdf"); `buttons`, os botões do modelo aprovado,
16
26
  * colados embaixo como o WhatsApp desenha; `empty` mostra o texto apagado (a caixa ainda vazia). `backdrop` põe o fundo