srcdev-nuxt-components 9.6.12 → 9.6.14
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.
- package/.claude/rules/consumer/ids-from-useid.md +2 -1
- package/.claude/rules/consumer/story-register-components.md +1 -1
- package/.claude/rules/consumer/vfor-keys-from-data.md +14 -0
- package/.claude/skills/component-compliance-checklist.md +24 -1
- package/.claude/skills/component-naming.md +1 -0
- package/.claude/skills/components/banner-video.md +24 -30
- package/.claude/skills/components/content-docs.md +18 -5
- package/.claude/skills/components/display-dialog.md +16 -6
- package/.claude/skills/components/display-qr-code.md +22 -4
- package/.claude/skills/components/{display-tooltip-defined.md → display-tooltip-rich.md} +40 -42
- package/.claude/skills/components/display-tooltip.md +17 -6
- package/.claude/skills/components/eyebrow-text.md +9 -5
- package/.claude/skills/components/header-block.md +13 -5
- package/.claude/skills/components/hero-text.md +13 -9
- package/.claude/skills/components/link-text.md +8 -5
- package/.claude/skills/components/pop-over.md +17 -3
- package/.claude/skills/components/skip-links.md +16 -0
- package/.claude/skills/composable-tooltips-guide.md +4 -4
- package/.claude/skills/index.md +6 -6
- package/.claude/skills/storybook-add-story.md +5 -2
- package/.claude/skills/testing-add-playwright.md +12 -7
- package/.claude/skills/testing-add-unit-test.md +8 -0
- package/.vscode/srcdev-component-banner-video.code-snippets +38 -25
- package/.vscode/srcdev-component-content-docs.code-snippets +69 -60
- package/.vscode/srcdev-component-display-dialog.code-snippets +7 -5
- package/.vscode/srcdev-component-display-qr-code.code-snippets +12 -1
- package/.vscode/srcdev-component-display-tooltip-rich.code-snippets +50 -0
- package/.vscode/srcdev-component-display-tooltip.code-snippets +31 -0
- package/.vscode/srcdev-component-hero-text.code-snippets +21 -5
- package/.vscode/srcdev-component-link-text.code-snippets +3 -3
- package/.vscode/srcdev-component-pop-over.code-snippets +28 -0
- package/.vscode/srcdev-component-skip-links.code-snippets +1 -1
- package/app/components/01.atoms/banner-video/BannerVideo.vue +51 -19
- package/app/components/01.atoms/banner-video/CONSUMER-STYLING.md +59 -40
- package/app/components/01.atoms/banner-video/stories/BannerVideo.stories.ts +88 -1
- package/app/components/01.atoms/banner-video/tests/BannerVideo.spec.ts +127 -78
- package/app/components/01.atoms/banner-video/tests/__snapshots__/BannerVideo.spec.ts.snap +12 -4
- package/app/components/01.atoms/content-wrappers/docs-pages/CONSUMER-STYLING.md +42 -14
- package/app/components/01.atoms/content-wrappers/docs-pages/ContentDocs.vue +86 -112
- package/app/components/01.atoms/content-wrappers/docs-pages/stories/ContentDocs.stories.ts +134 -8
- package/app/components/01.atoms/content-wrappers/docs-pages/tests/ContentDocs.spec.ts +131 -65
- package/app/components/01.atoms/display-dialog/CONSUMER-STYLING.md +28 -3
- package/app/components/01.atoms/display-dialog/DisplayDialog.vue +39 -31
- package/app/components/01.atoms/display-dialog/stories/DisplayDialog.stories.ts +92 -1
- package/app/components/01.atoms/display-dialog/tests/DisplayDialog.spec.ts +87 -41
- package/app/components/01.atoms/display-dialog/tests/__snapshots__/DisplayDialog.spec.ts.snap +5 -1
- package/app/components/01.atoms/display-tooltip/CONSUMER-STYLING.md +70 -24
- package/app/components/01.atoms/display-tooltip/DisplayTooltip.vue +24 -12
- package/app/components/01.atoms/display-tooltip/stories/DisplayTooltip.stories.ts +89 -2
- package/app/components/01.atoms/display-tooltip/tests/DisplayTooltip.spec.ts +65 -18
- package/app/components/01.atoms/display-tooltip/tests/__snapshots__/DisplayTooltip.spec.ts.snap +3 -3
- package/app/components/01.atoms/navigation/skip-links/CONSUMER-STYLING.md +65 -19
- package/app/components/01.atoms/navigation/skip-links/SkipLinks.vue +20 -14
- package/app/components/01.atoms/navigation/skip-links/stories/SkipLinks.stories.ts +89 -20
- package/app/components/01.atoms/navigation/skip-links/tests/SkipLinks.spec.ts +70 -10
- package/app/components/01.atoms/pop-over/CONSUMER-STYLING.md +42 -9
- package/app/components/01.atoms/pop-over/PopOver.vue +28 -12
- package/app/components/01.atoms/pop-over/stories/PopOver.stories.ts +114 -2
- package/app/components/01.atoms/pop-over/tests/PopOver.spec.ts +35 -0
- package/app/components/01.atoms/pop-over/tests/__snapshots__/PopOver.spec.ts.snap +5 -1
- package/app/components/01.atoms/qr-code/CONSUMER-STYLING.md +16 -3
- package/app/components/01.atoms/qr-code/DisplayQrCode.vue +31 -0
- package/app/components/01.atoms/qr-code/stories/DisplayQrCode.stories.ts +190 -157
- package/app/components/01.atoms/qr-code/tests/DisplayQrCode.spec.ts +58 -0
- package/app/components/01.atoms/text-blocks/eyebrow-text/CONSUMER-STYLING.md +9 -1
- package/app/components/01.atoms/text-blocks/eyebrow-text/EyebrowText.vue +5 -4
- package/app/components/01.atoms/text-blocks/eyebrow-text/playwright/eyebrow-text.playwright.ts +1 -1
- package/app/components/01.atoms/text-blocks/eyebrow-text/stories/EyebrowText.stories.ts +104 -17
- package/app/components/01.atoms/text-blocks/eyebrow-text/tests/EyebrowText.spec.ts +68 -118
- package/app/components/01.atoms/text-blocks/eyebrow-text/tests/__snapshots__/EyebrowText.spec.ts.snap +8 -8
- package/app/components/01.atoms/text-blocks/header-block/CONSUMER-STYLING.md +49 -24
- package/app/components/01.atoms/text-blocks/header-block/HeaderBlock.vue +9 -1
- package/app/components/01.atoms/text-blocks/header-block/stories/HeaderBlock.stories.ts +96 -26
- package/app/components/01.atoms/text-blocks/header-block/tests/HeaderBlock.spec.ts +64 -48
- package/app/components/01.atoms/text-blocks/header-block/tests/__snapshots__/HeaderBlock.spec.ts.snap +2 -2
- package/app/components/01.atoms/text-blocks/hero-text/CONSUMER-STYLING.md +22 -6
- package/app/components/01.atoms/text-blocks/hero-text/HeroText.vue +32 -23
- package/app/components/01.atoms/text-blocks/hero-text/playwright/hero-text.playwright.ts +1 -1
- package/app/components/01.atoms/text-blocks/hero-text/stories/HeroText.stories.ts +176 -23
- package/app/components/01.atoms/text-blocks/hero-text/tests/HeroText.spec.ts +129 -123
- package/app/components/01.atoms/text-blocks/hero-text/tests/__snapshots__/HeroText.spec.ts.snap +2 -2
- package/app/components/01.atoms/text-blocks/link-text/CONSUMER-STYLING.md +17 -0
- package/app/components/01.atoms/text-blocks/link-text/LinkText.vue +9 -3
- package/app/components/01.atoms/text-blocks/link-text/stories/LinkText.stories.ts +96 -99
- package/app/components/01.atoms/text-blocks/link-text/tests/LinkText.spec.ts +84 -93
- package/app/components/02.molecules/display-tooltip-rich/CONSUMER-STYLING.md +110 -0
- package/app/components/02.molecules/display-tooltip-rich/DisplayTooltipRich.vue +148 -0
- package/app/components/02.molecules/display-tooltip-rich/stories/DisplayTooltipRich.stories.ts +254 -0
- package/app/components/02.molecules/display-tooltip-rich/tests/DisplayTooltipRich.spec.ts +156 -0
- package/app/components/02.molecules/display-tooltip-rich/tests/__snapshots__/DisplayTooltipRich.spec.ts.snap +22 -0
- package/app/components/02.molecules/navigation/deep-expanding-menu/DeepExpandingMenu.vue +1 -0
- package/app/components/02.molecules/navigation/deep-expanding-menu/tests/__snapshots__/DeepExpandingMenu.spec.ts.snap +1 -1
- package/app/components/02.molecules/price-list/tests/__snapshots__/PriceList.spec.ts.snap +8 -8
- package/app/components/03.organisms/image-galleries/carousel-flip/CarouselFlip.vue +1 -0
- package/app/components/03.organisms/services/service-detail/tests/__snapshots__/ServiceDetail.spec.ts.snap +15 -15
- package/app/components/03.organisms/services/service-summary/tests/__snapshots__/ServiceSummary.spec.ts.snap +3 -3
- package/app/components/03.organisms/services/services-card/tests/ServicesCard.spec.ts +3 -3
- package/app/components/03.organisms/services/services-card/tests/__snapshots__/ServicesCard.spec.ts.snap +3 -3
- package/app/components/03.organisms/services/services-grids/tests/ServicesCardGrid.spec.ts +1 -1
- package/app/components/03.organisms/services/services-grids/tests/__snapshots__/ServiceSummaryGrid.spec.ts.snap +9 -9
- package/app/components/03.organisms/services/services-grids/tests/__snapshots__/ServicesCardGrid.spec.ts.snap +9 -9
- package/app/composables/tests/useTooltips.spec.ts +3 -3
- package/app/types/components/index.ts +1 -1
- package/package.json +1 -1
- package/.vscode/srcdev-component-display-tooltip-defined.code-snippets +0 -29
- package/app/components/02.molecules/display-tooltip-defined/CONSUMER-STYLING.md +0 -53
- package/app/components/02.molecules/display-tooltip-defined/DisplayTooltipDefined.vue +0 -117
- package/app/components/02.molecules/display-tooltip-defined/stories/DisplayTooltipDefined.stories.ts +0 -129
- package/app/components/02.molecules/display-tooltip-defined/tests/DisplayTooltipDefined.spec.ts +0 -85
- package/app/components/02.molecules/display-tooltip-defined/tests/__snapshots__/DisplayTooltipDefined.spec.ts.snap +0 -17
- /package/app/types/components/{display-tooltip-defined.d.ts → display-tooltip-rich.d.ts} +0 -0
package/app/components/02.molecules/display-tooltip-defined/tests/DisplayTooltipDefined.spec.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, beforeEach, afterEach } from "vitest";
|
|
2
|
-
import { mountSuspended } from "@nuxt/test-utils/runtime";
|
|
3
|
-
import DisplayTooltipDefined from "../DisplayTooltipDefined.vue";
|
|
4
|
-
import type { TooltipContentText } from "~/types/components";
|
|
5
|
-
|
|
6
|
-
const contentText: TooltipContentText = {
|
|
7
|
-
tooltipTitle: { tag: "h4", text: "Title" },
|
|
8
|
-
tooltipContent: { tag: "p", text: "Body copy" },
|
|
9
|
-
tooltipAction: { tag: "span", text: "Learn more" },
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
describe("DisplayTooltipDefined", () => {
|
|
13
|
-
it("mounts without error", async () => {
|
|
14
|
-
const wrapper = await mountSuspended(DisplayTooltipDefined);
|
|
15
|
-
expect(wrapper.vm).toBeTruthy();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it("renders correct HTML structure", async () => {
|
|
19
|
-
const wrapper = await mountSuspended(DisplayTooltipDefined, { props: { contentText, tooltipId: "fixed" } });
|
|
20
|
-
expect(wrapper.html()).toMatchSnapshot();
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
it("renders the title, body, and action from contentText", async () => {
|
|
24
|
-
const wrapper = await mountSuspended(DisplayTooltipDefined, { props: { contentText } });
|
|
25
|
-
expect(wrapper.find(".tooltip-title").text()).toBe("Title");
|
|
26
|
-
expect(wrapper.find(".tooltip-body").text()).toBe("Body copy");
|
|
27
|
-
expect(wrapper.find(".tooltip-action").text()).toBe("Learn more");
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
it("renders each contentText field with its given tag", async () => {
|
|
31
|
-
const wrapper = await mountSuspended(DisplayTooltipDefined, { props: { contentText } });
|
|
32
|
-
expect(wrapper.find(".tooltip-title").element.tagName.toLowerCase()).toBe("h4");
|
|
33
|
-
expect(wrapper.find(".tooltip-body").element.tagName.toLowerCase()).toBe("p");
|
|
34
|
-
expect(wrapper.find(".tooltip-action").element.tagName.toLowerCase()).toBe("span");
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
it("omits a field when not present in contentText", async () => {
|
|
38
|
-
const wrapper = await mountSuspended(DisplayTooltipDefined, {
|
|
39
|
-
props: { contentText: { tooltipTitle: { tag: "h4", text: "Only a title" } } },
|
|
40
|
-
});
|
|
41
|
-
expect(wrapper.find(".tooltip-title").exists()).toBe(true);
|
|
42
|
-
expect(wrapper.find(".tooltip-body").exists()).toBe(false);
|
|
43
|
-
expect(wrapper.find(".tooltip-action").exists()).toBe(false);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
it("renders a close button wired to the tooltip id", async () => {
|
|
47
|
-
const wrapper = await mountSuspended(DisplayTooltipDefined, { props: { tooltipId: "my-tip" } });
|
|
48
|
-
const closeButton = wrapper.find(".display-tooltip-close-button");
|
|
49
|
-
expect(closeButton.attributes("popovertarget")).toBe("nuxt-tooltip-my-tip");
|
|
50
|
-
expect(closeButton.attributes("popovertargetaction")).toBe("hide");
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
it("renders the triggerContent slot", async () => {
|
|
54
|
-
const wrapper = await mountSuspended(DisplayTooltipDefined, {
|
|
55
|
-
slots: { triggerContent: "<span class='slot-trigger'>?</span>" },
|
|
56
|
-
});
|
|
57
|
-
expect(wrapper.find(".slot-trigger").text()).toBe("?");
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
it("applies styleClassPassthrough classes to the underlying DisplayTooltip", async () => {
|
|
61
|
-
const wrapper = await mountSuspended(DisplayTooltipDefined, {
|
|
62
|
-
props: { styleClassPassthrough: ["custom-class"] },
|
|
63
|
-
});
|
|
64
|
-
expect(wrapper.classes()).toContain("custom-class");
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
describe("without the Popover API", () => {
|
|
68
|
-
beforeEach(() => {
|
|
69
|
-
Object.defineProperty(HTMLElement.prototype, "showPopover", { value: undefined, writable: true, configurable: true });
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
afterEach(() => {
|
|
73
|
-
delete (HTMLElement.prototype as unknown as Record<string, unknown>)["showPopover"];
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
it("closes from the close button", async () => {
|
|
77
|
-
const wrapper = await mountSuspended(DisplayTooltipDefined, { props: { contentText } });
|
|
78
|
-
await wrapper.find(".display-tooltip-trigger-button").trigger("click");
|
|
79
|
-
expect(wrapper.find(".display-tooltip-popover").classes()).toContain("display-tooltip-popover-open");
|
|
80
|
-
|
|
81
|
-
await wrapper.find(".display-tooltip-close-button").trigger("click");
|
|
82
|
-
expect(wrapper.find(".display-tooltip-popover").classes()).not.toContain("display-tooltip-popover-open");
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
-
|
|
3
|
-
exports[`DisplayTooltipDefined > renders correct HTML structure 1`] = `
|
|
4
|
-
"<div class="display-tooltip-core" style="--_anchor-name: --tooltip-anchor-v-0-0-0;">
|
|
5
|
-
<div class="display-tooltip-trigger-wrapper body-md">
|
|
6
|
-
<!--v-if--><button popovertarget="nuxt-tooltip-fixed" popovertargetaction="toggle" class="display-tooltip-trigger-button" aria-label="Toggle the popover" aria-expanded="false"><span class="iconify i-fa7-solid:circle-question display-tooltip-trigger-icon" aria-hidden="true"></span></button>
|
|
7
|
-
</div>
|
|
8
|
-
<div id="nuxt-tooltip-fixed" popover="" class="display-tooltip-popover">
|
|
9
|
-
<div class="display-tooltip-popover-content">
|
|
10
|
-
<div class="popover-content-defined">
|
|
11
|
-
<h4 class="tooltip-title subtitle-sm">Title</h4>
|
|
12
|
-
<p class="tooltip-body body-sm">Body copy</p><span class="tooltip-action input-value">Learn more</span><button popovertarget="nuxt-tooltip-fixed" popovertargetaction="hide" class="display-tooltip-close-button" aria-label="Close tool tip">Close</button>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
</div>"
|
|
17
|
-
`;
|
|
File without changes
|