@patternfly/pfe-core 2.0.0-next.8 → 2.0.0-next.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
- import { ReactiveController, ReactiveElement } from 'lit';
1
+ import type { ReactiveController } from 'lit';
2
2
  import type { Context } from '../context.js';
3
+ import { ReactiveElement } from 'lit';
3
4
  import { Logger } from './logger.js';
4
5
  import { StyleController } from './style-controller.js';
5
6
  /**
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["color-context.ts", "color-context.scss"],
4
- "sourcesContent": ["import { ReactiveController, ReactiveElement } from 'lit';\nimport type { Context, ContextCallback, UnknownContext } from '../context.js';\n\nimport { ContextEvent, createContext } from '../context.js';\nimport { bound } from '../decorators/bound.js';\nimport { Logger } from './logger.js';\nimport { StyleController } from './style-controller.js';\n\nimport CONTEXT_BASE_STYLES from './color-context.scss';\n\n/**\n * A `ColorPalette` is a collection of specific color values\n * Choosing a palette sets both color properties and, if the component is a context provider,\n * implies a color theme for descendents.\n *\n * `ColorPalette` is associated with the `color-palette` attribute\n */\nexport type ColorPalette = (\n | 'base'\n | 'accent'\n | 'complement'\n | 'lighter'\n | 'lightest'\n | 'darker'\n | 'darkest'\n);\n\n/**\n * A Color theme is a context-specific restriction on the available color palettes\n *\n * `ColorTheme` is associated with the `on` attribute and the `--context` css property\n */\nexport type ColorTheme = (\n | 'dark'\n | 'light'\n | 'saturated'\n);\n\nexport interface ColorContextOptions {\n prefix?: string;\n attribute?: string;\n}\n\n// TODO: CSS\n// 1. move sass that maps from palette to theme from _colors.scss:198+ to color-context.scss (and rename them)\n// 2. except don't because hard, wait for design tokens instead\n\n// TODO: QA\n// 1. verify elements\n// pfe-band - (easy)\n// pfe-card - (easy)\n// pfe-tabs - (easy)\n// pfe-jump-links - (potentially fraught)\n// pfe-autocomplete - (anyways broken)\n// pfe-cta - (anyways broken)\n\n/**\n* Maps from consumer host elements to already-fired request events\n* We hold these in memory in order to re-fire the events every time a new provider connects.\n* This is a hedge against cases where an early-upgrading provider claims an early-upgrading\n* consumer before a late-upgrading provider has a chance to register as the rightful provider\n* @example Monkey-in-the-middle error\n* In this example, we must re-fire the event from eager-consumer when late-provider\n* upgrades, so as to ensure that late-provider claims it for itself\n* ```html\n* <early-provider>\n* <late-provider>\n* <eager-consumer>\n* </late-provider>\n* </early-provider>\n* ```\n*/\nconst contextEvents = new Map<ReactiveElement, ContextEvent<UnknownContext>>();\n\n/**\n * Color context is derived from the `--context` css custom property,\n * which can be set by the `on` attribute, but *must* be set by the `color-palette` attribute\n * This property is set (in most cases) in `color-context.scss`,\n * which is added to components via `StyleController`.\n *\n * In this way, we avoid the need to execute javascript in order to convert from a given\n * `ColorPalette` to a given `ColorTheme`, since those relationships are specified in CSS.\n */\nabstract class ColorContextController implements ReactiveController {\n abstract update(next: ColorTheme | null): void;\n\n protected abstract attribute: string;\n\n /** The context object which describes the host's colour context */\n protected context: Context<ColorTheme|null>;\n\n /** The style controller which provides the necessary CSS. */\n protected styleController: StyleController;\n\n /** Prefix for colour context. Set this in Options to create a separate context */\n protected prefix = 'pfe-';\n\n /** The last-known color context on the host */\n protected last: ColorTheme|null = null;\n\n protected logger: Logger;\n\n hostUpdate?(): void\n\n constructor(protected host: ReactiveElement, options?: ColorContextOptions) {\n this.prefix = options?.prefix ?? 'pfe-';\n this.context = createContext(`${this.prefix}-color-context`);\n this.logger = new Logger(host);\n this.styleController = new StyleController(host, CONTEXT_BASE_STYLES);\n host.addController(this as ReactiveController);\n }\n}\n\n/**\n * `ColorContextProvider` is responsible to derive a context value from CSS and provide it to its\n * descendents.\n */\nexport class ColorContextProvider extends ColorContextController implements ReactiveController {\n protected attribute: string;\n\n /** Cache of context callbacks. Call each to update consumers */\n private callbacks = new Set<ContextCallback<ColorTheme|null>>();\n\n /** Mutation observer which updates consumers when `on` or `color-palette` attributes change. */\n private mo = new MutationObserver(() => this.update(this.contextVariable));\n\n /**\n * Cached (live) computed style declaration\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle\n */\n protected style: CSSStyleDeclaration;\n\n /** Return the current CSS `--context` value, or null */\n protected get contextVariable(): ColorTheme | null {\n return this.style.getPropertyValue('--context').trim() as ColorTheme || null;\n }\n\n constructor(host: ReactiveElement, options?: ColorContextOptions) {\n super(host, options);\n this.style = window.getComputedStyle(host);\n this.attribute = options?.attribute ?? 'color-palette';\n }\n\n /**\n * When a context provider connects, it listens for context-request events\n * it also fires all previously fired context-request events from their hosts,\n * in case this context provider upgraded after and is closer to a given consumer.\n */\n hostConnected() {\n this.host.addEventListener('context-request', this.onChildContextEvent);\n this.mo.observe(this.host, { attributes: true, attributeFilter: [this.attribute, 'on'] });\n this.update(this.contextVariable);\n for (const [host, fired] of contextEvents) {\n host.dispatchEvent(fired);\n }\n }\n\n /**\n * When a context provider disconnects, it disconnects its mutation observer\n */\n hostDisconnected() {\n this.callbacks.forEach(x => this.callbacks.delete(x));\n this.mo.disconnect();\n }\n\n /** Was the context event fired requesting our colour-context context? */\n private isColorContextEvent(\n event: ContextEvent<UnknownContext>\n ): event is ContextEvent<Context<ColorTheme|null>> {\n return (\n event.target !== this.host &&\n event.context.name === `${this.prefix}-color-context`\n );\n }\n\n /**\n * Provider part of context API\n * When a child connects, claim its context-request event\n * and add its callback to the Set of children if it requests multiple updates\n */\n @bound private onChildContextEvent(event: ContextEvent<UnknownContext>) {\n // only handle ContextEvents relevant to colour context\n if (this.isColorContextEvent(event)) {\n // claim the context-request event for ourselves (required by context protocol)\n event.stopPropagation();\n\n // Run the callback to initialize the child's colour-context\n event.callback(this.contextVariable);\n\n // Cache the callback for future updates, if requested\n if (event.multiple) {\n this.callbacks.add(event.callback);\n }\n }\n }\n\n /** Sets the `on` attribute on the host and any children that requested multiple updates */\n @bound public update(next: ColorTheme | null) {\n for (const cb of this.callbacks) {\n cb(next);\n }\n }\n}\n\n/**\n * A color context consumer receives sets it's `on` attribute based on the context provided\n * by the closes color context provider.\n * The consumer has no direct access to the context, it must receive it from the provider.\n */\nexport class ColorContextConsumer extends ColorContextController implements ReactiveController {\n protected attribute: string;\n\n private dispose?: () => void;\n\n private override: ColorTheme | null = null;\n\n constructor(host: ReactiveElement, options?: ColorContextOptions) {\n super(host, options);\n this.attribute ??= 'on';\n }\n\n /**\n * When a color context consumer connects,\n * it requests colour context from the closest context provider,\n * then updates it's host's `on` attribute\n */\n hostConnected() {\n const event = new ContextEvent(this.context, this.contextCallback, true);\n this.override = this.host.getAttribute(this.attribute) as ColorTheme;\n this.host.dispatchEvent(event);\n contextEvents.set(this.host, event);\n }\n\n /**\n * When a color context consumer disconnects,\n * it removes itself from the collection of components which request color context\n * then updates it's host's `on` attribute\n */\n hostDisconnected() {\n this.dispose?.();\n this.dispose = undefined;\n contextEvents.delete(this.host);\n }\n\n /** Register the dispose callback for hosts that requested multiple updates, then update the colour-context */\n @bound private contextCallback(value: ColorTheme|null, dispose?: () => void) {\n // protect against changing providers\n if (dispose && dispose !== this.dispose) {\n this.dispose?.();\n this.dispose = dispose;\n }\n this.update(value);\n }\n\n /** Sets the `on` attribute on the host and any children that requested multiple updates */\n @bound public update(next: ColorTheme|null) {\n if (!this.override && next !== this.last) {\n this.last = next;\n this.logger.log(`setting context from ${this.host.getAttribute(this.attribute)} to ${next}`);\n if (next == null) {\n this.host.removeAttribute(this.attribute);\n } else {\n this.host.setAttribute(this.attribute, next);\n }\n }\n }\n}\n\n", "import {css} from 'lit';\nexport const styles = css`:host(:is([on=dark])){--context:dark}:host(:is([on=light])){--context:light}:host(:is([on=saturated])){--context:saturated}:host(:is([color-palette=darker],[color-palette=darkest])){--context:dark;--pfe-broadcasted--text:var(--pfe-theme--color--text--on-dark, #fff);--pfe-broadcasted--text--muted:var(--pfe-theme--color--text--muted--on-dark, #d2d2d2);--pfe-broadcasted--link:var(--pfe-theme--color--link--on-dark, #73bcf7);--pfe-broadcasted--link--hover:var(--pfe-theme--color--link--hover--on-dark, #bee1f4);--pfe-broadcasted--link--focus:var(--pfe-theme--color--link--focus--on-dark, #bee1f4);--pfe-broadcasted--link--visited:var(--pfe-theme--color--link--visited--on-dark, #bee1f4);--pfe-broadcasted--link-decoration:var(--pfe-theme--link-decoration--on-dark, none);--pfe-broadcasted--link-decoration--hover:var(--pfe-theme--link-decoration--hover--on-dark, underline);--pfe-broadcasted--link-decoration--focus:var(--pfe-theme--link-decoration--focus--on-dark, underline);--pfe-broadcasted--link-decoration--visited:var(--pfe-theme--link-decoration--visited--on-dark, none)}:host(:is([color-palette=lighter],[color-palette=lightest],[color-palette=base])){--context:light;--pfe-broadcasted--text:var(--pfe-theme--color--text, #151515);--pfe-broadcasted--text--muted:var(--pfe-theme--color--text--muted, #6a6e73);--pfe-broadcasted--link:var(--pfe-theme--color--link, #06c);--pfe-broadcasted--link--hover:var(--pfe-theme--color--link--hover, #004080);--pfe-broadcasted--link--focus:var(--pfe-theme--color--link--focus, #004080);--pfe-broadcasted--link--visited:var(--pfe-theme--color--link--visited, #6753ac);--pfe-broadcasted--link-decoration:var(--pfe-theme--link-decoration, none);--pfe-broadcasted--link-decoration--hover:var(--pfe-theme--link-decoration--hover, underline);--pfe-broadcasted--link-decoration--focus:var(--pfe-theme--link-decoration--focus, underline);--pfe-broadcasted--link-decoration--visited:var(--pfe-theme--link-decoration--visited, none)}:host(:is([color-palette=accent],[color-palette=complement],[color-palette=saturated])){--context:saturated;--pfe-broadcasted--text:var(--pfe-theme--color--text--on-saturated, #fff);--pfe-broadcasted--text--muted:var(--pfe-theme--color--text--muted--on-saturated, #d2d2d2);--pfe-broadcasted--link:var(--pfe-theme--color--link--on-saturated, #fff);--pfe-broadcasted--link--hover:var(--pfe-theme--color--link--hover--on-saturated, #fafafa);--pfe-broadcasted--link--focus:var(--pfe-theme--color--link--focus--on-saturated, #fafafa);--pfe-broadcasted--link--visited:var(--pfe-theme--color--link--visited--on-saturated, #d2d2d2);--pfe-broadcasted--link-decoration:var(--pfe-theme--link-decoration--on-saturated, underline);--pfe-broadcasted--link-decoration--hover:var(--pfe-theme--link-decoration--hover--on-saturated, underline);--pfe-broadcasted--link-decoration--focus:var(--pfe-theme--link-decoration--focus--on-saturated, underline);--pfe-broadcasted--link-decoration--visited:var(--pfe-theme--link-decoration--visited--on-saturated, underline)}:host(:is([color-palette=lightest])){--pfe-context-background-color:var(--pfe-theme--color--surface--lightest, #fff)}:host(:is([color-palette=lighter])){--pfe-context-background-color:var(--pfe-theme--color--surface--lighter, #ededed)}:host(:is([color-palette=base])){--pfe-context-background-color:var(--pfe-theme--color--surface--base, #ededed)}:host(:is([color-palette=darker])){--pfe-context-background-color:var(--pfe-theme--color--surface--darker, #393f44)}:host(:is([color-palette=darkest])){--pfe-context-background-color:var(--pfe-theme--color--surface--darkest, #292e34)}:host(:is([color-palette=complement])){--pfe-context-background-color:var(--pfe-theme--color--surface--complement, #004368)}:host(:is([color-palette=accent])){--pfe-context-background-color:var(--pfe-theme--color--surface--accent, #00659c)}:host(:is([color-palette])){background-color:var(--pfe-context-background-color,var(--pfe-theme--color--surface--base))}`;\nexport default styles;\n"],
5
- "mappings": "wMAAA,MAAoD,MAGpD,OAAS,gBAAAA,EAAc,iBAAAC,MAAqB,gBAC5C,OAAS,SAAAC,MAAa,yBACtB,OAAS,UAAAC,MAAc,cACvB,OAAS,mBAAAC,MAAuB,wBCNhC,OAAQ,OAAAC,MAAU,MACX,IAAMC,EAASD,s3HACfE,EAAQD,EDsEf,IAAME,EAAgB,IAAI,IAWXC,EAAf,KAAoE,CAqBlE,YAAsBC,EAAuBC,EAA+B,CAAtD,UAAAD,EATtB,KAAU,OAAS,OAGnB,KAAU,KAAwB,KAOhC,KAAK,OAASC,GAAS,QAAU,OACjC,KAAK,QAAUC,EAAc,GAAG,KAAK,sBAAsB,EAC3D,KAAK,OAAS,IAAIC,EAAOH,CAAI,EAC7B,KAAK,gBAAkB,IAAII,EAAgBJ,EAAMK,CAAmB,EACpEL,EAAK,cAAc,IAA0B,CAC/C,CACF,EAMaM,EAAN,cAAmCP,CAAqD,CAoB7F,YAAYC,EAAuBC,EAA+B,CAChE,MAAMD,EAAMC,CAAO,EAjBrB,KAAQ,UAAY,IAAI,IAGxB,KAAQ,GAAK,IAAI,iBAAiB,IAAM,KAAK,OAAO,KAAK,eAAe,CAAC,EAevE,KAAK,MAAQ,OAAO,iBAAiBD,CAAI,EACzC,KAAK,UAAYC,GAAS,WAAa,eACzC,CARA,IAAc,iBAAqC,CACjD,OAAO,KAAK,MAAM,iBAAiB,WAAW,EAAE,KAAK,GAAmB,IAC1E,CAaA,eAAgB,CACd,KAAK,KAAK,iBAAiB,kBAAmB,KAAK,mBAAmB,EACtE,KAAK,GAAG,QAAQ,KAAK,KAAM,CAAE,WAAY,GAAM,gBAAiB,CAAC,KAAK,UAAW,IAAI,CAAE,CAAC,EACxF,KAAK,OAAO,KAAK,eAAe,EAChC,OAAW,CAACD,EAAMO,CAAK,IAAKT,EAC1BE,EAAK,cAAcO,CAAK,CAE5B,CAKA,kBAAmB,CACjB,KAAK,UAAU,QAAQC,GAAK,KAAK,UAAU,OAAOA,CAAC,CAAC,EACpD,KAAK,GAAG,WAAW,CACrB,CAGQ,oBACNC,EACiD,CACjD,OACEA,EAAM,SAAW,KAAK,MACtBA,EAAM,QAAQ,OAAS,GAAG,KAAK,sBAEnC,CAOe,oBAAoBA,EAAqC,CAElE,KAAK,oBAAoBA,CAAK,IAEhCA,EAAM,gBAAgB,EAGtBA,EAAM,SAAS,KAAK,eAAe,EAG/BA,EAAM,UACR,KAAK,UAAU,IAAIA,EAAM,QAAQ,EAGvC,CAGc,OAAOC,EAAyB,CAC5C,QAAWC,KAAM,KAAK,UACpBA,EAAGD,CAAI,CAEX,CACF,EAtBiBE,EAAA,CAAfC,GA/DWP,EA+DI,mCAiBDM,EAAA,CAAdC,GAhFWP,EAgFG,sBAYT,IAAMQ,EAAN,cAAmCf,CAAqD,CAO7F,YAAYC,EAAuBC,EAA+B,CAChE,MAAMD,EAAMC,CAAO,EAHrB,KAAQ,SAA8B,KAIpC,KAAK,YAAL,KAAK,UAAc,KACrB,CAOA,eAAgB,CACd,IAAMQ,EAAQ,IAAIM,EAAa,KAAK,QAAS,KAAK,gBAAiB,EAAI,EACvE,KAAK,SAAW,KAAK,KAAK,aAAa,KAAK,SAAS,EACrD,KAAK,KAAK,cAAcN,CAAK,EAC7BX,EAAc,IAAI,KAAK,KAAMW,CAAK,CACpC,CAOA,kBAAmB,CACjB,KAAK,UAAU,EACf,KAAK,QAAU,OACfX,EAAc,OAAO,KAAK,IAAI,CAChC,CAGe,gBAAgBkB,EAAwBC,EAAsB,CAEvEA,GAAWA,IAAY,KAAK,UAC9B,KAAK,UAAU,EACf,KAAK,QAAUA,GAEjB,KAAK,OAAOD,CAAK,CACnB,CAGc,OAAON,EAAuB,CACtC,CAAC,KAAK,UAAYA,IAAS,KAAK,OAClC,KAAK,KAAOA,EACZ,KAAK,OAAO,IAAI,wBAAwB,KAAK,KAAK,aAAa,KAAK,SAAS,QAAQA,GAAM,EACvFA,GAAQ,KACV,KAAK,KAAK,gBAAgB,KAAK,SAAS,EAExC,KAAK,KAAK,aAAa,KAAK,UAAWA,CAAI,EAGjD,CACF,EArBiBE,EAAA,CAAfC,GApCWC,EAoCI,+BAUDF,EAAA,CAAdC,GA9CWC,EA8CG",
4
+ "sourcesContent": ["import type { ReactiveController } from 'lit';\nimport type { Context, ContextCallback, UnknownContext } from '../context.js';\n\nimport { ReactiveElement } from 'lit';\nimport { ContextEvent, createContext } from '../context.js';\nimport { bound } from '../decorators/bound.js';\nimport { Logger } from './logger.js';\nimport { StyleController } from './style-controller.js';\n\nimport CONTEXT_BASE_STYLES from './color-context.scss';\n\n/**\n * A `ColorPalette` is a collection of specific color values\n * Choosing a palette sets both color properties and, if the component is a context provider,\n * implies a color theme for descendents.\n *\n * `ColorPalette` is associated with the `color-palette` attribute\n */\nexport type ColorPalette = (\n | 'base'\n | 'accent'\n | 'complement'\n | 'lighter'\n | 'lightest'\n | 'darker'\n | 'darkest'\n);\n\n/**\n * A Color theme is a context-specific restriction on the available color palettes\n *\n * `ColorTheme` is associated with the `on` attribute and the `--context` css property\n */\nexport type ColorTheme = (\n | 'dark'\n | 'light'\n | 'saturated'\n);\n\nexport interface ColorContextOptions {\n prefix?: string;\n attribute?: string;\n}\n\n/**\n* Maps from consumer host elements to already-fired request events\n* We hold these in memory in order to re-fire the events every time a new provider connects.\n* This is a hedge against cases where an early-upgrading provider claims an early-upgrading\n* consumer before a late-upgrading provider has a chance to register as the rightful provider\n* @example Monkey-in-the-middle error\n* In this example, we must re-fire the event from eager-consumer when late-provider\n* upgrades, so as to ensure that late-provider claims it for itself\n* ```html\n* <early-provider>\n* <late-provider>\n* <eager-consumer>\n* </late-provider>\n* </early-provider>\n* ```\n*/\nconst contextEvents = new Map<ReactiveElement, ContextEvent<UnknownContext>>();\n\n/**\n * Color context is derived from the `--context` css custom property,\n * which can be set by the `on` attribute, but *must* be set by the `color-palette` attribute\n * This property is set (in most cases) in `color-context.scss`,\n * which is added to components via `StyleController`.\n *\n * In this way, we avoid the need to execute javascript in order to convert from a given\n * `ColorPalette` to a given `ColorTheme`, since those relationships are specified in CSS.\n */\nabstract class ColorContextController implements ReactiveController {\n abstract update(next: ColorTheme | null): void;\n\n protected abstract attribute: string;\n\n /** The context object which describes the host's colour context */\n protected context: Context<ColorTheme|null>;\n\n /** The style controller which provides the necessary CSS. */\n protected styleController: StyleController;\n\n /** Prefix for colour context. Set this in Options to create a separate context */\n protected prefix = 'pfe-';\n\n /** The last-known color context on the host */\n protected last: ColorTheme|null = null;\n\n protected logger: Logger;\n\n hostUpdate?(): void\n\n constructor(protected host: ReactiveElement, options?: ColorContextOptions) {\n this.prefix = options?.prefix ?? 'pfe-';\n this.context = createContext(`${this.prefix}-color-context`);\n this.logger = new Logger(host);\n this.styleController = new StyleController(host, CONTEXT_BASE_STYLES);\n host.addController(this as ReactiveController);\n }\n}\n\n/**\n * `ColorContextProvider` is responsible to derive a context value from CSS and provide it to its\n * descendents.\n */\nexport class ColorContextProvider extends ColorContextController implements ReactiveController {\n protected attribute: string;\n\n /** Cache of context callbacks. Call each to update consumers */\n private callbacks = new Set<ContextCallback<ColorTheme|null>>();\n\n /** Mutation observer which updates consumers when `on` or `color-palette` attributes change. */\n private mo = new MutationObserver(() => this.update(this.contextVariable));\n\n /**\n * Cached (live) computed style declaration\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle\n */\n protected style: CSSStyleDeclaration;\n\n /** Return the current CSS `--context` value, or null */\n protected get contextVariable(): ColorTheme | null {\n return this.style.getPropertyValue('--context').trim() as ColorTheme || null;\n }\n\n constructor(host: ReactiveElement, options?: ColorContextOptions) {\n super(host, options);\n this.style = window.getComputedStyle(host);\n this.attribute = options?.attribute ?? 'color-palette';\n }\n\n /**\n * When a context provider connects, it listens for context-request events\n * it also fires all previously fired context-request events from their hosts,\n * in case this context provider upgraded after and is closer to a given consumer.\n */\n hostConnected() {\n this.host.addEventListener('context-request', this.onChildContextEvent);\n this.mo.observe(this.host, { attributes: true, attributeFilter: [this.attribute, 'on'] });\n this.update(this.contextVariable);\n for (const [host, fired] of contextEvents) {\n host.dispatchEvent(fired);\n }\n }\n\n /**\n * When a context provider disconnects, it disconnects its mutation observer\n */\n hostDisconnected() {\n this.callbacks.forEach(x => this.callbacks.delete(x));\n this.mo.disconnect();\n }\n\n /** Was the context event fired requesting our colour-context context? */\n private isColorContextEvent(\n event: ContextEvent<UnknownContext>\n ): event is ContextEvent<Context<ColorTheme|null>> {\n return (\n event.target !== this.host &&\n event.context.name === `${this.prefix}-color-context`\n );\n }\n\n /**\n * Provider part of context API\n * When a child connects, claim its context-request event\n * and add its callback to the Set of children if it requests multiple updates\n */\n @bound private onChildContextEvent(event: ContextEvent<UnknownContext>) {\n // only handle ContextEvents relevant to colour context\n if (this.isColorContextEvent(event)) {\n // claim the context-request event for ourselves (required by context protocol)\n event.stopPropagation();\n\n // Run the callback to initialize the child's colour-context\n event.callback(this.contextVariable);\n\n // Cache the callback for future updates, if requested\n if (event.multiple) {\n this.callbacks.add(event.callback);\n }\n }\n }\n\n /** Sets the `on` attribute on the host and any children that requested multiple updates */\n @bound public update(next: ColorTheme | null) {\n for (const cb of this.callbacks) {\n cb(next);\n }\n }\n}\n\n/**\n * A color context consumer receives sets it's `on` attribute based on the context provided\n * by the closes color context provider.\n * The consumer has no direct access to the context, it must receive it from the provider.\n */\nexport class ColorContextConsumer extends ColorContextController implements ReactiveController {\n protected attribute: string;\n\n private dispose?: () => void;\n\n private override: ColorTheme | null = null;\n\n constructor(host: ReactiveElement, options?: ColorContextOptions) {\n super(host, options);\n this.attribute ??= 'on';\n }\n\n /**\n * When a color context consumer connects,\n * it requests colour context from the closest context provider,\n * then updates it's host's `on` attribute\n */\n hostConnected() {\n const event = new ContextEvent(this.context, this.contextCallback, true);\n this.override = this.host.getAttribute(this.attribute) as ColorTheme;\n this.host.dispatchEvent(event);\n contextEvents.set(this.host, event);\n }\n\n /**\n * When a color context consumer disconnects,\n * it removes itself from the collection of components which request color context\n * then updates it's host's `on` attribute\n */\n hostDisconnected() {\n this.dispose?.();\n this.dispose = undefined;\n contextEvents.delete(this.host);\n }\n\n /** Register the dispose callback for hosts that requested multiple updates, then update the colour-context */\n @bound private contextCallback(value: ColorTheme|null, dispose?: () => void) {\n // protect against changing providers\n if (dispose && dispose !== this.dispose) {\n this.dispose?.();\n this.dispose = dispose;\n }\n this.update(value);\n }\n\n /** Sets the `on` attribute on the host and any children that requested multiple updates */\n @bound public update(next: ColorTheme|null) {\n if (!this.override && next !== this.last) {\n this.last = next;\n this.logger.log(`setting context from ${this.host.getAttribute(this.attribute)} to ${next}`);\n if (next == null) {\n this.host.removeAttribute(this.attribute);\n } else {\n this.host.setAttribute(this.attribute, next);\n }\n }\n }\n}\n\n", "import {css} from 'lit';\nexport const styles = css`:host(:is([on=dark])){--context:dark}:host(:is([on=light])){--context:light}:host(:is([on=saturated])){--context:saturated}:host(:is([color-palette=darker],[color-palette=darkest])){--context:dark;--pfe-broadcasted--text:var(--pfe-theme--color--text--on-dark, #fff);--pfe-broadcasted--text--muted:var(--pfe-theme--color--text--muted--on-dark, #d2d2d2);--pfe-broadcasted--link:var(--pfe-theme--color--link--on-dark, #73bcf7);--pfe-broadcasted--link--hover:var(--pfe-theme--color--link--hover--on-dark, #bee1f4);--pfe-broadcasted--link--focus:var(--pfe-theme--color--link--focus--on-dark, #bee1f4);--pfe-broadcasted--link--visited:var(--pfe-theme--color--link--visited--on-dark, #bee1f4);--pfe-broadcasted--link-decoration:var(--pfe-theme--link-decoration--on-dark, none);--pfe-broadcasted--link-decoration--hover:var(--pfe-theme--link-decoration--hover--on-dark, underline);--pfe-broadcasted--link-decoration--focus:var(--pfe-theme--link-decoration--focus--on-dark, underline);--pfe-broadcasted--link-decoration--visited:var(--pfe-theme--link-decoration--visited--on-dark, none)}:host(:is([color-palette=lighter],[color-palette=lightest],[color-palette=base])){--context:light;--pfe-broadcasted--text:var(--pfe-theme--color--text, #151515);--pfe-broadcasted--text--muted:var(--pfe-theme--color--text--muted, #6a6e73);--pfe-broadcasted--link:var(--pfe-theme--color--link, #06c);--pfe-broadcasted--link--hover:var(--pfe-theme--color--link--hover, #004080);--pfe-broadcasted--link--focus:var(--pfe-theme--color--link--focus, #004080);--pfe-broadcasted--link--visited:var(--pfe-theme--color--link--visited, #6753ac);--pfe-broadcasted--link-decoration:var(--pfe-theme--link-decoration, none);--pfe-broadcasted--link-decoration--hover:var(--pfe-theme--link-decoration--hover, underline);--pfe-broadcasted--link-decoration--focus:var(--pfe-theme--link-decoration--focus, underline);--pfe-broadcasted--link-decoration--visited:var(--pfe-theme--link-decoration--visited, none)}:host(:is([color-palette=accent],[color-palette=complement],[color-palette=saturated])){--context:saturated;--pfe-broadcasted--text:var(--pfe-theme--color--text--on-saturated, #fff);--pfe-broadcasted--text--muted:var(--pfe-theme--color--text--muted--on-saturated, #d2d2d2);--pfe-broadcasted--link:var(--pfe-theme--color--link--on-saturated, #fff);--pfe-broadcasted--link--hover:var(--pfe-theme--color--link--hover--on-saturated, #fafafa);--pfe-broadcasted--link--focus:var(--pfe-theme--color--link--focus--on-saturated, #fafafa);--pfe-broadcasted--link--visited:var(--pfe-theme--color--link--visited--on-saturated, #d2d2d2);--pfe-broadcasted--link-decoration:var(--pfe-theme--link-decoration--on-saturated, underline);--pfe-broadcasted--link-decoration--hover:var(--pfe-theme--link-decoration--hover--on-saturated, underline);--pfe-broadcasted--link-decoration--focus:var(--pfe-theme--link-decoration--focus--on-saturated, underline);--pfe-broadcasted--link-decoration--visited:var(--pfe-theme--link-decoration--visited--on-saturated, underline)}:host(:is([color-palette=lightest])){--pfe-context-background-color:var(--pfe-theme--color--surface--lightest, #fff)}:host(:is([color-palette=lighter])){--pfe-context-background-color:var(--pfe-theme--color--surface--lighter, #ededed)}:host(:is([color-palette=base])){--pfe-context-background-color:var(--pfe-theme--color--surface--base, #ededed)}:host(:is([color-palette=darker])){--pfe-context-background-color:var(--pfe-theme--color--surface--darker, #393f44)}:host(:is([color-palette=darkest])){--pfe-context-background-color:var(--pfe-theme--color--surface--darkest, #292e34)}:host(:is([color-palette=complement])){--pfe-context-background-color:var(--pfe-theme--color--surface--complement, #004368)}:host(:is([color-palette=accent])){--pfe-context-background-color:var(--pfe-theme--color--surface--accent, #00659c)}:host(:is([color-palette])){background-color:var(--pfe-context-background-color,var(--pfe-theme--color--surface--base))}`;\nexport default styles;\n"],
5
+ "mappings": "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",
6
6
  "names": ["ContextEvent", "createContext", "bound", "Logger", "StyleController", "css", "styles", "color_context_default", "contextEvents", "ColorContextController", "host", "options", "createContext", "Logger", "StyleController", "color_context_default", "ColorContextProvider", "fired", "x", "event", "next", "cb", "__decorateClass", "bound", "ColorContextConsumer", "ContextEvent", "value", "dispose"]
