@energie360/ui-library 0.1.20 → 0.1.22
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/components/badge/u-badge.vue +9 -1
- package/components/card/card.scss +3 -1
- package/components/card/u-card.vue +1 -3
- package/components/card-cta-header/u-card-cta-header.vue +1 -1
- package/components/card-footer/u-card-footer.vue +1 -1
- package/components/card-highlight/card-highlight.scss +38 -44
- package/components/card-highlight/u-card-highlight.vue +16 -9
- package/components/chip/chip.scss +2 -2
- package/components/chip/u-chip.vue +2 -2
- package/components/collapsible/u-collapsible.vue +1 -1
- package/components/context-menu-link/u-context-menu-link.vue +2 -2
- package/components/data-card/data-card.scss +4 -4
- package/components/data-card/u-data-card.vue +4 -4
- package/components/download-list-item/download-list-item.scss +22 -1
- package/components/download-list-item/u-download-list-item.vue +46 -8
- package/components/hint/u-hint.vue +1 -1
- package/components/navigation-panel-tile/u-navigation-panel-tile.vue +5 -1
- package/components/navigation-toolbar-link/navigation-toolbar-link.scss +9 -1
- package/components/navigation-toolbar-link/u-navigation-toolbar-link.vue +1 -0
- package/components/panel/u-panel.vue +1 -1
- package/components/progress-avatar/u-progress-avatar.vue +4 -4
- package/components/richtext/u-richtext.vue +1 -1
- package/components/table/cell-ctas.scss +1 -0
- package/components/table/u-cell-icon-group.vue +9 -1
- package/components/table/u-cell-progress-bar.vue +1 -1
- package/components/table/u-table-cell.vue +1 -0
- package/components/table/u-table-heading.vue +3 -5
- package/components/tabs/u-tabs.vue +10 -4
- package/components/text-block/u-text-block.vue +1 -1
- package/components/welcome/u-welcome.vue +21 -10
- package/components/welcome/welcome.scss +36 -13
- package/dist/base-style.css +23 -22
- package/dist/base-style.css.map +1 -1
- package/elements/button/_button-plain.scss +7 -10
- package/elements/button/u-button.vue +9 -4
- package/elements/button-chip/u-button-chip.vue +13 -7
- package/elements/checkbox/u-checkbox.vue +1 -1
- package/elements/icon-button/u-icon-button.vue +1 -1
- package/elements/numeric-stepper/u-numeric-stepper.vue +1 -1
- package/elements/select-chip/u-select-chip.vue +4 -1
- package/elements/text-field/u-text-field.vue +9 -3
- package/elements/textarea/u-textarea.vue +1 -0
- package/elements/toggle-switch/u-toggle-switch.vue +1 -0
- package/layout/index.js +2 -1
- package/layout/portal/portal.scss +26 -42
- package/layout/portal/u-portal.vue +13 -34
- package/layout/portal-main/portal-main.scss +98 -0
- package/layout/portal-main/u-portal-main.vue +37 -0
- package/layout/tile-grid/u-tile-item.vue +7 -0
- package/modules/dialog/u-dialog.vue +16 -6
- package/modules/index.js +1 -2
- package/modules/navigation-panel/navigation-panel.scss +12 -1
- package/modules/toast/u-toast.vue +6 -0
- package/package.json +7 -7
- package/wizard/wizard-outro/u-wizard-outro.vue +1 -1
|
@@ -1,25 +1,36 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
|
|
2
|
+
import { Image } from '../../elements/types'
|
|
3
3
|
|
|
4
4
|
interface Props {
|
|
5
5
|
text?: string
|
|
6
|
-
|
|
6
|
+
image?: Image
|
|
7
7
|
}
|
|
8
8
|
defineProps<Props>()
|
|
9
9
|
</script>
|
|
10
10
|
|
|
11
11
|
<template>
|
|
12
|
-
<div class="welcome
|
|
13
|
-
<div class="
|
|
14
|
-
<
|
|
15
|
-
<
|
|
12
|
+
<div class="welcome">
|
|
13
|
+
<div class="welcome__content">
|
|
14
|
+
<h2>
|
|
15
|
+
<slot>{{ text }}</slot>
|
|
16
|
+
</h2>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div v-if="$slots.image || image" class="welcome__image" aria-hidden="true">
|
|
20
|
+
<slot name="image">
|
|
21
|
+
<img :src="image.src" :alt="image.alt" />
|
|
16
22
|
</slot>
|
|
17
23
|
</div>
|
|
18
|
-
<!-- TODO: Add image whenever is ready -->
|
|
19
|
-
<!-- <div class="welcome-image">
|
|
20
|
-
<img src="path/to/image.jpg" alt="Welcome Image" />
|
|
21
|
-
</div> -->
|
|
22
24
|
</div>
|
|
23
25
|
</template>
|
|
24
26
|
|
|
25
27
|
<style scoped lang="scss" src="./welcome.scss"></style>
|
|
28
|
+
<style scoped lang="scss">
|
|
29
|
+
.welcome__image {
|
|
30
|
+
:slotted(img) {
|
|
31
|
+
height: 100%;
|
|
32
|
+
width: 100%;
|
|
33
|
+
object-fit: cover;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
@@ -1,25 +1,48 @@
|
|
|
1
|
-
@use '../../base/abstracts
|
|
1
|
+
@use '../../base/abstracts' as a;
|
|
2
2
|
|
|
3
|
-
.welcome
|
|
3
|
+
.welcome {
|
|
4
4
|
@include a.type(500, strong);
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
color: var(--e-c-primary-01-950);
|
|
6
|
+
position: relative;
|
|
7
|
+
height: a.rem(94);
|
|
9
8
|
display: flex;
|
|
10
|
-
|
|
11
|
-
padding:
|
|
9
|
+
align-items: center;
|
|
10
|
+
padding: 0 var(--e-space-6);
|
|
11
|
+
background-color: var(--e-c-primary-01-50);
|
|
12
|
+
border: 1px solid var(--e-c-primary-01-100);
|
|
13
|
+
border-radius: var(--e-brd-radius-2);
|
|
14
|
+
color: var(--e-c-secondary-01-950);
|
|
15
|
+
overflow: hidden;
|
|
12
16
|
|
|
13
|
-
@include a.bp(
|
|
17
|
+
@include a.bp(lg) {
|
|
18
|
+
min-height: a.rem(86);
|
|
19
|
+
height: auto;
|
|
14
20
|
padding: var(--e-space-3) var(--e-space-4);
|
|
15
21
|
}
|
|
16
22
|
}
|
|
17
23
|
|
|
18
|
-
|
|
24
|
+
.welcome__content {
|
|
25
|
+
max-width: calc(100% - #{a.rem(340)});
|
|
26
|
+
|
|
27
|
+
@include a.bp(lg) {
|
|
28
|
+
max-width: calc(100% - #{a.rem(80)});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
19
31
|
|
|
20
|
-
|
|
32
|
+
.welcome__image {
|
|
33
|
+
position: absolute;
|
|
34
|
+
top: 0;
|
|
35
|
+
right: 0;
|
|
36
|
+
height: 100%;
|
|
37
|
+
aspect-ratio: 10/3;
|
|
21
38
|
|
|
22
|
-
|
|
23
|
-
|
|
39
|
+
img {
|
|
40
|
+
height: 100%;
|
|
41
|
+
width: 100%;
|
|
42
|
+
object-fit: cover;
|
|
43
|
+
}
|
|
24
44
|
|
|
25
|
-
|
|
45
|
+
@include a.bp(lg) {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
package/dist/base-style.css
CHANGED
|
@@ -3,28 +3,6 @@
|
|
|
3
3
|
Base styling and resets for all vue-components/custom-elements.
|
|
4
4
|
This must be loaded before all other styles.
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* @license
|
|
8
|
-
* MyFonts Webfont Build ID 3943012, 2020-09-02T07:30:46-0400
|
|
9
|
-
*
|
|
10
|
-
* The fonts listed in this notice are subject to the End User License
|
|
11
|
-
* Agreement(s) entered into by the website owner. All other parties are
|
|
12
|
-
* explicitly restricted from using the Licensed Webfonts(s).
|
|
13
|
-
*
|
|
14
|
-
* Webfont: Glober-Bold by Fontfabric
|
|
15
|
-
* URL: https://www.myfonts.com/fonts/font-fabric/glober/bold/
|
|
16
|
-
* Copyright: Copyright (c) 2019 by Svet Simov. All rights reserved.
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* Webfont: Glober-Regular by Fontfabric
|
|
20
|
-
* URL: https://www.myfonts.com/fonts/font-fabric/glober/regular/
|
|
21
|
-
* Copyright: Copyright (c) 2019 by Svet Simov. All rights reserved.
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* © 2020 MyFonts Inc
|
|
25
|
-
*/
|
|
26
|
-
/* @import must be at top of file, otherwise CSS will not work */
|
|
27
|
-
@import url("//hello.myfonts.net/count/3c2a64");
|
|
28
6
|
body {
|
|
29
7
|
margin: 0;
|
|
30
8
|
min-height: 100vh;
|
|
@@ -180,6 +158,29 @@ body {
|
|
|
180
158
|
outline: none;
|
|
181
159
|
}
|
|
182
160
|
|
|
161
|
+
/**
|
|
162
|
+
* @license
|
|
163
|
+
* MyFonts Webfont Build ID 3943012, 2020-09-02T07:30:46-0400
|
|
164
|
+
*
|
|
165
|
+
* The fonts listed in this notice are subject to the End User License
|
|
166
|
+
* Agreement(s) entered into by the website owner. All other parties are
|
|
167
|
+
* explicitly restricted from using the Licensed Webfonts(s).
|
|
168
|
+
*
|
|
169
|
+
* Webfont: Glober-Bold by Fontfabric
|
|
170
|
+
* URL: https://www.myfonts.com/fonts/font-fabric/glober/bold/
|
|
171
|
+
* Copyright: Copyright (c) 2019 by Svet Simov. All rights reserved.
|
|
172
|
+
*
|
|
173
|
+
*
|
|
174
|
+
* Webfont: Glober-Regular by Fontfabric
|
|
175
|
+
* URL: https://www.myfonts.com/fonts/font-fabric/glober/regular/
|
|
176
|
+
* Copyright: Copyright (c) 2019 by Svet Simov. All rights reserved.
|
|
177
|
+
*
|
|
178
|
+
*
|
|
179
|
+
* © 2020 MyFonts Inc
|
|
180
|
+
*/
|
|
181
|
+
/* @import must be at top of file, otherwise CSS will not work */
|
|
182
|
+
/* TODO: Add this import only for production build. Currently It causes weird warnings in dev mode. */
|
|
183
|
+
/* @import url('//hello.myfonts.net/count/3c2a64'); */
|
|
183
184
|
/* TODO: Assets path is hardcoded here. Should be configurable */
|
|
184
185
|
/* Regular */
|
|
185
186
|
@font-face {
|
package/dist/base-style.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../base/main-base.scss","../
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../base/main-base.scss","../base/_resets.scss","../base/abstracts/_resets.scss","../base/abstracts/_variables.scss","../base/abstracts/_functions.scss","../base/_input-resets.scss","../base/abstracts/_mixins.scss","../base/_html.scss","../base/_body.scss","../base/_focus-handling.scss","../node_modules/@energie360/design-tokens/dist/fonts/fonts.css","../node_modules/@energie360/design-tokens/dist/css/design-tokens.css"],"names":[],"mappings":";AAAA;AAAA;AAAA;AAAA;ACEA;EACE;EACA;;;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;EAME;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;AAAA;AAAA;EAGE;;;AC1BA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADuBJ;AAAA;EAEE;EACA;EACA;;;AAGF;AAAA;AAAA;EAGE;;;AAGF;EACE;;;AAGF;AAAA;EAEE;EACA;;;AAGF;EACE;EACA;EACA;;;AErB+E;AChCjF;ACHA;AAAA;AAAA;EAGE;EACA;EACA;EACA;EACA;EACA;;;AAGF;AAAA;AAAA;EC8BE;EACA;EAKE;;;AD7BF;EACE;;AAGF;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;;;AAIA;EACE;;;AAIJ;EACE;;;AAGF;EAEE;;AAEA;EAEE;EACA;;;AEvDJ;EACE;EACA;EACA;;;AAGF;AAAA;AAAA;EAGE;;;ACTF;EACE;EACA;EACA;EACA;EACA;;;ACAF;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;;AChBF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBA;AAEA;AAEA;AAEA;AAEA;AACA;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;AACA;EACE;EACA;EACA;EACA;EACA,KACE;;AC/CJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAAA;EAEA;AAAA;EAEA;AAAA;EAEA;AAAA;EAEA;;;AX7MA;AAAA;AAAA;AAAA;EACE","file":"base-style.css"}
|
|
@@ -6,16 +6,14 @@
|
|
|
6
6
|
text-decoration: none;
|
|
7
7
|
grid-gap: var(--e-space-1);
|
|
8
8
|
|
|
9
|
-
.icon
|
|
10
|
-
e-icon {
|
|
9
|
+
.icon {
|
|
11
10
|
--icon-fill-color: var(--e-c-primary-01-700);
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
&:hover {
|
|
15
14
|
color: var(--e-c-secondary-01-900);
|
|
16
15
|
|
|
17
|
-
.icon
|
|
18
|
-
e-icon {
|
|
16
|
+
.icon {
|
|
19
17
|
--icon-fill-color: var(--e-c-secondary-01-900);
|
|
20
18
|
}
|
|
21
19
|
}
|
|
@@ -23,8 +21,7 @@
|
|
|
23
21
|
&:active {
|
|
24
22
|
color: var(--e-c-secondary-01-700);
|
|
25
23
|
|
|
26
|
-
.icon
|
|
27
|
-
e-icon {
|
|
24
|
+
.icon {
|
|
28
25
|
--icon-fill-color: var(--e-c-secondary-01-700);
|
|
29
26
|
}
|
|
30
27
|
}
|
|
@@ -34,15 +31,15 @@
|
|
|
34
31
|
background: none;
|
|
35
32
|
color: var(--e-c-mono-500);
|
|
36
33
|
|
|
37
|
-
.icon
|
|
38
|
-
e-icon {
|
|
34
|
+
.icon {
|
|
39
35
|
--icon-fill-color: var(--e-c-mono-500);
|
|
40
36
|
}
|
|
41
37
|
}
|
|
42
38
|
|
|
43
39
|
&.loading {
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
|
|
42
|
+
.loader {
|
|
46
43
|
--dot-color: var(--e-c-secondary-01-700);
|
|
47
44
|
}
|
|
48
45
|
}
|
|
@@ -18,7 +18,14 @@ interface ButtonProps {
|
|
|
18
18
|
hideLabelLg?: boolean
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
const {
|
|
21
|
+
const {
|
|
22
|
+
label = '',
|
|
23
|
+
variant = 'filled',
|
|
24
|
+
icon = '',
|
|
25
|
+
href = '',
|
|
26
|
+
target = '',
|
|
27
|
+
asSpan = false,
|
|
28
|
+
} = defineProps<ButtonProps>()
|
|
22
29
|
|
|
23
30
|
const buttonTag = computed(() => (asSpan ? 'span' : 'button'))
|
|
24
31
|
</script>
|
|
@@ -86,6 +93,4 @@ const buttonTag = computed(() => (asSpan ? 'span' : 'button'))
|
|
|
86
93
|
</template>
|
|
87
94
|
</template>
|
|
88
95
|
|
|
89
|
-
<style lang="scss" scoped>
|
|
90
|
-
@use './button.scss';
|
|
91
|
-
</style>
|
|
96
|
+
<style lang="scss" scoped src="./button.scss"></style>
|
|
@@ -15,7 +15,13 @@ interface Props {
|
|
|
15
15
|
target?: string
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
const {
|
|
18
|
+
const {
|
|
19
|
+
label = '',
|
|
20
|
+
icon = '',
|
|
21
|
+
href = '',
|
|
22
|
+
target = '',
|
|
23
|
+
variant = ButtonChipVariant.normal,
|
|
24
|
+
} = defineProps<Props>()
|
|
19
25
|
</script>
|
|
20
26
|
|
|
21
27
|
<template>
|
|
@@ -23,9 +29,9 @@ const { variant = ButtonChipVariant.normal } = defineProps<Props>()
|
|
|
23
29
|
<a :class="['button-chip', variant]" :href :target>
|
|
24
30
|
<UIcon v-if="icon" :name="icon"></UIcon>
|
|
25
31
|
|
|
26
|
-
<span class="button-chip__label"
|
|
27
|
-
|
|
28
|
-
>
|
|
32
|
+
<span class="button-chip__label">
|
|
33
|
+
<slot>{{ label }}</slot>
|
|
34
|
+
</span>
|
|
29
35
|
</a>
|
|
30
36
|
</template>
|
|
31
37
|
|
|
@@ -33,9 +39,9 @@ const { variant = ButtonChipVariant.normal } = defineProps<Props>()
|
|
|
33
39
|
<button :class="['button-chip', variant]" :disabled>
|
|
34
40
|
<UIcon v-if="icon" :name="icon"></UIcon>
|
|
35
41
|
|
|
36
|
-
<span class="button-chip__label"
|
|
37
|
-
|
|
38
|
-
>
|
|
42
|
+
<span class="button-chip__label">
|
|
43
|
+
<slot>{{ label }}</slot>
|
|
44
|
+
</span>
|
|
39
45
|
</button>
|
|
40
46
|
</template>
|
|
41
47
|
</template>
|
|
@@ -5,7 +5,6 @@ import { getTranslation } from '../../utils/translations/translate'
|
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
7
7
|
label?: string
|
|
8
|
-
value?: string | number
|
|
9
8
|
name: string
|
|
10
9
|
disabled?: boolean
|
|
11
10
|
readonly?: boolean
|
|
@@ -24,6 +23,7 @@ const {
|
|
|
24
23
|
max = '',
|
|
25
24
|
step = '1',
|
|
26
25
|
error = false,
|
|
26
|
+
errorMessage = '',
|
|
27
27
|
} = defineProps<Props>()
|
|
28
28
|
|
|
29
29
|
const cId = `numeric-stepper-${useId()}`
|
|
@@ -11,6 +11,7 @@ interface Props {
|
|
|
11
11
|
provideKey?: string
|
|
12
12
|
}
|
|
13
13
|
const {
|
|
14
|
+
label = '',
|
|
14
15
|
name,
|
|
15
16
|
disabled = false,
|
|
16
17
|
value = '',
|
|
@@ -30,7 +31,9 @@ const classes = computed(() =>
|
|
|
30
31
|
<div class="select-chip">
|
|
31
32
|
<label :class="classes" class="select-chip__button button">
|
|
32
33
|
<UIcon v-if="model === value" name="mini-check" />
|
|
33
|
-
|
|
34
|
+
<slot name="label">
|
|
35
|
+
{{ label }}
|
|
36
|
+
</slot>
|
|
34
37
|
|
|
35
38
|
<slot>
|
|
36
39
|
<input v-model="model" type="radio" :name :value :disabled @change="onChange" />
|
|
@@ -16,6 +16,8 @@ interface Props extends FormFieldBase {
|
|
|
16
16
|
const inputId = useId()
|
|
17
17
|
|
|
18
18
|
const {
|
|
19
|
+
placeholder = '',
|
|
20
|
+
unit = '',
|
|
19
21
|
disabled = false,
|
|
20
22
|
readonly = false,
|
|
21
23
|
required = false,
|
|
@@ -27,16 +29,17 @@ const {
|
|
|
27
29
|
const slots = useSlots()
|
|
28
30
|
const model = defineModel<string>()
|
|
29
31
|
const emits = defineEmits<{
|
|
30
|
-
input: [value: string | null]
|
|
32
|
+
input: [value: string | null] // TODO: Could be obsolete because we get value via model.
|
|
31
33
|
focus: [target: FocusEvent['target']]
|
|
32
34
|
focusout: [target: FocusEvent['target']]
|
|
33
35
|
}>()
|
|
34
36
|
|
|
37
|
+
// TODO: Do we need a ref to input? Value is currently written/read via model.
|
|
35
38
|
const input = useTemplateRef('input')
|
|
36
39
|
|
|
37
40
|
const isFocused = ref(false)
|
|
38
41
|
const isHovering = ref(false)
|
|
39
|
-
const hasValue = ref(
|
|
42
|
+
const hasValue = ref(!!model.value)
|
|
40
43
|
const forceFloatLabel = ref(type === TextFieldTypes.date) // input-type 'date' doesn't support placeholder.
|
|
41
44
|
|
|
42
45
|
const spacer = '. '
|
|
@@ -58,7 +61,6 @@ const onBlur = () => {
|
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
const onInput = () => {
|
|
61
|
-
hasValue.value = !!input.value && input.value.value !== ''
|
|
62
64
|
emits('input', input.value?.value ?? null)
|
|
63
65
|
}
|
|
64
66
|
|
|
@@ -109,6 +111,10 @@ watch(
|
|
|
109
111
|
}
|
|
110
112
|
},
|
|
111
113
|
)
|
|
114
|
+
|
|
115
|
+
watch(model, () => {
|
|
116
|
+
hasValue.value = !!model.value
|
|
117
|
+
})
|
|
112
118
|
</script>
|
|
113
119
|
|
|
114
120
|
<template>
|
package/layout/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as UPortalLayout } from './portal/u-portal.vue'
|
|
2
|
+
export { default as UPortalMain } from './portal-main/u-portal-main.vue'
|
|
3
|
+
export { default as UPortalContentAside } from './portal-content-aside/u-portal-content-aside.vue'
|
|
2
4
|
export { default as UTileGrid } from './tile-grid/u-tile-grid.vue'
|
|
3
5
|
export { default as UTileItem } from './tile-grid/u-tile-item.vue'
|
|
4
6
|
export { default as UResponsiveContainer } from './responsive-container/u-responsive-container.vue'
|
|
5
|
-
export { default as UPortalContentAside } from './portal-content-aside/u-portal-content-aside.vue'
|
|
@@ -2,62 +2,46 @@
|
|
|
2
2
|
@use '../../layout/container/container' as c;
|
|
3
3
|
|
|
4
4
|
.portal {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
width: 100%;
|
|
6
|
+
display: grid;
|
|
7
|
+
grid:
|
|
8
|
+
'nav body' 1fr
|
|
9
|
+
/ auto 1fr;
|
|
7
10
|
|
|
8
|
-
.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.portal__top-navigation {
|
|
15
|
-
display: none;
|
|
11
|
+
@include a.bp(lg) {
|
|
12
|
+
grid-template-areas: none;
|
|
13
|
+
grid-template-columns: 1fr;
|
|
14
|
+
grid-template-rows: 56px auto;
|
|
15
|
+
min-height: 100vh;
|
|
16
|
+
}
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
.
|
|
19
|
+
.portal__side-navigation {
|
|
20
|
+
grid-area: nav;
|
|
19
21
|
position: sticky;
|
|
20
22
|
top: 0;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.portal__main {
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-direction: column;
|
|
28
|
-
padding-left: var(--side-nav-width);
|
|
29
|
-
min-height: 100vh;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.portal__content-container {
|
|
33
|
-
padding-top: var(--e-space-10);
|
|
34
|
-
padding-bottom: var(--e-space-10);
|
|
35
|
-
|
|
36
|
-
@include c.portal-content-container;
|
|
23
|
+
height: 100vh;
|
|
24
|
+
z-index: 1;
|
|
37
25
|
|
|
38
26
|
@include a.bp(lg) {
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
@include a.bp(m) {
|
|
43
|
-
padding-top: var(--e-space-6);
|
|
27
|
+
display: none;
|
|
44
28
|
}
|
|
45
29
|
}
|
|
46
30
|
|
|
47
|
-
.
|
|
48
|
-
|
|
49
|
-
|
|
31
|
+
.portal__top-navigation {
|
|
32
|
+
display: none;
|
|
33
|
+
position: relative;
|
|
34
|
+
z-index: 20;
|
|
50
35
|
|
|
51
|
-
@include a.bp(lg) {
|
|
52
|
-
.portal__top-navigation {
|
|
36
|
+
@include a.bp(lg) {
|
|
53
37
|
display: block;
|
|
54
38
|
}
|
|
39
|
+
}
|
|
55
40
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
41
|
+
.portal__body {
|
|
42
|
+
grid-area: body;
|
|
59
43
|
|
|
60
|
-
.
|
|
61
|
-
|
|
44
|
+
@include a.bp(lg) {
|
|
45
|
+
grid-area: auto;
|
|
62
46
|
}
|
|
63
47
|
}
|
|
@@ -1,49 +1,28 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { provide } from 'vue'
|
|
3
3
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
})
|
|
4
|
+
const slots = defineSlots<{
|
|
5
|
+
default()
|
|
6
|
+
sideNavigation()
|
|
7
|
+
topNavigation()
|
|
8
|
+
footer()
|
|
9
|
+
}>()
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
const sideNavWidth = ref(0)
|
|
14
|
-
|
|
15
|
-
onMounted(() => {
|
|
16
|
-
sideNavObserver.observe(sideNavEl.value)
|
|
17
|
-
})
|
|
11
|
+
provide('portal-footer-slot', slots.footer)
|
|
18
12
|
</script>
|
|
19
13
|
|
|
20
14
|
<template>
|
|
21
|
-
<div
|
|
22
|
-
class="portal"
|
|
23
|
-
:style="{
|
|
24
|
-
'--side-nav-width': `${sideNavWidth}px`,
|
|
25
|
-
}"
|
|
26
|
-
>
|
|
15
|
+
<div class="portal">
|
|
27
16
|
<div ref="sideNavigation" class="portal__side-navigation">
|
|
28
|
-
<slot name="
|
|
17
|
+
<slot name="sideNavigation"></slot>
|
|
29
18
|
</div>
|
|
30
19
|
|
|
31
20
|
<div class="portal__top-navigation">
|
|
32
|
-
<slot name="
|
|
21
|
+
<slot name="topNavigation"></slot>
|
|
33
22
|
</div>
|
|
34
23
|
|
|
35
|
-
<div class="
|
|
36
|
-
<
|
|
37
|
-
<slot name="sub-navigation"></slot>
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
<div class="portal__content-container">
|
|
41
|
-
<slot></slot>
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
<div class="portal__footer">
|
|
45
|
-
<slot name="footer"></slot>
|
|
46
|
-
</div>
|
|
24
|
+
<div class="portal__body">
|
|
25
|
+
<slot></slot>
|
|
47
26
|
</div>
|
|
48
27
|
</div>
|
|
49
28
|
</template>
|