@selectwin/kit 0.1.255 → 0.1.256

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/README.md CHANGED
@@ -74,6 +74,18 @@ não o verde do WhatsApp; os tons do chat se trocam pelos `--select-chat-*` (a l
74
74
  O vazio das listas tem módulo próprio (0.1.234): o `SelectTableEmpty` só depende do React, e a `SelectCardGrid` não
75
75
  leva mais a tabela nem o GSAP. O teste `SelectTableEmpty.test.ts` trava esse grafo de imports.
76
76
 
77
+ O scroll padrão (0.1.256): o `SelectScrollArea` é a caixa que rola com a barra fina do kit — o polegar no cinza da borda
78
+ do campo (`--select-scrollbar-thumb`, mais escuro com o mouse em cima: `--select-scrollbar-thumb-hover`), a trilha
79
+ transparente, a calha guardada no eixo vertical e a rolagem que não passa para a página. `axis` escolhe o eixo (`y`, o
80
+ padrão, `x` ou `both`), `hideBar` esconde a barra (a tira que corre de lado), `label` faz do conteúdo sem nada focável
81
+ uma região que entra no Tab, e `as` troca a tag. O desenho é a classe `.select-scroll` (`--y`, `--x`, `--both`,
82
+ `--nobar`), e as barras finas dos componentes leem os mesmos tokens. Num módulo próprio, que só depende do React.
83
+
84
+ A moldura sem a rolagem da janela (0.1.256): `SelectAppFrame contained` (opcional; sem ela, nada muda). A moldura ocupa a
85
+ tela, a barra e o trilho ficam parados e a página rola no invólucro do `SelectAppPanel`, de ponta a ponta à direita do
86
+ trilho, com a barra na borda do painel. O `scrollRef` do painel entrega o invólucro (para voltar ao topo na troca de
87
+ página), e o `fill` serve à página de altura cheia: a coluna da página tem a altura do invólucro e é uma coluna flex.
88
+
77
89
  ## Build
78
90
 
79
91
  ```bash
@@ -1,4 +1,4 @@
1
- import { ComponentPropsWithoutRef, ReactNode } from 'react';
1
+ import { ComponentPropsWithoutRef, ReactNode, Ref } from 'react';
2
2
  import { SelectKitMessages } from './SelectLocale';
3
3
  export interface SelectAppFrameProps extends ComponentPropsWithoutRef<'div'> {
4
4
  /** O "Pular para o conteúdo": o primeiro Tab da página leva direto à coluna dela. */
@@ -6,15 +6,34 @@ export interface SelectAppFrameProps extends ComponentPropsWithoutRef<'div'> {
6
6
  to: string;
7
7
  label: string;
8
8
  };
9
+ /**
10
+ * 0.1.256: a janela não rola. A moldura ocupa a tela, a barra e o trilho ficam parados e a página rola dentro do painel,
11
+ * no invólucro de ponta a ponta à direita do trilho (o `scrollRef` do `SelectAppPanel`). Padrão `false`: nada muda.
12
+ */
13
+ contained?: boolean;
9
14
  }
10
15
  /** O fundo escuro de toda a tela (o da barra: o painel claro sobe dele) e o atalho para o conteúdo. */
11
- export declare function SelectAppFrame({ skip, className, children, ...rest }: SelectAppFrameProps): import("react").JSX.Element;
16
+ export declare function SelectAppFrame({ skip, contained, className, children, ...rest }: SelectAppFrameProps): import("react").JSX.Element;
12
17
  export interface SelectAppPanelProps extends ComponentPropsWithoutRef<'div'> {
13
18
  /** O trilho das seções (`SelectAppRail`): no computador, numa coluna à esquerda; abaixo de 1024 px, some. */
14
19
  rail?: ReactNode;
20
+ /**
21
+ * 0.1.256, na moldura `contained`: o invólucro que rola a página. É por ele que o app volta ao topo na troca de página
22
+ * (`scrollTop = 0`) e lê a rolagem — a janela não rola.
23
+ */
24
+ scrollRef?: Ref<HTMLDivElement>;
25
+ /**
26
+ * 0.1.256, na moldura `contained`: a página de altura cheia (o construtor de um fluxo, a caixa de entrada). A coluna da
27
+ * página tem a altura do invólucro e é uma coluna flex — o filho com `flex: 1` ocupa o que sobra, sem medir a janela —,
28
+ * e o invólucro não guarda a calha da barra. Numa tela baixa demais, o invólucro rola.
29
+ */
30
+ fill?: boolean;
15
31
  }
16
- /** O painel claro de cantos redondos, embaixo da barra: o trilho e a página. */
17
- export declare function SelectAppPanel({ rail, className, children, ...rest }: SelectAppPanelProps): import("react").JSX.Element;
32
+ /**
33
+ * O painel claro de cantos redondos, embaixo da barra: o trilho e a página. Na moldura `contained`, a página vai no
34
+ * invólucro que rola (`select-appframe__scroll`), e o trilho fica fora dele, parado.
35
+ */
36
+ export declare function SelectAppPanel({ rail, scrollRef, fill, className, children, ...rest }: SelectAppPanelProps): import("react").JSX.Element;
18
37
  export interface SelectAppMainProps extends ComponentPropsWithoutRef<'main'> {
19
38
  /**
20
39
  * Um menu lateral da área (a Operação, com as páginas em grupos): uma coluna ao lado do conteúdo, embaixo do cabeçalho
@@ -1,153 +1,162 @@
1
1
  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
- import { forwardRef as a, useEffect as o, useLayoutEffect as s, useRef as c, useState as l } from "react";
5
- import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
6
- import { Link as p } from "react-router-dom";
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";
7
8
  //#region src/SelectAppFrame.tsx
8
- var m = (...e) => e.filter(Boolean).join(" ");
9
- function h({ skip: e, className: t, children: n, ...r }) {
10
- return /* @__PURE__ */ f("div", {
11
- ...r,
12
- className: m("select-appframe", t),
13
- children: [e && /* @__PURE__ */ d("a", {
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", {
12
+ ...i,
13
+ className: _("select-appframe", t && "select-appframe--contained", n),
14
+ children: [e && /* @__PURE__ */ m("a", {
14
15
  href: e.to,
15
16
  className: "select-appframe__skip",
16
17
  children: e.label
17
- }), n]
18
+ }), t ? /* @__PURE__ */ m(v.Provider, {
19
+ value: !0,
20
+ children: r
21
+ }) : r]
18
22
  });
19
23
  }
20
- function g({ rail: e, className: t, children: n, ...r }) {
21
- return /* @__PURE__ */ f("div", {
22
- ...r,
23
- className: m("select-appframe__panel", t),
24
- children: [e, n]
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", {
27
+ ...o,
28
+ className: _("select-appframe__panel", r),
29
+ children: [e, s ? /* @__PURE__ */ m("div", {
30
+ ref: t,
31
+ className: _("select-appframe__scroll", a("y"), n && "select-appframe__scroll--fill"),
32
+ children: i
33
+ }) : i]
25
34
  });
26
35
  }
27
- var _ = a(function({ aside: e, asideCompact: t, className: n, children: r, ...i }, a) {
36
+ var x = s(function({ aside: e, asideCompact: t, className: n, children: r, ...i }, a) {
28
37
  let o = e != null || t != null;
29
- return /* @__PURE__ */ f("main", {
38
+ return /* @__PURE__ */ h("main", {
30
39
  ref: a,
31
40
  ...i,
32
- className: m("select-appframe__main", o && "select-appframe__main--aside", n),
33
- children: [o && /* @__PURE__ */ f("div", {
41
+ className: _("select-appframe__main", o && "select-appframe__main--aside", n),
42
+ children: [o && /* @__PURE__ */ h("div", {
34
43
  className: "select-appframe__aside",
35
- children: [e != null && /* @__PURE__ */ d("div", {
44
+ children: [e != null && /* @__PURE__ */ m("div", {
36
45
  className: "select-appframe__asidenav",
37
46
  children: e
38
- }), t != null && /* @__PURE__ */ d("div", {
47
+ }), t != null && /* @__PURE__ */ m("div", {
39
48
  className: "select-appframe__asidecompact",
40
49
  children: t
41
50
  })]
42
51
  }), r]
43
52
  });
44
53
  });
45
- function v({ pages: e, onPick: t }) {
46
- return /* @__PURE__ */ d(u, { children: e.map((e) => /* @__PURE__ */ d(p, {
54
+ function S({ pages: e, onPick: t }) {
55
+ return /* @__PURE__ */ m(p, { children: e.map((e) => /* @__PURE__ */ m(g, {
47
56
  to: e.to,
48
- className: m("select-apprail__page", e.current && "is-active"),
57
+ className: _("select-apprail__page", e.current && "is-active"),
49
58
  "aria-current": e.current ? "page" : void 0,
50
59
  onClick: t,
51
60
  children: e.label
52
61
  }, e.id)) });
53
62
  }
54
- function y({ items: t, wide: n, open: r, setOpen: i, flyout: a, setFlyout: l, up: u = !1, t: h }) {
55
- var g, _;
56
- let y = t.findIndex((e) => e.active), b = c(0);
57
- y >= 0 && (b.current = y);
58
- let x = n ? t.findIndex((e) => {
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) => {
59
68
  var t;
60
69
  return e.id === r && (((t = e.pages) == null ? void 0 : t.length) ?? 0) > 0;
61
- }) : -1, S = x >= 0 && x < b.current ? ((g = t[x].pages) == null ? void 0 : g.length) ?? 0 : 0, C = c(null), w = c(null), T = (_ = t.flatMap((e) => e.pages ?? []).find((e) => e.current)) == null ? void 0 : _.id;
62
- return s(() => {
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(() => {
63
72
  let e = w.current;
64
- e && (e.style.setProperty("--rail-i", String(b.current)), e.style.setProperty("--rail-pn", String(S)), e.style.setProperty("--rail-pb", S > 0 ? "1" : "0"));
65
- }), o(() => {
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(() => {
66
75
  var e, t;
67
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" }));
68
77
  }, [
69
78
  T,
70
79
  r,
71
80
  n
72
- ]), /* @__PURE__ */ f("div", {
81
+ ]), /* @__PURE__ */ h("div", {
73
82
  ref: C,
74
- className: m("select-apprail__pill", n && "is-wide"),
75
- children: [/* @__PURE__ */ d("span", {
83
+ className: _("select-apprail__pill", n && "is-wide"),
84
+ children: [/* @__PURE__ */ m("span", {
76
85
  ref: w,
77
- className: m("select-apprail__ind", y >= 0 && "is-on"),
86
+ className: _("select-apprail__ind", v >= 0 && "is-on"),
78
87
  "aria-hidden": "true"
79
88
  }), t.map((t) => {
80
- let o = t.pages ?? [], s = o.length > 0, c = n && s && r === t.id, g = !n && s && a === t.id;
81
- return /* @__PURE__ */ f("div", {
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", {
82
91
  className: "select-apprail__slot",
83
92
  children: [
84
- /* @__PURE__ */ f(p, {
93
+ /* @__PURE__ */ h(g, {
85
94
  to: t.to,
86
- className: m("select-apprail__btn", t.active && "is-active"),
95
+ className: _("select-apprail__btn", t.active && "is-active"),
87
96
  "aria-label": t.label,
88
97
  "aria-current": t.active ? "true" : void 0,
89
- "aria-expanded": s ? c || g : void 0,
98
+ "aria-expanded": u ? d || f : void 0,
90
99
  onClick: (e) => {
91
- if (!s) {
92
- l(null);
100
+ if (!u) {
101
+ o(null);
93
102
  return;
94
103
  }
95
104
  if (!n) {
96
- e.preventDefault(), l(g ? null : t.id);
105
+ e.preventDefault(), o(f ? null : t.id);
97
106
  return;
98
107
  }
99
- c && t.active && e.preventDefault(), i(c ? null : t.id);
108
+ d && t.active && e.preventDefault(), i(d ? null : t.id);
100
109
  },
101
110
  children: [
102
- /* @__PURE__ */ d("span", {
111
+ /* @__PURE__ */ m("span", {
103
112
  className: "select-apprail__icon",
104
113
  "aria-hidden": "true",
105
114
  children: t.icon
106
115
  }),
107
- /* @__PURE__ */ d("span", {
116
+ /* @__PURE__ */ m("span", {
108
117
  className: "select-apprail__label",
109
118
  "aria-hidden": "true",
110
119
  children: t.label
111
120
  }),
112
- s && /* @__PURE__ */ d("span", {
113
- className: m("select-apprail__chev", c && "is-open"),
121
+ u && /* @__PURE__ */ m("span", {
122
+ className: _("select-apprail__chev", d && "is-open"),
114
123
  "aria-hidden": "true",
115
- children: /* @__PURE__ */ d(e, {})
124
+ children: /* @__PURE__ */ m(e, {})
116
125
  }),
117
- !n && !g && /* @__PURE__ */ f("span", {
126
+ !n && !f && /* @__PURE__ */ h("span", {
118
127
  className: "select-apprail__tip",
119
128
  "aria-hidden": "true",
120
- children: [/* @__PURE__ */ d("span", {
129
+ children: [/* @__PURE__ */ m("span", {
121
130
  className: "select-apprail__name",
122
131
  children: t.label
123
- }), s && /* @__PURE__ */ d("span", {
132
+ }), u && /* @__PURE__ */ m("span", {
124
133
  className: "select-apprail__hint",
125
- children: h.seePages
134
+ children: c.seePages
126
135
  })]
127
136
  })
128
137
  ]
129
138
  }),
130
- g && /* @__PURE__ */ f("div", {
131
- className: m("select-apprail__fly", u && "select-apprail__fly--up"),
139
+ f && /* @__PURE__ */ h("div", {
140
+ className: _("select-apprail__fly", s && "select-apprail__fly--up"),
132
141
  role: "group",
133
- "aria-label": h.sectionPages(t.label),
134
- children: [/* @__PURE__ */ d("span", {
142
+ "aria-label": c.sectionPages(t.label),
143
+ children: [/* @__PURE__ */ m("span", {
135
144
  className: "select-apprail__flytitle",
136
145
  children: t.label
137
- }), /* @__PURE__ */ d(v, {
138
- pages: o,
139
- onPick: () => l(null)
146
+ }), /* @__PURE__ */ m(S, {
147
+ pages: l,
148
+ onPick: () => o(null)
140
149
  })]
141
150
  }),
142
- s && /* @__PURE__ */ d("div", {
143
- className: m("select-apprail__pagesw", c && "is-open"),
144
- children: /* @__PURE__ */ d("div", {
151
+ u && /* @__PURE__ */ m("div", {
152
+ className: _("select-apprail__pagesw", d && "is-open"),
153
+ children: /* @__PURE__ */ m("div", {
145
154
  className: "select-apprail__pagesclip",
146
- children: /* @__PURE__ */ d("div", {
155
+ children: /* @__PURE__ */ m("div", {
147
156
  className: "select-apprail__pages",
148
157
  role: "group",
149
- "aria-label": h.sectionPages(t.label),
150
- children: /* @__PURE__ */ d(v, { pages: o })
158
+ "aria-label": c.sectionPages(t.label),
159
+ children: /* @__PURE__ */ m(S, { pages: l })
151
160
  })
152
161
  })
153
162
  })
@@ -156,19 +165,19 @@ function y({ items: t, wide: n, open: r, setOpen: i, flyout: a, setFlyout: l, up
156
165
  })]
157
166
  });
158
167
  }
159
- function b({ label: e, wide: t, onToggle: i, items: a, bottom: s = [], shortcutKey: u = "[", toggleIcon: p, messages: h }) {
160
- var g, _;
168
+ function w({ label: e, wide: t, onToggle: i, items: a, bottom: o = [], shortcutKey: s = "[", toggleIcon: c, messages: u }) {
169
+ var p, g;
161
170
  let v = {
162
171
  ...r().appFrame.rail,
163
- ...h
164
- }, b = [...a, ...s], x = ((g = b.find((e) => e.active)) == null ? void 0 : g.id) ?? null, S = ((_ = b.flatMap((e) => e.pages ?? []).find((e) => e.current)) == null ? void 0 : _.id) ?? null, [C, w] = l(x);
165
- o(() => w(x), [x]);
166
- let [T, E] = l(null), D = c(null);
167
- o(() => E(null), [
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
+ b,
168
178
  x,
169
- S,
170
179
  t
171
- ]), o(() => {
180
+ ]), l(() => {
172
181
  if (!T) return;
173
182
  let e = (e) => {
174
183
  var t;
@@ -180,101 +189,101 @@ function b({ label: e, wide: t, onToggle: i, items: a, bottom: s = [], shortcutK
180
189
  document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
181
190
  };
182
191
  }, [T]);
183
- let O = c(i);
184
- O.current = i, o(() => {
185
- if (!u) return;
192
+ let O = d(i);
193
+ O.current = i, l(() => {
194
+ if (!s) return;
186
195
  let e = (e) => {
187
- if (e.key !== u || e.metaKey || e.ctrlKey || e.altKey) return;
196
+ if (e.key !== s || e.metaKey || e.ctrlKey || e.altKey) return;
188
197
  let t = e.target;
189
198
  t && (t.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)) || O.current();
190
199
  };
191
200
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
192
- }, [u]);
193
- let k = t ? v.collapse : v.expand, A = (e, n = !1) => /* @__PURE__ */ d(y, {
201
+ }, [s]);
202
+ let k = t ? v.collapse : v.expand, A = (e, n = !1) => /* @__PURE__ */ m(C, {
194
203
  items: e,
195
204
  wide: t,
196
- open: C,
205
+ open: S,
197
206
  setOpen: w,
198
207
  flyout: T,
199
208
  setFlyout: E,
200
209
  up: n,
201
210
  t: v
202
211
  });
203
- return /* @__PURE__ */ f("nav", {
212
+ return /* @__PURE__ */ h("nav", {
204
213
  ref: D,
205
214
  "aria-label": e,
206
- className: m("select-apprail", t && "is-wide"),
207
- children: [/* @__PURE__ */ f("div", {
215
+ className: _("select-apprail", t && "is-wide"),
216
+ children: [/* @__PURE__ */ h("div", {
208
217
  className: "select-apprail__top",
209
- children: [/* @__PURE__ */ f("button", {
218
+ children: [/* @__PURE__ */ h("button", {
210
219
  type: "button",
211
220
  className: "select-apprail__toggle",
212
221
  "aria-expanded": t,
213
222
  "aria-label": k,
214
223
  onClick: i,
215
224
  children: [
216
- /* @__PURE__ */ d("span", {
225
+ /* @__PURE__ */ m("span", {
217
226
  className: "select-apprail__icon",
218
227
  "aria-hidden": "true",
219
- children: p ?? /* @__PURE__ */ d(n, {})
228
+ children: c ?? /* @__PURE__ */ m(n, {})
220
229
  }),
221
- /* @__PURE__ */ d("span", {
230
+ /* @__PURE__ */ m("span", {
222
231
  className: "select-apprail__label",
223
232
  "aria-hidden": "true",
224
233
  children: k
225
234
  }),
226
- u && /* @__PURE__ */ d("kbd", {
235
+ s && /* @__PURE__ */ m("kbd", {
227
236
  className: "select-apprail__kbd",
228
237
  "aria-hidden": "true",
229
- children: u
238
+ children: s
230
239
  }),
231
- !t && /* @__PURE__ */ d("span", {
240
+ !t && /* @__PURE__ */ m("span", {
232
241
  className: "select-apprail__tip",
233
242
  "aria-hidden": "true",
234
- children: /* @__PURE__ */ d("span", {
243
+ children: /* @__PURE__ */ m("span", {
235
244
  className: "select-apprail__name",
236
- children: u ? v.shortcut(k, u) : k
245
+ children: s ? v.shortcut(k, s) : k
237
246
  })
238
247
  })
239
248
  ]
240
249
  }), a.length > 0 && A(a)]
241
- }), s.length > 0 && A(s, !0)]
250
+ }), o.length > 0 && A(o, !0)]
242
251
  });
243
252
  }
244
- function x({ id: e, open: n, onClose: a, label: s, logo: l, closeLabel: u, closeIcon: p, context: m, children: h }) {
245
- let g = r().appFrame, _ = c(null);
246
- return o(() => {
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(() => {
247
256
  var e, t;
248
257
  let r = _.current;
249
258
  r && (n && !r.open ? (e = r.showModal) == null || e.call(r) : !n && r.open && ((t = r.close) == null || t.call(r)));
250
- }, [n]), /* @__PURE__ */ d("dialog", {
259
+ }, [n]), /* @__PURE__ */ m("dialog", {
251
260
  ref: _,
252
261
  id: e,
253
- "aria-label": s,
262
+ "aria-label": o,
254
263
  className: "select-appdrawer",
255
264
  onClose: a,
256
265
  onClick: (e) => e.target === e.currentTarget && a(),
257
- children: /* @__PURE__ */ f("div", {
266
+ children: /* @__PURE__ */ h("div", {
258
267
  className: "select-appdrawer__box",
259
268
  children: [
260
- /* @__PURE__ */ f("div", {
269
+ /* @__PURE__ */ h("div", {
261
270
  className: "select-appdrawer__head",
262
- children: [l, /* @__PURE__ */ d(i, {
263
- label: u ?? g.drawerClose,
264
- icon: p ?? /* @__PURE__ */ d(t, {}),
271
+ children: [s, /* @__PURE__ */ m(i, {
272
+ label: c ?? g.drawerClose,
273
+ icon: u ?? /* @__PURE__ */ m(t, {}),
265
274
  onClick: a
266
275
  })]
267
276
  }),
268
- m != null && /* @__PURE__ */ d("div", {
277
+ f != null && /* @__PURE__ */ m("div", {
269
278
  className: "select-appdrawer__context",
270
- children: m
279
+ children: f
271
280
  }),
272
- h
281
+ p
273
282
  ]
274
283
  })
275
284
  });
276
285
  }
277
286
  //#endregion
278
- export { x as SelectAppDrawer, h as SelectAppFrame, _ as SelectAppMain, g as SelectAppPanel, b as SelectAppRail };
287
+ export { T as SelectAppDrawer, y as SelectAppFrame, x as SelectAppMain, b as SelectAppPanel, w as SelectAppRail };
279
288
 
280
289
  //# sourceMappingURL=SelectAppFrame.js.map
@@ -0,0 +1,19 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ export type SelectScrollAxis = 'y' | 'x' | 'both';
3
+ /** As tags de bloco que a área pode ser. */
4
+ export type SelectScrollAreaElement = 'div' | 'section' | 'article' | 'aside' | 'nav' | 'main' | 'header' | 'footer' | 'ul' | 'ol' | 'dl' | 'pre';
5
+ type SelectScrollAreaOwnProps = {
6
+ /** O eixo que rola (padrão `y`). */
7
+ axis?: SelectScrollAxis;
8
+ /** Rola sem a barra à vista (a tira que corre de lado). */
9
+ hideBar?: boolean;
10
+ /** O nome da área para o leitor de tela: com ele, ela vira `role="region"` e entra no Tab (`tabIndex={0}`). */
11
+ label?: string;
12
+ /** A tag (padrão `div`). */
13
+ as?: SelectScrollAreaElement;
14
+ };
15
+ export type SelectScrollAreaProps = SelectScrollAreaOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectScrollAreaOwnProps>;
16
+ /** As classes da área: a `.select-scroll` com o eixo e, sem a barra, o `--nobar`. */
17
+ export declare function selectScrollClass(axis?: SelectScrollAxis, hideBar?: boolean): string;
18
+ export declare const SelectScrollArea: import('react').ForwardRefExoticComponent<SelectScrollAreaOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectScrollAreaOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
19
+ export {};
@@ -0,0 +1,23 @@
1
+ import { forwardRef as e } from "react";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ //#region src/SelectScrollArea.tsx
4
+ function n(e = "y", t = !1) {
5
+ return `select-scroll select-scroll--${e}${t ? " select-scroll--nobar" : ""}`;
6
+ }
7
+ var r = e(function({ axis: e = "y", hideBar: r = !1, label: i, as: a = "div", className: o, children: s, ...c }, l) {
8
+ return /* @__PURE__ */ t(a, {
9
+ ref: l,
10
+ ...i ? {
11
+ role: "region",
12
+ "aria-label": i,
13
+ tabIndex: 0
14
+ } : null,
15
+ ...c,
16
+ className: `${n(e, r)}${o ? ` ${o}` : ""}`,
17
+ children: s
18
+ });
19
+ });
20
+ //#endregion
21
+ export { r as SelectScrollArea, n as selectScrollClass };
22
+
23
+ //# sourceMappingURL=SelectScrollArea.js.map
package/dist/index.d.ts CHANGED
@@ -55,6 +55,8 @@ export { SelectPasswordStrength, passwordScore, type SelectPasswordRule } from '
55
55
  export { SelectLoader, type SelectLoaderProps } from './SelectLoader';
56
56
  export { SelectText } from './SelectText';
57
57
  export { SelectBox, SelectStack, SelectInline, SelectGrid } from './SelectLayout';
58
+ export { SelectScrollArea } from './SelectScrollArea';
59
+ export type { SelectScrollAreaProps, SelectScrollAreaElement, SelectScrollAxis } from './SelectScrollArea';
58
60
  export { SelectPage, SelectPageBackProvider, SelectPageHeader } from './SelectPage';
59
61
  export { SelectFormLayout } from './SelectFormLayout';
60
62
  export { SelectSkeleton } from './SelectSkeleton';