@meistrari/tela-build 1.32.0 → 1.33.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.
- package/components/tela/dropdown-menu/DropdownMenu.vue +7 -3
- package/components/tela/header/trailing/pagination/pagination-next-button.vue +1 -1
- package/components/tela/header/trailing/pagination/pagination-prev-button.vue +1 -1
- package/components/tela/header/trailing/trailing-actions.vue +1 -0
- package/components/tela/initials.vue +1 -1
- package/components/tela/input/tela-input.vue +7 -8
- package/components/tela/menubar/menubar-content.vue +1 -1
- package/components/tela/menubar/menubar-item.vue +1 -1
- package/components/tela/menubar/menubar-trigger.vue +1 -1
- package/components/tela/scroll-area/scroll-area.vue +17 -8
- package/components/tela/sidebar/sidebar-logo.vue +1 -1
- package/components/tela/sidebar/sidebar-user.vue +2 -2
- package/css/reset.css +9 -1
- package/package.json +1 -1
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import type { TooltipProps } from '../tooltip/tooltip.vue'
|
|
4
|
+
|
|
2
5
|
import { VisuallyHidden } from 'radix-vue'
|
|
6
|
+
|
|
3
7
|
import DropdownMenuRoot from './DropdownMenuRoot.vue'
|
|
4
8
|
import DropdownMenuContent from './DropdownMenuContent.vue'
|
|
5
9
|
import DropdownMenuGroup from './DropdownMenuGroup.vue'
|
|
6
10
|
import DropdownMenuItem from './DropdownMenuItem.vue'
|
|
7
11
|
import DropdownMenuLabel from './DropdownMenuLabel.vue'
|
|
8
12
|
import DropdownMenuTrigger from './DropdownMenuTrigger.vue'
|
|
9
|
-
import type { TooltipProps } from '../tooltip/tooltip.vue'
|
|
10
13
|
|
|
11
14
|
const props = withDefaults(defineProps<{
|
|
12
15
|
items: {
|
|
@@ -27,7 +30,8 @@ const props = withDefaults(defineProps<{
|
|
|
27
30
|
allowSearch?: boolean
|
|
28
31
|
searchPlaceholder?: string
|
|
29
32
|
shouldBeModal?: boolean
|
|
30
|
-
|
|
33
|
+
triggerClass?: HTMLAttributes['class']
|
|
34
|
+
contentClass?: HTMLAttributes['class']
|
|
31
35
|
align?: 'start' | 'end' | 'center'
|
|
32
36
|
}>(), {
|
|
33
37
|
align: 'start',
|
|
@@ -66,7 +70,7 @@ function onToggle(open: boolean) {
|
|
|
66
70
|
<template>
|
|
67
71
|
<div data-allow-mismatch @click.stop>
|
|
68
72
|
<DropdownMenuRoot :modal="shouldBeModal" :default-open="isStorybook" @update:open="onToggle">
|
|
69
|
-
<DropdownMenuTrigger as-child class="data-[state=open]:bg-
|
|
73
|
+
<DropdownMenuTrigger as-child :class="cn('data-[state=open]:bg-muted', triggerClass)" @click.prevent.stop>
|
|
70
74
|
<slot />
|
|
71
75
|
<VisuallyHidden v-if="isStorybook" as-child>
|
|
72
76
|
<button />
|
|
@@ -14,7 +14,7 @@ const emit = defineEmits<{
|
|
|
14
14
|
size="md"
|
|
15
15
|
color="secondary"
|
|
16
16
|
:icon-class="disabled ? 'text-icon-subtle' : 'text-icon'"
|
|
17
|
-
button-class="!disabled:bg-transparent"
|
|
17
|
+
button-class="!rounded-12px !disabled:bg-transparent"
|
|
18
18
|
:disabled="disabled"
|
|
19
19
|
@click="emit('click')"
|
|
20
20
|
/>
|
|
@@ -14,7 +14,7 @@ const emit = defineEmits<{
|
|
|
14
14
|
size="md"
|
|
15
15
|
color="secondary"
|
|
16
16
|
:icon-class="disabled ? 'text-icon-subtle' : 'text-icon'"
|
|
17
|
-
button-class="!disabled:bg-transparent"
|
|
17
|
+
button-class="!rounded-12px !disabled:bg-transparent"
|
|
18
18
|
:disabled="disabled"
|
|
19
19
|
@click="emit('click')"
|
|
20
20
|
/>
|
|
@@ -123,10 +123,10 @@ defineExpose({
|
|
|
123
123
|
transition
|
|
124
124
|
cursor-text
|
|
125
125
|
overflow-hidden
|
|
126
|
-
px-
|
|
127
|
-
b="0.5px border
|
|
126
|
+
px-10px py-4px
|
|
127
|
+
b="0.5px border"
|
|
128
128
|
rounded-10px bg-white
|
|
129
|
-
class="focus-within-
|
|
129
|
+
class="focus-within-border-strong focus-within-ring-2 focus-within-ring-gray-100 [box-shadow:0_1px_4px_0_rgba(103,127,148,0.03)]"
|
|
130
130
|
:class="[
|
|
131
131
|
size === 'sm' && 'py-7px !px-12px',
|
|
132
132
|
disabled && '!bg-gray-50 cursor-not-allowed color-gray-600',
|
|
@@ -137,8 +137,8 @@ defineExpose({
|
|
|
137
137
|
flex items-center
|
|
138
138
|
@click="$el.querySelector(isTextarea ? 'textarea' : 'input')?.focus()"
|
|
139
139
|
>
|
|
140
|
-
<div v-if="icon" flex mr-
|
|
141
|
-
<TelaIcon :name="icon" size="
|
|
140
|
+
<div v-if="icon" flex mr-8px>
|
|
141
|
+
<TelaIcon :name="icon" size="13px" text="icon-tertiary" />
|
|
142
142
|
</div>
|
|
143
143
|
<div
|
|
144
144
|
flex="~ col" grow align-center h-full
|
|
@@ -155,7 +155,6 @@ defineExpose({
|
|
|
155
155
|
align-center
|
|
156
156
|
:class="[disabled && 'cursor-not-allowed', props.labelClass]"
|
|
157
157
|
>
|
|
158
|
-
|
|
159
158
|
<slot name="label-leading" />
|
|
160
159
|
{{ label }}
|
|
161
160
|
</label>
|
|
@@ -175,13 +174,13 @@ defineExpose({
|
|
|
175
174
|
bg-transparent
|
|
176
175
|
z-0
|
|
177
176
|
h-full
|
|
178
|
-
|
|
177
|
+
body-14-regular
|
|
178
|
+
class="placeholder-text-tertiary focus-visible:outline-none!"
|
|
179
179
|
resize-none
|
|
180
180
|
:disabled="disabled"
|
|
181
181
|
:tabindex="tabindex"
|
|
182
182
|
:class="[
|
|
183
183
|
disabled && 'cursor-not-allowed',
|
|
184
|
-
size === 'sm' && 'leading-20px body-14-regular placeholder:body-14-regular',
|
|
185
184
|
props.inputFontClass ? props.inputFontClass : 'text-14px',
|
|
186
185
|
!isTextarea && '!h-1.7em',
|
|
187
186
|
]"
|
|
@@ -22,7 +22,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
|
22
22
|
<MenubarItem
|
|
23
23
|
v-bind="forwarded"
|
|
24
24
|
:class="cn(
|
|
25
|
-
'relative flex cursor-pointer select-none items-center rounded-xl px-3 py-1.5
|
|
25
|
+
'relative flex cursor-pointer select-none items-center rounded-xl px-3 py-1.5 body-14-medium text-primary outline-none focus:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-40',
|
|
26
26
|
inset && 'pl-8',
|
|
27
27
|
props.class,
|
|
28
28
|
)"
|
|
@@ -17,7 +17,7 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|
|
17
17
|
v-bind="forwardedProps"
|
|
18
18
|
:class="
|
|
19
19
|
cn(
|
|
20
|
-
'flex items-center gap-2 cursor-pointer select-none px-2 py-1.5 text-sm font-medium outline-none rounded-lg hover:bg-
|
|
20
|
+
'flex items-center gap-2 cursor-pointer select-none px-2 py-1.5 text-sm font-medium outline-none rounded-lg hover:bg-muted data-[state=open]:bg-muted',
|
|
21
21
|
props.class,
|
|
22
22
|
)
|
|
23
23
|
"
|
|
@@ -1,34 +1,43 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { ScrollAreaRootProps } from 'reka-ui'
|
|
3
|
+
import type { HTMLAttributes } from 'vue'
|
|
4
|
+
|
|
5
|
+
import { computed, onMounted, useTemplateRef } from 'vue'
|
|
6
|
+
|
|
2
7
|
import {
|
|
3
8
|
ScrollAreaCorner,
|
|
4
9
|
ScrollAreaRoot,
|
|
5
|
-
|
|
6
10
|
ScrollAreaViewport,
|
|
7
11
|
} from 'reka-ui'
|
|
8
|
-
|
|
9
|
-
import { computed } from 'vue'
|
|
10
|
-
import type { HTMLAttributes } from 'vue'
|
|
12
|
+
|
|
11
13
|
import ScrollBar from './scroll-bar.vue'
|
|
12
14
|
|
|
13
15
|
const props = withDefaults(
|
|
14
16
|
defineProps<ScrollAreaRootProps
|
|
15
|
-
& { class?: HTMLAttributes['class'], orientation?: 'vertical' | 'horizontal' | 'both', scrollThumbClass?: HTMLAttributes['class'] }>(),
|
|
17
|
+
& { class?: HTMLAttributes['class'], orientation?: 'vertical' | 'horizontal' | 'both', scrollThumbClass?: HTMLAttributes['class'], disableViewportFocus?: boolean }>(),
|
|
16
18
|
{
|
|
17
19
|
orientation: 'vertical',
|
|
18
|
-
|
|
20
|
+
disableViewportFocus: false,
|
|
19
21
|
},
|
|
20
22
|
)
|
|
21
23
|
|
|
22
24
|
const delegatedProps = computed(() => {
|
|
23
|
-
const { class: _, ...delegated } = props
|
|
25
|
+
const { class: _, disableViewportFocus: __, ...delegated } = props
|
|
24
26
|
|
|
25
27
|
return delegated
|
|
26
28
|
})
|
|
29
|
+
|
|
30
|
+
const viewportRef = useTemplateRef<InstanceType<typeof ScrollAreaViewport>>('viewportRef')
|
|
31
|
+
|
|
32
|
+
onMounted(() => {
|
|
33
|
+
if (props.disableViewportFocus)
|
|
34
|
+
viewportRef.value?.viewportElement?.setAttribute('tabindex', '-1')
|
|
35
|
+
})
|
|
27
36
|
</script>
|
|
28
37
|
|
|
29
38
|
<template>
|
|
30
39
|
<ScrollAreaRoot v-bind="delegatedProps" :class="cn('relative overflow-hidden', props.class)">
|
|
31
|
-
<ScrollAreaViewport class="
|
|
40
|
+
<ScrollAreaViewport ref="viewportRef" class="size-full rounded-[inherit] focus-visible:outline-border-strong">
|
|
32
41
|
<slot />
|
|
33
42
|
</ScrollAreaViewport>
|
|
34
43
|
<ScrollBar v-if="props.orientation === 'vertical' || props.orientation === 'both'" orientation="vertical" :class="props.scrollThumbClass" />
|
package/css/reset.css
CHANGED