7
7
  }
@@ -11,6 +11,8 @@ export declare type Placement = Direction | `${Direction}-${Alignment}`;
11
11
  export declare class FloatingDOMController implements ReactiveController {
12
12
  #private;
13
13
  private host;
14
+ get initialized(): boolean;
15
+ set initialized(v: boolean);
14
16
  /**
15
17
  * When true, the floating DOM is visible
16
18
  */
@@ -1,2 +1,2 @@
1
- var a=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)};var r=(t,e,o)=>(a(t,e,"read from private field"),o?o.call(t):e.get(t)),s=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},l=(t,e,o,p)=>(a(t,e,"write to private field"),p?p.call(t,o):e.set(t,o),o);import{applyStyles as f,arrow as d,computeStyles as h,eventListeners as v,flip as u,hide as y,offset as b,popperGenerator as g,popperOffsets as E,preventOverflow as P}from"@popperjs/core";var R=g({defaultModifiers:[v,E,h,f,b,u,P,d,y]}),i,n,m=class{constructor(e){this.host=e;s(this,i,!1);s(this,n,void 0);e.addController(this)}get open(){return r(this,i)}set open(e){l(this,i,e),e&&r(this,n)?.update(),this.host.requestUpdate()}show(){this.open=!0}hide(){this.open=!1}create(e,o,p,c){l(this,n,R(e,o,{placement:p,modifiers:[{name:"offset",options:{offset:c}},{name:"flip",options:{fallbackPlacements:["top","right","left","bottom"]}}]}))}};i=new WeakMap,n=new WeakMap;export{m as FloatingDOMController};
1
+ var f=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)};var o=(t,e,i)=>(f(t,e,"read from private field"),i?i.call(t):e.get(t)),l=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},a=(t,e,i,p)=>(f(t,e,"write to private field"),p?p.call(t,i):e.set(t,i),i);import{applyStyles as c,arrow as h,computeStyles as u,eventListeners as v,flip as y,hide as b,offset as g,popperGenerator as z,popperOffsets as E,preventOverflow as P}from"@popperjs/core";var R=z({defaultModifiers:[v,E,u,c,g,y,P,h,b]}),n,r,s,m=class{constructor(e){this.host=e;l(this,n,!1);l(this,r,void 0);l(this,s,!1);e.addController(this)}get initialized(){return o(this,s)}set initialized(e){a(this,s,e),this.host.requestUpdate()}get open(){return o(this,n)}set open(e){a(this,n,e),e&&o(this,r)?.update(),this.host.requestUpdate()}show(){this.open=!0}hide(){this.open=!1}create(e,i,p,d){e&&i&&(o(this,r)??a(this,r,R(e,i,{placement:p,modifiers:[{name:"offset",options:{offset:d}},{name:"flip",options:{fallbackPlacements:["top","right","left","bottom"]}}]})),this.initialized||(this.initialized=!0))}};n=new WeakMap,r=new WeakMap,s=new WeakMap;export{m as FloatingDOMController};
2
2
  //# sourceMappingURL=floating-dom-controller.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["floating-dom-controller.ts"],
