diff --git a/.eslintrc.json b/.eslintrc.json index 7c7f1a15..a9a38e1e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -23,5 +23,5 @@ "sort-exports/sort-exports": ["error", { "sortDir": "asc" }] // "jsx-quotes": [2, "prefer-single"], }, - "ignorePatterns": ["**/*.js", "mocks", "**/*.mjs", "cypress", "cypress.config.ts"] + "ignorePatterns": ["**/*.js", "mocks", "**/*.mjs", "cypress", "cypress.config.ts", "**/*/icon-registry.ts"] } diff --git a/cypress/apps/angular-app/tsconfig.json b/cypress/apps/angular-app/tsconfig.json index d9ae4ec1..594abb91 100644 --- a/cypress/apps/angular-app/tsconfig.json +++ b/cypress/apps/angular-app/tsconfig.json @@ -16,7 +16,7 @@ "moduleResolution": "node", "importHelpers": true, "target": "ES2022", - "module": "ES2022", + "module": "ESNext", "useDefineForClassFields": false, "lib": ["ES2022", "dom"] }, diff --git a/index.html b/index.html index c3139be3..ca61214a 100644 --- a/index.html +++ b/index.html @@ -234,6 +234,9 @@

Icon

+ + +
@@ -1006,7 +1009,6 @@

Form Validation

