@meistrari/tela-build 1.54.0 → 1.55.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/combobox/combobox-trigger.vue +6 -3
- package/components/tela/combobox/combobox.mdx +1 -0
- package/components/tela/combobox/combobox.stories.ts +5 -0
- package/components/tela/combobox/combobox.vue +3 -1
- package/components/tela/icon-button/icon-button.vue +3 -3
- package/components/tela/icon.vue +2 -1
- package/package.json +1 -1
|
@@ -13,14 +13,17 @@ const delegatedProps = reactiveOmit(props, 'class')
|
|
|
13
13
|
<ComboboxTrigger
|
|
14
14
|
v-bind="delegatedProps"
|
|
15
15
|
:class="cn(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
!props.asChild && [
|
|
17
|
+
'group select-none flex items-center justify-between body-14-semibold gap-3 rounded-10px pl-11px pr-10px py-7px bg-white border-0.5px border transition hover:border-strong hover:bg-subtle',
|
|
18
|
+
'data-[state=open]:text-secondary data-[state=open]:border-strong data-[state=open]:bg-subtle',
|
|
19
|
+
'[box-shadow:0_1px_6px_0_rgba(103,127,148,0.05)]',
|
|
20
|
+
],
|
|
19
21
|
props.class,
|
|
20
22
|
)"
|
|
21
23
|
>
|
|
22
24
|
<slot />
|
|
23
25
|
<TelaIcon
|
|
26
|
+
v-if="!props.asChild"
|
|
24
27
|
name="i-ph-caret-down-bold"
|
|
25
28
|
size="15px"
|
|
26
29
|
color="icon-secondary"
|
|
@@ -60,6 +60,11 @@ const meta: Meta<typeof Combobox> = {
|
|
|
60
60
|
control: 'boolean',
|
|
61
61
|
description: 'Whether to use compact spacing and sizing. Defaults to true. When false, uses larger padding and spacing.',
|
|
62
62
|
},
|
|
63
|
+
align: {
|
|
64
|
+
control: 'select',
|
|
65
|
+
options: ['start', 'center', 'end'],
|
|
66
|
+
description: 'Alignment of the dropdown content against the trigger. Defaults to "start".',
|
|
67
|
+
},
|
|
63
68
|
hasGroupingLabels: {
|
|
64
69
|
control: 'boolean',
|
|
65
70
|
description: 'Whether to display group labels when options are grouped. Defaults to true. Only shown when search is empty.',
|
|
@@ -35,6 +35,7 @@ const props = withDefaults(defineProps<{
|
|
|
35
35
|
backgroundClass: string
|
|
36
36
|
}
|
|
37
37
|
compact?: boolean
|
|
38
|
+
align?: 'start' | 'center' | 'end'
|
|
38
39
|
hasGroupingLabels?: boolean
|
|
39
40
|
colorIcon?: string
|
|
40
41
|
disablePortal?: boolean
|
|
@@ -63,6 +64,7 @@ const props = withDefaults(defineProps<{
|
|
|
63
64
|
labelOutputMax?: string
|
|
64
65
|
}>(), {
|
|
65
66
|
compact: true,
|
|
67
|
+
align: 'start',
|
|
66
68
|
hasGroupingLabels: true,
|
|
67
69
|
disablePortal: false,
|
|
68
70
|
contentClass: '',
|
|
@@ -347,7 +349,7 @@ watch(innerValue, (raw) => {
|
|
|
347
349
|
</div>
|
|
348
350
|
</TelaComboboxTrigger>
|
|
349
351
|
</TelaComboboxAnchor>
|
|
350
|
-
<TelaComboboxList :class="cn('z-999', compact ? 'w-440px' : 'w-327px', props.contentClass)" :disable-portal="props.disablePortal" align="
|
|
352
|
+
<TelaComboboxList :class="cn('z-999', compact ? 'w-440px' : 'w-327px', props.contentClass)" :disable-portal="props.disablePortal" :align="align">
|
|
351
353
|
<TelaComboboxInput
|
|
352
354
|
v-if="hasSearchbar"
|
|
353
355
|
v-model="search"
|
|
@@ -33,9 +33,9 @@ const style = computed(() => {
|
|
|
33
33
|
const size = ({
|
|
34
34
|
'3xs': 'text-6px p-1 rounded-8px',
|
|
35
35
|
'2xs': 'text-8px p-4px rounded-4px', // 16px
|
|
36
|
-
'xs': 'text-12px p-6px rounded-6px', //
|
|
37
|
-
'sm': 'text-16px p-
|
|
38
|
-
'md': 'text-20px p-
|
|
36
|
+
'xs': 'text-12px p-6px rounded-6px', // 26px
|
|
37
|
+
'sm': 'text-16px p-6px rounded-8px', // 32px
|
|
38
|
+
'md': 'text-20px p-6.4px rounded-10px', // 44px
|
|
39
39
|
} as Record<typeof props.size, string>)[props.size]
|
|
40
40
|
|
|
41
41
|
const color = ({
|
package/components/tela/icon.vue
CHANGED
|
@@ -13,7 +13,7 @@ const iconSize = computed(() => {
|
|
|
13
13
|
case 'xs':
|
|
14
14
|
return '8px'
|
|
15
15
|
case 'sm':
|
|
16
|
-
return '
|
|
16
|
+
return '14px'
|
|
17
17
|
case '17px':
|
|
18
18
|
return '17px'
|
|
19
19
|
case '20px':
|
|
@@ -23,6 +23,7 @@ const iconSize = computed(() => {
|
|
|
23
23
|
case 'xl':
|
|
24
24
|
return '32px'
|
|
25
25
|
case 'md':
|
|
26
|
+
return '20px'
|
|
26
27
|
default:
|
|
27
28
|
return '16px'
|
|
28
29
|
}
|