4
- "sourcesContent": ["import type { Instance } from '@popperjs/core';\nimport type { ReactiveController, ReactiveElement } from 'lit';\n\nimport {\n applyStyles,\n arrow,\n computeStyles,\n eventListeners,\n flip,\n hide,\n offset,\n popperGenerator,\n popperOffsets,\n preventOverflow,\n} from '@popperjs/core';\n\ntype Direction =\n | 'top'\n | 'bottom'\n | 'left'\n | 'right'\n\ntype Alignment =\n | 'start'\n | 'end'\n\n/**\n * Represents the placement of floating DOM\n */\nexport type Placement = Direction | `${Direction}-${Alignment}`;\n\nconst createPopper = popperGenerator({\n defaultModifiers: [\n eventListeners,\n popperOffsets,\n computeStyles,\n applyStyles,\n offset,\n flip,\n preventOverflow,\n arrow,\n hide\n ],\n});\n\n/**\n * Controls floating DOM within a web component, e.g. tooltips and popovers\n */\nexport class FloatingDOMController implements ReactiveController {\n #open = false;\n\n /**\n * When true, the floating DOM is visible\n */\n get open() {\n return this.#open;\n }\n\n set open(value: boolean) {\n this.#open = value;\n if (value) {\n this.#popper?.update();\n }\n this.host.requestUpdate();\n }\n\n #popper: Instance | undefined;\n\n constructor(private host: ReactiveElement) {\n host.addController(this);\n }\n\n hostConnected?(): void;\n\n /** Show the floating DOM */\n show(): void {\n this.open = true;\n }\n\n /** Hide the floating DOM */\n hide(): void {\n this.open = false;\n }\n\n /** Initialize the floating DOM */\n create(invoker: Element, content: HTMLElement, placement: Placement, offset?: number[]): void {\n this.#popper = createPopper(invoker, content, {\n placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset\n }\n },\n {\n name: 'flip',\n options: {\n fallbackPlacements: ['top', 'right', 'left', 'bottom'],\n },\n }\n ]\n });\n }\n}\n"],
5
- "mappings": "mVAGA,OACE,eAAAA,EACA,SAAAC,EACA,iBAAAC,EACA,kBAAAC,EACA,QAAAC,EACA,QAAAC,EACA,UAAAC,EACA,mBAAAC,EACA,iBAAAC,EACA,mBAAAC,MACK,iBAiBP,IAAMC,EAAeC,EAAgB,CACnC,iBAAkB,CAChBC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,CACF,CACF,CAAC,EA3CDC,EAAAC,EAgDaC,EAAN,KAA0D,CAoB/D,YAAoBC,EAAuB,CAAvB,UAAAA,EAnBpBC,EAAA,KAAAJ,EAAQ,IAiBRI,EAAA,KAAAH,EAAA,QAGEE,EAAK,cAAc,IAAI,CACzB,CAhBA,IAAI,MAAO,CACT,OAAOE,EAAA,KAAKL,EACd,CAEA,IAAI,KAAKM,EAAgB,CACvBC,EAAA,KAAKP,EAAQM,GACTA,GACFD,EAAA,KAAKJ,IAAS,OAAO,EAEvB,KAAK,KAAK,cAAc,CAC1B,CAWA,MAAa,CACX,KAAK,KAAO,EACd,CAGA,MAAa,CACX,KAAK,KAAO,EACd,CAGA,OAAOO,EAAkBC,EAAsBC,EAAsBf,EAAyB,CAC5FY,EAAA,KAAKN,EAAUZ,EAAamB,EAASC,EAAS,CAC5C,UAAAC,EACA,UAAW,CACT,CACE,KAAM,SACN,QAAS,CACP,OAAAf,CACF,CACF,EACA,CACE,KAAM,OACN,QAAS,CACP,mBAAoB,CAAC,MAAO,QAAS,OAAQ,QAAQ,CACvD,CACF,CACF,CACF,CAAC,EACH,CACF,EAvDEK,EAAA,YAiBAC,EAAA",
6
- "names": ["applyStyles", "arrow", "computeStyles", "eventListeners", "flip", "hide", "offset", "popperGenerator", "popperOffsets", "preventOverflow", "createPopper", "popperGenerator", "eventListeners", "popperOffsets", "computeStyles", "applyStyles", "offset", "flip", "preventOverflow", "arrow", "hide", "_open", "_popper", "FloatingDOMController", "host", "__privateAdd", "__privateGet", "value", "__privateSet", "invoker", "content", "placement"]
4
+ "sourcesContent": ["import type { Instance } from '@popperjs/core';\nimport type { ReactiveController, ReactiveElement } from 'lit';\n\nimport {\n applyStyles,\n arrow,\n computeStyles,\n eventListeners,\n flip,\n hide,\n offset,\n popperGenerator,\n popperOffsets,\n preventOverflow,\n} from '@popperjs/core';\n\ntype Direction =\n | 'top'\n | 'bottom'\n | 'left'\n | 'right'\n\ntype Alignment =\n | 'start'\n | 'end'\n\n/**\n * Represents the placement of floating DOM\n */\nexport type Placement = Direction | `${Direction}-${Alignment}`;\n\nconst createPopper = popperGenerator({\n defaultModifiers: [\n eventListeners,\n popperOffsets,\n computeStyles,\n applyStyles,\n offset,\n flip,\n preventOverflow,\n arrow,\n hide\n ],\n});\n\n/**\n * Controls floating DOM within a web component, e.g. tooltips and popovers\n */\nexport class FloatingDOMController implements ReactiveController {\n #open = false;\n\n #popper: Instance | undefined;\n\n #initialized = false;\n\n get initialized() {\n return this.#initialized;\n }\n\n set initialized(v: boolean) {\n this.#initialized = v; this.host.requestUpdate();\n }\n\n /**\n * When true, the floating DOM is visible\n */\n get open() {\n return this.#open;\n }\n\n set open(value: boolean) {\n this.#open = value;\n if (value) {\n this.#popper?.update();\n }\n this.host.requestUpdate();\n }\n\n constructor(private host: ReactiveElement) {\n host.addController(this);\n }\n\n hostConnected?(): void;\n\n /** Show the floating DOM */\n show(): void {\n this.open = true;\n }\n\n /** Hide the floating DOM */\n hide(): void {\n this.open = false;\n }\n\n /** Initialize the floating DOM */\n create(invoker: Element, content: HTMLElement, placement: Placement, offset?: number[]): void {\n if (invoker && content) {\n this.#popper ??= createPopper(invoker, content, {\n placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset\n }\n },\n {\n name: 'flip',\n options: {\n fallbackPlacements: ['top', 'right', 'left', 'bottom'],\n },\n }\n ]\n });\n this.initialized ||= true;\n }\n }\n}\n"],
5
+ "mappings": "mVAGA,OACE,eAAAA,EACA,SAAAC,EACA,iBAAAC,EACA,kBAAAC,EACA,QAAAC,EACA,QAAAC,EACA,UAAAC,EACA,mBAAAC,EACA,iBAAAC,EACA,mBAAAC,MACK,iBAiBP,IAAMC,EAAeC,EAAgB,CACnC,iBAAkB,CAChBC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,CACF,CACF,CAAC,EA3CDC,EAAAC,EAAAC,EAgDaC,EAAN,KAA0D,CA8B/D,YAAoBC,EAAuB,CAAvB,UAAAA,EA7BpBC,EAAA,KAAAL,EAAQ,IAERK,EAAA,KAAAJ,EAAA,QAEAI,EAAA,KAAAH,EAAe,IA0BbE,EAAK,cAAc,IAAI,CACzB,CAzBA,IAAI,aAAc,CAChB,OAAOE,EAAA,KAAKJ,EACd,CAEA,IAAI,YAAYK,EAAY,CAC1BC,EAAA,KAAKN,EAAeK,GAAG,KAAK,KAAK,cAAc,CACjD,CAKA,IAAI,MAAO,CACT,OAAOD,EAAA,KAAKN,EACd,CAEA,IAAI,KAAKS,EAAgB,CACvBD,EAAA,KAAKR,EAAQS,GACTA,GACFH,EAAA,KAAKL,IAAS,OAAO,EAEvB,KAAK,KAAK,cAAc,CAC1B,CASA,MAAa,CACX,KAAK,KAAO,EACd,CAGA,MAAa,CACX,KAAK,KAAO,EACd,CAGA,OAAOS,EAAkBC,EAAsBC,EAAsBjB,EAAyB,CACxFe,GAAWC,IACbL,EAAA,KAAKL,IAALO,EAAA,KAAKP,EAAYZ,EAAaqB,EAASC,EAAS,CAC9C,UAAAC,EACA,UAAW,CACT,CACE,KAAM,SACN,QAAS,CACP,OAAAjB,CACF,CACF,EACA,CACE,KAAM,OACN,QAAS,CACP,mBAAoB,CAAC,MAAO,QAAS,OAAQ,QAAQ,CACvD,CACF,CACF,CACF,CAAC,GACD,KAAK,cAAL,KAAK,YAAgB,IAEzB,CACF,EApEEK,EAAA,YAEAC,EAAA,YAEAC,EAAA",
6
+ "names": ["applyStyles", "arrow", "computeStyles", "eventListeners", "flip", "hide", "offset", "popperGenerator", "popperOffsets", "preventOverflow", "createPopper", "popperGenerator", "eventListeners", "popperOffsets", "computeStyles", "applyStyles", "offset", "flip", "preventOverflow", "arrow", "hide", "_open", "_popper", "_initialized", "FloatingDOMController", "host", "__privateAdd", "__privateGet", "v", "__privateSet", "value", "invoker", "content", "placement"]
7
7
  }
