srcdev-nuxt-components 9.4.4 → 9.4.6
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/commands/migrate-component.md +106 -0
- package/.claude/component-ledger/artifact-url.txt +1 -0
- package/.claude/component-ledger/audit.json +1 -0
- package/.claude/component-ledger/build.mjs +111 -0
- package/.claude/component-ledger/output.html +559 -0
- package/.claude/component-ledger/template.html +559 -0
- package/.claude/hooks/refresh-component-ledger.sh +32 -0
- package/.claude/settings.json +10 -0
- package/.claude/skills/components/animated-svg-text.md +78 -0
- package/.claude/skills/components/breadcrumb.md +1 -0
- package/.claude/skills/components/canvas-switcher.md +61 -0
- package/.claude/skills/components/clip-element.md +67 -0
- package/.claude/skills/components/clipped-panel.md +64 -0
- package/.claude/skills/components/content-docs.md +2 -0
- package/.claude/skills/components/deep-expanding-menu-classic.md +94 -0
- package/.claude/skills/components/deep-expanding-menu.md +92 -0
- package/.claude/skills/components/display-banner.md +60 -0
- package/.claude/skills/components/display-tooltip-defined.md +139 -0
- package/.claude/skills/components/display-tooltip.md +85 -0
- package/.claude/skills/components/marquee-scroller.md +130 -0
- package/.claude/skills/components/navigation-items.md +1 -0
- package/.claude/skills/components/responsive-header.md +3 -0
- package/.claude/skills/components/site-header.md +4 -0
- package/.claude/skills/components/site-navigation.md +1 -0
- package/.claude/skills/components/tab-navigation.md +1 -0
- package/.claude/skills/composable-tooltips-guide.md +10 -0
- package/.claude/skills/index.md +8 -1
- package/.claude/skills/storybook-add-story.md +30 -0
- package/.vscode/srcdev-component-animated-svg-text.code-snippets +15 -0
- package/.vscode/srcdev-component-breadcrumb.code-snippets +13 -0
- package/.vscode/srcdev-component-canvas-switcher.code-snippets +9 -0
- package/.vscode/srcdev-component-clip-element.code-snippets +20 -0
- package/.vscode/srcdev-component-clipped-panel.code-snippets +23 -0
- package/.vscode/srcdev-component-content-docs.code-snippets +18 -0
- package/.vscode/srcdev-component-deep-expanding-menu-classic.code-snippets +9 -0
- package/.vscode/srcdev-component-deep-expanding-menu.code-snippets +9 -0
- package/.vscode/srcdev-component-display-banner.code-snippets +30 -0
- package/.vscode/srcdev-component-display-tooltip-defined.code-snippets +29 -0
- package/.vscode/srcdev-component-display-tooltip.code-snippets +38 -0
- package/.vscode/srcdev-component-marquee-scroller.code-snippets +93 -0
- package/.vscode/srcdev-component-responsive-header.code-snippets +12 -0
- package/.vscode/srcdev-component-site-header.code-snippets +17 -0
- package/.vscode/srcdev-component-site-navigation.code-snippets +30 -0
- package/.vscode/srcdev-component-slider-gallery.code-snippets +38 -0
- package/.vscode/srcdev-component-tab-navigation.code-snippets +30 -0
- package/app/components/01.atoms/animations/animated-svg-text/AnimatedSvgText.vue +58 -0
- package/app/components/01.atoms/animations/animated-svg-text/CONSUMER-STYLING.md +34 -0
- package/app/components/01.atoms/animations/animated-svg-text/stories/AnimatedSvgText.stories.ts +69 -0
- package/app/components/01.atoms/animations/animated-svg-text/tests/AnimatedSvgText.spec.ts +63 -0
- package/app/components/01.atoms/animations/animated-svg-text/tests/__snapshots__/AnimatedSvgText.spec.ts.snap +7 -0
- package/app/components/01.atoms/animations/clip-element/CONSUMER-STYLING.md +27 -0
- package/app/components/{clip-element → 01.atoms/animations/clip-element}/ClipElement.vue +16 -11
- package/app/components/01.atoms/animations/clip-element/stories/ClipElement.stories.ts +133 -0
- package/app/components/01.atoms/animations/clip-element/tests/ClipElement.spec.ts +70 -0
- package/app/components/01.atoms/animations/clip-element/tests/__snapshots__/ClipElement.spec.ts.snap +7 -0
- package/app/components/01.atoms/animations/marquee-scroller/CONSUMER-STYLING.md +94 -0
- package/app/components/01.atoms/animations/marquee-scroller/MarqueeScroller.vue +331 -0
- package/app/components/01.atoms/animations/marquee-scroller/stories/MarqueeScroller.stories.ts +151 -0
- package/app/components/01.atoms/animations/marquee-scroller/tests/MarqueeScroller.spec.ts +315 -0
- package/app/components/01.atoms/animations/marquee-scroller/tests/__snapshots__/MarqueeScroller.spec.ts.snap +28 -0
- package/app/components/01.atoms/canvas-switcher/CONSUMER-STYLING.md +27 -0
- package/app/components/01.atoms/canvas-switcher/CanvasSwitcher.vue +111 -0
- package/app/components/01.atoms/canvas-switcher/stories/CanvasSwitcher.stories.ts +75 -0
- package/app/components/01.atoms/canvas-switcher/tests/CanvasSwitcher.spec.ts +67 -0
- package/app/components/01.atoms/clipped-panel/CONSUMER-STYLING.md +39 -0
- package/app/components/01.atoms/clipped-panel/ClippedPanel.vue +68 -0
- package/app/components/01.atoms/clipped-panel/stories/ClippedPanel.stories.ts +105 -0
- package/app/components/01.atoms/clipped-panel/tests/ClippedPanel.spec.ts +67 -0
- package/app/components/01.atoms/clipped-panel/tests/__snapshots__/ClippedPanel.spec.ts.snap +3 -0
- package/app/components/01.atoms/content-wrappers/docs-pages/ContentDocs.vue +8 -2
- package/app/components/01.atoms/display-banner/CONSUMER-STYLING.md +35 -0
- package/app/components/{display-banner → 01.atoms/display-banner}/DisplayBanner.vue +13 -35
- package/app/components/01.atoms/display-banner/stories/DisplayBanner.stories.ts +100 -0
- package/app/components/01.atoms/display-banner/tests/DisplayBanner.spec.ts +78 -0
- package/app/components/01.atoms/display-banner/tests/__snapshots__/DisplayBanner.spec.ts.snap +8 -0
- package/app/components/01.atoms/display-tooltip/CONSUMER-STYLING.md +62 -0
- package/app/components/01.atoms/display-tooltip/DisplayTooltip.vue +188 -0
- package/app/components/01.atoms/display-tooltip/stories/DisplayTooltip.stories.ts +94 -0
- package/app/components/01.atoms/display-tooltip/tests/DisplayTooltip.spec.ts +75 -0
- package/app/components/01.atoms/display-tooltip/tests/__snapshots__/DisplayTooltip.spec.ts.snap +12 -0
- package/app/components/01.atoms/navigation/breadcrumb/Breadcrumb.vue +4 -1
- package/app/components/02.molecules/display-tooltip-defined/CONSUMER-STYLING.md +42 -0
- package/app/components/02.molecules/display-tooltip-defined/DisplayTooltipDefined.vue +116 -0
- package/app/components/02.molecules/display-tooltip-defined/stories/DisplayTooltipDefined.stories.ts +126 -0
- package/app/components/02.molecules/display-tooltip-defined/tests/DisplayTooltipDefined.spec.ts +66 -0
- package/app/components/02.molecules/display-tooltip-defined/tests/__snapshots__/DisplayTooltipDefined.spec.ts.snap +17 -0
- package/app/components/02.molecules/navigation/deep-expanding-menu/CONSUMER-STYLING.md +44 -0
- package/app/components/{deep-expanding-menu → 02.molecules/navigation/deep-expanding-menu}/DeepExpandingMenu.vue +53 -64
- package/app/components/02.molecules/navigation/deep-expanding-menu/stories/DeepExpandingMenu.stories.ts +79 -0
- package/app/components/02.molecules/navigation/deep-expanding-menu/tests/DeepExpandingMenu.spec.ts +92 -0
- package/app/components/02.molecules/navigation/deep-expanding-menu/tests/__snapshots__/DeepExpandingMenu.spec.ts.snap +17 -0
- package/app/components/02.molecules/navigation/deep-expanding-menu-classic/CONSUMER-STYLING.md +40 -0
- package/app/components/02.molecules/navigation/deep-expanding-menu-classic/DeepExpandingMenuClassic.vue +200 -0
- package/app/components/02.molecules/navigation/deep-expanding-menu-classic/stories/DeepExpandingMenuClassic.stories.ts +79 -0
- package/app/components/02.molecules/navigation/deep-expanding-menu-classic/tests/DeepExpandingMenuClassic.spec.ts +82 -0
- package/app/components/02.molecules/navigation/deep-expanding-menu-classic/tests/__snapshots__/DeepExpandingMenuClassic.spec.ts.snap +18 -0
- package/app/components/02.molecules/navigation/site-navigation/SiteNavigation.vue +4 -1
- package/app/components/02.molecules/navigation/tab-navigation/TabNavigation.vue +4 -1
- package/app/components/03.organisms/image-galleries/slider-gallery/SliderGallery.vue +16 -4
- package/app/components/03.organisms/responsive-header/NavigationItems.vue +4 -1
- package/app/components/03.organisms/responsive-header/ResponsiveHeader.vue +16 -3
- package/app/components/03.organisms/site-header/SiteHeader.vue +16 -1
- package/app/components/03.organisms/site-header/tests/__snapshots__/SiteHeader.spec.ts.snap +1 -1
- package/app/types/components/display-tooltip-defined.d.ts +10 -0
- package/app/types/components/index.ts +2 -0
- package/app/types/components/marquee-scroller.d.ts +10 -0
- package/package.json +1 -1
- package/app/components/animated-svg-text/AnimatedSvgText.vue +0 -89
- package/app/components/canvas-switcher/CanvasSwitcher.vue +0 -104
- package/app/components/clipped-panels/ClippedPanel.vue +0 -87
- package/app/components/deep-expanding-menu/DeepExpandingMenuOld.vue +0 -218
- package/app/components/display-details/DisplayDetailsCore.vue +0 -122
- package/app/components/display-tooltip/DisplayTooltip.vue +0 -170
- package/app/components/display-tooltip/DisplayTooltipDefined.vue +0 -103
- package/app/components/magnetic-navigation/MagneticNavigation.vue +0 -162
- package/app/components/marquee-scroller/MarqueeScroller.vue +0 -289
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="animated-svg-text" :class="[elementClasses]">
|
|
3
|
-
<slot name="text"></slot>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script setup lang="ts">
|
|
8
|
-
const props = defineProps({
|
|
9
|
-
styleClassPassthrough: {
|
|
10
|
-
type: [String, Array] as PropType<string | string[]>,
|
|
11
|
-
default: () => [],
|
|
12
|
-
},
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
16
|
-
|
|
17
|
-
watch(
|
|
18
|
-
() => props.styleClassPassthrough,
|
|
19
|
-
() => {
|
|
20
|
-
resetElementClasses(props.styleClassPassthrough)
|
|
21
|
-
}
|
|
22
|
-
)
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<style lang="css">
|
|
26
|
-
@layer components {
|
|
27
|
-
|
|
28
|
-
@keyframes animatedSvgText {
|
|
29
|
-
0% {
|
|
30
|
-
fill: transparent;
|
|
31
|
-
stroke-dashoffset: var(--_animated-svg-text-stroke-dasharray);
|
|
32
|
-
stroke-width: 0.3;
|
|
33
|
-
}
|
|
34
|
-
70% {
|
|
35
|
-
fill: transparent;
|
|
36
|
-
stroke-width: 0.3;
|
|
37
|
-
}
|
|
38
|
-
100% {
|
|
39
|
-
fill: var(--_animated-svg-fill-color);
|
|
40
|
-
stroke-dashoffset: 0;
|
|
41
|
-
stroke-width: 0;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
html {
|
|
46
|
-
|
|
47
|
-
&[data-color-scheme='light'] {
|
|
48
|
-
.animated-svg-text {
|
|
49
|
-
--_animated-svg-text-color: var(--_animated-svg-text-stroke-light);
|
|
50
|
-
--_animated-svg-fill-color: var(--_animated-svg-text-fill-light);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
&[data-color-scheme='dark'] {
|
|
54
|
-
.animated-svg-text {
|
|
55
|
-
--_animated-svg-text-color: var(--_animated-svg-text-stroke-dark);
|
|
56
|
-
--_animated-svg-fill-color: var(--_animated-svg-text-fill-dark);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
&[data-color-scheme='auto'] {
|
|
60
|
-
.animated-svg-text {
|
|
61
|
-
@media (prefers-color-scheme: light) {
|
|
62
|
-
--_animated-svg-text-color: var(--_animated-svg-text-stroke-light);
|
|
63
|
-
--_animated-svg-fill-color: var(--_animated-svg-text-fill-light);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@media (prefers-color-scheme: dark) {
|
|
67
|
-
--_animated-svg-text-color: var(--_animated-svg-text-stroke-dark);
|
|
68
|
-
--_animated-svg-fill-color: var(--_animated-svg-text-fill-dark);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.animated-svg-text {
|
|
74
|
-
|
|
75
|
-
--_animated-svg-text-color: var(--_animated-svg-text-stroke-light):
|
|
76
|
-
--_animated-svg-fill-color: var(--_animated-svg-text-fill-light);
|
|
77
|
-
|
|
78
|
-
svg path {
|
|
79
|
-
stroke: var(--_animated-svg-text-color);
|
|
80
|
-
stroke-width: 0.3;
|
|
81
|
-
stroke-dasharray: var(--_animated-svg-text-stroke-dasharray);
|
|
82
|
-
stroke-dashoffset: var(--_animated-svg-text-stroke-dasharray);
|
|
83
|
-
animation: animatedSvgText var(--_animated-svg-animation-duration) linear 1 forwards;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
</style>
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="canvas-switcher">
|
|
3
|
-
<p>Canvas switcher</p>
|
|
4
|
-
<ul class="canvas-switcher mbe-20">
|
|
5
|
-
<li>
|
|
6
|
-
<button type="button" @click.stop.prevent="updateCanvas('mobileCanvas')">
|
|
7
|
-
<Icon name="ic:baseline-phone-iphone" class="icon" :class="[{ current: canvasName === 'mobileCanvas' }]" />
|
|
8
|
-
</button>
|
|
9
|
-
</li>
|
|
10
|
-
<li>
|
|
11
|
-
<button type="button" @click.stop.prevent="updateCanvas('tabletCanvas')">
|
|
12
|
-
<Icon name="ic:baseline-tablet-mac" class="icon" :class="[{ current: canvasName === 'tabletCanvas' }]" />
|
|
13
|
-
</button>
|
|
14
|
-
</li>
|
|
15
|
-
<li>
|
|
16
|
-
<button type="button" @click.stop.prevent="updateCanvas('laptopCanvas')">
|
|
17
|
-
<Icon name="ic:baseline-laptop-mac" class="icon" :class="[{ current: canvasName === 'laptopCanvas' }]" />
|
|
18
|
-
</button>
|
|
19
|
-
</li>
|
|
20
|
-
<li>
|
|
21
|
-
<button type="button" @click.stop.prevent="updateCanvas('desktopCanvas')">
|
|
22
|
-
<Icon name="ic:outline-desktop-mac" class="icon" :class="[{ current: canvasName === 'desktopCanvas' }]" />
|
|
23
|
-
</button>
|
|
24
|
-
</li>
|
|
25
|
-
<li>
|
|
26
|
-
<button type="button" @click.stop.prevent="updateCanvas('fullWidthCanvas')">
|
|
27
|
-
<Icon
|
|
28
|
-
name="pixelarticons:viewport-wide"
|
|
29
|
-
class="icon"
|
|
30
|
-
:class="[{ current: canvasName === 'fullWidthCanvas' }]"
|
|
31
|
-
/>
|
|
32
|
-
</button>
|
|
33
|
-
</li>
|
|
34
|
-
</ul>
|
|
35
|
-
</div>
|
|
36
|
-
</template>
|
|
37
|
-
|
|
38
|
-
<script setup lang="ts">
|
|
39
|
-
import type { MediaCanvas } from "../../types/components";
|
|
40
|
-
|
|
41
|
-
const canvasName = defineModel<MediaCanvas>("canvasName");
|
|
42
|
-
|
|
43
|
-
const updateCanvas = (setCanvas: MediaCanvas) => {
|
|
44
|
-
canvasName.value = setCanvas;
|
|
45
|
-
};
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<style lang="css">
|
|
49
|
-
@layer components {
|
|
50
|
-
.canvas-switcher {
|
|
51
|
-
display: flex;
|
|
52
|
-
align-items: center;
|
|
53
|
-
gap: 20px;
|
|
54
|
-
|
|
55
|
-
ul {
|
|
56
|
-
display: flex;
|
|
57
|
-
gap: 10px;
|
|
58
|
-
list-style-type: none;
|
|
59
|
-
margin: 0;
|
|
60
|
-
padding: 0;
|
|
61
|
-
|
|
62
|
-
li {
|
|
63
|
-
button {
|
|
64
|
-
all: unset;
|
|
65
|
-
display: flex;
|
|
66
|
-
align-items: center;
|
|
67
|
-
justify-content: center;
|
|
68
|
-
padding: 5px;
|
|
69
|
-
border: 0px solid light-dark(var(--slate-10), var(--slate-02));
|
|
70
|
-
border-radius: 4px;
|
|
71
|
-
cursor: pointer;
|
|
72
|
-
|
|
73
|
-
.icon {
|
|
74
|
-
color: light-dark(var(--slate-10), var(--slate-02));
|
|
75
|
-
|
|
76
|
-
width: 24px;
|
|
77
|
-
height: 24px;
|
|
78
|
-
|
|
79
|
-
&.current {
|
|
80
|
-
color: light-dark(var(--green-10), var(--green-04));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.mobileCanvas {
|
|
89
|
-
max-width: 412px;
|
|
90
|
-
}
|
|
91
|
-
.tabletCanvas {
|
|
92
|
-
max-width: 768px;
|
|
93
|
-
}
|
|
94
|
-
.laptopCanvas {
|
|
95
|
-
max-width: 1064px;
|
|
96
|
-
}
|
|
97
|
-
.desktopCanvas {
|
|
98
|
-
max-width: 1280px;
|
|
99
|
-
}
|
|
100
|
-
.fullWidthCanvas {
|
|
101
|
-
max-width: unset;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
</style>
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component :is="tag" class="clipped-panel" :class="[variant, elementClasses]">
|
|
3
|
-
<slot name="default"></slot>
|
|
4
|
-
</component>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script setup lang="ts">
|
|
8
|
-
const props = defineProps({
|
|
9
|
-
tag: {
|
|
10
|
-
type: String,
|
|
11
|
-
default: "div",
|
|
12
|
-
validator(value: string) {
|
|
13
|
-
return [
|
|
14
|
-
"div",
|
|
15
|
-
"p",
|
|
16
|
-
"span",
|
|
17
|
-
"section",
|
|
18
|
-
"article",
|
|
19
|
-
"aside",
|
|
20
|
-
"header",
|
|
21
|
-
"footer",
|
|
22
|
-
"main",
|
|
23
|
-
"nav",
|
|
24
|
-
"ul",
|
|
25
|
-
"ol",
|
|
26
|
-
].includes(value)
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
variant: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: "square",
|
|
32
|
-
validator(value: string) {
|
|
33
|
-
return ["circle-cutout", "rectangle", "square"].includes(value)
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
styleClassPassthrough: {
|
|
37
|
-
type: [String, Array] as PropType<string | string[]>,
|
|
38
|
-
default: () => [],
|
|
39
|
-
},
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
43
|
-
|
|
44
|
-
watch(
|
|
45
|
-
() => props.styleClassPassthrough,
|
|
46
|
-
() => {
|
|
47
|
-
resetElementClasses(props.styleClassPassthrough)
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
</script>
|
|
51
|
-
|
|
52
|
-
<style lang="css">
|
|
53
|
-
@layer components {
|
|
54
|
-
.clipped-panel {
|
|
55
|
-
--_foreground-color: light-dark(hsl(0, 29%, 3%), hsl(0, 0%, 92%));
|
|
56
|
-
|
|
57
|
-
/* Component styles */
|
|
58
|
-
|
|
59
|
-
background-color: red;
|
|
60
|
-
/* color: var(--_foreground-color); */
|
|
61
|
-
outline: 1px solid var(--_foreground-color);
|
|
62
|
-
/* box-shadow: 5px 5px 5px 5px white; */
|
|
63
|
-
|
|
64
|
-
aspect-ratio: 1;
|
|
65
|
-
|
|
66
|
-
&.rectangle {
|
|
67
|
-
--_max-x-position: 300px;
|
|
68
|
-
--_curve-radius: 10px;
|
|
69
|
-
|
|
70
|
-
clip-path: path(
|
|
71
|
-
"M 10, 50 L 140, 50 A 10, 10, 0, 0, 0 150, 40 L 150, 10 A 10, 10, 0, 0, 1 160, 0 L 290, 0 A 10, 10, 0, 0, 1 300, 10 L 300, 190 A 10, 10, 0, 0, 1 290, 200 L 10, 200 A 10, 10, 0, 0, 1 0, 190 L 0, 60 A 10, 10, 0, 0, 1 10, 50 Z"
|
|
72
|
-
);
|
|
73
|
-
width: 300px;
|
|
74
|
-
}
|
|
75
|
-
&.square {
|
|
76
|
-
/* clip-path: path('M 10, 50 L 90, 50 A 10, 10, 0, 0, 0 100, 40 L 100, 10 L 110, 0 L 190, 0 L 200, 10 L 200, 190 L 190, 200 L 10, 200 L 0, 190 L 0, 60 L 10, 50 Z'); */
|
|
77
|
-
clip-path: path(
|
|
78
|
-
"M 10, 50 L 90, 50 A 10, 10, 0, 0, 0 100, 40 L 100, 10 A 10, 10, 0, 0, 1 110, 0 L 190, 0 A 10, 10, 0, 0, 1 200, 10 L 200, 190 A 10, 10, 0, 0, 1 190, 200 L 10, 200 A 10, 10, 0, 0, 1 0, 190 L 0, 60 A 10, 10, 0, 0, 1 10, 50 Z"
|
|
79
|
-
);
|
|
80
|
-
width: 200px;
|
|
81
|
-
}
|
|
82
|
-
&.circle-cutout {
|
|
83
|
-
clip-path: path("M Z");
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
</style>
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component :is="tag" class="deep-expanding-menu-old" :class="[elementClasses]">
|
|
3
|
-
<div class="inner">
|
|
4
|
-
<template v-for="(link, key) in navLinks" :key="key">
|
|
5
|
-
<NuxtLink v-if="link.path" :to="link.path" class="navigation-link">{{ link.name }}</NuxtLink>
|
|
6
|
-
<details v-else ref="navigationGroupRef" class="navigation-group" name="navigation-group">
|
|
7
|
-
<summary class="navigation-group-toggle">
|
|
8
|
-
<span>{{ link.name }}</span>
|
|
9
|
-
<Icon name="bi:caret-down-fill" class="icon" />
|
|
10
|
-
</summary>
|
|
11
|
-
<div :id="`popovertarget-nav-1-${key}`" class="navigation-group-panel">
|
|
12
|
-
<h4 class="page-heading-4 mb-6">{{ link.childLinksTitle }}</h4>
|
|
13
|
-
<ul class="navigation-group-list">
|
|
14
|
-
<li v-for="childLink in link.childLinks" :key="childLink.name" class="navigation-group-item">
|
|
15
|
-
<NuxtLink :to="childLink.path" class="navigation-group-link">{{ childLink.name }}</NuxtLink>
|
|
16
|
-
</li>
|
|
17
|
-
</ul>
|
|
18
|
-
</div>
|
|
19
|
-
</details>
|
|
20
|
-
</template>
|
|
21
|
-
</div>
|
|
22
|
-
</component>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<script setup lang="ts">
|
|
26
|
-
import { onClickOutside } from "@vueuse/core";
|
|
27
|
-
|
|
28
|
-
const props = defineProps({
|
|
29
|
-
tag: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: "nav",
|
|
32
|
-
validator(value: string) {
|
|
33
|
-
return ["div", "section", "nav", "ul", "ol"].includes(value);
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
navLinks: {
|
|
37
|
-
type: Array as PropType<ResponsiveHeaderNavItem[]>,
|
|
38
|
-
default: () => [],
|
|
39
|
-
},
|
|
40
|
-
styleClassPassthrough: {
|
|
41
|
-
type: [String, Array] as PropType<string | string[]>,
|
|
42
|
-
default: () => [],
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
|
|
47
|
-
|
|
48
|
-
const navigationGroupRef = useTemplateRef<HTMLElement[]>("navigationGroupRef");
|
|
49
|
-
|
|
50
|
-
watch(
|
|
51
|
-
() => props.styleClassPassthrough,
|
|
52
|
-
() => {
|
|
53
|
-
resetElementClasses(props.styleClassPassthrough);
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
onMounted(() => {
|
|
58
|
-
navigationGroupRef.value?.forEach((element, index) => {
|
|
59
|
-
onClickOutside(element, () => {
|
|
60
|
-
navigationGroupRef.value?.[index]?.removeAttribute("open");
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
</script>
|
|
65
|
-
|
|
66
|
-
<script lang="ts">
|
|
67
|
-
interface ResponsiveHeaderNavItem {
|
|
68
|
-
name: string;
|
|
69
|
-
path?: string;
|
|
70
|
-
isExternal?: boolean;
|
|
71
|
-
childLinksTitle?: string;
|
|
72
|
-
childLinks?: ResponsiveHeaderNavItem[];
|
|
73
|
-
}
|
|
74
|
-
</script>
|
|
75
|
-
|
|
76
|
-
<style lang="css">
|
|
77
|
-
@layer components {
|
|
78
|
-
@layer popover-setup {
|
|
79
|
-
.deep-expanding-menu-old {
|
|
80
|
-
container-type: inline-size;
|
|
81
|
-
display: grid;
|
|
82
|
-
grid-template-areas: "element-stack";
|
|
83
|
-
align-items: center;
|
|
84
|
-
gap: 12px;
|
|
85
|
-
|
|
86
|
-
.inner {
|
|
87
|
-
grid-area: element-stack;
|
|
88
|
-
display: flex;
|
|
89
|
-
gap: 24px;
|
|
90
|
-
align-items: center;
|
|
91
|
-
z-index: 1;
|
|
92
|
-
|
|
93
|
-
.navigation-link,
|
|
94
|
-
.navigation-group-toggle {
|
|
95
|
-
all: unset;
|
|
96
|
-
border-bottom: 2px solid transparent;
|
|
97
|
-
padding-block: 8px;
|
|
98
|
-
|
|
99
|
-
transition: border-color 200ms;
|
|
100
|
-
|
|
101
|
-
&:hover {
|
|
102
|
-
cursor: pointer;
|
|
103
|
-
border-color: light-dark(var(--blue-10), var(--slate-00));
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&:focus {
|
|
107
|
-
border-color: light-dark(var(--blue-10), var(--slate-00));
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
&:focus-visible {
|
|
111
|
-
border-color: light-dark(var(--blue-10), var(--slate-00));
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.navigation-group {
|
|
116
|
-
--_icon-transform: scaleY(1);
|
|
117
|
-
|
|
118
|
-
display: grid;
|
|
119
|
-
grid-template-areas: "details-stack";
|
|
120
|
-
z-index: 1;
|
|
121
|
-
position: relative;
|
|
122
|
-
|
|
123
|
-
summary::-webkit-details-marker,
|
|
124
|
-
summary::marker {
|
|
125
|
-
display: none;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
&[open] {
|
|
129
|
-
--_icon-transform: scaleY(-1);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.navigation-group-toggle {
|
|
133
|
-
grid-area: details-stack;
|
|
134
|
-
|
|
135
|
-
display: flex !important;
|
|
136
|
-
align-items: center;
|
|
137
|
-
gap: 12px;
|
|
138
|
-
list-style: none;
|
|
139
|
-
|
|
140
|
-
.icon {
|
|
141
|
-
display: block;
|
|
142
|
-
font-size: 1.2rem;
|
|
143
|
-
|
|
144
|
-
transform: var(--_icon-transform);
|
|
145
|
-
transition: transform 200ms;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.navigation-group-panel {
|
|
150
|
-
background-color: black;
|
|
151
|
-
display: grid;
|
|
152
|
-
grid-area: details-stack;
|
|
153
|
-
z-index: 2;
|
|
154
|
-
position: absolute;
|
|
155
|
-
inset: auto;
|
|
156
|
-
top: 40px;
|
|
157
|
-
left: 0px;
|
|
158
|
-
gap: 12px;
|
|
159
|
-
|
|
160
|
-
width: 200px;
|
|
161
|
-
|
|
162
|
-
@media screen and (min-width: 768px) {
|
|
163
|
-
width: 400px;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
@media screen and (min-width: 1024px) {
|
|
167
|
-
width: 600px;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
background-color: white;
|
|
171
|
-
border: 1px solid black;
|
|
172
|
-
border-radius: 12px;
|
|
173
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
174
|
-
padding: 12px;
|
|
175
|
-
overflow: clip;
|
|
176
|
-
|
|
177
|
-
h4 {
|
|
178
|
-
color: var(--slate-10);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.navigation-group-list {
|
|
182
|
-
display: grid;
|
|
183
|
-
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
|
184
|
-
gap: 12px;
|
|
185
|
-
padding-inline-start: 0;
|
|
186
|
-
margin-block-end: 8px;
|
|
187
|
-
|
|
188
|
-
.navigation-group-item {
|
|
189
|
-
display: block;
|
|
190
|
-
|
|
191
|
-
a.navigation-group-link {
|
|
192
|
-
display: inline-block;
|
|
193
|
-
color: var(--slate-10);
|
|
194
|
-
text-decoration: none;
|
|
195
|
-
padding-block: 8px;
|
|
196
|
-
|
|
197
|
-
border-bottom: 2px solid transparent;
|
|
198
|
-
|
|
199
|
-
transition: border-color 200ms;
|
|
200
|
-
|
|
201
|
-
&:hover {
|
|
202
|
-
cursor: pointer;
|
|
203
|
-
border-color: var(--slate-10);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
&:focus-visible {
|
|
207
|
-
border-color: var(--slate-10);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
</style>
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<details :name="name" class="display-details" :class="[elementClasses]" ref="detailsRef">
|
|
3
|
-
<summary class="display-details-summary" :id="triggerId" :aria-controls="contentId" ref="summaryRef">
|
|
4
|
-
<span class="label">
|
|
5
|
-
<slot name="summary"></slot>
|
|
6
|
-
</span>
|
|
7
|
-
<slot name="summaryIcon">
|
|
8
|
-
<Icon name="bi:caret-down-fill" class="icon" :class="iconSize" />
|
|
9
|
-
</slot>
|
|
10
|
-
</summary>
|
|
11
|
-
<div class="display-details-content" :aria-labelledby="triggerId" :id="contentId" role="region" ref="contentRef">
|
|
12
|
-
<div class="inner">
|
|
13
|
-
<slot name="details-content"></slot>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
</details>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script setup lang="ts">
|
|
20
|
-
const props = defineProps({
|
|
21
|
-
name: {
|
|
22
|
-
type: String,
|
|
23
|
-
required: true,
|
|
24
|
-
},
|
|
25
|
-
id: {
|
|
26
|
-
type: String,
|
|
27
|
-
required: true,
|
|
28
|
-
},
|
|
29
|
-
iconSize: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: "small",
|
|
32
|
-
validator(value: string) {
|
|
33
|
-
return ["small", "medium", "large"].includes(value)
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
styleClassPassthrough: {
|
|
37
|
-
type: [String, Array] as PropType<string | string[]>,
|
|
38
|
-
default: () => [],
|
|
39
|
-
},
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
const triggerId = computed(() => `${props.id}-trigger`)
|
|
43
|
-
const contentId = computed(() => `${props.id}-content`)
|
|
44
|
-
|
|
45
|
-
const { elementClasses, resetElementClasses, updateElementClasses } = useStyleClassPassthrough(
|
|
46
|
-
props.styleClassPassthrough
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
updateElementClasses([props.iconSize])
|
|
50
|
-
|
|
51
|
-
const detailsRef = useTemplateRef<HTMLDetailsElement>("detailsRef")
|
|
52
|
-
const summaryRef = useTemplateRef<HTMLElement | null>("summaryRef")
|
|
53
|
-
const contentRef = useTemplateRef<HTMLDivElement | null>("contentRef")
|
|
54
|
-
</script>
|
|
55
|
-
|
|
56
|
-
<style lang="css">
|
|
57
|
-
@layer components {
|
|
58
|
-
.display-details {
|
|
59
|
-
border: none;
|
|
60
|
-
outline: none;
|
|
61
|
-
box-shadow: none;
|
|
62
|
-
border-radius: 0;
|
|
63
|
-
|
|
64
|
-
&[open] {
|
|
65
|
-
.display-details-summary {
|
|
66
|
-
.icon {
|
|
67
|
-
transform: scaleY(-1);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
.display-details-content {
|
|
71
|
-
grid-template-rows: 1fr;
|
|
72
|
-
overflow: hidden;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.display-details-summary {
|
|
77
|
-
display: flex;
|
|
78
|
-
align-items: center;
|
|
79
|
-
justify-content: space-between;
|
|
80
|
-
flex-direction: row;
|
|
81
|
-
gap: 0;
|
|
82
|
-
|
|
83
|
-
list-style: none;
|
|
84
|
-
|
|
85
|
-
&::-webkit-details-marker,
|
|
86
|
-
&::marker {
|
|
87
|
-
display: none;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
overflow: clip;
|
|
91
|
-
|
|
92
|
-
.label {
|
|
93
|
-
display: block;
|
|
94
|
-
flex-grow: 1;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.icon {
|
|
98
|
-
display: block;
|
|
99
|
-
|
|
100
|
-
transform: scaleY(1);
|
|
101
|
-
|
|
102
|
-
font-size: 1.2rem;
|
|
103
|
-
&.medium {
|
|
104
|
-
font-size: 1.8rem;
|
|
105
|
-
}
|
|
106
|
-
&.large {
|
|
107
|
-
font-size: 2.4rem;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.display-details-content {
|
|
113
|
-
display: grid;
|
|
114
|
-
grid-template-rows: 0;
|
|
115
|
-
|
|
116
|
-
.inner {
|
|
117
|
-
overflow: hidden;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
</style>
|