react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

Segmented control

Open yihuiliao opened this issue 1 year ago โ€ข 13 comments

Closes

โœ… Pull Request Checklist:

  • [ ] Included link to corresponding React Spectrum GitHub Issue.
  • [ ] Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • [ ] Filled out test instructions.
  • [ ] Updated documentation (if it already exists for this component).
  • [ ] Looked at the Accessibility Practices for this feature - Aria Practices

๐Ÿ“ Test Instructions:

๐Ÿงข Your Project:

yihuiliao avatar Aug 13 '24 00:08 yihuiliao

Not sure what's going on, but there's a wiggle in the animation.

Maybe try transform-origin: left / transform-origin: right ?

reidbarber avatar Sep 04 '24 20:09 reidbarber

## API Changes

@react-spectrum/s2

/@react-spectrum/s2:SegmentedControl

+SegmentedControl {
+  UNSAFE_className?: string
+  UNSAFE_style?: CSSProperties
+  aria-describedby?: string
+  aria-details?: string
+  aria-errormessage?: string
+  aria-label: string
+  aria-labelledby?: string
+  children: ReactNode
+  defaultValue?: string | null
+  id?: string
+  isDisabled?: boolean
+  onBlur?: (FocusEvent<Target>) => void
+  onChange?: (string) => void
+  onFocus?: (FocusEvent<Target>) => void
+  onFocusChange?: (boolean) => void
+  slot?: string | null
+  styles?: StylesProp
+  value?: string | null
+}

/@react-spectrum/s2:SegmentedControlItem

+SegmentedControlItem {
+  UNSAFE_className?: string
+  UNSAFE_style?: CSSProperties
+  aria-describedby?: string
+  aria-details?: string
+  aria-label?: string
+  aria-labelledby?: string
+  autoFocus?: boolean
+  children: ReactNode
+  id?: string
+  inputRef?: RefObject<HTMLInputElement | null>
+  isDisabled?: boolean
+  onBlur?: (FocusEvent<Target>) => void
+  onFocus?: (FocusEvent<Target>) => void
+  onFocusChange?: (boolean) => void
+  onKeyDown?: (KeyboardEvent) => void
+  onKeyUp?: (KeyboardEvent) => void
+  slot?: string | null
+  styles?: StylesProp
+  value: string
+}

/@react-spectrum/s2:SegmentedControlContext

+SegmentedControlContext {
+  UNTYPED
+}

/@react-spectrum/s2:SegmentedControlProps

+SegmentedControlProps {
+  UNSAFE_className?: string
+  UNSAFE_style?: CSSProperties
+  aria-describedby?: string
+  aria-details?: string
+  aria-errormessage?: string
+  aria-label: string
+  aria-labelledby?: string
+  children: ReactNode
+  defaultValue?: string | null
+  id?: string
+  isDisabled?: boolean
+  onBlur?: (FocusEvent<Target>) => void
+  onChange?: (string) => void
+  onFocus?: (FocusEvent<Target>) => void
+  onFocusChange?: (boolean) => void
+  slot?: string | null
+  styles?: StylesProp
+  value?: string | null
+}

/@react-spectrum/s2:SegmentedControlItemProps

+SegmentedControlItemProps {
+  UNSAFE_className?: string
+  UNSAFE_style?: CSSProperties
+  aria-describedby?: string
+  aria-details?: string
+  aria-label?: string
+  aria-labelledby?: string
+  autoFocus?: boolean
+  children: ReactNode
+  id?: string
+  inputRef?: RefObject<HTMLInputElement | null>
+  isDisabled?: boolean
+  onBlur?: (FocusEvent<Target>) => void
+  onFocus?: (FocusEvent<Target>) => void
+  onFocusChange?: (boolean) => void
+  onKeyDown?: (KeyboardEvent) => void
+  onKeyUp?: (KeyboardEvent) => void
+  slot?: string | null
+  styles?: StylesProp
+  value: string
+}

rspbot avatar Sep 19 '24 17:09 rspbot