@@ -1,4 +1,4 @@
1
1
  import type { ReactiveElement } from 'lit';
2
- import { ColorContextOptions } from '../controllers/color-context.js';
2
+ import type { ColorContextOptions } from '../controllers/color-context.js';
3
3
  export declare function colorContextProvider<T extends ReactiveElement>(options?: ColorContextOptions): (proto: T, _key: string) => void;
4
4
  export declare function colorContextConsumer<T extends ReactiveElement>(options?: ColorContextOptions): (proto: T, _key: string) => void;
@@ -1,2 +1,2 @@
1
- import{ColorContextConsumer as r,ColorContextProvider as i}from"../controllers/color-context.js";function c(o){return function(e,n){e.constructor.addInitializer(t=>{t.__colorContextProvider=new i(t,o)})}}function x(o){return function(e,n){e.constructor.addInitializer(t=>{t.__colorContextConsumer=new r(t,o)})}}export{x as colorContextConsumer,c as colorContextProvider};
1
+ import{ColorContextConsumer as n,ColorContextProvider as i}from"../controllers/color-context.js";function c(t){return function(e,r){e.constructor.addInitializer(o=>{o.__colorContextProvider=new i(o,t)})}}function C(t){return function(e,r){e.constructor.addInitializer(o=>{o.__colorContextConsumer=new n(o,t)})}}export{C as colorContextConsumer,c as colorContextProvider};
2
2
  //# sourceMappingURL=color-context.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["color-context.ts"],