- she diff --git a/rollup.config.mjs b/rollup.config.mjs index 6cf06f80..230071b3 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -81,7 +81,8 @@ const buildUMDComponentBundles = () => { name: `${meta.name}Bundle`, file: `lib/${meta.outputPath}.umd.js`, format: "umd", - sourcemap: true + sourcemap: true, + inlineDynamicImports: true }, plugins: wcPlugins })); @@ -112,7 +113,8 @@ const buildSgdsPackage = () => { entryFileNames: "[name].umd.js", dir: "lib", format: "umd", - sourcemap: true + sourcemap: true, + inlineDynamicImports: true }, plugins: wcPlugins }, diff --git a/src/components/Dropdown/sgds-dropdown-item.ts b/src/components/Dropdown/sgds-dropdown-item.ts index a7a389e3..d5e45c5f 100644 --- a/src/components/Dropdown/sgds-dropdown-item.ts +++ b/src/components/Dropdown/sgds-dropdown-item.ts @@ -17,13 +17,13 @@ export class SgdsDropdownItem extends SgdsElement { @queryAssignedElements({ flatten: true }) anchor: HTMLAnchorElement[]; - /** when true, sets the active stylings of .nav-link */ - @property({ type: Boolean }) - active = false; - - /** Disables the SgdsMainnavItem */ - @property({ type: Boolean, reflect: true }) - disabled = false; + /** when true, sets the active stylings of .nav-link */ + @property({ type: Boolean }) + active = false; + + /** Disables the SgdsMainnavItem */ + @property({ type: Boolean, reflect: true }) + disabled = false; connectedCallback(): void { super.connectedCallback(); @@ -33,6 +33,7 @@ export class SgdsDropdownItem extends SgdsElement { } }); this.setAttribute("role", "menuitem"); + this.setAttribute("aria-disabled", `${this.disabled}`); } render() { diff --git a/src/components/FileUpload/sgds-file-upload.ts b/src/components/FileUpload/sgds-file-upload.ts index 73fd4ef8..5a928118 100644 --- a/src/components/FileUpload/sgds-file-upload.ts +++ b/src/components/FileUpload/sgds-file-upload.ts @@ -170,7 +170,7 @@ export class SgdsFileUpload extends SgdsFormValidatorMixin(FormControlElement) { } render() { const getCheckedIcon = () => { - return html``; + return html``; }; const listItems = this.selectedFiles.map( diff --git a/src/components/Icon/icon-registry.ts b/src/components/Icon/icon-registry.ts new file mode 100644 index 00000000..4b869d32 --- /dev/null +++ b/src/components/Icon/icon-registry.ts @@ -0,0 +1,586 @@ +export const ArrowBarDown = ` + + +`; +export const ArrowBarLeft = ` + + +`; +export const ArrowBarRight = ` + + +`; +export const ArrowBarUp = ` + + +`; +export const ArrowClockwise = ` + + +`; +export const ArrowDown = ` + + +`; +export const ArrowLeft = ` + + +`; +export const ArrowRepeat = ` + + +`; +export const ArrowRight = ` + + +`; +export const ArrowUp = ` + + +`; +export const BankFill = ` + + +`; +export const BellSlash = ` + + +`; +export const Bell = ` + + +`; +export const BiFunnel = ` + + +`; +export const BookmarkFill = ` + + +`; +export const Bookmark = ` + + +`; +export const BoxArrowUpRight = ` + + +`; +export const BoxSeam = ` + + +`; +export const Building = ` + + +`; +export const Calculator = ` + + +`; +export const CalendarCheck = ` + + + +`; +export const CalendarX = ` + + + +`; +export const Calendar = ` + + +`; +export const Camera = ` + + +`; +export const ChatLeftText = ` + + +`; +export const CheckCircleFill = ` + + +`; +export const CheckCircle = ` + + +`; +export const Check = ` + + +`; +export const ChevronDown = ` + + +`; +export const ChevronLeft = ` + + +`; +export const ChevronRight = ` + + +`; +export const ChevronUp = ` + + +`; +export const Clock = ` + + + +`; +export const CloudCheck = ` + + + +`; +export const CloudDownload = ` + + +`; +export const CloudUpload = ` + + +`; +export const Cloud = ` + + +`; +export const Compass = ` + + + +`; +export const Cross = ` + + +`; +export const CursorFill = ` + + +`; +export const Cursor = ` + + +`; +export const DashCircle = ` + + +`; +export const DashSquare = ` + + +`; +export const Dash = ` + + +`; +export const Download = ` + + +`; +export const ExclamationCircleFill = ` + + +`; +export const ExclamationCircle = ` + + + +`; +export const ExclamationTriangleFill = ` + + +`; +export const ExclamationTriangle = ` + + + +`; +export const Exclamation = ` + + + +`; +export const EyeFill = ` + + +`; +export const EyeSlashFill = ` + + + +`; +export const EyeSlash = ` + + +`; +export const Eye = ` + + +`; +export const Facebook = ` + + +`; +export const FileEarmarkText = ` + + +`; +export const FilePdf = ` + + + +`; +export const FilePlus = ` + + + +`; +export const FileText = ` + + +`; +export const File = ` + + +`; +export const Files = ` + + + +`; +export const FolderCheck = ` + + + +`; +export const FolderMinus = ` + + + +`; +export const FolderPlus = ` + + + +`; +export const Folder = ` + + +`; +export const Gear = ` + + +`; +export const GeoAlt = ` + + + +`; +export const GeoFill = ` + + + +`; +export const Geo = ` + + + +`; +export const Google = ` + + +`; +export const GridFill = ` + + +`; +export const HandThumbsDown = ` + + +`; +export const HandThumbsUp = ` + + +`; +export const Hdd = ` + + +`; +export const HouseDoor = ` + + +`; +export const house = ` + + +`; +export const Image = ` + + +`; +export const InBox = ` + + +`; +export const InfoCircleFill = ` + + +`; +export const InfoCircle = ` + + + +`; +export const Instagram = ` + + +`; +export const Layers = ` + + +`; +export const LayoutTextWindowReverse = ` + + +`; +export const LayoutTextWindow = ` + + +`; +export const Layout = ` + + +`; +export const Link = ` + + +`; +export const Linkedin = ` + + +`; +export const List = ` + + +`; +export const LockFill = ` + + +`; +export const Lock = ` + + +`; +export const Mail = ` + + +`; +export const Map = ` + + +`; +export const Paperclip = ` + + +`; +export const Pencil = ` + + +`; +export const PendingCircle = ` + + +`; +export const PersonDash = ` + + +`; +export const PersonPlus = ` + + +`; +export const PersonX = ` + + +`; +export const Person = ` + + +`; +export const PinMapFill = ` + + +`; +export const Pin = ` + + +`; +export const Placeholder = ` + + +`; +export const PlusCircle = ` + + +`; +export const PlusSquare = ` + + +`; +export const Plus = ` + + +`; +export const Printer = ` + + +`; +export const QuestionCircle = ` + + + +`; +export const Save = ` + + +`; +export const Search = ` + + +`; +export const Share = ` + + +`; +export const SlashCircle = ` + + +`; +export const Sliders = ` + + +`; +export const Speedometer = ` + + +`; +export const StarFill = ` + + +`; +export const Star = ` + + +`; +export const Stoplights = ` + + + +`; +export const Telephone = ` + + +`; +export const ThreeDotsVertical = ` + + +`; +export const ThreeDots = ` + + +`; +export const ToggleOff = ` + + +`; +export const ToggleOn = ` + + +`; +export const Trash = ` + + +`; +export const TwitterX = ` + + +`; +export const Unlock = ` + + +`; +export const Upload = ` + + +`; +export const WindowDash = ` + + + +`; +export const WindowDesktop = ` + + + +`; +export const WindowDock = ` + + + +`; +export const WindowFullscreen = ` + + +`; +export const WindowPlus = ` + + + +`; +export const WindowSidebar = ` + + +`; +export const WindowSplit = ` + + +`; +export const WindowStack = ` + + +`; +export const WindowX = ` + + + +`; +export const Window = ` + + +`; +export const XCircleFill = ` + + +`; +export const XCircle = ` + + +`; +export const Youtube = ` + + +`; +export const ZoomIn = ` + + +`; +export const ZoomOut = ` + + +`; diff --git a/src/components/Icon/sgds-icon.ts b/src/components/Icon/sgds-icon.ts index 4f398853..3f45a955 100644 --- a/src/components/Icon/sgds-icon.ts +++ b/src/components/Icon/sgds-icon.ts @@ -25,7 +25,7 @@ export class SgdsIcon extends SgdsElement { async firstUpdated() { if (this.name) { - this.loadSvg(this.name); + await this.loadSvg(this.name); } } @@ -33,18 +33,20 @@ export class SgdsIcon extends SgdsElement { this.style.display = this._svgContent ? "flex" : "none"; } - async loadSvg(name: string) { + async loadSvg(name: string): Promise { if (name) { // Dynamically import the SVG if not cached + const pascalName = name + .split("-") + .map(name => String(name).charAt(0).toUpperCase() + String(name).slice(1)) + .join(""); try { - const iconPath = new URL(`../../icons/${name}.svg`, import.meta.url).href; - const response = await fetch(iconPath); - - if (response.ok) { - const svgContent = await response.text(); - // Render the SVG - // this.renderSvg(svgContent); - this._svgContent = svgContent; + const iconRegistry = await import("./icon-registry"); + const svg = iconRegistry[pascalName]; + if (svg) { + this._svgContent = svg; + } else { + throw new Error("icon `name` is undefined"); } } catch (error) { console.error(`Error loading SVG: ${name}`, error); diff --git a/src/components/QuantityToggle/sgds-quantity-toggle.ts b/src/components/QuantityToggle/sgds-quantity-toggle.ts index 7c673c57..84754e92 100644 --- a/src/components/QuantityToggle/sgds-quantity-toggle.ts +++ b/src/components/QuantityToggle/sgds-quantity-toggle.ts @@ -28,8 +28,7 @@ export class SgdsQuantityToggle extends SgdsFormValidatorMixin(FormControlElemen /** @internal */ static dependencies = { "sgds-input": SgdsInput, - "sgds-icon-button": SgdsIconButton, - "sgds-icon": SgdsIcon + "sgds-icon-button": SgdsIconButton }; /** @internal */ @query("sgds-icon-button[ariaLabel^='increase by']") private plusBtn: HTMLButtonElement; @@ -237,8 +236,8 @@ export class SgdsQuantityToggle extends SgdsFormValidatorMixin(FormControlElemen ariaLabel=${`decrease by ${this.step}`} ?disabled=${this.disabled || (this.min !== undefined ? this.value <= this.min : this.value < 1)} @click=${this._onMinus} + name="dash" > - = this.max)} - > + name="plus" + >
${this.value}
diff --git a/src/components/Tab/sgds-tab-panel.ts b/src/components/Tab/sgds-tab-panel.ts index 1b678d72..1c16faec 100644 --- a/src/components/Tab/sgds-tab-panel.ts +++ b/src/components/Tab/sgds-tab-panel.ts @@ -37,9 +37,9 @@ export class SgdsTabPanel extends SgdsElement { return html` `; } diff --git a/src/icons/arrow-bar-down.svg b/src/icons/arrow-bar-down.svg deleted file mode 100644 index 949c5614..00000000 --- a/src/icons/arrow-bar-down.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/arrow-bar-left.svg b/src/icons/arrow-bar-left.svg deleted file mode 100644 index 58aab637..00000000 --- a/src/icons/arrow-bar-left.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/arrow-bar-right.svg b/src/icons/arrow-bar-right.svg deleted file mode 100644 index 2adf1c90..00000000 --- a/src/icons/arrow-bar-right.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/arrow-bar-up.svg b/src/icons/arrow-bar-up.svg deleted file mode 100644 index 81a37b9a..00000000 --- a/src/icons/arrow-bar-up.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/arrow-clockwise.svg b/src/icons/arrow-clockwise.svg deleted file mode 100644 index a03dbf4c..00000000 --- a/src/icons/arrow-clockwise.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/arrow-down.svg b/src/icons/arrow-down.svg deleted file mode 100644 index ec626122..00000000 --- a/src/icons/arrow-down.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/arrow-left.svg b/src/icons/arrow-left.svg deleted file mode 100644 index ba956a16..00000000 --- a/src/icons/arrow-left.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/arrow-repeat.svg b/src/icons/arrow-repeat.svg deleted file mode 100644 index f996a227..00000000 --- a/src/icons/arrow-repeat.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/arrow-right.svg b/src/icons/arrow-right.svg deleted file mode 100644 index b6cddb8e..00000000 --- a/src/icons/arrow-right.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/arrow-up.svg b/src/icons/arrow-up.svg deleted file mode 100644 index f40cd07e..00000000 --- a/src/icons/arrow-up.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/bank-fill.svg b/src/icons/bank-fill.svg deleted file mode 100644 index 98f0afed..00000000 --- a/src/icons/bank-fill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/bell-slash.svg b/src/icons/bell-slash.svg deleted file mode 100644 index 12c8407e..00000000 --- a/src/icons/bell-slash.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/bell.svg b/src/icons/bell.svg deleted file mode 100644 index 29f9f31b..00000000 --- a/src/icons/bell.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/bi-funnel.svg b/src/icons/bi-funnel.svg deleted file mode 100644 index 4ba9de4f..00000000 --- a/src/icons/bi-funnel.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/bookmark-fill.svg b/src/icons/bookmark-fill.svg deleted file mode 100644 index 7ac4ecd0..00000000 --- a/src/icons/bookmark-fill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/bookmark.svg b/src/icons/bookmark.svg deleted file mode 100644 index 692e681b..00000000 --- a/src/icons/bookmark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/box-arrow-up-right.svg b/src/icons/box-arrow-up-right.svg deleted file mode 100644 index 641c5516..00000000 --- a/src/icons/box-arrow-up-right.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/box-seam.svg b/src/icons/box-seam.svg deleted file mode 100644 index c10ddc1f..00000000 --- a/src/icons/box-seam.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/building.svg b/src/icons/building.svg deleted file mode 100644 index fb8be97a..00000000 --- a/src/icons/building.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/calculator.svg b/src/icons/calculator.svg deleted file mode 100644 index c5eda64a..00000000 --- a/src/icons/calculator.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/calendar-check.svg b/src/icons/calendar-check.svg deleted file mode 100644 index 15d7666b..00000000 --- a/src/icons/calendar-check.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/calendar-x.svg b/src/icons/calendar-x.svg deleted file mode 100644 index 87891e03..00000000 --- a/src/icons/calendar-x.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/calendar.svg b/src/icons/calendar.svg deleted file mode 100644 index cf40c1de..00000000 --- a/src/icons/calendar.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/camera.svg b/src/icons/camera.svg deleted file mode 100644 index eec737a4..00000000 --- a/src/icons/camera.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/chat-left-text.svg b/src/icons/chat-left-text.svg deleted file mode 100644 index c09fde49..00000000 --- a/src/icons/chat-left-text.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/check-circle-fill.svg b/src/icons/check-circle-fill.svg deleted file mode 100644 index 48bfc022..00000000 --- a/src/icons/check-circle-fill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/check-circle.svg b/src/icons/check-circle.svg deleted file mode 100644 index 3459a313..00000000 --- a/src/icons/check-circle.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/check.svg b/src/icons/check.svg deleted file mode 100644 index 8b3e5b65..00000000 --- a/src/icons/check.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/chevron-down.svg b/src/icons/chevron-down.svg deleted file mode 100644 index 75850c82..00000000 --- a/src/icons/chevron-down.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/chevron-left.svg b/src/icons/chevron-left.svg deleted file mode 100644 index 0c6f3d5c..00000000 --- a/src/icons/chevron-left.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/chevron-right.svg b/src/icons/chevron-right.svg deleted file mode 100644 index 71aa8677..00000000 --- a/src/icons/chevron-right.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/chevron-up .svg b/src/icons/chevron-up .svg deleted file mode 100644 index ca23b199..00000000 --- a/src/icons/chevron-up .svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/clock.svg b/src/icons/clock.svg deleted file mode 100644 index 8cb2fa98..00000000 --- a/src/icons/clock.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/cloud-check.svg b/src/icons/cloud-check.svg deleted file mode 100644 index f365f1c9..00000000 --- a/src/icons/cloud-check.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/cloud-download.svg b/src/icons/cloud-download.svg deleted file mode 100644 index 708a34a9..00000000 --- a/src/icons/cloud-download.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/cloud-upload.svg b/src/icons/cloud-upload.svg deleted file mode 100644 index 8f57e324..00000000 --- a/src/icons/cloud-upload.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/cloud.svg b/src/icons/cloud.svg deleted file mode 100644 index 4eff671d..00000000 --- a/src/icons/cloud.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/compass.svg b/src/icons/compass.svg deleted file mode 100644 index 0582df74..00000000 --- a/src/icons/compass.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/cross.svg b/src/icons/cross.svg deleted file mode 100644 index 4e55738b..00000000 --- a/src/icons/cross.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/cursor-fill.svg b/src/icons/cursor-fill.svg deleted file mode 100644 index 2f8666a1..00000000 --- a/src/icons/cursor-fill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/cursor.svg b/src/icons/cursor.svg deleted file mode 100644 index fa1a5c91..00000000 --- a/src/icons/cursor.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/dash-circle.svg b/src/icons/dash-circle.svg deleted file mode 100644 index 2b0af3f8..00000000 --- a/src/icons/dash-circle.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/dash-square.svg b/src/icons/dash-square.svg deleted file mode 100644 index 8cd1bdc0..00000000 --- a/src/icons/dash-square.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/dash.svg b/src/icons/dash.svg deleted file mode 100644 index 24229544..00000000 --- a/src/icons/dash.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/download.svg b/src/icons/download.svg deleted file mode 100644 index 8bae44fe..00000000 --- a/src/icons/download.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/exclamation-circle-fill.svg b/src/icons/exclamation-circle-fill.svg deleted file mode 100644 index f2aca060..00000000 --- a/src/icons/exclamation-circle-fill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/exclamation-circle.svg b/src/icons/exclamation-circle.svg deleted file mode 100644 index 759271b5..00000000 --- a/src/icons/exclamation-circle.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/exclamation-triangle-fill.svg b/src/icons/exclamation-triangle-fill.svg deleted file mode 100644 index 88a126ba..00000000 --- a/src/icons/exclamation-triangle-fill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/exclamation-triangle.svg b/src/icons/exclamation-triangle.svg deleted file mode 100644 index cd14935d..00000000 --- a/src/icons/exclamation-triangle.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/exclamation.svg b/src/icons/exclamation.svg deleted file mode 100644 index 9afe6279..00000000 --- a/src/icons/exclamation.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/eye-fill.svg b/src/icons/eye-fill.svg deleted file mode 100644 index c582ce54..00000000 --- a/src/icons/eye-fill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/eye-slash-fill.svg b/src/icons/eye-slash-fill.svg deleted file mode 100644 index 15b184bf..00000000 --- a/src/icons/eye-slash-fill.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/eye-slash.svg b/src/icons/eye-slash.svg deleted file mode 100644 index 62ae2dc1..00000000 --- a/src/icons/eye-slash.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/eye.svg b/src/icons/eye.svg deleted file mode 100644 index 6134b831..00000000 --- a/src/icons/eye.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/facebook.svg b/src/icons/facebook.svg deleted file mode 100644 index 7e757eff..00000000 --- a/src/icons/facebook.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/file-earmark-text.svg b/src/icons/file-earmark-text.svg deleted file mode 100644 index 8718451b..00000000 --- a/src/icons/file-earmark-text.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/file-pdf.svg b/src/icons/file-pdf.svg deleted file mode 100644 index 3c97e4df..00000000 --- a/src/icons/file-pdf.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/file-plus.svg b/src/icons/file-plus.svg deleted file mode 100644 index f2fe50d3..00000000 --- a/src/icons/file-plus.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/file-text.svg b/src/icons/file-text.svg deleted file mode 100644 index ac0a8a31..00000000 --- a/src/icons/file-text.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/file.svg b/src/icons/file.svg deleted file mode 100644 index a76576ca..00000000 --- a/src/icons/file.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/files.svg b/src/icons/files.svg deleted file mode 100644 index 80cb1938..00000000 --- a/src/icons/files.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/folder-check.svg b/src/icons/folder-check.svg deleted file mode 100644 index 25142567..00000000 --- a/src/icons/folder-check.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/folder-minus.svg b/src/icons/folder-minus.svg deleted file mode 100644 index aba9c783..00000000 --- a/src/icons/folder-minus.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/folder-plus.svg b/src/icons/folder-plus.svg deleted file mode 100644 index 038d04ba..00000000 --- a/src/icons/folder-plus.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/folder.svg b/src/icons/folder.svg deleted file mode 100644 index 45cd9c84..00000000 --- a/src/icons/folder.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/gear.svg b/src/icons/gear.svg deleted file mode 100644 index ebcc4073..00000000 --- a/src/icons/gear.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/geo-alt.svg b/src/icons/geo-alt.svg deleted file mode 100644 index e2cec762..00000000 --- a/src/icons/geo-alt.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/geo-fill.svg b/src/icons/geo-fill.svg deleted file mode 100644 index 82e845a6..00000000 --- a/src/icons/geo-fill.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/geo.svg b/src/icons/geo.svg deleted file mode 100644 index 95d801cb..00000000 --- a/src/icons/geo.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/google.svg b/src/icons/google.svg deleted file mode 100644 index f33db847..00000000 --- a/src/icons/google.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/grid-fill.svg b/src/icons/grid-fill.svg deleted file mode 100644 index f2a4414b..00000000 --- a/src/icons/grid-fill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/hand-thumbs-down.svg b/src/icons/hand-thumbs-down.svg deleted file mode 100644 index 7bb9d386..00000000 --- a/src/icons/hand-thumbs-down.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/hand-thumbs-up.svg b/src/icons/hand-thumbs-up.svg deleted file mode 100644 index 11d9bf5d..00000000 --- a/src/icons/hand-thumbs-up.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/hdd.svg b/src/icons/hdd.svg deleted file mode 100644 index f3f6ebf7..00000000 --- a/src/icons/hdd.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/house-door.svg b/src/icons/house-door.svg deleted file mode 100644 index d4ecc108..00000000 --- a/src/icons/house-door.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/house.svg b/src/icons/house.svg deleted file mode 100644 index 8e129df3..00000000 --- a/src/icons/house.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/image.svg b/src/icons/image.svg deleted file mode 100644 index 6d3d994c..00000000 --- a/src/icons/image.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/inbox.svg b/src/icons/inbox.svg deleted file mode 100644 index d204e447..00000000 --- a/src/icons/inbox.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/info-circle-fill.svg b/src/icons/info-circle-fill.svg deleted file mode 100644 index 966086b8..00000000 --- a/src/icons/info-circle-fill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/info-circle.svg b/src/icons/info-circle.svg deleted file mode 100644 index acab8224..00000000 --- a/src/icons/info-circle.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/instagram.svg b/src/icons/instagram.svg deleted file mode 100644 index cc653e77..00000000 --- a/src/icons/instagram.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/layers.svg b/src/icons/layers.svg deleted file mode 100644 index 27bdde42..00000000 --- a/src/icons/layers.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/layout-text-window-reverse.svg b/src/icons/layout-text-window-reverse.svg deleted file mode 100644 index b089d6ba..00000000 --- a/src/icons/layout-text-window-reverse.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/layout-text-window.svg b/src/icons/layout-text-window.svg deleted file mode 100644 index 4030b07d..00000000 --- a/src/icons/layout-text-window.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/layout.svg b/src/icons/layout.svg deleted file mode 100644 index 9860ef80..00000000 --- a/src/icons/layout.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/link.svg b/src/icons/link.svg deleted file mode 100644 index 4028605e..00000000 --- a/src/icons/link.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/linkedin.svg b/src/icons/linkedin.svg deleted file mode 100644 index 3b80c2d2..00000000 --- a/src/icons/linkedin.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/list.svg b/src/icons/list.svg deleted file mode 100644 index 0f136cf3..00000000 --- a/src/icons/list.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/lock-fill.svg b/src/icons/lock-fill.svg deleted file mode 100644 index a9026b30..00000000 --- a/src/icons/lock-fill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/lock.svg b/src/icons/lock.svg deleted file mode 100644 index a880b566..00000000 --- a/src/icons/lock.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/mail.svg b/src/icons/mail.svg deleted file mode 100644 index cb757c8e..00000000 --- a/src/icons/mail.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/map.svg b/src/icons/map.svg deleted file mode 100644 index a55af088..00000000 --- a/src/icons/map.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/paperclip.svg b/src/icons/paperclip.svg deleted file mode 100644 index 5154addb..00000000 --- a/src/icons/paperclip.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/pencil.svg b/src/icons/pencil.svg deleted file mode 100644 index b02df8e0..00000000 --- a/src/icons/pencil.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/pending-circle.svg b/src/icons/pending-circle.svg deleted file mode 100644 index ae137e90..00000000 --- a/src/icons/pending-circle.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/person-dash.svg b/src/icons/person-dash.svg deleted file mode 100644 index fc71b080..00000000 --- a/src/icons/person-dash.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/person-plus.svg b/src/icons/person-plus.svg deleted file mode 100644 index d10a5f07..00000000 --- a/src/icons/person-plus.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/person-x.svg b/src/icons/person-x.svg deleted file mode 100644 index 46224c26..00000000 --- a/src/icons/person-x.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/person.svg b/src/icons/person.svg deleted file mode 100644 index 50a42995..00000000 --- a/src/icons/person.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/pin-map-fill.svg b/src/icons/pin-map-fill.svg deleted file mode 100644 index 2d86322b..00000000 --- a/src/icons/pin-map-fill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/pin.svg b/src/icons/pin.svg deleted file mode 100644 index e72c7fb0..00000000 --- a/src/icons/pin.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/placeholder.svg b/src/icons/placeholder.svg deleted file mode 100644 index 35720078..00000000 --- a/src/icons/placeholder.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/plus-circle.svg b/src/icons/plus-circle.svg deleted file mode 100644 index 0e095ed9..00000000 --- a/src/icons/plus-circle.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/plus-square.svg b/src/icons/plus-square.svg deleted file mode 100644 index d3dc47e0..00000000 --- a/src/icons/plus-square.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/plus.svg b/src/icons/plus.svg deleted file mode 100644 index d25bcd8a..00000000 --- a/src/icons/plus.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/printer.svg b/src/icons/printer.svg deleted file mode 100644 index d81f33cd..00000000 --- a/src/icons/printer.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/question-circle.svg b/src/icons/question-circle.svg deleted file mode 100644 index 2882c906..00000000 --- a/src/icons/question-circle.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/save.svg b/src/icons/save.svg deleted file mode 100644 index b0d55b4e..00000000 --- a/src/icons/save.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/search.svg b/src/icons/search.svg deleted file mode 100644 index ea162b7b..00000000 --- a/src/icons/search.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/share.svg b/src/icons/share.svg deleted file mode 100644 index a92ecc8b..00000000 --- a/src/icons/share.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/slash-circle.svg b/src/icons/slash-circle.svg deleted file mode 100644 index ac06a9a9..00000000 --- a/src/icons/slash-circle.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/sliders.svg b/src/icons/sliders.svg deleted file mode 100644 index 772b84fc..00000000 --- a/src/icons/sliders.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/speedometer.svg b/src/icons/speedometer.svg deleted file mode 100644 index 690b29e0..00000000 --- a/src/icons/speedometer.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/star-fill.svg b/src/icons/star-fill.svg deleted file mode 100644 index 89685949..00000000 --- a/src/icons/star-fill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/star.svg b/src/icons/star.svg deleted file mode 100644 index 3583ca4a..00000000 --- a/src/icons/star.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/stoplights.svg b/src/icons/stoplights.svg deleted file mode 100644 index 9f72998a..00000000 --- a/src/icons/stoplights.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/telephone.svg b/src/icons/telephone.svg deleted file mode 100644 index 039fc7b1..00000000 --- a/src/icons/telephone.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/three-dots-vertical.svg b/src/icons/three-dots-vertical.svg deleted file mode 100644 index 2f57234e..00000000 --- a/src/icons/three-dots-vertical.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/three-dots.svg b/src/icons/three-dots.svg deleted file mode 100644 index ba0f7801..00000000 --- a/src/icons/three-dots.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/toggle-off.svg b/src/icons/toggle-off.svg deleted file mode 100644 index ccdcfbc8..00000000 --- a/src/icons/toggle-off.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/toggle-on.svg b/src/icons/toggle-on.svg deleted file mode 100644 index 8cffd9ea..00000000 --- a/src/icons/toggle-on.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/trash.svg b/src/icons/trash.svg deleted file mode 100644 index a7f4c456..00000000 --- a/src/icons/trash.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/twitter-x.svg b/src/icons/twitter-x.svg deleted file mode 100644 index 95bc51d2..00000000 --- a/src/icons/twitter-x.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/unlock.svg b/src/icons/unlock.svg deleted file mode 100644 index 5a18dfa5..00000000 --- a/src/icons/unlock.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/upload.svg b/src/icons/upload.svg deleted file mode 100644 index 61402c9c..00000000 --- a/src/icons/upload.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/window-dash.svg b/src/icons/window-dash.svg deleted file mode 100644 index 0f0c4f16..00000000 --- a/src/icons/window-dash.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/window-desktop.svg b/src/icons/window-desktop.svg deleted file mode 100644 index 46ffa804..00000000 --- a/src/icons/window-desktop.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/window-dock.svg b/src/icons/window-dock.svg deleted file mode 100644 index dd9f9fe1..00000000 --- a/src/icons/window-dock.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/window-fullscreen.svg b/src/icons/window-fullscreen.svg deleted file mode 100644 index 4bcb6c3a..00000000 --- a/src/icons/window-fullscreen.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/window-plus.svg b/src/icons/window-plus.svg deleted file mode 100644 index ffebc271..00000000 --- a/src/icons/window-plus.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/window-sidebar.svg b/src/icons/window-sidebar.svg deleted file mode 100644 index 74e7feea..00000000 --- a/src/icons/window-sidebar.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/window-split.svg b/src/icons/window-split.svg deleted file mode 100644 index 296a3c2e..00000000 --- a/src/icons/window-split.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/window-stack.svg b/src/icons/window-stack.svg deleted file mode 100644 index a223330a..00000000 --- a/src/icons/window-stack.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/window-x.svg b/src/icons/window-x.svg deleted file mode 100644 index 17442181..00000000 --- a/src/icons/window-x.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/icons/window.svg b/src/icons/window.svg deleted file mode 100644 index 24087658..00000000 --- a/src/icons/window.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/x-circle-fill.svg b/src/icons/x-circle-fill.svg deleted file mode 100644 index 50abcb5f..00000000 --- a/src/icons/x-circle-fill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/x-circle.svg b/src/icons/x-circle.svg deleted file mode 100644 index 8bd55fa5..00000000 --- a/src/icons/x-circle.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/youtube.svg b/src/icons/youtube.svg deleted file mode 100644 index 9a47d381..00000000 --- a/src/icons/youtube.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/zoom-in.svg b/src/icons/zoom-in.svg deleted file mode 100644 index 1dd98067..00000000 --- a/src/icons/zoom-in.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/icons/zoom-out.svg b/src/icons/zoom-out.svg deleted file mode 100644 index be90946c..00000000 --- a/src/icons/zoom-out.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/test/dropdown.test.ts b/test/dropdown.test.ts index 9736ecfe..4b943b5e 100644 --- a/test/dropdown.test.ts +++ b/test/dropdown.test.ts @@ -526,10 +526,4 @@ describe("sgds-dropdown-item", () => { const el = await fixture(html`test`); expect(el.shadowRoot?.querySelector("div.dropdown-item")).to.have.class("active"); }); - it("disabled prop is forwarded to class", async () => { - const el = await fixture(html`test`); - expect(el.shadowRoot?.querySelector("div.dropdown-item")).to.have.class("disabled"); - expect(el.shadowRoot?.querySelector("div.dropdown-item")).to.have.attribute("tabindex", "-1"); - expect(el.getAttribute("aria-disabled")).to.equal("true"); - }); }); diff --git a/test/icon-button.test.ts b/test/icon-button.test.ts index 655f6daf..a2bbe51f 100644 --- a/test/icon-button.test.ts +++ b/test/icon-button.test.ts @@ -42,10 +42,6 @@ describe("", () => { expect(icon.size).to.equal(iconSize); }); }); - it("sizes of button are mapped correctly to the sizes of icon", async () => { - const el = await fixture(html``); - }); - it("renders an anchor tag when href is provided", async () => { // Mock fetch to prevent network requests const fetchStub = Sinon.stub(window, "fetch").resolves( diff --git a/test/icon.test.ts b/test/icon.test.ts index 3748e08f..b728dcbb 100644 --- a/test/icon.test.ts +++ b/test/icon.test.ts @@ -1,8 +1,8 @@ -import "./sgds-web-component"; +import { expect, fixture, waitUntil } from "@open-wc/testing"; import { html } from "lit"; -import { fixture, expect } from "@open-wc/testing"; -import { SgdsIcon } from "../src/components"; import Sinon from "sinon"; +import { SgdsIcon } from "../src/components"; +import "./sgds-web-component"; describe("", () => { it("has default properties", async () => { @@ -19,37 +19,26 @@ describe("", () => { }); it("handles invalid icon name gracefully", async () => { - // Mock fetch to prevent network requests - const fetchStub = Sinon.stub(window, "fetch").callsFake(() => Promise.resolve(new Response(null, { status: 404 }))); + // Mock console to check if error is called + const consoleStub = Sinon.stub(console, "error"); const el = await fixture(html``); await el.updateComplete; - await new Promise(resolve => setTimeout(resolve, 0)); + await waitUntil(() => consoleStub.calledOnce); - expect(fetchStub.calledOnce).to.be.true; - expect(el.shadowRoot?.innerHTML).not.to.contain(" { - const fetchStub = Sinon.stub(window, "fetch").resolves( - new Response( - ` - - `, - { - status: 200, - headers: { "Content-Type": "image/svg+xml" } - } - ) - ); + const calendarSvgD = + "M8 2c.332 0 .6.32.6.714V4h6.8V2.714c0-.394.269-.714.6-.714.332 0 .6.32.6.714V4c1.418.002 2.173.027 2.762.327a3 3 0 0 1 1.311 1.311C21 6.28 21 7.12 21 8.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 22 17.88 22 16.2 22H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 19.72 3 18.88 3 17.2V8.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311c.589-.3 1.344-.325 2.762-.327V2.714C7.4 2.32 7.67 2 8 2Zm-.6 3.2a19.76 19.76 0 0 0-1.473.037c-.426.035-.62.096-.744.16a1.8 1.8 0 0 0-.787.786c-.063.123-.124.318-.16.744C4.202 7.367 4.2 7.94 4.2 8.8v.6h15.6v-.6c0-.86 0-1.433-.037-1.873-.035-.426-.096-.62-.16-.744a1.8 1.8 0 0 0-.786-.787c-.123-.063-.318-.124-.744-.16A19.86 19.86 0 0 0 16.6 5.2v1.086c0 .394-.268.714-.6.714-.331 0-.6-.32-.6-.714V5.2H8.6v1.086C8.6 6.68 8.332 7 8 7c-.331 0-.6-.32-.6-.714V5.2Zm12.4 5.4H4.2v6.6c0 .86 0 1.433.037 1.873.035.426.096.62.16.744a1.8 1.8 0 0 0 .786.787c.123.063.318.124.744.16.44.035 1.013.036 1.873.036h8.4c.86 0 1.433 0 1.873-.037.426-.035.62-.096.744-.16a1.8 1.8 0 0 0 .787-.786c.063-.123.124-.318.16-.744.035-.44.036-1.013.036-1.873v-6.6Z"; const el = await fixture(html``); - await el.updateComplete; - await new Promise(resolve => setTimeout(resolve, 0)); - expect(fetchStub.calledOnce).to.be.true; - expect(el.shadowRoot?.innerHTML).to.contain(" el.shadowRoot?.querySelector("svg")); - fetchStub.restore(); + expect(el.shadowRoot?.querySelector("svg")).to.exist; + expect(el.shadowRoot?.querySelector("svg > path")?.getAttribute("d")).to.equal(calendarSvgD); }); });