From 198d50e6efbd8b6f2e2e60d2bcd6861c04837393 Mon Sep 17 00:00:00 2001 From: Florian Wendelborn <1133858+FlorianWendelborn@users.noreply.github.com> Date: Tue, 8 Sep 2020 17:11:20 +0200 Subject: [PATCH] wip --- packages/kotti-ui/source/kotti-field/types.ts | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/packages/kotti-ui/source/kotti-field/types.ts b/packages/kotti-ui/source/kotti-field/types.ts index df0dd05d53..a013a79d2f 100644 --- a/packages/kotti-ui/source/kotti-field/types.ts +++ b/packages/kotti-ui/source/kotti-field/types.ts @@ -6,6 +6,65 @@ import { ReplaceRecordType } from '../types/utilities' import { FORM_KEY_NONE } from './constants' +/** + * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete} + */ +type AutoComplete = + | 'off' + | 'on' + | 'name' + | 'honorific-prefix' + | 'given-name' + | 'additional-name' + | 'family-name' + | 'honorific-suffix' + | 'nickname' + | 'email' + | 'username' + | 'new-password' + | 'current-password' + | 'one-time-code' + | 'organization-title' + | 'organization' + | 'street-address' + | 'address-line1' + | 'address-line2' + | 'address-line2' + | 'address-level4' + | 'address-level3' + | 'address-level2' + | 'address-level1' + | 'country' + | 'country-name' + | 'postal-code' + | 'cc-name' + | 'cc-given-name' + | 'cc-additional-name' + | 'cc-family-name' + | 'cc-number' + | 'cc-exp' + | 'cc-exp-month' + | 'cc-exp-year' + | 'cc-csc' + | 'cc-type' + | 'transation-currency' + | 'transaction-amount' + | 'language' + | 'bday' + | 'bday-day' + | 'bday-month' + | 'bday-year' + | 'sex' + | 'tel' + | 'tel-country-code' + | 'tel-national' + | 'tel-area-code' + | 'tel-local' + | 'tel-extension' + | 'impp' + | 'url' + | 'photo' + export namespace KottiField { export enum Size { LARGE = 'large', @@ -79,6 +138,7 @@ export namespace KottiField { > & { currentValue: DATA_TYPE inputProps: Readonly<{ + autocomplete: AutoComplete /** * Native HTML Props should have lowercase keys */