@oxy.so/bloom 4.34.0 → 4.34.1
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/docs/mail-list.mdx +18 -22
- package/docs/settings-modal.mdx +1 -1
- package/lib/commonjs/mail-list/MailList.js +2 -0
- package/lib/commonjs/mail-list/MailList.js.map +1 -1
- package/lib/commonjs/mail-list/MailRow.js +9 -23
- package/lib/commonjs/mail-list/MailRow.js.map +1 -1
- package/lib/commonjs/mail-list/shared.js +26 -10
- package/lib/commonjs/mail-list/shared.js.map +1 -1
- package/lib/commonjs/settings-modal/SettingsModal.js +12 -18
- package/lib/commonjs/settings-modal/SettingsModal.js.map +1 -1
- package/lib/module/mail-list/MailList.js +2 -0
- package/lib/module/mail-list/MailList.js.map +1 -1
- package/lib/module/mail-list/MailRow.js +9 -23
- package/lib/module/mail-list/MailRow.js.map +1 -1
- package/lib/module/mail-list/shared.js +26 -10
- package/lib/module/mail-list/shared.js.map +1 -1
- package/lib/module/settings-modal/SettingsModal.js +12 -18
- package/lib/module/settings-modal/SettingsModal.js.map +1 -1
- package/lib/typescript/commonjs/mail-list/MailList.d.ts +1 -1
- package/lib/typescript/commonjs/mail-list/MailList.d.ts.map +1 -1
- package/lib/typescript/commonjs/mail-list/MailRow.d.ts +5 -20
- package/lib/typescript/commonjs/mail-list/MailRow.d.ts.map +1 -1
- package/lib/typescript/commonjs/mail-list/shared.d.ts +2 -9
- package/lib/typescript/commonjs/mail-list/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/mail-list/types.d.ts +8 -6
- package/lib/typescript/commonjs/mail-list/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/settings-modal/SettingsModal.d.ts.map +1 -1
- package/lib/typescript/module/mail-list/MailList.d.ts +1 -1
- package/lib/typescript/module/mail-list/MailList.d.ts.map +1 -1
- package/lib/typescript/module/mail-list/MailRow.d.ts +5 -20
- package/lib/typescript/module/mail-list/MailRow.d.ts.map +1 -1
- package/lib/typescript/module/mail-list/shared.d.ts +2 -9
- package/lib/typescript/module/mail-list/shared.d.ts.map +1 -1
- package/lib/typescript/module/mail-list/types.d.ts +8 -6
- package/lib/typescript/module/mail-list/types.d.ts.map +1 -1
- package/lib/typescript/module/settings-modal/SettingsModal.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/support/adoption-matrix.ts +708 -0
- package/src/__tests__/support/collision-fixture-barrel.ts +20 -0
- package/src/__tests__/support/commerce-harness.tsx +97 -0
- package/src/__tests__/support/composite.ts +68 -0
- package/src/__tests__/support/constructed-style-sheets.ts +68 -0
- package/src/__tests__/support/press-host.ts +30 -0
- package/src/__tests__/support/rendered-style.ts +99 -0
- package/src/__tests__/support/unread-hook-fixture.ts +33 -0
- package/src/__tests__/support/worklet-capture-fixture.tsx +28 -0
- package/src/mail-list/MailList.tsx +2 -0
- package/src/mail-list/MailRow.tsx +9 -23
- package/src/mail-list/shared.ts +27 -10
- package/src/mail-list/types.ts +8 -6
- package/src/settings-modal/SettingsModal.tsx +12 -15
- package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +9346 -0
- package/src/theme/__tests__/__fixtures__/tonal-glass-primary-failures.json +69 -0
- package/src/theme/__tests__/fixtures/color-engine-golden.json +1 -0
|
@@ -25,6 +25,7 @@ import { PageHeader } from '../page-header';
|
|
|
25
25
|
import { ButtonGroup, ButtonGroupItem } from '../button-group';
|
|
26
26
|
import { RiCloseLine } from '../icons/remix/RiCloseLine';
|
|
27
27
|
import { Backdrop, OverlayRoot } from '../overlay';
|
|
28
|
+
import { ModalKeyboard } from '../overlay/ModalKeyboard';
|
|
28
29
|
import type { WebCssStyle } from '../styles/web-view-style';
|
|
29
30
|
import { webDataSet } from '../styles/web-data';
|
|
30
31
|
import { Text } from '../typography';
|
|
@@ -135,6 +136,7 @@ export function SettingsModal({
|
|
|
135
136
|
labels,
|
|
136
137
|
testID,
|
|
137
138
|
}: SettingsModalProps) {
|
|
139
|
+
const panelRef = useRef<View>(null);
|
|
138
140
|
const common = useCommonMessages();
|
|
139
141
|
useSettingsWebCss();
|
|
140
142
|
const palette = useSettingsPalette();
|
|
@@ -248,21 +250,6 @@ export function SettingsModal({
|
|
|
248
250
|
if (mayLeave('navigation')) setCompactPageOpen(false);
|
|
249
251
|
}, [mayLeave]);
|
|
250
252
|
|
|
251
|
-
// Escape closes (web). On `window`, not `document`: a menu or popover opened
|
|
252
|
-
// inside the modal handles Escape on `document` and stops propagation there,
|
|
253
|
-
// so the innermost surface closes first and the modal stays open.
|
|
254
|
-
useEffect(() => {
|
|
255
|
-
if (!mounted || !IS_WEB || typeof window === 'undefined') return;
|
|
256
|
-
const handler = (event: KeyboardEvent) => {
|
|
257
|
-
if (event.key === 'Escape') {
|
|
258
|
-
event.stopPropagation();
|
|
259
|
-
requestClose();
|
|
260
|
-
}
|
|
261
|
-
};
|
|
262
|
-
window.addEventListener('keydown', handler);
|
|
263
|
-
return () => window.removeEventListener('keydown', handler);
|
|
264
|
-
}, [mounted, requestClose]);
|
|
265
|
-
|
|
266
253
|
const compactPageOpenRef = useRef(false);
|
|
267
254
|
compactPageOpenRef.current = compactPageOpen && layoutRef.current === 'compact';
|
|
268
255
|
|
|
@@ -350,6 +337,14 @@ export function SettingsModal({
|
|
|
350
337
|
<ModalPortal>
|
|
351
338
|
<SettingsModalContext.Provider value={context}>
|
|
352
339
|
<OverlayRoot onRequestClose={onHardwareBack} modal>
|
|
340
|
+
{IS_WEB ? (
|
|
341
|
+
<ModalKeyboard
|
|
342
|
+
panelRef={panelRef}
|
|
343
|
+
closing={!visible && wasVisible.current}
|
|
344
|
+
dismissible
|
|
345
|
+
dismiss={requestClose}
|
|
346
|
+
/>
|
|
347
|
+
) : null}
|
|
353
348
|
<Backdrop
|
|
354
349
|
onPress={requestClose}
|
|
355
350
|
progress={progress}
|
|
@@ -372,6 +367,8 @@ export function SettingsModal({
|
|
|
372
367
|
]}
|
|
373
368
|
>
|
|
374
369
|
<View
|
|
370
|
+
ref={panelRef}
|
|
371
|
+
tabIndex={IS_WEB ? -1 : undefined}
|
|
375
372
|
role="dialog"
|
|
376
373
|
aria-modal
|
|
377
374
|
aria-label={labels?.dialog ?? 'Settings'}
|