@alphacifer/slidev-addon-theme 0.0.9 → 0.0.11
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/README.md +133 -75
- package/components/card/chevron-card/ChevronCard.vue +44 -32
- package/components/card/chevron-card/ChevronCardBadge.vue +14 -8
- package/components/card/chevron-card/ChevronCardContent.vue +15 -13
- package/components/card/chevron-card/style.css +12 -0
- package/components/card/{horiz-card/HorizCard.vue → horizontal-card/HorizontalCard.vue} +78 -85
- package/components/card/{horiz-card/HorizCardBadge.vue → horizontal-card/HorizontalCardBadge.vue} +15 -10
- package/components/card/{horiz-card/HorizCardContent.vue → horizontal-card/HorizontalCardContent.vue} +11 -11
- package/components/card/{horiz-card/HorizCardIcon.vue → horizontal-card/HorizontalCardIcon.vue} +24 -38
- package/components/card/horizontal-card/style.css +17 -0
- package/components/card/{vert-card/VertCard.vue → vertical-card/VerticalCard.vue} +80 -103
- package/components/card/{vert-card/VertCardBadge.vue → vertical-card/VerticalCardBadge.vue} +15 -10
- package/components/card/{vert-card/VertCardContent.vue → vertical-card/VerticalCardContent.vue} +13 -12
- package/components/card/{vert-card/VertCardIcon.vue → vertical-card/VerticalCardIcon.vue} +15 -33
- package/components/card/vertical-card/style.css +19 -0
- package/components/comparisons/arc-comparison/ArcComparison.vue +376 -80
- package/components/comparisons/arc-comparison/ArcComparisonBadge.vue +9 -4
- package/components/comparisons/arc-comparison/ArcComparisonContent.vue +9 -4
- package/components/comparisons/arc-comparison/ArcComparisonHeading.vue +9 -4
- package/components/comparisons/arc-comparison/ArcComparisonLeft.vue +39 -63
- package/components/comparisons/arc-comparison/ArcComparisonOrbit.vue +9 -8
- package/components/comparisons/arc-comparison/ArcComparisonRight.vue +39 -63
- package/components/comparisons/arc-comparison/style.css +27 -0
- package/components/comparisons/table-comparison/TableComparison.vue +17 -97
- package/components/comparisons/table-comparison/TableComparisonCell.vue +22 -20
- package/components/comparisons/table-comparison/{TableComparisonCol.vue → TableComparisonColumn.vue} +16 -14
- package/components/comparisons/table-comparison/{TableComparisonCols.vue → TableComparisonColumns.vue} +5 -8
- package/components/comparisons/table-comparison/TableComparisonRow.vue +10 -14
- package/components/comparisons/table-comparison/TableComparisonRows.vue +1 -4
- package/components/comparisons/table-comparison/style.css +15 -0
- package/components/core/Date.vue +2 -5
- package/components/core/QnA.vue +1 -1
- package/components/core/Quote.vue +3 -6
- package/components/core/ReflectedTitle.vue +2 -6
- package/components/core/Speaker.vue +5 -10
- package/components/core/TransitionHeading.vue +2 -5
- package/components/core/arc-orbit/ArcOrbit.vue +65 -84
- package/components/core/arc-orbit/ArcOrbitBadge.vue +9 -11
- package/components/core/arc-orbit/ArcOrbitCallout.vue +30 -32
- package/components/core/arc-orbit/ArcOrbitContent.vue +6 -12
- package/components/core/arc-orbit/ArcOrbitHeading.vue +13 -11
- package/components/core/arc-orbit/style.css +20 -0
- package/components/core/style.css +9 -0
- package/components/core/thanks/{ThanksContent.vue → SquareThanks.vue} +36 -31
- package/components/core/thanks/SquareThanksContent.vue +89 -0
- package/components/core/thanks/ThanksOutlineSquare.vue +2 -5
- package/components/core/thanks/ThanksSquare.vue +2 -5
- package/components/core/thanks/style.css +30 -0
- package/components/defense-in-depth/arc-defense-in-depth/ArcDefenseInDepth.vue +802 -0
- package/components/defense-in-depth/arc-defense-in-depth/ArcDefenseInDepthLayer.vue +240 -0
- package/components/defense-in-depth/arc-defense-in-depth/ArcDefenseInDepthLayerHeading.vue +96 -0
- package/components/defense-in-depth/arc-defense-in-depth/ArcDefenseInDepthLayerPart.vue +501 -0
- package/components/defense-in-depth/arc-defense-in-depth/ArcDefenseInDepthLayerSector.vue +162 -0
- package/components/defense-in-depth/arc-defense-in-depth/style.css +38 -0
- package/components/facets/tetrad/{rect-orbit-tetrad/RectOrbitTetrad.vue → rectangle-orbit-tetrad/RectangleOrbitTetrad.vue} +66 -63
- package/components/facets/tetrad/{rect-orbit-tetrad/RectOrbitTetradCallout.vue → rectangle-orbit-tetrad/RectangleOrbitTetradCallout.vue} +62 -48
- package/components/facets/tetrad/rectangle-orbit-tetrad/RectangleOrbitTetradCenter.vue +54 -0
- package/components/facets/tetrad/rectangle-orbit-tetrad/RectangleOrbitTetradContent.vue +44 -0
- package/components/facets/tetrad/rectangle-orbit-tetrad/RectangleOrbitTetradHeading.vue +27 -0
- package/components/facets/tetrad/{rect-orbit-tetrad/RectOrbitTetradIcon.vue → rectangle-orbit-tetrad/RectangleOrbitTetradIcon.vue} +23 -13
- package/components/facets/tetrad/rectangle-orbit-tetrad/style.css +22 -0
- package/components/facets/triad/arrow-triad/ArrowTriad.vue +99 -109
- package/components/facets/triad/arrow-triad/ArrowTriadCallout.vue +31 -59
- package/components/facets/triad/arrow-triad/ArrowTriadContent.vue +18 -13
- package/components/facets/triad/arrow-triad/ArrowTriadHeading.vue +20 -13
- package/components/facets/triad/arrow-triad/ArrowTriadIcon.vue +14 -9
- package/components/facets/triad/arrow-triad/style.css +15 -0
- package/components/facets/triad/gear-triad/GearTriad.vue +73 -64
- package/components/facets/triad/gear-triad/GearTriadCallout.vue +58 -53
- package/components/facets/triad/gear-triad/GearTriadCenter.vue +9 -4
- package/components/facets/triad/gear-triad/GearTriadContent.vue +21 -36
- package/components/facets/triad/gear-triad/GearTriadDetail.vue +92 -0
- package/components/facets/triad/gear-triad/GearTriadDetails.vue +169 -0
- package/components/facets/triad/gear-triad/GearTriadDetailsContent.vue +18 -0
- package/components/facets/triad/gear-triad/GearTriadDetailsHeading.vue +60 -0
- package/components/facets/triad/gear-triad/GearTriadHeading.vue +19 -13
- package/components/facets/triad/gear-triad/GearTriadIcon.vue +22 -9
- package/components/facets/triad/gear-triad/style.css +26 -0
- package/components/facets/triad/{hex-triad/HexTriad.vue → hexagon-triad/HexagonTriad.vue} +81 -63
- package/components/facets/triad/{hex-triad/HexTriadBadge.vue → hexagon-triad/HexagonTriadBadge.vue} +38 -12
- package/components/facets/triad/{hex-triad/HexTriadCallout.vue → hexagon-triad/HexagonTriadCallout.vue} +35 -31
- package/components/facets/triad/hexagon-triad/HexagonTriadCenterBadge.vue +74 -0
- package/components/facets/triad/hexagon-triad/HexagonTriadContent.vue +34 -0
- package/components/facets/triad/hexagon-triad/HexagonTriadHeading.vue +44 -0
- package/components/facets/triad/{hex-triad/HexTriadLayer.vue → hexagon-triad/HexagonTriadLayer.vue} +12 -4
- package/components/facets/triad/hexagon-triad/style.css +22 -0
- package/components/process/arc-arrow-process/ArcArrowProcess.vue +13 -35
- package/components/process/arc-arrow-process/ArcArrowProcessArrow.vue +20 -21
- package/components/process/arc-arrow-process/ArcArrowProcessCallout.vue +30 -71
- package/components/process/arc-arrow-process/ArcArrowProcessContent.vue +18 -13
- package/components/process/arc-arrow-process/ArcArrowProcessHeading.vue +18 -18
- package/components/process/arc-arrow-process/ArcArrowProcessIcon.vue +23 -11
- package/components/process/arc-arrow-process/style.css +20 -0
- package/components/pyramid/circular-pyramid/CircularPyramid.vue +276 -190
- package/components/pyramid/circular-pyramid/CircularPyramidStack.vue +83 -98
- package/components/pyramid/circular-pyramid/CircularPyramidStackContent.vue +136 -29
- package/components/pyramid/circular-pyramid/CircularPyramidStackHeading.vue +212 -0
- package/components/pyramid/circular-pyramid/style.css +26 -0
- package/components/pyramid/square-pyramid/SquarePyramid.vue +199 -83
- package/components/pyramid/square-pyramid/SquarePyramidStack.vue +87 -95
- package/components/pyramid/square-pyramid/SquarePyramidStackContent.vue +138 -27
- package/components/pyramid/square-pyramid/SquarePyramidStackHeading.vue +212 -0
- package/components/pyramid/square-pyramid/style.css +48 -0
- package/components/style.css +35 -0
- package/layouts/core/arc-toc.vue +40 -45
- package/layouts/core/bg-center.vue +7 -6
- package/layouts/core/style.css +17 -0
- package/layouts/shifting-heading/shifting-intro.vue +4 -13
- package/layouts/thanks/thanks.vue +5 -5
- package/package.json +8 -6
- package/style.css +17 -0
- package/uno.config.ts +1 -0
- package/utils/activateOnKeyboard.ts +14 -0
- package/utils/{chevronCard → card/chevron-card}/context.ts +1 -1
- package/utils/card/chevron-card/index.ts +1 -0
- package/utils/card/horizontal-card/context.ts +12 -0
- package/utils/{horizCard/createHorizCardGeometry.ts → card/horizontal-card/createHorizontalCardGeometry.ts} +10 -45
- package/utils/card/horizontal-card/index.ts +2 -0
- package/utils/card/vertical-card/context.ts +19 -0
- package/utils/{vertCard/createVertCardGeometry.ts → card/vertical-card/createVerticalCardGeometry.ts} +9 -130
- package/utils/card/vertical-card/index.ts +2 -0
- package/utils/colors.ts +93 -0
- package/utils/{arcComparison → comparisons/arc-comparison}/context.ts +0 -11
- package/utils/{arcComparison → comparisons/arc-comparison}/createArcComparisonGeometry.ts +1 -1
- package/utils/comparisons/arc-comparison/resolveArcComparisonItems.ts +33 -0
- package/utils/comparisons/table-comparison/constants.ts +47 -0
- package/utils/{tableComparison → comparisons/table-comparison}/context.ts +2 -2
- package/utils/{arcOrbit → core/arc-orbit}/resolveArcOrbitItems.ts +11 -15
- package/utils/defense-in-depth/arc-defense-in-depth/context.ts +113 -0
- package/utils/defense-in-depth/arc-defense-in-depth/createArcDefenseInDepthGeometry.ts +600 -0
- package/utils/defense-in-depth/arc-defense-in-depth/types.ts +144 -0
- package/utils/defense-in-depth/shared/colors.ts +51 -0
- package/utils/defense-in-depth/shared/constants.ts +22 -0
- package/utils/defense-in-depth/shared/types.ts +7 -0
- package/utils/facets/tetrad/rectangle-orbit-tetrad/context.ts +31 -0
- package/utils/{rectOrbitTetrad/createRectOrbitTetradGeometry.ts → facets/tetrad/rectangle-orbit-tetrad/createRectangleOrbitTetradGeometry.ts} +5 -104
- package/utils/facets/tetrad/rectangle-orbit-tetrad/index.ts +3 -0
- package/utils/{rectOrbitTetrad/resolveRectOrbitTetradItems.ts → facets/tetrad/rectangle-orbit-tetrad/resolveRectangleOrbitTetradItems.ts} +41 -49
- package/utils/{arrowTriad → facets/triad/arrow-triad}/resolveArrowTriadItems.ts +27 -28
- package/utils/{gearTriad → facets/triad/gear-triad}/context.ts +5 -5
- package/utils/{gearTriad → facets/triad/gear-triad}/createGearTriadGeometry.ts +2 -0
- package/utils/{gearTriad → facets/triad/gear-triad}/resolveGearTriadItems.ts +23 -24
- package/utils/facets/triad/hexagon-triad/context.ts +25 -0
- package/utils/{hexTriad/createHexTriadGeometry.ts → facets/triad/hexagon-triad/createHexagonTriadGeometry.ts} +11 -27
- package/utils/facets/triad/hexagon-triad/index.ts +3 -0
- package/utils/facets/triad/hexagon-triad/resolveHexagonTriadItems.ts +60 -0
- package/utils/{shiftingHeading → layouts/shifting-heading}/collectShiftingIntroNodes.ts +1 -0
- package/utils/layouts/table-of-contents/calculateTocCenterAlignmentOffset.ts +17 -0
- package/utils/{tableOfContents → layouts/table-of-contents}/calculateTocMarkerPositions.ts +0 -12
- package/utils/{tableOfContents → layouts/table-of-contents}/createTocConnectorPath.ts +11 -5
- package/utils/{mergeUno → merge-uno}/classifyVisual.ts +1 -1
- package/utils/{mergeUno → merge-uno}/collectClassNames.ts +9 -3
- package/utils/process/arc-arrow-process/resolveArcArrowProcessItems.ts +180 -0
- package/utils/pyramid/circular-pyramid/context.ts +1 -4
- package/utils/pyramid/circular-pyramid/createCircularPyramidGeometry.ts +6 -10
- package/utils/pyramid/shared/colors.ts +33 -83
- package/utils/pyramid/shared/constants.ts +3 -2
- package/utils/pyramid/shared/types.ts +0 -5
- package/utils/pyramid/square-pyramid/context.ts +1 -4
- package/utils/pyramid/square-pyramid/createSquarePyramidGeometry.ts +6 -10
- package/utils/useDiagramAutoScale.ts +64 -16
- package/utils/useMergedUnoAttrs.ts +9 -5
- package/components/card/chevron-card/ChevronCardHeading.vue +0 -39
- package/components/card/horiz-card/HorizCardHeading.vue +0 -47
- package/components/card/vert-card/VertCardHeading.vue +0 -68
- package/components/card/vert-card/VertCardTitle.vue +0 -76
- package/components/comparisons/arc-comparison/ArcComparisonContents.vue +0 -17
- package/components/comparisons/arc-comparison/ArcComparisonTitle.vue +0 -29
- package/components/core/arc-orbit/ArcOrbitContents.vue +0 -18
- package/components/core/arc-orbit/ArcOrbitTitle.vue +0 -50
- package/components/facets/tetrad/rect-orbit-tetrad/RectOrbitTetradCenter.vue +0 -53
- package/components/facets/tetrad/rect-orbit-tetrad/RectOrbitTetradContent.vue +0 -39
- package/components/facets/tetrad/rect-orbit-tetrad/RectOrbitTetradHeading.vue +0 -44
- package/components/facets/triad/gear-triad/GearTriadContents.vue +0 -111
- package/components/facets/triad/gear-triad/GearTriadDescription.vue +0 -38
- package/components/facets/triad/hex-triad/HexTriadCenterBadge.vue +0 -51
- package/components/facets/triad/hex-triad/HexTriadContent.vue +0 -20
- package/components/facets/triad/hex-triad/HexTriadHeading.vue +0 -28
- package/components/pyramid/circular-pyramid/CircularPyramidStackTitle.vue +0 -138
- package/components/pyramid/square-pyramid/SquarePyramidStackTitle.vue +0 -134
- package/layouts/core/table-of-contents.vue +0 -30
- package/utils/arcArrowProcess/resolveArcArrowProcessItems.ts +0 -189
- package/utils/arcComparison/resolveArcComparisonItems.ts +0 -102
- package/utils/chevronCard/createChevronCardGeometry.ts +0 -48
- package/utils/chevronCard/index.ts +0 -2
- package/utils/hexTriad/context.ts +0 -25
- package/utils/hexTriad/index.ts +0 -3
- package/utils/hexTriad/resolveHexTriadItems.ts +0 -63
- package/utils/horizCard/context.ts +0 -13
- package/utils/horizCard/index.ts +0 -2
- package/utils/pyramid/index.ts +0 -3
- package/utils/rectOrbitTetrad/context.ts +0 -31
- package/utils/rectOrbitTetrad/index.ts +0 -3
- package/utils/tableComparison/constants.ts +0 -72
- package/utils/tableOfContents/calculateTocCenterAlignmentOffset.ts +0 -11
- package/utils/vertCard/context.ts +0 -18
- package/utils/vertCard/index.ts +0 -2
- package/utils/{arcComparison → comparisons/arc-comparison}/index.ts +0 -0
- package/utils/{tableComparison → comparisons/table-comparison}/index.ts +0 -0
- package/utils/{arcOrbit → core/arc-orbit}/context.ts +0 -0
- package/utils/{arcOrbit → core/arc-orbit}/createArcOrbitGeometry.ts +0 -0
- package/utils/{arcOrbit → core/arc-orbit}/index.ts +0 -0
- package/utils/{arrowTriad → facets/triad/arrow-triad}/context.ts +0 -0
- package/utils/{arrowTriad → facets/triad/arrow-triad}/createArrowTriadGeometry.ts +0 -0
- package/utils/{arrowTriad → facets/triad/arrow-triad}/index.ts +0 -0
- package/utils/{gearTriad → facets/triad/gear-triad}/index.ts +0 -0
- package/utils/{tableOfContents → layouts/table-of-contents}/calculateUniformTocArticleWidth.ts +0 -0
- package/utils/{tableOfContents → layouts/table-of-contents}/createTocArcPath.ts +0 -0
- package/utils/{tableOfContents → layouts/table-of-contents}/index.ts +0 -0
- package/utils/{mergeUno → merge-uno}/classifyLayout.ts +0 -0
- package/utils/{mergeUno → merge-uno}/classifySimple.ts +0 -0
- package/utils/{mergeUno → merge-uno}/classifyTypography.ts +0 -0
- package/utils/{mergeUno → merge-uno}/classifyUtility.ts +0 -0
- package/utils/{mergeUno → merge-uno}/index.ts +0 -0
- package/utils/{mergeUno → merge-uno}/mergeClassValues.ts +0 -0
- package/utils/{mergeUno → merge-uno}/splitVariantScope.ts +1 -1
- package/utils/{mergeUno → merge-uno}/types.ts +0 -0
- package/utils/{arcArrowProcess → process/arc-arrow-process}/context.ts +1 -1
- /package/utils/{arcArrowProcess → process/arc-arrow-process}/createArcArrowProcessGeometry.ts +0 -0
- /package/utils/{arcArrowProcess → process/arc-arrow-process}/index.ts +0 -0
|
@@ -9,24 +9,23 @@ import {
|
|
|
9
9
|
type VNode,
|
|
10
10
|
} from 'vue';
|
|
11
11
|
|
|
12
|
+
import { PYRAMID_DOT_GAP_PX } from '../../../utils/pyramid/shared';
|
|
12
13
|
import {
|
|
13
14
|
DEFAULT_SQUARE_PYRAMID_COLOR,
|
|
14
15
|
DEFAULT_SQUARE_PYRAMID_STACK_COLORS,
|
|
15
16
|
SQUARE_PYRAMID_ROOT_KEY,
|
|
16
17
|
SQUARE_PYRAMID_STACK_KEY,
|
|
17
18
|
} from '../../../utils/pyramid/square-pyramid';
|
|
18
|
-
import
|
|
19
|
-
import SquarePyramidStackTitle from './SquarePyramidStackTitle.vue';
|
|
19
|
+
import { useMergedUnoAttrs } from '../../../utils/useMergedUnoAttrs';
|
|
20
20
|
|
|
21
21
|
defineOptions({
|
|
22
22
|
name: 'SquarePyramidStack',
|
|
23
|
+
inheritAttrs: false,
|
|
23
24
|
});
|
|
24
25
|
|
|
25
26
|
export interface ISquarePyramidStackProps {
|
|
26
27
|
readonly index?: number;
|
|
27
28
|
readonly step?: string | number;
|
|
28
|
-
readonly title?: string;
|
|
29
|
-
readonly content?: string;
|
|
30
29
|
readonly color?: string;
|
|
31
30
|
readonly active?: boolean;
|
|
32
31
|
readonly connectorWidth?: number;
|
|
@@ -35,8 +34,6 @@ export interface ISquarePyramidStackProps {
|
|
|
35
34
|
const props = withDefaults(defineProps<ISquarePyramidStackProps>(), {
|
|
36
35
|
index: undefined,
|
|
37
36
|
step: undefined,
|
|
38
|
-
title: undefined,
|
|
39
|
-
content: undefined,
|
|
40
37
|
color: undefined,
|
|
41
38
|
active: undefined,
|
|
42
39
|
connectorWidth: undefined,
|
|
@@ -55,13 +52,16 @@ interface INamedComponent {
|
|
|
55
52
|
function hasComponentName(type: unknown, targetName: string): boolean {
|
|
56
53
|
if (typeof type === 'object' && type !== null) {
|
|
57
54
|
const comp = type as INamedComponent['type'];
|
|
55
|
+
|
|
58
56
|
return comp?.name === targetName || comp?.displayName === targetName;
|
|
59
57
|
}
|
|
58
|
+
|
|
60
59
|
return false;
|
|
61
60
|
}
|
|
62
61
|
|
|
63
62
|
function flattenVNodes(nodes: VNode[]): VNode[] {
|
|
64
63
|
const result: VNode[] = [];
|
|
64
|
+
|
|
65
65
|
for (const node of nodes) {
|
|
66
66
|
if (node.type === Fragment && Array.isArray(node.children)) {
|
|
67
67
|
result.push(...flattenVNodes(node.children as VNode[]));
|
|
@@ -69,6 +69,7 @@ function flattenVNodes(nodes: VNode[]): VNode[] {
|
|
|
69
69
|
result.push(node);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
+
|
|
72
73
|
return result;
|
|
73
74
|
}
|
|
74
75
|
|
|
@@ -76,19 +77,20 @@ const defaultNodes = computed(() => {
|
|
|
76
77
|
if (!slots.default) {
|
|
77
78
|
return [];
|
|
78
79
|
}
|
|
80
|
+
|
|
79
81
|
return flattenVNodes(slots.default());
|
|
80
82
|
});
|
|
81
83
|
|
|
82
84
|
const slottedTitle = computed(() => {
|
|
83
|
-
return defaultNodes.value.find((node) =>
|
|
84
|
-
hasComponentName(node.type, '
|
|
85
|
-
);
|
|
85
|
+
return defaultNodes.value.find((node) => {
|
|
86
|
+
return hasComponentName(node.type, 'SquarePyramidStackHeading');
|
|
87
|
+
});
|
|
86
88
|
});
|
|
87
89
|
|
|
88
90
|
const slottedContent = computed(() => {
|
|
89
|
-
return defaultNodes.value.find((node) =>
|
|
90
|
-
hasComponentName(node.type, 'SquarePyramidStackContent')
|
|
91
|
-
);
|
|
91
|
+
return defaultNodes.value.find((node) => {
|
|
92
|
+
return hasComponentName(node.type, 'SquarePyramidStackContent');
|
|
93
|
+
});
|
|
92
94
|
});
|
|
93
95
|
|
|
94
96
|
const stackToken = Symbol();
|
|
@@ -107,6 +109,7 @@ const resolvedIndex = computed<number>(() => {
|
|
|
107
109
|
if (props.index !== undefined) {
|
|
108
110
|
return Number(props.index);
|
|
109
111
|
}
|
|
112
|
+
|
|
110
113
|
return registration?.index.value ?? 0;
|
|
111
114
|
});
|
|
112
115
|
|
|
@@ -114,9 +117,11 @@ const isActive = computed<boolean>(() => {
|
|
|
114
117
|
if (props.active !== undefined) {
|
|
115
118
|
return props.active;
|
|
116
119
|
}
|
|
120
|
+
|
|
117
121
|
if (!rootContext) {
|
|
118
122
|
return false;
|
|
119
123
|
}
|
|
124
|
+
|
|
120
125
|
return rootContext.activeIndex.value === resolvedIndex.value;
|
|
121
126
|
});
|
|
122
127
|
|
|
@@ -124,6 +129,7 @@ const resolvedStep = computed(() => {
|
|
|
124
129
|
if (props.step !== undefined) {
|
|
125
130
|
return props.step;
|
|
126
131
|
}
|
|
132
|
+
|
|
127
133
|
return String(resolvedIndex.value + 1).padStart(2, '0');
|
|
128
134
|
});
|
|
129
135
|
|
|
@@ -131,6 +137,7 @@ const layerGeometry = computed(() => {
|
|
|
131
137
|
if (!rootContext) {
|
|
132
138
|
return undefined;
|
|
133
139
|
}
|
|
140
|
+
|
|
134
141
|
return rootContext.geo.value.layers[resolvedIndex.value];
|
|
135
142
|
});
|
|
136
143
|
|
|
@@ -138,7 +145,9 @@ const posY = computed(() => {
|
|
|
138
145
|
if (!layerGeometry.value) {
|
|
139
146
|
return 0;
|
|
140
147
|
}
|
|
148
|
+
|
|
141
149
|
const geo = layerGeometry.value;
|
|
150
|
+
|
|
142
151
|
return (
|
|
143
152
|
geo.slabCenterY ?? Number((geo.cy + (geo.slabHeight ?? 0) / 2).toFixed(2))
|
|
144
153
|
);
|
|
@@ -150,8 +159,10 @@ const leftWidth = computed(() => {
|
|
|
150
159
|
if (layerGeometry.value) {
|
|
151
160
|
const rx = layerGeometry.value.rx;
|
|
152
161
|
const cx = 465;
|
|
153
|
-
|
|
162
|
+
|
|
163
|
+
return Math.max(180, Math.round(cx - rx - PYRAMID_DOT_GAP_PX));
|
|
154
164
|
}
|
|
165
|
+
|
|
155
166
|
return DOT_POSITION_X;
|
|
156
167
|
});
|
|
157
168
|
|
|
@@ -161,27 +172,29 @@ const rightWingWidth = computed(() => {
|
|
|
161
172
|
if (layerGeometry.value) {
|
|
162
173
|
const rx = layerGeometry.value.rx;
|
|
163
174
|
const cx = 465;
|
|
164
|
-
const dotRightX = cx + rx +
|
|
175
|
+
const dotRightX = cx + rx + PYRAMID_DOT_GAP_PX;
|
|
165
176
|
const containerW = 960;
|
|
177
|
+
|
|
166
178
|
return Math.max(rightWidth.value + 20, Math.round(containerW - dotRightX));
|
|
167
179
|
}
|
|
168
|
-
return rightWidth.value + 40;
|
|
169
|
-
});
|
|
170
180
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
);
|
|
181
|
+
return rightWidth.value + PYRAMID_DOT_GAP_PX;
|
|
182
|
+
});
|
|
174
183
|
|
|
175
184
|
const resolvedColor = computed<string>(() => {
|
|
176
185
|
if (effectiveColor.value) {
|
|
177
186
|
return effectiveColor.value;
|
|
178
187
|
}
|
|
188
|
+
|
|
189
|
+
const stackIndex =
|
|
190
|
+
Math.abs(resolvedIndex.value) % DEFAULT_SQUARE_PYRAMID_STACK_COLORS.length;
|
|
191
|
+
const stackColor =
|
|
192
|
+
DEFAULT_SQUARE_PYRAMID_STACK_COLORS[stackIndex] ??
|
|
193
|
+
DEFAULT_SQUARE_PYRAMID_COLOR;
|
|
194
|
+
|
|
179
195
|
return (
|
|
180
196
|
rootContext?.getLayerColor(resolvedIndex.value) ??
|
|
181
|
-
|
|
182
|
-
Math.abs(resolvedIndex.value) % DEFAULT_SQUARE_PYRAMID_STACK_COLORS.length
|
|
183
|
-
] ??
|
|
184
|
-
DEFAULT_SQUARE_PYRAMID_COLOR
|
|
197
|
+
`var(--alpha-square-pyramid-stack-${stackIndex + 1}-color, ${stackColor})`
|
|
185
198
|
);
|
|
186
199
|
});
|
|
187
200
|
|
|
@@ -207,6 +220,10 @@ const connectorWidth = computed(() => {
|
|
|
207
220
|
return Math.max(20, rightWingWidth.value - rightWidth.value);
|
|
208
221
|
});
|
|
209
222
|
|
|
223
|
+
const stepIndex = computed(() => {
|
|
224
|
+
return resolvedIndex.value;
|
|
225
|
+
});
|
|
226
|
+
|
|
210
227
|
provide(SQUARE_PYRAMID_STACK_KEY, {
|
|
211
228
|
index: resolvedIndex,
|
|
212
229
|
isActive,
|
|
@@ -217,17 +234,23 @@ provide(SQUARE_PYRAMID_STACK_KEY, {
|
|
|
217
234
|
connectorWidth,
|
|
218
235
|
setActive: handleStackClick,
|
|
219
236
|
});
|
|
237
|
+
|
|
238
|
+
const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
239
|
+
'alpha-square-pyramid-stack absolute inset-x-0 pointer-events-none select-none flex items-center justify-between',
|
|
240
|
+
);
|
|
220
241
|
</script>
|
|
221
242
|
|
|
222
243
|
<template>
|
|
223
244
|
<div
|
|
224
|
-
|
|
225
|
-
:class="
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
245
|
+
v-bind="forwardedAttrs()"
|
|
246
|
+
:class="
|
|
247
|
+
className([
|
|
248
|
+
isActive
|
|
249
|
+
? 'alpha-square-pyramid-stack--active'
|
|
250
|
+
: 'alpha-square-pyramid-stack--inactive',
|
|
251
|
+
`alpha-square-pyramid-stack--${resolvedIndex}`,
|
|
252
|
+
])
|
|
253
|
+
"
|
|
231
254
|
:data-index="resolvedIndex"
|
|
232
255
|
:data-active="isActive"
|
|
233
256
|
:style="{
|
|
@@ -236,13 +259,17 @@ provide(SQUARE_PYRAMID_STACK_KEY, {
|
|
|
236
259
|
}"
|
|
237
260
|
>
|
|
238
261
|
<!-- Left Wing: Title Pill (150px) -->
|
|
239
|
-
<
|
|
240
|
-
|
|
262
|
+
<button
|
|
263
|
+
type="button"
|
|
264
|
+
class="alpha-square-pyramid-stack__left shrink-0 flex items-center justify-start pointer-events-auto cursor-pointer bg-transparent border-0 p-0 m-0 appearance-none"
|
|
265
|
+
:disabled="!rootContext?.interactive.value"
|
|
266
|
+
:aria-label="`Select stage ${resolvedStep}`"
|
|
241
267
|
:class="[
|
|
242
268
|
`alpha-square-pyramid-stack__left--${resolvedIndex}`,
|
|
243
269
|
{ 'alpha-square-pyramid-stack--animated': rootContext?.animation.value },
|
|
244
270
|
]"
|
|
245
271
|
:style="{
|
|
272
|
+
'--wing-delay': `calc(var(--alpha-square-pyramid-start-delay, 0ms) + ${460 + stepIndex * 320}ms)`,
|
|
246
273
|
width: `${leftWidth}px`,
|
|
247
274
|
minWidth: `${leftWidth}px`,
|
|
248
275
|
maxWidth: `${leftWidth}px`,
|
|
@@ -251,35 +278,28 @@ provide(SQUARE_PYRAMID_STACK_KEY, {
|
|
|
251
278
|
@click="handleStackClick"
|
|
252
279
|
>
|
|
253
280
|
<component :is="slottedTitle" v-if="slottedTitle" />
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
<!-- Right Wing: Dot + Connector + Content Card (40px from slab) -->
|
|
262
|
-
<div
|
|
263
|
-
class="alpha-square-pyramid-stack__right flex-shrink-0 flex items-center justify-end pointer-events-auto cursor-pointer"
|
|
281
|
+
</button>
|
|
282
|
+
<!-- Right Wing: Dot + Connector + Content Card (10px from slab) -->
|
|
283
|
+
<button
|
|
284
|
+
type="button"
|
|
285
|
+
class="alpha-square-pyramid-stack__right shrink-0 flex items-center justify-end pointer-events-auto cursor-pointer bg-transparent border-0 p-0 m-0 appearance-none"
|
|
286
|
+
:disabled="!rootContext?.interactive.value"
|
|
287
|
+
:aria-label="`Select stage ${resolvedStep}`"
|
|
264
288
|
:class="[
|
|
265
289
|
`alpha-square-pyramid-stack__right--${resolvedIndex}`,
|
|
266
290
|
{ 'alpha-square-pyramid-stack--animated': rootContext?.animation.value },
|
|
267
291
|
]"
|
|
268
292
|
:style="{
|
|
293
|
+
'--wing-delay': `calc(var(--alpha-square-pyramid-start-delay, 0ms) + ${470 + stepIndex * 320}ms)`,
|
|
269
294
|
width: `${rightWingWidth}px`,
|
|
270
295
|
minWidth: `${rightWidth}px`,
|
|
271
296
|
maxWidth: `${rightWingWidth}px`,
|
|
272
|
-
marginRight: rightOffset ? `${rightOffset}px` : undefined,
|
|
273
297
|
opacity: !hasActiveStack || isActive ? 1 : 0.65,
|
|
274
298
|
}"
|
|
275
299
|
@click="handleStackClick"
|
|
276
300
|
>
|
|
277
301
|
<component :is="slottedContent" v-if="slottedContent" />
|
|
278
|
-
|
|
279
|
-
v-else
|
|
280
|
-
:content="props.content || 'Layer details and operational description.'"
|
|
281
|
-
/>
|
|
282
|
-
</div>
|
|
302
|
+
</button>
|
|
283
303
|
</div>
|
|
284
304
|
</template>
|
|
285
305
|
|
|
@@ -291,37 +311,24 @@ provide(SQUARE_PYRAMID_STACK_KEY, {
|
|
|
291
311
|
|
|
292
312
|
.alpha-square-pyramid-stack__left,
|
|
293
313
|
.alpha-square-pyramid-stack__right {
|
|
294
|
-
transition:
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
.alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__left--0 {
|
|
298
|
-
animation: alpha-pyramid-left-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 100ms) both;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__left--1 {
|
|
302
|
-
animation: alpha-pyramid-left-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 180ms) both;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__left--2 {
|
|
306
|
-
animation: alpha-pyramid-left-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 260ms) both;
|
|
314
|
+
transition:
|
|
315
|
+
opacity 0.3s ease,
|
|
316
|
+
transform 0.3s ease;
|
|
307
317
|
}
|
|
308
318
|
|
|
309
|
-
.alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__left
|
|
310
|
-
animation: alpha-pyramid-left-in
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
.alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__left--5 {
|
|
318
|
-
animation: alpha-pyramid-left-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 500ms) both;
|
|
319
|
+
.alpha-square-pyramid-stack--animated .alpha-square-pyramid-stack__left {
|
|
320
|
+
animation: alpha-pyramid-left-in 140ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
321
|
+
var(
|
|
322
|
+
--wing-delay,
|
|
323
|
+
calc(var(--alpha-square-pyramid-start-delay, 0ms) + 460ms)
|
|
324
|
+
)
|
|
325
|
+
both;
|
|
319
326
|
}
|
|
320
327
|
|
|
321
328
|
@keyframes alpha-pyramid-left-in {
|
|
322
329
|
0% {
|
|
323
330
|
opacity: 0;
|
|
324
|
-
transform: translateX(-
|
|
331
|
+
transform: translateX(-10px);
|
|
325
332
|
}
|
|
326
333
|
100% {
|
|
327
334
|
opacity: 1;
|
|
@@ -329,34 +336,19 @@ provide(SQUARE_PYRAMID_STACK_KEY, {
|
|
|
329
336
|
}
|
|
330
337
|
}
|
|
331
338
|
|
|
332
|
-
.alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__right
|
|
333
|
-
animation: alpha-pyramid-right-in
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
.alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__right--2 {
|
|
341
|
-
animation: alpha-pyramid-right-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 280ms) both;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
.alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__right--3 {
|
|
345
|
-
animation: alpha-pyramid-right-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 360ms) both;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
.alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__right--4 {
|
|
349
|
-
animation: alpha-pyramid-right-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 440ms) both;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
.alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__right--5 {
|
|
353
|
-
animation: alpha-pyramid-right-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 520ms) both;
|
|
339
|
+
.alpha-square-pyramid-stack--animated .alpha-square-pyramid-stack__right {
|
|
340
|
+
animation: alpha-pyramid-right-in 140ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
341
|
+
var(
|
|
342
|
+
--wing-delay,
|
|
343
|
+
calc(var(--alpha-square-pyramid-start-delay, 0ms) + 470ms)
|
|
344
|
+
)
|
|
345
|
+
both;
|
|
354
346
|
}
|
|
355
347
|
|
|
356
348
|
@keyframes alpha-pyramid-right-in {
|
|
357
349
|
0% {
|
|
358
350
|
opacity: 0;
|
|
359
|
-
transform: translateX(
|
|
351
|
+
transform: translateX(10px);
|
|
360
352
|
}
|
|
361
353
|
100% {
|
|
362
354
|
opacity: 1;
|
|
@@ -6,19 +6,19 @@ import {
|
|
|
6
6
|
SQUARE_PYRAMID_ROOT_KEY,
|
|
7
7
|
SQUARE_PYRAMID_STACK_KEY,
|
|
8
8
|
} from '../../../utils/pyramid/square-pyramid';
|
|
9
|
+
import { useMergedUnoAttrs } from '../../../utils/useMergedUnoAttrs';
|
|
9
10
|
|
|
10
11
|
defineOptions({
|
|
11
12
|
name: 'SquarePyramidStackContent',
|
|
13
|
+
inheritAttrs: false,
|
|
12
14
|
});
|
|
13
15
|
|
|
14
16
|
export interface ISquarePyramidStackContentProps {
|
|
15
|
-
readonly content?: string;
|
|
16
17
|
readonly color?: string;
|
|
17
18
|
readonly connectorWidth?: number;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
const props = withDefaults(defineProps<ISquarePyramidStackContentProps>(), {
|
|
21
|
-
content: undefined,
|
|
22
22
|
color: undefined,
|
|
23
23
|
connectorWidth: undefined,
|
|
24
24
|
});
|
|
@@ -53,13 +53,23 @@ const isActive = computed(() => {
|
|
|
53
53
|
return stackContext?.isActive.value ?? false;
|
|
54
54
|
});
|
|
55
55
|
|
|
56
|
+
const isAnimated = computed(() => {
|
|
57
|
+
return rootContext?.animation.value ?? false;
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
const stepIndex = computed(() => {
|
|
61
|
+
return stackContext?.index.value ?? 0;
|
|
62
|
+
});
|
|
63
|
+
|
|
56
64
|
const contentWidth = computed(() => rootContext?.contentWidthPx.value ?? 240);
|
|
57
65
|
|
|
58
66
|
const deltaY = computed(() => {
|
|
59
67
|
if (stackContext?.deltaY?.value !== undefined) {
|
|
60
68
|
return stackContext.deltaY.value;
|
|
61
69
|
}
|
|
70
|
+
|
|
62
71
|
const idx = stackContext?.index.value ?? 0;
|
|
72
|
+
|
|
63
73
|
return rootContext?.getCardDeltaY?.(idx) ?? 0;
|
|
64
74
|
});
|
|
65
75
|
|
|
@@ -69,9 +79,11 @@ const connectorWidth = computed(() => {
|
|
|
69
79
|
if (props.connectorWidth !== undefined) {
|
|
70
80
|
return props.connectorWidth;
|
|
71
81
|
}
|
|
82
|
+
|
|
72
83
|
if (stackContext?.connectorWidth?.value !== undefined) {
|
|
73
84
|
return stackContext.connectorWidth.value;
|
|
74
85
|
}
|
|
86
|
+
|
|
75
87
|
return measuredConnectorWidth.value || 40;
|
|
76
88
|
});
|
|
77
89
|
|
|
@@ -90,9 +102,16 @@ const svgTop = computed(() => {
|
|
|
90
102
|
|
|
91
103
|
const connectorPath = computed(() => {
|
|
92
104
|
const w = connectorWidth.value;
|
|
105
|
+
|
|
93
106
|
return createPyramidConnectorPath(
|
|
94
|
-
{
|
|
95
|
-
|
|
107
|
+
{
|
|
108
|
+
x: 0,
|
|
109
|
+
y: 0,
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
x: w,
|
|
113
|
+
y: effectiveDeltaY.value,
|
|
114
|
+
},
|
|
96
115
|
);
|
|
97
116
|
});
|
|
98
117
|
|
|
@@ -101,31 +120,49 @@ const stackColor = computed(() => {
|
|
|
101
120
|
props.color ??
|
|
102
121
|
stackContext?.color?.value ??
|
|
103
122
|
rootContext?.color.value ??
|
|
104
|
-
'
|
|
123
|
+
'var(--alpha-square-pyramid-stack-content-accent)'
|
|
105
124
|
);
|
|
106
125
|
});
|
|
126
|
+
|
|
127
|
+
const { className, forwardedAttrs } = useMergedUnoAttrs(() => [
|
|
128
|
+
'alpha-square-pyramid-stack-content rounded-xl p-2 px-2.5 text-[10px] leading-snug transition-all duration-300 border select-none box-border shrink-0',
|
|
129
|
+
isActive.value
|
|
130
|
+
? 'alpha-square-pyramid-stack-content--active bg-(--alpha-square-pyramid-stack-content-border-active) text-(--alpha-square-pyramid-stack-content-active)'
|
|
131
|
+
: 'alpha-square-pyramid-stack-content--default bg-(--alpha-square-pyramid-stack-content-border) text-(--alpha-square-pyramid-stack-content)',
|
|
132
|
+
]);
|
|
107
133
|
</script>
|
|
108
134
|
|
|
109
135
|
<template>
|
|
110
|
-
<div
|
|
136
|
+
<div
|
|
137
|
+
class="alpha-square-pyramid-stack-content-wrapper relative w-full flex items-center select-none overflow-visible"
|
|
138
|
+
:style="{
|
|
139
|
+
'--content-delay': `calc(var(--alpha-square-pyramid-start-delay, 0ms) + ${470 + stepIndex * 320}ms)`,
|
|
140
|
+
}"
|
|
141
|
+
>
|
|
111
142
|
<!-- Scalable Line between Dot and Content Card (always at least 20px) -->
|
|
112
143
|
<div
|
|
113
144
|
ref="connectorRef"
|
|
114
|
-
class="alpha-square-pyramid-stack-content__connector flex-1 flex items-center min-w-
|
|
145
|
+
class="alpha-square-pyramid-stack-content__connector flex-1 flex items-center min-w-5 pointer-events-none relative overflow-visible h-0"
|
|
115
146
|
>
|
|
116
147
|
<div
|
|
117
|
-
class="alpha-square-pyramid-stack-content__dot absolute left-0 top-0 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 rounded-full
|
|
148
|
+
class="alpha-square-pyramid-stack-content__dot absolute left-0 top-0 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 rounded-full shrink-0 transition-all duration-300 pointer-events-auto"
|
|
149
|
+
:class="{
|
|
150
|
+
'alpha-square-pyramid-stack-content__dot--animated': isAnimated,
|
|
151
|
+
}"
|
|
118
152
|
:style="{
|
|
119
153
|
backgroundColor: stackColor,
|
|
120
154
|
boxShadow: isActive
|
|
121
155
|
? `0 0 6px ${stackColor}`
|
|
122
|
-
: `0 0 2px ${stackColor}
|
|
156
|
+
: `0 0 2px color-mix(in srgb, ${stackColor} 50%, transparent)`,
|
|
123
157
|
}"
|
|
124
158
|
/>
|
|
125
159
|
<!-- Straight horizontal line when deltaY is 0 -->
|
|
126
160
|
<div
|
|
127
161
|
v-if="!effectiveDeltaY"
|
|
128
|
-
class="alpha-square-pyramid-stack-content__line absolute left-0 top-0 w-full h-
|
|
162
|
+
class="alpha-square-pyramid-stack-content__line absolute left-0 top-0 w-full h-px -translate-y-1/2 pointer-events-none transition-colors duration-300"
|
|
163
|
+
:class="{
|
|
164
|
+
'alpha-square-pyramid-stack-content__line--animated': isAnimated,
|
|
165
|
+
}"
|
|
129
166
|
:style="{
|
|
130
167
|
backgroundColor: stackColor,
|
|
131
168
|
opacity: isActive ? 1 : 0.65,
|
|
@@ -133,6 +170,7 @@ const stackColor = computed(() => {
|
|
|
133
170
|
/>
|
|
134
171
|
<!-- Zigzag SVG connector when deltaY !== 0 -->
|
|
135
172
|
<svg
|
|
173
|
+
aria-hidden="true"
|
|
136
174
|
v-else
|
|
137
175
|
class="alpha-square-pyramid-stack-content__line-svg absolute left-0 pointer-events-none overflow-visible"
|
|
138
176
|
:width="connectorWidth"
|
|
@@ -146,12 +184,16 @@ const stackColor = computed(() => {
|
|
|
146
184
|
>
|
|
147
185
|
<path
|
|
148
186
|
class="alpha-square-pyramid-stack-content__line transition-all duration-300"
|
|
187
|
+
:class="{
|
|
188
|
+
'alpha-square-pyramid-stack-content__line--svg-animated': isAnimated,
|
|
189
|
+
}"
|
|
149
190
|
:d="connectorPath"
|
|
150
191
|
fill="none"
|
|
151
192
|
:stroke="stackColor"
|
|
152
193
|
stroke-width="1.25"
|
|
153
194
|
stroke-linecap="round"
|
|
154
195
|
stroke-linejoin="round"
|
|
196
|
+
pathLength="1"
|
|
155
197
|
:style="{
|
|
156
198
|
opacity: isActive ? 1 : 0.65,
|
|
157
199
|
}"
|
|
@@ -160,35 +202,30 @@ const stackColor = computed(() => {
|
|
|
160
202
|
</div>
|
|
161
203
|
<!-- Content Card -->
|
|
162
204
|
<div
|
|
163
|
-
|
|
164
|
-
:class="
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
205
|
+
v-bind="forwardedAttrs()"
|
|
206
|
+
:class="
|
|
207
|
+
className({
|
|
208
|
+
'alpha-square-pyramid-stack-content--animated': isAnimated,
|
|
209
|
+
})
|
|
210
|
+
"
|
|
169
211
|
:style="{
|
|
170
212
|
width: `${contentWidth}px`,
|
|
171
213
|
minWidth: `${contentWidth}px`,
|
|
172
214
|
maxWidth: `${contentWidth}px`,
|
|
173
215
|
boxSizing: 'border-box',
|
|
174
216
|
borderColor: stackColor,
|
|
175
|
-
backgroundColor: isActive
|
|
176
|
-
? 'rgba(255, 255, 255, 0.95)'
|
|
177
|
-
: 'rgba(255, 255, 255, 0.85)',
|
|
178
217
|
boxShadow: isActive
|
|
179
|
-
? `0 4px 14px ${stackColor}
|
|
218
|
+
? `0 4px 14px color-mix(in srgb, ${stackColor} 15%, transparent)`
|
|
180
219
|
: 'none',
|
|
220
|
+
'--card-transform': deltaY ? `translateY(${deltaY}px)` : 'none',
|
|
181
221
|
transform: deltaY ? `translateY(${deltaY}px)` : undefined,
|
|
182
222
|
}"
|
|
183
223
|
>
|
|
184
|
-
<
|
|
185
|
-
class="text-[10px]
|
|
186
|
-
:style="{
|
|
187
|
-
color: isActive ? '#0f172a' : '#475569',
|
|
188
|
-
}"
|
|
224
|
+
<p
|
|
225
|
+
class="text-[10px] transition-colors duration-300 wrap-break-word line-clamp-3"
|
|
189
226
|
>
|
|
190
|
-
<slot
|
|
191
|
-
</
|
|
227
|
+
<slot />
|
|
228
|
+
</p>
|
|
192
229
|
</div>
|
|
193
230
|
</div>
|
|
194
231
|
</template>
|
|
@@ -201,4 +238,78 @@ const stackColor = computed(() => {
|
|
|
201
238
|
.alpha-square-pyramid-stack-content--active {
|
|
202
239
|
backdrop-filter: blur(8px);
|
|
203
240
|
}
|
|
241
|
+
|
|
242
|
+
.alpha-square-pyramid-stack-content__dot--animated {
|
|
243
|
+
animation: alpha-pyramid-dot-pop 120ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
244
|
+
var(--content-delay) both;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@keyframes alpha-pyramid-dot-pop {
|
|
248
|
+
0% {
|
|
249
|
+
opacity: 0;
|
|
250
|
+
transform: translate(-50%, -50%) scale(0);
|
|
251
|
+
}
|
|
252
|
+
100% {
|
|
253
|
+
opacity: 1;
|
|
254
|
+
transform: translate(-50%, -50%) scale(1);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.alpha-square-pyramid-stack-content__line--animated {
|
|
259
|
+
transform-origin: left center;
|
|
260
|
+
animation: alpha-pyramid-line-draw 500ms cubic-bezier(0.4, 0, 0.2, 1)
|
|
261
|
+
calc(var(--content-delay) + 120ms) both;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
@keyframes alpha-pyramid-line-draw {
|
|
265
|
+
0% {
|
|
266
|
+
opacity: 0;
|
|
267
|
+
transform: translateY(-50%) scaleX(0);
|
|
268
|
+
}
|
|
269
|
+
2% {
|
|
270
|
+
opacity: 1;
|
|
271
|
+
transform: translateY(-50%) scaleX(0);
|
|
272
|
+
}
|
|
273
|
+
100% {
|
|
274
|
+
opacity: 1;
|
|
275
|
+
transform: translateY(-50%) scaleX(1);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.alpha-square-pyramid-stack-content__line--svg-animated {
|
|
280
|
+
stroke-dasharray: 1;
|
|
281
|
+
animation: alpha-pyramid-svg-line-draw 500ms cubic-bezier(0.4, 0, 0.2, 1)
|
|
282
|
+
calc(var(--content-delay) + 120ms) both;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@keyframes alpha-pyramid-svg-line-draw {
|
|
286
|
+
0% {
|
|
287
|
+
opacity: 0;
|
|
288
|
+
stroke-dashoffset: 1;
|
|
289
|
+
}
|
|
290
|
+
2% {
|
|
291
|
+
opacity: 1;
|
|
292
|
+
stroke-dashoffset: 1;
|
|
293
|
+
}
|
|
294
|
+
100% {
|
|
295
|
+
opacity: 1;
|
|
296
|
+
stroke-dashoffset: 0;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.alpha-square-pyramid-stack-content--animated {
|
|
301
|
+
animation: alpha-pyramid-card-in 240ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
302
|
+
calc(var(--content-delay) + 380ms) both;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
@keyframes alpha-pyramid-card-in {
|
|
306
|
+
0% {
|
|
307
|
+
opacity: 0;
|
|
308
|
+
transform: var(--card-transform, none) translateX(10px);
|
|
309
|
+
}
|
|
310
|
+
100% {
|
|
311
|
+
opacity: 1;
|
|
312
|
+
transform: var(--card-transform, none) translateX(0);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
204
315
|
</style>
|