@alphacifer/slidev-addon-theme 0.0.5 → 0.0.7

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.
Files changed (93) hide show
  1. package/README.md +163 -2
  2. package/components/arc-arrow-process/ArcArrowProcess.vue +361 -0
  3. package/components/arc-arrow-process/ArcArrowProcessArrow.vue +143 -0
  4. package/components/arc-arrow-process/ArcArrowProcessCallout.vue +361 -0
  5. package/components/arc-arrow-process/ArcArrowProcessContent.vue +38 -0
  6. package/components/arc-arrow-process/ArcArrowProcessHeading.vue +43 -0
  7. package/components/arc-arrow-process/ArcArrowProcessIcon.vue +154 -0
  8. package/components/arc-compare/ArcCompare.vue +443 -0
  9. package/components/arc-compare/ArcCompareBadge.vue +63 -0
  10. package/components/arc-compare/ArcCompareCallout.vue +386 -0
  11. package/components/arc-compare/ArcCompareContent.vue +52 -0
  12. package/components/arc-compare/ArcCompareContents.vue +18 -0
  13. package/components/arc-compare/ArcCompareHeading.vue +52 -0
  14. package/components/arc-compare/ArcCompareLeft.vue +183 -0
  15. package/components/arc-compare/ArcCompareRight.vue +183 -0
  16. package/components/arc-compare/ArcCompareTitle.vue +47 -0
  17. package/components/arrow-triad/ArrowTriad.vue +368 -0
  18. package/components/arrow-triad/ArrowTriadCallout.vue +300 -0
  19. package/components/arrow-triad/ArrowTriadContent.vue +38 -0
  20. package/components/arrow-triad/ArrowTriadHeading.vue +38 -0
  21. package/components/arrow-triad/ArrowTriadIcon.vue +96 -0
  22. package/components/chevron-card/ChevronCard.vue +237 -0
  23. package/components/chevron-card/ChevronCardBadge.vue +74 -0
  24. package/components/chevron-card/ChevronCardContent.vue +39 -0
  25. package/components/chevron-card/ChevronCardHeading.vue +39 -0
  26. package/components/comparison-table/ComparisonTable.vue +244 -0
  27. package/components/comparison-table/ComparisonTableCell.vue +88 -0
  28. package/components/comparison-table/ComparisonTableCol.vue +97 -0
  29. package/components/comparison-table/ComparisonTableCols.vue +74 -0
  30. package/components/comparison-table/ComparisonTableRow.vue +92 -0
  31. package/components/comparison-table/ComparisonTableRows.vue +21 -0
  32. package/components/hex-triad/HexTriad.vue +438 -0
  33. package/components/hex-triad/HexTriadBadge.vue +110 -0
  34. package/components/hex-triad/HexTriadCallout.vue +200 -0
  35. package/components/hex-triad/HexTriadCenterBadge.vue +51 -0
  36. package/components/hex-triad/HexTriadContent.vue +20 -0
  37. package/components/hex-triad/HexTriadHeading.vue +28 -0
  38. package/components/hex-triad/HexTriadLayer.vue +28 -0
  39. package/components/horiz-card/HorizCard.vue +318 -0
  40. package/components/horiz-card/HorizCardBadge.vue +75 -0
  41. package/components/horiz-card/HorizCardContent.vue +46 -0
  42. package/components/horiz-card/HorizCardHeading.vue +47 -0
  43. package/components/horiz-card/HorizCardIcon.vue +118 -0
  44. package/components/quad-hub/QuadHub.vue +642 -0
  45. package/components/quad-hub/QuadHubCallout.vue +267 -0
  46. package/components/quad-hub/QuadHubCenter.vue +53 -0
  47. package/components/quad-hub/QuadHubContent.vue +39 -0
  48. package/components/quad-hub/QuadHubHeading.vue +44 -0
  49. package/components/quad-hub/QuadHubIcon.vue +112 -0
  50. package/components/shifting-heading/TransitionHeading.vue +2 -2
  51. package/components/vert-card/VertCard.vue +389 -0
  52. package/components/vert-card/VertCardBadge.vue +72 -0
  53. package/components/vert-card/VertCardContent.vue +45 -0
  54. package/components/vert-card/VertCardHeading.vue +68 -0
  55. package/components/vert-card/VertCardIcon.vue +126 -0
  56. package/components/vert-card/VertCardTitle.vue +76 -0
  57. package/layouts/core/arc-toc.vue +76 -113
  58. package/layouts/core/bg-center.vue +32 -4
  59. package/layouts/shifting-heading/shifting-intro.vue +35 -7
  60. package/package.json +3 -2
  61. package/utils/arcArrowProcess/context.ts +28 -0
  62. package/utils/arcArrowProcess/createArcArrowProcessGeometry.ts +137 -0
  63. package/utils/arcArrowProcess/index.ts +3 -0
  64. package/utils/arcArrowProcess/resolveArcArrowProcessItems.ts +189 -0
  65. package/utils/arcCompare/context.ts +36 -0
  66. package/utils/arcCompare/createArcCompareGeometry.ts +254 -0
  67. package/utils/arcCompare/index.ts +3 -0
  68. package/utils/arcCompare/resolveArcCompareItems.ts +123 -0
  69. package/utils/arrowTriad/context.ts +38 -0
  70. package/utils/arrowTriad/createArrowTriadGeometry.ts +63 -0
  71. package/utils/arrowTriad/index.ts +3 -0
  72. package/utils/arrowTriad/resolveArrowTriadItems.ts +121 -0
  73. package/utils/chevronCard/context.ts +12 -0
  74. package/utils/chevronCard/createChevronCardGeometry.ts +48 -0
  75. package/utils/chevronCard/index.ts +2 -0
  76. package/utils/comparisonTable/constants.ts +72 -0
  77. package/utils/comparisonTable/context.ts +24 -0
  78. package/utils/comparisonTable/index.ts +2 -0
  79. package/utils/hexTriad/context.ts +25 -0
  80. package/utils/hexTriad/createHexTriadGeometry.ts +182 -0
  81. package/utils/hexTriad/index.ts +3 -0
  82. package/utils/hexTriad/resolveHexTriadItems.ts +63 -0
  83. package/utils/horizCard/context.ts +13 -0
  84. package/utils/horizCard/createHorizCardGeometry.ts +243 -0
  85. package/utils/horizCard/index.ts +2 -0
  86. package/utils/quadHub/context.ts +26 -0
  87. package/utils/quadHub/createQuadHubGeometry.ts +331 -0
  88. package/utils/quadHub/index.ts +3 -0
  89. package/utils/quadHub/resolveQuadHubItems.ts +214 -0
  90. package/utils/useDiagramAutoScale.ts +300 -0
  91. package/utils/vertCard/context.ts +18 -0
  92. package/utils/vertCard/createVertCardGeometry.ts +242 -0
  93. package/utils/vertCard/index.ts +2 -0
