@energie360/ui-library 0.1.19 → 0.1.21
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-price/u-card-price.vue +8 -4
- 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 +1 -1
- package/components/download-list-item/download-list-item.scss +58 -37
- package/components/download-list-item/u-download-list-item.vue +46 -8
- package/components/hint/hint.scss +85 -91
- package/components/hint/u-hint.vue +1 -3
- package/components/index.js +0 -6
- package/components/inline-edit/inline-edit.scss +2 -2
- package/components/inline-edit/u-inline-edit.vue +0 -1
- package/components/navigation-panel-tile/u-navigation-panel-tile.vue +5 -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-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/dist/base-style.css +23 -22
- package/dist/base-style.css.map +1 -1
- package/elements/button/u-button.vue +8 -1
- 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 +3 -1
- package/elements/select-chip/u-select-chip.vue +4 -1
- package/elements/text-field/u-text-field.vue +2 -0
- 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 +8 -2
- package/modules/navigation-panel/navigation-panel.scss +1 -1
- package/package.json +7 -7
- package/wizard/wizard-outro/u-wizard-outro.vue +1 -1
|
@@ -5,7 +5,7 @@ interface Props {
|
|
|
5
5
|
inverted?: boolean
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
const { small = false, inverted = false } = defineProps<Props>()
|
|
8
|
+
const { text = '', small = false, inverted = false } = defineProps<Props>()
|
|
9
9
|
|
|
10
10
|
const classes = ['richtext', { 'richtext--small': small, 'richtext--inverted': inverted }]
|
|
11
11
|
</script>
|
|
@@ -6,17 +6,15 @@ interface Props {
|
|
|
6
6
|
nowrap?: boolean
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
const { hAlign = 'left', vAlign = 'top' } = defineProps<Props>()
|
|
9
|
+
const { text = '', hAlign = 'left', vAlign = 'top' } = defineProps<Props>()
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
13
13
|
<div role="cell" :class="['table-heading', `h-align-${hAlign}`, `v-align-${vAlign}`]">
|
|
14
14
|
<div :class="['cell-content', { nowrap }]">
|
|
15
|
-
<slot
|
|
15
|
+
<slot>{{ text }}</slot>
|
|
16
16
|
</div>
|
|
17
17
|
</div>
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
|
-
<style scoped lang="scss">
|
|
21
|
-
@use './table-heading.scss';
|
|
22
|
-
</style>
|
|
20
|
+
<style scoped lang="scss" src="./table-heading.scss"></style>
|
|
@@ -97,11 +97,17 @@ const positionActiveBar = () => {
|
|
|
97
97
|
activeTabEl = tabs.value.find((item) => item.value === model.value)
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
try {
|
|
101
|
+
const activeTabRelPos = getOffsetParentPosition(activeTabEl)
|
|
101
102
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
activeBarStyles.value = {
|
|
104
|
+
width: `${activeTabEl.offsetWidth}px`,
|
|
105
|
+
left: `${activeTabRelPos.left + list.value.scrollLeft}px`,
|
|
106
|
+
}
|
|
107
|
+
} catch {
|
|
108
|
+
// This will sometimes fail during resizing. Not sure why it happens.
|
|
109
|
+
// Also when coverage-testing this will fail.
|
|
110
|
+
// We don't need to do anything here.
|
|
105
111
|
}
|
|
106
112
|
}
|
|
107
113
|
|
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"}
|
|
@@ -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>
|
|
@@ -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()}`
|
|
@@ -125,6 +125,7 @@ onMounted(() => {
|
|
|
125
125
|
|
|
126
126
|
<button
|
|
127
127
|
ref="stepDownButton"
|
|
128
|
+
type="button"
|
|
128
129
|
class="stepper-button dec"
|
|
129
130
|
:aria-disabled="stepButtonDownDisabled ? 'true' : 'false'"
|
|
130
131
|
:disabled="stepButtonDownDisabled"
|
|
@@ -136,6 +137,7 @@ onMounted(() => {
|
|
|
136
137
|
|
|
137
138
|
<button
|
|
138
139
|
ref="stepUpButton"
|
|
140
|
+
type="button"
|
|
139
141
|
class="stepper-button inc"
|
|
140
142
|
:aria-disabled="stepButtonUpDisabled ? 'true' : 'false'"
|
|
141
143
|
:disabled="stepButtonUpDisabled"
|
|
@@ -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" />
|
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
|
-
@include c.portal-content-container;
|
|
34
|
-
|
|
35
|
-
padding-top: var(--e-space-10);
|
|
36
|
-
padding-bottom: var(--e-space-10);
|
|
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>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
@use '../../base/abstracts' as a;
|
|
2
|
+
@use '../../layout/container/container' as c;
|
|
3
|
+
|
|
4
|
+
.portal-main {
|
|
5
|
+
--panel-width: 300px;
|
|
6
|
+
--panel-height-mobile: 180px;
|
|
7
|
+
|
|
8
|
+
width: 100%;
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-rows: 1fr;
|
|
11
|
+
grid-template-columns: 0 minmax(0, 1fr);
|
|
12
|
+
grid-template-areas: 'panel main';
|
|
13
|
+
transition: grid a.$trs-default;
|
|
14
|
+
|
|
15
|
+
&.show-panel {
|
|
16
|
+
grid-template-columns: var(--panel-width) minmax(0, 1fr);
|
|
17
|
+
|
|
18
|
+
.portal-main__panel {
|
|
19
|
+
transform: none;
|
|
20
|
+
opacity: 1;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@include a.bp(lg) {
|
|
25
|
+
grid-template-areas: none;
|
|
26
|
+
grid-template-columns: minmax(0, 1fr);
|
|
27
|
+
grid-template-rows: 0 auto;
|
|
28
|
+
height: 100%;
|
|
29
|
+
|
|
30
|
+
&.show-panel {
|
|
31
|
+
grid-template-columns: minmax(0, 1fr);
|
|
32
|
+
grid-template-rows: var(--panel-height-mobile) auto;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.portal-main__main {
|
|
38
|
+
grid-area: main;
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
|
|
42
|
+
@include a.bp(lg) {
|
|
43
|
+
grid-area: auto;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.portal-main__panel {
|
|
48
|
+
grid-area: panel;
|
|
49
|
+
position: sticky;
|
|
50
|
+
top: 0;
|
|
51
|
+
min-width: 0;
|
|
52
|
+
height: 100vh;
|
|
53
|
+
width: var(--panel-width);
|
|
54
|
+
opacity: 0;
|
|
55
|
+
transform: translateX(-100%);
|
|
56
|
+
overflow: hidden;
|
|
57
|
+
transition:
|
|
58
|
+
transform a.$trs-default,
|
|
59
|
+
opacity a.$trs-default;
|
|
60
|
+
|
|
61
|
+
@include a.bp(lg) {
|
|
62
|
+
grid-area: auto;
|
|
63
|
+
position: static;
|
|
64
|
+
width: 100%;
|
|
65
|
+
height: var(--panel-height-mobile);
|
|
66
|
+
transform: translateY(-100%);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.portal-main__sub-navigation {
|
|
71
|
+
position: sticky;
|
|
72
|
+
top: 0;
|
|
73
|
+
z-index: 10;
|
|
74
|
+
background-color: var(--e-c-mono-00);
|
|
75
|
+
|
|
76
|
+
@include a.bp(lg) {
|
|
77
|
+
background-color: var(--e-c-mono-50);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.portal-main__content {
|
|
82
|
+
padding-top: var(--e-space-10);
|
|
83
|
+
padding-bottom: var(--e-space-10);
|
|
84
|
+
|
|
85
|
+
@include c.portal-content-container;
|
|
86
|
+
|
|
87
|
+
@include a.bp(lg) {
|
|
88
|
+
padding-top: var(--e-space-8);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@include a.bp(m) {
|
|
92
|
+
padding-top: var(--e-space-6);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.portal-main__footer {
|
|
97
|
+
margin-top: auto;
|
|
98
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { inject } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
showPanel?: boolean
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
defineProps<Props>()
|
|
9
|
+
|
|
10
|
+
const portalFooterSlot = inject('portal-footer-slot')
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div :class="['portal-main', { 'show-panel': showPanel }]">
|
|
15
|
+
<div class="portal-main__panel">
|
|
16
|
+
<slot name="panel"></slot>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="portal-main__main">
|
|
20
|
+
<div class="portal-main__sub-navigation">
|
|
21
|
+
<slot name="subNavigation"></slot>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class="portal-main__content">
|
|
25
|
+
<slot></slot>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div v-if="portalFooterSlot || $slots.footer" class="portal-main__footer">
|
|
29
|
+
<slot name="footer">
|
|
30
|
+
<component :is="vnode" v-for="(vnode, idx) in portalFooterSlot()" :key="idx" />
|
|
31
|
+
</slot>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<style scoped lang="scss" src="./portal-main.scss"></style>
|
|
@@ -15,8 +15,14 @@ interface Props {
|
|
|
15
15
|
mobileDialogStyle?: 'modal' | 'slideout'
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
const {
|
|
19
|
-
|
|
18
|
+
const {
|
|
19
|
+
title = '',
|
|
20
|
+
text = '',
|
|
21
|
+
headerImage = undefined,
|
|
22
|
+
contentImage = undefined,
|
|
23
|
+
mobileDialogStyle = 'modal',
|
|
24
|
+
closeBtnLabel = getTranslation('close'),
|
|
25
|
+
} = defineProps<Props>()
|
|
20
26
|
|
|
21
27
|
const visible = defineModel<boolean>('visible')
|
|
22
28
|
const dialogEl = useTemplateRef('dialog')
|