From b7cb07e98e17754c83d3e0112aac9728139e043b Mon Sep 17 00:00:00 2001 From: Jeremy Mitchell Date: Wed, 8 May 2024 10:32:04 -0700 Subject: [PATCH] fix(base): move lit imports to base (#4416) --- packages/checkbox/src/CheckboxMixin.ts | 7 +++++-- packages/overlay/src/InteractionController.ts | 2 +- packages/overlay/src/slottable-request-directive.ts | 2 +- tools/base/package.json | 4 ++++ tools/base/src/async-directive.ts | 13 +++++++++++++ 5 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 tools/base/src/async-directive.ts diff --git a/packages/checkbox/src/CheckboxMixin.ts b/packages/checkbox/src/CheckboxMixin.ts index 520ef8ec1f..0dc5830e7f 100644 --- a/packages/checkbox/src/CheckboxMixin.ts +++ b/packages/checkbox/src/CheckboxMixin.ts @@ -10,8 +10,11 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ -import { ReactiveElement } from 'lit'; -import { html, TemplateResult } from '@spectrum-web-components/base'; +import { + html, + ReactiveElement, + TemplateResult, +} from '@spectrum-web-components/base'; import { property, query, diff --git a/packages/overlay/src/InteractionController.ts b/packages/overlay/src/InteractionController.ts index d50c1e9dc7..de23a9063c 100644 --- a/packages/overlay/src/InteractionController.ts +++ b/packages/overlay/src/InteractionController.ts @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ -import type { ReactiveController } from 'lit'; +import type { ReactiveController } from '@spectrum-web-components/base'; import { AbstractOverlay } from './AbstractOverlay.js'; export enum InteractionTypes { diff --git a/packages/overlay/src/slottable-request-directive.ts b/packages/overlay/src/slottable-request-directive.ts index 4c7ff4d59f..88d6b82087 100644 --- a/packages/overlay/src/slottable-request-directive.ts +++ b/packages/overlay/src/slottable-request-directive.ts @@ -15,7 +15,7 @@ import { render, TemplateResult, } from '@spectrum-web-components/base'; -import { AsyncDirective, directive } from 'lit/async-directive.js'; +import { AsyncDirective, directive } from '@spectrum-web-components/base/src/async-directive.js'; import { removeSlottableRequest, SlottableRequestEvent, diff --git a/tools/base/package.json b/tools/base/package.json index bc1fe9abe7..2a4f6f3c9c 100644 --- a/tools/base/package.json +++ b/tools/base/package.json @@ -29,6 +29,10 @@ "development": "./src/Base.dev.js", "default": "./src/Base.js" }, + "./src/async-directive.js": { + "development": "./src/async-directive.dev.js", + "default": "./src/async-directive.js" + }, "./src/condition-attribute-with-id.js": { "development": "./src/condition-attribute-with-id.dev.js", "default": "./src/condition-attribute-with-id.js" diff --git a/tools/base/src/async-directive.ts b/tools/base/src/async-directive.ts new file mode 100644 index 0000000000..7862c68b8a --- /dev/null +++ b/tools/base/src/async-directive.ts @@ -0,0 +1,13 @@ +/* +Copyright 2020 Adobe. All rights reserved. +This file is licensed to you under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may obtain a copy +of the License at http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +OF ANY KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. +*/ + +export * from 'lit/async-directive.js';