@weni/unnnic-system 3.12.3-alpha.5 → 3.12.3
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/CHANGELOG.md +10 -0
- 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 +18 -92
- package/dist/components/AudioRecorder/AudioRecorder.vue.d.ts +36 -184
- 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 +29 -103
- package/dist/components/Card/CardCompany.vue.d.ts +2 -2
- package/dist/components/Card/CardStatusesContainer.vue.d.ts +19 -93
- 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 +18 -92
- package/dist/components/Card/StatusCard.vue.d.ts +1 -1
- package/dist/components/Card/TitleCard.vue.d.ts +18 -92
- package/dist/components/CardImage/CardImage.vue.d.ts +5 -5
- package/dist/components/CardInformation/CardInformation.vue.d.ts +19 -93
- 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 +24 -98
- package/dist/components/ChartLine/ChartLine.vue.d.ts +18 -92
- package/dist/components/ChatText/ChatText.vue.d.ts +18 -92
- package/dist/components/ChatsContact/ChatsContact.vue.d.ts +6 -6
- package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +18 -92
- 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 +18 -92
- 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 +16 -122
- package/dist/components/Disclaimer/Disclaimer.vue.d.ts +3 -6
- package/dist/components/Disclaimer/Disclaimer.vue.d.ts.map +1 -1
- package/dist/components/Disclaimer/DisclaimerV2.vue.d.ts +8 -0
- package/dist/components/Disclaimer/DisclaimerV2.vue.d.ts.map +1 -0
- package/dist/components/Disclaimer/types-v2.d.ts +7 -0
- package/dist/components/Disclaimer/types-v2.d.ts.map +1 -0
- package/dist/components/Disclaimer/types.d.ts +3 -6
- package/dist/components/Disclaimer/types.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.vue.d.ts +207 -37
- 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 +6 -6
- package/dist/components/ImportCard/ImportCard.vue.d.ts +6 -6
- package/dist/components/Input/BaseInput.vue.d.ts +0 -31
- package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
- package/dist/components/Input/Input.vue.d.ts +15 -121
- package/dist/components/Input/Input.vue.d.ts.map +1 -1
- package/dist/components/Input/TextInput.vue.d.ts +4 -73
- package/dist/components/Input/TextInput.vue.d.ts.map +1 -1
- package/dist/components/InputNext/InputNext.vue.d.ts +4 -4
- package/dist/components/Label/Label.vue.d.ts +1 -1
- package/dist/components/Label/Label.vue.d.ts.map +1 -1
- package/dist/components/Modal/Modal.vue.d.ts +1 -1
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts +35 -209
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
- package/dist/components/ModalNext/ModalNext.vue.d.ts +21 -127
- package/dist/components/ModalUpload/ModalUpload.vue.d.ts +12 -12
- package/dist/components/MoodRating/MoodRating.vue.d.ts +18 -92
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts +163 -0
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts.map +1 -0
- 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 +13 -82
- 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 +5 -74
- package/dist/components/Slider/Slider.vue.d.ts +18 -92
- package/dist/components/Switch/Switch.vue.d.ts +3 -3
- package/dist/components/Tab/Tab.vue.d.ts +18 -92
- 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 +8 -8
- 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 +18 -92
- 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/popover/PopoverContent.vue.d.ts +2 -2
- package/dist/components/ui/popover/PopoverContent.vue.d.ts.map +1 -1
- package/dist/components/ui/popover/PopoverOption.vue.d.ts +1 -1
- package/dist/components/ui/popover/PopoverOption.vue.d.ts.map +1 -1
- package/dist/components/ui/popover/PopoverTrigger.vue.d.ts.map +1 -1
- package/dist/{es-a9e51a05.mjs → es-c19444c0.mjs} +1 -1
- package/dist/{index-ade761d4.mjs → index-93b45359.mjs} +51889 -54741
- package/dist/locales/en.json.d.ts +1 -3
- package/dist/locales/es.json.d.ts +1 -3
- package/dist/locales/pt_br.json.d.ts +1 -3
- package/dist/{pt-br-5395459d.mjs → pt-br-23dc9ca6.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +206 -234
- package/dist/unnnic.umd.js +44 -48
- package/package.json +2 -3
- package/src/assets/scss/scheme-colors.scss +223 -223
- package/src/assets/scss/tailwind.scss +0 -8
- package/src/components/Alert/__tests__/__snapshots__/Alert.spec.js.snap +1 -1
- package/src/components/Checkbox/Checkbox.vue +1 -1
- package/src/components/Disclaimer/Disclaimer.vue +42 -136
- package/src/components/Disclaimer/DisclaimerV2.vue +171 -0
- package/src/components/Disclaimer/__tests__/Disclaimer.spec.js +45 -70
- package/src/components/Disclaimer/__tests__/DisclaimerV2.spec.js +68 -0
- package/src/components/Disclaimer/types-v2.ts +12 -0
- package/src/components/Disclaimer/types.ts +3 -12
- package/src/components/Drawer/Drawer.vue +269 -190
- package/src/components/Drawer/__tests__/Drawer.spec.js +46 -37
- package/src/components/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +19 -18
- package/src/components/Input/BaseInput.vue +5 -25
- package/src/components/Input/Input.scss +3 -2
- package/src/components/Input/Input.vue +1 -24
- package/src/components/Input/TextInput.vue +25 -64
- package/src/components/Input/__test__/TextInput.spec.js +1 -1
- package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +1 -5
- package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +1 -7
- package/src/components/ModalDialog/ModalDialog.vue +148 -64
- package/src/components/ModalDialog/__tests__/ModalDialog.spec.js +221 -11
- package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +22 -1
- package/src/components/MultiSelect/MultiSelect.vue +297 -0
- package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +1 -3
- package/src/components/Toast/Toast.vue +9 -16
- package/src/components/ToolTip/ToolTip.vue +177 -25
- package/src/components/ToolTip/__tests__/ToolTip.spec.js +61 -339
- package/src/components/index.ts +11 -63
- package/src/components/ui/popover/PopoverContent.vue +2 -19
- package/src/components/ui/popover/PopoverOption.vue +0 -4
- package/src/components/ui/popover/PopoverTrigger.vue +1 -5
- package/src/locales/en.json +1 -3
- package/src/locales/es.json +1 -3
- package/src/locales/pt_br.json +1 -3
- package/src/stories/Disclaimer.stories.js +12 -53
- package/src/stories/DisclaimerV2.stories.js +51 -0
- package/src/stories/Drawer.stories.js +1 -1
- package/src/stories/Input.mdx +0 -3
- package/src/stories/ModalDialog.mdx +0 -3
- package/src/stories/ModalDialog.stories.js +1 -1
- package/src/stories/MultiSelect.stories.js +46 -142
- package/dist/components/MultiSelect/MultSelectOption.vue.d.ts +0 -17
- package/dist/components/MultiSelect/MultSelectOption.vue.d.ts.map +0 -1
- package/dist/components/MultiSelect/index.vue.d.ts +0 -44
- package/dist/components/MultiSelect/index.vue.d.ts.map +0 -1
- package/dist/components/Select/index.vue.d.ts +0 -44
- package/dist/components/Select/index.vue.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -23912
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/ui/dialog/Dialog.vue.d.ts +0 -23
- package/dist/components/ui/dialog/Dialog.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +0 -21
- package/dist/components/ui/dialog/DialogClose.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +0 -43
- package/dist/components/ui/dialog/DialogContent.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts +0 -25
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts +0 -29
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts +0 -23
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +0 -19
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts.map +0 -1
- package/dist/components/ui/dialog/index.d.ts +0 -8
- package/dist/components/ui/dialog/index.d.ts.map +0 -1
- package/dist/components/ui/drawer/Drawer.vue.d.ts +0 -35
- package/dist/components/ui/drawer/Drawer.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/DrawerClose.vue.d.ts +0 -21
- package/dist/components/ui/drawer/DrawerClose.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts +0 -43
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +0 -23
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +0 -22
- package/dist/components/ui/drawer/DrawerFooter.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +0 -25
- package/dist/components/ui/drawer/DrawerHeader.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +0 -8
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +0 -23
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts +0 -19
- package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts.map +0 -1
- package/dist/components/ui/drawer/index.d.ts +0 -11
- package/dist/components/ui/drawer/index.d.ts.map +0 -1
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts +0 -23
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts.map +0 -1
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +0 -31
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts.map +0 -1
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts +0 -19
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts.map +0 -1
- package/dist/components/ui/tooltip/index.d.ts +0 -4
- package/dist/components/ui/tooltip/index.d.ts.map +0 -1
- package/dist/lib/layer-manager.d.ts +0 -16
- package/dist/lib/layer-manager.d.ts.map +0 -1
- package/src/components/MultiSelect/MultSelectOption.vue +0 -49
- package/src/components/MultiSelect/__tests__/MultiSelect.spec.js +0 -556
- package/src/components/MultiSelect/__tests__/MultiSelectOption.spec.js +0 -229
- package/src/components/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +0 -87
- package/src/components/MultiSelect/__tests__/__snapshots__/MultiSelectOption.spec.js.snap +0 -51
- package/src/components/MultiSelect/index.vue +0 -225
- package/src/components/Select/__tests__/Select.spec.js +0 -422
- package/src/components/Select/__tests__/SelectItem.spec.js +0 -330
- package/src/components/Select/__tests__/__snapshots__/Popover.spec.js.snap +0 -8
- package/src/components/Select/__tests__/__snapshots__/Select.spec.js.snap +0 -71
- package/src/components/Select/__tests__/__snapshots__/SelectItem.spec.js.snap +0 -15
- package/src/components/Select/__tests__/__snapshots__/SelectOption.spec.js.snap +0 -25
- package/src/components/Select/__tests__/__snapshots__/SelectPopover.spec.js.snap +0 -8
- package/src/components/Select/index.vue +0 -298
- package/src/components/ui/dialog/Dialog.vue +0 -19
- package/src/components/ui/dialog/DialogClose.vue +0 -29
- package/src/components/ui/dialog/DialogContent.vue +0 -140
- package/src/components/ui/dialog/DialogFooter.vue +0 -50
- package/src/components/ui/dialog/DialogHeader.vue +0 -83
- package/src/components/ui/dialog/DialogTitle.vue +0 -38
- package/src/components/ui/dialog/DialogTrigger.vue +0 -16
- package/src/components/ui/dialog/index.ts +0 -7
- package/src/components/ui/drawer/Drawer.vue +0 -27
- package/src/components/ui/drawer/DrawerClose.vue +0 -31
- package/src/components/ui/drawer/DrawerContent.vue +0 -111
- package/src/components/ui/drawer/DrawerDescription.vue +0 -40
- package/src/components/ui/drawer/DrawerFooter.vue +0 -38
- package/src/components/ui/drawer/DrawerHeader.vue +0 -57
- package/src/components/ui/drawer/DrawerOverlay.vue +0 -33
- package/src/components/ui/drawer/DrawerTitle.vue +0 -37
- package/src/components/ui/drawer/DrawerTrigger.vue +0 -31
- package/src/components/ui/drawer/index.ts +0 -10
- package/src/components/ui/tooltip/Tooltip.vue +0 -21
- package/src/components/ui/tooltip/TooltipContent.vue +0 -74
- package/src/components/ui/tooltip/TooltipTrigger.vue +0 -26
- package/src/components/ui/tooltip/index.ts +0 -3
- package/src/lib/layer-manager.ts +0 -92
- package/src/stories/Dialog.stories.js +0 -832
- package/src/stories/DrawerNext.stories.js +0 -611
- package/src/stories/LayerManager.docs.mdx +0 -40
- package/src/stories/LayerManager.stories.js +0 -364
- package/src/stories/Select.stories.js +0 -158
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="unnnic-select"
|
|
4
|
-
@keydown="handleKeyDown"
|
|
5
|
-
>
|
|
6
|
-
<Popover
|
|
7
|
-
:open="openPopover"
|
|
8
|
-
@update:open="openPopover = $event"
|
|
9
|
-
>
|
|
10
|
-
<PopoverTrigger>
|
|
11
|
-
<UnnnicInput
|
|
12
|
-
:modelValue="inputValue"
|
|
13
|
-
class="unnnic-select__input"
|
|
14
|
-
readonly
|
|
15
|
-
useFocusProp
|
|
16
|
-
:focus="openPopover"
|
|
17
|
-
:size="props.size"
|
|
18
|
-
:placeholder="props.placeholder"
|
|
19
|
-
:label="props.label"
|
|
20
|
-
:errors="props.errors"
|
|
21
|
-
:message="props.message"
|
|
22
|
-
:iconRight="openPopover ? 'keyboard_arrow_up' : 'keyboard_arrow_down'"
|
|
23
|
-
:disabled="props.disabled"
|
|
24
|
-
:showClear="!!selectedItem"
|
|
25
|
-
@clear="emit('update:modelValue', '')"
|
|
26
|
-
/>
|
|
27
|
-
</PopoverTrigger>
|
|
28
|
-
<PopoverContent
|
|
29
|
-
align="start"
|
|
30
|
-
:class="'h-full'"
|
|
31
|
-
:style="popoverContentCustomStyles"
|
|
32
|
-
>
|
|
33
|
-
<div class="unnnic-select__content">
|
|
34
|
-
<UnnnicInput
|
|
35
|
-
v-if="props.enableSearch"
|
|
36
|
-
class="unnnic-select__input-search"
|
|
37
|
-
:modelValue="props.search"
|
|
38
|
-
:placeholder="$t('search')"
|
|
39
|
-
iconLeft="search"
|
|
40
|
-
@update:model-value="handleSearch"
|
|
41
|
-
/>
|
|
42
|
-
<p
|
|
43
|
-
v-if="filteredOptions.length === 0"
|
|
44
|
-
class="unnnic-select__content-no-results"
|
|
45
|
-
>
|
|
46
|
-
{{ $t('without_results') }}
|
|
47
|
-
</p>
|
|
48
|
-
<PopoverOption
|
|
49
|
-
v-for="(option, index) in filteredOptions"
|
|
50
|
-
v-else
|
|
51
|
-
:key="option[props.itemValue]"
|
|
52
|
-
:data-option-index="index"
|
|
53
|
-
data-testid="select-option"
|
|
54
|
-
:label="option[props.itemLabel]"
|
|
55
|
-
:active="
|
|
56
|
-
option[props.itemValue] === selectedItem?.[props.itemValue]
|
|
57
|
-
"
|
|
58
|
-
:focused="focusedOptionIndex === index"
|
|
59
|
-
:disabled="option.disabled"
|
|
60
|
-
@click="handleSelectOption(option)"
|
|
61
|
-
/>
|
|
62
|
-
</div>
|
|
63
|
-
</PopoverContent>
|
|
64
|
-
</Popover>
|
|
65
|
-
</div>
|
|
66
|
-
</template>
|
|
67
|
-
|
|
68
|
-
<script setup lang="ts">
|
|
69
|
-
import { computed, ref, watch, nextTick } from 'vue';
|
|
70
|
-
import UnnnicInput from '../Input/Input.vue';
|
|
71
|
-
|
|
72
|
-
import {
|
|
73
|
-
Popover,
|
|
74
|
-
PopoverTrigger,
|
|
75
|
-
PopoverContent,
|
|
76
|
-
PopoverOption,
|
|
77
|
-
} from '../ui/popover/index';
|
|
78
|
-
|
|
79
|
-
import UnnnicI18n from '../../mixins/i18n';
|
|
80
|
-
|
|
81
|
-
defineOptions({
|
|
82
|
-
name: 'UnnnicSelect',
|
|
83
|
-
mixins: [UnnnicI18n],
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
interface SelectProps {
|
|
87
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
88
|
-
options: Array<{ [key: string]: any }>;
|
|
89
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
90
|
-
modelValue: any;
|
|
91
|
-
returnObject?: boolean;
|
|
92
|
-
itemLabel?: string;
|
|
93
|
-
itemValue?: string;
|
|
94
|
-
placeholder?: string;
|
|
95
|
-
label?: string;
|
|
96
|
-
type?: 'normal' | 'error';
|
|
97
|
-
errors?: string | Array<string>;
|
|
98
|
-
message?: string;
|
|
99
|
-
size?: 'sm' | 'md';
|
|
100
|
-
optionsLines?: number;
|
|
101
|
-
enableSearch?: boolean;
|
|
102
|
-
search?: string;
|
|
103
|
-
locale?: string;
|
|
104
|
-
disabled?: boolean;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const props = withDefaults(defineProps<SelectProps>(), {
|
|
108
|
-
size: 'md',
|
|
109
|
-
type: 'normal',
|
|
110
|
-
placeholder: '',
|
|
111
|
-
optionsLines: 5,
|
|
112
|
-
returnObject: false,
|
|
113
|
-
itemLabel: 'label',
|
|
114
|
-
itemValue: 'value',
|
|
115
|
-
locale: 'en',
|
|
116
|
-
enableSearch: false,
|
|
117
|
-
disabled: false,
|
|
118
|
-
label: '',
|
|
119
|
-
errors: '',
|
|
120
|
-
message: '',
|
|
121
|
-
search: '',
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
const emit = defineEmits<{
|
|
125
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
126
|
-
'update:modelValue': [value: any];
|
|
127
|
-
'update:search': [value: string];
|
|
128
|
-
}>();
|
|
129
|
-
|
|
130
|
-
const openPopover = ref(false);
|
|
131
|
-
|
|
132
|
-
watch(openPopover, () => {
|
|
133
|
-
if (!openPopover.value) {
|
|
134
|
-
handleSearch('');
|
|
135
|
-
} else {
|
|
136
|
-
focusedOptionIndex.value = -1;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
if (openPopover.value && props.modelValue) {
|
|
140
|
-
const selectedOptionIndex = props.options.findIndex(
|
|
141
|
-
(option) =>
|
|
142
|
-
option[props.itemValue] === selectedItem.value?.[props.itemValue],
|
|
143
|
-
);
|
|
144
|
-
scrollToOption(selectedOptionIndex, 'instant', 'center');
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
const handleKeyDown = (event) => {
|
|
149
|
-
const { key } = event;
|
|
150
|
-
const validKeys = ['ArrowUp', 'ArrowDown', 'Enter'];
|
|
151
|
-
|
|
152
|
-
if (validKeys.includes(key)) {
|
|
153
|
-
event.preventDefault();
|
|
154
|
-
if (key === 'ArrowUp') {
|
|
155
|
-
if (focusedOptionIndex.value === 0) return;
|
|
156
|
-
focusedOptionIndex.value--;
|
|
157
|
-
scrollToOption(focusedOptionIndex.value);
|
|
158
|
-
}
|
|
159
|
-
if (key === 'ArrowDown') {
|
|
160
|
-
if (focusedOptionIndex.value === filteredOptions.value.length - 1) return;
|
|
161
|
-
focusedOptionIndex.value++;
|
|
162
|
-
scrollToOption(focusedOptionIndex.value);
|
|
163
|
-
}
|
|
164
|
-
if (key === 'Enter' && focusedOptionIndex.value !== -1) {
|
|
165
|
-
handleSelectOption(filteredOptions.value[focusedOptionIndex.value]);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
const focusedOptionIndex = ref<number>(-1);
|
|
171
|
-
|
|
172
|
-
const scrollToOption = (
|
|
173
|
-
index: number,
|
|
174
|
-
behavior: 'smooth' | 'instant' = 'smooth',
|
|
175
|
-
block: 'center' | 'start' | 'end' | 'nearest' = 'center',
|
|
176
|
-
) => {
|
|
177
|
-
nextTick(() => {
|
|
178
|
-
const option = document.querySelector(`[data-option-index="${index}"]`);
|
|
179
|
-
if (option) {
|
|
180
|
-
option.scrollIntoView?.({ behavior, block });
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
const calculatedPopoverHeight = computed(() => {
|
|
186
|
-
if (!props.options || props.options.length === 0) return 'unset';
|
|
187
|
-
const popoverPadding = 32;
|
|
188
|
-
const popoverGap = 4;
|
|
189
|
-
// 37 = 21px (height) + 16px (padding)
|
|
190
|
-
const fieldsHeight = 37 * props.optionsLines;
|
|
191
|
-
const gapsCompensation = props.enableSearch ? 1 : 2;
|
|
192
|
-
|
|
193
|
-
const size =
|
|
194
|
-
fieldsHeight +
|
|
195
|
-
popoverPadding +
|
|
196
|
-
(popoverGap * props.optionsLines - gapsCompensation);
|
|
197
|
-
|
|
198
|
-
return `${props.enableSearch ? size + 45 + 1 : size}px`;
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
const popoverContentCustomStyles = computed(() => {
|
|
202
|
-
const emptyFilteredOptions = filteredOptions.value?.length === 0;
|
|
203
|
-
return {
|
|
204
|
-
overflow: 'auto',
|
|
205
|
-
display: 'flex',
|
|
206
|
-
flexDirection: 'column',
|
|
207
|
-
minHeight: calculatedPopoverHeight.value,
|
|
208
|
-
maxHeight: emptyFilteredOptions ? 'unset' : calculatedPopoverHeight.value,
|
|
209
|
-
height: emptyFilteredOptions ? calculatedPopoverHeight.value : 'unset',
|
|
210
|
-
};
|
|
211
|
-
});
|
|
212
|
-
|
|
213
|
-
const selectedItem = computed(() => {
|
|
214
|
-
if (props.returnObject) return props.modelValue;
|
|
215
|
-
|
|
216
|
-
return props.options.find(
|
|
217
|
-
(option) => option[props.itemValue] === props.modelValue,
|
|
218
|
-
);
|
|
219
|
-
});
|
|
220
|
-
|
|
221
|
-
const inputValue = computed(() => {
|
|
222
|
-
return selectedItem.value?.[props.itemLabel];
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
const handleSelectOption = (option) => {
|
|
226
|
-
if (
|
|
227
|
-
option[props.itemValue] === selectedItem.value?.[props.itemValue] ||
|
|
228
|
-
option.disabled
|
|
229
|
-
)
|
|
230
|
-
return;
|
|
231
|
-
|
|
232
|
-
emit(
|
|
233
|
-
'update:modelValue',
|
|
234
|
-
props.returnObject ? option : option[props.itemValue],
|
|
235
|
-
);
|
|
236
|
-
openPopover.value = false;
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
const handleSearch = (value: string) => {
|
|
240
|
-
emit('update:search', value);
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
const filteredOptions = computed(() => {
|
|
244
|
-
if (!props.enableSearch || !props.search) return props.options;
|
|
245
|
-
|
|
246
|
-
return props.options.filter(
|
|
247
|
-
(option) =>
|
|
248
|
-
option[props.itemLabel]
|
|
249
|
-
.toLowerCase()
|
|
250
|
-
.includes(props.search?.toLowerCase()) ||
|
|
251
|
-
option[props.itemValue]
|
|
252
|
-
.toLowerCase()
|
|
253
|
-
.includes(props.search?.toLowerCase()),
|
|
254
|
-
);
|
|
255
|
-
});
|
|
256
|
-
</script>
|
|
257
|
-
|
|
258
|
-
<style lang="scss" scoped>
|
|
259
|
-
@use '@/assets/scss/unnnic' as *;
|
|
260
|
-
|
|
261
|
-
:deep(.unnnic-select__input) {
|
|
262
|
-
cursor: pointer;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
:deep(.unnnic-select__input-search) {
|
|
266
|
-
> .icon-left {
|
|
267
|
-
color: $unnnic-color-fg-base;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
:deep(.unnnic-select__input) {
|
|
272
|
-
> .icon-right {
|
|
273
|
-
color: $unnnic-color-fg-base;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.unnnic-select {
|
|
278
|
-
&__content {
|
|
279
|
-
display: flex;
|
|
280
|
-
flex-direction: column;
|
|
281
|
-
padding: 0;
|
|
282
|
-
margin: 0;
|
|
283
|
-
gap: $unnnic-space-1;
|
|
284
|
-
|
|
285
|
-
height: -webkit-fill-available;
|
|
286
|
-
|
|
287
|
-
&-no-results {
|
|
288
|
-
margin: 0;
|
|
289
|
-
display: flex;
|
|
290
|
-
align-items: center;
|
|
291
|
-
justify-content: center;
|
|
292
|
-
height: 100%;
|
|
293
|
-
font: $unnnic-font-emphasis;
|
|
294
|
-
color: $unnnic-color-fg-muted;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
</style>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { DialogRootEmits, DialogRootProps } from 'reka-ui';
|
|
3
|
-
import { DialogRoot, useForwardPropsEmits } from 'reka-ui';
|
|
4
|
-
|
|
5
|
-
defineOptions({
|
|
6
|
-
name: 'UnnnicDialog',
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const props = defineProps<DialogRootProps>();
|
|
10
|
-
const emits = defineEmits<DialogRootEmits>();
|
|
11
|
-
|
|
12
|
-
const forwarded = useForwardPropsEmits(props, emits);
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<template>
|
|
16
|
-
<DialogRoot v-bind="forwarded">
|
|
17
|
-
<slot />
|
|
18
|
-
</DialogRoot>
|
|
19
|
-
</template>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { DialogCloseProps } from 'reka-ui';
|
|
3
|
-
import { DialogClose } from 'reka-ui';
|
|
4
|
-
|
|
5
|
-
defineOptions({
|
|
6
|
-
name: 'UnnnicDialogClose',
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const props = withDefaults(defineProps<DialogCloseProps>(), {
|
|
10
|
-
asChild: true,
|
|
11
|
-
});
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<template>
|
|
15
|
-
<DialogClose
|
|
16
|
-
class="unnnic-dialog-close"
|
|
17
|
-
v-bind="props"
|
|
18
|
-
>
|
|
19
|
-
<slot />
|
|
20
|
-
</DialogClose>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<style lang="scss" scoped>
|
|
24
|
-
.unnnic-dialog-close {
|
|
25
|
-
> * {
|
|
26
|
-
width: 100%;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
</style>
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { DialogContentEmits, DialogContentProps } from 'reka-ui';
|
|
3
|
-
import type { HTMLAttributes, Component } from 'vue';
|
|
4
|
-
import { computed, h } from 'vue';
|
|
5
|
-
import { reactiveOmit } from '@vueuse/core';
|
|
6
|
-
import {
|
|
7
|
-
DialogContent,
|
|
8
|
-
DialogOverlay,
|
|
9
|
-
DialogPortal,
|
|
10
|
-
useForwardPropsEmits,
|
|
11
|
-
} from 'reka-ui';
|
|
12
|
-
import { cn } from '@/lib/utils';
|
|
13
|
-
import { useLayerZIndex } from '@/lib/layer-manager';
|
|
14
|
-
|
|
15
|
-
defineOptions({
|
|
16
|
-
name: 'UnnnicDialogContent',
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
const props = withDefaults(
|
|
20
|
-
defineProps<
|
|
21
|
-
DialogContentProps & {
|
|
22
|
-
parentClass?: HTMLAttributes['class'];
|
|
23
|
-
class?: HTMLAttributes['class'];
|
|
24
|
-
size?: 'small' | 'medium' | 'large';
|
|
25
|
-
}
|
|
26
|
-
>(),
|
|
27
|
-
{
|
|
28
|
-
size: 'medium',
|
|
29
|
-
parentClass: '', // This class should be temporary, to be discontinued with the ModalDialog component
|
|
30
|
-
class: '',
|
|
31
|
-
},
|
|
32
|
-
);
|
|
33
|
-
const emits = defineEmits<DialogContentEmits>();
|
|
34
|
-
|
|
35
|
-
const delegatedProps = reactiveOmit(props, 'class', 'parentClass');
|
|
36
|
-
|
|
37
|
-
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
38
|
-
|
|
39
|
-
const overlayZIndex = useLayerZIndex('modal', { offset: -2 });
|
|
40
|
-
const modalZIndex = useLayerZIndex('modal');
|
|
41
|
-
|
|
42
|
-
const contentClasses = computed(() =>
|
|
43
|
-
cn(
|
|
44
|
-
'unnnic-dialog-content',
|
|
45
|
-
`unnnic-dialog-content--size-${props.size}`,
|
|
46
|
-
'duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]',
|
|
47
|
-
props.class,
|
|
48
|
-
),
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
// This component is used to wrap the DialogContent component in a section if the parentClass is provided
|
|
52
|
-
// This is a temporary solution, to be discontinued with the ModalDialog component
|
|
53
|
-
const ConditionalWrapper: Component = (_, { slots }) => {
|
|
54
|
-
const content = slots.default?.();
|
|
55
|
-
return props.parentClass
|
|
56
|
-
? h('section', { class: props.parentClass }, content)
|
|
57
|
-
: content;
|
|
58
|
-
};
|
|
59
|
-
</script>
|
|
60
|
-
|
|
61
|
-
<template>
|
|
62
|
-
<DialogPortal>
|
|
63
|
-
<DialogOverlay
|
|
64
|
-
class="unnnic-dialog-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
|
65
|
-
:style="{ zIndex: overlayZIndex }"
|
|
66
|
-
/>
|
|
67
|
-
|
|
68
|
-
<ConditionalWrapper>
|
|
69
|
-
<DialogContent
|
|
70
|
-
v-bind="forwarded"
|
|
71
|
-
:class="contentClasses"
|
|
72
|
-
:style="{ zIndex: modalZIndex }"
|
|
73
|
-
>
|
|
74
|
-
<slot />
|
|
75
|
-
</DialogContent>
|
|
76
|
-
</ConditionalWrapper>
|
|
77
|
-
</DialogPortal>
|
|
78
|
-
</template>
|
|
79
|
-
|
|
80
|
-
<style lang="scss" scoped>
|
|
81
|
-
@use '@/assets/scss/unnnic' as *;
|
|
82
|
-
|
|
83
|
-
.unnnic-dialog-overlay {
|
|
84
|
-
position: fixed;
|
|
85
|
-
top: 0;
|
|
86
|
-
left: 0;
|
|
87
|
-
|
|
88
|
-
width: 100vw;
|
|
89
|
-
height: 100vh;
|
|
90
|
-
background: rgba(53, 57, 69, 0.5);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.unnnic-dialog-content {
|
|
94
|
-
position: fixed;
|
|
95
|
-
top: 50%;
|
|
96
|
-
left: 50%;
|
|
97
|
-
|
|
98
|
-
overflow: hidden;
|
|
99
|
-
|
|
100
|
-
transform: translate(-50%, -50%);
|
|
101
|
-
|
|
102
|
-
width: 100%;
|
|
103
|
-
max-height: calc(100% - $unnnic-space-20);
|
|
104
|
-
|
|
105
|
-
display: flex;
|
|
106
|
-
flex-direction: column;
|
|
107
|
-
|
|
108
|
-
box-shadow: $unnnic-shadow-2;
|
|
109
|
-
border-radius: $unnnic-radius-4;
|
|
110
|
-
background-color: $unnnic-color-bg-base;
|
|
111
|
-
|
|
112
|
-
&--size-small {
|
|
113
|
-
max-width: 360px;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
&--size-medium {
|
|
117
|
-
max-width: 560px;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
&--size-large {
|
|
121
|
-
max-width: 800px;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
> * {
|
|
125
|
-
&::-webkit-scrollbar {
|
|
126
|
-
width: $unnnic-spacing-inline-nano;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
&::-webkit-scrollbar-thumb {
|
|
130
|
-
background: $unnnic-color-neutral-cleanest;
|
|
131
|
-
border-radius: $unnnic-border-radius-pill;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
&::-webkit-scrollbar-track {
|
|
135
|
-
background: $unnnic-color-neutral-soft;
|
|
136
|
-
border-radius: $unnnic-border-radius-pill;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
</style>
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { cn } from '@/lib/utils';
|
|
4
|
-
|
|
5
|
-
defineOptions({
|
|
6
|
-
name: 'UnnnicDialogFooter',
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const props = withDefaults(
|
|
10
|
-
defineProps<{ class?: HTMLAttributes['class']; divider?: boolean }>(),
|
|
11
|
-
{
|
|
12
|
-
divider: true,
|
|
13
|
-
},
|
|
14
|
-
);
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<template>
|
|
18
|
-
<footer
|
|
19
|
-
:class="
|
|
20
|
-
cn(
|
|
21
|
-
'unnnic-dialog-footer',
|
|
22
|
-
{ 'unnnic-dialog-footer--with-divider': props.divider },
|
|
23
|
-
props.class,
|
|
24
|
-
)
|
|
25
|
-
"
|
|
26
|
-
>
|
|
27
|
-
<slot />
|
|
28
|
-
</footer>
|
|
29
|
-
</template>
|
|
30
|
-
|
|
31
|
-
<style lang="scss" scoped>
|
|
32
|
-
@use '@/assets/scss/unnnic' as *;
|
|
33
|
-
|
|
34
|
-
.unnnic-dialog-footer {
|
|
35
|
-
display: flex;
|
|
36
|
-
justify-content: center;
|
|
37
|
-
align-items: center;
|
|
38
|
-
gap: $unnnic-space-2;
|
|
39
|
-
|
|
40
|
-
padding: $unnnic-space-6;
|
|
41
|
-
|
|
42
|
-
&--with-divider {
|
|
43
|
-
border-top: 1px solid $unnnic-color-border-soft;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
> * {
|
|
47
|
-
width: 100%;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
</style>
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { cn } from '@/lib/utils';
|
|
4
|
-
import UnnnicButton from '@/components/Button/Button.vue';
|
|
5
|
-
import DialogClose from './DialogClose.vue';
|
|
6
|
-
import UnnnicIcon, { SchemeColor } from '@/components/Icon.vue';
|
|
7
|
-
|
|
8
|
-
defineOptions({
|
|
9
|
-
name: 'UnnnicDialogHeader',
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const props = withDefaults(
|
|
13
|
-
defineProps<{
|
|
14
|
-
class?: HTMLAttributes['class'];
|
|
15
|
-
divider?: boolean;
|
|
16
|
-
type?: 'default' | 'success' | 'warning' | 'attention';
|
|
17
|
-
closeButton?: boolean;
|
|
18
|
-
}>(),
|
|
19
|
-
{
|
|
20
|
-
divider: true,
|
|
21
|
-
closeButton: true,
|
|
22
|
-
type: 'default',
|
|
23
|
-
},
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
const iconsMapper = {
|
|
27
|
-
default: { icon: '', scheme: '' as SchemeColor },
|
|
28
|
-
success: { icon: 'check_circle', scheme: 'aux-green-500' as SchemeColor },
|
|
29
|
-
warning: { icon: 'warning', scheme: 'aux-red-500' as SchemeColor },
|
|
30
|
-
attention: { icon: 'error', scheme: 'aux-yellow-500' as SchemeColor },
|
|
31
|
-
};
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
<template>
|
|
35
|
-
<header
|
|
36
|
-
:class="
|
|
37
|
-
cn(
|
|
38
|
-
'unnnic-dialog-header',
|
|
39
|
-
{ 'unnnic-dialog-header--with-divider': props.divider },
|
|
40
|
-
props.class,
|
|
41
|
-
)
|
|
42
|
-
"
|
|
43
|
-
>
|
|
44
|
-
<UnnnicIcon
|
|
45
|
-
v-if="iconsMapper[props.type]?.icon"
|
|
46
|
-
:icon="iconsMapper[props.type]?.icon"
|
|
47
|
-
:scheme="iconsMapper[props.type]?.scheme"
|
|
48
|
-
size="md"
|
|
49
|
-
/>
|
|
50
|
-
<slot />
|
|
51
|
-
|
|
52
|
-
<DialogClose
|
|
53
|
-
v-if="props.closeButton"
|
|
54
|
-
class="unnnic-dialog-header__close"
|
|
55
|
-
>
|
|
56
|
-
<UnnnicButton
|
|
57
|
-
type="tertiary"
|
|
58
|
-
iconCenter="close"
|
|
59
|
-
size="small"
|
|
60
|
-
/>
|
|
61
|
-
</DialogClose>
|
|
62
|
-
</header>
|
|
63
|
-
</template>
|
|
64
|
-
|
|
65
|
-
<style lang="scss" scoped>
|
|
66
|
-
@use '@/assets/scss/unnnic' as *;
|
|
67
|
-
|
|
68
|
-
.unnnic-dialog-header {
|
|
69
|
-
display: flex;
|
|
70
|
-
align-items: center;
|
|
71
|
-
gap: $unnnic-space-2;
|
|
72
|
-
|
|
73
|
-
padding: $unnnic-space-6;
|
|
74
|
-
|
|
75
|
-
&--with-divider {
|
|
76
|
-
border-bottom: 1px solid $unnnic-color-border-soft;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&__close {
|
|
80
|
-
margin-left: auto;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
</style>
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { DialogTitleProps } from 'reka-ui';
|
|
3
|
-
import type { HTMLAttributes } from 'vue';
|
|
4
|
-
import { reactiveOmit } from '@vueuse/core';
|
|
5
|
-
import { DialogTitle, useForwardProps } from 'reka-ui';
|
|
6
|
-
import { cn } from '@/lib/utils';
|
|
7
|
-
|
|
8
|
-
defineOptions({
|
|
9
|
-
name: 'UnnnicDialogTitle',
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const props = defineProps<
|
|
13
|
-
DialogTitleProps & { class?: HTMLAttributes['class'] }
|
|
14
|
-
>();
|
|
15
|
-
|
|
16
|
-
const delegatedProps = reactiveOmit(props, 'class');
|
|
17
|
-
|
|
18
|
-
const forwardedProps = useForwardProps(delegatedProps);
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<template>
|
|
22
|
-
<DialogTitle
|
|
23
|
-
v-bind="forwardedProps"
|
|
24
|
-
:class="cn('unnnic-dialog-title', props.class)"
|
|
25
|
-
>
|
|
26
|
-
<slot />
|
|
27
|
-
</DialogTitle>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<style lang="scss" scoped>
|
|
31
|
-
@use '@/assets/scss/unnnic' as *;
|
|
32
|
-
|
|
33
|
-
.unnnic-dialog-title {
|
|
34
|
-
font: $unnnic-font-display-2;
|
|
35
|
-
color: $unnnic-color-fg-emphasized;
|
|
36
|
-
margin: 0;
|
|
37
|
-
}
|
|
38
|
-
</style>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { DialogTriggerProps } from 'reka-ui';
|
|
3
|
-
import { DialogTrigger } from 'reka-ui';
|
|
4
|
-
|
|
5
|
-
defineOptions({
|
|
6
|
-
name: 'UnnnicDialogTrigger',
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const props = defineProps<DialogTriggerProps>();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<template>
|
|
13
|
-
<DialogTrigger v-bind="props">
|
|
14
|
-
<slot />
|
|
15
|
-
</DialogTrigger>
|
|
16
|
-
</template>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { default as Dialog } from './Dialog.vue';
|
|
2
|
-
export { default as DialogClose } from './DialogClose.vue';
|
|
3
|
-
export { default as DialogContent } from './DialogContent.vue';
|
|
4
|
-
export { default as DialogFooter } from './DialogFooter.vue';
|
|
5
|
-
export { default as DialogHeader } from './DialogHeader.vue';
|
|
6
|
-
export { default as DialogTitle } from './DialogTitle.vue';
|
|
7
|
-
export { default as DialogTrigger } from './DialogTrigger.vue';
|