@aleph-alpha/ui-library 1.11.0 → 1.12.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/README.md +0 -2
- package/dist/system/index.d.ts +860 -179
- package/dist/system/lib.js +33936 -9729
- package/package.json +1 -2
- package/src/compositions/UiDataTable/UiDataTable.stories.ts +6 -7
- package/src/compositions/UiDataTable/UiDataTableColumnHeader.vue +22 -8
- package/src/compositions/UiDataTable/UiDataTablePagination.vue +5 -5
- package/src/compositions/UiDatePicker/UiDatePicker.vue +2 -2
- package/src/primitives/UiAlert/UiAlert.stories.ts +8 -8
- package/src/primitives/UiBadge/UiBadge.stories.ts +9 -9
- package/src/primitives/UiButton/UiButton.stories.ts +12 -12
- package/src/primitives/UiCalendar/UiCalendar.stories.ts +4 -4
- package/src/primitives/UiDropdownMenu/UiDropdownMenu.stories.ts +2 -2
- package/src/primitives/UiIcon/UiIcon.stories.ts +59 -13
- package/src/primitives/UiIcon/UiIcon.vue +41 -3
- package/src/primitives/UiIcon/__tests__/UiIcon.test.ts +33 -4
- package/src/primitives/UiIcon/index.ts +1 -0
- package/src/primitives/UiIcon/types.ts +24 -5
- package/src/primitives/UiIconButton/UiIconButton.stories.ts +36 -36
- package/src/primitives/UiKbd/UiKbd.stories.ts +551 -0
- package/src/primitives/UiKbd/UiKbd.vue +62 -0
- package/src/primitives/UiKbd/UiKbdGroup.vue +16 -0
- package/src/primitives/UiKbd/__tests__/UiKbd.test.ts +46 -0
- package/src/primitives/UiKbd/index.ts +3 -0
- package/src/primitives/UiKbd/types.ts +32 -0
- package/src/primitives/UiLabel/UiLabel.stories.ts +192 -0
- package/src/primitives/UiLabel/UiLabel.vue +16 -0
- package/src/primitives/UiLabel/__tests__/UiLabel.test.ts +43 -0
- package/src/primitives/UiLabel/index.ts +2 -0
- package/src/primitives/UiLabel/types.ts +16 -0
- package/src/primitives/UiListbox/UiListbox.stories.ts +607 -0
- package/src/primitives/UiListbox/UiListbox.vue +30 -0
- package/src/primitives/UiListbox/UiListboxContent.vue +16 -0
- package/src/primitives/UiListbox/UiListboxFilter.vue +16 -0
- package/src/primitives/UiListbox/UiListboxGroup.vue +16 -0
- package/src/primitives/UiListbox/UiListboxGroupLabel.vue +16 -0
- package/src/primitives/UiListbox/UiListboxItem.vue +20 -0
- package/src/primitives/UiListbox/UiListboxItemIndicator.vue +16 -0
- package/src/primitives/UiListbox/__tests__/UiListbox.test.ts +42 -0
- package/src/primitives/UiListbox/index.ts +8 -0
- package/src/primitives/UiListbox/types.ts +119 -0
- package/src/primitives/UiPopover/index.ts +1 -0
- package/src/primitives/UiSeparator/UiSeparator.stories.ts +177 -0
- package/src/primitives/UiSeparator/UiSeparator.vue +17 -0
- package/src/primitives/UiSeparator/__tests__/UiSeparator.test.ts +34 -0
- package/src/primitives/UiSeparator/index.ts +2 -0
- package/src/primitives/UiSeparator/types.ts +23 -0
- package/src/primitives/UiSkeleton/UiSkeleton.stories.ts +247 -0
- package/src/primitives/UiSkeleton/UiSkeleton.vue +24 -0
- package/src/primitives/UiSkeleton/__tests__/UiSkeleton.test.ts +47 -0
- package/src/primitives/UiSkeleton/index.ts +2 -0
- package/src/primitives/UiSkeleton/types.ts +26 -0
- package/src/primitives/UiTable/UiTable.stories.ts +2 -2
- package/src/primitives/UiTagsInput/UiTagsInput.stories.ts +538 -0
- package/src/primitives/UiTagsInput/UiTagsInput.vue +27 -0
- package/src/primitives/UiTagsInput/UiTagsInputInput.vue +14 -0
- package/src/primitives/UiTagsInput/UiTagsInputItem.vue +16 -0
- package/src/primitives/UiTagsInput/UiTagsInputItemDelete.vue +16 -0
- package/src/primitives/UiTagsInput/UiTagsInputItemText.vue +14 -0
- package/src/primitives/UiTagsInput/__tests__/UiTagsInput.test.ts +44 -0
- package/src/primitives/UiTagsInput/index.ts +6 -0
- package/src/primitives/UiTagsInput/types.ts +60 -0
- package/src/primitives/UiToggle/UiToggle.stories.ts +370 -0
- package/src/primitives/UiToggle/UiToggle.vue +28 -0
- package/src/primitives/UiToggle/__tests__/UiToggle.test.ts +62 -0
- package/src/primitives/UiToggle/index.ts +2 -0
- package/src/primitives/UiToggle/types.ts +35 -0
- package/src/primitives/UiTooltip/UiTooltip.stories.ts +8 -8
- package/src/primitives/index.ts +7 -0
- package/src/primitives/shadcn/accordion/AccordionTrigger.vue +5 -4
- package/src/primitives/shadcn/calendar/CalendarNextButton.vue +2 -2
- package/src/primitives/shadcn/calendar/CalendarPrevButton.vue +2 -2
- package/src/primitives/shadcn/checkbox/Checkbox.vue +2 -2
- package/src/primitives/shadcn/dropdown-menu/DropdownMenuCheckboxItem.vue +2 -2
- package/src/primitives/shadcn/dropdown-menu/DropdownMenuSubTrigger.vue +2 -2
- package/src/primitives/shadcn/kbd/Kbd.vue +20 -0
- package/src/primitives/shadcn/kbd/KbdGroup.vue +12 -0
- package/src/primitives/shadcn/kbd/index.ts +2 -0
- package/src/primitives/shadcn/listbox/Listbox.vue +23 -0
- package/src/primitives/shadcn/listbox/ListboxContent.vue +26 -0
- package/src/primitives/shadcn/listbox/ListboxFilter.vue +30 -0
- package/src/primitives/shadcn/listbox/ListboxGroup.vue +26 -0
- package/src/primitives/shadcn/listbox/ListboxGroupLabel.vue +26 -0
- package/src/primitives/shadcn/listbox/ListboxItem.vue +32 -0
- package/src/primitives/shadcn/listbox/ListboxItemIndicator.vue +40 -0
- package/src/primitives/shadcn/listbox/index.ts +7 -0
- package/src/primitives/shadcn/native-select/NativeSelect.vue +5 -4
- package/src/primitives/shadcn/range-calendar/RangeCalendarNextButton.vue +2 -2
- package/src/primitives/shadcn/range-calendar/RangeCalendarPrevButton.vue +2 -2
- package/src/primitives/shadcn/select/SelectItem.vue +2 -2
- package/src/primitives/shadcn/select/SelectScrollDownButton.vue +2 -2
- package/src/primitives/shadcn/select/SelectScrollUpButton.vue +2 -2
- package/src/primitives/shadcn/select/SelectTrigger.vue +2 -2
- package/src/primitives/shadcn/skeleton/Skeleton.vue +10 -0
- package/src/primitives/shadcn/skeleton/index.ts +1 -0
- package/src/primitives/shadcn/spinner/Spinner.vue +5 -4
- package/src/primitives/shadcn/tags-input/TagsInput.vue +33 -0
- package/src/primitives/shadcn/tags-input/TagsInputInput.vue +24 -0
- package/src/primitives/shadcn/tags-input/TagsInputItem.vue +31 -0
- package/src/primitives/shadcn/tags-input/TagsInputItemDelete.vue +46 -0
- package/src/primitives/shadcn/tags-input/TagsInputItemText.vue +24 -0
- package/src/primitives/shadcn/tags-input/index.ts +5 -0
- package/src/primitives/shadcn/toggle/Toggle.vue +34 -0
- package/src/primitives/shadcn/toggle/index.ts +27 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { CalendarPrevProps } from 'reka-ui';
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
-
import {
|
|
5
|
+
import { UiIcon } from '@/primitives/UiIcon';
|
|
6
6
|
import { CalendarPrev, useForwardProps } from 'reka-ui';
|
|
7
7
|
import { cn } from '@/lib/utils';
|
|
8
8
|
import { buttonVariants } from '@/primitives/shadcn/button';
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
v-bind="forwardedProps"
|
|
28
28
|
>
|
|
29
29
|
<slot>
|
|
30
|
-
<
|
|
30
|
+
<UiIcon name="chevron-left" :size="16" />
|
|
31
31
|
</slot>
|
|
32
32
|
</CalendarPrev>
|
|
33
33
|
</template>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { CheckboxRootEmits, CheckboxRootProps } from 'reka-ui';
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
-
import {
|
|
5
|
+
import { UiIcon } from '@/primitives/UiIcon';
|
|
6
6
|
import { CheckboxIndicator, CheckboxRoot, useForwardPropsEmits } from 'reka-ui';
|
|
7
7
|
import { cn } from '@/lib/utils';
|
|
8
8
|
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
class="grid place-content-center text-current transition-none"
|
|
32
32
|
>
|
|
33
33
|
<slot v-bind="slotProps">
|
|
34
|
-
<
|
|
34
|
+
<UiIcon name="check" :size="12" />
|
|
35
35
|
</slot>
|
|
36
36
|
</CheckboxIndicator>
|
|
37
37
|
</CheckboxRoot>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { DropdownMenuCheckboxItemEmits, DropdownMenuCheckboxItemProps } from 'reka-ui';
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
-
import {
|
|
5
|
+
import { UiIcon } from '@/primitives/UiIcon';
|
|
6
6
|
import {
|
|
7
7
|
DropdownMenuCheckboxItem,
|
|
8
8
|
DropdownMenuItemIndicator,
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<span class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
33
33
|
<DropdownMenuItemIndicator class="flex items-center justify-center">
|
|
34
34
|
<slot name="indicator-icon">
|
|
35
|
-
<
|
|
35
|
+
<UiIcon name="check" :size="16" />
|
|
36
36
|
</slot>
|
|
37
37
|
</DropdownMenuItemIndicator>
|
|
38
38
|
</span>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { DropdownMenuSubTriggerProps } from 'reka-ui';
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
-
import {
|
|
5
|
+
import { UiIcon } from '@/primitives/UiIcon';
|
|
6
6
|
import { DropdownMenuSubTrigger, useForwardProps } from 'reka-ui';
|
|
7
7
|
import { cn } from '@/lib/utils';
|
|
8
8
|
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
"
|
|
27
27
|
>
|
|
28
28
|
<slot />
|
|
29
|
-
<
|
|
29
|
+
<UiIcon name="chevron-right" :size="16" class="ml-auto" />
|
|
30
30
|
</DropdownMenuSubTrigger>
|
|
31
31
|
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{ class?: HTMLAttributes['class'] }>();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<kbd
|
|
10
|
+
data-slot="kbd"
|
|
11
|
+
:class="
|
|
12
|
+
cn(
|
|
13
|
+
'pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground',
|
|
14
|
+
props.class,
|
|
15
|
+
)
|
|
16
|
+
"
|
|
17
|
+
>
|
|
18
|
+
<slot />
|
|
19
|
+
</kbd>
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{ class?: HTMLAttributes['class'] }>();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<span data-slot="kbd-group" :class="cn('inline-flex items-center gap-1', props.class)">
|
|
10
|
+
<slot />
|
|
11
|
+
</span>
|
|
12
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ListboxRootEmits, ListboxRootProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { ListboxRoot, useForwardPropsEmits } from 'reka-ui';
|
|
5
|
+
import { computed } from 'vue';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ListboxRootProps & { class?: HTMLAttributes['class'] }>();
|
|
9
|
+
const emits = defineEmits<ListboxRootEmits>();
|
|
10
|
+
|
|
11
|
+
const delegatedProps = computed(() => {
|
|
12
|
+
const { class: _class, ...delegated } = props;
|
|
13
|
+
return delegated;
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<ListboxRoot data-slot="listbox" :class="cn('flex flex-col', props.class)" v-bind="forwarded">
|
|
21
|
+
<slot />
|
|
22
|
+
</ListboxRoot>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ListboxContentProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { ListboxContent, useForwardProps } from 'reka-ui';
|
|
5
|
+
import { computed } from 'vue';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ListboxContentProps & { class?: HTMLAttributes['class'] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = computed(() => {
|
|
11
|
+
const { class: _class, ...delegated } = props;
|
|
12
|
+
return delegated;
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<ListboxContent
|
|
20
|
+
data-slot="listbox-content"
|
|
21
|
+
:class="cn('max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto', props.class)"
|
|
22
|
+
v-bind="forwardedProps"
|
|
23
|
+
>
|
|
24
|
+
<slot />
|
|
25
|
+
</ListboxContent>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ListboxFilterEmits, ListboxFilterProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { ListboxFilter, useForwardPropsEmits } from 'reka-ui';
|
|
5
|
+
import { computed } from 'vue';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ListboxFilterProps & { class?: HTMLAttributes['class'] }>();
|
|
9
|
+
const emits = defineEmits<ListboxFilterEmits>();
|
|
10
|
+
|
|
11
|
+
const delegatedProps = computed(() => {
|
|
12
|
+
const { class: _class, ...delegated } = props;
|
|
13
|
+
return delegated;
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<ListboxFilter
|
|
21
|
+
data-slot="listbox-filter"
|
|
22
|
+
:class="
|
|
23
|
+
cn(
|
|
24
|
+
'placeholder:text-muted-foreground flex h-9 w-full rounded-md bg-transparent px-3 py-2 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
25
|
+
props.class,
|
|
26
|
+
)
|
|
27
|
+
"
|
|
28
|
+
v-bind="forwarded"
|
|
29
|
+
/>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ListboxGroupProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { ListboxGroup, useForwardProps } from 'reka-ui';
|
|
5
|
+
import { computed } from 'vue';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ListboxGroupProps & { class?: HTMLAttributes['class'] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = computed(() => {
|
|
11
|
+
const { class: _class, ...delegated } = props;
|
|
12
|
+
return delegated;
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<ListboxGroup
|
|
20
|
+
data-slot="listbox-group"
|
|
21
|
+
:class="cn('overflow-hidden', props.class)"
|
|
22
|
+
v-bind="forwardedProps"
|
|
23
|
+
>
|
|
24
|
+
<slot />
|
|
25
|
+
</ListboxGroup>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ListboxGroupLabelProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { ListboxGroupLabel, useForwardProps } from 'reka-ui';
|
|
5
|
+
import { computed } from 'vue';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ListboxGroupLabelProps & { class?: HTMLAttributes['class'] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = computed(() => {
|
|
11
|
+
const { class: _class, ...delegated } = props;
|
|
12
|
+
return delegated;
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<ListboxGroupLabel
|
|
20
|
+
data-slot="listbox-group-label"
|
|
21
|
+
:class="cn('text-muted-foreground px-2 py-1.5 text-xs font-medium', props.class)"
|
|
22
|
+
v-bind="forwardedProps"
|
|
23
|
+
>
|
|
24
|
+
<slot />
|
|
25
|
+
</ListboxGroupLabel>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ListboxItemEmits, ListboxItemProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { ListboxItem, useForwardPropsEmits } from 'reka-ui';
|
|
5
|
+
import { computed } from 'vue';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ListboxItemProps & { class?: HTMLAttributes['class'] }>();
|
|
9
|
+
const emits = defineEmits<ListboxItemEmits>();
|
|
10
|
+
|
|
11
|
+
const delegatedProps = computed(() => {
|
|
12
|
+
const { class: _class, ...delegated } = props;
|
|
13
|
+
return delegated;
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<ListboxItem
|
|
21
|
+
data-slot="listbox-item"
|
|
22
|
+
:class="
|
|
23
|
+
cn(
|
|
24
|
+
'data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground [&_svg:not([class*=\'text-\'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4',
|
|
25
|
+
props.class,
|
|
26
|
+
)
|
|
27
|
+
"
|
|
28
|
+
v-bind="forwarded"
|
|
29
|
+
>
|
|
30
|
+
<slot />
|
|
31
|
+
</ListboxItem>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ListboxItemIndicatorProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { ListboxItemIndicator, useForwardProps } from 'reka-ui';
|
|
5
|
+
import { computed } from 'vue';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ListboxItemIndicatorProps & { class?: HTMLAttributes['class'] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = computed(() => {
|
|
11
|
+
const { class: _class, ...delegated } = props;
|
|
12
|
+
return delegated;
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<ListboxItemIndicator
|
|
20
|
+
data-slot="listbox-item-indicator"
|
|
21
|
+
:class="cn('ml-auto inline-flex items-center justify-center', props.class)"
|
|
22
|
+
v-bind="forwardedProps"
|
|
23
|
+
>
|
|
24
|
+
<slot>
|
|
25
|
+
<svg
|
|
26
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
27
|
+
width="16"
|
|
28
|
+
height="16"
|
|
29
|
+
viewBox="0 0 24 24"
|
|
30
|
+
fill="none"
|
|
31
|
+
stroke="currentColor"
|
|
32
|
+
stroke-width="2"
|
|
33
|
+
stroke-linecap="round"
|
|
34
|
+
stroke-linejoin="round"
|
|
35
|
+
>
|
|
36
|
+
<path d="M20 6 9 17l-5-5" />
|
|
37
|
+
</svg>
|
|
38
|
+
</slot>
|
|
39
|
+
</ListboxItemIndicator>
|
|
40
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as Listbox } from './Listbox.vue';
|
|
2
|
+
export { default as ListboxContent } from './ListboxContent.vue';
|
|
3
|
+
export { default as ListboxFilter } from './ListboxFilter.vue';
|
|
4
|
+
export { default as ListboxItem } from './ListboxItem.vue';
|
|
5
|
+
export { default as ListboxItemIndicator } from './ListboxItemIndicator.vue';
|
|
6
|
+
export { default as ListboxGroup } from './ListboxGroup.vue';
|
|
7
|
+
export { default as ListboxGroupLabel } from './ListboxGroupLabel.vue';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { AcceptableValue } from 'reka-ui';
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { reactiveOmit, useVModel } from '@vueuse/core';
|
|
5
|
-
import {
|
|
5
|
+
import { UiIcon } from '@/primitives/UiIcon';
|
|
6
6
|
import { cn } from '@/lib/utils';
|
|
7
7
|
|
|
8
8
|
defineOptions({
|
|
@@ -46,9 +46,10 @@
|
|
|
46
46
|
>
|
|
47
47
|
<slot />
|
|
48
48
|
</select>
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
<UiIcon
|
|
50
|
+
name="chevron-down"
|
|
51
|
+
:size="16"
|
|
52
|
+
class="text-muted-foreground pointer-events-none absolute top-1/2 right-3.5 -translate-y-1/2 opacity-50 select-none"
|
|
52
53
|
aria-hidden="true"
|
|
53
54
|
data-slot="native-select-icon"
|
|
54
55
|
/>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { RangeCalendarNextProps } from 'reka-ui';
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
-
import {
|
|
5
|
+
import { UiIcon } from '@/primitives/UiIcon';
|
|
6
6
|
import { RangeCalendarNext, useForwardProps } from 'reka-ui';
|
|
7
7
|
import { cn } from '@/lib/utils';
|
|
8
8
|
import { buttonVariants } from '@/primitives/shadcn/button';
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
v-bind="forwardedProps"
|
|
29
29
|
>
|
|
30
30
|
<slot>
|
|
31
|
-
<
|
|
31
|
+
<UiIcon name="chevron-right" :size="16" />
|
|
32
32
|
</slot>
|
|
33
33
|
</RangeCalendarNext>
|
|
34
34
|
</template>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { RangeCalendarPrevProps } from 'reka-ui';
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
-
import {
|
|
5
|
+
import { UiIcon } from '@/primitives/UiIcon';
|
|
6
6
|
import { RangeCalendarPrev, useForwardProps } from 'reka-ui';
|
|
7
7
|
import { cn } from '@/lib/utils';
|
|
8
8
|
import { buttonVariants } from '@/primitives/shadcn/button';
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
v-bind="forwardedProps"
|
|
29
29
|
>
|
|
30
30
|
<slot>
|
|
31
|
-
<
|
|
31
|
+
<UiIcon name="chevron-left" :size="16" />
|
|
32
32
|
</slot>
|
|
33
33
|
</RangeCalendarPrev>
|
|
34
34
|
</template>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { SelectItemProps } from 'reka-ui';
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
-
import {
|
|
5
|
+
import { UiIcon } from '@/primitives/UiIcon';
|
|
6
6
|
import { SelectItem, SelectItemIndicator, SelectItemText, useForwardProps } from 'reka-ui';
|
|
7
7
|
import { cn } from '@/lib/utils';
|
|
8
8
|
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<span class="absolute right-2 flex size-3.5 items-center justify-center">
|
|
28
28
|
<SelectItemIndicator>
|
|
29
29
|
<slot name="indicator-icon">
|
|
30
|
-
<
|
|
30
|
+
<UiIcon name="check" :size="16" />
|
|
31
31
|
</slot>
|
|
32
32
|
</SelectItemIndicator>
|
|
33
33
|
</span>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { SelectScrollDownButtonProps } from 'reka-ui';
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
-
import {
|
|
5
|
+
import { UiIcon } from '@/primitives/UiIcon';
|
|
6
6
|
import { SelectScrollDownButton, useForwardProps } from 'reka-ui';
|
|
7
7
|
import { cn } from '@/lib/utils';
|
|
8
8
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
:class="cn('flex cursor-default items-center justify-center py-1', props.class)"
|
|
21
21
|
>
|
|
22
22
|
<slot>
|
|
23
|
-
<
|
|
23
|
+
<UiIcon name="chevron-down" :size="16" />
|
|
24
24
|
</slot>
|
|
25
25
|
</SelectScrollDownButton>
|
|
26
26
|
</template>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { SelectScrollUpButtonProps } from 'reka-ui';
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
-
import {
|
|
5
|
+
import { UiIcon } from '@/primitives/UiIcon';
|
|
6
6
|
import { SelectScrollUpButton, useForwardProps } from 'reka-ui';
|
|
7
7
|
import { cn } from '@/lib/utils';
|
|
8
8
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
:class="cn('flex cursor-default items-center justify-center py-1', props.class)"
|
|
21
21
|
>
|
|
22
22
|
<slot>
|
|
23
|
-
<
|
|
23
|
+
<UiIcon name="chevron-up" :size="16" />
|
|
24
24
|
</slot>
|
|
25
25
|
</SelectScrollUpButton>
|
|
26
26
|
</template>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { SelectTriggerProps } from 'reka-ui';
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
-
import {
|
|
5
|
+
import { UiIcon } from '@/primitives/UiIcon';
|
|
6
6
|
import { SelectIcon, SelectTrigger, useForwardProps } from 'reka-ui';
|
|
7
7
|
import { cn } from '@/lib/utils';
|
|
8
8
|
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
>
|
|
32
32
|
<slot />
|
|
33
33
|
<SelectIcon as-child>
|
|
34
|
-
<
|
|
34
|
+
<UiIcon name="chevron-down" :size="16" class="opacity-50" />
|
|
35
35
|
</SelectIcon>
|
|
36
36
|
</SelectTrigger>
|
|
37
37
|
</template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{ class?: HTMLAttributes['class'] }>();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<div data-slot="skeleton" :class="cn('bg-muted animate-pulse rounded-md', props.class)" />
|
|
10
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Skeleton } from './Skeleton.vue';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import {
|
|
3
|
+
import { UiIcon } from '@/primitives/UiIcon';
|
|
4
4
|
import { cn } from '@/lib/utils';
|
|
5
5
|
|
|
6
6
|
const props = defineProps<{
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
</script>
|
|
10
10
|
|
|
11
11
|
<template>
|
|
12
|
-
<
|
|
13
|
-
|
|
12
|
+
<UiIcon
|
|
13
|
+
name="loader-circle"
|
|
14
|
+
:size="16"
|
|
14
15
|
role="status"
|
|
15
16
|
aria-label="Loading"
|
|
16
|
-
:class="cn('
|
|
17
|
+
:class="cn('animate-spin', props.class)"
|
|
17
18
|
/>
|
|
18
19
|
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TagsInputRootEmits, TagsInputRootProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { TagsInputRoot, useForwardPropsEmits } from 'reka-ui';
|
|
5
|
+
import { computed } from 'vue';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<TagsInputRootProps & { class?: HTMLAttributes['class'] }>();
|
|
9
|
+
const emits = defineEmits<TagsInputRootEmits>();
|
|
10
|
+
|
|
11
|
+
const delegatedProps = computed(() => {
|
|
12
|
+
const { class: _class, ...delegated } = props;
|
|
13
|
+
return delegated;
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<TagsInputRoot
|
|
21
|
+
data-slot="tags-input"
|
|
22
|
+
:class="
|
|
23
|
+
cn(
|
|
24
|
+
'border-input focus-within:border-ring focus-within:ring-ring/50 flex min-h-9 w-full flex-wrap items-center gap-1.5 rounded-md border bg-transparent px-3 py-1 text-sm shadow-xs transition-[color,box-shadow] focus-within:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
|
|
25
|
+
props.class,
|
|
26
|
+
)
|
|
27
|
+
"
|
|
28
|
+
v-bind="forwarded"
|
|
29
|
+
v-slot="slotProps"
|
|
30
|
+
>
|
|
31
|
+
<slot v-bind="slotProps" />
|
|
32
|
+
</TagsInputRoot>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TagsInputInputProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { TagsInputInput, useForwardProps } from 'reka-ui';
|
|
5
|
+
import { computed } from 'vue';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<TagsInputInputProps & { class?: HTMLAttributes['class'] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = computed(() => {
|
|
11
|
+
const { class: _class, ...delegated } = props;
|
|
12
|
+
return delegated;
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<TagsInputInput
|
|
20
|
+
data-slot="tags-input-input"
|
|
21
|
+
:class="cn('placeholder:text-muted-foreground flex-1 bg-transparent outline-none', props.class)"
|
|
22
|
+
v-bind="forwardedProps"
|
|
23
|
+
/>
|
|
24
|
+
</template>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TagsInputItemProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { TagsInputItem, useForwardProps } from 'reka-ui';
|
|
5
|
+
import { computed } from 'vue';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<TagsInputItemProps & { class?: HTMLAttributes['class'] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = computed(() => {
|
|
11
|
+
const { class: _class, ...delegated } = props;
|
|
12
|
+
return delegated;
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<TagsInputItem
|
|
20
|
+
data-slot="tags-input-item"
|
|
21
|
+
:class="
|
|
22
|
+
cn(
|
|
23
|
+
'bg-secondary text-secondary-foreground data-[state=active]:border-ring data-[state=active]:ring-ring/50 inline-flex h-6 shrink-0 items-center gap-1 rounded-sm border px-1 text-xs font-medium transition-[color,box-shadow] data-[state=active]:ring-[3px] [&[data-disabled]]:opacity-50 [&>button]:shrink-0',
|
|
24
|
+
props.class,
|
|
25
|
+
)
|
|
26
|
+
"
|
|
27
|
+
v-bind="forwardedProps"
|
|
28
|
+
>
|
|
29
|
+
<slot />
|
|
30
|
+
</TagsInputItem>
|
|
31
|
+
</template>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TagsInputItemDeleteProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { TagsInputItemDelete, useForwardProps } from 'reka-ui';
|
|
5
|
+
import { computed } from 'vue';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<TagsInputItemDeleteProps & { class?: HTMLAttributes['class'] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = computed(() => {
|
|
11
|
+
const { class: _class, ...delegated } = props;
|
|
12
|
+
return delegated;
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<TagsInputItemDelete
|
|
20
|
+
data-slot="tags-input-item-delete"
|
|
21
|
+
:class="
|
|
22
|
+
cn(
|
|
23
|
+
'hover:bg-secondary-foreground/20 focus-visible:border-ring focus-visible:ring-ring/50 -mr-0.5 flex size-4 items-center justify-center rounded-sm transition-[color,box-shadow] outline-none focus-visible:ring-[3px]',
|
|
24
|
+
props.class,
|
|
25
|
+
)
|
|
26
|
+
"
|
|
27
|
+
v-bind="forwardedProps"
|
|
28
|
+
>
|
|
29
|
+
<slot>
|
|
30
|
+
<svg
|
|
31
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
32
|
+
width="14"
|
|
33
|
+
height="14"
|
|
34
|
+
viewBox="0 0 24 24"
|
|
35
|
+
fill="none"
|
|
36
|
+
stroke="currentColor"
|
|
37
|
+
stroke-width="2"
|
|
38
|
+
stroke-linecap="round"
|
|
39
|
+
stroke-linejoin="round"
|
|
40
|
+
>
|
|
41
|
+
<path d="M18 6 6 18" />
|
|
42
|
+
<path d="m6 6 12 12" />
|
|
43
|
+
</svg>
|
|
44
|
+
</slot>
|
|
45
|
+
</TagsInputItemDelete>
|
|
46
|
+
</template>
|