@alphacifer/slidev-addon-theme 0.0.10 → 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-did/ArcDiD.vue → arc-defense-in-depth/ArcDefenseInDepth.vue} +167 -97
- package/components/defense-in-depth/arc-defense-in-depth/ArcDefenseInDepthLayer.vue +240 -0
- package/components/defense-in-depth/{arc-did/ArcDiDLayerTitle.vue → arc-defense-in-depth/ArcDefenseInDepthLayerHeading.vue} +27 -29
- package/components/defense-in-depth/{arc-did/ArcDiDLayerPart.vue → arc-defense-in-depth/ArcDefenseInDepthLayerPart.vue} +91 -39
- package/components/defense-in-depth/{arc-did/ArcDiDLayerSector.vue → arc-defense-in-depth/ArcDefenseInDepthLayerSector.vue} +37 -23
- 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 +269 -170
- package/components/pyramid/circular-pyramid/CircularPyramidStack.vue +70 -52
- package/components/pyramid/circular-pyramid/CircularPyramidStackContent.vue +47 -37
- package/components/pyramid/circular-pyramid/{CircularPyramidStackTitle.vue → CircularPyramidStackHeading.vue} +49 -45
- package/components/pyramid/circular-pyramid/style.css +26 -0
- package/components/pyramid/square-pyramid/SquarePyramid.vue +191 -62
- package/components/pyramid/square-pyramid/SquarePyramidStack.vue +74 -49
- package/components/pyramid/square-pyramid/SquarePyramidStackContent.vue +47 -33
- package/components/pyramid/square-pyramid/{SquarePyramidStackTitle.vue → SquarePyramidStackHeading.vue} +49 -41
- 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/{defenseInDepth/arcDid → defense-in-depth/arc-defense-in-depth}/context.ts +34 -31
- package/utils/{defenseInDepth/arcDid/createArcDiDGeometry.ts → defense-in-depth/arc-defense-in-depth/createArcDefenseInDepthGeometry.ts} +69 -39
- package/utils/{defenseInDepth/arcDid → defense-in-depth/arc-defense-in-depth}/types.ts +39 -35
- package/utils/defense-in-depth/shared/colors.ts +51 -0
- package/utils/defense-in-depth/shared/constants.ts +22 -0
- package/utils/{defenseInDepth → defense-in-depth}/shared/types.ts +0 -5
- 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 +2 -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 +8 -6
- 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/defense-in-depth/arc-did/ArcDiDLayer.vue +0 -321
- package/components/defense-in-depth/arc-did/ArcDiDLayerParts.vue +0 -11
- 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/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/defenseInDepth/arcDid/index.ts +0 -3
- package/utils/defenseInDepth/index.ts +0 -2
- package/utils/defenseInDepth/shared/colors.ts +0 -121
- package/utils/defenseInDepth/shared/constants.ts +0 -14
- package/utils/defenseInDepth/shared/index.ts +0 -3
- 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
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed } from 'vue';
|
|
3
3
|
|
|
4
|
-
import type {
|
|
4
|
+
import type { TRectangleOrbitTetradIcon } from '../../../../utils/facets/tetrad/rectangle-orbit-tetrad';
|
|
5
|
+
import { useMergedUnoAttrs } from '../../../../utils/useMergedUnoAttrs';
|
|
5
6
|
|
|
6
7
|
defineOptions({
|
|
7
|
-
|
|
8
|
+
inheritAttrs: false,
|
|
9
|
+
name: 'RectangleOrbitTetradIcon',
|
|
8
10
|
});
|
|
9
11
|
|
|
10
|
-
export interface
|
|
12
|
+
export interface IRectangleOrbitTetradIconProps {
|
|
11
13
|
readonly size?: number;
|
|
12
14
|
readonly color?: string;
|
|
13
|
-
readonly icon?:
|
|
15
|
+
readonly icon?: TRectangleOrbitTetradIcon;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
const props = withDefaults(defineProps<
|
|
18
|
+
const props = withDefaults(defineProps<IRectangleOrbitTetradIconProps>(), {
|
|
17
19
|
size: 34,
|
|
18
20
|
icon: undefined,
|
|
19
|
-
color:
|
|
21
|
+
color: undefined,
|
|
20
22
|
});
|
|
21
23
|
|
|
22
24
|
const isStringIcon = computed((): boolean => {
|
|
@@ -26,33 +28,37 @@ const isStringIcon = computed((): boolean => {
|
|
|
26
28
|
const isComponentIcon = computed((): boolean => {
|
|
27
29
|
return typeof props.icon === 'object' && props.icon !== null;
|
|
28
30
|
});
|
|
31
|
+
|
|
32
|
+
const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
33
|
+
'alpha-rectangle-orbit-tetrad-icon flex items-center justify-center text-(--alpha-rectangle-orbit-tetrad-icon) opacity-82 pointer-events-none select-none',
|
|
34
|
+
);
|
|
29
35
|
</script>
|
|
30
36
|
|
|
31
37
|
<template>
|
|
32
38
|
<div
|
|
33
39
|
v-if="props.icon !== false"
|
|
34
|
-
|
|
40
|
+
v-bind="forwardedAttrs()"
|
|
41
|
+
:class="className()"
|
|
35
42
|
:style="{
|
|
36
|
-
color: props.color,
|
|
37
43
|
width: `${props.size}px`,
|
|
38
44
|
height: `${props.size}px`,
|
|
39
|
-
|
|
45
|
+
...(props.color
|
|
46
|
+
? { '--alpha-rectangle-orbit-tetrad-icon': props.color }
|
|
47
|
+
: {}),
|
|
40
48
|
}"
|
|
41
49
|
>
|
|
42
50
|
<slot>
|
|
43
51
|
<component
|
|
44
52
|
:is="props.icon"
|
|
45
53
|
v-if="isComponentIcon"
|
|
46
|
-
class="w-full h-full"
|
|
47
|
-
:style="{ color: props.color }"
|
|
54
|
+
class="w-full h-full text-current"
|
|
48
55
|
/>
|
|
49
56
|
<!-- UnoCSS / Iconify class name (e.g. i-lucide-user) -->
|
|
50
57
|
<span
|
|
51
58
|
v-else-if="isStringIcon && (props.icon as string).includes('-')"
|
|
52
59
|
:class="props.icon"
|
|
53
|
-
class="inline-block"
|
|
60
|
+
class="inline-block text-current"
|
|
54
61
|
:style="{
|
|
55
|
-
color: props.color,
|
|
56
62
|
width: `${props.size}px`,
|
|
57
63
|
height: `${props.size}px`,
|
|
58
64
|
fontSize: `${props.size}px`,
|
|
@@ -60,6 +66,7 @@ const isComponentIcon = computed((): boolean => {
|
|
|
60
66
|
/>
|
|
61
67
|
<!-- 01 User Silhouette (matching design) -->
|
|
62
68
|
<svg
|
|
69
|
+
aria-hidden="true"
|
|
63
70
|
v-else-if="props.icon === 'user'"
|
|
64
71
|
viewBox="0 0 24 24"
|
|
65
72
|
fill="currentColor"
|
|
@@ -70,6 +77,7 @@ const isComponentIcon = computed((): boolean => {
|
|
|
70
77
|
</svg>
|
|
71
78
|
<!-- 02 Academic / Mortarboard (matching design) -->
|
|
72
79
|
<svg
|
|
80
|
+
aria-hidden="true"
|
|
73
81
|
v-else-if="props.icon === 'academic' || props.icon === 'grad'"
|
|
74
82
|
viewBox="0 0 24 24"
|
|
75
83
|
fill="currentColor"
|
|
@@ -81,6 +89,7 @@ const isComponentIcon = computed((): boolean => {
|
|
|
81
89
|
</svg>
|
|
82
90
|
<!-- 03 Briefcase (matching design) -->
|
|
83
91
|
<svg
|
|
92
|
+
aria-hidden="true"
|
|
84
93
|
v-else-if="props.icon === 'briefcase' || props.icon === 'portfolio'"
|
|
85
94
|
viewBox="0 0 24 24"
|
|
86
95
|
fill="currentColor"
|
|
@@ -92,6 +101,7 @@ const isComponentIcon = computed((): boolean => {
|
|
|
92
101
|
</svg>
|
|
93
102
|
<!-- 04 Target / Bullseye with Dart (matching design) -->
|
|
94
103
|
<svg
|
|
104
|
+
aria-hidden="true"
|
|
95
105
|
v-else-if="props.icon === 'target' || props.icon === 'bullseye'"
|
|
96
106
|
viewBox="0 0 24 24"
|
|
97
107
|
fill="none"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* Color defaults shared by this component family. */
|
|
2
|
+
@layer alpha-theme-tokens {
|
|
3
|
+
:root {
|
|
4
|
+
--alpha-rectangle-orbit-tetrad-center: #2c3e50;
|
|
5
|
+
--alpha-rectangle-orbit-tetrad-center-bg: #ffffff;
|
|
6
|
+
--alpha-rectangle-orbit-tetrad-center-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
|
|
7
|
+
--alpha-rectangle-orbit-tetrad-title: var(--alpha-foreground-primary, #1e293b);
|
|
8
|
+
--alpha-rectangle-orbit-tetrad-center-content: var(--alpha-foreground-primary, #94a3b8);
|
|
9
|
+
--alpha-rectangle-orbit-tetrad-connector: #ffffff;
|
|
10
|
+
--alpha-rectangle-orbit-tetrad-content: var(--alpha-foreground-primary, #555555);
|
|
11
|
+
--alpha-rectangle-orbit-tetrad-icon: #ffffff;
|
|
12
|
+
--alpha-rectangle-orbit-tetrad-item-1-color: #f29e4b;
|
|
13
|
+
--alpha-rectangle-orbit-tetrad-item-2-color: #a4cb81;
|
|
14
|
+
--alpha-rectangle-orbit-tetrad-item-3-color: #62b6a8;
|
|
15
|
+
--alpha-rectangle-orbit-tetrad-item-4-color: #e9717a;
|
|
16
|
+
--alpha-rectangle-orbit-tetrad-card-bg: color-mix(
|
|
17
|
+
in srgb,
|
|
18
|
+
var(--alpha-rectangle-orbit-tetrad-item-1-color) 18%,
|
|
19
|
+
#ffffff
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -6,20 +6,17 @@ import {
|
|
|
6
6
|
onBeforeUpdate,
|
|
7
7
|
provide,
|
|
8
8
|
ref,
|
|
9
|
-
useSlots,
|
|
10
9
|
} from 'vue';
|
|
11
10
|
|
|
12
11
|
import {
|
|
13
12
|
ARROW_TRIAD_ROOT_KEY,
|
|
14
13
|
createArrowTriadGeometry,
|
|
15
14
|
getDefaultArrowTriadItem,
|
|
16
|
-
type IArrowTriadItem,
|
|
17
15
|
resolveArrowTriadItems,
|
|
18
16
|
type TArrowTriadLayout,
|
|
19
|
-
} from '../../../../utils/
|
|
17
|
+
} from '../../../../utils/facets/triad/arrow-triad';
|
|
20
18
|
import { useDiagramAutoScale } from '../../../../utils/useDiagramAutoScale';
|
|
21
19
|
import { useMergedUnoAttrs } from '../../../../utils/useMergedUnoAttrs';
|
|
22
|
-
import ArrowTriadCallout from './ArrowTriadCallout.vue';
|
|
23
20
|
|
|
24
21
|
defineOptions({
|
|
25
22
|
name: 'ArrowTriad',
|
|
@@ -27,7 +24,6 @@ defineOptions({
|
|
|
27
24
|
});
|
|
28
25
|
|
|
29
26
|
export interface IArrowTriadProps {
|
|
30
|
-
readonly items?: readonly IArrowTriadItem[];
|
|
31
27
|
readonly animation?: boolean;
|
|
32
28
|
readonly height?: number | string;
|
|
33
29
|
readonly startDelay?: number;
|
|
@@ -43,7 +39,6 @@ export interface IArrowTriadProps {
|
|
|
43
39
|
}
|
|
44
40
|
|
|
45
41
|
const props = withDefaults(defineProps<IArrowTriadProps>(), {
|
|
46
|
-
items: undefined,
|
|
47
42
|
animation: true,
|
|
48
43
|
height: undefined,
|
|
49
44
|
startDelay: undefined,
|
|
@@ -58,8 +53,6 @@ const props = withDefaults(defineProps<IArrowTriadProps>(), {
|
|
|
58
53
|
offsetX: undefined,
|
|
59
54
|
});
|
|
60
55
|
|
|
61
|
-
const slots = useSlots();
|
|
62
|
-
|
|
63
56
|
const shiftingIntro = inject<
|
|
64
57
|
| {
|
|
65
58
|
active: ComputedRef<boolean>;
|
|
@@ -97,7 +90,7 @@ const resolvedStartDelay = computed(() => {
|
|
|
97
90
|
});
|
|
98
91
|
|
|
99
92
|
const resolvedItems = computed(() => {
|
|
100
|
-
return resolveArrowTriadItems(
|
|
93
|
+
return resolveArrowTriadItems();
|
|
101
94
|
});
|
|
102
95
|
|
|
103
96
|
let calloutCounter = 0;
|
|
@@ -197,14 +190,12 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
197
190
|
:data-hide-pagy="props.hidePagy ? '' : undefined"
|
|
198
191
|
:style="{
|
|
199
192
|
height: resolvedHeightStyle,
|
|
200
|
-
|
|
201
|
-
'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif',
|
|
202
|
-
'--arrow-triad-start-delay': `${resolvedStartDelay}ms`,
|
|
193
|
+
'--alpha-arrow-triad-start-delay': `${resolvedStartDelay}ms`,
|
|
203
194
|
}"
|
|
204
195
|
>
|
|
205
196
|
<!-- Relative stage container -->
|
|
206
197
|
<div
|
|
207
|
-
class="alpha-arrow-triad__stage relative w-full h-full min-h-
|
|
198
|
+
class="alpha-arrow-triad__stage relative w-full h-full min-h-87.5 max-w-225 flex items-center justify-center overflow-visible"
|
|
208
199
|
:style="{
|
|
209
200
|
transform: stageTransform,
|
|
210
201
|
transformOrigin: 'center center',
|
|
@@ -212,138 +203,137 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
212
203
|
>
|
|
213
204
|
<!-- Central SVG graphic: 3 curved arrows + concentric dashed arcs -->
|
|
214
205
|
<div
|
|
215
|
-
class="alpha-arrow-triad__center absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[320px] h-
|
|
206
|
+
class="alpha-arrow-triad__center absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[320px] h-90.5 pointer-events-none"
|
|
216
207
|
>
|
|
217
208
|
<svg
|
|
209
|
+
aria-hidden="true"
|
|
218
210
|
class="w-full h-full overflow-visible"
|
|
219
211
|
:viewBox="`0 0 ${geo.viewBoxWidth} ${geo.viewBoxHeight}`"
|
|
220
212
|
xmlns="http://www.w3.org/2000/svg"
|
|
221
213
|
>
|
|
222
|
-
<g
|
|
214
|
+
<g
|
|
215
|
+
:transform="is2Left ? `translate(${geo.viewBoxWidth}, 0) scale(-1, 1)` : undefined"
|
|
216
|
+
>
|
|
223
217
|
<!-- Dashed Guide Arcs -->
|
|
224
218
|
<g
|
|
225
219
|
class="alpha-arrow-triad__dashed"
|
|
226
220
|
:class="{ 'alpha-arrow-triad--animated': isAnimated }"
|
|
227
221
|
fill="none"
|
|
228
|
-
stroke="
|
|
222
|
+
stroke="var(--alpha-arrow-triad-connector-stroke)"
|
|
229
223
|
stroke-width="1.8"
|
|
230
224
|
stroke-dasharray="4 4"
|
|
231
225
|
opacity="0.8"
|
|
232
226
|
>
|
|
227
|
+
<path v-for="(d, idx) in geo.dashedArcs" :key="idx" :d="d" />
|
|
228
|
+
</g>
|
|
229
|
+
<!-- Arrow 0: Yellow Arrow (Top-Right) -->
|
|
230
|
+
<g
|
|
231
|
+
class="alpha-arrow-triad__branch alpha-arrow-triad__branch--yellow"
|
|
232
|
+
:class="{ 'alpha-arrow-triad--animated': isAnimated }"
|
|
233
|
+
>
|
|
234
|
+
<path
|
|
235
|
+
:d="props.triangleHead ? geo.yellowArrow.stemPath : geo.yellowArrow.path"
|
|
236
|
+
:fill="resolvedItems[0].color"
|
|
237
|
+
/>
|
|
238
|
+
<polygon
|
|
239
|
+
v-if="props.triangleHead"
|
|
240
|
+
:points="geo.yellowArrow.outerHeadPoints"
|
|
241
|
+
:fill="resolvedItems[0].color"
|
|
242
|
+
:stroke="resolvedItems[0].depthColor"
|
|
243
|
+
stroke-width="4"
|
|
244
|
+
stroke-linejoin="round"
|
|
245
|
+
/>
|
|
233
246
|
<path
|
|
234
|
-
v-
|
|
235
|
-
:
|
|
236
|
-
|
|
247
|
+
v-else-if="props.neckLine"
|
|
248
|
+
:d="geo.yellowArrow.neckLine"
|
|
249
|
+
fill="none"
|
|
250
|
+
:stroke="resolvedItems[0].depthColor"
|
|
251
|
+
stroke-width="4"
|
|
252
|
+
stroke-linecap="round"
|
|
253
|
+
/>
|
|
254
|
+
</g>
|
|
255
|
+
<!-- Arrow 1: Green Arrow (Bottom-Right) -->
|
|
256
|
+
<g
|
|
257
|
+
class="alpha-arrow-triad__branch alpha-arrow-triad__branch--green"
|
|
258
|
+
:class="{ 'alpha-arrow-triad--animated': isAnimated }"
|
|
259
|
+
>
|
|
260
|
+
<path
|
|
261
|
+
:d="props.triangleHead ? geo.greenArrow.stemPath : geo.greenArrow.path"
|
|
262
|
+
:fill="resolvedItems[1].color"
|
|
263
|
+
/>
|
|
264
|
+
<polygon
|
|
265
|
+
v-if="props.triangleHead"
|
|
266
|
+
:points="geo.greenArrow.outerHeadPoints"
|
|
267
|
+
:fill="resolvedItems[1].color"
|
|
268
|
+
:stroke="resolvedItems[1].depthColor"
|
|
269
|
+
stroke-width="4"
|
|
270
|
+
stroke-linejoin="round"
|
|
271
|
+
/>
|
|
272
|
+
<path
|
|
273
|
+
v-else-if="props.neckLine"
|
|
274
|
+
:d="geo.greenArrow.neckLine"
|
|
275
|
+
fill="none"
|
|
276
|
+
:stroke="resolvedItems[1].depthColor"
|
|
277
|
+
stroke-width="4"
|
|
278
|
+
stroke-linecap="round"
|
|
279
|
+
/>
|
|
280
|
+
</g>
|
|
281
|
+
<!-- Arrow 2: Blue Arrow (Left) -->
|
|
282
|
+
<g
|
|
283
|
+
class="alpha-arrow-triad__branch alpha-arrow-triad__branch--blue"
|
|
284
|
+
:class="{ 'alpha-arrow-triad--animated': isAnimated }"
|
|
285
|
+
>
|
|
286
|
+
<path
|
|
287
|
+
:d="props.triangleHead ? geo.blueArrow.stemPath : geo.blueArrow.path"
|
|
288
|
+
:fill="resolvedItems[2].color"
|
|
289
|
+
/>
|
|
290
|
+
<polygon
|
|
291
|
+
v-if="props.triangleHead"
|
|
292
|
+
:points="geo.blueArrow.outerHeadPoints"
|
|
293
|
+
:fill="resolvedItems[2].color"
|
|
294
|
+
:stroke="resolvedItems[2].depthColor"
|
|
295
|
+
stroke-width="4"
|
|
296
|
+
stroke-linejoin="round"
|
|
297
|
+
/>
|
|
298
|
+
<path
|
|
299
|
+
v-else-if="props.neckLine"
|
|
300
|
+
:d="geo.blueArrow.neckLine"
|
|
301
|
+
fill="none"
|
|
302
|
+
:stroke="resolvedItems[2].depthColor"
|
|
303
|
+
stroke-width="4"
|
|
304
|
+
stroke-linecap="round"
|
|
237
305
|
/>
|
|
238
306
|
</g>
|
|
239
|
-
<!-- Arrow 0: Yellow Arrow (Top-Right) -->
|
|
240
|
-
<g
|
|
241
|
-
class="alpha-arrow-triad__branch alpha-arrow-triad__branch--yellow"
|
|
242
|
-
:class="{ 'alpha-arrow-triad--animated': isAnimated }"
|
|
243
|
-
>
|
|
244
|
-
<path
|
|
245
|
-
:d="props.triangleHead ? geo.yellowArrow.stemPath : geo.yellowArrow.path"
|
|
246
|
-
:fill="resolvedItems[0].color"
|
|
247
|
-
/>
|
|
248
|
-
<polygon
|
|
249
|
-
v-if="props.triangleHead"
|
|
250
|
-
:points="geo.yellowArrow.outerHeadPoints"
|
|
251
|
-
:fill="resolvedItems[0].color"
|
|
252
|
-
:stroke="resolvedItems[0].depthColor"
|
|
253
|
-
stroke-width="4"
|
|
254
|
-
stroke-linejoin="round"
|
|
255
|
-
/>
|
|
256
|
-
<path
|
|
257
|
-
v-else-if="props.neckLine"
|
|
258
|
-
:d="geo.yellowArrow.neckLine"
|
|
259
|
-
fill="none"
|
|
260
|
-
:stroke="resolvedItems[0].depthColor"
|
|
261
|
-
stroke-width="4"
|
|
262
|
-
stroke-linecap="round"
|
|
263
|
-
/>
|
|
264
|
-
</g>
|
|
265
|
-
<!-- Arrow 1: Green Arrow (Bottom-Right) -->
|
|
266
|
-
<g
|
|
267
|
-
class="alpha-arrow-triad__branch alpha-arrow-triad__branch--green"
|
|
268
|
-
:class="{ 'alpha-arrow-triad--animated': isAnimated }"
|
|
269
|
-
>
|
|
270
|
-
<path
|
|
271
|
-
:d="props.triangleHead ? geo.greenArrow.stemPath : geo.greenArrow.path"
|
|
272
|
-
:fill="resolvedItems[1].color"
|
|
273
|
-
/>
|
|
274
|
-
<polygon
|
|
275
|
-
v-if="props.triangleHead"
|
|
276
|
-
:points="geo.greenArrow.outerHeadPoints"
|
|
277
|
-
:fill="resolvedItems[1].color"
|
|
278
|
-
:stroke="resolvedItems[1].depthColor"
|
|
279
|
-
stroke-width="4"
|
|
280
|
-
stroke-linejoin="round"
|
|
281
|
-
/>
|
|
282
|
-
<path
|
|
283
|
-
v-else-if="props.neckLine"
|
|
284
|
-
:d="geo.greenArrow.neckLine"
|
|
285
|
-
fill="none"
|
|
286
|
-
:stroke="resolvedItems[1].depthColor"
|
|
287
|
-
stroke-width="4"
|
|
288
|
-
stroke-linecap="round"
|
|
289
|
-
/>
|
|
290
|
-
</g>
|
|
291
|
-
<!-- Arrow 2: Blue Arrow (Left) -->
|
|
292
|
-
<g
|
|
293
|
-
class="alpha-arrow-triad__branch alpha-arrow-triad__branch--blue"
|
|
294
|
-
:class="{ 'alpha-arrow-triad--animated': isAnimated }"
|
|
295
|
-
>
|
|
296
|
-
<path
|
|
297
|
-
:d="props.triangleHead ? geo.blueArrow.stemPath : geo.blueArrow.path"
|
|
298
|
-
:fill="resolvedItems[2].color"
|
|
299
|
-
/>
|
|
300
|
-
<polygon
|
|
301
|
-
v-if="props.triangleHead"
|
|
302
|
-
:points="geo.blueArrow.outerHeadPoints"
|
|
303
|
-
:fill="resolvedItems[2].color"
|
|
304
|
-
:stroke="resolvedItems[2].depthColor"
|
|
305
|
-
stroke-width="4"
|
|
306
|
-
stroke-linejoin="round"
|
|
307
|
-
/>
|
|
308
|
-
<path
|
|
309
|
-
v-else-if="props.neckLine"
|
|
310
|
-
:d="geo.blueArrow.neckLine"
|
|
311
|
-
fill="none"
|
|
312
|
-
:stroke="resolvedItems[2].depthColor"
|
|
313
|
-
stroke-width="4"
|
|
314
|
-
stroke-linecap="round"
|
|
315
|
-
/>
|
|
316
307
|
</g>
|
|
317
|
-
</
|
|
318
|
-
</
|
|
308
|
+
</svg>
|
|
309
|
+
</div>
|
|
310
|
+
<!-- Callout Cards -->
|
|
311
|
+
<slot />
|
|
319
312
|
</div>
|
|
320
|
-
<!-- Callout Cards -->
|
|
321
|
-
<slot>
|
|
322
|
-
<ArrowTriadCallout :index="0" />
|
|
323
|
-
<ArrowTriadCallout :index="1" />
|
|
324
|
-
<ArrowTriadCallout :index="2" />
|
|
325
|
-
</slot>
|
|
326
313
|
</div>
|
|
327
|
-
</div>
|
|
328
314
|
</template>
|
|
329
315
|
|
|
330
316
|
<style scoped>
|
|
331
317
|
.alpha-arrow-triad--animated.alpha-arrow-triad__dashed {
|
|
332
|
-
animation: arrow-triad-dashed-fade 500ms ease-out
|
|
318
|
+
animation: arrow-triad-dashed-fade 500ms ease-out
|
|
319
|
+
calc(var(--alpha-arrow-triad-start-delay, 0ms) + 100ms) both;
|
|
333
320
|
}
|
|
334
321
|
|
|
335
322
|
.alpha-arrow-triad--animated.alpha-arrow-triad__branch--yellow {
|
|
336
|
-
animation: arrow-triad-branch-pop 450ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
323
|
+
animation: arrow-triad-branch-pop 450ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
324
|
+
calc(var(--alpha-arrow-triad-start-delay, 0ms) + 50ms) both;
|
|
337
325
|
transform-origin: 349px 319px;
|
|
338
326
|
}
|
|
339
327
|
|
|
340
328
|
.alpha-arrow-triad--animated.alpha-arrow-triad__branch--green {
|
|
341
|
-
animation: arrow-triad-branch-pop 450ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
329
|
+
animation: arrow-triad-branch-pop 450ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
330
|
+
calc(var(--alpha-arrow-triad-start-delay, 0ms) + 120ms) both;
|
|
342
331
|
transform-origin: 349px 319px;
|
|
343
332
|
}
|
|
344
333
|
|
|
345
334
|
.alpha-arrow-triad--animated.alpha-arrow-triad__branch--blue {
|
|
346
|
-
animation: arrow-triad-branch-pop 450ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
335
|
+
animation: arrow-triad-branch-pop 450ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
336
|
+
calc(var(--alpha-arrow-triad-start-delay, 0ms) + 190ms) both;
|
|
347
337
|
transform-origin: 349px 319px;
|
|
348
338
|
}
|
|
349
339
|
|
|
@@ -8,37 +8,30 @@ import {
|
|
|
8
8
|
type IArrowTriadItem,
|
|
9
9
|
type IResolvedArrowTriadItem,
|
|
10
10
|
resolveSingleArrowTriadItem,
|
|
11
|
-
} from '../../../../utils/
|
|
12
|
-
import
|
|
13
|
-
import ArrowTriadHeading from './ArrowTriadHeading.vue';
|
|
14
|
-
import ArrowTriadIcon from './ArrowTriadIcon.vue';
|
|
11
|
+
} from '../../../../utils/facets/triad/arrow-triad';
|
|
12
|
+
import { useMergedUnoAttrs } from '../../../../utils/useMergedUnoAttrs';
|
|
15
13
|
|
|
16
14
|
defineOptions({
|
|
15
|
+
inheritAttrs: false,
|
|
17
16
|
name: 'ArrowTriadCallout',
|
|
18
17
|
});
|
|
19
18
|
|
|
20
19
|
export interface IArrowTriadCalloutProps {
|
|
21
20
|
readonly id?: string | number;
|
|
22
21
|
readonly index?: number;
|
|
23
|
-
readonly icon?: string | object | false;
|
|
24
22
|
readonly color?: string;
|
|
25
23
|
readonly cardBg?: string;
|
|
26
24
|
readonly textColor?: string;
|
|
27
25
|
readonly titleColor?: string;
|
|
28
|
-
readonly title?: string;
|
|
29
|
-
readonly description?: string;
|
|
30
26
|
}
|
|
31
27
|
|
|
32
28
|
const props = withDefaults(defineProps<IArrowTriadCalloutProps>(), {
|
|
33
29
|
id: undefined,
|
|
34
30
|
index: undefined,
|
|
35
|
-
icon: undefined,
|
|
36
31
|
color: undefined,
|
|
37
32
|
cardBg: undefined,
|
|
38
33
|
textColor: undefined,
|
|
39
34
|
titleColor: undefined,
|
|
40
|
-
title: undefined,
|
|
41
|
-
description: undefined,
|
|
42
35
|
});
|
|
43
36
|
|
|
44
37
|
interface INamedComponent {
|
|
@@ -80,12 +73,9 @@ const activeItem = computed<IResolvedArrowTriadItem>(() => {
|
|
|
80
73
|
const override: IArrowTriadItem = {
|
|
81
74
|
id: props.id,
|
|
82
75
|
color: props.color,
|
|
83
|
-
icon: props.icon,
|
|
84
76
|
cardBg: props.cardBg,
|
|
85
77
|
textColor: props.textColor,
|
|
86
78
|
titleColor: props.titleColor,
|
|
87
|
-
title: props.title,
|
|
88
|
-
description: props.description,
|
|
89
79
|
};
|
|
90
80
|
|
|
91
81
|
return resolveSingleArrowTriadItem(
|
|
@@ -142,6 +132,12 @@ const contentNode = computed(() => {
|
|
|
142
132
|
});
|
|
143
133
|
});
|
|
144
134
|
|
|
135
|
+
const iconNode = computed(() => {
|
|
136
|
+
return defaultNodes.value.find((node) => {
|
|
137
|
+
return hasComponentName(node.type, 'ArrowTriadIcon');
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
|
|
145
141
|
function isValidSlottedNode(node: VNode): boolean {
|
|
146
142
|
if (typeof node.type === 'symbol') {
|
|
147
143
|
return typeof node.children === 'string' && node.children.trim().length > 0;
|
|
@@ -155,7 +151,8 @@ const otherSlottedNodes = computed(() => {
|
|
|
155
151
|
return (
|
|
156
152
|
isValidSlottedNode(node) &&
|
|
157
153
|
!hasComponentName(node.type, 'ArrowTriadHeading') &&
|
|
158
|
-
!hasComponentName(node.type, 'ArrowTriadContent')
|
|
154
|
+
!hasComponentName(node.type, 'ArrowTriadContent') &&
|
|
155
|
+
!hasComponentName(node.type, 'ArrowTriadIcon')
|
|
159
156
|
);
|
|
160
157
|
});
|
|
161
158
|
});
|
|
@@ -191,6 +188,7 @@ const positionStyle = computed(() => {
|
|
|
191
188
|
// Top-Right (aligned with Yellow arrow tip pointing North-East)
|
|
192
189
|
return 'left: calc(50% + 150px); top: calc(50% - 170px);';
|
|
193
190
|
}
|
|
191
|
+
|
|
194
192
|
case 1: {
|
|
195
193
|
// Bottom-Right (aligned with Green arrow tip pointing South-East)
|
|
196
194
|
return 'left: calc(50% + 150px); top: calc(50% + 15px);';
|
|
@@ -209,82 +207,56 @@ const animation = computed(() => {
|
|
|
209
207
|
return rootContext?.animation?.value ?? true;
|
|
210
208
|
});
|
|
211
209
|
|
|
212
|
-
const hasIcon = computed(() =>
|
|
213
|
-
if (slots.icon) {
|
|
214
|
-
return true;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
const iconVal = props.icon !== undefined ? props.icon : activeItem.value.icon;
|
|
210
|
+
const hasIcon = computed(() => Boolean(iconNode.value));
|
|
218
211
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
if (typeof iconVal === 'string' && iconVal.trim() === '') {
|
|
224
|
-
return false;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
return true;
|
|
228
|
-
});
|
|
212
|
+
const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
213
|
+
'alpha-arrow-triad-callout absolute w-70 h-38.75 rounded-[20px] px-4 py-3 flex flex-col items-center justify-center text-center z-10 font-sans transition-all duration-300 pointer-events-auto select-none box-border',
|
|
214
|
+
);
|
|
229
215
|
</script>
|
|
230
216
|
|
|
231
217
|
<template>
|
|
232
218
|
<div
|
|
233
219
|
v-if="resolvedIndex < 3"
|
|
220
|
+
v-bind="forwardedAttrs()"
|
|
234
221
|
:class="[
|
|
235
|
-
|
|
222
|
+
className(),
|
|
236
223
|
`alpha-arrow-triad-callout--${resolvedIndex}`,
|
|
237
224
|
{ 'alpha-arrow-triad-callout--animated': animation },
|
|
238
225
|
]"
|
|
239
226
|
:style="[
|
|
240
227
|
positionStyle,
|
|
241
|
-
|
|
242
|
-
backgroundColor: activeItem.cardBg
|
|
243
|
-
|
|
244
|
-
'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif',
|
|
245
|
-
},
|
|
228
|
+
activeItem.cardBg
|
|
229
|
+
? { backgroundColor: activeItem.cardBg }
|
|
230
|
+
: undefined,
|
|
246
231
|
]"
|
|
247
232
|
>
|
|
248
233
|
<!-- Card Icon Header -->
|
|
249
234
|
<div v-if="hasIcon" class="mb-2 flex items-center justify-center">
|
|
250
|
-
<
|
|
251
|
-
<ArrowTriadIcon :icon="activeItem.icon" :size="32" />
|
|
252
|
-
</slot>
|
|
235
|
+
<component :is="iconNode" />
|
|
253
236
|
</div>
|
|
254
237
|
<!-- Title -->
|
|
255
|
-
<
|
|
256
|
-
<component :is="headingNode" v-if="headingNode" />
|
|
257
|
-
<ArrowTriadHeading v-else :color="activeItem.titleColor">
|
|
258
|
-
{{ activeItem.title }}
|
|
259
|
-
</ArrowTriadHeading>
|
|
260
|
-
</slot>
|
|
238
|
+
<component :is="headingNode" v-if="headingNode" />
|
|
261
239
|
<!-- Description -->
|
|
262
|
-
<
|
|
263
|
-
<component :is="contentNode" v-if="contentNode" />
|
|
264
|
-
<ArrowTriadContent v-else :color="activeItem.textColor">
|
|
265
|
-
{{ activeItem.description }}
|
|
266
|
-
</ArrowTriadContent>
|
|
267
|
-
</slot>
|
|
240
|
+
<component :is="contentNode" v-if="contentNode" />
|
|
268
241
|
<!-- Other slotted nodes -->
|
|
269
|
-
<component
|
|
270
|
-
:is="node"
|
|
271
|
-
v-for="(node, idx) in otherSlottedNodes"
|
|
272
|
-
:key="idx"
|
|
273
|
-
/>
|
|
242
|
+
<component :is="node" v-for="(node, idx) in otherSlottedNodes" :key="idx" />
|
|
274
243
|
</div>
|
|
275
244
|
</template>
|
|
276
245
|
|
|
277
246
|
<style scoped>
|
|
278
247
|
.alpha-arrow-triad-callout--animated.alpha-arrow-triad-callout--0 {
|
|
279
|
-
animation: arrow-triad-callout-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
248
|
+
animation: arrow-triad-callout-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
249
|
+
calc(var(--alpha-arrow-triad-start-delay, 0ms) + 150ms) both;
|
|
280
250
|
}
|
|
281
251
|
|
|
282
252
|
.alpha-arrow-triad-callout--animated.alpha-arrow-triad-callout--1 {
|
|
283
|
-
animation: arrow-triad-callout-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
253
|
+
animation: arrow-triad-callout-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
254
|
+
calc(var(--alpha-arrow-triad-start-delay, 0ms) + 250ms) both;
|
|
284
255
|
}
|
|
285
256
|
|
|
286
257
|
.alpha-arrow-triad-callout--animated.alpha-arrow-triad-callout--2 {
|
|
287
|
-
animation: arrow-triad-callout-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
258
|
+
animation: arrow-triad-callout-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
259
|
+
calc(var(--alpha-arrow-triad-start-delay, 0ms) + 350ms) both;
|
|
288
260
|
}
|
|
289
261
|
|
|
290
262
|
@keyframes arrow-triad-callout-fade {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, inject } from 'vue';
|
|
3
3
|
|
|
4
|
-
import { ARROW_TRIAD_CALLOUT_KEY } from '../../../../utils/
|
|
4
|
+
import { ARROW_TRIAD_CALLOUT_KEY } from '../../../../utils/facets/triad/arrow-triad';
|
|
5
|
+
import { useMergedUnoAttrs } from '../../../../utils/useMergedUnoAttrs';
|
|
5
6
|
|
|
6
7
|
defineOptions({
|
|
8
|
+
inheritAttrs: false,
|
|
7
9
|
name: 'ArrowTriadContent',
|
|
8
10
|
});
|
|
9
11
|
|
|
@@ -18,21 +20,24 @@ const props = withDefaults(defineProps<IArrowTriadContentProps>(), {
|
|
|
18
20
|
const calloutContext = inject(ARROW_TRIAD_CALLOUT_KEY, undefined);
|
|
19
21
|
|
|
20
22
|
const contentColor = computed(() => {
|
|
21
|
-
return props.color ?? calloutContext?.item.value.textColor ??
|
|
23
|
+
return props.color ?? calloutContext?.item.value.textColor ?? undefined;
|
|
22
24
|
});
|
|
25
|
+
|
|
26
|
+
const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
27
|
+
'alpha-arrow-triad-content font-sans leading-normal text-center font-normal text-(--alpha-arrow-triad-content) select-none',
|
|
28
|
+
);
|
|
23
29
|
</script>
|
|
24
30
|
|
|
25
31
|
<template>
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
'
|
|
32
|
-
|
|
32
|
+
<p
|
|
33
|
+
v-bind="forwardedAttrs()"
|
|
34
|
+
:class="className()"
|
|
35
|
+
:style="
|
|
36
|
+
contentColor && !contentColor.includes('--alpha-arrow-triad-content')
|
|
37
|
+
? { '--alpha-arrow-triad-content': contentColor }
|
|
38
|
+
: undefined
|
|
39
|
+
"
|
|
33
40
|
>
|
|
34
|
-
<slot
|
|
35
|
-
|
|
36
|
-
</slot>
|
|
37
|
-
</div>
|
|
41
|
+
<slot />
|
|
42
|
+
</p>
|
|
38
43
|
</template>
|