@aleph-alpha/ui-library 2.11.0 → 3.0.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/config.d.ts +8 -2
- package/config.js +85 -73
- package/dist/system/components/UiAutocomplete/types.d.ts +0 -1
- package/dist/system/components/UiDialog/UiDialogDescription.vue.d.ts +2 -1
- package/dist/system/components/UiDialog/UiDialogFooter.vue.d.ts +1 -2
- package/dist/system/components/UiDialog/UiDialogHeader.vue.d.ts +1 -2
- package/dist/system/components/UiDialog/UiDialogTitle.vue.d.ts +2 -1
- package/dist/system/components/UiDialog/types.d.ts +10 -4
- package/dist/system/components/UiDropdownMenu/UiDropdownMenuSub.vue.d.ts +3 -1
- package/dist/system/components/UiField/UiFieldError.vue.d.ts +8 -1
- package/dist/system/components/UiInput/UiInput.vue.d.ts +16 -1
- package/dist/system/components/UiStepper/UiStepperDescription.vue.d.ts +3 -1
- package/dist/system/components/UiStepper/UiStepperIndicator.vue.d.ts +3 -1
- package/dist/system/components/UiStepper/UiStepperItem.vue.d.ts +3 -1
- package/dist/system/components/UiTagsInput/types.d.ts +1 -2
- package/dist/system/components/core/accordion/AccordionItem.vue.d.ts +3 -1
- package/dist/system/components/core/calendar/CalendarHeading.vue.d.ts +2 -2
- package/dist/system/components/core/dropdown-menu/DropdownMenuSub.vue.d.ts +3 -1
- package/dist/system/components/core/range-calendar/RangeCalendarHeading.vue.d.ts +2 -2
- package/dist/system/components/core/stepper/StepperDescription.vue.d.ts +3 -1
- package/dist/system/components/core/stepper/StepperIndicator.vue.d.ts +3 -1
- package/dist/system/components/core/stepper/StepperItem.vue.d.ts +3 -1
- package/dist/system/index.d.ts +2 -1
- package/dist/system/lib/utils.d.ts +6 -0
- package/dist/system/lib.js +15498 -15548
- package/dist/system/patterns/UiSidebar/UiSidebarContent.vue.d.ts +1 -2
- package/dist/system/patterns/UiSidebar/UiSidebarFooter.vue.d.ts +1 -2
- package/dist/system/patterns/UiSidebar/UiSidebarGroupContent.vue.d.ts +1 -2
- package/dist/system/patterns/UiSidebar/UiSidebarInset.vue.d.ts +1 -2
- package/dist/system/patterns/UiSidebar/UiSidebarMenu.vue.d.ts +1 -2
- package/dist/system/patterns/UiSidebar/UiSidebarMenuItem.vue.d.ts +1 -2
- package/dist/system/patterns/UiSidebar/UiSidebarProvider.vue.d.ts +1 -2
- package/dist/system/patterns/UiSidebar/UiSidebarRail.vue.d.ts +1 -2
- package/dist/system/patterns/UiSidebar/__tests__/sidebar-test-helpers.d.ts +9 -9
- package/dist/system/patterns/UiSidebar/types.d.ts +8 -16
- package/dist/system/story-sidebar-icons.json +10 -0
- package/package.json +4 -1
- package/src/@types/shims-vue.d.ts +1 -1
- package/src/__tests__/test-utils.ts +1 -1
- package/src/components/UiAlertDialog/UiAlertDialogAction.vue +1 -1
- package/src/components/UiAlertDialog/UiAlertDialogCancel.vue +1 -1
- package/src/components/UiAlertDialog/UiAlertDialogContent.vue +4 -1
- package/src/components/UiAlertDialog/UiAlertDialogDescription.vue +1 -1
- package/src/components/UiAlertDialog/UiAlertDialogTitle.vue +1 -1
- package/src/components/UiAlertDialog/UiAlertDialogTrigger.vue +1 -1
- package/src/components/UiAutocomplete/types.ts +0 -1
- package/src/components/UiBadge/UiBadge.vue +1 -1
- package/src/components/UiBadge/constants.ts +1 -1
- package/src/components/UiBadge/types.ts +1 -1
- package/src/components/UiButton/UiButton.stories.ts +286 -198
- package/src/components/UiButton/mcp-docs.json +49 -0
- package/src/components/UiCalendar/UiCalendar.vue +2 -5
- package/src/components/UiCalendar/__tests__/UiCalendar.test.ts +4 -2
- package/src/components/UiCheckbox/UiCheckbox.stories.ts +176 -2
- package/src/components/UiCheckbox/mcp-docs.json +36 -0
- package/src/components/UiChip/types.ts +1 -1
- package/src/components/UiDialog/UiDialogFooter.vue +0 -3
- package/src/components/UiDialog/UiDialogHeader.vue +0 -3
- package/src/components/UiDialog/types.ts +10 -4
- package/src/components/UiDropdownMenu/__tests__/UiDropdownMenu.test.ts +1 -1
- package/src/components/UiField/UiField.stories.ts +265 -3
- package/src/components/UiField/UiField.vue +9 -2
- package/src/components/UiField/UiFieldError.vue +3 -3
- package/src/components/UiField/mcp-docs.json +72 -0
- package/src/components/UiFileItem/UiFileItem.stories.ts +11 -11
- package/src/components/UiFileUploadBox/UiFileUploadBox.vue +1 -1
- package/src/components/UiIcon/UiIcon.vue +3 -2
- package/src/components/UiInput/UiInput.vue +19 -3
- package/src/components/UiInput/mcp-docs.json +51 -0
- package/src/components/UiItem/UiItem.stories.ts +118 -2
- package/src/components/UiItem/__tests__/UiItem.test.ts +3 -5
- package/src/components/UiItem/mcp-docs.json +25 -0
- package/src/components/UiLabel/UiLabel.vue +1 -1
- package/src/components/UiListbox/UiListbox.vue +3 -6
- package/src/components/UiListbox/UiListboxFilter.vue +1 -1
- package/src/components/UiListbox/UiListboxItem.vue +1 -1
- package/src/components/UiProgress/UiProgress.vue +1 -1
- package/src/components/UiRadioGroup/UiRadioGroup.vue +1 -1
- package/src/components/UiRadioGroup/UiRadioGroupItem.vue +2 -2
- package/src/components/UiRadioGroup/__tests__/UiRadioGroup.test.ts +2 -2
- package/src/components/UiRangeCalendar/UiRangeCalendar.vue +2 -5
- package/src/components/UiRangeCalendar/__tests__/UiRangeCalendar.test.ts +9 -6
- package/src/components/UiSelect/UiSelectContent.vue +2 -4
- package/src/components/UiSwitch/UiSwitch.vue +1 -1
- package/src/components/UiTagsInput/UiTagsInput.vue +1 -1
- package/src/components/UiTagsInput/UiTagsInputInput.vue +1 -1
- package/src/components/UiTagsInput/UiTagsInputItem.vue +1 -1
- package/src/components/UiTagsInput/types.ts +1 -4
- package/src/components/UiTooltip/UiTooltip.stories.ts +0 -8
- package/src/components/core/accordion/AccordionItem.vue +1 -1
- package/src/components/core/alert-dialog/AlertDialogContent.vue +1 -1
- package/src/components/core/badge/Badge.vue +2 -5
- package/src/components/core/calendar/CalendarHeading.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuSub.vue +1 -1
- package/src/components/core/item/index.ts +1 -1
- package/src/components/core/listbox/Listbox.vue +2 -5
- package/src/components/core/listbox/ListboxContent.vue +2 -5
- package/src/components/core/listbox/ListboxFilter.vue +2 -5
- package/src/components/core/listbox/ListboxGroup.vue +2 -5
- package/src/components/core/listbox/ListboxGroupLabel.vue +2 -5
- package/src/components/core/listbox/ListboxItem.vue +2 -5
- package/src/components/core/listbox/ListboxItemIndicator.vue +2 -5
- package/src/components/core/range-calendar/RangeCalendarHeading.vue +1 -1
- package/src/components/core/sidebar/SidebarContent.vue +4 -5
- package/src/components/core/sidebar/SidebarFooter.vue +4 -5
- package/src/components/core/sidebar/SidebarGroup.vue +4 -5
- package/src/components/core/sidebar/SidebarHeader.vue +4 -5
- package/src/components/core/sidebar/SidebarMenu.vue +4 -5
- package/src/components/core/sidebar/SidebarMenuAction.vue +1 -1
- package/src/components/core/sidebar/SidebarMenuButtonChild.vue +1 -1
- package/src/components/core/sidebar/SidebarMenuSkeleton.vue +1 -1
- package/src/components/core/sidebar/SidebarMenuSubButton.vue +1 -1
- package/src/components/core/sidebar/SidebarSeparator.vue +4 -5
- package/src/components/core/stepper/StepperDescription.vue +1 -1
- package/src/components/core/stepper/StepperIndicator.vue +1 -1
- package/src/components/core/stepper/StepperItem.vue +1 -1
- package/src/components/core/tags-input/TagsInput.vue +2 -5
- package/src/components/core/tags-input/TagsInputInput.vue +2 -5
- package/src/components/core/tags-input/TagsInputItem.vue +2 -5
- package/src/components/core/tags-input/TagsInputItemDelete.vue +2 -5
- package/src/components/core/tags-input/TagsInputItemText.vue +2 -5
- package/src/components/core/toggle/Toggle.vue +1 -1
- package/src/index.ts +30 -5
- package/src/lib/useDrag.ts +1 -0
- package/src/lib/utils.ts +12 -0
- package/src/patterns/UiDataTable/UiDataTable.mock.ts +13 -4
- package/src/patterns/UiDataTable/UiDataTable.vue +1 -0
- package/src/patterns/UiDataTable/__tests__/UiDataTable.test.ts +11 -2
- package/src/patterns/UiDatePicker/__tests__/UiDatePicker.test.ts +28 -39
- package/src/patterns/UiSidebar/UiSidebarContent.vue +0 -3
- package/src/patterns/UiSidebar/UiSidebarFooter.vue +0 -3
- package/src/patterns/UiSidebar/UiSidebarGroup.vue +4 -5
- package/src/patterns/UiSidebar/UiSidebarGroupContent.vue +0 -3
- package/src/patterns/UiSidebar/UiSidebarHeader.vue +4 -5
- package/src/patterns/UiSidebar/UiSidebarInset.vue +0 -3
- package/src/patterns/UiSidebar/UiSidebarMenu.vue +0 -3
- package/src/patterns/UiSidebar/UiSidebarMenuButton.vue +4 -5
- package/src/patterns/UiSidebar/UiSidebarMenuItem.vue +0 -3
- package/src/patterns/UiSidebar/UiSidebarMenuSub.vue +4 -5
- package/src/patterns/UiSidebar/UiSidebarMenuSubItem.vue +4 -5
- package/src/patterns/UiSidebar/UiSidebarPopoverMenu.vue +4 -5
- package/src/patterns/UiSidebar/UiSidebarPopoverMenuItem.vue +4 -5
- package/src/patterns/UiSidebar/UiSidebarPopoverTrigger.vue +4 -5
- package/src/patterns/UiSidebar/UiSidebarProvider.vue +0 -3
- package/src/patterns/UiSidebar/UiSidebarRail.vue +0 -3
- package/src/patterns/UiSidebar/UiSidebarSub.vue +4 -5
- package/src/patterns/UiSidebar/__tests__/UiSidebar.test.ts +21 -17
- package/src/patterns/UiSidebar/__tests__/UiSidebarMenuButton.test.ts +12 -10
- package/src/patterns/UiSidebar/types.ts +8 -8
- package/src/theme/Typography.stories.ts +3 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, useAttrs } from 'vue';
|
|
3
3
|
import { SelectContent as ShadcnSelectContent } from '@/components/core/select';
|
|
4
|
+
import { omitClass } from '@/lib/utils';
|
|
4
5
|
import type { UiSelectContentProps, UiSelectContentEmits } from './types';
|
|
5
6
|
|
|
6
7
|
defineOptions({
|
|
@@ -19,10 +20,7 @@ const emit = defineEmits<UiSelectContentEmits>();
|
|
|
19
20
|
|
|
20
21
|
const attrs = useAttrs();
|
|
21
22
|
|
|
22
|
-
const forwardedAttrs = computed(() =>
|
|
23
|
-
const { class: _class, ...delegatedAttrs } = attrs;
|
|
24
|
-
return delegatedAttrs;
|
|
25
|
-
});
|
|
23
|
+
const forwardedAttrs = computed(() => omitClass(attrs));
|
|
26
24
|
</script>
|
|
27
25
|
|
|
28
26
|
<template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { TagsInputInput as ShadcnTagsInputInput } from '@/components/core/tags-input';
|
|
3
|
-
import { UiTagsInputInputProps } from './types';
|
|
3
|
+
import { type UiTagsInputInputProps } from './types';
|
|
4
4
|
|
|
5
5
|
defineOptions({
|
|
6
6
|
name: 'UiTagsInputInput',
|
|
@@ -9,10 +9,7 @@ import type { TagsInputRootProps } from 'reka-ui';
|
|
|
9
9
|
* @related UiInput, UiBadge
|
|
10
10
|
* @augments TagsInputRootProps
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
13
|
-
TagsInputRootProps,
|
|
14
|
-
'class' | 'modelValue'
|
|
15
|
-
> {}
|
|
12
|
+
export type UiTagsInputProps = Omit<TagsInputRootProps, 'class' | 'modelValue'>;
|
|
16
13
|
|
|
17
14
|
/**
|
|
18
15
|
* Props for the UiTagsInputInput component.
|
|
@@ -69,14 +69,6 @@ import { UiButton } from '@aleph-alpha/ui-library'
|
|
|
69
69
|
</UiTooltip>
|
|
70
70
|
</template>`;
|
|
71
71
|
|
|
72
|
-
const defaultTemplate = `
|
|
73
|
-
<div class="flex justify-center p-8">
|
|
74
|
-
<UiTooltip content="This is a helpful tooltip" side="top" align="center" :delay-duration="500" :disabled="false">
|
|
75
|
-
<UiButton>Hover me</UiButton>
|
|
76
|
-
</UiTooltip>
|
|
77
|
-
</div>
|
|
78
|
-
`;
|
|
79
|
-
|
|
80
72
|
/**
|
|
81
73
|
* Default tooltip that appears on hover.
|
|
82
74
|
* Customize content, position, and delay via props.
|
|
@@ -16,7 +16,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
16
16
|
|
|
17
17
|
<template>
|
|
18
18
|
<AccordionItem
|
|
19
|
-
#default="slotProps"
|
|
19
|
+
#default="slotProps: Record<string, unknown>"
|
|
20
20
|
data-slot="accordion-item"
|
|
21
21
|
v-bind="forwardedProps"
|
|
22
22
|
:class="cn('border-b last:border-b-0', props.class)"
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
useForwardPropsEmits,
|
|
9
9
|
} from 'reka-ui';
|
|
10
10
|
import { cn } from '@/lib/utils';
|
|
11
|
-
import { UiDialogContentMaxWidth } from '@/components/UiDialog';
|
|
11
|
+
import { type UiDialogContentMaxWidth } from '@/components/UiDialog';
|
|
12
12
|
|
|
13
13
|
defineOptions({
|
|
14
14
|
inheritAttrs: false,
|
|
@@ -5,7 +5,7 @@ import type { BadgeVariants } from '.';
|
|
|
5
5
|
import { reactiveOmit } from '@vueuse/core';
|
|
6
6
|
import { Primitive } from 'reka-ui';
|
|
7
7
|
import { computed, useAttrs } from 'vue';
|
|
8
|
-
import { cn } from '@/lib/utils';
|
|
8
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
9
9
|
import { badgeVariants } from '.';
|
|
10
10
|
|
|
11
11
|
const props = defineProps<
|
|
@@ -20,10 +20,7 @@ const attrs = useAttrs();
|
|
|
20
20
|
|
|
21
21
|
const delegatedProps = reactiveOmit(props, 'variant', 'size', 'disabled');
|
|
22
22
|
|
|
23
|
-
const delegatedAttrs = computed(() =>
|
|
24
|
-
const { class: _class, ...rest } = attrs;
|
|
25
|
-
return rest;
|
|
26
|
-
});
|
|
23
|
+
const delegatedAttrs = computed(() => omitClass(attrs));
|
|
27
24
|
|
|
28
25
|
const forwardedProps = computed(() => ({
|
|
29
26
|
...delegatedProps,
|
|
@@ -20,7 +20,7 @@ export const itemVariants = cva(
|
|
|
20
20
|
default: 'bg-transparent',
|
|
21
21
|
active:
|
|
22
22
|
'ui-active-indicator ui-active-indicator-active cursor-pointer bg-background-surface-muted-subtle',
|
|
23
|
-
outline: 'bg-transparent
|
|
23
|
+
outline: 'bg-transparent border border-border-surface-default',
|
|
24
24
|
hover:
|
|
25
25
|
'cursor-pointer bg-transparent hover:bg-background-surface-muted-subtle',
|
|
26
26
|
'hover-action':
|
|
@@ -3,17 +3,14 @@ import type { ListboxRootEmits, ListboxRootProps } from 'reka-ui';
|
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { ListboxRoot, useForwardPropsEmits } from 'reka-ui';
|
|
5
5
|
import { computed } from 'vue';
|
|
6
|
-
import { cn } from '@/lib/utils';
|
|
6
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
7
7
|
|
|
8
8
|
const props = defineProps<
|
|
9
9
|
ListboxRootProps & { class?: HTMLAttributes['class'] }
|
|
10
10
|
>();
|
|
11
11
|
const emits = defineEmits<ListboxRootEmits>();
|
|
12
12
|
|
|
13
|
-
const delegatedProps = computed(() =>
|
|
14
|
-
const { class: _class, ...delegated } = props;
|
|
15
|
-
return delegated;
|
|
16
|
-
});
|
|
13
|
+
const delegatedProps = computed(() => omitClass(props));
|
|
17
14
|
|
|
18
15
|
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
19
16
|
</script>
|
|
@@ -3,16 +3,13 @@ import type { ListboxContentProps } from 'reka-ui';
|
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { ListboxContent, useForwardProps } from 'reka-ui';
|
|
5
5
|
import { computed } from 'vue';
|
|
6
|
-
import { cn } from '@/lib/utils';
|
|
6
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
7
7
|
|
|
8
8
|
const props = defineProps<
|
|
9
9
|
ListboxContentProps & { class?: HTMLAttributes['class'] }
|
|
10
10
|
>();
|
|
11
11
|
|
|
12
|
-
const delegatedProps = computed(() =>
|
|
13
|
-
const { class: _class, ...delegated } = props;
|
|
14
|
-
return delegated;
|
|
15
|
-
});
|
|
12
|
+
const delegatedProps = computed(() => omitClass(props));
|
|
16
13
|
|
|
17
14
|
const forwardedProps = useForwardProps(delegatedProps);
|
|
18
15
|
</script>
|
|
@@ -3,17 +3,14 @@ import type { ListboxFilterEmits, ListboxFilterProps } from 'reka-ui';
|
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { ListboxFilter, useForwardPropsEmits } from 'reka-ui';
|
|
5
5
|
import { computed } from 'vue';
|
|
6
|
-
import { cn } from '@/lib/utils';
|
|
6
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
7
7
|
|
|
8
8
|
const props = defineProps<
|
|
9
9
|
ListboxFilterProps & { class?: HTMLAttributes['class'] }
|
|
10
10
|
>();
|
|
11
11
|
const emits = defineEmits<ListboxFilterEmits>();
|
|
12
12
|
|
|
13
|
-
const delegatedProps = computed(() =>
|
|
14
|
-
const { class: _class, ...delegated } = props;
|
|
15
|
-
return delegated;
|
|
16
|
-
});
|
|
13
|
+
const delegatedProps = computed(() => omitClass(props));
|
|
17
14
|
|
|
18
15
|
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
19
16
|
</script>
|
|
@@ -3,16 +3,13 @@ import type { ListboxGroupProps } from 'reka-ui';
|
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { ListboxGroup, useForwardProps } from 'reka-ui';
|
|
5
5
|
import { computed } from 'vue';
|
|
6
|
-
import { cn } from '@/lib/utils';
|
|
6
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
7
7
|
|
|
8
8
|
const props = defineProps<
|
|
9
9
|
ListboxGroupProps & { class?: HTMLAttributes['class'] }
|
|
10
10
|
>();
|
|
11
11
|
|
|
12
|
-
const delegatedProps = computed(() =>
|
|
13
|
-
const { class: _class, ...delegated } = props;
|
|
14
|
-
return delegated;
|
|
15
|
-
});
|
|
12
|
+
const delegatedProps = computed(() => omitClass(props));
|
|
16
13
|
|
|
17
14
|
const forwardedProps = useForwardProps(delegatedProps);
|
|
18
15
|
</script>
|
|
@@ -3,16 +3,13 @@ import type { ListboxGroupLabelProps } from 'reka-ui';
|
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { ListboxGroupLabel, useForwardProps } from 'reka-ui';
|
|
5
5
|
import { computed } from 'vue';
|
|
6
|
-
import { cn } from '@/lib/utils';
|
|
6
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
7
7
|
|
|
8
8
|
const props = defineProps<
|
|
9
9
|
ListboxGroupLabelProps & { class?: HTMLAttributes['class'] }
|
|
10
10
|
>();
|
|
11
11
|
|
|
12
|
-
const delegatedProps = computed(() =>
|
|
13
|
-
const { class: _class, ...delegated } = props;
|
|
14
|
-
return delegated;
|
|
15
|
-
});
|
|
12
|
+
const delegatedProps = computed(() => omitClass(props));
|
|
16
13
|
|
|
17
14
|
const forwardedProps = useForwardProps(delegatedProps);
|
|
18
15
|
</script>
|
|
@@ -3,17 +3,14 @@ import type { ListboxItemEmits, ListboxItemProps } from 'reka-ui';
|
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { ListboxItem, useForwardPropsEmits } from 'reka-ui';
|
|
5
5
|
import { computed } from 'vue';
|
|
6
|
-
import { cn } from '@/lib/utils';
|
|
6
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
7
7
|
|
|
8
8
|
const props = defineProps<
|
|
9
9
|
ListboxItemProps & { class?: HTMLAttributes['class'] }
|
|
10
10
|
>();
|
|
11
11
|
const emits = defineEmits<ListboxItemEmits>();
|
|
12
12
|
|
|
13
|
-
const delegatedProps = computed(() =>
|
|
14
|
-
const { class: _class, ...delegated } = props;
|
|
15
|
-
return delegated;
|
|
16
|
-
});
|
|
13
|
+
const delegatedProps = computed(() => omitClass(props));
|
|
17
14
|
|
|
18
15
|
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
19
16
|
</script>
|
|
@@ -3,16 +3,13 @@ import type { ListboxItemIndicatorProps } from 'reka-ui';
|
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { ListboxItemIndicator, useForwardProps } from 'reka-ui';
|
|
5
5
|
import { computed } from 'vue';
|
|
6
|
-
import { cn } from '@/lib/utils';
|
|
6
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
7
7
|
|
|
8
8
|
const props = defineProps<
|
|
9
9
|
ListboxItemIndicatorProps & { class?: HTMLAttributes['class'] }
|
|
10
10
|
>();
|
|
11
11
|
|
|
12
|
-
const delegatedProps = computed(() =>
|
|
13
|
-
const { class: _class, ...delegated } = props;
|
|
14
|
-
return delegated;
|
|
15
|
-
});
|
|
12
|
+
const delegatedProps = computed(() => omitClass(props));
|
|
16
13
|
|
|
17
14
|
const forwardedProps = useForwardProps(delegatedProps);
|
|
18
15
|
</script>
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, useAttrs } from 'vue';
|
|
3
|
-
import { cn } from '@/lib/utils';
|
|
3
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
4
4
|
|
|
5
5
|
defineOptions({ inheritAttrs: false });
|
|
6
6
|
|
|
7
7
|
const attrs = useAttrs();
|
|
8
|
-
const passthroughAttrs = computed(() =>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
});
|
|
8
|
+
const passthroughAttrs = computed(() =>
|
|
9
|
+
omitClass(attrs as Record<string, unknown>),
|
|
10
|
+
);
|
|
12
11
|
const attrClass = computed(() => (attrs.class as string | undefined) ?? '');
|
|
13
12
|
</script>
|
|
14
13
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, useAttrs } from 'vue';
|
|
3
|
-
import { cn } from '@/lib/utils';
|
|
3
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
4
4
|
|
|
5
5
|
defineOptions({ inheritAttrs: false });
|
|
6
6
|
|
|
7
7
|
const attrs = useAttrs();
|
|
8
|
-
const passthroughAttrs = computed(() =>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
});
|
|
8
|
+
const passthroughAttrs = computed(() =>
|
|
9
|
+
omitClass(attrs as Record<string, unknown>),
|
|
10
|
+
);
|
|
12
11
|
const attrClass = computed(() => (attrs.class as string | undefined) ?? '');
|
|
13
12
|
</script>
|
|
14
13
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, useAttrs } from 'vue';
|
|
3
|
-
import { cn } from '@/lib/utils';
|
|
3
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
4
4
|
|
|
5
5
|
defineOptions({ inheritAttrs: false });
|
|
6
6
|
|
|
7
7
|
const attrs = useAttrs();
|
|
8
|
-
const passthroughAttrs = computed(() =>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
});
|
|
8
|
+
const passthroughAttrs = computed(() =>
|
|
9
|
+
omitClass(attrs as Record<string, unknown>),
|
|
10
|
+
);
|
|
12
11
|
const attrClass = computed(() => (attrs.class as string | undefined) ?? '');
|
|
13
12
|
</script>
|
|
14
13
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, useAttrs } from 'vue';
|
|
3
|
-
import { cn } from '@/lib/utils';
|
|
3
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
4
4
|
|
|
5
5
|
defineOptions({ inheritAttrs: false });
|
|
6
6
|
|
|
7
7
|
const attrs = useAttrs();
|
|
8
|
-
const passthroughAttrs = computed(() =>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
});
|
|
8
|
+
const passthroughAttrs = computed(() =>
|
|
9
|
+
omitClass(attrs as Record<string, unknown>),
|
|
10
|
+
);
|
|
12
11
|
const attrClass = computed(() => (attrs.class as string | undefined) ?? '');
|
|
13
12
|
</script>
|
|
14
13
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, useAttrs } from 'vue';
|
|
3
|
-
import { cn } from '@/lib/utils';
|
|
3
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
4
4
|
|
|
5
5
|
defineOptions({ inheritAttrs: false });
|
|
6
6
|
|
|
7
7
|
const attrs = useAttrs();
|
|
8
|
-
const passthroughAttrs = computed(() =>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
});
|
|
8
|
+
const passthroughAttrs = computed(() =>
|
|
9
|
+
omitClass(attrs as Record<string, unknown>),
|
|
10
|
+
);
|
|
12
11
|
const attrClass = computed(() => (attrs.class as string | undefined) ?? '');
|
|
13
12
|
</script>
|
|
14
13
|
|
|
@@ -13,7 +13,7 @@ export interface SidebarMenuButtonProps extends PrimitiveProps {
|
|
|
13
13
|
isActive?: boolean;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
withDefaults(defineProps<SidebarMenuButtonProps>(), {
|
|
17
17
|
as: 'button',
|
|
18
18
|
variant: 'default',
|
|
19
19
|
size: 'default',
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, useAttrs } from 'vue';
|
|
3
|
-
import { cn } from '@/lib/utils';
|
|
3
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
4
4
|
import { Separator } from '@/components/core/separator';
|
|
5
5
|
|
|
6
6
|
defineOptions({ inheritAttrs: false });
|
|
7
7
|
|
|
8
8
|
const attrs = useAttrs();
|
|
9
|
-
const passthroughAttrs = computed(() =>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
9
|
+
const passthroughAttrs = computed(() =>
|
|
10
|
+
omitClass(attrs as Record<string, unknown>),
|
|
11
|
+
);
|
|
13
12
|
const attrClass = computed(() => (attrs.class as string | undefined) ?? '');
|
|
14
13
|
</script>
|
|
15
14
|
|
|
@@ -3,17 +3,14 @@ import type { TagsInputRootEmits, TagsInputRootProps } from 'reka-ui';
|
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { TagsInputRoot, useForwardPropsEmits } from 'reka-ui';
|
|
5
5
|
import { computed } from 'vue';
|
|
6
|
-
import { cn } from '@/lib/utils';
|
|
6
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
7
7
|
|
|
8
8
|
const props = defineProps<
|
|
9
9
|
TagsInputRootProps & { class?: HTMLAttributes['class'] }
|
|
10
10
|
>();
|
|
11
11
|
const emits = defineEmits<TagsInputRootEmits>();
|
|
12
12
|
|
|
13
|
-
const delegatedProps = computed(() =>
|
|
14
|
-
const { class: _class, ...delegated } = props;
|
|
15
|
-
return delegated;
|
|
16
|
-
});
|
|
13
|
+
const delegatedProps = computed(() => omitClass(props));
|
|
17
14
|
|
|
18
15
|
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
19
16
|
</script>
|
|
@@ -3,16 +3,13 @@ import type { TagsInputInputProps } from 'reka-ui';
|
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { TagsInputInput, useForwardProps } from 'reka-ui';
|
|
5
5
|
import { computed } from 'vue';
|
|
6
|
-
import { cn } from '@/lib/utils';
|
|
6
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
7
7
|
|
|
8
8
|
const props = defineProps<
|
|
9
9
|
TagsInputInputProps & { class?: HTMLAttributes['class'] }
|
|
10
10
|
>();
|
|
11
11
|
|
|
12
|
-
const delegatedProps = computed(() =>
|
|
13
|
-
const { class: _class, ...delegated } = props;
|
|
14
|
-
return delegated;
|
|
15
|
-
});
|
|
12
|
+
const delegatedProps = computed(() => omitClass(props));
|
|
16
13
|
|
|
17
14
|
const forwardedProps = useForwardProps(delegatedProps);
|
|
18
15
|
</script>
|
|
@@ -3,16 +3,13 @@ import type { TagsInputItemProps } from 'reka-ui';
|
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { TagsInputItem, useForwardProps } from 'reka-ui';
|
|
5
5
|
import { computed } from 'vue';
|
|
6
|
-
import { cn } from '@/lib/utils';
|
|
6
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
7
7
|
|
|
8
8
|
const props = defineProps<
|
|
9
9
|
TagsInputItemProps & { class?: HTMLAttributes['class'] }
|
|
10
10
|
>();
|
|
11
11
|
|
|
12
|
-
const delegatedProps = computed(() =>
|
|
13
|
-
const { class: _class, ...delegated } = props;
|
|
14
|
-
return delegated;
|
|
15
|
-
});
|
|
12
|
+
const delegatedProps = computed(() => omitClass(props));
|
|
16
13
|
|
|
17
14
|
const forwardedProps = useForwardProps(delegatedProps);
|
|
18
15
|
</script>
|
|
@@ -3,16 +3,13 @@ import type { TagsInputItemDeleteProps } from 'reka-ui';
|
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { TagsInputItemDelete, useForwardProps } from 'reka-ui';
|
|
5
5
|
import { computed } from 'vue';
|
|
6
|
-
import { cn } from '@/lib/utils';
|
|
6
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
7
7
|
|
|
8
8
|
const props = defineProps<
|
|
9
9
|
TagsInputItemDeleteProps & { class?: HTMLAttributes['class'] }
|
|
10
10
|
>();
|
|
11
11
|
|
|
12
|
-
const delegatedProps = computed(() =>
|
|
13
|
-
const { class: _class, ...delegated } = props;
|
|
14
|
-
return delegated;
|
|
15
|
-
});
|
|
12
|
+
const delegatedProps = computed(() => omitClass(props));
|
|
16
13
|
|
|
17
14
|
const forwardedProps = useForwardProps(delegatedProps);
|
|
18
15
|
</script>
|
|
@@ -3,16 +3,13 @@ import type { TagsInputItemTextProps } from 'reka-ui';
|
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { TagsInputItemText, useForwardProps } from 'reka-ui';
|
|
5
5
|
import { computed } from 'vue';
|
|
6
|
-
import { cn } from '@/lib/utils';
|
|
6
|
+
import { cn, omitClass } from '@/lib/utils';
|
|
7
7
|
|
|
8
8
|
const props = defineProps<
|
|
9
9
|
TagsInputItemTextProps & { class?: HTMLAttributes['class'] }
|
|
10
10
|
>();
|
|
11
11
|
|
|
12
|
-
const delegatedProps = computed(() =>
|
|
13
|
-
const { class: _class, ...delegated } = props;
|
|
14
|
-
return delegated;
|
|
15
|
-
});
|
|
12
|
+
const delegatedProps = computed(() => omitClass(props));
|
|
16
13
|
|
|
17
14
|
const forwardedProps = useForwardProps(delegatedProps);
|
|
18
15
|
</script>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { ToggleEmits, ToggleProps } from 'reka-ui';
|
|
3
3
|
import { Toggle, useForwardPropsEmits } from 'reka-ui';
|
|
4
4
|
import { cn } from '@/lib/utils';
|
|
5
|
-
import { ToggleVariants, toggleVariants } from '.';
|
|
5
|
+
import { type ToggleVariants, toggleVariants } from '.';
|
|
6
6
|
|
|
7
7
|
const props = withDefaults(
|
|
8
8
|
defineProps<
|