@veritree/ui 0.10.0 → 0.12.1
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/index.js +63 -63
- package/nuxt.js +8 -8
- package/package.json +1 -1
- package/src/{Accordion → components/Accordion}/VTAccordion.vue +0 -0
- package/src/{Accordion → components/Accordion}/VTAccordionButton.vue +0 -0
- package/src/{Accordion → components/Accordion}/VTAccordionGroup.vue +4 -8
- package/src/{Accordion → components/Accordion}/VTAccordionPanel.vue +0 -0
- package/src/{Alerts → components/Alerts}/VTAlert.vue +0 -0
- package/src/{Avatar → components/Avatar}/VTAvatar.vue +0 -0
- package/src/{Avatar → components/Avatar}/VTAvatarImage.vue +0 -0
- package/src/{Avatar → components/Avatar}/VTAvatarText.vue +0 -0
- package/src/{Button → components/Button}/VTButton.vue +0 -0
- package/src/{Button → components/Button}/VTButtonSave.vue +0 -0
- package/src/{Dialog → components/Dialog}/VTDialog.vue +1 -1
- package/src/{Dialog → components/Dialog}/VTDialogClose.vue +0 -0
- package/src/{Dialog → components/Dialog}/VTDialogContent.vue +1 -1
- package/src/{Dialog → components/Dialog}/VTDialogFooter.vue +7 -4
- package/src/{Dialog → components/Dialog}/VTDialogHeader.vue +1 -1
- package/src/{Dialog → components/Dialog}/VTDialogMain.vue +8 -1
- package/src/{Dialog → components/Dialog}/VTDialogOverlay.vue +0 -0
- package/src/{Dialog → components/Dialog}/VTDialogTitle.vue +0 -0
- package/src/{Drawer → components/Drawer}/VTDrawer.vue +1 -1
- package/src/{Drawer → components/Drawer}/VTDrawerClose.vue +0 -0
- package/src/{Drawer → components/Drawer}/VTDrawerContent.vue +0 -0
- package/src/{Drawer → components/Drawer}/VTDrawerFooter.vue +0 -0
- package/src/{Drawer → components/Drawer}/VTDrawerHeader.vue +0 -0
- package/src/{Drawer → components/Drawer}/VTDrawerMain.vue +0 -0
- package/src/{Drawer → components/Drawer}/VTDrawerOverlay.vue +0 -0
- package/src/{Drawer → components/Drawer}/VTDrawerTitle.vue +0 -0
- package/src/{DropdownMenu → components/DropdownMenu}/VTDropdownMenu.vue +2 -2
- package/src/{DropdownMenu → components/DropdownMenu}/VTDropdownMenuContent.vue +6 -6
- package/src/{DropdownMenu → components/DropdownMenu}/VTDropdownMenuDivider.vue +0 -0
- package/src/{DropdownMenu → components/DropdownMenu}/VTDropdownMenuGroup.vue +0 -0
- package/src/{DropdownMenu → components/DropdownMenu}/VTDropdownMenuItem.vue +5 -5
- package/src/{DropdownMenu → components/DropdownMenu}/VTDropdownMenuLabel.vue +0 -0
- package/src/{DropdownMenu → components/DropdownMenu}/VTDropdownMenuTrigger.vue +0 -0
- package/src/{Form → components/Form}/VTFormFeedback.vue +0 -0
- package/src/{Form → components/Form}/VTFormGroup.vue +0 -0
- package/src/{Image → components/Image}/VTImage.vue +3 -3
- package/src/{Image → components/Image}/VTImageCounter.vue +0 -0
- package/src/{Image → components/Image}/VTImageHover.vue +0 -0
- package/src/{Input → components/Input}/VTInput.vue +0 -0
- package/src/{Input → components/Input}/VTInputDate.vue +0 -0
- package/src/{Input → components/Input}/VTInputFile.vue +0 -0
- package/src/{Input → components/Input}/VTInputUpload.vue +0 -0
- package/src/{Listbox → components/Listbox}/VTListbox.vue +4 -4
- package/src/{Listbox → components/Listbox}/VTListboxContent.vue +5 -5
- package/src/{Listbox → components/Listbox}/VTListboxItem.vue +4 -4
- package/src/{Listbox → components/Listbox}/VTListboxLabel.vue +0 -0
- package/src/{Listbox → components/Listbox}/VTListboxList.vue +3 -3
- package/src/{Listbox → components/Listbox}/VTListboxSearch.vue +0 -0
- package/src/{Listbox → components/Listbox}/VTListboxTrigger.vue +0 -0
- package/src/{Modal → components/Modal}/VTModal.vue +0 -0
- package/src/{Popover → components/Popover}/VTPopover.vue +2 -2
- package/src/{Popover → components/Popover}/VTPopoverContent.vue +6 -7
- package/src/{Popover → components/Popover}/VTPopoverDivider.vue +0 -0
- package/src/{Popover → components/Popover}/VTPopoverGroup.vue +0 -0
- package/src/{Popover → components/Popover}/VTPopoverItem.vue +0 -0
- package/src/{Popover → components/Popover}/VTPopoverTrigger.vue +0 -0
- package/src/{Spinner → components/Spinner}/VTSpinner.vue +0 -0
- package/src/{Tabs → components/Tabs}/VTTab.vue +4 -4
- package/src/{Tabs → components/Tabs}/VTTabGroup.vue +0 -0
- package/src/{Tabs → components/Tabs}/VTTabList.vue +0 -0
- package/src/{Tabs → components/Tabs}/VTTabPanel.vue +0 -0
- package/src/{Tabs → components/Tabs}/VTTabPanels.vue +0 -0
- package/src/{Textarea → components/Textarea}/VTTextarea.vue +0 -0
- package/src/{Transitions → components/Transitions}/FadeInOut.vue +0 -0
- package/src/{icons → components/icons}/IconChevronDown.vue +0 -0
- package/src/{icons → components/icons}/IconChevronUp.vue +0 -0
- package/src/utils/images.js +38 -0
package/index.js
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
import VTAvatar from "./src/Avatar/VTAvatar.vue";
|
|
2
|
-
import VTAvatarImage from "./src/Avatar/VTAvatarImage.vue";
|
|
3
|
-
import VTAvatarText from "./src/Avatar/VTAvatarText.vue";
|
|
4
|
-
import VTImage from "./src/Image/VTImage.vue";
|
|
5
|
-
import VTImageCounter from "./src/Image/VTImageCounter.vue";
|
|
6
|
-
import VTImageHover from "./src/Image/VTImageHover.vue";
|
|
7
|
-
import VTDropdownMenu from "./src/DropdownMenu/VTDropdownMenu.vue";
|
|
8
|
-
import VTDropdownMenuContent from "./src/DropdownMenu/VTDropdownMenuContent.vue";
|
|
9
|
-
import VTDropdownMenuDivider from "./src/DropdownMenu/VTDropdownMenuDivider.vue";
|
|
10
|
-
import VTDropdownMenuGroup from "./src/DropdownMenu/VTDropdownMenuGroup.vue";
|
|
11
|
-
import VTDropdownMenuItem from "./src/DropdownMenu/VTDropdownMenuItem.vue";
|
|
12
|
-
import VTDropdownMenuLabel from "./src/DropdownMenu/VTDropdownMenuLabel.vue";
|
|
13
|
-
import VTDropdownMenuTrigger from "./src/DropdownMenu/VTDropdownMenuTrigger.vue";
|
|
14
|
-
import VTPopover from "./src/Popover/VTPopover.vue";
|
|
15
|
-
import VTPopoverContent from "./src/Popover/VTPopoverContent.vue";
|
|
16
|
-
import VTPopoverDivider from "./src/Popover/VTPopoverDivider.vue";
|
|
17
|
-
import VTPopoverGroup from "./src/Popover/VTPopoverGroup.vue";
|
|
18
|
-
import VTPopoverItem from "./src/Popover/VTPopoverItem.vue";
|
|
19
|
-
import VTPopoverTrigger from "./src/Popover/VTPopoverTrigger.vue";
|
|
20
|
-
import VTFormFeedback from "./src/Form/VTFormFeedback.vue";
|
|
21
|
-
import VTFormGroup from "./src/Form/VTFormGroup.vue";
|
|
22
|
-
import VTListbox from "./src/Listbox/VTListbox.vue";
|
|
23
|
-
import VTListboxContent from "./src/Listbox/VTListboxContent.vue";
|
|
24
|
-
import VTListboxItem from "./src/Listbox/VTListboxItem.vue";
|
|
25
|
-
import VTListboxLabel from "./src/Listbox/VTListboxLabel.vue";
|
|
26
|
-
import VTListboxList from "./src/Listbox/VTListboxList.vue";
|
|
27
|
-
import VTListboxSearch from "./src/Listbox/VTListboxSearch.vue";
|
|
28
|
-
import VTListboxTrigger from "./src/Listbox/VTListboxTrigger.vue";
|
|
1
|
+
import VTAvatar from "./src/components/Avatar/VTAvatar.vue";
|
|
2
|
+
import VTAvatarImage from "./src/components/Avatar/VTAvatarImage.vue";
|
|
3
|
+
import VTAvatarText from "./src/components/Avatar/VTAvatarText.vue";
|
|
4
|
+
import VTImage from "./src/components/Image/VTImage.vue";
|
|
5
|
+
import VTImageCounter from "./src/components/Image/VTImageCounter.vue";
|
|
6
|
+
import VTImageHover from "./src/components/Image/VTImageHover.vue";
|
|
7
|
+
import VTDropdownMenu from "./src/components/DropdownMenu/VTDropdownMenu.vue";
|
|
8
|
+
import VTDropdownMenuContent from "./src/components/DropdownMenu/VTDropdownMenuContent.vue";
|
|
9
|
+
import VTDropdownMenuDivider from "./src/components/DropdownMenu/VTDropdownMenuDivider.vue";
|
|
10
|
+
import VTDropdownMenuGroup from "./src/components/DropdownMenu/VTDropdownMenuGroup.vue";
|
|
11
|
+
import VTDropdownMenuItem from "./src/components/DropdownMenu/VTDropdownMenuItem.vue";
|
|
12
|
+
import VTDropdownMenuLabel from "./src/components/DropdownMenu/VTDropdownMenuLabel.vue";
|
|
13
|
+
import VTDropdownMenuTrigger from "./src/components/DropdownMenu/VTDropdownMenuTrigger.vue";
|
|
14
|
+
import VTPopover from "./src/components/Popover/VTPopover.vue";
|
|
15
|
+
import VTPopoverContent from "./src/components/Popover/VTPopoverContent.vue";
|
|
16
|
+
import VTPopoverDivider from "./src/components/Popover/VTPopoverDivider.vue";
|
|
17
|
+
import VTPopoverGroup from "./src/components/Popover/VTPopoverGroup.vue";
|
|
18
|
+
import VTPopoverItem from "./src/components/Popover/VTPopoverItem.vue";
|
|
19
|
+
import VTPopoverTrigger from "./src/components/Popover/VTPopoverTrigger.vue";
|
|
20
|
+
import VTFormFeedback from "./src/components/Form/VTFormFeedback.vue";
|
|
21
|
+
import VTFormGroup from "./src/components/Form/VTFormGroup.vue";
|
|
22
|
+
import VTListbox from "./src/components/Listbox/VTListbox.vue";
|
|
23
|
+
import VTListboxContent from "./src/components/Listbox/VTListboxContent.vue";
|
|
24
|
+
import VTListboxItem from "./src/components/Listbox/VTListboxItem.vue";
|
|
25
|
+
import VTListboxLabel from "./src/components/Listbox/VTListboxLabel.vue";
|
|
26
|
+
import VTListboxList from "./src/components/Listbox/VTListboxList.vue";
|
|
27
|
+
import VTListboxSearch from "./src/components/Listbox/VTListboxSearch.vue";
|
|
28
|
+
import VTListboxTrigger from "./src/components/Listbox/VTListboxTrigger.vue";
|
|
29
29
|
|
|
30
|
-
import VTAlert from "./src/Alerts/VTAlert.vue";
|
|
30
|
+
import VTAlert from "./src/components/Alerts/VTAlert.vue";
|
|
31
31
|
|
|
32
|
-
import VTSpinner from "./src/Spinner/VTSpinner.vue";
|
|
32
|
+
import VTSpinner from "./src/components/Spinner/VTSpinner.vue";
|
|
33
33
|
|
|
34
|
-
import VTButton from "./src/Button/VTButton.vue";
|
|
35
|
-
// import VTButtonSave from './src/Button/VTButtonSave.vue';
|
|
34
|
+
import VTButton from "./src/components/Button/VTButton.vue";
|
|
35
|
+
// import VTButtonSave from './src/components/Button/VTButtonSave.vue';
|
|
36
36
|
|
|
37
|
-
import VTInput from "./src/Input/VTInput.vue";
|
|
38
|
-
import VTInputDate from "./src/Input/VTInputDate.vue";
|
|
39
|
-
import VTInputFile from "./src/Input/VTInputFile.vue";
|
|
40
|
-
import VTInputUpload from "./src/Input/VTInputUpload.vue";
|
|
37
|
+
import VTInput from "./src/components/Input/VTInput.vue";
|
|
38
|
+
import VTInputDate from "./src/components/Input/VTInputDate.vue";
|
|
39
|
+
import VTInputFile from "./src/components/Input/VTInputFile.vue";
|
|
40
|
+
import VTInputUpload from "./src/components/Input/VTInputUpload.vue";
|
|
41
41
|
|
|
42
|
-
import VTTextarea from "./src/Textarea/VTTextarea.vue";
|
|
42
|
+
import VTTextarea from "./src/components/Textarea/VTTextarea.vue";
|
|
43
43
|
|
|
44
|
-
import VTModal from "./src/Modal/VTModal.vue";
|
|
44
|
+
import VTModal from "./src/components/Modal/VTModal.vue";
|
|
45
45
|
|
|
46
|
-
import VTAccordion from "./src/Accordion/VTAccordion.vue";
|
|
47
|
-
import VTAccordionButton from "./src/Accordion/VTAccordionButton.vue";
|
|
48
|
-
import VTAccordionGroup from "./src/Accordion/VTAccordionGroup.vue";
|
|
49
|
-
import VTAccordionPanel from "./src/Accordion/VTAccordionPanel.vue";
|
|
46
|
+
import VTAccordion from "./src/components/Accordion/VTAccordion.vue";
|
|
47
|
+
import VTAccordionButton from "./src/components/Accordion/VTAccordionButton.vue";
|
|
48
|
+
import VTAccordionGroup from "./src/components/Accordion/VTAccordionGroup.vue";
|
|
49
|
+
import VTAccordionPanel from "./src/components/Accordion/VTAccordionPanel.vue";
|
|
50
50
|
|
|
51
|
-
import VTTab from "./src/Tabs/VTTab.vue";
|
|
52
|
-
import VTTabGroup from "./src/Tabs/VTTabGroup.vue";
|
|
53
|
-
import VTTabList from "./src/Tabs/VTTabList.vue";
|
|
54
|
-
import VTTabPanel from "./src/Tabs/VTTabPanel.vue";
|
|
55
|
-
import VTTabPanels from "./src/Tabs/VTTabPanels.vue";
|
|
51
|
+
import VTTab from "./src/components/Tabs/VTTab.vue";
|
|
52
|
+
import VTTabGroup from "./src/components/Tabs/VTTabGroup.vue";
|
|
53
|
+
import VTTabList from "./src/components/Tabs/VTTabList.vue";
|
|
54
|
+
import VTTabPanel from "./src/components/Tabs/VTTabPanel.vue";
|
|
55
|
+
import VTTabPanels from "./src/components/Tabs/VTTabPanels.vue";
|
|
56
56
|
|
|
57
|
-
import VTDialog from "./src/Dialog/VTDialog.vue";
|
|
58
|
-
import VTDialogClose from "./src/Dialog/VTDialogClose.vue";
|
|
59
|
-
import VTDialogContent from "./src/Dialog/VTDialogContent.vue";
|
|
60
|
-
import VTDialogFooter from "./src/Dialog/VTDialogFooter.vue";
|
|
61
|
-
import VTDialogHeader from "./src/Dialog/VTDialogHeader.vue";
|
|
62
|
-
import VTDialogMain from "./src/Dialog/VTDialogMain.vue";
|
|
63
|
-
import VTDialogOverlay from "./src/Dialog/VTDialogOverlay.vue";
|
|
64
|
-
import VTDialogTitle from "./src/Dialog/VTDialogTitle.vue";
|
|
57
|
+
import VTDialog from "./src/components/Dialog/VTDialog.vue";
|
|
58
|
+
import VTDialogClose from "./src/components/Dialog/VTDialogClose.vue";
|
|
59
|
+
import VTDialogContent from "./src/components/Dialog/VTDialogContent.vue";
|
|
60
|
+
import VTDialogFooter from "./src/components/Dialog/VTDialogFooter.vue";
|
|
61
|
+
import VTDialogHeader from "./src/components/Dialog/VTDialogHeader.vue";
|
|
62
|
+
import VTDialogMain from "./src/components/Dialog/VTDialogMain.vue";
|
|
63
|
+
import VTDialogOverlay from "./src/components/Dialog/VTDialogOverlay.vue";
|
|
64
|
+
import VTDialogTitle from "./src/components/Dialog/VTDialogTitle.vue";
|
|
65
65
|
|
|
66
|
-
import VTDrawer from "./src/Drawer/VTDrawer.vue";
|
|
67
|
-
import VTDrawerClose from "./src/Drawer/VTDrawerClose.vue";
|
|
68
|
-
import VTDrawerContent from "./src/Drawer/VTDrawerContent.vue";
|
|
69
|
-
import VTDrawerFooter from "./src/Drawer/VTDrawerFooter.vue";
|
|
70
|
-
import VTDrawerHeader from "./src/Drawer/VTDrawerHeader.vue";
|
|
71
|
-
import VTDrawerTitle from "./src/Drawer/VTDrawerTitle.vue";
|
|
72
|
-
import VTDrawerMain from "./src/Drawer/VTDrawerMain.vue";
|
|
73
|
-
import VTDrawerOverlay from "./src/Drawer/VTDrawerOverlay.vue";
|
|
66
|
+
import VTDrawer from "./src/components/Drawer/VTDrawer.vue";
|
|
67
|
+
import VTDrawerClose from "./src/components/Drawer/VTDrawerClose.vue";
|
|
68
|
+
import VTDrawerContent from "./src/components/Drawer/VTDrawerContent.vue";
|
|
69
|
+
import VTDrawerFooter from "./src/components/Drawer/VTDrawerFooter.vue";
|
|
70
|
+
import VTDrawerHeader from "./src/components/Drawer/VTDrawerHeader.vue";
|
|
71
|
+
import VTDrawerTitle from "./src/components/Drawer/VTDrawerTitle.vue";
|
|
72
|
+
import VTDrawerMain from "./src/components/Drawer/VTDrawerMain.vue";
|
|
73
|
+
import VTDrawerOverlay from "./src/components/Drawer/VTDrawerOverlay.vue";
|
|
74
74
|
|
|
75
75
|
export {
|
|
76
76
|
VTAvatar,
|
package/nuxt.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { join } from 'path';
|
|
2
2
|
|
|
3
3
|
const components = [
|
|
4
|
-
'src/Avatar',
|
|
5
|
-
'src/Drawer',
|
|
6
|
-
'src/Dialog',
|
|
7
|
-
'src/DropdownMenu',
|
|
8
|
-
'src/Form',
|
|
9
|
-
'src/Listbox',
|
|
10
|
-
'src/Image',
|
|
11
|
-
'src/Tabs',
|
|
4
|
+
'src/components/Avatar',
|
|
5
|
+
'src/components/Drawer',
|
|
6
|
+
'src/components/Dialog',
|
|
7
|
+
'src/components/DropdownMenu',
|
|
8
|
+
'src/components/Form',
|
|
9
|
+
'src/components/Listbox',
|
|
10
|
+
'src/components/Image',
|
|
11
|
+
'src/components/Tabs',
|
|
12
12
|
]
|
|
13
13
|
|
|
14
14
|
export default function () {
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
:id="id"
|
|
4
|
-
class="accordion-group"
|
|
5
|
-
>
|
|
2
|
+
<div :id="id" class="accordion-group">
|
|
6
3
|
<slot></slot>
|
|
7
4
|
</div>
|
|
8
5
|
</template>
|
|
9
6
|
|
|
10
7
|
<script>
|
|
11
|
-
import { genId } from
|
|
8
|
+
import { genId } from "../../utils/genId";
|
|
12
9
|
|
|
13
10
|
export default {
|
|
14
|
-
name:
|
|
15
|
-
inject: [
|
|
11
|
+
name: "VTAccordionGroup",
|
|
12
|
+
inject: ["api"],
|
|
16
13
|
|
|
17
14
|
data() {
|
|
18
15
|
return {
|
|
@@ -24,6 +21,5 @@ export default {
|
|
|
24
21
|
mounted() {
|
|
25
22
|
this.api.registerAccordionGroup(this);
|
|
26
23
|
},
|
|
27
|
-
|
|
28
24
|
};
|
|
29
25
|
</script>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:id="id"
|
|
14
14
|
:class="{
|
|
15
15
|
'Dialog-content': headless,
|
|
16
|
-
'relative m-auto max-h-full max-w-full overflow-auto rounded p-6 focus:outline-none sm:p-10':
|
|
16
|
+
'relative m-auto max-h-full max-w-full overflow-auto rounded p-6 focus:outline-none sm:p-10 flex flex-col':
|
|
17
17
|
!headless,
|
|
18
18
|
'bg-white': !dark,
|
|
19
19
|
'bg-fd-600': dark,
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<component
|
|
2
|
+
<component
|
|
3
|
+
:is="as"
|
|
4
|
+
:class="{ 'Dialog-footer': headless, 'w-full': !headless }"
|
|
5
|
+
>
|
|
3
6
|
<slot></slot>
|
|
4
7
|
</component>
|
|
5
8
|
</template>
|
|
6
9
|
|
|
7
10
|
<script>
|
|
8
11
|
export default {
|
|
9
|
-
name:
|
|
12
|
+
name: "VTDialogFooter",
|
|
10
13
|
|
|
11
|
-
inject: [
|
|
14
|
+
inject: ["api"],
|
|
12
15
|
|
|
13
16
|
props: {
|
|
14
17
|
as: {
|
|
15
18
|
type: String,
|
|
16
|
-
default:
|
|
19
|
+
default: "footer",
|
|
17
20
|
},
|
|
18
21
|
},
|
|
19
22
|
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<component
|
|
2
|
+
<component
|
|
3
|
+
:is="as"
|
|
4
|
+
:id="id"
|
|
5
|
+
:class="{
|
|
6
|
+
'Dialog-body': headless,
|
|
7
|
+
'flex-1 w-full h-full overflow-y-auto': !headless,
|
|
8
|
+
}"
|
|
9
|
+
>
|
|
3
10
|
<slot></slot>
|
|
4
11
|
</component>
|
|
5
12
|
</template>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<script>
|
|
30
|
-
import { genId } from
|
|
30
|
+
import { genId } from "../../utils/ids";
|
|
31
31
|
|
|
32
32
|
export default {
|
|
33
|
-
name:
|
|
33
|
+
name: "VTDropdownMenuContent",
|
|
34
34
|
|
|
35
|
-
inject: [
|
|
35
|
+
inject: ["api"],
|
|
36
36
|
|
|
37
37
|
data() {
|
|
38
38
|
return {
|
|
@@ -67,7 +67,7 @@ export default {
|
|
|
67
67
|
});
|
|
68
68
|
|
|
69
69
|
// TODO: Create a directive or mixin for this
|
|
70
|
-
document.addEventListener(
|
|
70
|
+
document.addEventListener("click", (e) => {
|
|
71
71
|
e.stopPropagation();
|
|
72
72
|
if (this.visible && !this.$el.contains(e.target)) this.trigger.onClick();
|
|
73
73
|
});
|
|
@@ -75,7 +75,7 @@ export default {
|
|
|
75
75
|
|
|
76
76
|
destroyed() {
|
|
77
77
|
// TODO: Create a directive or mixin for this
|
|
78
|
-
document.removeEventListener(
|
|
78
|
+
document.removeEventListener("click", this.trigger.onClick());
|
|
79
79
|
},
|
|
80
80
|
|
|
81
81
|
methods: {
|
|
@@ -85,7 +85,7 @@ export default {
|
|
|
85
85
|
|
|
86
86
|
hide() {
|
|
87
87
|
this.visible = false;
|
|
88
|
-
this.$emit(
|
|
88
|
+
this.$emit("hidden");
|
|
89
89
|
this.api().unregisterItems();
|
|
90
90
|
},
|
|
91
91
|
},
|
|
File without changes
|
|
File without changes
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
</template>
|
|
29
29
|
|
|
30
30
|
<script>
|
|
31
|
-
import { genId } from
|
|
31
|
+
import { genId } from "../../utils/ids";
|
|
32
32
|
|
|
33
33
|
export default {
|
|
34
|
-
name:
|
|
34
|
+
name: "VTDropdownMenuItem",
|
|
35
35
|
|
|
36
|
-
inject: [
|
|
36
|
+
inject: ["api"],
|
|
37
37
|
|
|
38
38
|
props: {
|
|
39
39
|
to: {
|
|
@@ -68,7 +68,7 @@ export default {
|
|
|
68
68
|
},
|
|
69
69
|
|
|
70
70
|
as() {
|
|
71
|
-
return this.href ?
|
|
71
|
+
return this.href ? "a" : this.to ? "NuxtLink" : "button";
|
|
72
72
|
},
|
|
73
73
|
|
|
74
74
|
items() {
|
|
@@ -163,7 +163,7 @@ export default {
|
|
|
163
163
|
onClick() {
|
|
164
164
|
if (this.disabled) return;
|
|
165
165
|
|
|
166
|
-
this.$emit(
|
|
166
|
+
this.$emit("click");
|
|
167
167
|
this.$nextTick(() => this.leaveMenu());
|
|
168
168
|
},
|
|
169
169
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script>
|
|
12
|
-
import {
|
|
12
|
+
import { handleImageResizing } from "../../utils/images";
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
15
|
name: "VTImage",
|
|
@@ -46,7 +46,7 @@ export default {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
if (this.cdnSrc) {
|
|
49
|
-
return this.
|
|
49
|
+
return this.handleImageResizing(this.cdnSrc, this.$attrs.width);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
if (this.src) {
|
|
@@ -59,7 +59,7 @@ export default {
|
|
|
59
59
|
},
|
|
60
60
|
|
|
61
61
|
methods: {
|
|
62
|
-
|
|
62
|
+
handleImageResizing,
|
|
63
63
|
|
|
64
64
|
onLoad() {
|
|
65
65
|
this.isLoaded = true;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
|
-
import { genId } from
|
|
8
|
+
import { genId } from "../../utils/ids";
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
|
-
name:
|
|
11
|
+
name: "VTListbox",
|
|
12
12
|
|
|
13
13
|
provide() {
|
|
14
14
|
return {
|
|
@@ -47,8 +47,8 @@ export default {
|
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
const emit = (value) => {
|
|
50
|
-
this.$emit(
|
|
51
|
-
this.$emit(
|
|
50
|
+
this.$emit("input", value);
|
|
51
|
+
this.$emit("change", value);
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
return {
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
</template>
|
|
33
33
|
|
|
34
34
|
<script>
|
|
35
|
-
import { genId } from
|
|
35
|
+
import { genId } from "../../utils/ids";
|
|
36
36
|
|
|
37
37
|
export default {
|
|
38
|
-
name:
|
|
38
|
+
name: "VTListboxContent",
|
|
39
39
|
|
|
40
|
-
inject: [
|
|
40
|
+
inject: ["api"],
|
|
41
41
|
|
|
42
42
|
props: {
|
|
43
43
|
headless: {
|
|
@@ -104,7 +104,7 @@ export default {
|
|
|
104
104
|
this.api().registerContent(content);
|
|
105
105
|
|
|
106
106
|
// TODO: Create a directive or mixin for this
|
|
107
|
-
document.addEventListener(
|
|
107
|
+
document.addEventListener("click", (e) => {
|
|
108
108
|
e.stopPropagation();
|
|
109
109
|
if (this.visible && !this.$el.contains(e.target)) this.trigger.onClick();
|
|
110
110
|
});
|
|
@@ -112,7 +112,7 @@ export default {
|
|
|
112
112
|
|
|
113
113
|
destroyed() {
|
|
114
114
|
// TODO: Create a directive or mixin for this
|
|
115
|
-
document.removeEventListener(
|
|
115
|
+
document.removeEventListener("click", this.trigger.onClick());
|
|
116
116
|
},
|
|
117
117
|
|
|
118
118
|
methods: {
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script>
|
|
32
|
-
import { scrollElementIntoView } from
|
|
33
|
-
import { genId } from
|
|
32
|
+
import { scrollElementIntoView } from "../../utils/components";
|
|
33
|
+
import { genId } from "../../utils/ids";
|
|
34
34
|
|
|
35
35
|
export default {
|
|
36
|
-
name:
|
|
36
|
+
name: "VTListboxItem",
|
|
37
37
|
|
|
38
|
-
inject: [
|
|
38
|
+
inject: ["api"],
|
|
39
39
|
|
|
40
40
|
props: {
|
|
41
41
|
headless: {
|
|
File without changes
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script>
|
|
14
|
-
import { genId } from
|
|
14
|
+
import { genId } from "../../utils/ids";
|
|
15
15
|
|
|
16
16
|
export default {
|
|
17
|
-
name:
|
|
17
|
+
name: "VTListboxList",
|
|
18
18
|
|
|
19
|
-
inject: [
|
|
19
|
+
inject: ["api"],
|
|
20
20
|
|
|
21
21
|
props: {
|
|
22
22
|
headless: {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
:id="id"
|
|
14
14
|
:class="{
|
|
15
15
|
PopoverPanel: headless,
|
|
16
|
-
'absolute top-full mt-3 rounded-md shadow-300 ':
|
|
17
|
-
!headless,
|
|
16
|
+
'absolute top-full mt-3 rounded-md shadow-300 ': !headless,
|
|
18
17
|
'bg-white': !dark,
|
|
19
18
|
'border-gray-700 bg-forest-default shadow-gray-700': dark,
|
|
20
19
|
'left-0': !right,
|
|
@@ -27,12 +26,12 @@
|
|
|
27
26
|
</template>
|
|
28
27
|
|
|
29
28
|
<script>
|
|
30
|
-
import { genId } from
|
|
29
|
+
import { genId } from "../../utils/ids";
|
|
31
30
|
|
|
32
31
|
export default {
|
|
33
|
-
name:
|
|
32
|
+
name: "VTPopoverContent",
|
|
34
33
|
|
|
35
|
-
inject: [
|
|
34
|
+
inject: ["api"],
|
|
36
35
|
|
|
37
36
|
data() {
|
|
38
37
|
return {
|
|
@@ -59,7 +58,7 @@ export default {
|
|
|
59
58
|
this.api().registerContent(this);
|
|
60
59
|
|
|
61
60
|
// TODO: Create a directive or mixin for this
|
|
62
|
-
document.addEventListener(
|
|
61
|
+
document.addEventListener("click", (e) => {
|
|
63
62
|
e.stopPropagation();
|
|
64
63
|
if (this.visible && !this.$el.contains(e.target)) this.hide();
|
|
65
64
|
});
|
|
@@ -67,7 +66,7 @@ export default {
|
|
|
67
66
|
|
|
68
67
|
destroyed() {
|
|
69
68
|
// TODO: Create a directive or mixin for this
|
|
70
|
-
document.removeEventListener(
|
|
69
|
+
document.removeEventListener("click", this.hide());
|
|
71
70
|
},
|
|
72
71
|
|
|
73
72
|
methods: {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<script>
|
|
17
|
-
import { keys } from
|
|
17
|
+
import { keys } from "../../utils/keyboard";
|
|
18
18
|
|
|
19
19
|
export default {
|
|
20
|
-
name:
|
|
20
|
+
name: "VTTabItem",
|
|
21
21
|
|
|
22
|
-
inject: [
|
|
22
|
+
inject: ["api"],
|
|
23
23
|
|
|
24
24
|
data() {
|
|
25
25
|
return {
|
|
@@ -85,7 +85,7 @@ export default {
|
|
|
85
85
|
|
|
86
86
|
onClick() {
|
|
87
87
|
this.api.selectTab(this.index);
|
|
88
|
-
this.$emit(
|
|
88
|
+
this.$emit("change");
|
|
89
89
|
},
|
|
90
90
|
|
|
91
91
|
onKeyDown(event) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const handleImageResizing = (url, width) => {
|
|
2
|
+
// early exit if url is null for whatever reason
|
|
3
|
+
if (!url) {
|
|
4
|
+
return '';
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
let cdn;
|
|
8
|
+
|
|
9
|
+
if (typeof url === 'object') {
|
|
10
|
+
cdn = url.cdn_url;
|
|
11
|
+
} else if (typeof url === 'string') {
|
|
12
|
+
cdn = JSON.parse(url).cdn_url;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const base64String = cdn.split('net/');
|
|
16
|
+
const firstPart = base64String[0];
|
|
17
|
+
|
|
18
|
+
// if atob is crossed and your editor says is not supported,
|
|
19
|
+
// don't worry, it seems to be about NodeJS and not about
|
|
20
|
+
// browsers.
|
|
21
|
+
//
|
|
22
|
+
// Details: https://developer.mozilla.org/en-US/docs/Web/API/atob
|
|
23
|
+
const decodedString = JSON.parse(atob(base64String[1]));
|
|
24
|
+
|
|
25
|
+
width
|
|
26
|
+
? (decodedString.edits.resize.width = width)
|
|
27
|
+
: (decodedString.edits.resize.width = 450);
|
|
28
|
+
|
|
29
|
+
// if btoa is crossed and your editor says is not supported,
|
|
30
|
+
// don't worry, it seems to be about NodeJS and not about
|
|
31
|
+
// browsers.
|
|
32
|
+
//
|
|
33
|
+
// Details: https://developer.mozilla.org/en-US/docs/Web/API/atob
|
|
34
|
+
const encodedString = btoa(JSON.stringify(decodedString));
|
|
35
|
+
const encodedUrl = `${firstPart}net/${encodedString}`;
|
|
36
|
+
|
|
37
|
+
return encodedUrl;
|
|
38
|
+
};
|