@selectwin/kit 0.1.225 → 0.1.227
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/SelectAppBar.d.ts +62 -0
- package/dist/SelectAppBar.js +136 -0
- package/dist/SelectAppSearch.d.ts +34 -0
- package/dist/SelectAppSearch.js +192 -0
- package/dist/SelectCombobox.d.ts +5 -0
- package/dist/SelectCombobox.js +92 -84
- package/dist/SelectFilterBar.js +14 -14
- package/dist/SelectLocale.d.ts +18 -0
- package/dist/SelectLocale.js +34 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +152 -150
- package/dist/internal/listChrome.js +5 -5
- package/dist/style.css +1 -1
- package/package.json +67 -67
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
export interface SelectAppBarProps extends Omit<ComponentPropsWithoutRef<'header'>, 'children'> {
|
|
3
|
+
/** O início: o logo é um link para ele, com este nome para o leitor de tela. */
|
|
4
|
+
home: {
|
|
5
|
+
to: string;
|
|
6
|
+
label: string;
|
|
7
|
+
};
|
|
8
|
+
/** O logo (a marca clara, a barra é escura). */
|
|
9
|
+
logo: ReactNode;
|
|
10
|
+
/** O botão do menu do celular (abaixo de 1024 px): abre a gaveta com as seções. */
|
|
11
|
+
menu?: {
|
|
12
|
+
expanded: boolean;
|
|
13
|
+
controls?: string;
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
label?: string;
|
|
16
|
+
};
|
|
17
|
+
/** As páginas da seção aberta (`SelectAppPages`): a segunda linha da barra no celular. */
|
|
18
|
+
pages?: ReactNode;
|
|
19
|
+
/** A busca (`SelectAppSearch`): no centro, no computador; o ícone, no celular. */
|
|
20
|
+
search?: ReactNode;
|
|
21
|
+
/** As ferramentas à direita: os botões redondos e a conta. */
|
|
22
|
+
tools?: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export declare const SelectAppBar: import('react').ForwardRefExoticComponent<SelectAppBarProps & import('react').RefAttributes<HTMLElement>>;
|
|
25
|
+
export interface SelectAppBarButtonProps extends Omit<ComponentPropsWithoutRef<'button'>, 'aria-label'> {
|
|
26
|
+
/** O nome do botão (só ícone): vai no leitor de tela e na dica. */
|
|
27
|
+
label: string;
|
|
28
|
+
/** A dica com o nome, no mouse e no foco do teclado (padrão: sim). */
|
|
29
|
+
tooltip?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** Um botão redondo da barra, só com o ícone (o tema, o menu do celular, a busca no celular). */
|
|
32
|
+
export declare const SelectAppBarButton: import('react').ForwardRefExoticComponent<SelectAppBarButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
33
|
+
export interface SelectAppBarAccountProps extends Omit<ComponentPropsWithoutRef<'button'>, 'children' | 'name'> {
|
|
34
|
+
/** A foto ou as iniciais (o `SelectAvatar`). */
|
|
35
|
+
avatar: ReactNode;
|
|
36
|
+
/** O nome de quem entrou (a partir de 768 px). */
|
|
37
|
+
name: ReactNode;
|
|
38
|
+
/** A linha de baixo: o papel. */
|
|
39
|
+
detail?: ReactNode;
|
|
40
|
+
/** O que o leitor de tela diz antes do nome ("Conta de"). */
|
|
41
|
+
srPrefix?: string;
|
|
42
|
+
}
|
|
43
|
+
/** A pílula da conta, à direita da barra: o avatar, o nome e o papel, e a seta. É o gatilho do menu da conta. */
|
|
44
|
+
export declare const SelectAppBarAccount: import('react').ForwardRefExoticComponent<SelectAppBarAccountProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
45
|
+
export interface SelectAppPage {
|
|
46
|
+
id: string;
|
|
47
|
+
label: string;
|
|
48
|
+
to: string;
|
|
49
|
+
icon?: ReactNode;
|
|
50
|
+
/** A página aberta: `page`; a seção aberta que tem as páginas noutro menu (o menu da Operação): `true`. */
|
|
51
|
+
current?: 'page' | 'true';
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* As PÁGINAS da seção aberta, na segunda linha da barra do celular: o ícone e o nome, a aberta em branco com a onda
|
|
55
|
+
* embaixo. A linha rola de lado (o esmaecido na borda diz que há mais) e a aberta fica à vista. A seção sem páginas
|
|
56
|
+
* mostra só ela: a barra sempre diz onde a pessoa está. Trocar de seção (`section`) remonta a linha, que entra num fade.
|
|
57
|
+
*/
|
|
58
|
+
export declare function SelectAppPages({ label, pages, section }: {
|
|
59
|
+
label?: string;
|
|
60
|
+
pages: readonly SelectAppPage[];
|
|
61
|
+
section?: string;
|
|
62
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { ChevronDownIcon as e, MenuIcon as t } from "./icons.js";
|
|
2
|
+
import { SelectTooltip as n } from "./SelectTooltip.js";
|
|
3
|
+
import { useSelectMessages as r } from "./SelectLocale.js";
|
|
4
|
+
import { forwardRef as i, useEffect as a, useRef as o } from "react";
|
|
5
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
|
+
import { Link as l } from "react-router-dom";
|
|
7
|
+
//#region src/SelectAppBar.tsx
|
|
8
|
+
var u = (...e) => e.filter(Boolean).join(" "), d = i(function({ home: e, logo: n, menu: i, pages: a, search: o, tools: d, className: p, ...m }, h) {
|
|
9
|
+
let g = r().appFrame;
|
|
10
|
+
return /* @__PURE__ */ s("header", {
|
|
11
|
+
ref: h,
|
|
12
|
+
...m,
|
|
13
|
+
className: u("select-appbar", p),
|
|
14
|
+
children: /* @__PURE__ */ c("div", {
|
|
15
|
+
className: "select-appbar__row",
|
|
16
|
+
children: [
|
|
17
|
+
i && /* @__PURE__ */ s(f, {
|
|
18
|
+
className: "select-appbar__menu",
|
|
19
|
+
label: i.label ?? g.menuOpen,
|
|
20
|
+
tooltip: !1,
|
|
21
|
+
"aria-haspopup": "dialog",
|
|
22
|
+
"aria-expanded": i.expanded,
|
|
23
|
+
"aria-controls": i.controls,
|
|
24
|
+
onClick: i.onClick,
|
|
25
|
+
children: /* @__PURE__ */ s(t, {})
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ s(l, {
|
|
28
|
+
to: e.to,
|
|
29
|
+
className: "select-appbar__home",
|
|
30
|
+
"aria-label": e.label,
|
|
31
|
+
children: n
|
|
32
|
+
}),
|
|
33
|
+
a,
|
|
34
|
+
o,
|
|
35
|
+
d != null && /* @__PURE__ */ s("div", {
|
|
36
|
+
className: "select-appbar__tools",
|
|
37
|
+
children: d
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
}), f = i(function({ label: e, tooltip: t = !0, className: r, children: i, ...a }, o) {
|
|
43
|
+
let c = /* @__PURE__ */ s("button", {
|
|
44
|
+
ref: o,
|
|
45
|
+
type: "button",
|
|
46
|
+
...a,
|
|
47
|
+
"aria-label": e,
|
|
48
|
+
className: u("select-appbar__btn", r),
|
|
49
|
+
children: i
|
|
50
|
+
});
|
|
51
|
+
return t ? /* @__PURE__ */ s(n, {
|
|
52
|
+
content: e,
|
|
53
|
+
placement: "bottom",
|
|
54
|
+
children: c
|
|
55
|
+
}) : c;
|
|
56
|
+
}), p = i(function({ avatar: t, name: n, detail: r, srPrefix: i, className: a, ...o }, l) {
|
|
57
|
+
return /* @__PURE__ */ c("button", {
|
|
58
|
+
ref: l,
|
|
59
|
+
type: "button",
|
|
60
|
+
...o,
|
|
61
|
+
className: u("select-appbar__account", a),
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ s("span", {
|
|
64
|
+
className: "select-appbar__account-avatar",
|
|
65
|
+
children: t
|
|
66
|
+
}),
|
|
67
|
+
i ? /* @__PURE__ */ s("span", {
|
|
68
|
+
className: "select-visually-hidden",
|
|
69
|
+
children: i
|
|
70
|
+
}) : null,
|
|
71
|
+
/* @__PURE__ */ c("span", {
|
|
72
|
+
className: "select-appbar__account-text",
|
|
73
|
+
children: [/* @__PURE__ */ s("span", {
|
|
74
|
+
className: "select-appbar__account-name",
|
|
75
|
+
children: n
|
|
76
|
+
}), r != null && r !== "" ? /* @__PURE__ */ s("span", {
|
|
77
|
+
className: "select-appbar__account-detail",
|
|
78
|
+
children: r
|
|
79
|
+
}) : null]
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ s("span", {
|
|
82
|
+
className: "select-appbar__account-chevron",
|
|
83
|
+
"aria-hidden": "true",
|
|
84
|
+
children: /* @__PURE__ */ s(e, {})
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
function m() {
|
|
90
|
+
return /* @__PURE__ */ s("svg", {
|
|
91
|
+
className: "select-appbar__wave",
|
|
92
|
+
viewBox: "0 0 148 13",
|
|
93
|
+
"aria-hidden": "true",
|
|
94
|
+
focusable: "false",
|
|
95
|
+
children: /* @__PURE__ */ s("path", { d: "M0 13C44 13 52 1 74 1S104 13 148 13Z" })
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function h({ label: e, pages: t, section: n }) {
|
|
99
|
+
var r;
|
|
100
|
+
let i = o(null), u = (r = t.find((e) => e.current)) == null ? void 0 : r.id;
|
|
101
|
+
return a(() => {
|
|
102
|
+
var e, t;
|
|
103
|
+
(e = i.current) == null || (e = e.querySelector("[aria-current]")) == null || (t = e.scrollIntoView) == null || t.call(e, {
|
|
104
|
+
block: "nearest",
|
|
105
|
+
inline: "nearest"
|
|
106
|
+
});
|
|
107
|
+
}, [u]), t.length === 0 ? /* @__PURE__ */ s("div", { className: "select-appbar__pages" }) : /* @__PURE__ */ s("nav", {
|
|
108
|
+
ref: i,
|
|
109
|
+
"aria-label": e,
|
|
110
|
+
className: "select-appbar__pages",
|
|
111
|
+
children: /* @__PURE__ */ s("div", {
|
|
112
|
+
className: "select-appbar__pagesrow",
|
|
113
|
+
children: t.map((e) => /* @__PURE__ */ c(l, {
|
|
114
|
+
to: e.to,
|
|
115
|
+
className: "select-appbar__page",
|
|
116
|
+
"aria-current": e.current,
|
|
117
|
+
children: [
|
|
118
|
+
e.icon != null && /* @__PURE__ */ s("span", {
|
|
119
|
+
className: "select-appbar__pageicon",
|
|
120
|
+
"aria-hidden": "true",
|
|
121
|
+
children: e.icon
|
|
122
|
+
}),
|
|
123
|
+
/* @__PURE__ */ s("span", {
|
|
124
|
+
className: "select-appbar__pagelabel",
|
|
125
|
+
children: e.label
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ s(m, {})
|
|
128
|
+
]
|
|
129
|
+
}, e.id))
|
|
130
|
+
}, n)
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
134
|
+
export { d as SelectAppBar, p as SelectAppBarAccount, f as SelectAppBarButton, h as SelectAppPages };
|
|
135
|
+
|
|
136
|
+
//# sourceMappingURL=SelectAppBar.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SelectKitMessages } from './SelectLocale';
|
|
3
|
+
export interface SelectAppSearchItem {
|
|
4
|
+
/** Único em toda a lista (vira o id da opção). */
|
|
5
|
+
key: string;
|
|
6
|
+
title: string;
|
|
7
|
+
/** A linha de baixo: o que é (Página, Ação, Workspace) ou de onde é. */
|
|
8
|
+
sub?: string;
|
|
9
|
+
/** Um valor à direita (o valor de uma venda). */
|
|
10
|
+
meta?: string;
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/** O título em fonte mono (um identificador colado). */
|
|
13
|
+
mono?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface SelectAppSearchGroup<T extends SelectAppSearchItem = SelectAppSearchItem> {
|
|
16
|
+
title: string;
|
|
17
|
+
items: readonly T[];
|
|
18
|
+
}
|
|
19
|
+
export interface SelectAppSearchProps<T extends SelectAppSearchItem> {
|
|
20
|
+
query: string;
|
|
21
|
+
onQueryChange: (query: string) => void;
|
|
22
|
+
/** Os resultados do texto de agora (sem texto: as ações rápidas e os atalhos). Grupo vazio não aparece. */
|
|
23
|
+
groups: readonly SelectAppSearchGroup<T>[];
|
|
24
|
+
/** O escolhido (clique ou Enter). O kit fecha o painel e limpa o campo depois. */
|
|
25
|
+
onSelect: (item: T) => void;
|
|
26
|
+
/** A busca de fora ainda vem: "Buscando…" embaixo dos grupos. */
|
|
27
|
+
loading?: boolean;
|
|
28
|
+
/** ⌘K / Ctrl K abre de qualquer tela (padrão: sim). */
|
|
29
|
+
shortcut?: boolean;
|
|
30
|
+
/** Os textos, por cima dos do kit (`appFrame.search`). */
|
|
31
|
+
messages?: Partial<SelectKitMessages['appFrame']['search']>;
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function SelectAppSearch<T extends SelectAppSearchItem>({ query, onQueryChange, groups: allGroups, onSelect, loading, shortcut, messages, className, }: SelectAppSearchProps<T>): import("react").JSX.Element;
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { SearchIcon as e } from "./icons.js";
|
|
2
|
+
import { useSelectMessages as t } from "./SelectLocale.js";
|
|
3
|
+
import { SelectAppBarButton as n } from "./SelectAppBar.js";
|
|
4
|
+
import { useEffect as r, useId as i, useMemo as a, useRef as o, useState as s } from "react";
|
|
5
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
//#region src/SelectAppSearch.tsx
|
|
7
|
+
var u = (...e) => e.filter(Boolean).join(" ");
|
|
8
|
+
function d({ query: d, onQueryChange: f, groups: p, onSelect: m, loading: h = !1, shortcut: g = !0, messages: _, className: v }) {
|
|
9
|
+
var y;
|
|
10
|
+
let b = {
|
|
11
|
+
...t().appFrame.search,
|
|
12
|
+
..._
|
|
13
|
+
}, x = i(), S = o(null), C = o(null), w = o(null), [T, E] = s(!1), [D, O] = s(!1), [k, A] = s(0), j = a(() => p.filter((e) => e.items.length > 0), [p]), M = a(() => j.flatMap((e) => e.items), [j]), N = M.map((e) => e.key).join("\0");
|
|
14
|
+
r(() => A(0), [N]);
|
|
15
|
+
let P = () => {
|
|
16
|
+
E(!1), O(!1);
|
|
17
|
+
}, F = (e) => {
|
|
18
|
+
var t;
|
|
19
|
+
P(), f(""), (t = C.current) == null || t.blur(), m(e);
|
|
20
|
+
};
|
|
21
|
+
r(() => {
|
|
22
|
+
if (!g) return;
|
|
23
|
+
let e = (e) => {
|
|
24
|
+
var t;
|
|
25
|
+
if (!(e.metaKey || e.ctrlKey) || e.key.toLowerCase() !== "k") return;
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
let n = C.current !== null && C.current.offsetParent !== null;
|
|
28
|
+
E(!0), n ? (t = C.current) == null || t.focus() : O(!0);
|
|
29
|
+
};
|
|
30
|
+
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
31
|
+
}, [g]), r(() => {
|
|
32
|
+
var e;
|
|
33
|
+
D && ((e = w.current) == null || e.focus());
|
|
34
|
+
}, [D]), r(() => {
|
|
35
|
+
if (!T) return;
|
|
36
|
+
let e = (e) => {
|
|
37
|
+
var t;
|
|
38
|
+
(t = S.current) != null && t.contains(e.target) || P();
|
|
39
|
+
};
|
|
40
|
+
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
41
|
+
}, [T]);
|
|
42
|
+
let I = (e) => {
|
|
43
|
+
if (e.key === "ArrowDown") e.preventDefault(), E(!0), A((e) => M.length ? (e + 1) % M.length : 0);
|
|
44
|
+
else if (e.key === "ArrowUp") e.preventDefault(), A((e) => M.length ? (e - 1 + M.length) % M.length : 0);
|
|
45
|
+
else if (e.key === "Enter") {
|
|
46
|
+
let t = M[k];
|
|
47
|
+
t && (e.preventDefault(), F(t));
|
|
48
|
+
} else e.key === "Escape" && (e.preventDefault(), P(), e.currentTarget.blur());
|
|
49
|
+
}, L = (y = M[k]) == null ? void 0 : y.key, R = (e) => `${x}-${e}`, z = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform) ? "⌘ K" : "Ctrl K", B = (e) => /* @__PURE__ */ c("input", {
|
|
50
|
+
ref: e,
|
|
51
|
+
type: "search",
|
|
52
|
+
className: "select-appsearch__input",
|
|
53
|
+
placeholder: b.placeholder,
|
|
54
|
+
"aria-label": b.label,
|
|
55
|
+
role: "combobox",
|
|
56
|
+
"aria-expanded": T,
|
|
57
|
+
"aria-controls": x,
|
|
58
|
+
"aria-autocomplete": "list",
|
|
59
|
+
"aria-activedescendant": T && L ? R(L) : void 0,
|
|
60
|
+
value: d,
|
|
61
|
+
onChange: (e) => {
|
|
62
|
+
f(e.target.value), E(!0);
|
|
63
|
+
},
|
|
64
|
+
onFocus: () => E(!0),
|
|
65
|
+
onKeyDown: I
|
|
66
|
+
});
|
|
67
|
+
return /* @__PURE__ */ l("div", {
|
|
68
|
+
ref: S,
|
|
69
|
+
className: u("select-appsearch", T && "is-open", v),
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ l("label", {
|
|
72
|
+
className: "select-appsearch__field",
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ c("span", {
|
|
75
|
+
className: "select-appsearch__fieldicon",
|
|
76
|
+
"aria-hidden": "true",
|
|
77
|
+
children: /* @__PURE__ */ c(e, {})
|
|
78
|
+
}),
|
|
79
|
+
B(C),
|
|
80
|
+
g && /* @__PURE__ */ c("kbd", {
|
|
81
|
+
className: "select-appsearch__kbd",
|
|
82
|
+
"aria-hidden": "true",
|
|
83
|
+
children: z
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
}),
|
|
87
|
+
/* @__PURE__ */ c(n, {
|
|
88
|
+
className: "select-appsearch__button",
|
|
89
|
+
label: b.open,
|
|
90
|
+
tooltip: !1,
|
|
91
|
+
"aria-expanded": T && D,
|
|
92
|
+
onClick: () => {
|
|
93
|
+
E(!0), O(!0);
|
|
94
|
+
},
|
|
95
|
+
children: /* @__PURE__ */ c(e, {})
|
|
96
|
+
}),
|
|
97
|
+
T && /* @__PURE__ */ l("div", {
|
|
98
|
+
className: u("select-appsearch__panel", D && "is-mobile"),
|
|
99
|
+
role: "dialog",
|
|
100
|
+
"aria-label": b.panel,
|
|
101
|
+
children: [
|
|
102
|
+
D && /* @__PURE__ */ c("div", {
|
|
103
|
+
className: "select-appsearch__panelfield",
|
|
104
|
+
children: B(w)
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ l("div", {
|
|
107
|
+
id: x,
|
|
108
|
+
role: "listbox",
|
|
109
|
+
"aria-label": b.results,
|
|
110
|
+
className: "select-appsearch__list",
|
|
111
|
+
children: [
|
|
112
|
+
j.map((e) => /* @__PURE__ */ l("div", {
|
|
113
|
+
role: "group",
|
|
114
|
+
"aria-label": e.title,
|
|
115
|
+
className: "select-appsearch__group",
|
|
116
|
+
children: [/* @__PURE__ */ c("span", {
|
|
117
|
+
className: "select-appsearch__grouptitle",
|
|
118
|
+
"aria-hidden": "true",
|
|
119
|
+
children: e.title
|
|
120
|
+
}), e.items.map((e) => /* @__PURE__ */ l("div", {
|
|
121
|
+
id: R(e.key),
|
|
122
|
+
role: "option",
|
|
123
|
+
"aria-selected": e.key === L,
|
|
124
|
+
className: u("select-appsearch__item", e.key === L && "is-active"),
|
|
125
|
+
onPointerDown: (e) => e.preventDefault(),
|
|
126
|
+
onPointerEnter: () => A(M.indexOf(e)),
|
|
127
|
+
onClick: () => F(e),
|
|
128
|
+
children: [
|
|
129
|
+
e.icon != null && /* @__PURE__ */ c("span", {
|
|
130
|
+
className: "select-appsearch__icon",
|
|
131
|
+
"aria-hidden": "true",
|
|
132
|
+
children: e.icon
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ l("span", {
|
|
135
|
+
className: "select-appsearch__text",
|
|
136
|
+
children: [/* @__PURE__ */ c("span", {
|
|
137
|
+
className: u("select-appsearch__title", e.mono && "is-mono"),
|
|
138
|
+
children: e.title
|
|
139
|
+
}), e.sub ? /* @__PURE__ */ c("span", {
|
|
140
|
+
className: "select-appsearch__sub",
|
|
141
|
+
children: e.sub
|
|
142
|
+
}) : null]
|
|
143
|
+
}),
|
|
144
|
+
e.meta ? /* @__PURE__ */ c("span", {
|
|
145
|
+
className: "select-appsearch__meta",
|
|
146
|
+
children: e.meta
|
|
147
|
+
}) : null
|
|
148
|
+
]
|
|
149
|
+
}, e.key))]
|
|
150
|
+
}, e.title)),
|
|
151
|
+
j.length === 0 && !h && /* @__PURE__ */ c("p", {
|
|
152
|
+
className: "select-appsearch__empty",
|
|
153
|
+
children: b.none(d.trim())
|
|
154
|
+
}),
|
|
155
|
+
h && /* @__PURE__ */ c("p", {
|
|
156
|
+
className: "select-appsearch__status",
|
|
157
|
+
children: b.searching
|
|
158
|
+
})
|
|
159
|
+
]
|
|
160
|
+
}),
|
|
161
|
+
/* @__PURE__ */ l("div", {
|
|
162
|
+
className: "select-appsearch__foot",
|
|
163
|
+
"aria-hidden": "true",
|
|
164
|
+
children: [
|
|
165
|
+
/* @__PURE__ */ l("span", { children: [
|
|
166
|
+
/* @__PURE__ */ c("kbd", { children: "↑" }),
|
|
167
|
+
" ",
|
|
168
|
+
/* @__PURE__ */ c("kbd", { children: "↓" }),
|
|
169
|
+
" ",
|
|
170
|
+
b.keys.move
|
|
171
|
+
] }),
|
|
172
|
+
/* @__PURE__ */ l("span", { children: [
|
|
173
|
+
/* @__PURE__ */ c("kbd", { children: "Enter" }),
|
|
174
|
+
" ",
|
|
175
|
+
b.keys.open
|
|
176
|
+
] }),
|
|
177
|
+
/* @__PURE__ */ l("span", { children: [
|
|
178
|
+
/* @__PURE__ */ c("kbd", { children: "Esc" }),
|
|
179
|
+
" ",
|
|
180
|
+
b.keys.close
|
|
181
|
+
] })
|
|
182
|
+
]
|
|
183
|
+
})
|
|
184
|
+
]
|
|
185
|
+
})
|
|
186
|
+
]
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
//#endregion
|
|
190
|
+
export { d as SelectAppSearch };
|
|
191
|
+
|
|
192
|
+
//# sourceMappingURL=SelectAppSearch.js.map
|
package/dist/SelectCombobox.d.ts
CHANGED
|
@@ -40,6 +40,11 @@ type SelectComboboxOwnProps = {
|
|
|
40
40
|
* troca e empurraria o resto da barra. Um comprimento CSS (`'16rem'`).
|
|
41
41
|
*/
|
|
42
42
|
minWidth?: string;
|
|
43
|
+
/**
|
|
44
|
+
* 0.1.226: o nome do campo para o leitor de tela quando não há `label` visível (o seletor numa barra ou numa célula).
|
|
45
|
+
* Ignorado com `label`.
|
|
46
|
+
*/
|
|
47
|
+
ariaLabel?: string;
|
|
43
48
|
};
|
|
44
49
|
export type SelectComboboxProps = SelectComboboxOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectComboboxOwnProps>;
|
|
45
50
|
export declare const SelectCombobox: import('react').ForwardRefExoticComponent<SelectComboboxOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectComboboxOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|