@@ -2,8 +2,8 @@ import { LitElement, html } from 'lit';
22import { unsafeHTML } from 'lit/directives/unsafe-html.js' ;
33import { customElement , property , query , state } from 'lit/decorators.js' ;
44
5- import { ComposedEvent } from '@patternfly/pfe-core' ;
6- import { pfelement , bound , observed } from '@patternfly/pfe-core/decorators.js' ;
5+ import { ColorPalette , ColorTheme , ComposedEvent } from '@patternfly/pfe-core' ;
6+ import { pfelement , bound , observed , colorContextConsumer , deprecation , colorContextProvider } from '@patternfly/pfe-core/decorators.js' ;
77import { getRandomId } from '@patternfly/pfe-core/functions/random.js' ;
88import { deprecatedCustomEvent } from '@patternfly/pfe-core/functions/deprecatedCustomEvent.js' ;
99
@@ -125,9 +125,25 @@ export class PfeJumpLinksNav extends LitElement {
125125 */
126126 @property ( { type : String , reflect : true , attribute : 'sr-text' } ) srText = 'Jump to section' ;
127127
128- // Supports only lightest and darkest background colors
129- /** Color */
130- @property ( { type : String , reflect : true } ) color : 'lightest' | 'darkest' = 'lightest' ;
128+ /**
129+ * Sets color palette, which affects the element's styles as well as descendants' color theme.
130+ * Overrides parent color context.
131+ * Your theme will influence these colors so check there first if you are seeing inconsistencies.
132+ * See [CSS Custom Properties](#css-custom-properties) for default values
133+ *
134+ * Card always resets its context to `base`, unless explicitly provided with a `color-palette`.
135+ */
136+ @colorContextProvider ( )
137+ @property ( { reflect : true , attribute : 'color-palette' } ) colorPalette ?: ColorPalette ;
138+
139+ /** @deprecated use `color-palette` */
140+ @deprecation ( { alias : 'colorPalette' , attribute : 'color' } ) color ?: ColorPalette ;
141+
142+ /**
143+ * Sets color theme based on parent context
144+ */
145+ @colorContextConsumer ( )
146+ @property ( { reflect : true } ) on ?: ColorTheme ;
131147
132148 // @TODO Need to incorporate support for breakpoint customizations i.e., offset="@500px: 200, @800px: 150"
133149 /**
0 commit comments