@meistrari/chat-nuxt 3.9.2 → 3.11.0

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 (106) hide show
  1. package/README.md +50 -440
  2. package/dist/module.d.mts +1 -1
  3. package/dist/module.json +1 -1
  4. package/dist/runtime/assets/css/markstream.css +1 -1
  5. package/dist/runtime/conversations/components/chat-conversation-creator-filter.vue +11 -67
  6. package/dist/runtime/conversations/components/chat-conversation-item.d.vue.ts +2 -1
  7. package/dist/runtime/conversations/components/chat-conversation-item.vue +29 -33
  8. package/dist/runtime/conversations/components/chat-conversation-item.vue.d.ts +2 -1
  9. package/dist/runtime/conversations/components/chat-conversation-list.d.vue.ts +0 -1
  10. package/dist/runtime/conversations/components/chat-conversation-list.vue +117 -158
  11. package/dist/runtime/conversations/components/chat-conversation-list.vue.d.ts +0 -1
  12. package/dist/runtime/conversations/components/chat-conversation-new-group-button.vue +34 -73
  13. package/dist/runtime/conversations/components/chat-conversation-search.vue +1 -21
  14. package/dist/runtime/conversations/components/chat-widget-history-list.d.vue.ts +12 -0
  15. package/dist/runtime/conversations/components/chat-widget-history-list.vue +27 -0
  16. package/dist/runtime/conversations/components/chat-widget-history-list.vue.d.ts +12 -0
  17. package/dist/runtime/conversations/composables/conversation-groups.d.ts +1 -0
  18. package/dist/runtime/conversations/composables/conversation-groups.js +2 -0
  19. package/dist/runtime/conversations/composables/conversation-item.js +4 -4
  20. package/dist/runtime/conversations/composables/conversation-list.js +14 -5
  21. package/dist/runtime/embed/components/chat-configuration-modal.d.vue.ts +3 -3
  22. package/dist/runtime/embed/components/chat-configuration-modal.vue.d.ts +3 -3
  23. package/dist/runtime/embed/components/chat-embed-inner.d.vue.ts +6 -3
  24. package/dist/runtime/embed/components/chat-embed-inner.vue +442 -174
  25. package/dist/runtime/embed/components/chat-embed-inner.vue.d.ts +6 -3
  26. package/dist/runtime/embed/components/chat-embed.d.vue.ts +31 -4
  27. package/dist/runtime/embed/components/chat-embed.vue +10 -4
  28. package/dist/runtime/embed/components/chat-embed.vue.d.ts +31 -4
  29. package/dist/runtime/embed/components/chat-topbar.vue +83 -85
  30. package/dist/runtime/embed/components/meistrari-chat-embed.d.vue.ts +5 -3
  31. package/dist/runtime/embed/components/meistrari-chat-embed.vue +118 -57
  32. package/dist/runtime/embed/components/meistrari-chat-embed.vue.d.ts +5 -3
  33. package/dist/runtime/embed/components/mobile/chat-mobile-drawer.d.vue.ts +0 -1
  34. package/dist/runtime/embed/components/mobile/chat-mobile-drawer.vue +2 -45
  35. package/dist/runtime/embed/components/mobile/chat-mobile-drawer.vue.d.ts +0 -1
  36. package/dist/runtime/embed/components/mobile/chat-mobile-home-suggestions.d.vue.ts +9 -5
  37. package/dist/runtime/embed/components/mobile/chat-mobile-home-suggestions.vue +14 -25
  38. package/dist/runtime/embed/components/mobile/chat-mobile-home-suggestions.vue.d.ts +9 -5
  39. package/dist/runtime/embed/components/mobile/chat-mobile-shell.d.vue.ts +4 -4
  40. package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue +2 -4
  41. package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue.d.ts +4 -4
  42. package/dist/runtime/embed/composables/use-agent-wake.d.ts +23 -0
  43. package/dist/runtime/embed/composables/use-agent-wake.js +182 -0
  44. package/dist/runtime/embed/feature-config.d.ts +7 -0
  45. package/dist/runtime/embed/feature-config.js +2 -1
  46. package/dist/runtime/embed/loading-messages.d.ts +16 -0
  47. package/dist/runtime/embed/loading-messages.js +10 -0
  48. package/dist/runtime/embed/types.d.ts +47 -8
  49. package/dist/runtime/files/icons.d.ts +1 -1
  50. package/dist/runtime/files/icons.js +1 -1
  51. package/dist/runtime/messages/components/chat-mention-dropdown.d.vue.ts +6 -1
  52. package/dist/runtime/messages/components/chat-mention-dropdown.vue +46 -22
  53. package/dist/runtime/messages/components/chat-mention-dropdown.vue.d.ts +6 -1
  54. package/dist/runtime/messages/components/chat-message-bubble.d.vue.ts +10 -1
  55. package/dist/runtime/messages/components/chat-message-bubble.vue +69 -76
  56. package/dist/runtime/messages/components/chat-message-bubble.vue.d.ts +10 -1
  57. package/dist/runtime/messages/components/chat-message-feedback.vue +25 -229
  58. package/dist/runtime/messages/components/chat-message-input.vue +176 -134
  59. package/dist/runtime/messages/components/chat-message-list.d.vue.ts +12 -1
  60. package/dist/runtime/messages/components/chat-message-list.vue +37 -24
  61. package/dist/runtime/messages/components/chat-message-list.vue.d.ts +12 -1
  62. package/dist/runtime/messages/components/chat-model-selector.vue +10 -22
  63. package/dist/runtime/messages/components/reasoning/chat-reasoning-message.vue +2 -3
  64. package/dist/runtime/messages/components/reasoning/chat-reasoning-thought.d.vue.ts +2 -1
  65. package/dist/runtime/messages/components/reasoning/chat-reasoning-thought.vue +69 -77
  66. package/dist/runtime/messages/components/reasoning/chat-reasoning-thought.vue.d.ts +2 -1
  67. package/dist/runtime/messages/components/reasoning/chat-thinking-indicator.vue +3 -9
  68. package/dist/runtime/messages/components/widgets/chat-bash-widget.vue +3 -12
  69. package/dist/runtime/messages/components/widgets/chat-doc-sdk-widget.vue +3 -12
  70. package/dist/runtime/messages/components/widgets/chat-generic-tool-widget.vue +3 -12
  71. package/dist/runtime/messages/components/widgets/chat-grep-widget.vue +7 -17
  72. package/dist/runtime/messages/components/widgets/chat-read-widget.vue +7 -17
  73. package/dist/runtime/messages/components/widgets/chat-tela-skill-widget.vue +4 -13
  74. package/dist/runtime/messages/components/widgets/chat-thinking-widget.vue +11 -22
  75. package/dist/runtime/messages/components/widgets/chat-web-search-widget.vue +13 -40
  76. package/dist/runtime/messages/components/widgets/chat-workstation-query-widget.vue +52 -65
  77. package/dist/runtime/messages/components/widgets/chat-write-widget.vue +8 -18
  78. package/dist/runtime/messages/composables/chat.d.ts +8 -2
  79. package/dist/runtime/messages/composables/chat.js +180 -25
  80. package/dist/runtime/messages/composables/mention-autocomplete.js +4 -0
  81. package/dist/runtime/messages/composables/use-direct-stream.d.ts +41 -0
  82. package/dist/runtime/messages/composables/use-direct-stream.js +263 -0
  83. package/dist/runtime/messages/message-state.js +1 -0
  84. package/dist/runtime/messages/reasoning.d.ts +7 -0
  85. package/dist/runtime/messages/reasoning.js +5 -0
  86. package/dist/runtime/public/files/generic.svg +2 -5
  87. package/dist/runtime/public/files/image.svg +2 -1
  88. package/dist/runtime/types/embed.d.ts +1 -1
  89. package/dist/runtime/types/schemas/chat/conversations.d.ts +4 -0
  90. package/dist/runtime/types/schemas/chat/conversations.js +3 -0
  91. package/dist/runtime/types/schemas/chat/messages.d.ts +43 -0
  92. package/dist/runtime/types/schemas/chat/messages.js +31 -0
  93. package/dist/runtime/types/schemas/chat/models.d.ts +3 -2
  94. package/dist/runtime/types/schemas/chat/models.js +2 -1
  95. package/dist/runtime/types/schemas/chat/ui.d.ts +10 -0
  96. package/dist/runtime/types/schemas/chat/ui.js +1 -0
  97. package/dist/runtime/types/schemas/integrations/tela-agent-api.d.ts +35 -0
  98. package/dist/runtime/types/schemas/integrations/tela-agent-api.js +17 -0
  99. package/dist/types.d.mts +1 -1
  100. package/package.json +5 -4
  101. package/dist/runtime/conversations/components/chat-conversation-new-group-popover-content.d.vue.ts +0 -23
  102. package/dist/runtime/conversations/components/chat-conversation-new-group-popover-content.vue +0 -75
  103. package/dist/runtime/conversations/components/chat-conversation-new-group-popover-content.vue.d.ts +0 -23
  104. package/dist/runtime/messages/components/reasoning/chat-reasoning-step-item.d.vue.ts +0 -37
  105. package/dist/runtime/messages/components/reasoning/chat-reasoning-step-item.vue +0 -125
  106. package/dist/runtime/messages/components/reasoning/chat-reasoning-step-item.vue.d.ts +0 -37
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { chatModelSchema } from '../chat/models';
2
3
  export const telaAgentAttachmentSchema = z.object({
3
4
  vaultRef: z.string().startsWith('vault://'),
4
5
  filename: z.string().min(1).max(255),
@@ -43,6 +44,7 @@ export const telaAgentContextFileSchema = z.object({
43
44
  });
44
45
  export const telaAgentSchema = z.object({
45
46
  id: z.string(),
47
+ projectId: z.string().optional(),
46
48
  organizationName: z.string().optional(),
47
49
  repository: z.string().optional(),
48
50
  publishedId: z.string().nullable().optional(),
@@ -99,16 +101,31 @@ export const telaAgentSessionResultSchema = z.object({
99
101
  structuredContent: z.record(z.string(), z.unknown()).optional(),
100
102
  childEventIds: z.array(z.string()).optional(),
101
103
  }).catchall(z.unknown());
104
+ export const telaAgentDirectStreamSchema = z.object({
105
+ url: z.string().url(),
106
+ token: z.string().min(1),
107
+ expiresAt: z.number(),
108
+ runId: z.string().min(1),
109
+ });
102
110
  export const telaAgentSessionSchema = z.object({
103
111
  sessionId: z.string(),
104
112
  status: telaAgentSessionStatusSchema,
105
113
  steps: z.array(telaAgentStepSchema),
106
114
  nextCursor: z.number().nullable().optional(),
115
+ directStream: telaAgentDirectStreamSchema.optional(),
107
116
  result: telaAgentSessionResultSchema.optional(),
108
117
  error: z.string().optional(),
109
118
  createdAt: z.number().optional(),
110
119
  updatedAt: z.number().optional(),
111
120
  }).catchall(z.unknown());
121
+ export const telaAgentWakeRequestSchema = z.object({
122
+ sessionId: z.string().uuid().optional(),
123
+ model: chatModelSchema.optional(),
124
+ });
125
+ export const telaAgentWakeResponseSchema = z.object({
126
+ status: z.enum(['waking', 'ready', 'unavailable']),
127
+ sessionId: z.string().optional(),
128
+ });
112
129
  export const telaAgentV4SessionStatusEventSchema = z.object({
113
130
  kind: z.literal('status'),
114
131
  sessionId: z.string(),
package/dist/types.d.mts CHANGED
@@ -6,7 +6,7 @@ export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<
6
6
 
7
7
  export { ChatMessageStatus } from '../dist/runtime/messages/composables/chat-message-terminal.js'
8
8
 
9
- export { type ChatActionPayload, type ChatActor, type ChatEmbedSharedProps, type ChatFeatureConfig, type ChatMessageTerminalPayload, type ChatSidebarConfig, type DefaultChatEmbedProps, type MeistrariChatEmbedProps, type MessageFeedbackConfig, type MessageFeedbackPayload, type MessageFeedbackRating, type MessageOverviewResponse, type TelaAgentChatEmbedProps, type TelaAgentExecutionInput } from '../dist/runtime/types/embed.js'
9
+ export { type ChatActionPayload, type ChatActor, type ChatEmbedSharedProps, type ChatEmbedVariant, type ChatEmbedVariantProps, type ChatFeatureConfig, type ChatMessageTerminalPayload, type ChatSidebarConfig, type ChatSuggestion, type DefaultChatEmbedProps, type MeistrariChatEmbedProps, type MessageFeedbackConfig, type MessageFeedbackPayload, type MessageFeedbackRating, type MessageOverviewResponse, type TelaAgentChatEmbedProps, type TelaAgentExecutionInput } from '../dist/runtime/types/embed.js'
10
10
 
11
11
  export { default } from './module.mjs'
12
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
- "version": "3.9.2",
3
+ "version": "3.11.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -22,6 +22,7 @@
22
22
  "dist"
23
23
  ],
24
24
  "scripts": {
25
+ "postinstall": "nuxi prepare",
25
26
  "build": "mkdir -p .nuxt && { [ -f .nuxt/tsconfig.json ] || printf '{}' > .nuxt/tsconfig.json; } && { [ -f .nuxt/tsconfig.server.json ] || printf '{}' > .nuxt/tsconfig.server.json; } && nuxt-module-build build && node ./scripts/embed-local-schemas.mjs && node ./scripts/polish-embed-declarations.mjs",
26
27
  "dev:prepare": "nuxt-module-build build --stub",
27
28
  "test:types": "pnpm build && tsc -p tsconfig.type-tests.json --noEmit",
@@ -33,7 +34,7 @@
33
34
  "typecheck": "cd ../.. && TYPECHECK_CWD=packages/chat-app ./scripts/typecheck.sh"
34
35
  },
35
36
  "peerDependencies": {
36
- "nuxt": "^3.17.0",
37
+ "nuxt": "^3.17.0 || ^4.0.0",
37
38
  "vue": "^3.5.0"
38
39
  },
39
40
  "dependencies": {
@@ -41,7 +42,7 @@
41
42
  "@iconify/vue": "^5.0.0",
42
43
  "@meistrari/auth-nuxt": "3.5.0",
43
44
  "@meistrari/logger": "^2.1.3",
44
- "@meistrari/tela-build": "^1.30.0",
45
+ "@meistrari/tela-build": "^1.59.2",
45
46
  "@sentry/nuxt": "^10.0.0",
46
47
  "@vueuse/components": "^12.8.0",
47
48
  "@vueuse/core": "^12.8.0",
@@ -66,7 +67,7 @@
66
67
  "@types/node": "^20.19.0",
67
68
  "dotenv-cli": "^11.0.0",
68
69
  "eslint": "9.16.0",
69
- "nuxt": "3.17.7",
70
+ "nuxt": "4.4.8",
70
71
  "pino": "^10.3.1",
71
72
  "pino-pretty": "^13.1.3",
72
73
  "playwright": "^1.61.0",
@@ -1,23 +0,0 @@
1
- type __VLS_Props = {
2
- errorMessage?: string | null;
3
- saving?: boolean;
4
- };
5
- declare function focusInput(): void;
6
- type __VLS_ModelProps = {
7
- modelValue: string;
8
- };
9
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
- declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
11
- focusInput: typeof focusInput;
12
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
- "update:modelValue": (value: string) => any;
14
- } & {
15
- submit: () => any;
16
- cancel: () => any;
17
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
18
- onSubmit?: (() => any) | undefined;
19
- onCancel?: (() => any) | undefined;
20
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
21
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
- declare const _default: typeof __VLS_export;
23
- export default _default;
@@ -1,75 +0,0 @@
1
- <script setup>
2
- defineProps({
3
- errorMessage: { type: [String, null], required: false },
4
- saving: { type: Boolean, required: false }
5
- });
6
- const emit = defineEmits(["submit", "cancel"]);
7
- const groupName = defineModel({ type: String, ...{ required: true } });
8
- const inputRef = ref(null);
9
- function focusInput() {
10
- inputRef.value?.focus();
11
- }
12
- defineExpose({
13
- focusInput
14
- });
15
- </script>
16
-
17
- <template>
18
- <TelaPopoverContent
19
- align="end"
20
- :side-offset="4"
21
- data-chat-sidebar-floating
22
- class="!w-auto !rounded-12px !border-neutral-200 !bg-white !p-0 !text-neutral-900 !shadow-lg"
23
- >
24
- <form w-236px p-8px flex="~ col" gap-8px @submit.prevent="emit('submit')">
25
- <input
26
- ref="inputRef"
27
- v-model="groupName"
28
- type="text"
29
- autocomplete="off"
30
- maxlength="80"
31
- placeholder="Nome da pasta"
32
- aria-label="Nome da pasta"
33
- h-32px w-full
34
- px-10px
35
- rounded-8px
36
- b=".5px neutral-300"
37
- bg-white
38
- outline-none
39
- text-14px text-neutral-900 leading-18px
40
- focus:b-neutral-900
41
- @keydown.escape.prevent.stop="emit('cancel')"
42
- >
43
- <p
44
- v-if="errorMessage"
45
- text-12px text-red-600 leading-16px
46
- aria-live="polite"
47
- >
48
- {{ errorMessage }}
49
- </p>
50
- <div flex justify-end gap-6px>
51
- <button
52
- type="button"
53
- h-28px px-10px rounded-8px
54
- text-13px font-medium text-neutral-700
55
- hover:bg-neutral-100
56
- transition-colors
57
- @click="emit('cancel')"
58
- >
59
- Cancelar
60
- </button>
61
- <button
62
- type="submit"
63
- h-28px px-10px rounded-8px
64
- bg-neutral-900 text-white
65
- text-13px font-medium
66
- transition-opacity
67
- :disabled="!groupName.trim() || saving"
68
- :class="(!groupName.trim() || saving) && 'opacity-40 cursor-not-allowed'"
69
- >
70
- Criar
71
- </button>
72
- </div>
73
- </form>
74
- </TelaPopoverContent>
75
- </template>
@@ -1,23 +0,0 @@
1
- type __VLS_Props = {
2
- errorMessage?: string | null;
3
- saving?: boolean;
4
- };
5
- declare function focusInput(): void;
6
- type __VLS_ModelProps = {
7
- modelValue: string;
8
- };
9
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
- declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
11
- focusInput: typeof focusInput;
12
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
- "update:modelValue": (value: string) => any;
14
- } & {
15
- submit: () => any;
16
- cancel: () => any;
17
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
18
- onSubmit?: (() => any) | undefined;
19
- onCancel?: (() => any) | undefined;
20
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
21
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
- declare const _default: typeof __VLS_export;
23
- export default _default;
@@ -1,37 +0,0 @@
1
- interface Props {
2
- title: string;
3
- icon?: string;
4
- isLast?: boolean;
5
- isFirst?: boolean;
6
- defaultExpanded?: boolean;
7
- hasResult?: boolean;
8
- isError?: boolean;
9
- isTextStep?: boolean;
10
- hideExpand?: boolean;
11
- isActive?: boolean;
12
- completed?: boolean;
13
- }
14
- declare var __VLS_7: {};
15
- type __VLS_Slots = {} & {
16
- default?: (props: typeof __VLS_7) => any;
17
- };
18
- declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
19
- isError: boolean;
20
- completed: boolean;
21
- isActive: boolean;
22
- icon: string;
23
- isLast: boolean;
24
- isFirst: boolean;
25
- defaultExpanded: boolean;
26
- hasResult: boolean;
27
- isTextStep: boolean;
28
- hideExpand: boolean;
29
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
- declare const _default: typeof __VLS_export;
32
- export default _default;
33
- type __VLS_WithSlots<T, S> = T & {
34
- new (): {
35
- $slots: S;
36
- };
37
- };
@@ -1,125 +0,0 @@
1
- <script setup>
2
- const props = defineProps({
3
- title: { type: String, required: true },
4
- icon: { type: String, required: false, default: "i-ph-info" },
5
- isLast: { type: Boolean, required: false, default: false },
6
- isFirst: { type: Boolean, required: false, default: false },
7
- defaultExpanded: { type: Boolean, required: false, default: false },
8
- hasResult: { type: Boolean, required: false, default: false },
9
- isError: { type: Boolean, required: false, default: false },
10
- isTextStep: { type: Boolean, required: false, default: false },
11
- hideExpand: { type: Boolean, required: false, default: false },
12
- isActive: { type: Boolean, required: false, default: false },
13
- completed: { type: Boolean, required: false, default: false }
14
- });
15
- const isWaitingForNext = computed(() => {
16
- return props.isLast && props.hasResult && !props.completed;
17
- });
18
- const isExpanded = ref(props.defaultExpanded);
19
- watch(() => props.defaultExpanded, (newVal) => {
20
- isExpanded.value = newVal;
21
- });
22
- function toggle() {
23
- isExpanded.value = !isExpanded.value;
24
- }
25
- </script>
26
-
27
- <template>
28
- <div class="relative flex gap-12px group/step">
29
- <!-- Status Icon -->
30
- <div class="flex flex-col items-center flex-shrink-0" :class="{ 'pb-8px': !isLast || !completed }">
31
- <div class="flex items-center justify-center w-24px h-24px group-hover/step:text-gray-700 transition-colors">
32
- <!-- COMPLETED STATE: Show specific type icons -->
33
- <template v-if="completed">
34
- <!-- Show error icon if there's an error -->
35
- <div
36
- v-if="isError"
37
- class="text-14px text-tertiary i-ph-x-circle"
38
- />
39
- <!-- Show specific icon for the step type -->
40
- <div
41
- v-else
42
- class="text-14px text-tertiary"
43
- :class="icon"
44
- />
45
- </template>
46
-
47
- <!-- EXECUTING STATE: Show loading/check icons -->
48
- <template v-else>
49
- <!-- Active step: loading spinner -->
50
- <div
51
- v-if="isActive || isWaitingForNext"
52
- class="text-14px text-tertiary animate-spin i-ph-circle-notch"
53
- />
54
- <!-- Tool without result yet: loading spinner -->
55
- <div
56
- v-else-if="!isTextStep && !hasResult"
57
- class="text-14px text-tertiary animate-spin i-ph-circle-notch"
58
- />
59
- <!-- Text step completed: check icon -->
60
- <div
61
- v-else-if="isTextStep"
62
- class="text-14px text-tertiary i-ph-check-circle"
63
- />
64
- <!-- Tool completed with error: x icon -->
65
- <div
66
- v-else-if="isError"
67
- class="text-14px text-tertiary i-ph-x-circle"
68
- />
69
- <!-- Tool completed successfully: check icon -->
70
- <div
71
- v-else
72
- class="text-14px text-tertiary i-ph-check-circle"
73
- />
74
- </template>
75
- </div>
76
- </div>
77
-
78
- <!-- Content Area -->
79
- <div class="flex-1 min-w-0" :class="{ 'pb-8px': !isLast || !completed }">
80
- <!-- Non-expandable title (when content is same as title) -->
81
- <div v-if="hideExpand" class="h-24px flex items-center">
82
- <span class="text-14px font-medium text-tertiary leading-18px">
83
- {{ title }}
84
- </span>
85
- </div>
86
-
87
- <!-- Expandable title (default) -->
88
- <template v-else>
89
- <!-- Trigger (Header) -->
90
- <button
91
- type="button"
92
- class="h-24px flex items-center gap-4px w-full text-left focus:outline-none group/title"
93
- @click="toggle"
94
- >
95
- <span class="text-14px font-medium text-tertiary group-hover/title:text-gray-700 transition-colors truncate leading-18px">
96
- {{ title }}
97
- </span>
98
- <div
99
- i-ph-caret-right
100
- class="text-12px text-tertiary group-hover/title:text-gray-700 transition-all duration-200 flex-shrink-0"
101
- :class="{ 'rotate-90': isExpanded }"
102
- />
103
- </button>
104
-
105
- <!-- Content (Body) -->
106
- <Transition
107
- enter-active-class="transition-all duration-300 ease-out"
108
- leave-active-class="transition-all duration-200 ease-in"
109
- enter-from-class="opacity-0 -translate-y-4px"
110
- leave-to-class="opacity-0 -translate-y-4px"
111
- >
112
- <div v-if="isExpanded" class="mt-8px overflow-hidden">
113
- <div class="text-14px text-tertiary leading-relaxed">
114
- <slot />
115
- </div>
116
- </div>
117
- </Transition>
118
- </template>
119
- </div>
120
- </div>
121
- </template>
122
-
123
- <style scoped>
124
- .v-enter-active,.v-leave-active{transition:opacity .3s ease,transform .3s ease}.v-enter-from,.v-leave-to{opacity:0;transform:translateY(-4px)}
125
- </style>
@@ -1,37 +0,0 @@
1
- interface Props {
2
- title: string;
3
- icon?: string;
4
- isLast?: boolean;
5
- isFirst?: boolean;
6
- defaultExpanded?: boolean;
7
- hasResult?: boolean;
8
- isError?: boolean;
9
- isTextStep?: boolean;
10
- hideExpand?: boolean;
11
- isActive?: boolean;
12
- completed?: boolean;
13
- }
14
- declare var __VLS_7: {};
15
- type __VLS_Slots = {} & {
16
- default?: (props: typeof __VLS_7) => any;
17
- };
18
- declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
19
- isError: boolean;
20
- completed: boolean;
21
- isActive: boolean;
22
- icon: string;
23
- isLast: boolean;
24
- isFirst: boolean;
25
- defaultExpanded: boolean;
26
- hasResult: boolean;
27
- isTextStep: boolean;
28
- hideExpand: boolean;
29
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
- declare const _default: typeof __VLS_export;
32
- export default _default;
33
- type __VLS_WithSlots<T, S> = T & {
34
- new (): {
35
- $slots: S;
36
- };
37
- };