react-spectrum
28ceccbf - ComboBox refactoring (#1176)

Commit
4 years ago
ComboBox refactoring (#1176) * WIP: refactor mobile combobox * ComboBox state refactor * Add live region announcer for more consistent announcement with VoiceOver * Add missing strings to translations files * Updates for mobile combobox and add tests * Add aria-hidden to all elements other than combobox and popover when open * Fix tray size on chrome android * Move ariaHideOutside into @react-aria/overlays * Support placeholder in mobile combobox * Close when clicking on the button a second time * Various code cleanup and ref handling improvements * Correct aria-setsize with sections * Make live announcer behave more consistently * Only use live announcer on apple devices * Preserve defaultInputValue prop on initial render even if the defaultSelectedKey does not match * Remove tabIndex from listbox and options when using virtual focus iOS 14 moves real DOM focus even with aria-activedescendant otherwise * Only blur input on touch scroll * Make clear button not overlap validation icon in searchfield * Pass through style to ComboBoxInput so custom width without label works * Fix disabled styling of mobile combobox * Don't let long values wrap in mobile combobox * Fix page up/page down in combobox * Mobile combobox fixes * Calculate overlay positions based on visual viewport And do not close when viewport scrolls while resizing due to keyboard appearing * Fix custom width * Focus button when clicking on label on mobile * Prevent focus on clear button * Add label for invalid icon on mobile * fix docs build by fixing clearbutton type Co-authored-by: Daniel <dlu@livefyre.com> Co-authored-by: Danni <drobinson@livefyre.com>
Author
Parents
  • File
    .eslintignore
  • File
    .eslintrc.js
  • packages
    • @adobe/spectrum-css-temp/components
      • button
        • File
          index.css
      • inputgroup
        • File
          index.css
        • File
          skin.css
      • search
        • File
          index.css
      • textfield
        • File
          index.css
        • File
          skin.css
    • @react-aria
      • combobox
        • intl
          • File
            en-US.json
        • File
          package.json
        • src
          • File
            useComboBox.ts
        • test
          • File
            useComboBox.test.js
      • i18n/src
        • File
          index.ts
        • File
          useFilter.ts
      • listbox
        • File
          package.json
        • src
          • File
            useOption.ts
      • live-announcer/src
        • File
          LiveAnnouncer.tsx
      • menu/src
        • File
          useMenuItem.ts
      • numberfield/src
        • File
          useNumberField.ts
      • overlays
        • src
          • File
            ariaHideOutside.ts
          • File
            calculatePosition.ts
          • File
            index.ts
          • File
            useModal.tsx
          • File
            useOverlayPosition.ts
        • test
          • File
            ariaHideOutside.test.js
      • select/src
        • File
          HiddenSelect.tsx
      • selection/src
        • File
          useSelectableCollection.ts
        • File
          useSelectableItem.ts
      • textfield/src
        • File
          useTextField.ts
      • virtualizer/src
        • File
          Virtualizer.tsx
    • @react-spectrum
      • button/src
        • File
          ClearButton.tsx
      • combobox
        • intl
          • File
            en-US.json
        • File
          package.json
        • src
          • File
            ComboBox.tsx
          • File
            MobileComboBox.tsx
          • File
            combobox.css
        • stories
          • File
            ComboBox.stories.tsx
        • test
          • File
            ComboBox.test.js
      • datepicker/src
        • File
          DatePickerField.tsx
      • label/src
        • File
          Field.tsx
        • File
          index.ts
      • listbox/src
        • File
          ListBoxBase.tsx
      • numberfield/src
        • File
          NumberField.tsx
      • overlays/src
        • File
          Popover.tsx
        • File
          Tray.tsx
      • searchfield
        • src
          • File
            SearchField.tsx
        • stories
          • File
            SearchField.stories.js
      • test-utils/src
        • File
          events.ts
      • textfield/src
        • File
          TextArea.tsx
        • File
          TextField.tsx
        • File
          TextFieldBase.tsx
    • @react-stately
      • collections/src
        • File
          getItemCount.ts
        • File
          index.ts
      • combobox
        • src
          • File
            useComboBoxState.ts
        • test
          • File
            useComboBoxState.test.js
      • list/src
        • File
          index.ts
        • File
          useSingleSelectListState.ts
    • @react-types
      • combobox/src
        • File
          index.d.ts
      • label/src
        • File
          index.d.ts
      • overlays/src
        • File
          index.d.ts
      • textfield/src
        • File
          index.d.ts
  • File
    tsconfig.json