@@ -3,12 +3,16 @@ import type { DroplistSelectEvent, PfeSearchDroplist } from './pfe-search-dropli
33import { LitElement , html } from 'lit' ;
44import { customElement , property , state , query } from 'lit/decorators.js' ;
55
6+ import { ColorPalette , ColorTheme } from '@patternfly/pfe-core' ;
7+
68import { ComposedEvent } from '@patternfly/pfe-core' ;
7- import { pfelement , bound , observed } from '@patternfly/pfe-core/decorators.js' ;
9+ import { pfelement , bound , observed , colorContextConsumer , colorContextProvider , deprecation , } from '@patternfly/pfe-core/decorators.js' ;
810import { deprecatedCustomEvent } from '@patternfly/pfe-core/functions/deprecatedCustomEvent.js' ;
911
12+
1013import './pfe-search-droplist' ;
1114
15+
1216import style from './pfe-autocomplete.scss' ;
1317
1418export type AutocompleteRequestFunction =
@@ -109,6 +113,25 @@ export class PfeAutocomplete extends LitElement {
109113
110114 static readonly shadowRootOptions = { ...LitElement . shadowRootOptions , delegatesFocus : true } ;
111115
116+ /**
117+ * Sets color palette, which affects the element's styles as well as descendants' color theme.
118+ * Overrides parent color context.
119+ * Your theme will influence these colors so check there first if you are seeing inconsistencies.
120+ * See [Color](https://patternflyelements.org/theming/colors/) for default values
121+ */
122+ @colorContextProvider ( )
123+ @property ( { reflect : true , attribute : 'color-palette' } ) colorPalette ?: ColorPalette ;
124+
125+ /** @deprecated use `color-palette` */
126+ @deprecation ( { alias : 'colorPalette' , attribute : 'color' } ) color ?: ColorPalette ;
127+
128+ /**
129+ * Sets color theme based on parent context
130+ */
131+ @colorContextConsumer ( )
132+ @property ( { reflect : true } ) on : ColorTheme = 'light' ;
133+
134+
112135 /**
113136 * Set this attribute when you want to set a value in input box when web component is added to page.
114137 */
0 commit comments