Esri / calcite-design-system

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

[New component] Autocomplete #10044

Open bsvensson opened 2 months ago

bsvensson commented 2 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-action scale="s" slot="content-start" icon="banana"></calcite-action>
  <calcite-action scale="s" slot="content-end" icon="banana"></calcite-action>
</calcite-autocomplete>

Properties

All of the properties from calcite-input-search excluding pattern and readonly plus these additional properties:

Events

Methods

Slots

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

Properties

Events

None

Methods

Slots

driskull commented 2 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 2 months ago

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

driskull commented 2 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