4
- "sourcesContent": ["import type { ReactiveElement } from 'lit';\nimport {\n ColorContextOptions,\n ColorContextConsumer,\n ColorContextProvider,\n} from '../controllers/color-context.js';\n\nexport function colorContextProvider<T extends ReactiveElement>(options?: ColorContextOptions) {\n return function(proto: T, _key: string) {\n (proto.constructor as typeof ReactiveElement).addInitializer(instance => {\n // @ts-expect-error: this is strictly for debugging purposes\n instance.__colorContextProvider =\n new ColorContextProvider(instance, options);\n });\n };\n}\n\nexport function colorContextConsumer<T extends ReactiveElement>(options?: ColorContextOptions) {\n return function(proto: T, _key: string) {\n (proto.constructor as typeof ReactiveElement).addInitializer(instance => {\n // @ts-expect-error: this is strictly for debugging purposes\n instance.__colorContextConsumer =\n new ColorContextConsumer(instance, options);\n });\n };\n}\n"],
5
- "mappings": "AACA,OAEE,wBAAAA,EACA,wBAAAC,MACK,kCAEA,SAASC,EAAgDC,EAA+B,CAC7F,OAAO,SAASC,EAAUC,EAAc,CACrCD,EAAM,YAAuC,eAAeE,GAAY,CAEvEA,EAAS,uBACP,IAAIL,EAAqBK,EAAUH,CAAO,CAC9C,CAAC,CACH,CACF,CAEO,SAASI,EAAgDJ,EAA+B,CAC7F,OAAO,SAASC,EAAUC,EAAc,CACrCD,EAAM,YAAuC,eAAeE,GAAY,CAEvEA,EAAS,uBACP,IAAIN,EAAqBM,EAAUH,CAAO,CAC9C,CAAC,CACH,CACF",
4
+ "sourcesContent": ["import type { ReactiveElement } from 'lit';\nimport type { ColorContextOptions } from '../controllers/color-context.js';\n\nimport { ColorContextConsumer, ColorContextProvider } from '../controllers/color-context.js';\n\nexport function colorContextProvider<T extends ReactiveElement>(options?: ColorContextOptions) {\n return function(proto: T, _key: string) {\n (proto.constructor as typeof ReactiveElement).addInitializer(instance => {\n // @ts-expect-error: this is strictly for debugging purposes\n instance.__colorContextProvider =\n new ColorContextProvider(instance, options);\n });\n };\n}\n\nexport function colorContextConsumer<T extends ReactiveElement>(options?: ColorContextOptions) {\n return function(proto: T, _key: string) {\n (proto.constructor as typeof ReactiveElement).addInitializer(instance => {\n // @ts-expect-error: this is strictly for debugging purposes\n instance.__colorContextConsumer =\n new ColorContextConsumer(instance, options);\n });\n };\n}\n"],
5
+ "mappings": "AAGA,OAAS,wBAAAA,EAAsB,wBAAAC,MAA4B,kCAEpD,SAASC,EAAgDC,EAA+B,CAC7F,OAAO,SAASC,EAAUC,EAAc,CACrCD,EAAM,YAAuC,eAAeE,GAAY,CAEvEA,EAAS,uBACP,IAAIL,EAAqBK,EAAUH,CAAO,CAC9C,CAAC,CACH,CACF,CAEO,SAASI,EAAgDJ,EAA+B,CAC7F,OAAO,SAASC,EAAUC,EAAc,CACrCD,EAAM,YAAuC,eAAeE,GAAY,CAEvEA,EAAS,uBACP,IAAIN,EAAqBM,EAAUH,CAAO,CAC9C,CAAC,CACH,CACF",
6
6
  "names": ["ColorContextConsumer", "ColorContextProvider", "colorContextProvider", "options", "proto", "_key", "instance", "colorContextConsumer"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/pfe-core",
3
- "version": "2.0.0-next.8",
3
+ "version": "2.0.0-next.9",
4
4
  "license": "MIT",
5
5
  "description": "PatternFly Elements Core Library",
6
6
  "customElements": "custom-elements.json",