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

[Public typings] Consider tightening property typings #10437

Open maxpatiiuk opened 1 month ago

maxpatiiuk commented 1 month ago

Check existing issues

Description

Inline with https://github.com/Esri/calcite-design-system/pull/9915, it appears that Calcite will tighten property typings in a future release.

A few more candidates for tightening to be considered:

(the above tighter types would match Lumina JSX typings; until then, I had to add type assertions in render() to avoid TypeScript errors)

Acceptance Criteria

Consider tightening the types.

Relevant Info

This is what I had to do for now in render():

            <input
              autocomplete={this.autocomplete as LuminaJsx.HTMLElementTags["input"]["autocomplete"]}
              enterKeyHint={enterKeyHint as LuminaJsx.HTMLElementTags["input"]["enterKeyHint"]}
              inputMode={inputMode as LuminaJsx.HTMLElementTags["input"]["inputMode"]}

Which Component

listed above

Example Use Case

No response

Priority impact

impact - p3 - not time sensitive

Calcite package

Esri team

ArcGIS Maps SDK for JavaScript

jcfranco commented 1 week ago

Types for autocomplete, inputMode and enterKeyHint won't be necessary since we'll drop these props in favor of the global attributes (see https://github.com/Esri/calcite-design-system/issues/9260 for more info on the last 2 props).