@energie360/ui-library 0.1.0 → 0.1.2
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/base/_input-resets.scss +9 -3
- package/base/_resets.scss +5 -0
- package/base/abstracts/_mixins.scss +11 -5
- package/base/main-base.scss +1 -0
- package/components/accordion-item/accordion-item.scss +62 -0
- package/components/accordion-item/u-accordion-item.vue +44 -0
- package/components/card/card.scss +58 -0
- package/components/card/u-card.vue +26 -0
- package/components/card-header/card-header.scss +102 -0
- package/components/card-header/u-card-header.vue +51 -0
- package/components/card-hint/card-hint.scss +13 -0
- package/components/card-hint/u-card-hint.vue +23 -0
- package/components/card-price/card-price.scss +110 -0
- package/components/card-price/u-card-price.vue +47 -0
- package/components/card-table/card-table.scss +76 -0
- package/components/card-table/u-card-table.vue +77 -0
- package/components/card-toggle-switches/card-toggle-switches.scss +13 -0
- package/components/card-toggle-switches/u-card-toggle-switches.vue +30 -0
- package/components/collapsible/collapsible.scss +14 -0
- package/components/collapsible/u-collapsible.vue +81 -0
- package/components/collapsible-group/u-collapsible-group.vue +14 -0
- package/components/icon-teaser/icon-teaser.scss +58 -0
- package/components/icon-teaser/u-icon-teaser.vue +35 -0
- package/components/icon-teaser-group/icon-teaser-group.scss +10 -0
- package/components/icon-teaser-group/u-icon-teaser-group.vue +19 -0
- package/components/icon-text-block/{icon-text-block.vue → u-icon-text-block.vue} +11 -12
- package/components/index.js +14 -0
- package/components/language-nav/language-nav.scss +32 -0
- package/components/language-nav/u-language-nav.vue +27 -0
- package/components/panel/panel.scss +107 -0
- package/components/panel/u-panel.vue +48 -0
- package/components/progress-bar/progress-bar.scss +37 -0
- package/components/progress-bar/u-progress-bar.vue +21 -0
- package/components/richtext/richtext.scss +208 -0
- package/components/richtext/u-richtext.vue +21 -0
- package/components/table/cell-ctas.scss +12 -0
- package/components/table/cell-icon-group.scss +12 -0
- package/components/table/cell-icon-text.scss +22 -0
- package/components/table/cell-progress-bar.scss +23 -0
- package/components/table/table-cell.mixins.scss +60 -0
- package/components/table/table-cell.scss +24 -0
- package/components/table/table-header.scss +5 -0
- package/components/table/table-heading.scss +8 -0
- package/components/table/table-row.scss +20 -0
- package/components/table/table.scss +12 -0
- package/components/table/table.type.ts +31 -0
- package/components/table/u-cell-ctas.vue +28 -0
- package/components/table/u-cell-icon-group.vue +31 -0
- package/components/table/u-cell-icon-text.vue +23 -0
- package/components/table/u-cell-progress-bar.vue +22 -0
- package/components/table/u-table-cell.vue +37 -0
- package/components/table/u-table-header.vue +9 -0
- package/components/table/u-table-heading.vue +21 -0
- package/components/table/u-table-row.vue +17 -0
- package/components/table/u-table.vue +11 -0
- package/components/tooltip/dom.js +167 -0
- package/components/tooltip/popover.ts +208 -0
- package/components/tooltip/tooltip.scss +75 -0
- package/components/tooltip/u-tooltip.vue +72 -0
- package/components/tooltip/viewport.js +21 -0
- package/custom-elements.js +1 -0
- package/dist/base-style.css +409 -2
- package/dist/base-style.css.map +1 -0
- package/dist/elements/text-link.css +40 -0
- package/dist/elements/text-link.css.map +1 -0
- package/dist/layout/split.css +124 -0
- package/dist/layout/split.css.map +1 -0
- package/elements/button/_button-base.scss +1 -1
- package/elements/button/_button-filled-inverted.scss +3 -3
- package/elements/button/_button-filled.scss +3 -3
- package/elements/button/_button-outlined-inverted.scss +3 -3
- package/elements/button/_button-outlined.scss +3 -3
- package/elements/button/_button-plain.scss +3 -3
- package/elements/button/_button-secondary-outlined.scss +3 -3
- package/elements/button/button.js +2 -2
- package/elements/button/button.scss +1 -1
- package/elements/button/u-button.vue +41 -0
- package/elements/button-chip/button-chip.scss +83 -0
- package/elements/button-chip/u-button-chip.vue +45 -0
- package/elements/elements.js +35 -0
- package/elements/form-field/form-field-base.scss +141 -0
- package/elements/form-field/form-field-error.scss +20 -0
- package/elements/form-field/form-field-prefix-suffix.scss +80 -0
- package/elements/form-field/form-field-states.scss +59 -0
- package/elements/form-field/form-field.types.ts +8 -0
- package/elements/form-field/index.scss +4 -0
- package/elements/icon/icon.js +2 -2
- package/elements/icon/{icon.vue → u-icon.vue} +12 -18
- package/elements/icon-button/icon-button.js +2 -2
- package/elements/icon-button/{icon-button.vue → u-icon-button.vue} +14 -15
- package/elements/image/image.scss +3 -0
- package/elements/image/u-image.vue +17 -0
- package/elements/index.js +6 -31
- package/elements/loader/loader.js +2 -2
- package/elements/loader/{loader.vue → u-loader.vue} +6 -7
- package/elements/numeric-stepper/numeric-stepper.scss +110 -0
- package/elements/numeric-stepper/u-numeric-stepper.vue +135 -0
- package/elements/select/select.scss +32 -0
- package/elements/select/u-select.vue +130 -0
- package/elements/select-chip/select-chip.scss +18 -0
- package/elements/select-chip/u-select-chip.vue +50 -0
- package/elements/select-chips/select-chips.scss +5 -0
- package/elements/select-chips/u-select-chips.vue +23 -0
- package/elements/spectro/spectro.scss +10 -0
- package/elements/spectro/u-spectro.vue +11 -0
- package/elements/text-field/text-field.scss +30 -0
- package/elements/text-field/text-field.types.ts +6 -0
- package/elements/text-field/u-text-field.vue +180 -0
- package/elements/text-link/text-link.scss +57 -0
- package/elements/toggle-switch/toggle-switch-small.scss +40 -0
- package/elements/toggle-switch/toggle-switch.scss +149 -0
- package/elements/toggle-switch/u-toggle-switch.vue +68 -0
- package/elements/types.ts +19 -0
- package/env.d.ts +1 -0
- package/globals.js +1 -2
- package/helpers/transition-height.vue +39 -0
- package/i18n/i18n.ts +40 -0
- package/layout/grid/grid.mixin.scss +4 -11
- package/layout/grid/grid.scss +6 -7
- package/layout/split/split.scss +96 -0
- package/modules/footer/footer.scss +161 -0
- package/modules/footer/u-footer.vue +59 -0
- package/package.json +33 -13
- package/tsconfig.app.json +12 -0
- package/tsconfig.json +11 -0
- package/tsconfig.node.json +19 -0
- package/utility/elements/text-link.scss +1 -0
- package/utility/layout/split.scss +1 -0
- package/utility/utility-text.js +1 -0
- package/utils/object/deep-get.js +1 -2
- package/utils/translations/translate.js +13 -0
- package/{vite.config.js → vite.config.ts} +2 -1
- package/watch.js +27 -0
- package/wizard/index.js +4 -0
- package/wizard/wizard-intro/{wizard-intro.vue → u-wizard-intro.vue} +12 -9
- package/wizard/wizard-intro/wizard-intro.scss +4 -0
- package/wizard/wizard-layout/{wizard-layout-block.vue → u-wizard-layout-block.vue} +7 -5
- package/wizard/wizard-layout/{wizard-layout-element.vue → u-wizard-layout-element.vue} +1 -1
- package/wizard/wizard-layout/{wizard-layout.vue → u-wizard-layout.vue} +1 -1
- package/wizard/wizard-layout/wizard-layout.scss +6 -6
- package/dist/base-style.js +0 -2
- package/dist/base-style.js.map +0 -1
- package/dist/index.css +0 -1
- package/dist/index.js +0 -5194
- package/dist/index.js.map +0 -1
- package/elements/button/button.vue +0 -42
- package/index.js +0 -1
- /package/components/icon-text-block-group/{icon-text-block-group.vue → u-icon-text-block-group.vue} +0 -0
package/layout/grid/grid.scss
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
2
|
@use '../../base/abstracts' as a;
|
|
3
3
|
@use 'grid.mixin' as *;
|
|
4
|
-
|
|
5
4
|
@use 'grid-row';
|
|
6
5
|
|
|
7
6
|
// These loops create column classes for the breakpoints 2xl, xl, lg, m and s.
|
|
@@ -14,7 +13,7 @@
|
|
|
14
13
|
@include grid-col($i);
|
|
15
14
|
}
|
|
16
15
|
|
|
17
|
-
@if
|
|
16
|
+
@if $i < a.$grid-columns {
|
|
18
17
|
.col-indent-#{$i} {
|
|
19
18
|
@include grid-col-indent($i);
|
|
20
19
|
}
|
|
@@ -28,7 +27,7 @@
|
|
|
28
27
|
@include grid-col($i);
|
|
29
28
|
}
|
|
30
29
|
|
|
31
|
-
@if
|
|
30
|
+
@if $i < a.$grid-columns {
|
|
32
31
|
.col-indent-2xl-#{$i} {
|
|
33
32
|
@include grid-col-indent($i);
|
|
34
33
|
}
|
|
@@ -48,7 +47,7 @@
|
|
|
48
47
|
@include grid-col($i);
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
@if
|
|
50
|
+
@if $i < a.$grid-columns {
|
|
52
51
|
.col-indent-xl-#{$i} {
|
|
53
52
|
@include grid-col-indent($i);
|
|
54
53
|
}
|
|
@@ -68,7 +67,7 @@
|
|
|
68
67
|
@include grid-col($i);
|
|
69
68
|
}
|
|
70
69
|
|
|
71
|
-
@if
|
|
70
|
+
@if $i < a.$grid-columns {
|
|
72
71
|
.col-indent-lg-#{$i} {
|
|
73
72
|
@include grid-col-indent($i);
|
|
74
73
|
}
|
|
@@ -88,7 +87,7 @@
|
|
|
88
87
|
@include grid-col($i);
|
|
89
88
|
}
|
|
90
89
|
|
|
91
|
-
@if
|
|
90
|
+
@if $i < a.$grid-columns {
|
|
92
91
|
.col-indent-m-#{$i} {
|
|
93
92
|
@include grid-col-indent($i);
|
|
94
93
|
}
|
|
@@ -108,7 +107,7 @@
|
|
|
108
107
|
@include grid-col($i);
|
|
109
108
|
}
|
|
110
109
|
|
|
111
|
-
@if
|
|
110
|
+
@if $i < a.$grid-columns {
|
|
112
111
|
.col-indent-s-#{$i} {
|
|
113
112
|
@include grid-col-indent($i);
|
|
114
113
|
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
@use '../../base/abstracts/' as a;
|
|
2
|
+
@use '../container/container.scss' as c;
|
|
3
|
+
|
|
4
|
+
$split-top-bar-height: 120px;
|
|
5
|
+
$split-top-bar-height-mobile: 72px;
|
|
6
|
+
|
|
7
|
+
.split {
|
|
8
|
+
position: relative;
|
|
9
|
+
padding-left: 50%;
|
|
10
|
+
|
|
11
|
+
@include a.bp(lg) {
|
|
12
|
+
display: grid;
|
|
13
|
+
padding-left: 0;
|
|
14
|
+
grid-template-columns: 1fr 1fr;
|
|
15
|
+
grid-template-rows: 1fr auto;
|
|
16
|
+
gap: 0;
|
|
17
|
+
grid-template-areas:
|
|
18
|
+
'fixed content'
|
|
19
|
+
'footer footer';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@include a.bp(m) {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.split__fixed {
|
|
29
|
+
position: fixed;
|
|
30
|
+
inset: 0 50% 0 0;
|
|
31
|
+
|
|
32
|
+
@include a.bp(lg) {
|
|
33
|
+
position: static;
|
|
34
|
+
grid-area: fixed;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@include a.bp(m) {
|
|
38
|
+
width: 100%;
|
|
39
|
+
aspect-ratio: 4/5;
|
|
40
|
+
order: 3;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.split__top-bar {
|
|
45
|
+
height: a.rem($split-top-bar-height);
|
|
46
|
+
|
|
47
|
+
@include a.bp(lg) {
|
|
48
|
+
grid-area: content;
|
|
49
|
+
height: a.rem($split-top-bar-height-mobile);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@include a.bp(m) {
|
|
53
|
+
order: 1;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.split__content {
|
|
58
|
+
padding-top: var(--e-space-20);
|
|
59
|
+
padding-bottom: var(--e-space-20);
|
|
60
|
+
margin: 0 auto;
|
|
61
|
+
width: a.rem(400);
|
|
62
|
+
|
|
63
|
+
@include a.bp(lg) {
|
|
64
|
+
margin-top: a.rem(
|
|
65
|
+
$split-top-bar-height-mobile
|
|
66
|
+
); // Because multiple divs in same area do overlap.
|
|
67
|
+
|
|
68
|
+
grid-area: content;
|
|
69
|
+
width: a.rem(338);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@include a.bp(m) {
|
|
73
|
+
order: 2;
|
|
74
|
+
width: auto;
|
|
75
|
+
margin-top: 0;
|
|
76
|
+
max-width: calc(#{a.rem(338)} + 2 * #{a.rem(a.$container-edge-m)});
|
|
77
|
+
padding-left: a.rem(a.$container-edge-m);
|
|
78
|
+
padding-right: a.rem(a.$container-edge-m);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@include a.bp(s) {
|
|
82
|
+
max-width: calc(#{a.rem(338)} + 2 * #{a.rem(a.$container-edge-s)});
|
|
83
|
+
padding-left: a.rem(a.$container-edge-s);
|
|
84
|
+
padding-right: a.rem(a.$container-edge-s);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.split__footer {
|
|
89
|
+
@include a.bp(lg) {
|
|
90
|
+
grid-area: footer;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@include a.bp(m) {
|
|
94
|
+
order: 4;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
@use '../../base/abstracts/' as a;
|
|
2
|
+
@use '../../elements/text-link/text-link.scss' as t;
|
|
3
|
+
@use '../../layout/container/container.scss' as l;
|
|
4
|
+
|
|
5
|
+
.footer {
|
|
6
|
+
&.reduced {
|
|
7
|
+
.footer__top {
|
|
8
|
+
display: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.footer__bottom-col {
|
|
12
|
+
display: flex;
|
|
13
|
+
column-gap: var(--e-space-4);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.footer__copyright {
|
|
17
|
+
order: 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.footer__meta-navigation {
|
|
21
|
+
order: 2;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.footer__language-nav {
|
|
25
|
+
position: static;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.footer__top {
|
|
31
|
+
padding-top: var(--e-space-10);
|
|
32
|
+
padding-bottom: var(--e-space-16);
|
|
33
|
+
background-color: var(--e-c-mono-50);
|
|
34
|
+
|
|
35
|
+
@include a.bp(lg) {
|
|
36
|
+
padding-top: var(--e-space-8);
|
|
37
|
+
padding-bottom: var(--e-space-10);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.footer__top-row {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-wrap: wrap;
|
|
44
|
+
grid-gap: var(--e-space-12);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.footer__top-column {
|
|
48
|
+
white-space: nowrap;
|
|
49
|
+
|
|
50
|
+
&:nth-child(3) {
|
|
51
|
+
margin-right: auto;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.service {
|
|
55
|
+
white-space: wrap;
|
|
56
|
+
|
|
57
|
+
@include a.bp(lg) {
|
|
58
|
+
a {
|
|
59
|
+
display: block;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@include a.type(200);
|
|
65
|
+
|
|
66
|
+
a {
|
|
67
|
+
@include t.text-link--secondary;
|
|
68
|
+
|
|
69
|
+
font-weight: var(--e-type-weight-strong);
|
|
70
|
+
-webkit-font-smoothing: antialiased; // This is an exception. Usually we only use this for large heading text.
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@include a.bp(m) {
|
|
74
|
+
flex: 1 0 100%;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.footer__top-right-column {
|
|
79
|
+
@include a.bp(xl) {
|
|
80
|
+
flex: 1 0 100%;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.footer__social-links {
|
|
85
|
+
display: flex;
|
|
86
|
+
grid-gap: var(--e-space-6);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.footer__bottom {
|
|
90
|
+
background-color: var(--e-c-mono-100);
|
|
91
|
+
padding-top: var(--e-space-8);
|
|
92
|
+
padding-bottom: var(--e-space-6);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.footer__bottom-row {
|
|
96
|
+
position: relative;
|
|
97
|
+
display: flex;
|
|
98
|
+
justify-content: space-between;
|
|
99
|
+
|
|
100
|
+
@include a.bp(m) {
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.footer__language-nav {
|
|
106
|
+
position: absolute;
|
|
107
|
+
top: 0;
|
|
108
|
+
right: 0;
|
|
109
|
+
|
|
110
|
+
@include a.bp(lg) {
|
|
111
|
+
top: auto;
|
|
112
|
+
bottom: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@include a.bp(m) {
|
|
116
|
+
position: relative;
|
|
117
|
+
margin-bottom: calc(var(--e-space-8) + #{a.rem(18)});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.footer__meta-navigation {
|
|
122
|
+
@include a.type(100);
|
|
123
|
+
|
|
124
|
+
display: flex;
|
|
125
|
+
grid-gap: var(--e-space-6);
|
|
126
|
+
margin-bottom: var(--e-space-3);
|
|
127
|
+
|
|
128
|
+
a {
|
|
129
|
+
@include t.text-link--secondary;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@include a.bp(lg) {
|
|
133
|
+
@include a.type(50);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@include a.bp(m) {
|
|
137
|
+
flex-direction: column;
|
|
138
|
+
grid-gap: var(--e-space-4);
|
|
139
|
+
margin-bottom: var(--e-space-8);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.footer__copyright {
|
|
144
|
+
@include a.type(100);
|
|
145
|
+
|
|
146
|
+
color: var(--e-c-mono-700);
|
|
147
|
+
|
|
148
|
+
@include a.bp(lg) {
|
|
149
|
+
@include a.type(50);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@include a.bp(m) {
|
|
153
|
+
position: absolute;
|
|
154
|
+
left: 0;
|
|
155
|
+
bottom: 0;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.footer__container {
|
|
160
|
+
@include l.grid-container;
|
|
161
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
variant?: 'normal' | 'reduced'
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const { variant = 'normal' } = defineProps<Props>()
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div :class="['footer', variant]">
|
|
11
|
+
<div class="footer__top">
|
|
12
|
+
<div class="footer__container">
|
|
13
|
+
<div class="footer__top-row">
|
|
14
|
+
<div class="footer__top-column">
|
|
15
|
+
<slot name="address"></slot>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div class="footer__top-column">
|
|
19
|
+
<slot name="contact"></slot>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<div class="footer__top-column service">
|
|
23
|
+
<slot name="service"></slot>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class="footer__top-right-column">
|
|
27
|
+
<div class="footer__social-links">
|
|
28
|
+
<slot name="socialLinks"></slot>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div class="footer__bottom">
|
|
36
|
+
<div class="footer__container">
|
|
37
|
+
<div class="footer__bottom-row">
|
|
38
|
+
<div class="footer__bottom-col">
|
|
39
|
+
<div class="footer__meta-navigation">
|
|
40
|
+
<slot name="metaNav"></slot>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div class="footer__copyright">
|
|
44
|
+
<slot name="copyright"></slot>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div class="footer__language-nav">
|
|
49
|
+
<slot name="languageNav"></slot>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<style lang="scss">
|
|
58
|
+
@use './footer.scss';
|
|
59
|
+
</style>
|
package/package.json
CHANGED
|
@@ -1,32 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@energie360/ui-library",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "dist/index.js",
|
|
6
7
|
"exports": {
|
|
7
|
-
".": "./dist/
|
|
8
|
+
".": "./dist/custom-elements.js",
|
|
9
|
+
"./package.json": "./package.json",
|
|
8
10
|
"./base-style.css": "./dist/base-style.css",
|
|
11
|
+
"./elements": "./elements/index.js",
|
|
9
12
|
"./elements/*": "./elements/*",
|
|
13
|
+
"./components": "./components/index.js",
|
|
10
14
|
"./components/*": "./components/*",
|
|
11
|
-
"./
|
|
15
|
+
"./modules": "./modules/index.js",
|
|
16
|
+
"./modules/*": "./modules/*",
|
|
17
|
+
"./wizard": "./wizard/index.js",
|
|
18
|
+
"./wizard/*": "./wizard/*",
|
|
19
|
+
"./utility/elements/*": "./dist/elements/*",
|
|
20
|
+
"./utility/layout/*": "./dist/layout/*"
|
|
12
21
|
},
|
|
13
22
|
"keywords": [],
|
|
14
23
|
"author": "",
|
|
15
24
|
"license": "MIT",
|
|
16
25
|
"devDependencies": {
|
|
17
|
-
"@
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
26
|
+
"@tsconfig/node22": "^22.0.0",
|
|
27
|
+
"@types/node": "^22.13.10",
|
|
28
|
+
"@vitejs/plugin-vue": "^5.2.3",
|
|
29
|
+
"@vue/tsconfig": "^0.7.0",
|
|
30
|
+
"autoprefixer": "^10.4.21",
|
|
31
|
+
"chokidar": "^4.0.3",
|
|
32
|
+
"postcss": "^8.5.3",
|
|
33
|
+
"sass": "^1.86.0",
|
|
34
|
+
"typescript": "^5.8.2",
|
|
35
|
+
"vite": "^6.2.2",
|
|
36
|
+
"vue": "^3.5.13",
|
|
37
|
+
"vue-tsc": "^2.2.8"
|
|
23
38
|
},
|
|
24
39
|
"dependencies": {
|
|
25
|
-
"@energie360/design-tokens": "^1.
|
|
40
|
+
"@energie360/design-tokens": "^1.3.0"
|
|
26
41
|
},
|
|
27
42
|
"scripts": {
|
|
28
|
-
"dev": "NODE_ENV=development vite build --watch --mode
|
|
29
|
-
"
|
|
30
|
-
"
|
|
43
|
+
"dev:vite": "NODE_ENV=development vite build --watch --mode development",
|
|
44
|
+
"watch": "node ./watch.js",
|
|
45
|
+
"dev": "npm run build; npm run watch",
|
|
46
|
+
"build:utilities": "sass --load-path=node_modules utility:dist",
|
|
47
|
+
"build:base": "sass --load-path=node_modules base/main-base.scss:dist/base-style.css",
|
|
48
|
+
"build": "npm run build:utilities && npm run build:base",
|
|
49
|
+
"prepublish": "npm run build",
|
|
50
|
+
"type-check": "vue-tsc --build"
|
|
31
51
|
}
|
|
32
52
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
|
3
|
+
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
|
4
|
+
"exclude": ["src/**/__tests__/*"],
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
7
|
+
|
|
8
|
+
"paths": {
|
|
9
|
+
"@/*": ["./src/*"]
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@tsconfig/node22/tsconfig.json",
|
|
3
|
+
"include": [
|
|
4
|
+
"vite.config.*",
|
|
5
|
+
"vitest.config.*",
|
|
6
|
+
"cypress.config.*",
|
|
7
|
+
"nightwatch.conf.*",
|
|
8
|
+
"playwright.config.*",
|
|
9
|
+
"eslint.config.*"
|
|
10
|
+
],
|
|
11
|
+
"compilerOptions": {
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
14
|
+
|
|
15
|
+
"module": "ESNext",
|
|
16
|
+
"moduleResolution": "Bundler",
|
|
17
|
+
"types": ["node"]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use '../../elements/text-link/text-link';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use '../../layout/split/split';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../elements/text-link/text-link.scss'
|
package/utils/object/deep-get.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { deepGetByPath } from '../object/deep-get.js'
|
|
2
|
+
import translations from '../../i18n/i18n.ts'
|
|
3
|
+
|
|
4
|
+
const DEFAULT_LANGUAGE = 'DE'
|
|
2
5
|
|
|
3
6
|
/**
|
|
4
7
|
*
|
|
@@ -8,3 +11,13 @@ import { deepGetByPath } from '../object/deep-get.js'
|
|
|
8
11
|
*/
|
|
9
12
|
export const translate = (translationKeyPath, defaultValue = '') =>
|
|
10
13
|
deepGetByPath(window._EC.translations, translationKeyPath) || defaultValue
|
|
14
|
+
|
|
15
|
+
const getLanguage = () => {
|
|
16
|
+
const langAttr = document.documentElement.lang.split('-')[0].toUpperCase()
|
|
17
|
+
|
|
18
|
+
return langAttr === '' ? DEFAULT_LANGUAGE : langAttr
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const getTranslation = (key) => {
|
|
22
|
+
return translations[getLanguage()][key]
|
|
23
|
+
}
|
|
@@ -10,8 +10,9 @@ export default defineConfig({
|
|
|
10
10
|
sourcemap: true,
|
|
11
11
|
lib: {
|
|
12
12
|
entry: [
|
|
13
|
-
resolve(__dirname, '
|
|
13
|
+
resolve(__dirname, 'custom-elements.js'),
|
|
14
14
|
resolve(__dirname, 'base-style.js'),
|
|
15
|
+
resolve(__dirname, 'utility/utility-text.js'),
|
|
15
16
|
],
|
|
16
17
|
name: '@energie360/ui-library',
|
|
17
18
|
formats: ['es'],
|
package/watch.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import chokidar from 'chokidar'
|
|
2
|
+
import { execSync } from 'child_process'
|
|
3
|
+
import { glob } from 'node:fs/promises'
|
|
4
|
+
|
|
5
|
+
const watchOptions = {
|
|
6
|
+
persistent: true,
|
|
7
|
+
ignoreInitial: true,
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const handlerError = (e) => {
|
|
11
|
+
console.error(e)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const watcherScss = chokidar.watch(await Array.fromAsync(glob('**/*.scss')), watchOptions)
|
|
15
|
+
const reloadScss = () => {
|
|
16
|
+
try {
|
|
17
|
+
execSync('npm run build -s', { stdio: 'inherit' })
|
|
18
|
+
console.log('--> reload CSS')
|
|
19
|
+
// reloadJs()
|
|
20
|
+
} catch (err) {
|
|
21
|
+
console.error(err)
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
watcherScss.on('add', reloadScss)
|
|
26
|
+
watcherScss.on('change', reloadScss)
|
|
27
|
+
watcherScss.on('error', handlerError)
|
package/wizard/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as UWizardIntro } from './wizard-intro/u-wizard-intro.vue'
|
|
2
|
+
export { default as UWizardLayout } from './wizard-layout/u-wizard-layout.vue'
|
|
3
|
+
export { default as UWizardLayoutBlock } from './wizard-layout/u-wizard-layout-block.vue'
|
|
4
|
+
export { default as UWizardLayoutElement } from './wizard-layout/u-wizard-layout-element.vue'
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
|
|
3
|
-
title
|
|
4
|
-
description
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
title?: string
|
|
4
|
+
description?: string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
defineProps<Props>()
|
|
7
8
|
</script>
|
|
8
9
|
|
|
9
10
|
<template>
|
|
@@ -11,12 +12,14 @@ defineProps({
|
|
|
11
12
|
<div class="left-col">
|
|
12
13
|
<div>
|
|
13
14
|
<div class="title-slot">
|
|
14
|
-
<slot name="title"
|
|
15
|
+
<slot name="title"
|
|
16
|
+
><h1>{{ title }}</h1></slot
|
|
17
|
+
>
|
|
15
18
|
</div>
|
|
16
19
|
|
|
17
20
|
<div class="description-slot">
|
|
18
21
|
<slot name="description">
|
|
19
|
-
<p v-html="description"/>
|
|
22
|
+
<p v-html="description" />
|
|
20
23
|
</slot>
|
|
21
24
|
</div>
|
|
22
25
|
|
|
@@ -27,7 +30,7 @@ defineProps({
|
|
|
27
30
|
</div>
|
|
28
31
|
|
|
29
32
|
<div class="right-col">
|
|
30
|
-
<slot name="
|
|
33
|
+
<slot name="contentRight"></slot>
|
|
31
34
|
</div>
|
|
32
35
|
</div>
|
|
33
36
|
</template>
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
|
|
3
|
-
columns:
|
|
4
|
-
}
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
columns: string | number
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
defineProps<Props>()
|
|
5
7
|
</script>
|
|
6
8
|
|
|
7
9
|
<template>
|
|
8
10
|
<div class="wizard-layout-block">
|
|
9
11
|
<div class="row row--centered">
|
|
10
12
|
<div :class="[`col-${columns}`]">
|
|
11
|
-
<slot
|
|
13
|
+
<slot />
|
|
12
14
|
</div>
|
|
13
15
|
</div>
|
|
14
16
|
</div>
|