@astryxdesign/core 0.7.6-canary.c3cdc8e → 0.7.6-canary.c5c1149
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/dist/Chat/ChatComposerInput.d.ts +9 -0
- package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
- package/dist/Chat/ChatComposerInput.js +2 -0
- package/dist/Drawer/Drawer.d.ts.map +1 -1
- package/dist/Drawer/Drawer.js +6 -0
- package/dist/DropdownMenu/useMenuOverflow.d.ts +13 -3
- package/dist/DropdownMenu/useMenuOverflow.d.ts.map +1 -1
- package/dist/DropdownMenu/useMenuOverflow.js +31 -8
- package/dist/Field/index.d.ts +3 -1
- package/dist/Field/index.d.ts.map +1 -1
- package/dist/Field/index.js +2 -1
- package/dist/Field/textEntryTraits.d.ts +86 -0
- package/dist/Field/textEntryTraits.d.ts.map +1 -0
- package/dist/Field/textEntryTraits.js +81 -0
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +11 -1
- package/dist/TextArea/TextArea.d.ts +5 -3
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +14 -3
- package/dist/TextInput/TextInput.d.ts +20 -6
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +24 -2
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +10 -8
- package/package.json +4 -4
- package/src/Chat/ChatComposerInput.doc.mjs +11 -0
- package/src/Chat/ChatComposerInput.tsx +11 -0
- package/src/Drawer/Drawer.tsx +6 -0
- package/src/DropdownMenu/useMenuOverflow.ts +44 -8
- package/src/Field/index.ts +3 -1
- package/src/Field/textEntryTraits.ts +116 -0
- package/src/Selector/Selector.tsx +11 -0
- package/src/TextArea/TextArea.doc.mjs +65 -1
- package/src/TextArea/TextArea.tsx +20 -5
- package/src/TextInput/TextInput.doc.mjs +70 -6
- package/src/TextInput/TextInput.tsx +39 -8
- package/src/Typeahead/BaseTypeahead.tsx +9 -8
|
@@ -27,6 +27,7 @@ import type { BaseProps } from '../BaseProps.js';
|
|
|
27
27
|
import type { SearchableItem, SearchSource } from '../Typeahead/types.js';
|
|
28
28
|
import { type UseChatPasteAsTokenReturn } from './useChatPasteAsToken.js';
|
|
29
29
|
import { type BadgeProps } from '../Badge/index.js';
|
|
30
|
+
import type { EnterKeyHint } from '../Field/textEntryTraits.js';
|
|
30
31
|
/** Imperative handle exposed by ChatComposerInput via handleRef */
|
|
31
32
|
export interface ChatComposerInputHandle {
|
|
32
33
|
/** Insert a token (badge chip) at the current cursor position */
|
|
@@ -180,6 +181,14 @@ export interface ChatComposerInputProps extends Omit<BaseProps<HTMLDivElement>,
|
|
|
180
181
|
* never submits while a composition is in progress.
|
|
181
182
|
*/
|
|
182
183
|
onKeyDown?: (event: KeyboardEvent<HTMLDivElement>) => void;
|
|
184
|
+
/**
|
|
185
|
+
* What the Return key of a touch keyboard says (the native
|
|
186
|
+
* `enterkeyhint`). Enter sends the message, so the key says so: iOS shows
|
|
187
|
+
* its Send key. When `onKeyDown` makes Enter insert a line break on touch
|
|
188
|
+
* keyboards, pass `'enter'` so the key shows Return again.
|
|
189
|
+
* @default 'send'
|
|
190
|
+
*/
|
|
191
|
+
enterKeyHint?: EnterKeyHint;
|
|
183
192
|
}
|
|
184
193
|
export declare function ChatComposerInput(props: ChatComposerInputProps): import("react").JSX.Element;
|
|
185
194
|
export declare namespace ChatComposerInput {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatComposerInput.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatComposerInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAML,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,cAAc,EAEpB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,C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AAY,CAAC;CAC7B;AAwGD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,+BAwnB9D;yBAxnBe,iBAAiB;;;AAgoBjC,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,+BAkB5E;yBAlBe,wBAAwB"}
|
|
@@ -150,6 +150,7 @@ export function ChatComposerInput(props) {
|
|
|
150
150
|
onFiles,
|
|
151
151
|
onSubmit = composerCtx?.onSubmit,
|
|
152
152
|
onKeyDown: onKeyDownProp,
|
|
153
|
+
enterKeyHint = 'send',
|
|
153
154
|
xstyle,
|
|
154
155
|
className,
|
|
155
156
|
style,
|
|
@@ -638,6 +639,7 @@ export function ChatComposerInput(props) {
|
|
|
638
639
|
,
|
|
639
640
|
tabIndex: 0,
|
|
640
641
|
contentEditable: !isDisabled,
|
|
642
|
+
enterKeyHint: enterKeyHint,
|
|
641
643
|
suppressContentEditableWarning: true,
|
|
642
644
|
onInput: handleInput,
|
|
643
645
|
onClick: handleEditorClick,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../src/Drawer/Drawer.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAEH,OAAO,EAAgC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAIpE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAQ5C,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../src/Drawer/Drawer.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAEH,OAAO,EAAgC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAIpE,OAAO,KAAK,EAAC,SAAS,EAAC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Aa,EACxB,GAAG,EACH,GAAG,KAAK,EACT,EAAE,WAAW,+BAyMb;yBA3Ne,MAAM"}
|
package/dist/Drawer/Drawer.js
CHANGED
|
@@ -69,6 +69,7 @@ import { LayerDepthProvider, useLayerDismissal } from "../Layer/index.js";
|
|
|
69
69
|
import { layerTextReset } from "../Layer/layerTextReset.stylex.js";
|
|
70
70
|
import { layerStructureReset } from "../Layer/layerStructureReset.stylex.js";
|
|
71
71
|
import { LayerContentBoundary } from "../Layer/layerScopedContext.js";
|
|
72
|
+
import { useModalOutlet } from "../Layer/modalOutlet.js";
|
|
72
73
|
import { layerClickBoundary } from "../Layer/layerClickBoundary.js";
|
|
73
74
|
import { ModalAnnounceProvider } from "../hooks/ModalAnnounceProvider.js";
|
|
74
75
|
import { composeEventHandlers, mergeProps, themeProps } from "../utils/index.js";
|
|
@@ -302,6 +303,11 @@ export function Drawer({
|
|
|
302
303
|
isModal: hasScrim,
|
|
303
304
|
setIsRendered
|
|
304
305
|
});
|
|
306
|
+
|
|
307
|
+
// Toasts outside an open modal are inert, so the open drawer hosts them.
|
|
308
|
+
// It releases them when its exit starts.
|
|
309
|
+
// showModal() must run first, so keep this call after useDrawerDialogPresence.
|
|
310
|
+
useModalOutlet(dialogRef, isOpen && hasScrim);
|
|
305
311
|
const handleDismiss = useCallback(() => {
|
|
306
312
|
onOpenChange(false);
|
|
307
313
|
}, [onOpenChange]);
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file useMenuOverflow.ts
|
|
3
|
-
* @input Menu element ref, rendered content, and
|
|
3
|
+
* @input Menu element ref, rendered content, open state, and optionally the
|
|
4
|
+
* overflow its owner expects from the content alone
|
|
4
5
|
* @output Returns whether the open menu overflows its block-size constraint
|
|
5
6
|
* @position Shared responsive helper for DropdownMenu and DropdownMenuSubMenu
|
|
6
7
|
*/
|
|
7
8
|
import { type ReactNode, type RefObject } from 'react';
|
|
8
|
-
/**
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Detect block-axis overflow without making a fitting menu a scroll container.
|
|
11
|
+
*
|
|
12
|
+
* `expectedOverflow` is the answer the owner can give before any measure (a
|
|
13
|
+
* long option list cannot fit). Until a measure of the same `content` says
|
|
14
|
+
* otherwise, it is the result, so the first open already renders the right
|
|
15
|
+
* class: a class that flips after the open measure restyles the whole list
|
|
16
|
+
* a second time. A measure still runs on every open and corrects a wrong
|
|
17
|
+
* guess.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useMenuOverflow(menuRef: RefObject<HTMLElement | null>, content: ReactNode, isOpen: boolean, expectedOverflow?: boolean): boolean;
|
|
10
20
|
//# sourceMappingURL=useMenuOverflow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMenuOverflow.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/useMenuOverflow.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"useMenuOverflow.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/useMenuOverflow.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EACtC,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,OAAO,EACf,gBAAgB,CAAC,EAAE,OAAO,GACzB,OAAO,CA4ET"}
|
|
@@ -4,24 +4,44 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file useMenuOverflow.ts
|
|
7
|
-
* @input Menu element ref, rendered content, and
|
|
7
|
+
* @input Menu element ref, rendered content, open state, and optionally the
|
|
8
|
+
* overflow its owner expects from the content alone
|
|
8
9
|
* @output Returns whether the open menu overflows its block-size constraint
|
|
9
10
|
* @position Shared responsive helper for DropdownMenu and DropdownMenuSubMenu
|
|
10
11
|
*/
|
|
11
|
-
import { useCallback, useState } from 'react';
|
|
12
|
+
import { useCallback, useRef, useState } from 'react';
|
|
12
13
|
import { useIsomorphicLayoutEffect } from "../hooks/useIsomorphicLayoutEffect.js";
|
|
13
14
|
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Detect block-axis overflow without making a fitting menu a scroll container.
|
|
17
|
+
*
|
|
18
|
+
* `expectedOverflow` is the answer the owner can give before any measure (a
|
|
19
|
+
* long option list cannot fit). Until a measure of the same `content` says
|
|
20
|
+
* otherwise, it is the result, so the first open already renders the right
|
|
21
|
+
* class: a class that flips after the open measure restyles the whole list
|
|
22
|
+
* a second time. A measure still runs on every open and corrects a wrong
|
|
23
|
+
* guess.
|
|
24
|
+
*/
|
|
25
|
+
export function useMenuOverflow(menuRef, content, isOpen, expectedOverflow) {
|
|
26
|
+
// The content each measure stands for, kept only for an owner that gives
|
|
27
|
+
// an expected answer (a caller whose content is a new element on every
|
|
28
|
+
// render compares nothing); set before the measuring effects run.
|
|
29
|
+
const contentRef = useRef(null);
|
|
30
|
+
useIsomorphicLayoutEffect(() => {
|
|
31
|
+
contentRef.current = expectedOverflow === undefined ? null : content;
|
|
32
|
+
});
|
|
33
|
+
const [measured, setMeasured] = useState(null);
|
|
17
34
|
const measureOverflow = useCallback(() => {
|
|
18
35
|
const menu = menuRef.current;
|
|
19
36
|
if (!menu) {
|
|
20
37
|
return;
|
|
21
38
|
}
|
|
22
|
-
const
|
|
39
|
+
const hasOverflow = menu.scrollHeight > menu.clientHeight + 1;
|
|
23
40
|
// eslint-disable-next-line @eslint-react/set-state-in-effect -- DOM overflow measurement controls whether this menu becomes a scroll container
|
|
24
|
-
|
|
41
|
+
setMeasured(current => current != null && current.hasOverflow === hasOverflow && Object.is(current.content, contentRef.current) ? current : {
|
|
42
|
+
content: contentRef.current,
|
|
43
|
+
hasOverflow
|
|
44
|
+
});
|
|
25
45
|
}, [menuRef]);
|
|
26
46
|
useIsomorphicLayoutEffect(() => {
|
|
27
47
|
if (!isOpen) {
|
|
@@ -56,5 +76,8 @@ export function useMenuOverflow(menuRef, content, isOpen) {
|
|
|
56
76
|
measureOverflow();
|
|
57
77
|
}
|
|
58
78
|
}, [content, isOpen, measureOverflow]);
|
|
59
|
-
|
|
79
|
+
if (expectedOverflow === undefined) {
|
|
80
|
+
return measured?.hasOverflow ?? false;
|
|
81
|
+
}
|
|
82
|
+
return measured != null && Object.is(measured.content, content) ? measured.hasOverflow : expectedOverflow;
|
|
60
83
|
}
|
package/dist/Field/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file index.ts
|
|
3
3
|
* @input Imports Field component and types from Field.tsx, FieldLabel from FieldLabel.tsx, FieldStatus from FieldStatus.tsx
|
|
4
|
-
* @output Exports Field, FieldProps, FieldStatusInput, FieldStatusType, FieldLabel, FieldLabelProps, FieldStatus component
|
|
4
|
+
* @output Exports Field, FieldProps, FieldStatusInput, FieldStatusType, FieldLabel, FieldLabelProps, FieldStatus component,
|
|
5
|
+
* and the shared input types (including the text-entry keyboard trait types)
|
|
5
6
|
* @position Component entry point; re-exported by /packages/core/src/index.ts
|
|
6
7
|
*
|
|
7
8
|
* SYNC: When modified, update this header and /packages/core/src/Field/Field.doc.mjs
|
|
@@ -15,6 +16,7 @@ export type { FieldStatusProps, FieldStatusVariant, FieldStatusVariantMap, } fro
|
|
|
15
16
|
export type { FieldStatusPlacement } from './fieldStatusPlacement.js';
|
|
16
17
|
export type { InputStatus, InputStatusType, InputSize } from './types.js';
|
|
17
18
|
export type { FieldInputBaseProps, FieldContainerStyleProps, FieldControlStyleProps, FieldPartStyleProps, } from './fieldParts.js';
|
|
19
|
+
export type { AutoCapitalize, EnterKeyHint, InputMode } from './textEntryTraits.js';
|
|
18
20
|
export { inputWrapperStyles, inputStatusBorderStyles, inputStatusHoverShadowStyles, inputStatusFocusWithinStyles, inputStatusFocusStyles, } from './inputStyles.stylex.js';
|
|
19
21
|
export { InputClearButton } from './InputClearButton.js';
|
|
20
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Field/index.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Field/index.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,YAAY,EAAC,UAAU,EAAE,gBAAgB,EAAE,eAAe,EAAC,MAAM,SAAS,CAAC;AAC3E,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,YAAY,EAAC,eAAe,EAAC,MAAM,cAAc,CAAC;AAClD,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAGjE,YAAY,EAAC,WAAW,EAAE,eAAe,EAAE,SAAS,EAAC,MAAM,SAAS,CAAC;AACrE,YAAY,EACV,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAC,cAAc,EAAE,YAAY,EAAE,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAG/E,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,4BAA4B,EAC5B,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC"}
|
package/dist/Field/index.js
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @file index.ts
|
|
7
7
|
* @input Imports Field component and types from Field.tsx, FieldLabel from FieldLabel.tsx, FieldStatus from FieldStatus.tsx
|
|
8
|
-
* @output Exports Field, FieldProps, FieldStatusInput, FieldStatusType, FieldLabel, FieldLabelProps, FieldStatus component
|
|
8
|
+
* @output Exports Field, FieldProps, FieldStatusInput, FieldStatusType, FieldLabel, FieldLabelProps, FieldStatus component,
|
|
9
|
+
* and the shared input types (including the text-entry keyboard trait types)
|
|
9
10
|
* @position Component entry point; re-exported by /packages/core/src/index.ts
|
|
10
11
|
*
|
|
11
12
|
* SYNC: When modified, update this header and /packages/core/src/Field/Field.doc.mjs
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file textEntryTraits.ts
|
|
3
|
+
* @input The keyboard-trait props a text field accepts
|
|
4
|
+
* @output Exports the closed value unions EnterKeyHint, InputMode and
|
|
5
|
+
* AutoCapitalize (the package entry exports these three), the fields' prop
|
|
6
|
+
* mixin TextEntryTraitProps, and textEntryTraitAttributes, which maps the
|
|
7
|
+
* props onto the native attributes of the editable element
|
|
8
|
+
* @position Shared by TextInput and TextArea: the one place that says how a
|
|
9
|
+
* field tells a touch keyboard what it holds
|
|
10
|
+
*
|
|
11
|
+
* SYNC: When modified, update:
|
|
12
|
+
* - /packages/core/src/TextInput/TextInput.tsx and TextInput.doc.mjs
|
|
13
|
+
* - /packages/core/src/TextArea/TextArea.tsx and TextArea.doc.mjs
|
|
14
|
+
* - /packages/core/src/Field/index.ts (type exports)
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* What the Return key of a touch keyboard says. iOS gives `done`, `go`,
|
|
18
|
+
* `next`, `search` and `send` their own key (a glyph on iOS 26: a checkmark,
|
|
19
|
+
* an arrow, a chevron, a magnifier, an up arrow); `enter` and `previous` keep
|
|
20
|
+
* the plain Return key. Chrome on Android (Gboard) gives every value its own
|
|
21
|
+
* key; with no hint, a single-line field's key reads Next while another field
|
|
22
|
+
* follows and a multi-line field's keeps Return, and a `type="url"` field
|
|
23
|
+
* shows Next instead of `go` while another field follows.
|
|
24
|
+
*/
|
|
25
|
+
export type EnterKeyHint = 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
|
|
26
|
+
/**
|
|
27
|
+
* Which touch keyboard a field asks for, by the HTML standard's `inputmode`
|
|
28
|
+
* values. `numeric` brings up the number pad, and on iOS `search` brings up
|
|
29
|
+
* the web-search keyboard (a period key and a Go key, whatever
|
|
30
|
+
* `enterKeyHint` says).
|
|
31
|
+
*/
|
|
32
|
+
export type InputMode = 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
|
|
33
|
+
/**
|
|
34
|
+
* When a touch keyboard capitalizes as you type: `off` and `none` never,
|
|
35
|
+
* `on` and `sentences` at the start of each sentence (the HTML standard names
|
|
36
|
+
* each of these two states twice), `words` at the start of each word, and
|
|
37
|
+
* `characters` every letter.
|
|
38
|
+
*/
|
|
39
|
+
export type AutoCapitalize = 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';
|
|
40
|
+
/**
|
|
41
|
+
* Keyboard traits of a text field: a prop mixin for TextInput and TextArea,
|
|
42
|
+
* not a component's props. A touch keyboard reads these traits from the
|
|
43
|
+
* focused element. An absent prop renders no attribute, so the browser keeps
|
|
44
|
+
* its own default (on iOS a field capitalizes sentences, except a URL field).
|
|
45
|
+
*/
|
|
46
|
+
export interface TextEntryTraitProps {
|
|
47
|
+
/**
|
|
48
|
+
* What the Return key of a touch keyboard says (the native `enterkeyhint`).
|
|
49
|
+
* It only labels the key: what Enter does stays with the field's own
|
|
50
|
+
* handlers.
|
|
51
|
+
*/
|
|
52
|
+
enterKeyHint?: EnterKeyHint;
|
|
53
|
+
/**
|
|
54
|
+
* Which touch keyboard the field asks for (the native `inputmode`),
|
|
55
|
+
* without changing what the field accepts.
|
|
56
|
+
*/
|
|
57
|
+
inputMode?: InputMode;
|
|
58
|
+
/**
|
|
59
|
+
* When a touch keyboard capitalizes as you type (the native
|
|
60
|
+
* `autocapitalize`).
|
|
61
|
+
*/
|
|
62
|
+
autoCapitalize?: AutoCapitalize;
|
|
63
|
+
/**
|
|
64
|
+
* Whether a touch keyboard corrects words as you type (the native
|
|
65
|
+
* `autocorrect`).
|
|
66
|
+
*/
|
|
67
|
+
hasAutoCorrect?: boolean;
|
|
68
|
+
}
|
|
69
|
+
/** The native attributes the traits render as. */
|
|
70
|
+
export interface TextEntryTraitAttributes {
|
|
71
|
+
enterKeyHint?: EnterKeyHint;
|
|
72
|
+
inputMode?: InputMode;
|
|
73
|
+
autoCapitalize?: AutoCapitalize;
|
|
74
|
+
autoCorrect?: 'on' | 'off';
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Maps keyboard-trait props onto the native attributes for the editable
|
|
78
|
+
* element. Absent props produce no attribute.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```
|
|
82
|
+
* <input {...textEntryTraitAttributes({enterKeyHint: 'search', hasAutoCorrect: false})} />
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
export declare function textEntryTraitAttributes({ enterKeyHint, inputMode, autoCapitalize, hasAutoCorrect, }: TextEntryTraitProps): TextEntryTraitAttributes;
|
|
86
|
+
//# sourceMappingURL=textEntryTraits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textEntryTraits.d.ts","sourceRoot":"","sources":["../../src/Field/textEntryTraits.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GACtB,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GACnB,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE/E;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GACxB,KAAK,GAAG,MAAM,GAAG,IAAI,GAAG,WAAW,GAAG,OAAO,GAAG,YAAY,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,kDAAkD;AAClD,MAAM,WAAW,wBAAwB;IACvC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,WAAW,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC;CAC5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,YAAY,EACZ,SAAS,EACT,cAAc,EACd,cAAc,GACf,EAAE,mBAAmB,GAAG,wBAAwB,CAehD"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file textEntryTraits.ts
|
|
5
|
+
* @input The keyboard-trait props a text field accepts
|
|
6
|
+
* @output Exports the closed value unions EnterKeyHint, InputMode and
|
|
7
|
+
* AutoCapitalize (the package entry exports these three), the fields' prop
|
|
8
|
+
* mixin TextEntryTraitProps, and textEntryTraitAttributes, which maps the
|
|
9
|
+
* props onto the native attributes of the editable element
|
|
10
|
+
* @position Shared by TextInput and TextArea: the one place that says how a
|
|
11
|
+
* field tells a touch keyboard what it holds
|
|
12
|
+
*
|
|
13
|
+
* SYNC: When modified, update:
|
|
14
|
+
* - /packages/core/src/TextInput/TextInput.tsx and TextInput.doc.mjs
|
|
15
|
+
* - /packages/core/src/TextArea/TextArea.tsx and TextArea.doc.mjs
|
|
16
|
+
* - /packages/core/src/Field/index.ts (type exports)
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* What the Return key of a touch keyboard says. iOS gives `done`, `go`,
|
|
21
|
+
* `next`, `search` and `send` their own key (a glyph on iOS 26: a checkmark,
|
|
22
|
+
* an arrow, a chevron, a magnifier, an up arrow); `enter` and `previous` keep
|
|
23
|
+
* the plain Return key. Chrome on Android (Gboard) gives every value its own
|
|
24
|
+
* key; with no hint, a single-line field's key reads Next while another field
|
|
25
|
+
* follows and a multi-line field's keeps Return, and a `type="url"` field
|
|
26
|
+
* shows Next instead of `go` while another field follows.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Which touch keyboard a field asks for, by the HTML standard's `inputmode`
|
|
31
|
+
* values. `numeric` brings up the number pad, and on iOS `search` brings up
|
|
32
|
+
* the web-search keyboard (a period key and a Go key, whatever
|
|
33
|
+
* `enterKeyHint` says).
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* When a touch keyboard capitalizes as you type: `off` and `none` never,
|
|
38
|
+
* `on` and `sentences` at the start of each sentence (the HTML standard names
|
|
39
|
+
* each of these two states twice), `words` at the start of each word, and
|
|
40
|
+
* `characters` every letter.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Keyboard traits of a text field: a prop mixin for TextInput and TextArea,
|
|
45
|
+
* not a component's props. A touch keyboard reads these traits from the
|
|
46
|
+
* focused element. An absent prop renders no attribute, so the browser keeps
|
|
47
|
+
* its own default (on iOS a field capitalizes sentences, except a URL field).
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
/** The native attributes the traits render as. */
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Maps keyboard-trait props onto the native attributes for the editable
|
|
54
|
+
* element. Absent props produce no attribute.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```
|
|
58
|
+
* <input {...textEntryTraitAttributes({enterKeyHint: 'search', hasAutoCorrect: false})} />
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export function textEntryTraitAttributes({
|
|
62
|
+
enterKeyHint,
|
|
63
|
+
inputMode,
|
|
64
|
+
autoCapitalize,
|
|
65
|
+
hasAutoCorrect
|
|
66
|
+
}) {
|
|
67
|
+
const attributes = {};
|
|
68
|
+
if (enterKeyHint != null) {
|
|
69
|
+
attributes.enterKeyHint = enterKeyHint;
|
|
70
|
+
}
|
|
71
|
+
if (inputMode != null) {
|
|
72
|
+
attributes.inputMode = inputMode;
|
|
73
|
+
}
|
|
74
|
+
if (autoCapitalize != null) {
|
|
75
|
+
attributes.autoCapitalize = autoCapitalize;
|
|
76
|
+
}
|
|
77
|
+
if (hasAutoCorrect != null) {
|
|
78
|
+
attributes.autoCorrect = hasAutoCorrect ? 'on' : 'off';
|
|
79
|
+
}
|
|
80
|
+
return attributes;
|
|
81
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Selector.d.ts","sourceRoot":"","sources":["../../src/Selector/Selector.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,EAUZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAuB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAE5D,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAUpD,OAAO,EAAwB,KAAK,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAkB7E,OAAO,KAAK,EAAC,kBAAkB,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAmBpE,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAS9C,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,kCAAkC,CAAC;AAI3E,OAAO,KAAK,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ACH,QAAQ,EAAE,IAAI,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/D,CAAC;AAEJ,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,kBAAkB,GAAG,kBAAkB,IACzE,yBAAyB,CAAC,CAAC,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC;AA4C3D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,kBAAkB,EACnD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,qBA4tCxB;yBA7tCe,QAAQ"}
|
|
@@ -67,6 +67,14 @@ import { registerEnglishFallback, useComponentTranslator } from "../i18n/useComp
|
|
|
67
67
|
import english from "../i18n/generated-english/Selector/Selector.generated.js";
|
|
68
68
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
69
69
|
registerEnglishFallback(english);
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* A guess, confirmed by the open measure: more options than this overflow
|
|
73
|
+
* the popover listbox's 300 px block size even at 24 px rows, under the
|
|
74
|
+
* smallest default row (28 px). A wrong guess (a theme with shorter rows, a
|
|
75
|
+
* taller bottom sheet) costs only the measure's correction.
|
|
76
|
+
*/
|
|
77
|
+
const MOST_ROWS_THAT_FIT = 12;
|
|
70
78
|
const styles = {
|
|
71
79
|
triggerContainer: {
|
|
72
80
|
kVAEAm: "x1n2onr6",
|
|
@@ -750,7 +758,9 @@ export function Selector(props) {
|
|
|
750
758
|
return match == null ? -1 : Number(match[1]);
|
|
751
759
|
}, []);
|
|
752
760
|
// Re-measured when the option set changes; the count is the dependency.
|
|
753
|
-
|
|
761
|
+
// A list longer than the most rows that can fit cannot fit, so it starts
|
|
762
|
+
// as a scroll container and the open measure only confirms it.
|
|
763
|
+
const listboxHasOverflow = useMenuOverflow(listboxRef, filteredItems.length, surface.isOpen, filteredItems.length > MOST_ROWS_THAT_FIT);
|
|
754
764
|
const listboxPress = useMenuPress({
|
|
755
765
|
menuRef: listboxRef,
|
|
756
766
|
itemSelector: '[role="option"]:not([aria-disabled="true"])',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file TextArea.tsx
|
|
3
|
-
* @input Uses React, useId, ChangeEvent, ClipboardEvent, FocusEvent, Field, Icon, Spinner
|
|
3
|
+
* @input Uses React, useId, ChangeEvent, ClipboardEvent, FocusEvent, Field, Icon, Spinner,
|
|
4
|
+
* textEntryTraits (the touch-keyboard trait props)
|
|
4
5
|
* @output Exports TextArea component, TextAreaProps, TextAreaStatus, TextAreaStatusType
|
|
5
6
|
* @position Core implementation; consumed by index.ts, tested by TextArea.test.tsx
|
|
6
7
|
*
|
|
@@ -15,6 +16,7 @@ import { type ChangeEvent, type ClipboardEvent, type FocusEvent, type ReactNode
|
|
|
15
16
|
import { type IconType } from '../Icon/index.js';
|
|
16
17
|
import { type FieldInputBaseProps } from '../Field/fieldParts.js';
|
|
17
18
|
import type { SizeValue } from '../utils/types.js';
|
|
19
|
+
import { type TextEntryTraitProps } from '../Field/textEntryTraits.js';
|
|
18
20
|
import type { FieldStatusPlacement } from '../Field/fieldStatusPlacement.js';
|
|
19
21
|
export type TextAreaStatusType = 'warning' | 'error' | 'success';
|
|
20
22
|
export type TextAreaSize = 'sm' | 'md' | 'lg';
|
|
@@ -28,7 +30,7 @@ export interface TextAreaStatus {
|
|
|
28
30
|
*/
|
|
29
31
|
message?: string;
|
|
30
32
|
}
|
|
31
|
-
export interface TextAreaProps extends Omit<FieldInputBaseProps, 'onChange' | 'defaultValue'
|
|
33
|
+
export interface TextAreaProps extends Omit<FieldInputBaseProps, 'onChange' | 'defaultValue'>, TextEntryTraitProps {
|
|
32
34
|
/** Ref forwarded to the root element */
|
|
33
35
|
ref?: React.Ref<HTMLTextAreaElement>;
|
|
34
36
|
/**
|
|
@@ -201,7 +203,7 @@ export interface TextAreaProps extends Omit<FieldInputBaseProps, 'onChange' | 'd
|
|
|
201
203
|
* <TextArea label="Notes" rows={5} value={notes} onChange={setNotes} />
|
|
202
204
|
* ```
|
|
203
205
|
*/
|
|
204
|
-
export declare function TextArea({ label, isLabelHidden, description, isOptional, isRequired, onChange, changeAction, isLoading, value, placeholder, rows, isDisabled, isReadOnly, disabledMessage, status, statusVariant, labelTooltip, startIcon, hasSpellCheck, onPaste, maxLength, hasAutoFocus, size: sizeProp, htmlName, onFocus, onBlur, width, containerXstyle, containerClassName, containerStyle, controlXstyle, controlClassName, controlStyle, ref, id: idProp, 'aria-describedby': ariaDescribedByProp, 'aria-labelledby': ariaLabelledByProp, ...restProps }: TextAreaProps): import("react").JSX.Element;
|
|
206
|
+
export declare function TextArea({ label, isLabelHidden, description, isOptional, isRequired, onChange, changeAction, isLoading, value, placeholder, rows, isDisabled, isReadOnly, disabledMessage, status, statusVariant, labelTooltip, startIcon, hasSpellCheck, enterKeyHint, inputMode, autoCapitalize, hasAutoCorrect, onPaste, maxLength, hasAutoFocus, size: sizeProp, htmlName, onFocus, onBlur, width, containerXstyle, containerClassName, containerStyle, controlXstyle, controlClassName, controlStyle, ref, id: idProp, 'aria-describedby': ariaDescribedByProp, 'aria-labelledby': ariaLabelledByProp, ...restProps }: TextAreaProps): import("react").JSX.Element;
|
|
205
207
|
export declare namespace TextArea {
|
|
206
208
|
var displayName: string;
|
|
207
209
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../src/TextArea/TextArea.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../src/TextArea/TextArea.tsx"],"names":[],"mappings":"AAI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vD;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IACtD;;;;;OAKG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CAAC,cAAc,CAAC,CAAC;CAClF;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,UAAkB,EAClB,UAAkB,EAClB,QAAQ,EACR,YAAY,EACZ,SAAiB,EACjB,KAAK,EACL,WAAW,EACX,IAAQ,EACR,UAAkB,EAClB,UAAkB,EAClB,eAAe,EACf,MAAM,EACN,aAA0B,EAC1B,YAAY,EACZ,SAAS,EACT,aAAoB,EACpB,YAAY,EACZ,SAAS,EACT,cAAc,EACd,cAAc,EACd,OAAO,EACP,SAAS,EACT,YAAoB,EACpB,IAAI,EAAE,QAAQ,EACd,QAAQ,EACR,OAAO,EACP,MAAM,EACN,KAAK,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,GAAG,EACH,EAAE,EAAE,MAAM,EACV,kBAAkB,EAAE,mBAAmB,EACvC,iBAAiB,EAAE,kBAAkB,EACrC,GAAG,SAAS,EACb,EAAE,aAAa,+BAqTf;yBAhWe,QAAQ"}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file TextArea.tsx
|
|
7
|
-
* @input Uses React, useId, ChangeEvent, ClipboardEvent, FocusEvent, Field, Icon, Spinner
|
|
7
|
+
* @input Uses React, useId, ChangeEvent, ClipboardEvent, FocusEvent, Field, Icon, Spinner,
|
|
8
|
+
* textEntryTraits (the touch-keyboard trait props)
|
|
8
9
|
* @output Exports TextArea component, TextAreaProps, TextAreaStatus, TextAreaStatusType
|
|
9
10
|
* @position Core implementation; consumed by index.ts, tested by TextArea.test.tsx
|
|
10
11
|
*
|
|
@@ -35,6 +36,7 @@ import { useResolvedRequired } from "../hooks/useResolvedRequired.js";
|
|
|
35
36
|
import { useSize } from "../SizeContext/SizeContext.js";
|
|
36
37
|
import { themeProps } from "../utils/themeProps.js";
|
|
37
38
|
import { characterCount } from "../utils/characters.js";
|
|
39
|
+
import { textEntryTraitAttributes } from "../Field/textEntryTraits.js";
|
|
38
40
|
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
39
41
|
import { useBusyAnnouncement } from "../hooks/useBusyAnnouncement.js";
|
|
40
42
|
import { registerEnglishFallback, useComponentTranslator } from "../i18n/useComponentTranslator.js";
|
|
@@ -132,6 +134,10 @@ export function TextArea({
|
|
|
132
134
|
labelTooltip,
|
|
133
135
|
startIcon,
|
|
134
136
|
hasSpellCheck = true,
|
|
137
|
+
enterKeyHint,
|
|
138
|
+
inputMode,
|
|
139
|
+
autoCapitalize,
|
|
140
|
+
hasAutoCorrect,
|
|
135
141
|
onPaste,
|
|
136
142
|
maxLength,
|
|
137
143
|
hasAutoFocus = false,
|
|
@@ -331,12 +337,17 @@ export function TextArea({
|
|
|
331
337
|
onFocus: onFocus,
|
|
332
338
|
onBlur: onBlur,
|
|
333
339
|
placeholder: placeholder,
|
|
334
|
-
rows: rows
|
|
340
|
+
rows: rows,
|
|
341
|
+
...textEntryTraitAttributes({
|
|
342
|
+
enterKeyHint,
|
|
343
|
+
inputMode,
|
|
344
|
+
autoCapitalize,
|
|
345
|
+
hasAutoCorrect
|
|
346
|
+
}),
|
|
335
347
|
// A disabled textarea keeps its place in the tab order
|
|
336
348
|
// (spec:AST-085): aria-disabled instead of the native attribute,
|
|
337
349
|
// with readOnly + the handleChange guard keeping the value from
|
|
338
350
|
// changing.
|
|
339
|
-
,
|
|
340
351
|
"aria-disabled": isDisabled ? 'true' : undefined,
|
|
341
352
|
readOnly: isReadOnly || isDisabled || undefined,
|
|
342
353
|
spellCheck: hasSpellCheck,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file TextInput.tsx
|
|
3
|
-
* @input Uses React, useId, ChangeEvent, Field, Icon, InputGroupContext
|
|
4
|
-
*
|
|
3
|
+
* @input Uses React, useId, ChangeEvent, Field, Icon, InputGroupContext,
|
|
4
|
+
* textEntryTraits (the touch-keyboard trait props)
|
|
5
|
+
* @output Exports TextInput component, TextInputProps, TextInputType
|
|
5
6
|
* @position Core implementation; consumed by index.ts, tested by TextInput.test.tsx
|
|
6
7
|
*
|
|
7
8
|
* SYNC: When modified, update these files to stay in sync:
|
|
@@ -15,6 +16,7 @@ import { type ChangeEvent, type KeyboardEvent, type ReactNode } from 'react';
|
|
|
15
16
|
import * as stylex from '@stylexjs/stylex';
|
|
16
17
|
import { type InputStatus } from '../Field/index.js';
|
|
17
18
|
import { type IconType } from '../Icon/index.js';
|
|
19
|
+
import { type TextEntryTraitProps } from '../Field/textEntryTraits.js';
|
|
18
20
|
declare const sizeStyles: Readonly<{
|
|
19
21
|
readonly sm: Readonly<{
|
|
20
22
|
readonly height: stylex.StyleXClassNameFor<"height", "28px">;
|
|
@@ -31,12 +33,19 @@ export type { InputStatus as TextInputStatus, InputStatusType as TextInputStatus
|
|
|
31
33
|
import { type FieldInputBaseProps } from '../Field/fieldParts.js';
|
|
32
34
|
import type { SizeValue } from '../utils/types.js';
|
|
33
35
|
import type { FieldStatusPlacement } from '../Field/fieldStatusPlacement.js';
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
/**
|
|
37
|
+
* The HTML input type. Beyond their meaning, `email`, `tel`, `url` and
|
|
38
|
+
* `password` choose a touch keyboard (email, phone pad, URL) and its
|
|
39
|
+
* capitalization; `search` makes the field a search box.
|
|
40
|
+
*/
|
|
41
|
+
export type TextInputType = 'text' | 'password' | 'email' | 'search' | 'tel' | 'url';
|
|
42
|
+
export interface TextInputProps extends Omit<FieldInputBaseProps, 'onChange' | 'defaultValue'>, TextEntryTraitProps {
|
|
36
43
|
/** Ref forwarded to the root element */
|
|
37
44
|
ref?: React.Ref<HTMLInputElement>;
|
|
38
45
|
/**
|
|
39
|
-
* The HTML input type.
|
|
46
|
+
* The HTML input type. `email`, `tel` and `url` also bring up the matching
|
|
47
|
+
* touch keyboard (email, phone pad, URL); `search` makes the field a search
|
|
48
|
+
* box (pair it with `enterKeyHint="search"` for a Search key).
|
|
40
49
|
* @default 'text'
|
|
41
50
|
*/
|
|
42
51
|
type?: TextInputType;
|
|
@@ -183,6 +192,11 @@ export interface TextInputProps extends Omit<FieldInputBaseProps, 'onChange' | '
|
|
|
183
192
|
* session-scoped field that must not reuse a prior value).
|
|
184
193
|
*/
|
|
185
194
|
autoComplete?: React.InputHTMLAttributes<HTMLInputElement>['autoComplete'];
|
|
195
|
+
/**
|
|
196
|
+
* Whether misspelled words are underlined (the native `spellcheck`).
|
|
197
|
+
* Unset, the browser decides.
|
|
198
|
+
*/
|
|
199
|
+
hasSpellCheck?: boolean;
|
|
186
200
|
}
|
|
187
201
|
/**
|
|
188
202
|
* A text input component for collecting user input.
|
|
@@ -193,7 +207,7 @@ export interface TextInputProps extends Omit<FieldInputBaseProps, 'onChange' | '
|
|
|
193
207
|
* <TextInput label="Search" isLabelHidden value={query} onChange={setQuery} />
|
|
194
208
|
* ```
|
|
195
209
|
*/
|
|
196
|
-
export declare function TextInput({ type, label, isLabelHidden, description, isOptional, isRequired, isDisabled: isDisabledProp, isReadOnly, disabledMessage, startIcon, status, statusVariant, size: sizeProp, onChange, changeAction, isLoading, value, placeholder, labelTooltip, hasClear, hasAutoFocus, htmlName, onEnter, onKeyDown, width, containerXstyle, containerClassName, containerStyle, controlXstyle, controlClassName, controlStyle, ref, id: idProp, 'aria-describedby': ariaDescribedByProp, 'aria-labelledby': ariaLabelledByProp, ...restProps }: TextInputProps): import("react").JSX.Element;
|
|
210
|
+
export declare function TextInput({ type, label, isLabelHidden, description, isOptional, isRequired, isDisabled: isDisabledProp, isReadOnly, disabledMessage, startIcon, status, statusVariant, size: sizeProp, onChange, changeAction, isLoading, value, placeholder, labelTooltip, hasClear, hasAutoFocus, htmlName, onEnter, onKeyDown, enterKeyHint, inputMode, autoCapitalize, hasAutoCorrect, hasSpellCheck, width, containerXstyle, containerClassName, containerStyle, controlXstyle, controlClassName, controlStyle, ref, id: idProp, 'aria-describedby': ariaDescribedByProp, 'aria-labelledby': ariaLabelledByProp, ...restProps }: TextInputProps): import("react").JSX.Element;
|
|
197
211
|
export declare namespace TextInput {
|
|
198
212
|
var displayName: string;
|
|
199
213
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../src/TextInput/TextInput.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../src/TextInput/TextInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAOL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAO3C,OAAO,EAGL,KAAK,WAAW,EAKjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAMtD,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAC;AAkClC,QAAA,MAAM,UAAU;;;;;;;;;;EAUd,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,UAAU,CAAC;AAMpD,YAAY,EACV,WAAW,IAAI,eAAe,EAC9B,eAAe,IAAI,mBAAmB,GACvC,MAAM,UAAU,CAAC;AASlB,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAK9C,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,+BAA+B,CAAC;AAQxE;;;;GAIG;AACH,MAAM,MA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