@weni/unnnic-system 3.11.2 → 3.11.3-alpha.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/dist/components/Alert/Alert.vue.d.ts +3 -3
- package/dist/components/Alert/Version1dot1.vue.d.ts +1 -1
- package/dist/components/AudioRecorder/AudioHandler.vue.d.ts +109 -18
- package/dist/components/AudioRecorder/AudioRecorder.vue.d.ts +218 -36
- package/dist/components/AvatarIcon/AvatarIcon.vue.d.ts +1 -1
- package/dist/components/Button/Button.vue.d.ts +2 -2
- package/dist/components/Card/AccountCard.vue.d.ts +2 -2
- package/dist/components/Card/Card.vue.d.ts +120 -29
- package/dist/components/Card/CardCompany.vue.d.ts +2 -2
- package/dist/components/Card/CardStatusesContainer.vue.d.ts +110 -19
- package/dist/components/Card/ContentCard.vue.d.ts +1 -1
- package/dist/components/Card/DashCard.vue.d.ts +2 -2
- package/dist/components/Card/DefaultCard.vue.d.ts +1 -1
- package/dist/components/Card/MarketplaceCard.vue.d.ts +1 -1
- package/dist/components/Card/SimpleCard.vue.d.ts +109 -18
- package/dist/components/Card/StatusCard.vue.d.ts +1 -1
- package/dist/components/Card/TitleCard.vue.d.ts +109 -18
- package/dist/components/CardImage/CardImage.vue.d.ts +5 -5
- package/dist/components/CardInformation/CardInformation.vue.d.ts +110 -19
- package/dist/components/CardProject/CardProject.vue.d.ts +2 -2
- package/dist/components/Carousel/Carousel.vue.d.ts +2 -2
- package/dist/components/Carousel/TagCarousel.vue.d.ts +2 -2
- package/dist/components/ChartBar/ChartBar.vue.d.ts +115 -24
- package/dist/components/ChartLine/ChartLine.vue.d.ts +109 -18
- package/dist/components/ChatText/ChatText.vue.d.ts +109 -18
- package/dist/components/ChatsContact/ChatsContact.vue.d.ts +6 -6
- package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +109 -18
- package/dist/components/ChatsUserAvatar/ChatsUserAvatar.vue.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.vue.d.ts +3 -3
- package/dist/components/DataArea/DataArea.vue.d.ts +109 -18
- package/dist/components/DataTable/index.vue.d.ts +1 -1
- package/dist/components/DataTable/index.vue.d.ts.map +1 -1
- package/dist/components/DateFilter/DateFilter.vue.d.ts +10 -10
- package/dist/components/Drawer/Drawer.vue.d.ts +37 -207
- package/dist/components/Drawer/Drawer.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.vue.d.ts +1 -1
- package/dist/components/FormElement/FormElement.vue.d.ts +4 -4
- package/dist/components/ImportCard/ImportCard.vue.d.ts +6 -6
- package/dist/components/Input/Input.vue.d.ts +9 -9
- package/dist/components/Input/TextInput.vue.d.ts +2 -2
- package/dist/components/InputNext/InputNext.vue.d.ts +3 -3
- package/dist/components/Modal/Modal.vue.d.ts +1 -1
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts +209 -35
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
- package/dist/components/ModalNext/ModalNext.vue.d.ts +15 -15
- package/dist/components/ModalUpload/ModalUpload.vue.d.ts +12 -12
- package/dist/components/MoodRating/MoodRating.vue.d.ts +109 -18
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts +18 -18
- package/dist/components/Pagination/Pagination.vue.d.ts +6 -6
- package/dist/components/Radio/Radio.vue.d.ts +6 -6
- package/dist/components/SelectSmart/SelectSmart.vue.d.ts +11 -11
- package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +2 -2
- package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +5 -5
- package/dist/components/SelectTime/index.vue.d.ts +3 -3
- package/dist/components/Slider/Slider.vue.d.ts +109 -18
- package/dist/components/Switch/Switch.vue.d.ts +2 -2
- package/dist/components/Tab/Tab.vue.d.ts +109 -18
- package/dist/components/TableNext/TableBodyCell.vue.d.ts +2 -2
- package/dist/components/TableNext/TablePagination.vue.d.ts +6 -6
- package/dist/components/Tag/DefaultTag.vue.d.ts +1 -1
- package/dist/components/Tag/Tag.vue.d.ts +2 -2
- package/dist/components/TextArea/TextArea.vue.d.ts +5 -5
- package/dist/components/Toast/Toast.vue.d.ts +1 -1
- package/dist/components/Toast/Toast.vue.d.ts.map +1 -1
- package/dist/components/ToolTip/ToolTip.vue.d.ts +109 -18
- package/dist/components/ToolTip/ToolTip.vue.d.ts.map +1 -1
- package/dist/components/Tour/Tour.vue.d.ts +6 -6
- package/dist/components/Tour/TourPopover.vue.d.ts +6 -6
- package/dist/components/UploadArea/UploadArea.vue.d.ts +6 -6
- package/dist/components/ui/dialog/Dialog.vue.d.ts +23 -0
- package/dist/components/ui/dialog/Dialog.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +19 -0
- package/dist/components/ui/dialog/DialogClose.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +43 -0
- package/dist/components/ui/dialog/DialogContent.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts +25 -0
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts +29 -0
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts +23 -0
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +19 -0
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/index.d.ts +8 -0
- package/dist/components/ui/dialog/index.d.ts.map +1 -0
- package/dist/components/ui/drawer/Drawer.vue.d.ts +35 -0
- package/dist/components/ui/drawer/Drawer.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerClose.vue.d.ts +19 -0
- package/dist/components/ui/drawer/DrawerClose.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts +42 -0
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +23 -0
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +22 -0
- package/dist/components/ui/drawer/DrawerFooter.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +25 -0
- package/dist/components/ui/drawer/DrawerHeader.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +8 -0
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +23 -0
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts +19 -0
- package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/index.d.ts +11 -0
- package/dist/components/ui/drawer/index.d.ts.map +1 -0
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +2 -2
- package/dist/components/ui/popover/PopoverContent.vue.d.ts.map +1 -1
- package/dist/components/ui/segmented-control/SegmentedControlList.vue.d.ts +26 -0
- package/dist/components/ui/segmented-control/SegmentedControlList.vue.d.ts.map +1 -0
- package/dist/components/ui/segmented-control/SegmentedControlTrigger.vue.d.ts +24 -0
- package/dist/components/ui/segmented-control/SegmentedControlTrigger.vue.d.ts.map +1 -0
- package/dist/components/ui/segmented-control/index.d.ts +5 -0
- package/dist/components/ui/segmented-control/index.d.ts.map +1 -0
- package/dist/components/ui/tabs/TabsTrigger.vue.d.ts.map +1 -1
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts +23 -0
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts.map +1 -0
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +31 -0
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts.map +1 -0
- package/dist/components/ui/tooltip/TooltipProvider.vue.d.ts +19 -0
- package/dist/components/ui/tooltip/TooltipProvider.vue.d.ts.map +1 -0
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts +19 -0
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts.map +1 -0
- package/dist/components/ui/tooltip/index.d.ts +5 -0
- package/dist/components/ui/tooltip/index.d.ts.map +1 -0
- package/dist/{es-042a0d15.mjs → es-9cccca43.mjs} +1 -1
- package/dist/{index-fd0ea6b9.mjs → index-386c3448.mjs} +99605 -96738
- package/dist/{pt-br-3b7cced5.mjs → pt-br-9303b2c4.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +232 -196
- package/dist/unnnic.umd.js +48 -44
- package/package.json +2 -1
- package/src/assets/scss/tailwind.scss +8 -0
- package/src/components/Drawer/Drawer.vue +188 -269
- package/src/components/Drawer/__tests__/Drawer.spec.js +31 -46
- package/src/components/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +18 -19
- package/src/components/ModalDialog/ModalDialog.vue +62 -148
- package/src/components/ModalDialog/__tests__/ModalDialog.spec.js +11 -221
- package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -22
- package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +3 -1
- package/src/components/Toast/Toast.vue +12 -8
- package/src/components/ToolTip/ToolTip.vue +41 -188
- package/src/components/ToolTip/__tests__/ToolTip.spec.js +345 -61
- package/src/components/index.ts +86 -12
- package/src/components/ui/dialog/Dialog.vue +15 -0
- package/src/components/ui/dialog/DialogClose.vue +25 -0
- package/src/components/ui/dialog/DialogContent.vue +130 -0
- package/src/components/ui/dialog/DialogFooter.vue +46 -0
- package/src/components/ui/dialog/DialogHeader.vue +79 -0
- package/src/components/ui/dialog/DialogTitle.vue +34 -0
- package/src/components/ui/dialog/DialogTrigger.vue +12 -0
- package/src/components/ui/dialog/index.ts +7 -0
- package/src/components/ui/drawer/Drawer.vue +27 -0
- package/src/components/ui/drawer/DrawerClose.vue +37 -0
- package/src/components/ui/drawer/DrawerContent.vue +102 -0
- package/src/components/ui/drawer/DrawerDescription.vue +40 -0
- package/src/components/ui/drawer/DrawerFooter.vue +38 -0
- package/src/components/ui/drawer/DrawerHeader.vue +57 -0
- package/src/components/ui/drawer/DrawerOverlay.vue +34 -0
- package/src/components/ui/drawer/DrawerTitle.vue +37 -0
- package/src/components/ui/drawer/DrawerTrigger.vue +31 -0
- package/src/components/ui/drawer/index.ts +10 -0
- package/src/components/ui/popover/PopoverContent.vue +0 -2
- package/src/components/ui/segmented-control/SegmentedControlList.vue +51 -0
- package/src/components/ui/segmented-control/SegmentedControlTrigger.vue +81 -0
- package/src/components/ui/segmented-control/index.ts +4 -0
- package/src/components/ui/tabs/TabsTrigger.vue +4 -20
- package/src/components/ui/tooltip/Tooltip.vue +15 -0
- package/src/components/ui/tooltip/TooltipContent.vue +73 -0
- package/src/components/ui/tooltip/TooltipProvider.vue +15 -0
- package/src/components/ui/tooltip/TooltipTrigger.vue +22 -0
- package/src/components/ui/tooltip/index.ts +4 -0
- package/src/stories/Dialog.stories.js +832 -0
- package/src/stories/Drawer.stories.js +1 -1
- package/src/stories/DrawerNext.stories.js +610 -0
- package/src/stories/ModalDialog.mdx +3 -0
- package/src/stories/ModalDialog.stories.js +1 -1
- package/src/stories/SegmentedControl.stories.js +253 -0
- package/src/stories/Tabs.stories.js +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DrawerTriggerProps } from 'vaul-vue';
|
|
3
|
+
import { DrawerTrigger } from 'vaul-vue';
|
|
4
|
+
|
|
5
|
+
defineOptions({
|
|
6
|
+
name: 'UnnnicDrawerTrigger',
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const props = defineProps<DrawerTriggerProps>();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<DrawerTrigger
|
|
14
|
+
v-bind="props"
|
|
15
|
+
class="unnnic-drawer__trigger"
|
|
16
|
+
>
|
|
17
|
+
<slot />
|
|
18
|
+
</DrawerTrigger>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<style lang="scss" scoped>
|
|
22
|
+
@use '@/assets/scss/unnnic' as *;
|
|
23
|
+
|
|
24
|
+
.unnnic-drawer__trigger {
|
|
25
|
+
border: none;
|
|
26
|
+
background: none;
|
|
27
|
+
padding: 0;
|
|
28
|
+
margin: 0;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
}
|
|
31
|
+
</style>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as Drawer } from './Drawer.vue';
|
|
2
|
+
export { default as DrawerContent } from './DrawerContent.vue';
|
|
3
|
+
export { default as DrawerDescription } from './DrawerDescription.vue';
|
|
4
|
+
export { default as DrawerFooter } from './DrawerFooter.vue';
|
|
5
|
+
export { default as DrawerHeader } from './DrawerHeader.vue';
|
|
6
|
+
export { default as DrawerOverlay } from './DrawerOverlay.vue';
|
|
7
|
+
export { default as DrawerTitle } from './DrawerTitle.vue';
|
|
8
|
+
export { default as DrawerTrigger } from './DrawerTrigger.vue';
|
|
9
|
+
export { default as DrawerClose } from './DrawerClose.vue';
|
|
10
|
+
export { DrawerPortal } from 'vaul-vue';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TabsListProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
+
import { TabsList } from 'reka-ui';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
import { provide, computed } from 'vue';
|
|
8
|
+
|
|
9
|
+
const props = withDefaults(
|
|
10
|
+
defineProps<
|
|
11
|
+
TabsListProps & {
|
|
12
|
+
size?: 'small' | 'medium';
|
|
13
|
+
class?: HTMLAttributes['class'];
|
|
14
|
+
}
|
|
15
|
+
>(),
|
|
16
|
+
{
|
|
17
|
+
size: 'medium',
|
|
18
|
+
},
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
const delegatedProps = reactiveOmit(props, 'class');
|
|
22
|
+
|
|
23
|
+
provide(
|
|
24
|
+
'segmented-control-size',
|
|
25
|
+
computed(() => props.size),
|
|
26
|
+
);
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<TabsList
|
|
31
|
+
v-bind="delegatedProps"
|
|
32
|
+
:class="cn('unnnic-segmented-control-list', props.class)"
|
|
33
|
+
>
|
|
34
|
+
<slot />
|
|
35
|
+
</TabsList>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<style lang="scss" scoped>
|
|
39
|
+
@use '@/assets/scss/unnnic' as *;
|
|
40
|
+
|
|
41
|
+
.unnnic-segmented-control-list {
|
|
42
|
+
padding: $unnnic-space-1;
|
|
43
|
+
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
gap: $unnnic-space-1;
|
|
47
|
+
|
|
48
|
+
border-radius: $unnnic-radius-2;
|
|
49
|
+
background-color: $unnnic-color-bg-soft;
|
|
50
|
+
}
|
|
51
|
+
</style>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TabsTriggerProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes, ComputedRef } from 'vue';
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
+
import { TabsTrigger, useForwardProps } from 'reka-ui';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
import { inject, computed } from 'vue';
|
|
8
|
+
|
|
9
|
+
const props = defineProps<
|
|
10
|
+
TabsTriggerProps & {
|
|
11
|
+
size?: 'small' | 'medium';
|
|
12
|
+
class?: HTMLAttributes['class'];
|
|
13
|
+
}
|
|
14
|
+
>();
|
|
15
|
+
|
|
16
|
+
const delegatedProps = reactiveOmit(props, 'class');
|
|
17
|
+
|
|
18
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
19
|
+
|
|
20
|
+
const injectedSize = inject<ComputedRef<'small' | 'medium'>>(
|
|
21
|
+
'segmented-control-size',
|
|
22
|
+
);
|
|
23
|
+
const currentSize = computed(
|
|
24
|
+
() => props.size ?? injectedSize?.value ?? 'medium',
|
|
25
|
+
);
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<TabsTrigger
|
|
30
|
+
v-bind="forwardedProps"
|
|
31
|
+
:class="
|
|
32
|
+
cn(
|
|
33
|
+
'unnnic-segmented-control-trigger',
|
|
34
|
+
`unnnic-segmented-control-trigger--${currentSize}`,
|
|
35
|
+
'transition-all',
|
|
36
|
+
props.class,
|
|
37
|
+
)
|
|
38
|
+
"
|
|
39
|
+
>
|
|
40
|
+
<slot />
|
|
41
|
+
</TabsTrigger>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<style lang="scss" scoped>
|
|
45
|
+
@use '@/assets/scss/unnnic' as *;
|
|
46
|
+
|
|
47
|
+
.unnnic-segmented-control-trigger {
|
|
48
|
+
width: 100%;
|
|
49
|
+
|
|
50
|
+
border: 1px solid $unnnic-color-bg-soft;
|
|
51
|
+
|
|
52
|
+
padding: $unnnic-space-2 $unnnic-space-4;
|
|
53
|
+
|
|
54
|
+
background-color: $unnnic-color-bg-soft;
|
|
55
|
+
border-radius: $unnnic-radius-1;
|
|
56
|
+
|
|
57
|
+
font: $unnnic-font-emphasis;
|
|
58
|
+
color: $unnnic-color-fg-base;
|
|
59
|
+
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
|
|
62
|
+
&[data-state='active'] {
|
|
63
|
+
border-color: $unnnic-color-border-soft;
|
|
64
|
+
background-color: $unnnic-color-bg-base;
|
|
65
|
+
color: $unnnic-color-fg-emphasized;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&:disabled {
|
|
69
|
+
color: $unnnic-color-fg-muted;
|
|
70
|
+
cursor: not-allowed;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:hover:not(:disabled) {
|
|
74
|
+
color: $unnnic-color-fg-emphasized;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&--small {
|
|
78
|
+
font: $unnnic-font-caption-1;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
</style>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as SegmentedControl } from '../tabs/Tabs.vue';
|
|
2
|
+
export { default as SegmentedControlContent } from '../tabs/TabsContent.vue';
|
|
3
|
+
export { default as SegmentedControlList } from './SegmentedControlList.vue';
|
|
4
|
+
export { default as SegmentedControlTrigger } from './SegmentedControlTrigger.vue';
|
|
@@ -4,7 +4,6 @@ import type { HTMLAttributes } from 'vue';
|
|
|
4
4
|
import { reactiveOmit } from '@vueuse/core';
|
|
5
5
|
import { TabsTrigger, useForwardProps } from 'reka-ui';
|
|
6
6
|
import { cn } from '@/lib/utils';
|
|
7
|
-
import { computed } from 'vue';
|
|
8
7
|
|
|
9
8
|
const props = defineProps<
|
|
10
9
|
TabsTriggerProps & { class?: HTMLAttributes['class'] }
|
|
@@ -13,28 +12,12 @@ const props = defineProps<
|
|
|
13
12
|
const delegatedProps = reactiveOmit(props, 'class');
|
|
14
13
|
|
|
15
14
|
const forwardedProps = useForwardProps(delegatedProps);
|
|
16
|
-
|
|
17
|
-
const classes = computed(() => {
|
|
18
|
-
const defaultClasses = ['unnnic-tabs-trigger'];
|
|
19
|
-
|
|
20
|
-
if (props.disabled) {
|
|
21
|
-
defaultClasses.push('unnnic-tabs-trigger--disabled');
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return defaultClasses;
|
|
25
|
-
});
|
|
26
15
|
</script>
|
|
27
16
|
|
|
28
17
|
<template>
|
|
29
18
|
<TabsTrigger
|
|
30
19
|
v-bind="forwardedProps"
|
|
31
|
-
:class="
|
|
32
|
-
cn(
|
|
33
|
-
...classes,
|
|
34
|
-
'transition-all disabled:pointer-events-none disabled:opacity-50',
|
|
35
|
-
props.class,
|
|
36
|
-
)
|
|
37
|
-
"
|
|
20
|
+
:class="cn('unnnic-tabs-trigger', 'transition-all', props.class)"
|
|
38
21
|
>
|
|
39
22
|
<span class="unnnic-tabs-trigger__content truncate">
|
|
40
23
|
<slot />
|
|
@@ -62,11 +45,12 @@ const classes = computed(() => {
|
|
|
62
45
|
$unnnic-color-border-active;
|
|
63
46
|
}
|
|
64
47
|
|
|
65
|
-
|
|
48
|
+
&:disabled {
|
|
66
49
|
color: $unnnic-color-fg-muted;
|
|
50
|
+
cursor: not-allowed;
|
|
67
51
|
}
|
|
68
52
|
|
|
69
|
-
&:hover {
|
|
53
|
+
&:hover:not(:disabled) {
|
|
70
54
|
color: $unnnic-color-fg-emphasized;
|
|
71
55
|
}
|
|
72
56
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TooltipRootEmits, TooltipRootProps } from 'reka-ui';
|
|
3
|
+
import { TooltipRoot, useForwardPropsEmits } from 'reka-ui';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<TooltipRootProps>();
|
|
6
|
+
const emits = defineEmits<TooltipRootEmits>();
|
|
7
|
+
|
|
8
|
+
const forwarded = useForwardPropsEmits(props, emits);
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<TooltipRoot v-bind="forwarded">
|
|
13
|
+
<slot />
|
|
14
|
+
</TooltipRoot>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TooltipContentEmits, TooltipContentProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
+
import {
|
|
6
|
+
TooltipArrow,
|
|
7
|
+
TooltipContent,
|
|
8
|
+
TooltipPortal,
|
|
9
|
+
useForwardPropsEmits,
|
|
10
|
+
} from 'reka-ui';
|
|
11
|
+
import { cn } from '@/lib/utils';
|
|
12
|
+
|
|
13
|
+
defineOptions({
|
|
14
|
+
inheritAttrs: false,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const props = withDefaults(
|
|
18
|
+
defineProps<TooltipContentProps & { class?: HTMLAttributes['class'] }>(),
|
|
19
|
+
{
|
|
20
|
+
sideOffset: 0,
|
|
21
|
+
},
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
const emits = defineEmits<TooltipContentEmits>();
|
|
25
|
+
|
|
26
|
+
const delegatedProps = reactiveOmit(props, 'class');
|
|
27
|
+
|
|
28
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<TooltipPortal>
|
|
33
|
+
<TooltipContent
|
|
34
|
+
v-bind="{ ...forwarded, ...$attrs }"
|
|
35
|
+
:class="
|
|
36
|
+
cn(
|
|
37
|
+
'tooltip__content',
|
|
38
|
+
'animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
|
39
|
+
props.class,
|
|
40
|
+
)
|
|
41
|
+
"
|
|
42
|
+
>
|
|
43
|
+
<slot />
|
|
44
|
+
|
|
45
|
+
<TooltipArrow class="tooltip__arrow" />
|
|
46
|
+
</TooltipContent>
|
|
47
|
+
</TooltipPortal>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<style lang="scss">
|
|
51
|
+
@use '@/assets/scss/unnnic' as *;
|
|
52
|
+
|
|
53
|
+
.tooltip__content {
|
|
54
|
+
z-index: 10001;
|
|
55
|
+
|
|
56
|
+
background-color: $unnnic-color-gray-900;
|
|
57
|
+
color: $unnnic-color-white;
|
|
58
|
+
border-radius: $unnnic-radius-1;
|
|
59
|
+
padding: $unnnic-space-2;
|
|
60
|
+
box-shadow: $unnnic-shadow-1;
|
|
61
|
+
font: $unnnic-font-caption-2;
|
|
62
|
+
|
|
63
|
+
overflow-wrap: break-word;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.tooltip__arrow {
|
|
67
|
+
width: 10px;
|
|
68
|
+
height: 10px;
|
|
69
|
+
background-color: $unnnic-color-gray-900;
|
|
70
|
+
fill: $unnnic-color-gray-900;
|
|
71
|
+
transform: rotate(45deg) translate(-50%, -50%);
|
|
72
|
+
}
|
|
73
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TooltipProviderProps } from 'reka-ui';
|
|
3
|
+
import { TooltipProvider } from 'reka-ui';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<TooltipProviderProps>();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<TooltipProvider
|
|
10
|
+
v-bind="props"
|
|
11
|
+
:delayDuration="100"
|
|
12
|
+
>
|
|
13
|
+
<slot />
|
|
14
|
+
</TooltipProvider>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TooltipTriggerProps } from 'reka-ui';
|
|
3
|
+
import { TooltipTrigger } from 'reka-ui';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<TooltipTriggerProps>();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<TooltipTrigger
|
|
10
|
+
v-bind="props"
|
|
11
|
+
as="div"
|
|
12
|
+
class="unnnic-tooltip-trigger"
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</TooltipTrigger>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<style lang="scss" scoped>
|
|
19
|
+
.unnnic-tooltip-trigger {
|
|
20
|
+
display: inline-block;
|
|
21
|
+
}
|
|
22
|
+
</style>
|