@@ -0,0 +1,361 @@
1
+ <script setup lang="ts">
2
+ import {
3
+ computed,
4
+ Fragment,
5
+ inject,
6
+ onBeforeUnmount,
7
+ provide,
8
+ useSlots,
9
+ type VNode,
10
+ watchEffect,
11
+ } from 'vue';
12
+
13
+ import {
14
+ ARC_ARROW_PROCESS_CALLOUT_KEY,
15
+ ARC_ARROW_PROCESS_ROOT_KEY,
16
+ getDefaultArcArrowProcessItem,
17
+ type IArcArrowProcessItem,
18
+ type IResolvedArcArrowProcessItem,
19
+ resolveSingleArcArrowProcessItem,
20
+ } from '../../utils/arcArrowProcess';
21
+ import ArcArrowProcessContent from './ArcArrowProcessContent.vue';
22
+ import ArcArrowProcessHeading from './ArcArrowProcessHeading.vue';
23
+ import ArcArrowProcessIcon from './ArcArrowProcessIcon.vue';
24
+
25
+ defineOptions({
26
+ name: 'ArcArrowProcessCallout',
27
+ });
28
+
29
+ export interface IArcArrowProcessCalloutProps {
30
+ readonly id?: string | number;
31
+ readonly index?: number;
32
+ readonly icon?: string | object | false;
33
+ readonly color?: string;
34
+ readonly textColor?: string;
35
+ readonly title?: string;
36
+ readonly description?: string;
37
+ }
38
+
39
+ const props = withDefaults(defineProps<IArcArrowProcessCalloutProps>(), {
40
+ id: undefined,
41
+ index: undefined,
42
+ icon: undefined,
43
+ color: undefined,
44
+ textColor: undefined,
45
+ title: undefined,
46
+ description: undefined,
47
+ });
48
+
49
+ interface INamedComponent {
50
+ readonly name?: string;
51
+ readonly __name?: string;
52
+ }
53
+
54
+ function hasComponentName(type: unknown, name: string): boolean {
55
+ if (typeof type === 'object' && type !== null) {
56
+ const comp = type as INamedComponent;
57
+
58
+ return comp.name === name || comp.__name === name;
59
+ }
60
+
61
+ return false;
62
+ }
63
+
64
+ const rootContext = inject(ARC_ARROW_PROCESS_ROOT_KEY, undefined);
65
+
66
+ if (!rootContext) {
67
+ console.warn(
68
+ '[ArcArrowProcessCallout] Must be used inside <ArcArrowProcess>',
69
+ );
70
+ }
71
+
72
+ const registration =
73
+ props.index === undefined ? rootContext?.registerCallout() : undefined;
74
+
75
+ const resolvedIndex = computed(() => {
76
+ if (props.index !== undefined) {
77
+ return props.index;
78
+ }
79
+
80
+ return registration?.index ?? 0;
81
+ });
82
+
83
+ const resolvedCount = computed<number>(() => {
84
+ return rootContext?.count.value ?? 4;
85
+ });
86
+
87
+ const activeItem = computed<IResolvedArcArrowProcessItem>(() => {
88
+ const baseItem =
89
+ rootContext?.items.value[resolvedIndex.value] ??
90
+ getDefaultArcArrowProcessItem(resolvedIndex.value, resolvedCount.value);
91
+
92
+ const override: IArcArrowProcessItem = {
93
+ id: props.id,
94
+ color: props.color,
95
+ icon: props.icon,
96
+ textColor: props.textColor,
97
+ titleColor: props.color,
98
+ title: props.title,
99
+ description: props.description,
100
+ };
101
+
102
+ return resolveSingleArcArrowProcessItem(
103
+ {
104
+ ...baseItem,
105
+ ...Object.fromEntries(
106
+ Object.entries(override).filter(([_, v]) => {
107
+ return v !== undefined;
108
+ }),
109
+ ),
110
+ },
111
+ resolvedIndex.value,
112
+ resolvedCount.value,
113
+ );
114
+ });
115
+
116
+ watchEffect(() => {
117
+ if (props.color !== undefined) {
118
+ rootContext?.setCalloutColor?.(resolvedIndex.value, props.color);
119
+ }
120
+ });
121
+
122
+ onBeforeUnmount(() => {
123
+ rootContext?.setCalloutColor?.(resolvedIndex.value, undefined);
124
+ });
125
+
126
+ provide(ARC_ARROW_PROCESS_CALLOUT_KEY, {
127
+ item: activeItem,
128
+ index: resolvedIndex.value,
129
+ count: resolvedCount.value,
130
+ });
131
+
132
+ const slots = useSlots();
133
+
134
+ function flattenVNodes(nodes: VNode[]): VNode[] {
135
+ const result: VNode[] = [];
136
+
137
+ for (const node of nodes) {
138
+ if (node.type === Fragment && Array.isArray(node.children)) {
139
+ result.push(...flattenVNodes(node.children as VNode[]));
140
+ } else {
141
+ result.push(node);
142
+ }
143
+ }
144
+
145
+ return result;
146
+ }
147
+
148
+ const defaultNodes = computed(() => {
149
+ if (!slots.default) {
150
+ return [];
151
+ }
152
+
153
+ return flattenVNodes(slots.default());
154
+ });
155
+
156
+ const headingNode = computed(() => {
157
+ return defaultNodes.value.find((node) => {
158
+ return hasComponentName(node.type, 'ArcArrowProcessHeading');
159
+ });
160
+ });
161
+
162
+ const contentNode = computed(() => {
163
+ return defaultNodes.value.find((node) => {
164
+ return hasComponentName(node.type, 'ArcArrowProcessContent');
165
+ });
166
+ });
167
+
168
+ const iconNode = computed(() => {
169
+ return defaultNodes.value.find((node) => {
170
+ return hasComponentName(node.type, 'ArcArrowProcessIcon');
171
+ });
172
+ });
173
+
174
+ function isValidSlottedNode(node: VNode): boolean {
175
+ if (typeof node.type === 'symbol') {
176
+ return typeof node.children === 'string' && node.children.trim().length > 0;
177
+ }
178
+
179
+ return true;
180
+ }
181
+
182
+ const otherSlottedNodes = computed(() => {
183
+ return defaultNodes.value.filter((node) => {
184
+ return (
185
+ isValidSlottedNode(node) &&
186
+ !hasComponentName(node.type, 'ArcArrowProcessHeading') &&
187
+ !hasComponentName(node.type, 'ArcArrowProcessContent') &&
188
+ !hasComponentName(node.type, 'ArcArrowProcessIcon')
189
+ );
190
+ });
191
+ });
192
+
193
+ const positionStyle = computed(() => {
194
+ if (resolvedCount.value === 2) {
195
+ switch (resolvedIndex.value) {
196
+ case 0: {
197
+ // Left descending arrow (lowered to flank)
198
+ return 'left: 30px; top: 165px; width: 270px;';
199
+ }
200
+ case 1: {
201
+ // Right ascending arrow (lowered to flank)
202
+ return 'right: 30px; top: 165px; width: 270px;';
203
+ }
204
+ default: {
205
+ return '';
206
+ }
207
+ }
208
+ }
209
+
210
+ if (resolvedCount.value === 3) {
211
+ switch (resolvedIndex.value) {
212
+ case 0: {
213
+ // Left descending arrow (lowered to bottom-left flank)
214
+ return 'left: 20px; top: 180px; width: 230px;';
215
+ }
216
+ case 1: {
217
+ // Bottom center trough
218
+ return 'left: calc(50% - 120px); top: 250px; width: 240px;';
219
+ }
220
+ case 2: {
221
+ // Right ascending arrow (lowered to bottom-right flank)
222
+ return 'right: 20px; top: 180px; width: 230px;';
223
+ }
224
+ default: {
225
+ return '';
226
+ }
227
+ }
228
+ }
229
+
230
+ // 4-arrow layout matching design reference
231
+ switch (resolvedIndex.value) {
232
+ case 0: {
233
+ // Top-Left (left of arrow 1)
234
+ return 'left: 8px; top: 20px; width: 245px;';
235
+ }
236
+ case 1: {
237
+ // Bottom-Left (under arrow 2)
238
+ return 'left: 175px; top: 250px; width: 240px;';
239
+ }
240
+ case 2: {
241
+ // Bottom-Right (under arrow 3)
242
+ return 'left: 575px; top: 250px; width: 240px;';
243
+ }
244
+ case 3: {
245
+ // Top-Right (right of arrow 4)
246
+ return 'right: 8px; top: 20px; width: 245px;';
247
+ }
248
+ default: {
249
+ return '';
250
+ }
251
+ }
252
+ });
253
+
254
+ const animation = computed(() => {
255
+ return rootContext?.animation?.value ?? true;
256
+ });
257
+
258
+ const hasIcon = computed(() => {
259
+ if (props.icon === false || props.icon === 'false') {
260
+ return false;
261
+ }
262
+
263
+ if (slots.icon || iconNode.value) {
264
+ return true;
265
+ }
266
+
267
+ const iconVal = props.icon !== undefined ? props.icon : activeItem.value.icon;
268
+
269
+ if (!iconVal || iconVal === 'false') {
270
+ return false;
271
+ }
272
+
273
+ if (typeof iconVal === 'string' && iconVal.trim() === '') {
274
+ return false;
275
+ }
276
+
277
+ return true;
278
+ });
279
+ </script>
280
+
281
+ <template>
282
+ <div
283
+ v-if="resolvedIndex < resolvedCount"
284
+ :class="[
285
+ 'alpha-arc-arrow-process-callout absolute flex items-start justify-between gap-3 text-left z-10 transition-all duration-300 pointer-events-auto select-none',
286
+ `alpha-arc-arrow-process-callout--${resolvedIndex}`,
287
+ { 'alpha-arc-arrow-process-callout--animated': animation },
288
+ ]"
289
+ :style="[
290
+ positionStyle,
291
+ {
292
+ fontFamily:
293
+ 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif',
294
+ },
295
+ ]"
296
+ >
297
+ <!-- Text Column (Heading + Description) -->
298
+ <div class="flex-1 flex flex-col items-start min-w-0">
299
+ <!-- Title -->
300
+ <slot name="title">
301
+ <component :is="headingNode" v-if="headingNode" />
302
+ <ArcArrowProcessHeading v-else :color="activeItem.titleColor">
303
+ {{ activeItem.title }}
304
+ </ArcArrowProcessHeading>
305
+ </slot>
306
+ <!-- Description -->
307
+ <slot name="description">
308
+ <component :is="contentNode" v-if="contentNode" />
309
+ <ArcArrowProcessContent v-else :color="props.textColor">
310
+ </ArcArrowProcessContent>
311
+ </slot>
312
+ <!-- Other slotted nodes -->
313
+ <component
314
+ :is="node"
315
+ v-for="(node, idx) in otherSlottedNodes"
316
+ :key="idx"
317
+ />
318
+ </div>
319
+ <!-- Outline Icon beside text block -->
320
+ <div v-if="hasIcon" class="shrink-0 mt-1">
321
+ <slot name="icon">
322
+ <component :is="iconNode" v-if="iconNode" />
323
+ <ArcArrowProcessIcon
324
+ v-else
325
+ :icon="activeItem.icon"
326
+ :color="activeItem.titleColor"
327
+ :size="36"
328
+ />
329
+ </slot>
330
+ </div>
331
+ </div>
332
+ </template>
333
+
334
+ <style scoped>
335
+ .alpha-arc-arrow-process-callout--animated.alpha-arc-arrow-process-callout--0 {
336
+ animation: arc-arrow-callout-fade 400ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--arc-arrow-start-delay, 0ms) + 120ms) both;
337
+ }
338
+
339
+ .alpha-arc-arrow-process-callout--animated.alpha-arc-arrow-process-callout--1 {
340
+ animation: arc-arrow-callout-fade 400ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--arc-arrow-start-delay, 0ms) + 200ms) both;
341
+ }
342
+
343
+ .alpha-arc-arrow-process-callout--animated.alpha-arc-arrow-process-callout--2 {
344
+ animation: arc-arrow-callout-fade 400ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--arc-arrow-start-delay, 0ms) + 280ms) both;
345
+ }
346
+
347
+ .alpha-arc-arrow-process-callout--animated.alpha-arc-arrow-process-callout--3 {
348
+ animation: arc-arrow-callout-fade 400ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--arc-arrow-start-delay, 0ms) + 360ms) both;
349
+ }
350
+
351
+ @keyframes arc-arrow-callout-fade {
352
+ 0% {
353
+ opacity: 0;
354
+ transform: translateY(10px) scale(0.97);
355
+ }
356
+ 100% {
357
+ opacity: 1;
358
+ transform: translateY(0) scale(1);
359
+ }
360
+ }
361
+ </style>
@@ -0,0 +1,38 @@
1
+ <script setup lang="ts">
2
+ import { computed, inject } from 'vue';
3
+
4
+ import { ARC_ARROW_PROCESS_CALLOUT_KEY } from '../../utils/arcArrowProcess';
5
+
6
+ defineOptions({
7
+ name: 'ArcArrowProcessContent',
8
+ });
9
+
10
+ export interface IArcArrowProcessContentProps {
11
+ readonly color?: string;
12
+ }
13
+
14
+ const props = withDefaults(defineProps<IArcArrowProcessContentProps>(), {
15
+ color: undefined,
16
+ });
17
+
18
+ const calloutContext = inject(ARC_ARROW_PROCESS_CALLOUT_KEY, undefined);
19
+
20
+ const contentColor = computed(() => {
21
+ return props.color;
22
+ });
23
+ </script>
24
+
25
+ <template>
26
+ <div
27
+ class="alpha-arc-arrow-process-content text-[1rem] leading-[1.45] font-normal select-none"
28
+ :style="{
29
+ color: contentColor,
30
+ fontFamily:
31
+ 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif',
32
+ }"
33
+ >
34
+ <slot>
35
+ {{ calloutContext?.item.value.description }}
36
+ </slot>
37
+ </div>
38
+ </template>
@@ -0,0 +1,43 @@
1
+ <script setup lang="ts">
2
+ import { computed, inject } from 'vue';
3
+
4
+ import { ARC_ARROW_PROCESS_CALLOUT_KEY } from '../../utils/arcArrowProcess';
5
+
6
+ defineOptions({
7
+ name: 'ArcArrowProcessHeading',
8
+ });
9
+
10
+ export interface IArcArrowProcessHeadingProps {
11
+ readonly color?: string;
12
+ }
13
+
14
+ const props = withDefaults(defineProps<IArcArrowProcessHeadingProps>(), {
15
+ color: undefined,
16
+ });
17
+
18
+ const calloutContext = inject(ARC_ARROW_PROCESS_CALLOUT_KEY, undefined);
19
+
20
+ const headingColor = computed(() => {
21
+ return (
22
+ props.color ??
23
+ calloutContext?.item.value.color ??
24
+ calloutContext?.item.value.titleColor ??
25
+ '#1e293b'
26
+ );
27
+ });
28
+ </script>
29
+
30
+ <template>
31
+ <div
32
+ class="alpha-arc-arrow-process-heading font-bold text-[1.25rem] leading-tight mb-1.5 select-none"
33
+ :style="{
34
+ color: headingColor,
35
+ fontFamily:
36
+ 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif',
37
+ }"
38
+ >
39
+ <slot>
40
+ {{ calloutContext?.item.value.title }}
41
+ </slot>
42
+ </div>
43
+ </template>
@@ -0,0 +1,154 @@
1
+ <script setup lang="ts">
2
+ import { computed, useSlots } from 'vue';
3
+
4
+ defineOptions({
5
+ name: 'ArcArrowProcessIcon',
6
+ });
7
+
8
+ export interface IArcArrowProcessIconProps {
9
+ readonly size?: number;
10
+ readonly color?: string;
11
+ readonly icon?: string | object | false;
12
+ }
13
+
14
+ const props = withDefaults(defineProps<IArcArrowProcessIconProps>(), {
15
+ size: 36,
16
+ icon: undefined,
17
+ color: '#888d94',
18
+ });
19
+
20
+ const slots = useSlots();
21
+
22
+ const isStringIcon = computed((): boolean => {
23
+ return typeof props.icon === 'string';
24
+ });
25
+
26
+ const isComponentIcon = computed((): boolean => {
27
+ return typeof props.icon === 'object' && props.icon !== null;
28
+ });
29
+
30
+ const hasIcon = computed((): boolean => {
31
+ if (props.icon === false || props.icon === 'false') {
32
+ return false;
33
+ }
34
+
35
+ return Boolean(slots.default) || (Boolean(props.icon) && props.icon !== '');
36
+ });
37
+
38
+ const resolvedIconClass = computed((): string => {
39
+ if (typeof props.icon !== 'string') {
40
+ return '';
41
+ }
42
+
43
+ const str = props.icon.trim();
44
+
45
+ if (str.startsWith('i-')) {
46
+ return str;
47
+ }
48
+
49
+ if (str.includes(':')) {
50
+ return `i-${str.replace(':', '-')}`;
51
+ }
52
+
53
+ return str;
54
+ });
55
+
56
+ const isFolder = computed((): boolean => {
57
+ return props.icon === 'folder';
58
+ });
59
+
60
+ const isInbox = computed((): boolean => {
61
+ return props.icon === 'inbox';
62
+ });
63
+
64
+ const isBriefcase = computed((): boolean => {
65
+ return props.icon === 'briefcase';
66
+ });
67
+ </script>
68
+
69
+ <template>
70
+ <div
71
+ v-if="hasIcon"
72
+ class="alpha-arc-arrow-process-icon flex items-center justify-center shrink-0 pointer-events-none select-none opacity-85"
73
+ :style="{
74
+ color: props.color,
75
+ width: `${props.size}px`,
76
+ height: `${props.size}px`,
77
+ }"
78
+ >
79
+ <slot>
80
+ <component
81
+ :is="props.icon"
82
+ v-if="isComponentIcon"
83
+ class="w-full h-full"
84
+ :style="{ color: props.color }"
85
+ />
86
+ <!-- Built-in Folder Outline Icon matching design reference -->
87
+ <svg
88
+ v-else-if="isFolder"
89
+ class="w-full h-full"
90
+ viewBox="0 0 24 24"
91
+ fill="none"
92
+ stroke="currentColor"
93
+ stroke-width="1.8"
94
+ stroke-linecap="round"
95
+ stroke-linejoin="round"
96
+ >
97
+ <path d="M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z" />
98
+ </svg>
99
+ <!-- Built-in Inbox/Tray Outline Icon matching design reference -->
100
+ <svg
101
+ v-else-if="isInbox"
102
+ class="w-full h-full"
103
+ viewBox="0 0 24 24"
104
+ fill="none"
105
+ stroke="currentColor"
106
+ stroke-width="1.8"
107
+ stroke-linecap="round"
108
+ stroke-linejoin="round"
109
+ >
110
+ <path d="M12 3v10" />
111
+ <path d="m8 9 4 4 4-4" />
112
+ <path d="M3 14h5.2a2 2 0 0 1 1.6.8l1.2 1.6c.4.6 1 .9 1.8.9h0c.8 0 1.4-.3 1.8-.9l1.2-1.6a2 2 0 0 1 1.6-.8H21v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Z" />
113
+ </svg>
114
+ <!-- Built-in Briefcase Outline Icon matching design reference -->
115
+ <svg
116
+ v-else-if="isBriefcase"
117
+ class="w-full h-full"
118
+ viewBox="0 0 24 24"
119
+ fill="none"
120
+ stroke="currentColor"
121
+ stroke-width="1.8"
122
+ stroke-linecap="round"
123
+ stroke-linejoin="round"
124
+ >
125
+ <rect width="20" height="14" x="2" y="7" rx="2" ry="2" />
126
+ <path d="M16 7V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2" />
127
+ <path d="M11 12h2" />
128
+ </svg>
129
+ <!-- UnoCSS / Custom class icon -->
130
+ <span
131
+ v-else-if="isStringIcon && resolvedIconClass"
132
+ :class="resolvedIconClass"
133
+ class="inline-block"
134
+ :style="{
135
+ color: props.color,
136
+ width: `${props.size}px`,
137
+ height: `${props.size}px`,
138
+ fontSize: `${props.size}px`,
139
+ }"
140
+ />
141
+ <!-- Text fallback -->
142
+ <span
143
+ v-else-if="isStringIcon"
144
+ class="inline-block font-semibold"
145
+ :style="{
146
+ color: props.color,
147
+ fontSize: `${props.size * 0.75}px`,
148
+ }"
149
+ >
150
+ {{ props.icon }}
151
+ </span>
152
+ </slot>
153
+ </div>
154
+ </template>