Skip to content

feat: S2 TagField - #10608

Draft
devongovett wants to merge 2 commits into
mainfrom
tagfield
Draft

devongovett wants to merge 2 commits into
mainfrom
tagfield

Conversation

@devongovett

Copy link
Copy Markdown
Member

WIP

@github-actions github-actions Bot added the S2 label Sep 15, 2026
@rspbot

rspbot commented Sep 15, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Sep 15, 2026

Copy link
Copy Markdown
## API Changes

@react-spectrum/s2

/@react-spectrum/s2:TagField

+TagField {
+  UNSAFE_className?: UnsafeClassName
+  UNSAFE_style?: CSSProperties
+  aria-describedby?: string
+  aria-details?: string
+  aria-label?: string
+  aria-labelledby?: string
+  autoFocus?: boolean
+  children?: (TokenSegment) => ReactNode
+  contextualHelp?: ReactNode
+  defaultValue?: TokenFieldValue
+  description?: ReactNode
+  errorMessage?: ReactNode | (ValidationResult) => ReactNode
+  isDisabled?: boolean
+  isInvalid?: boolean
+  isReadOnly?: boolean
+  isRequired?: boolean
+  label?: ReactNode
+  labelAlign?: Alignment = 'start'
+  labelPosition?: LabelPosition = 'top'
+  necessityIndicator?: NecessityIndicator = 'icon'
+  onBlur?: (FocusEvent<Target>) => void
+  onChange?: (TokenFieldValue) => void
+  onCopy?: ClipboardEventHandler<TokenFieldValue>
+  onCut?: ClipboardEventHandler<TokenFieldValue>
+  onFocus?: (FocusEvent<Target>) => void
+  onFocusChange?: (boolean) => void
+  onKeyDown?: (React.KeyboardEvent<HTMLDivElement>) => void
+  onKeyUp?: (React.KeyboardEvent<HTMLDivElement>) => void
+  onPaste?: ClipboardEventHandler<TokenFieldValue>
+  onSubmit?: () => void
+  placeholder?: string
+  size?: 'S' | 'M' | 'L' | 'XL' = 'M'
+  slot?: string | null
+  styles?: StylesPropWithHeight
+  value?: TokenFieldValue
+}

/@react-spectrum/s2:TagFieldValue

+TagFieldValue {
+  Direction: any
+  SelectedRange: any
+  caretPosition: Position
+  constructor: (readonly Array<TokenFieldSegment<T>>, TokenFieldValueOptions) => void
+  delete: (Position, Intl.Segmenter, any, any) => this
+  deleteLine: (Position, any, any) => this
+  endCoalescing: () => void
+  findBoundaryWithSegmenter: (Position, Intl.Segmenter, any) => Position | null
+  findLineBoundary: (Position, any) => Position | null
+  findText: (Position, any, string | RegExp) => Position | null
+  redo: () => this
+  replaceRange: (Position, Position, string, any) => this
+  replaceRangeWithSegments: (Position, Position, Array<TokenFieldSegment<T>>, any) => this
+  segments: readonly Array<TokenFieldSegment<T>>
+  selectedRange: SelectedRange
+  slice: (Position, Position) => this
+  toString: () => string
+  tokenize: (string) => Array<TokenFieldSegment>
+  undo: () => this
+  withCaretPosition: (Position) => this
+  withSelectedRange: (SelectedRange) => this
+}

/@react-spectrum/s2:TagFieldContext

+TagFieldContext {
+  UNTYPED
+}

/@react-spectrum/s2:TagFieldProps

+TagFieldProps {
+  UNSAFE_className?: UnsafeClassName
+  UNSAFE_style?: CSSProperties
+  aria-describedby?: string
+  aria-details?: string
+  aria-label?: string
+  aria-labelledby?: string
+  autoFocus?: boolean
+  children?: (TokenSegment) => ReactNode
+  contextualHelp?: ReactNode
+  defaultValue?: TokenFieldValue
+  description?: ReactNode
+  errorMessage?: ReactNode | (ValidationResult) => ReactNode
+  isDisabled?: boolean
+  isInvalid?: boolean
+  isReadOnly?: boolean
+  isRequired?: boolean
+  label?: ReactNode
+  labelAlign?: Alignment = 'start'
+  labelPosition?: LabelPosition = 'top'
+  necessityIndicator?: NecessityIndicator = 'icon'
+  onBlur?: (FocusEvent<Target>) => void
+  onChange?: (TokenFieldValue) => void
+  onCopy?: ClipboardEventHandler<TokenFieldValue>
+  onCut?: ClipboardEventHandler<TokenFieldValue>
+  onFocus?: (FocusEvent<Target>) => void
+  onFocusChange?: (boolean) => void
+  onKeyDown?: (React.KeyboardEvent<HTMLDivElement>) => void
+  onKeyUp?: (React.KeyboardEvent<HTMLDivElement>) => void
+  onPaste?: ClipboardEventHandler<TokenFieldValue>
+  onSubmit?: () => void
+  placeholder?: string
+  size?: 'S' | 'M' | 'L' | 'XL' = 'M'
+  slot?: string | null
+  styles?: StylesPropWithHeight
+  value?: TokenFieldValue
+}

@rspbot

rspbot commented Sep 15, 2026

Copy link
Copy Markdown

Agent Skills Changes

Modified (9)
Install

React Spectrum S2:

npx skills add https://d1pzu54gtk2aed.cloudfront.net/pr/d6b2c8cd745ef0b272077c78f0a864fef6549fd8/

React Aria:

npx skills add https://d5iwopk28bdhl.cloudfront.net/pr/d6b2c8cd745ef0b272077c78f0a864fef6549fd8/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants