@meistrari/tela-build 1.30.0 → 1.30.1
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.
|
@@ -31,11 +31,13 @@ const props = withDefaults(defineProps<{
|
|
|
31
31
|
isCloseIconAbsolute?: boolean
|
|
32
32
|
smallTitle?: boolean
|
|
33
33
|
titleClass?: string
|
|
34
|
+
hideEnterAnimation?: boolean
|
|
34
35
|
}>(), {
|
|
35
36
|
modalWidth: 'md',
|
|
36
37
|
isCloseIcon: true,
|
|
37
38
|
isCloseIconAbsolute: false,
|
|
38
39
|
smallTitle: false,
|
|
40
|
+
hideEnterAnimation: false,
|
|
39
41
|
})
|
|
40
42
|
const emit = defineEmits<{
|
|
41
43
|
close: []
|
|
@@ -85,6 +87,7 @@ function handlePointerDownOutside(event: any) {
|
|
|
85
87
|
<DialogPortal>
|
|
86
88
|
<DialogOverlay :class="`DialogOverlay ${overlayClass ?? ''}`" bg="#000/35" z-600 overflow-y-auto flex items-center justify-center :p-16px="!fullscreen">
|
|
87
89
|
<DialogContent
|
|
90
|
+
:data-animation="hideEnterAnimation"
|
|
88
91
|
:class="cn('DialogContent shadow-xl', modalMaxWidth, dialogContentClass)"
|
|
89
92
|
z-101
|
|
90
93
|
rounded-16px
|
|
@@ -199,12 +202,12 @@ function handlePointerDownOutside(event: any) {
|
|
|
199
202
|
width: 400px;
|
|
200
203
|
padding: 24px;
|
|
201
204
|
|
|
202
|
-
&[data-state="open"] {
|
|
205
|
+
[data-animation="false"]&[data-state="open"] {
|
|
203
206
|
animation: contentShow 0.12s ease-out forwards;
|
|
204
207
|
overflow: visible;
|
|
205
208
|
}
|
|
206
209
|
|
|
207
|
-
&[data-state="closed"] {
|
|
210
|
+
[data-animation="false"]&[data-state="closed"] {
|
|
208
211
|
animation: contentHide 0.12s ease-out forwards;
|
|
209
212
|
animation-delay: 0s;
|
|
210
213
|
}
|
|
@@ -930,8 +930,8 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
|
|
|
930
930
|
v-for="pageNum in 2" :key="pageNum"
|
|
931
931
|
relative bg-white rounded-12px overflow-hidden mx-auto
|
|
932
932
|
:class="cn({
|
|
933
|
-
'w-446px min-h-631px': variant === 'default',
|
|
934
|
-
'w-256px min-h-363px': variant === 'minimal',
|
|
933
|
+
'w-full max-w-446px min-h-631px': variant === 'default',
|
|
934
|
+
'w-full max-w-256px min-h-363px': variant === 'minimal',
|
|
935
935
|
})"
|
|
936
936
|
>
|
|
937
937
|
<!-- Page badge -->
|
|
@@ -970,7 +970,7 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
|
|
|
970
970
|
<div
|
|
971
971
|
v-else
|
|
972
972
|
:class="cn({
|
|
973
|
-
'px-
|
|
973
|
+
'px-36px': variant === 'default',
|
|
974
974
|
'px-32px': variant === 'minimal',
|
|
975
975
|
})"
|
|
976
976
|
>
|
|
@@ -978,8 +978,8 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
|
|
|
978
978
|
bg-white rounded-12px
|
|
979
979
|
flex="~ col" justify-between mx-auto relative
|
|
980
980
|
:class="cn({
|
|
981
|
-
'w-446px min-h-631px px-32px py-28px': variant === 'default',
|
|
982
|
-
'w-256px min-h-363px px-16px py-14px': variant === 'minimal',
|
|
981
|
+
'w-full max-w-446px min-h-631px px-32px py-28px': variant === 'default',
|
|
982
|
+
'w-full max-w-256px min-h-363px px-16px py-14px': variant === 'minimal',
|
|
983
983
|
})"
|
|
984
984
|
>
|
|
985
985
|
<div flex="~ col" gap-16px>
|
|
@@ -1041,7 +1041,7 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
|
|
|
1041
1041
|
data-markdown
|
|
1042
1042
|
:data-variant="variant"
|
|
1043
1043
|
:class="cn({
|
|
1044
|
-
'px-
|
|
1044
|
+
'px-36px': variant === 'default',
|
|
1045
1045
|
'px-32px': variant === 'minimal',
|
|
1046
1046
|
'pt-88px': variant === 'default' && props.segmentTab && props.file.fileType === 'application/pdf',
|
|
1047
1047
|
'pt-42px': variant === 'minimal' && props.segmentTab && props.file.fileType === 'application/pdf',
|
|
@@ -1058,8 +1058,8 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
|
|
|
1058
1058
|
<div
|
|
1059
1059
|
bg-white rounded-12px
|
|
1060
1060
|
:class="cn({
|
|
1061
|
-
'w-446px min-h-631px px-32px py-28px': variant === 'default',
|
|
1062
|
-
'w-256px min-h-363px px-16px py-14px': variant === 'minimal',
|
|
1061
|
+
'w-full max-w-446px min-h-631px px-32px py-28px': variant === 'default',
|
|
1062
|
+
'w-full max-w-256px min-h-363px px-16px py-14px': variant === 'minimal',
|
|
1063
1063
|
'h-full overflow-y-auto no-scrollbar': variant === 'default' && props.segmentTab !== 'processed',
|
|
1064
1064
|
})"
|
|
1065
1065
|
mx-auto relative
|
|
@@ -1172,7 +1172,7 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
|
|
|
1172
1172
|
data-pdf-page-card
|
|
1173
1173
|
:data-page-num="pageNum"
|
|
1174
1174
|
relative bg-white rounded-12px overflow-hidden mx-auto
|
|
1175
|
-
:class="cn(variant === 'minimal' && 'w-256px pdf-page-card--minimal')"
|
|
1175
|
+
:class="cn(variant === 'minimal' && 'w-full max-w-256px pdf-page-card--minimal')"
|
|
1176
1176
|
:style="getPagePlaceholderStyle(pageNum)"
|
|
1177
1177
|
>
|
|
1178
1178
|
<canvas />
|
|
@@ -1229,7 +1229,7 @@ watch([() => props.highlightText, () => props.highlightPage, () => props.highlig
|
|
|
1229
1229
|
<template v-else>
|
|
1230
1230
|
<div
|
|
1231
1231
|
:class="cn({
|
|
1232
|
-
'px-
|
|
1232
|
+
'px-36px w-446px': variant === 'default',
|
|
1233
1233
|
'w-256px': variant === 'minimal',
|
|
1234
1234
|
})"
|
|
1235
1235
|
flex items-center justify-center mx-auto
|
|
@@ -80,10 +80,6 @@ function handleDeleteSearchValue() {
|
|
|
80
80
|
search.value = ''
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
const totalOptions = computed(() => {
|
|
84
|
-
return groupedOptions.value.map(group => group.children.length).reduce((a, b) => a + b, 0)
|
|
85
|
-
})
|
|
86
|
-
|
|
87
83
|
const firstColumnWidth = computed(() => {
|
|
88
84
|
const allVariableNames = [...new Set(props.options.map(opt => opt.variable))]
|
|
89
85
|
const allTexts = [
|
|
@@ -155,7 +151,7 @@ function iconSrc(option: PreviewVariableOption): string {
|
|
|
155
151
|
<TelaComboboxTrigger
|
|
156
152
|
as="button"
|
|
157
153
|
tabindex="0"
|
|
158
|
-
class="w-full bg border-0.5px border-strong rounded-10px px-12px py-7px flex items-center justify-between"
|
|
154
|
+
class="w-full bg border-0.5px border-strong rounded-10px px-12px py-7px flex items-center justify-between gap-10px"
|
|
159
155
|
>
|
|
160
156
|
<div class="grid items-center gap-22px w-full min-w-0 grid-cols-[var(--first-col-width,minmax(82px,auto))_1fr]">
|
|
161
157
|
<p body-14-semibold text-start text-primary min-w-0>
|
|
@@ -163,8 +159,9 @@ function iconSrc(option: PreviewVariableOption): string {
|
|
|
163
159
|
</p>
|
|
164
160
|
<div v-if="selectedOption?.file" flex items-center gap-6px min-w-0>
|
|
165
161
|
<img :src="iconSrc(selectedOption)" class="h-16px! w-16px!" alt="">
|
|
166
|
-
<p
|
|
167
|
-
{{ selectedOption.file }}
|
|
162
|
+
<p flex min-w-0 body-14-medium text-primary>
|
|
163
|
+
<span truncate>{{ selectedOption.file.includes('.') ? `${selectedOption.file.replace(/\.[^.]+$/, '')}.` : selectedOption.file }}</span>
|
|
164
|
+
<span flex-shrink-0>{{ selectedOption.file.includes('.') ? (selectedOption.file.match(/[^.]+$/)?.[0] ?? '') : '' }}</span>
|
|
168
165
|
</p>
|
|
169
166
|
</div>
|
|
170
167
|
</div>
|
|
@@ -178,7 +175,7 @@ function iconSrc(option: PreviewVariableOption): string {
|
|
|
178
175
|
</div>
|
|
179
176
|
</TelaComboboxTrigger>
|
|
180
177
|
</TelaComboboxAnchor>
|
|
181
|
-
<TelaComboboxList :class="cn('z-999 w-full', popoverClass)" :disable-portal="true" align="center">
|
|
178
|
+
<TelaComboboxList :class="cn('z-999 w-full max-w-[var(--reka-combobox-trigger-width)]', popoverClass)" :disable-portal="true" align="center">
|
|
182
179
|
<div class="relative">
|
|
183
180
|
<div class="absolute inset-y-0 flex items-center justify-center px-2.5">
|
|
184
181
|
<TelaIcon name="i-ph-magnifying-glass-bold" size="13px" color="neutral-300" />
|
|
@@ -229,14 +226,6 @@ function iconSrc(option: PreviewVariableOption): string {
|
|
|
229
226
|
{{ labels.clear }}
|
|
230
227
|
</TelaButton>
|
|
231
228
|
</TelaComboboxEmpty>
|
|
232
|
-
<div v-if="totalOptions > 0" class="grid items-center gap-22px h-28px px-12px border-b-0.5px border grid-cols-[var(--first-col-width,minmax(82px,auto))_1fr]">
|
|
233
|
-
<span body-12-medium text-secondary lowercase min-w-0>
|
|
234
|
-
{{ labels.variablesLabel }}
|
|
235
|
-
</span>
|
|
236
|
-
<span body-12-medium text-secondary lowercase min-w-0>
|
|
237
|
-
{{ totalOptions }} {{ labels.filesLabel }}
|
|
238
|
-
</span>
|
|
239
|
-
</div>
|
|
240
229
|
<div class="divide-y-0.5px divide-border">
|
|
241
230
|
<div v-for="group in groupedOptions" :key="group.heading" mx-12px>
|
|
242
231
|
<TelaComboboxGroup
|
|
@@ -247,14 +236,17 @@ function iconSrc(option: PreviewVariableOption): string {
|
|
|
247
236
|
v-for="(item, index) in group.children"
|
|
248
237
|
:key="item.value"
|
|
249
238
|
:value="item.value"
|
|
250
|
-
class="grid items-center gap-22px grid-cols-[var(--first-col-width,minmax(82px,auto))
|
|
239
|
+
class="grid items-center gap-22px grid-cols-[var(--first-col-width,minmax(82px,auto))_minmax(0,1fr)] h-32px w-full"
|
|
251
240
|
>
|
|
252
241
|
<span v-if="index === 0" body-14-semibold text-primary min-w-0>{{ group.heading }}</span>
|
|
253
242
|
<span v-else />
|
|
254
|
-
<div flex items-center justify-between w-full min-w-0>
|
|
255
|
-
<div v-if="item.file" flex items-center gap-6px min-w-0>
|
|
243
|
+
<div flex items-center justify-between w-full min-w-0 overflow-hidden>
|
|
244
|
+
<div v-if="item.file" flex items-center gap-6px min-w-0 overflow-hidden pr-12px>
|
|
256
245
|
<img :src="iconSrc(item)" class="h-16px! w-16px!" alt="">
|
|
257
|
-
<
|
|
246
|
+
<p flex min-w-0 body-14-medium text-primary>
|
|
247
|
+
<span truncate>{{ item.file.includes('.') ? `${item.file.replace(/\.[^.]+$/, '')}.` : item.file }}</span>
|
|
248
|
+
<span flex-shrink-0>{{ item.file.includes('.') ? (item.file.match(/[^.]+$/)?.[0] ?? '') : '' }}</span>
|
|
249
|
+
</p>
|
|
258
250
|
</div>
|
|
259
251
|
<div v-if="props.modelValue === item.value" class="flex gap-2 items-center">
|
|
260
252
|
<TelaComboboxItemIndicator>
|