diff --git a/packages/calcite-components/src/components/button/button.tsx b/packages/calcite-components/src/components/button/button.tsx index e6ab5713a08..fc33ee57f18 100644 --- a/packages/calcite-components/src/components/button/button.tsx +++ b/packages/calcite-components/src/components/button/button.tsx @@ -279,7 +279,13 @@ export class Button }} disabled={childElType === "button" ? this.disabled || this.loading : null} download={ - childElType === "a" && (this.download === "" || this.download) ? this.download : null + childElType === "a" + ? this.download === true + ? "" + : this.download + ? this.download + : null + : null } href={childElType === "a" && this.href} name={childElType === "button" && this.name} diff --git a/packages/calcite-components/src/components/dialog/dialog.tsx b/packages/calcite-components/src/components/dialog/dialog.tsx index 34d18356aea..18ba382a928 100644 --- a/packages/calcite-components/src/components/dialog/dialog.tsx +++ b/packages/calcite-components/src/components/dialog/dialog.tsx @@ -43,7 +43,7 @@ import { import { componentOnReady } from "../../utils/component"; import { SLOTS as PANEL_SLOTS } from "../panel/resources"; import { HeadingLevel } from "../functional/Heading"; -import { OverlayPositioning } from "../../components"; +import type { OverlayPositioning } from "../../utils/floating-ui"; import { DialogMessages } from "./assets/dialog/t9n"; import { CSS, diff --git a/packages/calcite-components/src/components/functional/FloatingArrow.tsx b/packages/calcite-components/src/components/functional/FloatingArrow.tsx index b2e4ca9d060..a434e75f8ae 100644 --- a/packages/calcite-components/src/components/functional/FloatingArrow.tsx +++ b/packages/calcite-components/src/components/functional/FloatingArrow.tsx @@ -2,7 +2,7 @@ import { FunctionalComponent, h, VNode } from "@stencil/core"; import { JSXAttributes } from "@stencil/core/internal"; import { FloatingLayout } from "../../utils/floating-ui"; -interface FloatingArrowProps extends JSXAttributes { +interface FloatingArrowProps extends JSXAttributes { floatingLayout: FloatingLayout; } diff --git a/packages/calcite-components/src/components/handle/handle.e2e.ts b/packages/calcite-components/src/components/handle/handle.e2e.ts index 57f51c68f73..01a85c0b305 100644 --- a/packages/calcite-components/src/components/handle/handle.e2e.ts +++ b/packages/calcite-components/src/components/handle/handle.e2e.ts @@ -1,7 +1,7 @@ import { newE2EPage } from "@stencil/core/testing"; import { accessible, disabled, hidden, renders, t9n } from "../../tests/commonTests"; -import { HandleMessages } from "../../components"; import { CSS, SUBSTITUTIONS } from "./resources"; +import type { HandleMessages } from "./assets/handle/t9n"; describe("calcite-handle", () => { describe("renders", () => { diff --git a/packages/calcite-components/src/components/link/link.tsx b/packages/calcite-components/src/components/link/link.tsx index 373dc37a803..f0826fa5d0b 100644 --- a/packages/calcite-components/src/components/link/link.tsx +++ b/packages/calcite-components/src/components/link/link.tsx @@ -113,7 +113,7 @@ export class Link implements InteractiveComponent, LoadableComponent { When the 'download' property of type 'boolean | string' is set to true, the value is "". This works around that issue for now. */ - download={Tag === "a" && (download === "" || download) ? download : null} + download={Tag === "a" ? (download === true ? "" : download ? download : null) : null} href={Tag === "a" && this.href} onClick={this.childElClickHandler} ref={this.storeTagRef} @@ -174,7 +174,7 @@ export class Link implements InteractiveComponent, LoadableComponent { /** the rendered child element */ private childEl: HTMLAnchorElement | HTMLSpanElement; - private childElClickHandler = (event: PointerEvent): void => { + private childElClickHandler = (event: MouseEvent): void => { if (!event.isTrusted) { // click was invoked internally, we stop it here event.stopPropagation(); diff --git a/packages/calcite-components/src/components/list-item/list-item.tsx b/packages/calcite-components/src/components/list-item/list-item.tsx index 8b0c1882166..426aca661a3 100644 --- a/packages/calcite-components/src/components/list-item/list-item.tsx +++ b/packages/calcite-components/src/components/list-item/list-item.tsx @@ -814,7 +814,7 @@ export class ListItem this.calciteListItemToggle.emit(); }; - private handleItemClick = (event: PointerEvent): void => { + private handleItemClick = (event: MouseEvent): void => { if (event.defaultPrevented) { return; } diff --git a/packages/calcite-components/src/components/panel/panel.tsx b/packages/calcite-components/src/components/panel/panel.tsx index c29cbaffe5a..b5109c5b882 100644 --- a/packages/calcite-components/src/components/panel/panel.tsx +++ b/packages/calcite-components/src/components/panel/panel.tsx @@ -700,7 +700,7 @@ export class Panel }; render(): VNode { - const { disabled, loading, panelKeyDownHandler, isClosed } = this; + const { disabled, loading, isClosed } = this; const panelNode = (
+ {loading ? : null} {panelNode} diff --git a/packages/calcite-components/src/components/popover/popover.tsx b/packages/calcite-components/src/components/popover/popover.tsx index 410f707a68c..e4d9b2326ce 100644 --- a/packages/calcite-components/src/components/popover/popover.tsx +++ b/packages/calcite-components/src/components/popover/popover.tsx @@ -268,7 +268,7 @@ export class Popover @State() defaultMessages: PopoverMessages; - arrowEl: SVGElement; + arrowEl: SVGSVGElement; closeButtonEl: HTMLCalciteActionElement; @@ -515,7 +515,7 @@ export class Popover deactivateFocusTrap(this); } - storeArrowEl = (el: SVGElement): void => { + storeArrowEl = (el: SVGSVGElement): void => { this.arrowEl = el; this.reposition(true); }; diff --git a/packages/calcite-components/src/components/rating/rating.tsx b/packages/calcite-components/src/components/rating/rating.tsx index 9175639a659..0cbdc3079ce 100644 --- a/packages/calcite-components/src/components/rating/rating.tsx +++ b/packages/calcite-components/src/components/rating/rating.tsx @@ -356,7 +356,7 @@ export class Rating } }; - private handleInputChange = (event: InputEvent) => { + private handleInputChange = (event: Event) => { if (this.isKeyboardInteraction === true) { const inputVal = Number(event.target["value"]); this.hoverValue = inputVal; diff --git a/packages/calcite-components/src/components/tooltip/tooltip.tsx b/packages/calcite-components/src/components/tooltip/tooltip.tsx index eca3b802071..e7682bf3d73 100644 --- a/packages/calcite-components/src/components/tooltip/tooltip.tsx +++ b/packages/calcite-components/src/components/tooltip/tooltip.tsx @@ -142,7 +142,7 @@ export class Tooltip implements FloatingUIComponent, OpenCloseComponent { @State() floatingLayout: FloatingLayout = "vertical"; - arrowEl: SVGElement; + arrowEl: SVGSVGElement; guid = `calcite-tooltip-${guid()}`; @@ -344,7 +344,7 @@ export class Tooltip implements FloatingUIComponent, OpenCloseComponent { > (this.arrowEl = arrowEl)} + ref={(arrowEl) => (this.arrowEl = arrowEl)} />
diff --git a/packages/calcite-components/src/demos/_assets/head.ts b/packages/calcite-components/src/demos/_assets/head.ts index b82226531b6..3322a2aafb2 100644 --- a/packages/calcite-components/src/demos/_assets/head.ts +++ b/packages/calcite-components/src/demos/_assets/head.ts @@ -31,8 +31,7 @@ }; const loadHeader = async (): Promise => { - const root = window.location.pathname.split(DEMO_ROOT).shift(); - const response = await window.fetch(`${root}${ASSETS_PATH}/demo-template.html`); + const response = await window.fetch(`${ROOT}${ASSETS_PATH}/demo-template.html`); const text = await response.text(); const template = parseTemplate(text); if (template) { @@ -45,7 +44,7 @@ document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", loadHeader) : loadHeader(); } - const ROOT = window.location.pathname.split(DEMO_ROOT).shift(); + const ROOT = window.location.pathname.split(DEMO_ROOT)[0]; function loadCss(url: string): void { const link = document.createElement("link"); diff --git a/packages/calcite-components/src/demos/input-time-picker.html b/packages/calcite-components/src/demos/input-time-picker.html index 50918a41ffa..599dec949e3 100644 --- a/packages/calcite-components/src/demos/input-time-picker.html +++ b/packages/calcite-components/src/demos/input-time-picker.html @@ -5,8 +5,6 @@ Input Time Picker - -