Skip to content

Commit 0b741e9

Browse files
committed
chore: module
1 parent 3baad74 commit 0b741e9

File tree

9 files changed

+160
-162
lines changed

9 files changed

+160
-162
lines changed

src/runtime/components/DropdownMenu.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ import { defu } from 'defu'
8989
import { DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuArrow, useForwardPropsEmits } from 'reka-ui'
9090
import { reactivePick } from '@vueuse/core'
9191
import { omit } from '../utils'
92-
import UDropdownMenuContent from './DropdownMenuContent.vue'
92+
import B24DropdownMenuContent from './DropdownMenuContent.vue'
9393
9494
const props = withDefaults(defineProps<DropdownMenuProps<T>>(), {
9595
portal: true,
@@ -115,7 +115,7 @@ const b24ui = computed(() => dropdownMenu({
115115
<slot :open="open" />
116116
</DropdownMenuTrigger>
117117

118-
<UDropdownMenuContent
118+
<B24DropdownMenuContent
119119
:class="b24ui.content({ class: [!slots.default && props.class, props.b24ui?.content] })"
120120
:b24ui="b24ui"
121121
:b24ui-override="props.b24ui"
@@ -130,6 +130,6 @@ const b24ui = computed(() => dropdownMenu({
130130
</template>
131131

132132
<DropdownMenuArrow v-if="!!arrow" v-bind="arrowProps" :class="b24ui.arrow({ class: props.b24ui?.arrow })" />
133-
</UDropdownMenuContent>
133+
</B24DropdownMenuContent>
134134
</DropdownMenuRoot>
135135
</template>

src/theme/input.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* @link /api_d7/bitrix/ui/forms/common.php
66
* @link /api_d7/bitrix/ui/forms/icons.php
77
* @link /api_d7/bitrix/ui/forms/fields_types.php
8+
* @see src/theme/input-number.ts
89
* @see bitrix/js/ui/..
910
*/
1011

test/components/Input.spec.ts

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ import { mount } from '@vue/test-utils'
33
import Input, { type InputProps, type InputSlots } from '../../src/runtime/components/Input.vue'
44
import ComponentRender from '../component-render'
55
import theme from '#build/b24ui/input'
6-
76
import { renderForm } from '../utils/form'
87
import type { FormInputEvents } from '~/src/module'
8+
import ArrowToTheLeftIcon from '@bitrix24/b24icons-vue/actions/ArrowToTheLeftIcon'
9+
import ArrowToTheRightIcon from '@bitrix24/b24icons-vue/actions/ArrowToTheRightIcon'
10+
import Search2Icon from '@bitrix24/b24icons-vue/main/Search2Icon'
11+
import Shining2Icon from '@bitrix24/b24icons-vue/main/Shining2Icon'
912

1013
describe('Input', () => {
1114
const sizes = Object.keys(theme.variants.size) as any
1215
// @todo fix this
13-
const variants = []
16+
// const variants = []
1417

1518
it.each([
1619
// Props
@@ -21,33 +24,24 @@ describe('Input', () => {
2124
['with disabled', { props: { disabled: true } }],
2225
['with required', { props: { required: true } }],
2326
['with file type', { props: { type: 'file' } }],
24-
// @todo fix this ////
25-
['with icon', { props: { icon: 'i-lucide-search' } }],
26-
// @todo fix this ////
27-
['with leading and icon', { props: { leading: true, icon: 'i-lucide-arrow-left' } }],
28-
// @todo fix this ////
29-
['with leadingIcon', { props: { leadingIcon: 'i-lucide-arrow-left' } }],
30-
// @todo fix this ////
31-
['with trailing and icon', { props: { trailing: true, icon: 'i-lucide-arrow-right' } }],
32-
// @todo fix this ////
33-
['with trailingIcon', { props: { trailingIcon: 'i-lucide-arrow-right' } }],
34-
// @todo fix this ////
35-
['with avatar', { props: { avatar: { src: 'https://github.com/IgorShevchik.png' } } }],
36-
// @todo fix this ////
37-
['with avatar and leadingIcon', { props: { avatar: { src: 'https://github.com/IgorShevchik.png' }, leadingIcon: 'i-lucide-arrow-left' } }],
38-
// @todo fix this ////
39-
['with avatar and trailingIcon', { props: { avatar: { src: 'https://github.com/IgorShevchik.png' }, trailingIcon: 'i-lucide-arrow-right' } }],
27+
['with icon', { props: { icon: Search2Icon } }],
28+
['with leading and icon', { props: { leading: true, icon: ArrowToTheLeftIcon } }],
29+
['with leadingIcon', { props: { leadingIcon: ArrowToTheLeftIcon } }],
30+
['with trailing and icon', { props: { trailing: true, icon: ArrowToTheRightIcon } }],
31+
['with trailingIcon', { props: { trailingIcon: ArrowToTheRightIcon } }],
32+
['with avatar', { props: { avatar: { src: 'https://github.com/bitrix24.png' } } }],
33+
['with avatar and leadingIcon', { props: { avatar: { src: 'https://github.com/bitrix24.png' }, leadingIcon: ArrowToTheLeftIcon } }],
34+
['with avatar and trailingIcon', { props: { avatar: { src: 'https://github.com/bitrix24.png' }, trailingIcon: ArrowToTheRightIcon } }],
4035
['with loading', { props: { loading: true } }],
41-
// @todo fix this ////
42-
['with loading and avatar', { props: { loading: true, avatar: { src: 'https://github.com/IgorShevchik.png' } } }],
36+
['with loading and avatar', { props: { loading: true, avatar: { src: 'https://github.com/bitrix24.png' } } }],
4337
['with loading trailing', { props: { loading: true, trailing: true } }],
44-
// @todo fix this ////
45-
['with loading trailing and avatar', { props: { loading: true, trailing: true, avatar: { src: 'https://github.com/IgorShevchik.png' } } }],
46-
// @todo fix this ////
47-
['with loadingIcon', { props: { loading: true, loadingIcon: 'i-lucide-sparkles' } }],
38+
['with loading trailing and avatar', { props: { loading: true, trailing: true, avatar: { src: 'https://github.com/bitrix24.png' } } }],
39+
['with loadingIcon', { props: { loading: true, loadingIcon: Shining2Icon } }],
4840
...sizes.map((size: string) => [`with size ${size}`, { props: { size } }]),
49-
...variants.map((variant: string) => [`with primary variant ${variant}`, { props: { variant } }]),
50-
...variants.map((variant: string) => [`with neutral variant ${variant}`, { props: { variant, color: 'neutral' } }]),
41+
// @todo fix this
42+
// ...variants.map((variant: string) => [`with primary variant ${variant}`, { props: { variant } }]),
43+
// @todo fix this
44+
// ...variants.map((variant: string) => [`with success variant ${variant}`, { props: { variant, color: 'success' } }]),
5145
['with as', { props: { as: 'section' } }],
5246
['with class', { props: { class: 'absolute' } }],
5347
['with b24ui', { props: { b24ui: { base: 'rounded-full' } } }],

test/components/SelectMenu.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ describe('SelectMenu', () => {
8080
// @todo fix this
8181
// ...variants.map((variant: string) => [`with primary variant ${variant}`, { props: { ...props, variant } }]),
8282
// @todo fix this
83-
// ...variants.map((variant: string) => [`with neutral variant ${variant}`, { props: { ...props, variant, color: 'neutral' } }]),
83+
// ...variants.map((variant: string) => [`with success variant ${variant}`, { props: { ...props, variant, color: 'success' } }]),
8484
['with class', { props: { ...props, class: 'rounded-full' } }],
85-
['with n24ui', { props: { ...props, b24ui: { group: 'p-2' } } }],
85+
['with b24ui', { props: { ...props, b24ui: { group: 'p-2' } } }],
8686
// Slots
8787
['with leading slot', { props, slots: { leading: () => 'Leading slot' } }],
8888
['with default slot', { props, slots: { default: () => 'Default slot' } }],

test/components/Tooltip.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import ComponentRender from '../component-render'
77
const TooltipWrapper = defineComponent({
88
components: {
99
TooltipProvider,
10-
UTooltip: Tooltip
10+
B24Tooltip: Tooltip
1111
},
1212
inheritAttrs: false,
1313
template: `<TooltipProvider>
14-
<UTooltip v-bind="$attrs">
14+
<B24Tooltip v-bind="$attrs">
1515
<template v-for="(_, name) in $slots" #[name]="slotData">
1616
<slot :name="name" v-bind="slotData" />
1717
</template>
18-
</UTooltip>
18+
</B24Tooltip>
1919
</TooltipProvider>`
2020
})
2121

0 commit comments

Comments
 (0)