@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
|
@@ -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: 'ArrowTriadHeading',
|
|
8
10
|
});
|
|
9
11
|
|
|
@@ -18,21 +20,26 @@ const props = withDefaults(defineProps<IArrowTriadHeadingProps>(), {
|
|
|
18
20
|
const calloutContext = inject(ARROW_TRIAD_CALLOUT_KEY, undefined);
|
|
19
21
|
|
|
20
22
|
const headingColor = computed(() => {
|
|
21
|
-
return
|
|
23
|
+
return (
|
|
24
|
+
props.color ??
|
|
25
|
+
calloutContext?.item.value.titleColor ??
|
|
26
|
+
calloutContext?.item.value.color ??
|
|
27
|
+
'var(--alpha-arrow-triad-heading)'
|
|
28
|
+
);
|
|
22
29
|
});
|
|
30
|
+
|
|
31
|
+
const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
32
|
+
'alpha-arrow-triad-heading font-sans font-bold uppercase tracking-wider text-center leading-tight mb-2 select-none',
|
|
33
|
+
);
|
|
23
34
|
</script>
|
|
24
35
|
|
|
25
36
|
<template>
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif',
|
|
32
|
-
}"
|
|
37
|
+
<h4
|
|
38
|
+
v-if="$slots.default"
|
|
39
|
+
v-bind="forwardedAttrs()"
|
|
40
|
+
:class="className()"
|
|
41
|
+
:style="{ color: headingColor }"
|
|
33
42
|
>
|
|
34
|
-
<slot>
|
|
35
|
-
|
|
36
|
-
</slot>
|
|
37
|
-
</div>
|
|
43
|
+
<slot>{{ '' }}</slot>
|
|
44
|
+
</h4>
|
|
38
45
|
</template>
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed } from 'vue';
|
|
3
3
|
|
|
4
|
+
import { useMergedUnoAttrs } from '../../../../utils/useMergedUnoAttrs';
|
|
5
|
+
|
|
4
6
|
defineOptions({
|
|
7
|
+
inheritAttrs: false,
|
|
5
8
|
name: 'ArrowTriadIcon',
|
|
6
9
|
});
|
|
7
10
|
|
|
@@ -14,7 +17,7 @@ export interface IArrowTriadIconProps {
|
|
|
14
17
|
const props = withDefaults(defineProps<IArrowTriadIconProps>(), {
|
|
15
18
|
size: 32,
|
|
16
19
|
icon: undefined,
|
|
17
|
-
color:
|
|
20
|
+
color: undefined,
|
|
18
21
|
});
|
|
19
22
|
|
|
20
23
|
const isStringIcon = computed((): boolean => {
|
|
@@ -50,32 +53,35 @@ const resolvedIconClass = computed((): string => {
|
|
|
50
53
|
|
|
51
54
|
return str;
|
|
52
55
|
});
|
|
56
|
+
|
|
57
|
+
const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
58
|
+
'alpha-arrow-triad-icon flex items-center justify-center text-(--alpha-arrow-triad-icon) pointer-events-none select-none',
|
|
59
|
+
);
|
|
53
60
|
</script>
|
|
54
61
|
|
|
55
62
|
<template>
|
|
56
63
|
<div
|
|
57
64
|
v-if="hasIcon"
|
|
58
|
-
|
|
65
|
+
v-bind="forwardedAttrs()"
|
|
66
|
+
:class="className()"
|
|
59
67
|
:style="{
|
|
60
|
-
color: props.color,
|
|
61
68
|
width: `${props.size}px`,
|
|
62
69
|
height: `${props.size}px`,
|
|
70
|
+
...(props.color ? { '--alpha-arrow-triad-icon': props.color } : {}),
|
|
63
71
|
}"
|
|
64
72
|
>
|
|
65
73
|
<slot>
|
|
66
74
|
<component
|
|
67
75
|
:is="props.icon"
|
|
68
76
|
v-if="isComponentIcon"
|
|
69
|
-
class="w-full h-full"
|
|
70
|
-
:style="{ color: props.color }"
|
|
77
|
+
class="w-full h-full text-current"
|
|
71
78
|
/>
|
|
72
79
|
<!-- UnoCSS / Iconify class name (e.g. i-carbon-shield-check or carbon:shield-check) -->
|
|
73
80
|
<span
|
|
74
81
|
v-else-if="isStringIcon && resolvedIconClass"
|
|
75
82
|
:class="resolvedIconClass"
|
|
76
|
-
class="inline-block"
|
|
83
|
+
class="inline-block text-current"
|
|
77
84
|
:style="{
|
|
78
|
-
color: props.color,
|
|
79
85
|
width: `${props.size}px`,
|
|
80
86
|
height: `${props.size}px`,
|
|
81
87
|
fontSize: `${props.size}px`,
|
|
@@ -83,9 +89,8 @@ const resolvedIconClass = computed((): string => {
|
|
|
83
89
|
/>
|
|
84
90
|
<span
|
|
85
91
|
v-else-if="isStringIcon"
|
|
86
|
-
class="inline-block font-semibold"
|
|
92
|
+
class="inline-block font-semibold text-current"
|
|
87
93
|
:style="{
|
|
88
|
-
color: props.color,
|
|
89
94
|
fontSize: `${props.size * 0.75}px`,
|
|
90
95
|
}"
|
|
91
96
|
>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* Color defaults shared by this component family. */
|
|
2
|
+
@layer alpha-theme-tokens {
|
|
3
|
+
:root {
|
|
4
|
+
--alpha-arrow-triad-connector-stroke: #94a3b8;
|
|
5
|
+
--alpha-arrow-triad-content: var(--alpha-foreground-primary, #64748b);
|
|
6
|
+
--alpha-arrow-triad-heading: var(--alpha-foreground-primary, #1e293b);
|
|
7
|
+
--alpha-arrow-triad-icon: #334155;
|
|
8
|
+
--alpha-arrow-triad-item-1-color: #fec201;
|
|
9
|
+
--alpha-arrow-triad-item-1-depth: #d59b01;
|
|
10
|
+
--alpha-arrow-triad-item-2-color: #71ad49;
|
|
11
|
+
--alpha-arrow-triad-item-2-depth: #548235;
|
|
12
|
+
--alpha-arrow-triad-item-3-color: #5b9bd5;
|
|
13
|
+
--alpha-arrow-triad-item-3-depth: #41719c;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -8,23 +8,21 @@ import {
|
|
|
8
8
|
type Ref,
|
|
9
9
|
ref,
|
|
10
10
|
useSlots,
|
|
11
|
-
type VNode,
|
|
12
11
|
watch,
|
|
12
|
+
type VNode,
|
|
13
13
|
} from 'vue';
|
|
14
14
|
|
|
15
15
|
import {
|
|
16
16
|
createGearTriadGeometry,
|
|
17
17
|
GEAR_TRIAD_BASE_COLOR,
|
|
18
18
|
GEAR_TRIAD_ROOT_KEY,
|
|
19
|
-
type IGearTriadItem,
|
|
20
19
|
type IResolvedGearTriadItem,
|
|
21
20
|
resolveGearTriadItems,
|
|
22
21
|
resolveSingleGearTriadItem,
|
|
23
|
-
type
|
|
24
|
-
} from '../../../../utils/
|
|
22
|
+
type IGearTriadItem,
|
|
23
|
+
} from '../../../../utils/facets/triad/gear-triad';
|
|
25
24
|
import { useDiagramAutoScale } from '../../../../utils/useDiagramAutoScale';
|
|
26
25
|
import { useMergedUnoAttrs } from '../../../../utils/useMergedUnoAttrs';
|
|
27
|
-
import GearTriadCallout from './GearTriadCallout.vue';
|
|
28
26
|
import GearTriadCenter from './GearTriadCenter.vue';
|
|
29
27
|
import GearTriadIcon from './GearTriadIcon.vue';
|
|
30
28
|
|
|
@@ -34,10 +32,6 @@ defineOptions({
|
|
|
34
32
|
});
|
|
35
33
|
|
|
36
34
|
export interface IGearTriadProps {
|
|
37
|
-
readonly title?: string;
|
|
38
|
-
readonly subtitle?: string;
|
|
39
|
-
readonly items?: readonly IGearTriadItem[];
|
|
40
|
-
readonly icons?: readonly (TGearTriadIcon | undefined)[];
|
|
41
35
|
readonly animation?: boolean;
|
|
42
36
|
readonly active?: boolean;
|
|
43
37
|
readonly startDelay?: number;
|
|
@@ -52,10 +46,6 @@ export interface IGearTriadProps {
|
|
|
52
46
|
}
|
|
53
47
|
|
|
54
48
|
const props = withDefaults(defineProps<IGearTriadProps>(), {
|
|
55
|
-
title: undefined,
|
|
56
|
-
subtitle: undefined,
|
|
57
|
-
items: undefined,
|
|
58
|
-
icons: undefined,
|
|
59
49
|
animation: true,
|
|
60
50
|
active: undefined,
|
|
61
51
|
startDelay: undefined,
|
|
@@ -101,43 +91,46 @@ interface INamedComponent {
|
|
|
101
91
|
readonly __name?: string;
|
|
102
92
|
}
|
|
103
93
|
|
|
104
|
-
const
|
|
105
|
-
const
|
|
106
|
-
|
|
94
|
+
const registeredDetailsCount = ref(0);
|
|
95
|
+
const registerDetails = () => {
|
|
96
|
+
registeredDetailsCount.value++;
|
|
107
97
|
};
|
|
108
98
|
|
|
109
|
-
function
|
|
99
|
+
function checkHasDetailsVNodes(nodes: readonly VNode[] | undefined): boolean {
|
|
110
100
|
if (!nodes) {
|
|
111
101
|
return false;
|
|
112
102
|
}
|
|
103
|
+
|
|
113
104
|
for (const node of nodes) {
|
|
114
105
|
if (!node) {
|
|
115
106
|
continue;
|
|
116
107
|
}
|
|
108
|
+
|
|
117
109
|
if (typeof node.type === 'object' && node.type !== null) {
|
|
118
110
|
const comp = node.type as INamedComponent;
|
|
119
111
|
if (
|
|
120
|
-
comp.name === '
|
|
121
|
-
comp.__name === '
|
|
112
|
+
comp.name === 'GearTriadDetails' ||
|
|
113
|
+
comp.__name === 'GearTriadDetails'
|
|
122
114
|
) {
|
|
123
115
|
return true;
|
|
124
116
|
}
|
|
125
117
|
}
|
|
126
118
|
if (Array.isArray(node.children)) {
|
|
127
|
-
if (
|
|
119
|
+
if (checkHasDetailsVNodes(node.children as readonly VNode[])) {
|
|
128
120
|
return true;
|
|
129
121
|
}
|
|
130
122
|
}
|
|
131
123
|
}
|
|
124
|
+
|
|
132
125
|
return false;
|
|
133
126
|
}
|
|
134
127
|
|
|
135
|
-
const
|
|
136
|
-
return slots.default ?
|
|
128
|
+
const slotHasDetails = computed(() => {
|
|
129
|
+
return slots.default ? checkHasDetailsVNodes(slots.default()) : false;
|
|
137
130
|
});
|
|
138
131
|
|
|
139
132
|
const supportsClicks = computed(() => {
|
|
140
|
-
return
|
|
133
|
+
return registeredDetailsCount.value > 0 || slotHasDetails.value;
|
|
141
134
|
});
|
|
142
135
|
|
|
143
136
|
watch(
|
|
@@ -162,15 +155,19 @@ const resolvedStep = computed(() => {
|
|
|
162
155
|
if (props.step !== undefined) {
|
|
163
156
|
return props.step;
|
|
164
157
|
}
|
|
158
|
+
|
|
165
159
|
if (props.moved !== undefined) {
|
|
166
160
|
return props.moved ? 1 : 0;
|
|
167
161
|
}
|
|
162
|
+
|
|
168
163
|
if (props.clicks !== undefined) {
|
|
169
164
|
return props.clicks;
|
|
170
165
|
}
|
|
166
|
+
|
|
171
167
|
if (shiftingIntro?.clicks && typeof shiftingIntro.clicks.value === 'number') {
|
|
172
168
|
return shiftingIntro.clicks.value;
|
|
173
169
|
}
|
|
170
|
+
|
|
174
171
|
if (slidevClicks) {
|
|
175
172
|
const curr =
|
|
176
173
|
typeof slidevClicks.current === 'object' &&
|
|
@@ -181,6 +178,7 @@ const resolvedStep = computed(() => {
|
|
|
181
178
|
return curr;
|
|
182
179
|
}
|
|
183
180
|
}
|
|
181
|
+
|
|
184
182
|
return internalStep.value;
|
|
185
183
|
});
|
|
186
184
|
|
|
@@ -190,6 +188,7 @@ const activeOptionIndex = computed(() => {
|
|
|
190
188
|
if (resolvedStep.value <= 0) {
|
|
191
189
|
return 0;
|
|
192
190
|
}
|
|
191
|
+
|
|
193
192
|
return (resolvedStep.value - 1) % 3;
|
|
194
193
|
});
|
|
195
194
|
|
|
@@ -198,6 +197,7 @@ function handleDiagramClick(event: MouseEvent): void {
|
|
|
198
197
|
if (!supportsClicks.value) {
|
|
199
198
|
return;
|
|
200
199
|
}
|
|
200
|
+
|
|
201
201
|
const nextStep = (internalStep.value + 1) % 4;
|
|
202
202
|
internalStep.value = nextStep;
|
|
203
203
|
emit('update:step', nextStep);
|
|
@@ -212,12 +212,15 @@ const gearRotation = computed(() => {
|
|
|
212
212
|
if (!isShifted.value) {
|
|
213
213
|
return 0;
|
|
214
214
|
}
|
|
215
|
+
|
|
215
216
|
if (activeOptionIndex.value === 0) {
|
|
216
217
|
return 150;
|
|
217
218
|
}
|
|
219
|
+
|
|
218
220
|
if (activeOptionIndex.value === 1) {
|
|
219
221
|
return 30;
|
|
220
222
|
}
|
|
223
|
+
|
|
221
224
|
return -90;
|
|
222
225
|
});
|
|
223
226
|
|
|
@@ -252,7 +255,7 @@ const resolvedStartDelay = computed(() => {
|
|
|
252
255
|
const calloutOverrides = ref<Record<number, IGearTriadItem>>({});
|
|
253
256
|
|
|
254
257
|
const resolvedItems = computed(() => {
|
|
255
|
-
const base = resolveGearTriadItems(
|
|
258
|
+
const base = resolveGearTriadItems();
|
|
256
259
|
|
|
257
260
|
return [
|
|
258
261
|
resolveSingleGearTriadItem(
|
|
@@ -311,8 +314,8 @@ const registerCallout = (
|
|
|
311
314
|
|
|
312
315
|
provide(GEAR_TRIAD_ROOT_KEY, {
|
|
313
316
|
registerCallout,
|
|
314
|
-
|
|
315
|
-
|
|
317
|
+
registerDetails,
|
|
318
|
+
hasDetails: supportsClicks,
|
|
316
319
|
items: resolvedItems,
|
|
317
320
|
animation: isAnimated,
|
|
318
321
|
isShifted,
|
|
@@ -354,6 +357,7 @@ function getSectorFaceColor(sector: {
|
|
|
354
357
|
if (!isShifted.value) {
|
|
355
358
|
return sector.item.color;
|
|
356
359
|
}
|
|
360
|
+
|
|
357
361
|
const focusedSectorName =
|
|
358
362
|
activeOptionIndex.value === 0
|
|
359
363
|
? 'cyan'
|
|
@@ -363,13 +367,15 @@ function getSectorFaceColor(sector: {
|
|
|
363
367
|
if (sector.name === focusedSectorName) {
|
|
364
368
|
return sector.item.color;
|
|
365
369
|
}
|
|
366
|
-
|
|
370
|
+
|
|
371
|
+
return 'var(--alpha-gear-triad-muted-sector)';
|
|
367
372
|
}
|
|
368
373
|
|
|
369
374
|
function getSectorIconColor(sector: { name: string }): string {
|
|
370
375
|
if (!isShifted.value) {
|
|
371
|
-
return '
|
|
376
|
+
return 'var(--alpha-gear-triad-icon)';
|
|
372
377
|
}
|
|
378
|
+
|
|
373
379
|
const focusedSectorName =
|
|
374
380
|
activeOptionIndex.value === 0
|
|
375
381
|
? 'cyan'
|
|
@@ -377,9 +383,10 @@ function getSectorIconColor(sector: { name: string }): string {
|
|
|
377
383
|
? 'orange'
|
|
378
384
|
: 'pink';
|
|
379
385
|
if (sector.name === focusedSectorName) {
|
|
380
|
-
return '
|
|
386
|
+
return 'var(--alpha-gear-triad-icon)';
|
|
381
387
|
}
|
|
382
|
-
|
|
388
|
+
|
|
389
|
+
return 'var(--alpha-gear-triad-muted-icon)';
|
|
383
390
|
}
|
|
384
391
|
|
|
385
392
|
const rootRef = ref<HTMLElement | null>(null);
|
|
@@ -423,23 +430,6 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
423
430
|
height: resolvedHeightStyle,
|
|
424
431
|
}"
|
|
425
432
|
>
|
|
426
|
-
<!-- Header (Title / Subtitle) -->
|
|
427
|
-
<header
|
|
428
|
-
v-if="title || $slots.title"
|
|
429
|
-
class="alpha-gear-triad__header mb-2 text-center"
|
|
430
|
-
>
|
|
431
|
-
<slot name="title">
|
|
432
|
-
<h2 class="alpha-gear-triad__title text-2xl font-bold font-sans tracking-tight text-slate-900">
|
|
433
|
-
{{ title }}
|
|
434
|
-
</h2>
|
|
435
|
-
</slot>
|
|
436
|
-
<p
|
|
437
|
-
v-if="subtitle || $slots.subtitle"
|
|
438
|
-
class="alpha-gear-triad__subtitle text-sm font-sans text-slate-500 mt-1"
|
|
439
|
-
>
|
|
440
|
-
<slot name="subtitle">{{ subtitle }}</slot>
|
|
441
|
-
</p>
|
|
442
|
-
</header>
|
|
443
433
|
<!-- Auto-Scaled Stage -->
|
|
444
434
|
<div
|
|
445
435
|
class="alpha-gear-triad__scaler relative flex items-center justify-center origin-center transition-transform duration-200"
|
|
@@ -450,8 +440,11 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
450
440
|
}"
|
|
451
441
|
>
|
|
452
442
|
<!-- Central Gear SVG Assembly -->
|
|
453
|
-
<
|
|
454
|
-
|
|
443
|
+
<button
|
|
444
|
+
type="button"
|
|
445
|
+
class="alpha-gear-triad__diagram relative flex items-center justify-center w-135 h-120 transition-transform duration-700 ease-[cubic-bezier(0.16,1,0.3,1)] bg-transparent border-0 p-0 m-0 appearance-none"
|
|
446
|
+
:disabled="!supportsClicks"
|
|
447
|
+
aria-label="Advance gear diagram"
|
|
455
448
|
:class="[
|
|
456
449
|
{ 'alpha-gear-triad__diagram--animated': isAnimated },
|
|
457
450
|
supportsClicks ? 'cursor-pointer' : 'cursor-default',
|
|
@@ -463,21 +456,40 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
463
456
|
>
|
|
464
457
|
<!-- Rotating Wheel (simultaneously rotates while diagram translates) -->
|
|
465
458
|
<div
|
|
466
|
-
class="alpha-gear-triad__wheel relative w-
|
|
459
|
+
class="alpha-gear-triad__wheel relative w-135 h-120 transition-transform duration-700 ease-[cubic-bezier(0.16,1,0.3,1)]"
|
|
467
460
|
:style="{
|
|
468
461
|
transformOrigin: `${geo.centerX}px ${geo.centerY}px`,
|
|
469
462
|
transform: `rotate(${gearRotation}deg)`,
|
|
470
463
|
}"
|
|
471
464
|
>
|
|
472
465
|
<svg
|
|
473
|
-
|
|
466
|
+
aria-hidden="true"
|
|
467
|
+
class="alpha-gear-triad__svg w-135 h-120 overflow-visible"
|
|
474
468
|
:viewBox="`0 0 ${geo.viewBoxWidth} ${geo.viewBoxHeight}`"
|
|
475
469
|
>
|
|
476
470
|
<defs>
|
|
477
471
|
<!-- Elevation Drop Shadow for Gear Assembly -->
|
|
478
|
-
<filter
|
|
479
|
-
|
|
480
|
-
|
|
472
|
+
<filter
|
|
473
|
+
id="alpha-gear-assembly-shadow"
|
|
474
|
+
x="-20%"
|
|
475
|
+
y="-20%"
|
|
476
|
+
width="140%"
|
|
477
|
+
height="140%"
|
|
478
|
+
>
|
|
479
|
+
<feDropShadow
|
|
480
|
+
dx="0"
|
|
481
|
+
dy="10"
|
|
482
|
+
stdDeviation="14"
|
|
483
|
+
flood-color="var(--alpha-gear-triad-shadow)"
|
|
484
|
+
flood-opacity="0.22"
|
|
485
|
+
/>
|
|
486
|
+
<feDropShadow
|
|
487
|
+
dx="0"
|
|
488
|
+
dy="3"
|
|
489
|
+
stdDeviation="5"
|
|
490
|
+
flood-color="var(--alpha-gear-triad-shadow)"
|
|
491
|
+
flood-opacity="0.10"
|
|
492
|
+
/>
|
|
481
493
|
</filter>
|
|
482
494
|
</defs>
|
|
483
495
|
<!-- Group containing all gear elements with overall elevation drop shadow -->
|
|
@@ -548,25 +560,22 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
548
560
|
}"
|
|
549
561
|
/>
|
|
550
562
|
</slot>
|
|
551
|
-
</
|
|
552
|
-
<!--
|
|
553
|
-
<slot
|
|
554
|
-
<template v-else>
|
|
555
|
-
<GearTriadCallout />
|
|
556
|
-
<GearTriadCallout />
|
|
557
|
-
<GearTriadCallout />
|
|
558
|
-
</template>
|
|
563
|
+
</button>
|
|
564
|
+
<!-- Surrounding callouts and their details -->
|
|
565
|
+
<slot />
|
|
559
566
|
</div>
|
|
560
567
|
</div>
|
|
561
568
|
</template>
|
|
562
569
|
|
|
563
570
|
<style scoped>
|
|
564
571
|
.alpha-gear-triad__diagram--animated {
|
|
565
|
-
animation: gear-triad-fade-in 700ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
572
|
+
animation: gear-triad-fade-in 700ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
573
|
+
calc(var(--gear-start-delay, 0ms)) backwards;
|
|
566
574
|
}
|
|
567
575
|
|
|
568
576
|
.alpha-gear-center--animated {
|
|
569
|
-
animation: gear-center-pop-in 600ms cubic-bezier(0.34, 1.56, 0.64, 1)
|
|
577
|
+
animation: gear-center-pop-in 600ms cubic-bezier(0.34, 1.56, 0.64, 1)
|
|
578
|
+
calc(var(--gear-start-delay, 0ms) + 100ms) backwards;
|
|
570
579
|
}
|
|
571
580
|
|
|
572
581
|
@keyframes gear-triad-fade-in {
|