From 8cd647cea3b0b43a73a27f0dbbbc85dc35a96818 Mon Sep 17 00:00:00 2001 From: Linh Chau <94718676+linh-transcend@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:27:20 -0500 Subject: [PATCH] Fix autofocus values (#150) * update autofocus values * lint + updated to BooleanString * fix import --- package.json | 2 +- src/ui.ts | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index b98ad15..48b3024 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Transcend Inc.", "name": "@transcend-io/airgap.js-types", "description": "TypeScript types for airgap.js interoperability with custom consent UIs", - "version": "12.6.0", + "version": "12.7.0", "homepage": "https://github.com/transcend-io/airgap.js-types", "repository": { "type": "git", diff --git a/src/ui.ts b/src/ui.ts index 96d071f..12eb5f0 100644 --- a/src/ui.ts +++ b/src/ui.ts @@ -16,7 +16,7 @@ import { PrivacyRegimeEnum, DismissedViewState, } from './enums'; -import { AirgapAuth, AirgapAuthMap } from './core'; +import { AirgapAuth, AirgapAuthMap, BooleanString } from './core'; import { NonTcfVendor } from './iab'; /** Transcend Smart Quarantine API (window.transcend) */ @@ -241,8 +241,12 @@ export const OptionalConsentManagerConfig = t.partial({ * Potential values: 'closed' (default) and 'open' */ uiShadowRoot: t.string, - /** The override value for whether to focus on the first descendant of the root arg w/data-initialFocus attribute */ - autofocus: t.boolean, + /** + * The override value for whether to focus on the first descendant of the root arg w/data-initialFocus attribute + * Potential values: `'on'` (default) or `'off'` + * + */ + autofocus: BooleanString, }); /** type overload */