@oxy.so/bloom 4.34.0 → 4.35.0

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/docs/adoption-matrix.mdx +5 -5
  2. package/docs/locale.mdx +3 -1
  3. package/docs/text-field.mdx +20 -0
  4. package/lib/commonjs/text-field/TextField.js +133 -15
  5. package/lib/commonjs/text-field/TextField.js.map +1 -1
  6. package/lib/commonjs/text-field/messages.js +89 -0
  7. package/lib/commonjs/text-field/messages.js.map +1 -0
  8. package/lib/module/text-field/TextField.js +133 -15
  9. package/lib/module/text-field/TextField.js.map +1 -1
  10. package/lib/module/text-field/messages.js +85 -0
  11. package/lib/module/text-field/messages.js.map +1 -0
  12. package/lib/typescript/commonjs/text-field/TextField.d.ts +1 -1
  13. package/lib/typescript/commonjs/text-field/TextField.d.ts.map +1 -1
  14. package/lib/typescript/commonjs/text-field/index.d.ts +1 -1
  15. package/lib/typescript/commonjs/text-field/index.d.ts.map +1 -1
  16. package/lib/typescript/commonjs/text-field/messages.d.ts +15 -0
  17. package/lib/typescript/commonjs/text-field/messages.d.ts.map +1 -0
  18. package/lib/typescript/commonjs/text-field/types.d.ts +18 -0
  19. package/lib/typescript/commonjs/text-field/types.d.ts.map +1 -1
  20. package/lib/typescript/module/text-field/TextField.d.ts +1 -1
  21. package/lib/typescript/module/text-field/TextField.d.ts.map +1 -1
  22. package/lib/typescript/module/text-field/index.d.ts +1 -1
  23. package/lib/typescript/module/text-field/index.d.ts.map +1 -1
  24. package/lib/typescript/module/text-field/messages.d.ts +15 -0
  25. package/lib/typescript/module/text-field/messages.d.ts.map +1 -0
  26. package/lib/typescript/module/text-field/types.d.ts +18 -0
  27. package/lib/typescript/module/text-field/types.d.ts.map +1 -1
  28. package/package.json +1 -1
  29. package/src/__tests__/support/adoption-matrix.ts +708 -0
  30. package/src/__tests__/support/collision-fixture-barrel.ts +20 -0
  31. package/src/__tests__/support/commerce-harness.tsx +97 -0
  32. package/src/__tests__/support/composite.ts +68 -0
  33. package/src/__tests__/support/constructed-style-sheets.ts +68 -0
  34. package/src/__tests__/support/press-host.ts +30 -0
  35. package/src/__tests__/support/rendered-style.ts +99 -0
  36. package/src/__tests__/support/unread-hook-fixture.ts +33 -0
  37. package/src/__tests__/support/worklet-capture-fixture.tsx +28 -0
  38. package/src/text-field/TextField.tsx +133 -15
  39. package/src/text-field/index.ts +1 -0
  40. package/src/text-field/messages.ts +36 -0
  41. package/src/text-field/types.ts +19 -0
  42. package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +9346 -0
  43. package/src/theme/__tests__/__fixtures__/tonal-glass-primary-failures.json +69 -0
  44. package/src/theme/__tests__/fixtures/color-engine-golden.json +1 -0
@@ -0,0 +1,36 @@
1
+ import type { MessageCatalog } from '../locale/messages';
2
+
3
+ /**
4
+ * Every fixed string the text-field family draws or announces, in each Bloom
5
+ * language. A caller's `revealLabels` still wins over the reveal pair.
6
+ */
7
+ export interface TextFieldMessages {
8
+ /** The reveal button's name while the value is hidden. */
9
+ showPassword: string;
10
+ /** The reveal button's name while the value is shown. */
11
+ hidePassword: string;
12
+ /** The name of `TextFieldLabel`'s `required` asterisk. */
13
+ required: string;
14
+ }
15
+
16
+ export const TEXT_FIELD_MESSAGES: MessageCatalog<TextFieldMessages> = {
17
+ en: { showPassword: 'Show password', hidePassword: 'Hide password', required: 'required' },
18
+ es: { showPassword: 'Mostrar contraseña', hidePassword: 'Ocultar contraseña', required: 'obligatorio' },
19
+ ca: { showPassword: 'Mostra la contrasenya', hidePassword: 'Amaga la contrasenya', required: 'obligatori' },
20
+ de: { showPassword: 'Passwort anzeigen', hidePassword: 'Passwort verbergen', required: 'erforderlich' },
21
+ fr: {
22
+ showPassword: 'Afficher le mot de passe',
23
+ hidePassword: 'Masquer le mot de passe',
24
+ required: 'obligatoire',
25
+ },
26
+ it: { showPassword: 'Mostra la password', hidePassword: 'Nascondi la password', required: 'obbligatorio' },
27
+ pt: { showPassword: 'Mostrar senha', hidePassword: 'Ocultar senha', required: 'obrigatório' },
28
+ ru: { showPassword: 'Показать пароль', hidePassword: 'Скрыть пароль', required: 'обязательно' },
29
+ tr: { showPassword: 'Şifreyi göster', hidePassword: 'Şifreyi gizle', required: 'zorunlu' },
30
+ ja: { showPassword: 'パスワードを表示', hidePassword: 'パスワードを非表示', required: '必須' },
31
+ zh: { showPassword: '显示密码', hidePassword: '隐藏密码', required: '必填' },
32
+ ar: { showPassword: 'إظهار كلمة المرور', hidePassword: 'إخفاء كلمة المرور', required: 'مطلوب' },
33
+ hi: { showPassword: 'पासवर्ड दिखाएँ', hidePassword: 'पासवर्ड छिपाएँ', required: 'आवश्यक' },
34
+ bn: { showPassword: 'পাসওয়ার্ড দেখান', hidePassword: 'পাসওয়ার্ড লুকান', required: 'আবশ্যক' },
35
+ id: { showPassword: 'Tampilkan kata sandi', hidePassword: 'Sembunyikan kata sandi', required: 'wajib' },
36
+ };
@@ -60,8 +60,27 @@ export type TextFieldInputProps = Omit<
60
60
  * identically. Respects reduced-motion (snaps instead of animating).
61
61
  */
62
62
  floatingLabel?: boolean;
63
+ /**
64
+ * With `secureTextEntry`, draw an eye / eye-off button after the input that
65
+ * shows and hides what was typed. It is named "Show password" / "Hide
66
+ * password" in the locale (`docs/locale.mdx`); `revealLabels` overrides
67
+ * either. Pressing it leaves focus in the input. Ignored without
68
+ * `secureTextEntry`.
69
+ */
70
+ revealable?: boolean;
71
+ /** Override the reveal button's names, one key at a time. */
72
+ revealLabels?: TextFieldRevealLabels;
73
+ /** Locale for the reveal button's names; defaults to the nearest `LocaleProvider`. */
74
+ locale?: string;
63
75
  };
64
76
 
77
+ export interface TextFieldRevealLabels {
78
+ /** The name while the value is hidden. */
79
+ show?: string;
80
+ /** The name while the value is shown. */
81
+ hide?: string;
82
+ }
83
+
65
84
  export type TextFieldLabelProps = React.PropsWithChildren<
66
85
  {
67
86
  nativeID?: string;