Skip to content
This repository was archived by the owner on Sep 24, 2024. It is now read-only.

Commit 16ae9ee

Browse files
SelemondevSelemondev
authored andcommitted
chore: remove logs
1 parent 7bd3ba4 commit 16ae9ee

File tree

14 files changed

+47
-13
lines changed

14 files changed

+47
-13
lines changed

packages/nuxtlabs-ui-vue/src/components/elements/Alert/UAlert.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ function handleClose() {
9898
<script lang="ts">
9999
export default defineComponent({
100100
name: Components.UAlert,
101+
inheritAttrs: false,
101102
})
102103
</script>
103104

packages/nuxtlabs-ui-vue/src/components/elements/Avatar/UAvatar.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ const avatarChipColorStyles = computed(() => ({
137137
<script lang="ts">
138138
export default defineComponent({
139139
name: Components.UAvatar,
140+
inheritAttrs: false,
140141
})
141142
</script>
142143

packages/nuxtlabs-ui-vue/src/components/elements/Button/UButtonGroup.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const variant = computed(() => {
2929
<script lang="ts">
3030
export default defineComponent({
3131
name: Components.UButtonGroup,
32+
inheritAttrs: false,
3233
})
3334
</script>
3435

packages/nuxtlabs-ui-vue/src/components/elements/Kbd/UKbd.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const variant = computed(() => {
3838
<script lang="ts">
3939
export default defineComponent({
4040
name: Components.UKbd,
41+
inheritAttrs: false,
4142
})
4243
</script>
4344

packages/nuxtlabs-ui-vue/src/components/elements/Link/ULink.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ function resolveLinkClass(route: { query: any; hash: any }, $route: { query: any
5454
<script lang="ts">
5555
export default defineComponent({
5656
name: Components.ULink,
57+
inheritAttrs: false,
5758
})
5859
</script>
5960

packages/nuxtlabs-ui-vue/src/components/forms/Radio/URadio.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ const inputClass = computed(() => {
8888
<script lang="ts">
8989
export default defineComponent({
9090
name: Components.URadio,
91+
inheritAttrs: false,
9192
})
9293
</script>
9394

packages/nuxtlabs-ui-vue/src/components/forms/Range/URange.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script setup lang='ts'>
2-
import { computed, defineComponent } from 'vue'
2+
import { computed, defineComponent, useAttrs } from 'vue'
33
import classNames from 'classnames'
4+
import { omit } from 'lodash-es'
45
import type { VariantJSWithClassesListProps } from '@/utils/getVariantProps'
56
import { getVariantPropsWithClassesList } from '@/utils/getVariantProps'
67
import type { URange } from '@/Types/componentsTypes/components'
@@ -131,6 +132,10 @@ const progressStyle = computed(() => {
131132
width: `${relativeValue * 100}%`,
132133
}
133134
})
135+
136+
const attrs = useAttrs()
137+
138+
const attrsOmitted = omit(attrs, ['class'])
134139
</script>
135140

136141
<script lang="ts">
@@ -152,7 +157,7 @@ export default defineComponent({
152157
:step="step"
153158
type="range"
154159
:class="[inputClass, thumbClass, trackClass]"
155-
v-bind="$attrs"
160+
v-bind="attrsOmitted"
156161
@change="onChange"
157162
>
158163

packages/nuxtlabs-ui-vue/src/components/forms/Select/USelect.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<script setup lang='ts'>
2-
import { computed, defineComponent, useSlots } from 'vue'
2+
import { computed, defineComponent, useAttrs, useSlots } from 'vue'
33
import type { ComputedRef } from 'vue'
44
import classNames from 'classnames'
5-
import { get } from 'lodash-es'
5+
import { get, omit } from 'lodash-es'
66
import type { USelect } from '@/Types/componentsTypes/components'
77
import { Components } from '@/Types/enums/Components'
88
import { useFormEvents } from '@/composables/useFormEvents'
@@ -244,6 +244,10 @@ const trailingIconClass = computed(() => {
244244
props.loading && !isLeading.value && 'animate-spin',
245245
)
246246
})
247+
248+
const attrs = useAttrs()
249+
250+
const attrsOmitted = omit(attrs, ['class'])
247251
</script>
248252

249253
<script lang="ts">
@@ -264,7 +268,7 @@ export default defineComponent({
264268
:disabled="disabled || loading"
265269
class="form-select"
266270
:class="selectClass"
267-
v-bind="$attrs"
271+
v-bind="attrsOmitted"
268272
@input="onInput"
269273
@change="onChange"
270274
>

packages/nuxtlabs-ui-vue/src/components/forms/SelectMenu/USelectMenu.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script lang="ts">
22
import { computed, defineComponent, ref, watch } from 'vue'
33
import type { ComponentPublicInstance, PropType } from 'vue'
4+
import { omit } from 'lodash-es'
45
import {
56
Combobox as HCombobox,
67
ComboboxButton as HComboboxButton,
@@ -161,7 +162,7 @@ export default defineComponent({
161162
},
162163
},
163164
emits: ['update:modelValue', 'open', 'close', 'change'],
164-
setup(props, { emit, slots }) {
165+
setup(props, { emit, slots, attrs }) {
165166
const variant = computed(() => {
166167
const customProps = {
167168
...props,
@@ -207,14 +208,14 @@ export default defineComponent({
207208
return classNames(
208209
nuxtLabsTheme.USelect.base.selectBase,
209210
nuxtLabsTheme.USelect.base.rounded,
210-
'text-left cursor-default',
211+
variant.value.selectMenuCursor,
211212
nuxtLabsTheme.USelect.base.size[props.size],
212213
nuxtLabsTheme.USelect.base.gap[props.size],
213214
props.padded ? nuxtLabsTheme.USelect.base.padding[props.size] : 'p-0',
214215
variants?.replaceAll('{color}', props.color),
215216
(isLeading.value || slots.leading) && nuxtLabsTheme.USelect.base.leading.padding[props.size],
216217
(isTrailing.value || slots.trailing) && nuxtLabsTheme.USelect.base.trailing.padding[props.size],
217-
'inline-flex items-center',
218+
variant.value.selectMenuFlex,
218219
)
219220
})
220221
@@ -294,6 +295,7 @@ export default defineComponent({
294295
}
295296
296297
return {
298+
attrs: omit(attrs, ['class']),
297299
variant: variant.value,
298300
trigger,
299301
container,
@@ -348,7 +350,7 @@ export default defineComponent({
348350
:class="variant.component"
349351
>
350352
<slot :open="open" :disabled="disabled" :loading="loading">
351-
<button :class="selectClass" :disabled="disabled || loading" type="button" v-bind="$attrs">
353+
<button :class="selectClass" :disabled="disabled || loading" type="button" v-bind="attrs">
352354
<span v-if="(isLeading && leadingIconName) || $slots.leading" :class="leadingWrapperIconClass">
353355
<slot name="leading" :disabled="disabled" :loading="loading">
354356
<UIcon :name="leadingIconName" :class="leadingIconClass" />

packages/nuxtlabs-ui-vue/src/components/forms/Textarea/UTextarea.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script setup lang='ts'>
2-
import { computed, defineComponent, nextTick, onMounted, ref, watch } from 'vue'
2+
import { computed, defineComponent, nextTick, onMounted, ref, useAttrs, watch } from 'vue'
33
import classNames from 'classnames'
4+
import { omit } from 'lodash-es'
45
import type { VariantJSWithClassesListProps } from '@/utils/getVariantProps'
56
import { getVariantPropsWithClassesList } from '@/utils/getVariantProps'
67
import { Components } from '@/Types/enums/Components'
@@ -156,6 +157,10 @@ const textareaClass = computed(() => {
156157
!props.resize && 'resize-none',
157158
)
158159
})
160+
161+
const attrs = useAttrs()
162+
163+
const attrsOmitted = omit(attrs, ['class'])
159164
</script>
160165

161166
<script lang="ts">
@@ -179,7 +184,7 @@ export default defineComponent({
179184
:placeholder="placeholder"
180185
class="form-textarea"
181186
:class="textareaClass"
182-
v-bind="$attrs"
187+
v-bind="attrsOmitted"
183188
@input="onInput"
184189
@blur="onBlur"
185190
/>

0 commit comments

Comments
 (0)