Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
293 stars 76 forks source link

[New component] Autocomplete #10044

Open bsvensson opened 3 months ago

bsvensson commented 3 months ago

Check existing issues

Description

We would like the combobox component to support async data, actions, a menu for switching sources and have the ability to show a suggestion/autocomplete list.

Blocked issues: #8877

Acceptance Criteria

Relevant Info

Ask @driskull for details ;)

Which Component

calcite-combobox

Example Use Case

We are trying to move the Search widget to Calcite Components.

Priority impact

impact - p1 - need for current milestone

Calcite package

Esri team

ArcGIS Maps SDK for JavaScript

CalciteAutocomplete

Proposed HTML

<calcite-autocomplete open scale="m" value="1" input-value="Redlands, CA">
  <calcite-autocomplete-item value="1" heading="Redlands, CA"></calcite-autocomplete-item>
  <calcite-autocomplete-item value="2" heading="Redlands, CO, USA"></calcite-autocomplete-item>
  <calcite-autocomplete-item value="2" heading="Redlands, Dorset, England, GBR"></calcite-autocomplete-item>
  <calcite-autocomplete-item value="2" heading="Redlands, Wiltshire, England, GBR"></calcite-autocomplete-item>
  <calcite-button scale="s" slot="actions-start" icon-start="banana"></calcite-button>
  <calcite-button scale="s" slot="actions-end" icon-start="banana"></calcite-button>
</calcite-autocomplete>

Properties

All of the properties from calcite-input plus these additional properties:

Events

Methods

Slots

<calcite-autocomplete-item value="1" heading="Redlands, CA"></calcite-autocomplete-item>

Properties

Events

None

Methods

Slots

CalciteAutocompleteItemGroup

<calcite-autocomplete-item-group heading="Locations"></calcite-autocomplete-item-group>

Properties

Events

None

Methods

Slots

Figma Spec

In progress design spec for Autocomplete, Autocomplete Item, and Autocomplete Item Group. Will update as needed during development.

driskull commented 3 months ago

https://www.syncfusion.com/blogs/post/which-control-should-i-use-autocomplete-or-combobox

This article shows the difference between combobox and autocomplete.

geospatialem commented 3 months ago

Related for discussion: https://github.com/Esri/calcite-design-system/issues/8877

driskull commented 3 months ago

The aria-autocomplete attribute can be associated with the following roles: combobox, textbox, or searchbox.

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-autocomplete#associated_roles

geospatialem commented 2 months ago

+1 for ArcGIS Knowledge

driskull commented 2 months ago

@geospatialem can we repurpose this issue to "Add autocomplete component"?

We'll also need issues for:

github-actions[bot] commented 2 months ago

cc @ashetland, @SkyeSeitz, @brittneytewks