@aurea-uds/native 0.8.3 → 0.8.4

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 (2) hide show
  1. package/dist/busca.js +19 -2
  2. package/package.json +2 -2
package/dist/busca.js CHANGED
@@ -114,6 +114,23 @@ const folha = criarFolha((t) => ({
114
114
  // `space05` mede 2 — o mesmo valor, agora com nome. O `.combobox-actions` da web
115
115
  // (`aurea.css:1673`) usa `gap:2px` literal; aqui o token existe, então é ele que entra.
116
116
  acoes: { flexDirection: "row", alignItems: "center", gap: t.size.space05 },
117
+ // 🔴 O GATILHO É IRMÃO DO X, NÃO ANCESTRAL — defeito achado pelo consumidor em 16/09/2026.
118
+ // O `IconButton` de limpar vivia DENTRO deste `Pressable`, e um `Pressable` nasce `accessible`
119
+ // (`Pressable.js:274`). No iOS esse `accessible` vira `isAccessibilityElement`
120
+ // (`RCTViewComponentView.mm:398`), e quem é elemento de acessibilidade NÃO expõe os filhos —
121
+ // então o X existia na tela e não existia para o VoiceOver.
122
+ // ⚠ **No Android não sumia**, e é por isso que o defeito atravessou o smoke inteiro: lá
123
+ // `accessible` só liga `isFocusable` (`ReactViewManager.kt:96`) e o `ReactViewGroup.kt:1048`
124
+ // continua entregando os filhos à árvore. Um aparelho só nunca responderia esta pergunta.
125
+ // ⚠ É a MESMA forma dos dois consertos que este pacote já carrega (`busca.tsx` fundo da folha,
126
+ // `inputs.tsx:909`): **num sistema de toque, o irmão resolve o que o ancestral quebra.**
127
+ // Nenhuma distância nova: `flex`, `minWidth` e `100%` são relações, não medidas.
128
+ gatilho: { flex: 1, minWidth: 0, height: "100%", flexDirection: "row", alignItems: "center" },
129
+ // A seta deixou de ser enfeite dentro do gatilho e virou toque próprio — é onde a pessoa toca
130
+ // para abrir. `accessible={false}` no JSX porque o gatilho JÁ anuncia tudo: um segundo botão
131
+ // aqui seria a mesma informação duas vezes. O `Icon` sem rótulo já se esconde sozinho
132
+ // (`icon.tsx:104`), então não sobra nada para o leitor de tela tropeçar.
133
+ setaToque: { height: "100%", justifyContent: "center" },
117
134
  // A folha, com a mesma anatomia da do `Select` (`inputs.tsx:98-113`) — e é de propósito que
118
135
  // sejam iguais: são o mesmo gesto, e duas folhas diferentes para o mesmo gesto é como uma
119
136
  // biblioteca deixa de ter linguagem.
@@ -271,13 +288,13 @@ export function Combobox({ items, value, onValueChange, onSearchChange, searchDe
271
288
  return items.filter((i) => dobrar(i.label).includes(alvo));
272
289
  }, [items, texto, onSearchChange]);
273
290
  const nada = !loading && filtrados.length === 0;
274
- return (_jsxs(_Fragment, { children: [_jsxs(Pressable, { testID: testID, onPress: inativo ? undefined : () => setAberto(true), disabled: inativo, accessibilityRole: "button", accessibilityLabel: campo?.label, accessibilityHint: campo?.hint, accessibilityValue: { text: value?.label }, accessibilityState: { disabled: !!inativo, expanded: aberto }, style: [
291
+ return (_jsxs(_Fragment, { children: [_jsxs(View, { style: [
275
292
  s.caixa,
276
293
  { height: alturaDoTamanho(t, tam), paddingHorizontal: respiroDoTamanho(t, tam) },
277
294
  campo?.invalido && s.invalido,
278
295
  inativo && s.desabilitado,
279
296
  style,
280
- ], children: [_jsx(Text, { size: tam === "sm" ? "xs" : tam === "lg" ? "base" : "md", tone: value ? "default" : "subtle", numberOfLines: 1, style: { flex: 1, minWidth: 0 }, children: value?.label ?? placeholder ?? "" }), _jsxs(View, { style: s.acoes, children: [clearable && value != null && !inativo && (_jsx(IconButton, { name: "close", label: strings.comboboxClear, appearance: "ghost", size: "sm", onPress: () => onValueChange?.(null), testID: testID ? `${testID}-limpar` : undefined })), chevron && _jsx(Icon, { name: chevron, size: "sm", color: t.color.subtleForeground })] })] }), _jsx(Modal, { visible: aberto, transparent: true, animationType: reduzir !== false ? "none" : "slide", statusBarTranslucent: true, navigationBarTranslucent: true, onRequestClose: fechar, children: _jsxs(KeyboardAvoiding, { style: s.fundoDaLista, children: [_jsx(Pressable, { style: s.fundoDeToque, onPress: fechar, accessible: false, testID: testID ? `${testID}-fundo` : undefined }), _jsxs(Animated.View, { style: [s.lista, { transform: [{ translateY: arrasto }] }], onLayout: (e) => { altura.current = e.nativeEvent.layout.height; }, onStartShouldSetResponder: () => true, children: [_jsx(View, { style: s.puxadorArea, ...(draggable ? gestos.panHandlers : null), accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", children: _jsx(View, { style: s.puxador }) }), _jsxs(View, { style: [s.grupo, { height: alturaDoTamanho(t, tam) }], ...(draggable ? gestos.panHandlers : null), children: [searchIcon && _jsx(Icon, { name: searchIcon, size: "sm", color: t.color.subtleForeground }), _jsx(TextInput, { testID: testID ? `${testID}-busca` : undefined, value: texto, onChangeText: digitar, placeholder: searchPlaceholder ?? strings.comboboxSearch, placeholderTextColor: t.color.subtleForeground,
297
+ ], children: [_jsx(Pressable, { testID: testID, onPress: inativo ? undefined : () => setAberto(true), disabled: inativo, accessibilityRole: "button", accessibilityLabel: campo?.label, accessibilityHint: campo?.hint, accessibilityValue: { text: value?.label }, accessibilityState: { disabled: !!inativo, expanded: aberto }, style: s.gatilho, children: _jsx(Text, { size: tam === "sm" ? "xs" : tam === "lg" ? "base" : "md", tone: value ? "default" : "subtle", numberOfLines: 1, style: { flex: 1, minWidth: 0 }, children: value?.label ?? placeholder ?? "" }) }), _jsxs(View, { style: s.acoes, children: [clearable && value != null && !inativo && (_jsx(IconButton, { name: "close", label: strings.comboboxClear, appearance: "ghost", size: "sm", onPress: () => onValueChange?.(null), testID: testID ? `${testID}-limpar` : undefined })), chevron && (_jsx(Pressable, { accessible: false, disabled: inativo, style: s.setaToque, onPress: inativo ? undefined : () => setAberto(true), testID: testID ? `${testID}-seta` : undefined, children: _jsx(Icon, { name: chevron, size: "sm", color: t.color.subtleForeground }) }))] })] }), _jsx(Modal, { visible: aberto, transparent: true, animationType: reduzir !== false ? "none" : "slide", statusBarTranslucent: true, navigationBarTranslucent: true, onRequestClose: fechar, children: _jsxs(KeyboardAvoiding, { style: s.fundoDaLista, children: [_jsx(Pressable, { style: s.fundoDeToque, onPress: fechar, accessible: false, testID: testID ? `${testID}-fundo` : undefined }), _jsxs(Animated.View, { style: [s.lista, { transform: [{ translateY: arrasto }] }], onLayout: (e) => { altura.current = e.nativeEvent.layout.height; }, onStartShouldSetResponder: () => true, children: [_jsx(View, { style: s.puxadorArea, ...(draggable ? gestos.panHandlers : null), accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", children: _jsx(View, { style: s.puxador }) }), _jsxs(View, { style: [s.grupo, { height: alturaDoTamanho(t, tam) }], ...(draggable ? gestos.panHandlers : null), children: [searchIcon && _jsx(Icon, { name: searchIcon, size: "sm", color: t.color.subtleForeground }), _jsx(TextInput, { testID: testID ? `${testID}-busca` : undefined, value: texto, onChangeText: digitar, placeholder: searchPlaceholder ?? strings.comboboxSearch, placeholderTextColor: t.color.subtleForeground,
281
298
  // ⚠ `autoFocus` é o que faz a folha valer a pena: abrir um campo de busca e
282
299
  // exigir um segundo toque para o teclado subir é um toque a mais em cada
283
300
  // cadastro. O foco entra com a folha; o teclado vem junto.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurea-uds/native",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "React Native target for Aurea UDS: the theme x density provider, the first components and the Carbon icons, drawn on react-native-svg.",
5
5
  "keywords": [
6
6
  "aurea",
@@ -47,7 +47,7 @@
47
47
  "NOTICE"
48
48
  ],
49
49
  "dependencies": {
50
- "@aurea-uds/tokens": "^0.8.3"
50
+ "@aurea-uds/tokens": "^0.8.4"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@react-native-community/datetimepicker": ">=8",