@dataloop-ai/components 0.18.6 → 0.18.7
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/package.json +1 -1
- package/src/components/compound/DlCounters/DlCounters.vue +4 -9
- package/src/components/compound/DlCounters/types.ts +5 -0
- package/src/components/compound/types.ts +2 -0
- package/src/components/essential/{DlPageLayout/DlPageLayout.vue → DlLayout/DlLayout.vue} +11 -11
- package/src/components/essential/DlLayout/index.ts +2 -0
- package/src/components/essential/index.ts +1 -1
- package/src/demos/DlDatasetBrowserLayoutDemo/DlDatasetBrowserLayoutDemo.vue +85 -0
- package/src/demos/DlDatasetBrowserLayoutDemo/index.ts +2 -0
- package/src/demos/DlLayoutDemo.vue +25 -0
- package/src/demos/DlPageLayoutDemo/DlPageLayoutDemo.vue +81 -0
- package/src/demos/DlPageLayoutDemo/index.ts +2 -0
- package/src/demos/DlStudioLayoutDemo/DlStudioLayoutDemo.vue +85 -0
- package/src/{layouts/DlStudioLayout/components/Demo → demos/DlStudioLayoutDemo/components}/StudioLeftDrawer.vue +2 -2
- package/src/{layouts/DlStudioLayout/components/Demo → demos/DlStudioLayoutDemo/components}/StudioTabsMenu.vue +2 -2
- package/src/{layouts/DlStudioLayout/components/Demo → demos/DlStudioLayoutDemo/components}/TabMenu/FilterMenu.vue +1 -1
- package/src/{layouts/DlStudioLayout/components/Demo → demos/DlStudioLayoutDemo/components}/TabMenu/TabMenuAnnotations.vue +1 -6
- package/src/{layouts/DlStudioLayout/components/Demo → demos/DlStudioLayoutDemo/components}/TabMenu/TabMenuItem.vue +1 -1
- package/src/demos/DlStudioLayoutDemo/index.ts +2 -0
- package/src/demos/index.ts +2 -2
- package/src/index.ts +2 -0
- package/src/layouts/{DlDatasetBrowser/DlDatasetBrowser.vue → DlDatasetBrowserLayout/DlDatasetBrowserLayout.vue} +6 -6
- package/src/layouts/DlDatasetBrowserLayout/index.ts +2 -0
- package/src/layouts/DlPageLayout/DlPageLayout.vue +61 -0
- package/src/layouts/DlPageLayout/components/DlPageLayoutHeader/DlPageLayoutHeader.vue +76 -0
- package/src/layouts/DlPageLayout/components/DlPageLayoutHeader/index.ts +2 -0
- package/src/layouts/DlPageLayout/components/index.ts +1 -0
- package/src/{components/essential → layouts}/DlPageLayout/index.ts +2 -0
- package/src/layouts/DlStudioLayout/DlStudioLayout.vue +6 -9
- package/src/layouts/index.ts +3 -0
- package/src/demos/DlPageLayoutDemo.vue +0 -146
- package/src/layouts/DlStudioLayout/components/Demo/StudioHeader.vue +0 -121
- package/src/layouts/DlStudioLayout/components/NavigationDrawer.vue +0 -147
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/DatasetFooter.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/DatasetHeader.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/DatasetLeftDrawer.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/DatasetMainContent.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/DatasetRightDrawer.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/ActionsMenu.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/AutomationMenu.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/CardView.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/CardViewGallery.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/CardViewTable.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/EmptyState/LayoutEmptyState.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/EmptyState/UploadData.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/MainContentImages.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/MainContentNav.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/NavbarKpi.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/NavbarSearch.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/SearchFilterMenu.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/filters/AddFilter.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/types/imageMetadata.ts +0 -0
- /package/src/{layouts/DlStudioLayout → demos/DlStudioLayoutDemo}/components/LayoutNavbar.vue +0 -0
- /package/src/{layouts/DlStudioLayout/components/Demo → demos/DlStudioLayoutDemo/components}/LeftMenuContent.vue +0 -0
- /package/src/{layouts/DlStudioLayout → demos/DlStudioLayoutDemo}/components/ListAutocomplete.vue +0 -0
- /package/src/{layouts/DlStudioLayout/components/Demo → demos/DlStudioLayoutDemo/components}/StudioFooter.vue +0 -0
- /package/src/{layouts/DlStudioLayout/components/Demo → demos/DlStudioLayoutDemo/components}/StudioMainContent.vue +0 -0
- /package/src/{layouts/DlStudioLayout → demos/DlStudioLayoutDemo}/types/HorizontalItems.ts +0 -0
- /package/src/{layouts/DlStudioLayout → demos/DlStudioLayoutDemo}/types/VerticalItems.ts +0 -0
package/package.json
CHANGED
|
@@ -34,12 +34,7 @@ import { v4 } from 'uuid'
|
|
|
34
34
|
import { defineComponent, PropType } from 'vue-demi'
|
|
35
35
|
import { DlKpi } from '../../basic'
|
|
36
36
|
import { DlKpiCounterFormat } from '../../types'
|
|
37
|
-
|
|
38
|
-
interface CounterItem {
|
|
39
|
-
value?: number
|
|
40
|
-
text: string
|
|
41
|
-
subtext?: string
|
|
42
|
-
}
|
|
37
|
+
import { DlCounterItem } from './types'
|
|
43
38
|
|
|
44
39
|
export default defineComponent({
|
|
45
40
|
name: 'DlCounters',
|
|
@@ -52,9 +47,9 @@ export default defineComponent({
|
|
|
52
47
|
default: false
|
|
53
48
|
},
|
|
54
49
|
items: {
|
|
55
|
-
type: Array as PropType<
|
|
56
|
-
default: ():
|
|
57
|
-
validator(value:
|
|
50
|
+
type: Array as PropType<DlCounterItem[]>,
|
|
51
|
+
default: (): DlCounterItem[] => [],
|
|
52
|
+
validator(value: DlCounterItem[]): boolean {
|
|
58
53
|
return value.length <= 8
|
|
59
54
|
}
|
|
60
55
|
},
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="dl-
|
|
3
|
+
class="dl-layout"
|
|
4
4
|
:style="cssVars"
|
|
5
5
|
>
|
|
6
|
-
<div class="dl-
|
|
6
|
+
<div class="dl-layout__main-head">
|
|
7
7
|
<slot name="header" />
|
|
8
8
|
</div>
|
|
9
|
-
<div class="dl-
|
|
9
|
+
<div class="dl-layout__left-drawer">
|
|
10
10
|
<slot name="leftDrawer" />
|
|
11
11
|
</div>
|
|
12
|
-
<div class="dl-
|
|
12
|
+
<div class="dl-layout__right-drawer">
|
|
13
13
|
<slot name="rightDrawer" />
|
|
14
14
|
</div>
|
|
15
|
-
<div class="dl-
|
|
16
|
-
<slot name="
|
|
15
|
+
<div class="dl-layout__content">
|
|
16
|
+
<slot name="body" />
|
|
17
17
|
</div>
|
|
18
|
-
<div class="dl-
|
|
18
|
+
<div class="dl-layout__footer">
|
|
19
19
|
<slot name="footer" />
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<script lang="ts">
|
|
25
25
|
import { defineComponent, computed } from 'vue-demi'
|
|
26
26
|
export default defineComponent({
|
|
27
|
-
name: '
|
|
27
|
+
name: 'DlLayout',
|
|
28
28
|
props: {
|
|
29
29
|
template: {
|
|
30
30
|
type: String,
|
|
@@ -34,7 +34,7 @@ export default defineComponent({
|
|
|
34
34
|
setup(props) {
|
|
35
35
|
const cssVars = computed(() => {
|
|
36
36
|
return {
|
|
37
|
-
'--dl-
|
|
37
|
+
'--dl-layout-template': props.template
|
|
38
38
|
}
|
|
39
39
|
})
|
|
40
40
|
return {
|
|
@@ -45,11 +45,11 @@ export default defineComponent({
|
|
|
45
45
|
</script>
|
|
46
46
|
|
|
47
47
|
<style scoped lang="scss">
|
|
48
|
-
.dl-
|
|
48
|
+
.dl-layout {
|
|
49
49
|
height: 100vh;
|
|
50
50
|
width: 100%;
|
|
51
51
|
display: grid;
|
|
52
|
-
grid-template-areas: var(--dl-
|
|
52
|
+
grid-template-areas: var(--dl-layout-template);
|
|
53
53
|
grid-template-rows: auto 1fr auto;
|
|
54
54
|
grid-template-columns: auto 1fr auto;
|
|
55
55
|
box-shadow: 1px 1px 1px var(--dl-color-separator);
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<dl-button @click="isOpenedDatasetBrowserModal = true">
|
|
4
|
+
Dataset Browser
|
|
5
|
+
</dl-button>
|
|
6
|
+
<div
|
|
7
|
+
v-if="isOpenedDatasetBrowserModal"
|
|
8
|
+
class="fullscreen-template"
|
|
9
|
+
>
|
|
10
|
+
<div class="fullscreen-template__close">
|
|
11
|
+
<dl-button
|
|
12
|
+
icon="icon-dl-close"
|
|
13
|
+
flat
|
|
14
|
+
@click="isOpenedDatasetBrowserModal = false"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
<dl-dataset-browser-layout>
|
|
18
|
+
<template #header>
|
|
19
|
+
<dataset-header />
|
|
20
|
+
</template>
|
|
21
|
+
<template #leftDrawer>
|
|
22
|
+
<dataset-left-drawer />
|
|
23
|
+
</template>
|
|
24
|
+
<template #rightDrawer>
|
|
25
|
+
<dataset-right-drawer />
|
|
26
|
+
</template>
|
|
27
|
+
<template #body>
|
|
28
|
+
<dataset-main-content />
|
|
29
|
+
</template>
|
|
30
|
+
<template #footer>
|
|
31
|
+
<dataset-footer />
|
|
32
|
+
</template>
|
|
33
|
+
</dl-dataset-browser-layout>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script lang="ts">
|
|
39
|
+
import { defineComponent, ref } from 'vue-demi'
|
|
40
|
+
import { DlButton } from '../../components'
|
|
41
|
+
import { DlDatasetBrowserLayout } from '../../layouts'
|
|
42
|
+
import DatasetHeader from './components/DatasetHeader.vue'
|
|
43
|
+
import DatasetMainContent from './components/DatasetMainContent.vue'
|
|
44
|
+
import DatasetLeftDrawer from './components/DatasetLeftDrawer.vue'
|
|
45
|
+
import DatasetRightDrawer from './components/DatasetRightDrawer.vue'
|
|
46
|
+
import DatasetFooter from './components/DatasetFooter.vue'
|
|
47
|
+
|
|
48
|
+
export default defineComponent({
|
|
49
|
+
name: 'DlLayoutDemo',
|
|
50
|
+
components: {
|
|
51
|
+
DlButton,
|
|
52
|
+
DlDatasetBrowserLayout,
|
|
53
|
+
DatasetHeader,
|
|
54
|
+
DatasetLeftDrawer,
|
|
55
|
+
DatasetRightDrawer,
|
|
56
|
+
DatasetFooter,
|
|
57
|
+
DatasetMainContent
|
|
58
|
+
},
|
|
59
|
+
setup() {
|
|
60
|
+
const isOpenedDatasetBrowserModal = ref(false)
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
isOpenedDatasetBrowserModal
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<style scoped lang="scss">
|
|
70
|
+
.fullscreen-template {
|
|
71
|
+
position: fixed;
|
|
72
|
+
height: 100vh;
|
|
73
|
+
width: 100%;
|
|
74
|
+
top: 0;
|
|
75
|
+
left: 0;
|
|
76
|
+
background-color: var(--dl-color-panel-background);
|
|
77
|
+
z-index: 1000;
|
|
78
|
+
|
|
79
|
+
&__close {
|
|
80
|
+
position: absolute;
|
|
81
|
+
right: 10px;
|
|
82
|
+
z-index: 2;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
</style>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<DlStudioLayoutDemo />
|
|
4
|
+
<DlDatasetBrowserLayoutDemo />
|
|
5
|
+
<DlPageLayoutDemo />
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script lang="ts">
|
|
10
|
+
import { defineComponent } from 'vue-demi'
|
|
11
|
+
import { DlStudioLayoutDemo } from './DlStudioLayoutDemo'
|
|
12
|
+
import { DlDatasetBrowserLayoutDemo } from './DlDatasetBrowserLayoutDemo'
|
|
13
|
+
import { DlPageLayoutDemo } from './DlPageLayoutDemo'
|
|
14
|
+
|
|
15
|
+
export default defineComponent({
|
|
16
|
+
name: 'DlLayoutDemo',
|
|
17
|
+
components: {
|
|
18
|
+
DlStudioLayoutDemo,
|
|
19
|
+
DlDatasetBrowserLayoutDemo,
|
|
20
|
+
DlPageLayoutDemo
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<style scoped lang="scss"></style>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<dl-button @click="isOpenPageLayoutModal = true">
|
|
4
|
+
Page Layout
|
|
5
|
+
</dl-button>
|
|
6
|
+
<div
|
|
7
|
+
v-if="isOpenPageLayoutModal"
|
|
8
|
+
class="fullscreen-template"
|
|
9
|
+
>
|
|
10
|
+
<div class="fullscreen-template__close">
|
|
11
|
+
<dl-button
|
|
12
|
+
icon="icon-dl-close"
|
|
13
|
+
flat
|
|
14
|
+
@click="isOpenPageLayoutModal = false"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
<dl-page-layout
|
|
18
|
+
title="test title"
|
|
19
|
+
:counters="[
|
|
20
|
+
{
|
|
21
|
+
value: 200,
|
|
22
|
+
text: 'All dataset items'
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
value: 100,
|
|
26
|
+
text: 'Selected items'
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
value: 12,
|
|
30
|
+
text: 'Annotated items'
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
value: 17,
|
|
34
|
+
text: 'Annotations'
|
|
35
|
+
}
|
|
36
|
+
]"
|
|
37
|
+
>
|
|
38
|
+
<div>This is a body</div>
|
|
39
|
+
</dl-page-layout>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script lang="ts">
|
|
45
|
+
import { defineComponent, ref } from 'vue-demi'
|
|
46
|
+
import { DlButton } from '../../components'
|
|
47
|
+
import { DlPageLayout } from '../../layouts'
|
|
48
|
+
|
|
49
|
+
export default defineComponent({
|
|
50
|
+
name: 'DlLayoutDemo',
|
|
51
|
+
components: {
|
|
52
|
+
DlButton,
|
|
53
|
+
DlPageLayout
|
|
54
|
+
},
|
|
55
|
+
setup() {
|
|
56
|
+
const isOpenPageLayoutModal = ref(false)
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
isOpenPageLayoutModal
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<style scoped lang="scss">
|
|
66
|
+
.fullscreen-template {
|
|
67
|
+
position: fixed;
|
|
68
|
+
height: 100vh;
|
|
69
|
+
width: 100%;
|
|
70
|
+
top: 0;
|
|
71
|
+
left: 0;
|
|
72
|
+
background-color: var(--dl-color-panel-background);
|
|
73
|
+
z-index: 1000;
|
|
74
|
+
|
|
75
|
+
&__close {
|
|
76
|
+
position: absolute;
|
|
77
|
+
right: 10px;
|
|
78
|
+
z-index: 2;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
</style>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<dl-button @click="isOpenedStudioModal = true">
|
|
4
|
+
Studio Layout
|
|
5
|
+
</dl-button>
|
|
6
|
+
<div
|
|
7
|
+
v-if="isOpenedStudioModal"
|
|
8
|
+
class="fullscreen-template"
|
|
9
|
+
>
|
|
10
|
+
<div class="fullscreen-template__close">
|
|
11
|
+
<dl-button
|
|
12
|
+
flat
|
|
13
|
+
icon="icon-dl-close"
|
|
14
|
+
@click="isOpenedStudioModal = false"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
<DlStudioLayout>
|
|
18
|
+
<template #left-menu>
|
|
19
|
+
<left-menu-content />
|
|
20
|
+
</template>
|
|
21
|
+
<template #leftDrawer>
|
|
22
|
+
<studio-left-drawer />
|
|
23
|
+
</template>
|
|
24
|
+
<template #rightDrawer>
|
|
25
|
+
<studio-tabs-menu />
|
|
26
|
+
</template>
|
|
27
|
+
<template #body>
|
|
28
|
+
<studio-main-content />
|
|
29
|
+
</template>
|
|
30
|
+
<template #footer>
|
|
31
|
+
<studio-footer />
|
|
32
|
+
</template>
|
|
33
|
+
</DlStudioLayout>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script lang="ts">
|
|
39
|
+
import { defineComponent, ref } from 'vue-demi'
|
|
40
|
+
import { DlButton } from '../../components'
|
|
41
|
+
import { DlStudioLayout } from '../../layouts'
|
|
42
|
+
import StudioMainContent from './components/StudioMainContent.vue'
|
|
43
|
+
import LeftMenuContent from './components/LeftMenuContent.vue'
|
|
44
|
+
import StudioTabsMenu from './components/StudioTabsMenu.vue'
|
|
45
|
+
import StudioLeftDrawer from './components/StudioLeftDrawer.vue'
|
|
46
|
+
import StudioFooter from './components/StudioFooter.vue'
|
|
47
|
+
|
|
48
|
+
export default defineComponent({
|
|
49
|
+
name: 'DlStudioLayoutDemo',
|
|
50
|
+
components: {
|
|
51
|
+
DlButton,
|
|
52
|
+
DlStudioLayout,
|
|
53
|
+
StudioMainContent,
|
|
54
|
+
StudioTabsMenu,
|
|
55
|
+
StudioLeftDrawer,
|
|
56
|
+
StudioFooter,
|
|
57
|
+
LeftMenuContent
|
|
58
|
+
},
|
|
59
|
+
setup() {
|
|
60
|
+
const isOpenedStudioModal = ref(false)
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
isOpenedStudioModal
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<style scoped lang="scss">
|
|
70
|
+
.fullscreen-template {
|
|
71
|
+
position: fixed;
|
|
72
|
+
height: 100vh;
|
|
73
|
+
width: 100%;
|
|
74
|
+
top: 0;
|
|
75
|
+
left: 0;
|
|
76
|
+
background-color: var(--dl-color-panel-background);
|
|
77
|
+
z-index: 1000;
|
|
78
|
+
|
|
79
|
+
&__close {
|
|
80
|
+
position: absolute;
|
|
81
|
+
right: 10px;
|
|
82
|
+
z-index: 2;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
</style>
|
|
@@ -117,14 +117,14 @@
|
|
|
117
117
|
|
|
118
118
|
<script lang="ts">
|
|
119
119
|
import { defineComponent, ref } from 'vue-demi'
|
|
120
|
-
import ListAutocomplete from '
|
|
120
|
+
import ListAutocomplete from './ListAutocomplete.vue'
|
|
121
121
|
import {
|
|
122
122
|
DlButton,
|
|
123
123
|
DlCheckbox,
|
|
124
124
|
DlTooltip,
|
|
125
125
|
DlIcon,
|
|
126
126
|
DlTypography
|
|
127
|
-
} from '
|
|
127
|
+
} from '../../../components'
|
|
128
128
|
|
|
129
129
|
export default defineComponent({
|
|
130
130
|
name: 'StudioLeftDrawer',
|
|
@@ -29,8 +29,8 @@ import {
|
|
|
29
29
|
DlTabPanel,
|
|
30
30
|
DlIcon,
|
|
31
31
|
DlButton
|
|
32
|
-
} from '
|
|
33
|
-
import { DlTabDetails } from '
|
|
32
|
+
} from '../../../components'
|
|
33
|
+
import { DlTabDetails } from '../../../components/types'
|
|
34
34
|
|
|
35
35
|
export default defineComponent({
|
|
36
36
|
name: 'StudioTabsMenu',
|
|
@@ -53,12 +53,7 @@
|
|
|
53
53
|
<script lang="ts">
|
|
54
54
|
import { defineComponent, ref } from 'vue-demi'
|
|
55
55
|
import FilterMenu from './FilterMenu.vue'
|
|
56
|
-
import {
|
|
57
|
-
DlSeparator,
|
|
58
|
-
DlButton,
|
|
59
|
-
DlIcon,
|
|
60
|
-
DlInput
|
|
61
|
-
} from '../../../../../components'
|
|
56
|
+
import { DlSeparator, DlButton, DlIcon, DlInput } from '../../../../components'
|
|
62
57
|
|
|
63
58
|
export default defineComponent({
|
|
64
59
|
name: 'TabMenuAnnotations',
|
package/src/demos/index.ts
CHANGED
|
@@ -64,7 +64,7 @@ import DlMarkupTableDemo from './DlMarkupTableDemo.vue'
|
|
|
64
64
|
import DlVirtualScrollDemo from './DlVirtualScrollDemo.vue'
|
|
65
65
|
import DlJsonEditorDemo from './DlJsonEditorDemo.vue'
|
|
66
66
|
import DlThumbnailGallery from './DlThumbnailGalleryDemo.vue'
|
|
67
|
-
import
|
|
67
|
+
import DlLayoutDemo from './DlLayoutDemo.vue'
|
|
68
68
|
import { DlCodeEditorDemo } from './DlCodeEditor'
|
|
69
69
|
|
|
70
70
|
export default {
|
|
@@ -132,5 +132,5 @@ export default {
|
|
|
132
132
|
DlJsonEditorDemo,
|
|
133
133
|
DlThumbnailGallery,
|
|
134
134
|
DlCodeEditorDemo,
|
|
135
|
-
|
|
135
|
+
DlLayoutDemo
|
|
136
136
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<dl-
|
|
3
|
+
<dl-layout :template="template">
|
|
4
4
|
<template #header>
|
|
5
5
|
<slot name="header" />
|
|
6
6
|
</template>
|
|
@@ -10,24 +10,24 @@
|
|
|
10
10
|
<template #rightDrawer>
|
|
11
11
|
<slot name="rightDrawer" />
|
|
12
12
|
</template>
|
|
13
|
-
<template #
|
|
14
|
-
<slot name="
|
|
13
|
+
<template #body>
|
|
14
|
+
<slot name="body" />
|
|
15
15
|
</template>
|
|
16
16
|
<template #footer>
|
|
17
17
|
<slot name="footer" />
|
|
18
18
|
</template>
|
|
19
|
-
</dl-
|
|
19
|
+
</dl-layout>
|
|
20
20
|
</div>
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<script lang="ts">
|
|
24
24
|
import { defineComponent } from 'vue-demi'
|
|
25
|
-
import {
|
|
25
|
+
import { DlLayout } from '../../components'
|
|
26
26
|
|
|
27
27
|
export default defineComponent({
|
|
28
28
|
name: 'DlDatasetBrowser',
|
|
29
29
|
components: {
|
|
30
|
-
|
|
30
|
+
DlLayout
|
|
31
31
|
},
|
|
32
32
|
setup() {
|
|
33
33
|
const template = '"h h h" "l p r" "f f f"'
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<dl-layout :template="template">
|
|
4
|
+
<template #header>
|
|
5
|
+
<slot name="header">
|
|
6
|
+
<dl-page-layout-header
|
|
7
|
+
:title="title"
|
|
8
|
+
:sub-title="subTitle"
|
|
9
|
+
:counters="counters"
|
|
10
|
+
/>
|
|
11
|
+
</slot>
|
|
12
|
+
</template>
|
|
13
|
+
<template #body>
|
|
14
|
+
<slot name="body">
|
|
15
|
+
<slot />
|
|
16
|
+
</slot>
|
|
17
|
+
</template>
|
|
18
|
+
<template #footer>
|
|
19
|
+
<slot name="footer" />
|
|
20
|
+
</template>
|
|
21
|
+
</dl-layout>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script lang="ts">
|
|
26
|
+
import { defineComponent, PropType } from 'vue-demi'
|
|
27
|
+
import { DlLayout } from '../../components'
|
|
28
|
+
import { DlCounterItem } from '../../types'
|
|
29
|
+
import { DlPageLayoutHeader } from './components'
|
|
30
|
+
|
|
31
|
+
export default defineComponent({
|
|
32
|
+
name: 'DlPageLayout',
|
|
33
|
+
components: {
|
|
34
|
+
DlLayout,
|
|
35
|
+
DlPageLayoutHeader
|
|
36
|
+
},
|
|
37
|
+
props: {
|
|
38
|
+
title: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: ''
|
|
41
|
+
},
|
|
42
|
+
subTitle: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: ''
|
|
45
|
+
},
|
|
46
|
+
counters: {
|
|
47
|
+
type: Array as PropType<DlCounterItem[]>,
|
|
48
|
+
default: () => [] as DlCounterItem[]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
setup() {
|
|
52
|
+
const template = '"h h h" "p p p" "f f f"'
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
template
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<style scoped></style>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page-layout-header">
|
|
3
|
+
<div style="display: flex; height: 100%; align-items: center">
|
|
4
|
+
<div style="padding-left: 25px">
|
|
5
|
+
<dl-typography
|
|
6
|
+
color="dl-color-lighter"
|
|
7
|
+
size="10px"
|
|
8
|
+
>
|
|
9
|
+
{{ subTitle }}
|
|
10
|
+
</dl-typography>
|
|
11
|
+
<dl-typography
|
|
12
|
+
color="dl-color-darker"
|
|
13
|
+
size="30px"
|
|
14
|
+
>
|
|
15
|
+
{{ title }}
|
|
16
|
+
</dl-typography>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<div
|
|
20
|
+
v-if="counters.length > 0"
|
|
21
|
+
style="
|
|
22
|
+
display: flex;
|
|
23
|
+
height: 100%;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: end;
|
|
26
|
+
padding-right: 10px;
|
|
27
|
+
"
|
|
28
|
+
>
|
|
29
|
+
<dl-counters
|
|
30
|
+
counter-font-size="20px"
|
|
31
|
+
title-font-size="12px"
|
|
32
|
+
:items="counters"
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script lang="ts">
|
|
39
|
+
import { PropType, defineComponent } from 'vue-demi'
|
|
40
|
+
import { DlTypography, DlCounters } from '../../../../components'
|
|
41
|
+
import { DlCounterItem } from '../../../../types'
|
|
42
|
+
|
|
43
|
+
export default defineComponent({
|
|
44
|
+
name: 'DlPageLayoutHeader',
|
|
45
|
+
components: {
|
|
46
|
+
DlTypography,
|
|
47
|
+
DlCounters
|
|
48
|
+
},
|
|
49
|
+
props: {
|
|
50
|
+
title: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: ''
|
|
53
|
+
},
|
|
54
|
+
subTitle: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: ''
|
|
57
|
+
},
|
|
58
|
+
counters: {
|
|
59
|
+
type: Array as PropType<DlCounterItem[]>,
|
|
60
|
+
default: () => [] as DlCounterItem[]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<style scoped>
|
|
67
|
+
.page-layout-header {
|
|
68
|
+
height: 100px;
|
|
69
|
+
display: grid;
|
|
70
|
+
grid-template-columns: 1fr 1fr;
|
|
71
|
+
width: 100%;
|
|
72
|
+
justify-self: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
background-color: var(--dl-color-body-background);
|
|
75
|
+
}
|
|
76
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DlPageLayoutHeader'
|
|
@@ -1,33 +1,30 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="dl-studio-layout">
|
|
3
|
-
<dl-
|
|
4
|
-
<template #header>
|
|
5
|
-
<slot name="header" />
|
|
6
|
-
</template>
|
|
3
|
+
<dl-layout :template="template">
|
|
7
4
|
<template #leftDrawer>
|
|
8
5
|
<slot name="leftDrawer" />
|
|
9
6
|
</template>
|
|
10
7
|
<template #rightDrawer>
|
|
11
8
|
<slot name="rightDrawer" />
|
|
12
9
|
</template>
|
|
13
|
-
<template #
|
|
14
|
-
<slot name="
|
|
10
|
+
<template #body>
|
|
11
|
+
<slot name="body" />
|
|
15
12
|
</template>
|
|
16
13
|
<template #footer>
|
|
17
14
|
<slot name="footer" />
|
|
18
15
|
</template>
|
|
19
|
-
</dl-
|
|
16
|
+
</dl-layout>
|
|
20
17
|
</div>
|
|
21
18
|
</template>
|
|
22
19
|
|
|
23
20
|
<script lang="ts">
|
|
24
21
|
import { defineComponent } from 'vue-demi'
|
|
25
|
-
import {
|
|
22
|
+
import { DlLayout } from '../../components'
|
|
26
23
|
|
|
27
24
|
export default defineComponent({
|
|
28
25
|
name: 'DlStudioLayout',
|
|
29
26
|
components: {
|
|
30
|
-
|
|
27
|
+
DlLayout
|
|
31
28
|
},
|
|
32
29
|
setup() {
|
|
33
30
|
const template = '"h h h" "l p r" "l f r"'
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div style="height: 100px; width: 100%">
|
|
3
|
-
<dl-button @click="isOpenedStudioModal = true">
|
|
4
|
-
Studio Layout
|
|
5
|
-
</dl-button>
|
|
6
|
-
<div
|
|
7
|
-
v-if="isOpenedStudioModal"
|
|
8
|
-
class="fullscreen-template"
|
|
9
|
-
>
|
|
10
|
-
<div class="fullscreen-template__close">
|
|
11
|
-
<dl-button
|
|
12
|
-
flat
|
|
13
|
-
icon="icon-dl-close"
|
|
14
|
-
@click="isOpenedStudioModal = false"
|
|
15
|
-
/>
|
|
16
|
-
</div>
|
|
17
|
-
<DlStudioLayout>
|
|
18
|
-
<template #header>
|
|
19
|
-
<studio-header
|
|
20
|
-
:expand-left-drawer="expandLeftDrawer"
|
|
21
|
-
@update:expand-left-drawer="handleExpandLeftDrawer"
|
|
22
|
-
/>
|
|
23
|
-
</template>
|
|
24
|
-
<template #left-menu>
|
|
25
|
-
<left-menu-content />
|
|
26
|
-
</template>
|
|
27
|
-
<template #leftDrawer>
|
|
28
|
-
<studio-left-drawer />
|
|
29
|
-
</template>
|
|
30
|
-
<template #rightDrawer>
|
|
31
|
-
<studio-tabs-menu />
|
|
32
|
-
</template>
|
|
33
|
-
<template #mainContent>
|
|
34
|
-
<studio-main-content />
|
|
35
|
-
</template>
|
|
36
|
-
<template #footer>
|
|
37
|
-
<studio-footer />
|
|
38
|
-
</template>
|
|
39
|
-
</DlStudioLayout>
|
|
40
|
-
</div>
|
|
41
|
-
<dl-button @click="isOpenedDatasetBrowserModal = true">
|
|
42
|
-
Dataset Browser
|
|
43
|
-
</dl-button>
|
|
44
|
-
<div
|
|
45
|
-
v-if="isOpenedDatasetBrowserModal"
|
|
46
|
-
class="fullscreen-template"
|
|
47
|
-
>
|
|
48
|
-
<div class="fullscreen-template__close">
|
|
49
|
-
<dl-button
|
|
50
|
-
icon="icon-dl-close"
|
|
51
|
-
flat
|
|
52
|
-
@click="isOpenedDatasetBrowserModal = false"
|
|
53
|
-
/>
|
|
54
|
-
</div>
|
|
55
|
-
<dl-dataset-browser>
|
|
56
|
-
<template #header>
|
|
57
|
-
<dataset-header />
|
|
58
|
-
</template>
|
|
59
|
-
<template #leftDrawer>
|
|
60
|
-
<dataset-left-drawer />
|
|
61
|
-
</template>
|
|
62
|
-
<template #rightDrawer>
|
|
63
|
-
<dataset-right-drawer />
|
|
64
|
-
</template>
|
|
65
|
-
<template #mainContent>
|
|
66
|
-
<dataset-main-content />
|
|
67
|
-
</template>
|
|
68
|
-
<template #footer>
|
|
69
|
-
<dataset-footer />
|
|
70
|
-
</template>
|
|
71
|
-
</dl-dataset-browser>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
</template>
|
|
75
|
-
|
|
76
|
-
<script lang="ts">
|
|
77
|
-
import { defineComponent, ref } from 'vue-demi'
|
|
78
|
-
import { DlButton } from '../components'
|
|
79
|
-
import DlStudioLayout from '../layouts/DlStudioLayout/DlStudioLayout.vue'
|
|
80
|
-
import StudioHeader from '../layouts/DlStudioLayout/components/Demo/StudioHeader.vue'
|
|
81
|
-
import StudioMainContent from '../layouts/DlStudioLayout/components/Demo/StudioMainContent.vue'
|
|
82
|
-
import LeftMenuContent from '../layouts/DlStudioLayout/components/Demo/LeftMenuContent.vue'
|
|
83
|
-
import StudioTabsMenu from '../layouts/DlStudioLayout/components/Demo/StudioTabsMenu.vue'
|
|
84
|
-
import StudioLeftDrawer from '../layouts/DlStudioLayout/components/Demo/StudioLeftDrawer.vue'
|
|
85
|
-
import StudioFooter from '../layouts/DlStudioLayout/components/Demo/StudioFooter.vue'
|
|
86
|
-
import DlDatasetBrowser from '../layouts/DlDatasetBrowser/DlDatasetBrowser.vue'
|
|
87
|
-
import DatasetHeader from '../layouts/DlDatasetBrowser/DemoComponents/DatasetHeader.vue'
|
|
88
|
-
import DatasetMainContent from '../layouts/DlDatasetBrowser/DemoComponents/DatasetMainContent.vue'
|
|
89
|
-
import DatasetLeftDrawer from '../layouts/DlDatasetBrowser/DemoComponents/DatasetLeftDrawer.vue'
|
|
90
|
-
import DatasetRightDrawer from '../layouts/DlDatasetBrowser/DemoComponents/DatasetRightDrawer.vue'
|
|
91
|
-
import DatasetFooter from '../layouts/DlDatasetBrowser/DemoComponents/DatasetFooter.vue'
|
|
92
|
-
|
|
93
|
-
export default defineComponent({
|
|
94
|
-
name: 'DlPageLayoutDemo',
|
|
95
|
-
components: {
|
|
96
|
-
DlButton,
|
|
97
|
-
DlStudioLayout,
|
|
98
|
-
StudioHeader,
|
|
99
|
-
StudioMainContent,
|
|
100
|
-
StudioTabsMenu,
|
|
101
|
-
StudioLeftDrawer,
|
|
102
|
-
StudioFooter,
|
|
103
|
-
LeftMenuContent,
|
|
104
|
-
DlDatasetBrowser,
|
|
105
|
-
DatasetHeader,
|
|
106
|
-
DatasetLeftDrawer,
|
|
107
|
-
DatasetRightDrawer,
|
|
108
|
-
DatasetFooter,
|
|
109
|
-
DatasetMainContent
|
|
110
|
-
},
|
|
111
|
-
setup() {
|
|
112
|
-
const expandLeftDrawer = ref(false)
|
|
113
|
-
const isOpenedDatasetBrowserModal = ref(false)
|
|
114
|
-
const isOpenedStudioModal = ref(false)
|
|
115
|
-
|
|
116
|
-
const handleExpandLeftDrawer = (value: any) => {
|
|
117
|
-
expandLeftDrawer.value = value
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return {
|
|
121
|
-
expandLeftDrawer,
|
|
122
|
-
handleExpandLeftDrawer,
|
|
123
|
-
isOpenedDatasetBrowserModal,
|
|
124
|
-
isOpenedStudioModal
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
})
|
|
128
|
-
</script>
|
|
129
|
-
|
|
130
|
-
<style scoped lang="scss">
|
|
131
|
-
.fullscreen-template {
|
|
132
|
-
position: fixed;
|
|
133
|
-
height: 100vh;
|
|
134
|
-
width: 100%;
|
|
135
|
-
top: 0;
|
|
136
|
-
left: 0;
|
|
137
|
-
background-color: var(--dl-color-panel-background);
|
|
138
|
-
z-index: 1000;
|
|
139
|
-
|
|
140
|
-
&__close {
|
|
141
|
-
position: absolute;
|
|
142
|
-
right: 10px;
|
|
143
|
-
z-index: 2;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
</style>
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="navbar-demo-content">
|
|
3
|
-
<div style="display: flex; height: 100%; align-items: center">
|
|
4
|
-
<dl-button
|
|
5
|
-
flat
|
|
6
|
-
icon="icon-dl-hamburger-menu"
|
|
7
|
-
color="secondary"
|
|
8
|
-
size="xl"
|
|
9
|
-
@click="updateExpandLeftDrawer"
|
|
10
|
-
/>
|
|
11
|
-
<dl-button
|
|
12
|
-
flat
|
|
13
|
-
color="secondary"
|
|
14
|
-
icon="icon-dl-left-chevron"
|
|
15
|
-
label="Go to: Dataset Browser"
|
|
16
|
-
/>
|
|
17
|
-
</div>
|
|
18
|
-
<div
|
|
19
|
-
style="
|
|
20
|
-
display: flex;
|
|
21
|
-
height: 100%;
|
|
22
|
-
align-items: center;
|
|
23
|
-
justify-content: end;
|
|
24
|
-
padding-right: 10px;
|
|
25
|
-
"
|
|
26
|
-
>
|
|
27
|
-
<dl-button flat>
|
|
28
|
-
<dl-icon
|
|
29
|
-
size="16px"
|
|
30
|
-
icon="icon-dl-light-theme"
|
|
31
|
-
color="dl-color-warning"
|
|
32
|
-
/>
|
|
33
|
-
</dl-button>
|
|
34
|
-
<dl-button flat>
|
|
35
|
-
<dl-icon
|
|
36
|
-
size="16px"
|
|
37
|
-
icon="icon-dl-dark-theme"
|
|
38
|
-
color="dl-color-warning"
|
|
39
|
-
/>
|
|
40
|
-
</dl-button>
|
|
41
|
-
<dl-button
|
|
42
|
-
flat
|
|
43
|
-
color="secondary"
|
|
44
|
-
icon="icon-dl-question"
|
|
45
|
-
/>
|
|
46
|
-
<dl-button
|
|
47
|
-
flat
|
|
48
|
-
color="secondary"
|
|
49
|
-
>
|
|
50
|
-
<dl-icon
|
|
51
|
-
size="16px"
|
|
52
|
-
icon="icon-dl-notification"
|
|
53
|
-
/>
|
|
54
|
-
</dl-button>
|
|
55
|
-
<dl-button
|
|
56
|
-
flat
|
|
57
|
-
color="secondary"
|
|
58
|
-
icon="icon-dl-cloud-server"
|
|
59
|
-
/>
|
|
60
|
-
<dl-button
|
|
61
|
-
flat
|
|
62
|
-
color="secondary"
|
|
63
|
-
icon="icon-dl-magic"
|
|
64
|
-
/>
|
|
65
|
-
<dl-button flat>
|
|
66
|
-
<dl-avatar
|
|
67
|
-
tooltip="popcat@gmail.com"
|
|
68
|
-
size="25px"
|
|
69
|
-
>
|
|
70
|
-
<img src="https://popcat.click/twitter-card.jpg">
|
|
71
|
-
</dl-avatar>
|
|
72
|
-
</dl-button>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
</template>
|
|
76
|
-
|
|
77
|
-
<script lang="ts">
|
|
78
|
-
import { defineComponent, computed, ref } from 'vue-demi'
|
|
79
|
-
import { DlButton, DlAvatar, DlIcon } from '../../../../components'
|
|
80
|
-
|
|
81
|
-
export default defineComponent({
|
|
82
|
-
name: 'StudioHeader',
|
|
83
|
-
components: {
|
|
84
|
-
DlButton,
|
|
85
|
-
DlAvatar,
|
|
86
|
-
DlIcon
|
|
87
|
-
},
|
|
88
|
-
props: {
|
|
89
|
-
expandLeftDrawer: {
|
|
90
|
-
type: Boolean
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
emits: ['update:expandLeftDrawer'],
|
|
94
|
-
setup(props, ctx) {
|
|
95
|
-
const expandLeftDrawerProp = computed<boolean>(
|
|
96
|
-
() => props.expandLeftDrawer
|
|
97
|
-
)
|
|
98
|
-
const isExpandedLeftDrawer = ref(expandLeftDrawerProp.value)
|
|
99
|
-
|
|
100
|
-
const updateExpandLeftDrawer = () => {
|
|
101
|
-
isExpandedLeftDrawer.value = !isExpandedLeftDrawer.value
|
|
102
|
-
ctx.emit('update:expandLeftDrawer', isExpandedLeftDrawer.value)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return {
|
|
106
|
-
updateExpandLeftDrawer
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
})
|
|
110
|
-
</script>
|
|
111
|
-
|
|
112
|
-
<style scoped>
|
|
113
|
-
.navbar-demo-content {
|
|
114
|
-
height: 100%;
|
|
115
|
-
display: grid;
|
|
116
|
-
grid-template-columns: 1fr 1fr;
|
|
117
|
-
width: 100%;
|
|
118
|
-
justify-self: center;
|
|
119
|
-
justify-content: center;
|
|
120
|
-
}
|
|
121
|
-
</style>
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="dl-layout-drawer"
|
|
4
|
-
:style="cssVars"
|
|
5
|
-
@mouseenter="onMouseEnter"
|
|
6
|
-
@mouseleave="onMouseLeave"
|
|
7
|
-
>
|
|
8
|
-
<div style="height: 100%; position: relative">
|
|
9
|
-
<div
|
|
10
|
-
v-if="location === 'right'"
|
|
11
|
-
class="dl-layout-drawer__wrapper"
|
|
12
|
-
>
|
|
13
|
-
<dl-icon
|
|
14
|
-
:icon="expandIcon"
|
|
15
|
-
size="25px"
|
|
16
|
-
class="dl-layout-drawer__wrapper__expand-icon"
|
|
17
|
-
:class="{ expanded: !isExpanded }"
|
|
18
|
-
@click="toggleExpandDrawer"
|
|
19
|
-
/>
|
|
20
|
-
</div>
|
|
21
|
-
<slot />
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
</template>
|
|
25
|
-
|
|
26
|
-
<script lang="ts">
|
|
27
|
-
import { defineComponent, ref, computed, onMounted, watch } from 'vue-demi'
|
|
28
|
-
import DlIcon from '../../../essential/DlIcon/DlIcon.vue'
|
|
29
|
-
|
|
30
|
-
export default defineComponent({
|
|
31
|
-
name: 'NavigationDrawer',
|
|
32
|
-
components: {
|
|
33
|
-
DlIcon
|
|
34
|
-
},
|
|
35
|
-
props: {
|
|
36
|
-
position: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: 'relative',
|
|
39
|
-
validator: (val: string) => ['relative', 'absolute'].includes(val)
|
|
40
|
-
},
|
|
41
|
-
location: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: 'left',
|
|
44
|
-
validator: (val: string) => ['left', 'right'].includes(val)
|
|
45
|
-
},
|
|
46
|
-
expandDrawer: {
|
|
47
|
-
type: Boolean
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
emits: ['expand'],
|
|
51
|
-
setup(props, context) {
|
|
52
|
-
const isVisible = ref(true)
|
|
53
|
-
const propsExpandDrawer = computed(() => props.expandDrawer)
|
|
54
|
-
const isExpanded = ref(propsExpandDrawer.value)
|
|
55
|
-
const drawerWidth = ref('')
|
|
56
|
-
const LARGE_WIDTH = '250px'
|
|
57
|
-
const SMALL_WIDTH = '0px'
|
|
58
|
-
|
|
59
|
-
const onMouseEnter = () => {
|
|
60
|
-
if (isExpanded.value) return
|
|
61
|
-
drawerWidth.value = LARGE_WIDTH
|
|
62
|
-
isVisible.value = true
|
|
63
|
-
}
|
|
64
|
-
const onMouseLeave = () => {
|
|
65
|
-
if (isExpanded.value) return
|
|
66
|
-
drawerWidth.value = SMALL_WIDTH
|
|
67
|
-
isVisible.value = false
|
|
68
|
-
}
|
|
69
|
-
const expandIcon = computed(() =>
|
|
70
|
-
props.location === 'left'
|
|
71
|
-
? 'icon-dl-left-chevron'
|
|
72
|
-
: 'icon-dl-right-chevron'
|
|
73
|
-
)
|
|
74
|
-
const toggleExpandDrawer = () => {
|
|
75
|
-
isExpanded.value = !isExpanded.value
|
|
76
|
-
context.emit('expand', isExpanded.value)
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
onMounted(() => {
|
|
80
|
-
drawerWidth.value = SMALL_WIDTH
|
|
81
|
-
})
|
|
82
|
-
watch(isExpanded, (value) => {
|
|
83
|
-
isVisible.value = value
|
|
84
|
-
drawerWidth.value = value ? LARGE_WIDTH : SMALL_WIDTH
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
watch(propsExpandDrawer, (value) => {
|
|
88
|
-
isExpanded.value = value
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
const cssVars = computed(() => {
|
|
92
|
-
return {
|
|
93
|
-
'--dl-layout-drawer-width': isExpanded.value
|
|
94
|
-
? LARGE_WIDTH
|
|
95
|
-
: SMALL_WIDTH,
|
|
96
|
-
'--dl-layout-position': props.position,
|
|
97
|
-
'--dl-layout-drawer-overflow':
|
|
98
|
-
props.position === 'absolute' ? 'hidden' : null
|
|
99
|
-
}
|
|
100
|
-
})
|
|
101
|
-
return {
|
|
102
|
-
cssVars,
|
|
103
|
-
onMouseEnter,
|
|
104
|
-
drawerWidth,
|
|
105
|
-
onMouseLeave,
|
|
106
|
-
isVisible,
|
|
107
|
-
expandIcon,
|
|
108
|
-
isExpanded,
|
|
109
|
-
toggleExpandDrawer
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
})
|
|
113
|
-
</script>
|
|
114
|
-
|
|
115
|
-
<style scoped lang="scss">
|
|
116
|
-
.dl-layout-drawer {
|
|
117
|
-
position: var(--dl-layout-position);
|
|
118
|
-
z-index: 1;
|
|
119
|
-
width: var(--dl-layout-drawer-width);
|
|
120
|
-
height: 100%;
|
|
121
|
-
overflow: var(--dl-layout-drawer-overflow);
|
|
122
|
-
transition: all 300ms;
|
|
123
|
-
box-shadow: 1px 1px 9px rgba(0, 0, 0, 0.08);
|
|
124
|
-
background-color: transparent;
|
|
125
|
-
|
|
126
|
-
&__wrapper {
|
|
127
|
-
position: absolute;
|
|
128
|
-
top: 70px;
|
|
129
|
-
left: -17px;
|
|
130
|
-
cursor: pointer;
|
|
131
|
-
color: var(--dl-color-lighter);
|
|
132
|
-
text-align: right;
|
|
133
|
-
margin-top: 8px;
|
|
134
|
-
background-color: var(--dl-color-bg);
|
|
135
|
-
border-radius: 50px;
|
|
136
|
-
|
|
137
|
-
&__expand-icon {
|
|
138
|
-
display: flex !important;
|
|
139
|
-
transition: all 300ms;
|
|
140
|
-
|
|
141
|
-
&.expanded {
|
|
142
|
-
transform: rotate(180deg);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
</style>
|
|
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
|
|
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
|
|
File without changes
|
/package/src/{layouts/DlStudioLayout → demos/DlStudioLayoutDemo}/components/LayoutNavbar.vue
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/{layouts/DlStudioLayout → demos/DlStudioLayoutDemo}/components/ListAutocomplete.vue
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|