@energie360/ui-library 0.0.4 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/base/_resets.scss +2 -0
  2. package/base/abstracts/_mixins.scss +11 -5
  3. package/base/main-base.scss +1 -0
  4. package/components/icon-text-block/icon-text-block.scss +55 -0
  5. package/components/icon-text-block/u-icon-text-block.vue +32 -0
  6. package/components/icon-text-block-group/icon-text-block-group.scss +5 -0
  7. package/components/icon-text-block-group/u-icon-text-block-group.vue +9 -0
  8. package/components/index.js +14 -0
  9. package/components/panel/panel.scss +70 -0
  10. package/components/panel/u-panel.vue +37 -0
  11. package/components/progress-bar/progress-bar.scss +37 -0
  12. package/components/progress-bar/u-progress-bar.vue +21 -0
  13. package/components/table/cell-ctas.scss +12 -0
  14. package/components/table/cell-icon-group.scss +12 -0
  15. package/components/table/cell-icon-text.scss +22 -0
  16. package/components/table/cell-progress-bar.scss +23 -0
  17. package/components/table/table-cell.mixins.scss +60 -0
  18. package/components/table/table-cell.scss +24 -0
  19. package/components/table/table-header.scss +5 -0
  20. package/components/table/table-heading.scss +8 -0
  21. package/components/table/table-row.scss +20 -0
  22. package/components/table/table.scss +12 -0
  23. package/components/table/table.type.ts +31 -0
  24. package/components/table/u-cell-ctas.vue +33 -0
  25. package/components/table/u-cell-icon-group.vue +31 -0
  26. package/components/table/u-cell-icon-text.vue +23 -0
  27. package/components/table/u-cell-progress-bar.vue +22 -0
  28. package/components/table/u-table-cell.vue +47 -0
  29. package/components/table/u-table-header.vue +9 -0
  30. package/components/table/u-table-heading.vue +24 -0
  31. package/components/table/u-table-row.vue +17 -0
  32. package/components/table/u-table.vue +11 -0
  33. package/components/tooltip/dom.js +167 -0
  34. package/components/tooltip/popover.js +200 -0
  35. package/components/tooltip/tooltip.scss +75 -0
  36. package/components/tooltip/u-tooltip.vue +92 -0
  37. package/components/tooltip/viewport.js +21 -0
  38. package/custom-elements.js +1 -0
  39. package/dist/base-style.css +1 -1
  40. package/dist/custom-elements.css +1 -0
  41. package/dist/{index.js → custom-elements.js} +1591 -1600
  42. package/dist/custom-elements.js.map +1 -0
  43. package/elements/button/_button-base.scss +1 -1
  44. package/elements/button/_button-filled-inverted.scss +3 -3
  45. package/elements/button/_button-filled.scss +3 -3
  46. package/elements/button/_button-outlined-inverted.scss +3 -3
  47. package/elements/button/_button-outlined.scss +3 -3
  48. package/elements/button/_button-plain.scss +3 -3
  49. package/elements/button/_button-secondary-outlined.scss +3 -3
  50. package/elements/button/button.js +2 -2
  51. package/elements/button/button.scss +1 -1
  52. package/elements/button/u-button.vue +44 -0
  53. package/elements/elements.js +35 -0
  54. package/elements/form-field/form-field-base.scss +142 -0
  55. package/elements/form-field/form-field-error.scss +20 -0
  56. package/elements/form-field/form-field-prefix-suffix.scss +80 -0
  57. package/elements/form-field/form-field-states.scss +59 -0
  58. package/elements/form-field/index.scss +4 -0
  59. package/elements/icon/icon.js +2 -2
  60. package/elements/icon/{icon.vue → u-icon.vue} +11 -15
  61. package/elements/icon-button/icon-button.js +2 -2
  62. package/elements/icon-button/{icon-button.vue → u-icon-button.vue} +14 -15
  63. package/elements/image/image.scss +3 -0
  64. package/elements/image/u-image.vue +17 -0
  65. package/elements/index.js +6 -31
  66. package/elements/loader/loader.js +2 -2
  67. package/elements/loader/{loader.vue → u-loader.vue} +6 -7
  68. package/elements/spectro/spectro.scss +13 -0
  69. package/elements/spectro/u-spectro.vue +11 -0
  70. package/elements/text-field/text-field.scss +30 -0
  71. package/elements/text-field/text-field.types.ts +6 -0
  72. package/elements/text-field/u-text-field.vue +164 -0
  73. package/elements/types.ts +12 -0
  74. package/env.d.ts +1 -0
  75. package/layout/container/container.scss +30 -0
  76. package/layout/grid/grid-row.scss +10 -0
  77. package/layout/grid/grid.mixin.scss +90 -0
  78. package/layout/grid/grid.scss +121 -0
  79. package/package.json +20 -8
  80. package/tsconfig.app.json +12 -0
  81. package/tsconfig.json +11 -0
  82. package/tsconfig.node.json +19 -0
  83. package/{vite.config.js → vite.config.ts} +1 -1
  84. package/wizard/index.js +4 -0
  85. package/wizard/wizard-intro/u-wizard-intro.vue +40 -0
  86. package/wizard/wizard-intro/wizard-intro.scss +39 -0
  87. package/wizard/wizard-layout/u-wizard-layout-block.vue +21 -0
  88. package/wizard/wizard-layout/u-wizard-layout-element.vue +9 -0
  89. package/wizard/wizard-layout/u-wizard-layout.vue +11 -0
  90. package/wizard/wizard-layout/wizard-layout-block.scss +45 -0
  91. package/wizard/wizard-layout/wizard-layout-element.scss +3 -0
  92. package/wizard/wizard-layout/wizard-layout.scss +40 -0
  93. package/dist/index.css +0 -1
  94. package/dist/index.js.map +0 -1
  95. package/elements/button/button.vue +0 -42
  96. package/index.js +0 -1
package/elements/index.js CHANGED
@@ -1,33 +1,8 @@
1
- import { ButtonElement as Button } from './button/button.js'
2
- import { IconButtonElement as IconButton } from './icon-button/icon-button.js'
3
- import { IconElement as Icon } from './icon/icon.js'
4
- import { LoaderElement as Loader } from './loader/loader.js'
5
-
6
1
  /**
7
- * These exports allow best tree-shaking behaviour.
8
- * Obviously you'll have to import 'manually' all the elements you need.
9
- *
10
- * @example
11
- * import { IconButton } from '@energie360/ui-library'
12
- * IconButton.register()
2
+ * It's not recommended to import components from this file, because tree-shaking won't work then.
3
+ * -> https://vite.dev/guide/performance#avoid-barrel-files
13
4
  */
14
- export { Button, IconButton, Icon, Loader }
15
-
16
- /**
17
- * With this export you get all the elements. Meaning all the elements will be inlcuded in your bundle, even if you register only one element.
18
- *
19
- * @example
20
- * import { Elements } from '@energie360/ui-library'
21
- * Elements.Button.register()
22
- */
23
-
24
- /**
25
- *
26
- * @type {{IconButton: {register: function(): void}, Button: {register: function(): void}, Loader: {register: function(): void}, Icon: {register: function(): void}}}
27
- */
28
- export const Elements = {
29
- Button,
30
- IconButton,
31
- Icon,
32
- Loader,
33
- }
5
+ export { default as UButton } from './button/u-button.vue'
6
+ export { default as UIcon } from './icon/u-icon.vue'
7
+ export { default as UIconButton } from './icon-button/u-icon-button.vue'
8
+ export { default as ULoader } from './loader/u-loader.vue'
@@ -1,5 +1,5 @@
1
1
  import { defineCustomElement } from 'vue'
2
- import Loader from './loader.vue'
2
+ import Loader from './u-loader.vue'
3
3
  import customElementBaseStyle from '../../base/custom-element-base.scss?inline'
4
4
  import ceStyles from './loader.ce.scss?inline'
5
5
  import styles from './loader.scss?inline'
@@ -8,6 +8,6 @@ Loader.styles = [customElementBaseStyle, ceStyles, styles]
8
8
 
9
9
  export const LoaderElement = {
10
10
  register: () => {
11
- customElements.define('e-loader', defineCustomElement(Loader))
11
+ customElements.define('u-loader', defineCustomElement(Loader))
12
12
  },
13
13
  }
@@ -1,10 +1,9 @@
1
- <script setup>
2
- defineProps({
3
- anim: {
4
- type: String,
5
- default: 'horizontal',
6
- },
7
- })
1
+ <script setup lang="ts">
2
+ interface Props {
3
+ anim?: string
4
+ }
5
+
6
+ const { anim = 'horizontal' } = defineProps<Props>()
8
7
  </script>
9
8
 
10
9
  <template>
@@ -0,0 +1,13 @@
1
+ .spectro {
2
+ position: relative;
3
+ aspect-ratio: 1;
4
+ overflow: hidden;
5
+ }
6
+
7
+ .inner {
8
+ position: absolute;
9
+ top: 0;
10
+ right: 0;
11
+ bottom: 0;
12
+ left: 0;
13
+ }
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <div class="spectro">
3
+ <div class="inner">
4
+ <img src="/static/ui-assets/images/spectro.svg" alt="" aria-hidden="true" />
5
+ </div>
6
+ </div>
7
+ </template>
8
+
9
+ <style scoped lang="scss">
10
+ @use './spectro.scss';
11
+ </style>
@@ -0,0 +1,30 @@
1
+ @use '../../base/abstracts' as a;
2
+ @use '../form-field' as f;
3
+
4
+ .text-field {
5
+ @include f.form-field-base(input);
6
+ @include f.form-field-states-all(input);
7
+ @include f.form-field-error;
8
+ @include f.form-field-suffix-icon;
9
+ @include f.form-field-prefix-icon;
10
+
11
+ .visually-hidden {
12
+ @include a.visually-hidden;
13
+ }
14
+
15
+ // Type: Password
16
+ .password-toggle {
17
+ display: block;
18
+ border-radius: var(--e-brd-radius-1);
19
+ color: var(--e-c-primary-01-500);
20
+ cursor: pointer;
21
+
22
+ &:hover {
23
+ color: var(--e-c-secondary-01-900);
24
+ }
25
+
26
+ &:active {
27
+ color: var(--e-c-secondary-01-700);
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,6 @@
1
+ export enum TextFieldTypes {
2
+ text = 'text',
3
+ number = 'number',
4
+ email = 'email',
5
+ password = 'password',
6
+ }
@@ -0,0 +1,164 @@
1
+ <script setup lang="ts">
2
+ import UIcon from '../icon/u-icon.vue'
3
+ import { TextFieldTypes } from './text-field.types'
4
+ import { computed, ref, useSlots, useTemplateRef, useId } from 'vue'
5
+ import { translate } from '../../utils/translations/translate'
6
+
7
+ interface Props {
8
+ label?: string
9
+ type: TextFieldTypes
10
+ required?: boolean
11
+ disabled?: boolean
12
+ readonly?: boolean
13
+ placeholder?: string
14
+ error?: boolean
15
+ unit?: string
16
+ helpText?: string
17
+ errorMessage?: string
18
+ }
19
+
20
+ let inputId = useId()
21
+
22
+ const {
23
+ disabled = false,
24
+ readonly = false,
25
+ required = false,
26
+ type = TextFieldTypes.text,
27
+ helpText = '',
28
+ errorMessage = '',
29
+ } = defineProps<Props>()
30
+
31
+ const slots = useSlots()
32
+
33
+ const input = useTemplateRef('input')
34
+
35
+ const isFocused = ref(false)
36
+ const isHovering = ref(false)
37
+ const hasValue = ref(false)
38
+ const forceFloatLabel = ref(false)
39
+
40
+ const spacer = '.&nbsp;'
41
+
42
+ // In some cases we need to change the input type within the component (for example for the password-show behaviour)
43
+ const _inputType = ref(type)
44
+
45
+ const onFocus = () => {
46
+ if (readonly || disabled) {
47
+ return
48
+ }
49
+
50
+ isFocused.value = true
51
+ }
52
+
53
+ const onBlur = () => {
54
+ isFocused.value = false
55
+ }
56
+
57
+ const onInput = () => {
58
+ hasValue.value = input.value.value !== ''
59
+ }
60
+
61
+ const onHover = () => {
62
+ if (readonly || disabled) {
63
+ return
64
+ }
65
+
66
+ isHovering.value = true
67
+ }
68
+
69
+ const onHoverOut = () => {
70
+ isHovering.value = false
71
+ }
72
+
73
+ const hasHelpText = computed(() => {
74
+ return !!helpText || !!slots.helpText || required
75
+ })
76
+
77
+ const needsHelpTextSpacer = computed(() => {
78
+ return !!helpText || !!slots.helpText
79
+ })
80
+
81
+ const onPasswordToggle = () => {
82
+ _inputType.value =
83
+ _inputType.value === TextFieldTypes.password
84
+ ? TextFieldTypes.text
85
+ : TextFieldTypes.password
86
+ }
87
+
88
+ const passwordIcon = computed(() => {
89
+ return _inputType.value === TextFieldTypes.password
90
+ ? 'password'
91
+ : 'password-show'
92
+ })
93
+ </script>
94
+
95
+ <template>
96
+ <div
97
+ :class="[
98
+ 'text-field',
99
+ {
100
+ required,
101
+ disabled,
102
+ readonly,
103
+ focus: isFocused,
104
+ hover: isHovering,
105
+ 'has-value': hasValue,
106
+ 'float-label': isFocused || hasValue || placeholder || forceFloatLabel,
107
+ 'has-error': error,
108
+ 'show-help-text': !required || hasHelpText,
109
+ },
110
+ ]"
111
+ @mouseenter="onHover"
112
+ @mouseleave="onHoverOut"
113
+ >
114
+ <div class="wrapper">
115
+ <div class="label">
116
+ <slot name="label"
117
+ ><label :for="inputId">{{ label }}</label></slot
118
+ >
119
+ </div>
120
+
121
+ <div class="control">
122
+ <slot
123
+ ><input
124
+ ref="input"
125
+ :id="inputId"
126
+ @input="onInput"
127
+ @focus="onFocus"
128
+ @blur="onBlur"
129
+ :type="_inputType"
130
+ :disabled
131
+ :readonly
132
+ :placeholder
133
+ :required
134
+ /></slot>
135
+
136
+ <div class="control-border"></div>
137
+ </div>
138
+
139
+ <!-- TYPE: PASSWORD -->
140
+ <span class="suffix-action" v-if="type === TextFieldTypes.password">
141
+ <button type="button" class="password-toggle" @click="onPasswordToggle">
142
+ <UIcon :name="passwordIcon"></UIcon>
143
+ </button>
144
+ </span>
145
+ </div>
146
+
147
+ <div class="help-text">
148
+ <span class="optional-text"
149
+ >{{ translate('common.optional')
150
+ }}<span v-if="needsHelpTextSpacer" v-html="spacer"></span></span
151
+ ><slot name="helpText">{{ helpText }}</slot>
152
+ </div>
153
+
154
+ <div class="error-messages-container">
155
+ <slot name="error-message"
156
+ ><span>{{ errorMessage }}</span></slot
157
+ >
158
+ </div>
159
+ </div>
160
+ </template>
161
+
162
+ <style scoped lang="scss">
163
+ @use './text-field.scss';
164
+ </style>
@@ -0,0 +1,12 @@
1
+ // TODO: @Dani if you have a better naming please update it.
2
+
3
+ export interface Cta {
4
+ label: string
5
+ href: string
6
+ target: string
7
+ }
8
+
9
+ export interface Image {
10
+ src: string
11
+ alt: string
12
+ }
package/env.d.ts ADDED
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,30 @@
1
+ @use '../../base/abstracts' as a;
2
+ @use '@energie360/design-tokens/dist/scss' as dt;
3
+
4
+ // TODO: Move this mixin to abstratcs?
5
+ @mixin grid-container {
6
+ margin: 0 auto;
7
+ max-width: a.rem(dt.$layout-site-width);
8
+ width: 100%;
9
+ padding-left: a.rem(a.$container-edge-2xl);
10
+ padding-right: a.rem(a.$container-edge-2xl);
11
+
12
+ @include a.bp(lg) {
13
+ padding-left: a.rem(a.$container-edge-lg);
14
+ padding-right: a.rem(a.$container-edge-lg);
15
+ }
16
+
17
+ @include a.bp(m) {
18
+ padding-left: a.rem(a.$container-edge-m);
19
+ padding-right: a.rem(a.$container-edge-m);
20
+ }
21
+
22
+ @include a.bp(s) {
23
+ padding-left: a.rem(a.$container-edge-s);
24
+ padding-right: a.rem(a.$container-edge-s);
25
+ }
26
+ }
27
+
28
+ .container {
29
+ @include grid-container;
30
+ }
@@ -0,0 +1,10 @@
1
+ @use 'sass:math';
2
+ @use './grid.mixin' as g;
3
+
4
+ .row {
5
+ @include g.grid-row;
6
+
7
+ &.row--centered {
8
+ justify-content: center;
9
+ }
10
+ }
@@ -0,0 +1,90 @@
1
+ @use 'sass:math';
2
+ @use '../../base/abstracts' as a;
3
+
4
+ /**
5
+ Helper to colculate col width in %.
6
+ Looks complicated because we use grid-gap on the row, which takes away from available width.
7
+ */
8
+ @function col-width($size, $columns, $gutter) {
9
+ @return math.div(100% - (($columns - 1) * $gutter), $columns) * $size +
10
+ (($size - 1) * $gutter);
11
+ }
12
+
13
+ @mixin grid-row() {
14
+ display: flex;
15
+ flex-wrap: wrap;
16
+ grid-gap: a.$grid-gutter-2xl;
17
+
18
+ @include a.bp(lg) {
19
+ grid-gap: a.$grid-gutter-lg;
20
+ }
21
+
22
+ @include a.bp(m) {
23
+ grid-gap: a.$grid-gutter-m;
24
+ }
25
+
26
+ @include a.bp(s) {
27
+ grid-gap: a.$grid-gutter-s;
28
+ }
29
+ }
30
+
31
+ /**
32
+ Mixin to create a grid column cell.
33
+
34
+ $cols: Column width of cell.
35
+ $columns: Grid size (in columns). Default is set by global variable $grid-columns (defined via design token).
36
+ */
37
+ @mixin grid-col($cols, $columns: a.$grid-columns) {
38
+ $width-2xl: col-width($cols, $columns, a.$grid-gutter-2xl);
39
+
40
+ flex: 0 0 $width-2xl;
41
+ max-width: $width-2xl;
42
+
43
+ @include a.bp(lg) {
44
+ $width-lg: col-width($cols, $columns, a.$grid-gutter-lg);
45
+
46
+ flex: 0 0 $width-lg;
47
+ max-width: $width-lg;
48
+ }
49
+
50
+ @include a.bp(m) {
51
+ $width-m: col-width($cols, $columns, a.$grid-gutter-m);
52
+
53
+ flex: 0 0 $width-m;
54
+ max-width: $width-m;
55
+ }
56
+
57
+ @include a.bp(s) {
58
+ $width-s: col-width($cols, $columns, a.$grid-gutter-s);
59
+
60
+ flex: 0 0 $width-s;
61
+ max-width: $width-s;
62
+ }
63
+ }
64
+
65
+ // TODO: Change args order -> $prop, $indent, $columns
66
+ @mixin grid-col-space(
67
+ $indent,
68
+ $columns: a.$grid-columns,
69
+ $prop: 'margin-left'
70
+ ) {
71
+ #{$prop}: col-width($indent, $columns, a.$grid-gutter-2xl) +
72
+ a.$grid-gutter-2xl;
73
+
74
+ @include a.bp(lg) {
75
+ #{$prop}: col-width($indent, $columns, a.$grid-gutter-lg) +
76
+ a.$grid-gutter-lg;
77
+ }
78
+
79
+ @include a.bp(m) {
80
+ #{$prop}: col-width($indent, $columns, a.$grid-gutter-m) + a.$grid-gutter-m;
81
+ }
82
+
83
+ @include a.bp(s) {
84
+ #{$prop}: col-width($indent, $columns, a.$grid-gutter-s) + a.$grid-gutter-s;
85
+ }
86
+ }
87
+
88
+ @mixin grid-col-indent($indent, $columns: a.$grid-columns) {
89
+ @include grid-col-space($indent, $columns);
90
+ }
@@ -0,0 +1,121 @@
1
+ @use 'sass:math';
2
+ @use '../../base/abstracts' as a;
3
+ @use 'grid.mixin' as *;
4
+ @use 'grid-row';
5
+
6
+ // These loops create column classes for the breakpoints 2xl, xl, lg, m and s.
7
+ // Obviously it will create classes that will probably never be used (CSS bloat).
8
+ // We could be using only the grid-col mixins.
9
+ // Or also define some commonly used responsive column configurations.
10
+ // We'll have to figure it out...
11
+ @for $i from 1 through a.$grid-columns {
12
+ .col-#{$i} {
13
+ @include grid-col($i);
14
+ }
15
+
16
+ @if $i < a.$grid-columns {
17
+ .col-indent-#{$i} {
18
+ @include grid-col-indent($i);
19
+ }
20
+ }
21
+ }
22
+
23
+ // For "2xl" breakpoint
24
+ @include a.bp('2xl') {
25
+ @for $i from 1 through a.$grid-columns {
26
+ .col-2xl-#{$i} {
27
+ @include grid-col($i);
28
+ }
29
+
30
+ @if $i < a.$grid-columns {
31
+ .col-indent-2xl-#{$i} {
32
+ @include grid-col-indent($i);
33
+ }
34
+ }
35
+
36
+ // To clear indent on breakpoint xl
37
+ .col-indent-2xl-0 {
38
+ margin-left: 0;
39
+ }
40
+ }
41
+ }
42
+
43
+ // For "xl" breakpoint
44
+ @include a.bp(xl) {
45
+ @for $i from 1 through a.$grid-columns {
46
+ .col-xl-#{$i} {
47
+ @include grid-col($i);
48
+ }
49
+
50
+ @if $i < a.$grid-columns {
51
+ .col-indent-xl-#{$i} {
52
+ @include grid-col-indent($i);
53
+ }
54
+ }
55
+
56
+ // To clear indent on breakpoint xl
57
+ .col-indent-xl-0 {
58
+ margin-left: 0;
59
+ }
60
+ }
61
+ }
62
+
63
+ // For "lg" breakpoint
64
+ @include a.bp(lg) {
65
+ @for $i from 1 through a.$grid-columns {
66
+ .col-lg-#{$i} {
67
+ @include grid-col($i);
68
+ }
69
+
70
+ @if $i < a.$grid-columns {
71
+ .col-indent-lg-#{$i} {
72
+ @include grid-col-indent($i);
73
+ }
74
+ }
75
+
76
+ // To clear indent on breakpoint lg
77
+ .col-indent-lg-0 {
78
+ margin-left: 0;
79
+ }
80
+ }
81
+ }
82
+
83
+ // For "m" breakpoint
84
+ @include a.bp(m) {
85
+ @for $i from 1 through a.$grid-columns {
86
+ .col-m-#{$i} {
87
+ @include grid-col($i);
88
+ }
89
+
90
+ @if $i < a.$grid-columns {
91
+ .col-indent-m-#{$i} {
92
+ @include grid-col-indent($i);
93
+ }
94
+ }
95
+
96
+ // To clear indent on breakpoint m
97
+ .col-indent-m-0 {
98
+ margin-left: 0;
99
+ }
100
+ }
101
+ }
102
+
103
+ // For "s" breakpoint
104
+ @include a.bp(s) {
105
+ @for $i from 1 through a.$grid-columns {
106
+ .col-s-#{$i} {
107
+ @include grid-col($i);
108
+ }
109
+
110
+ @if $i < a.$grid-columns {
111
+ .col-indent-s-#{$i} {
112
+ @include grid-col-indent($i);
113
+ }
114
+ }
115
+
116
+ // To clear indent on breakpoint s
117
+ .col-indent-s-0 {
118
+ margin-left: 0;
119
+ }
120
+ }
121
+ }
package/package.json CHANGED
@@ -1,23 +1,34 @@
1
1
  {
2
2
  "name": "@energie360/ui-library",
3
- "version": "0.0.4",
3
+ "version": "0.1.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
- ".": "./dist/index.js",
7
+ ".": "./dist/custom-elements.js",
8
+ "./package.json": "./package.json",
8
9
  "./base-style.css": "./dist/base-style.css",
9
- "./elements/*": "./elements/*"
10
+ "./elements": "./elements/index.js",
11
+ "./elements/*": "./elements/*",
12
+ "./components": "./components/index.js",
13
+ "./components/*": "./components/*",
14
+ "./wizard": "./wizard/index.js",
15
+ "./wizard/*": "./wizard/*"
10
16
  },
11
17
  "keywords": [],
12
18
  "author": "",
13
19
  "license": "MIT",
14
20
  "devDependencies": {
21
+ "@tsconfig/node22": "^22.0.0",
22
+ "@types/node": "^22.13.4",
15
23
  "@vitejs/plugin-vue": "^5.2.1",
24
+ "@vue/tsconfig": "^0.7.0",
16
25
  "autoprefixer": "^10.4.20",
17
- "postcss": "^8.5.1",
18
- "sass": "^1.83.4",
19
- "vite": "^6.0.7",
20
- "vue": "^3.5.13"
26
+ "postcss": "^8.5.2",
27
+ "sass": "^1.85.0",
28
+ "typescript": "^5.7.3",
29
+ "vite": "^6.1.0",
30
+ "vue": "^3.5.13",
31
+ "vue-tsc": "^2.2.2"
21
32
  },
22
33
  "dependencies": {
23
34
  "@energie360/design-tokens": "^1.1.0"
@@ -25,6 +36,7 @@
25
36
  "scripts": {
26
37
  "dev": "NODE_ENV=development vite build --watch --mode developement",
27
38
  "build": "vite build",
28
- "prepublish": "npm run build"
39
+ "prepublish": "npm run build",
40
+ "type-check": "vue-tsc --build"
29
41
  }
30
42
  }
@@ -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,11 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ {
5
+ "path": "./tsconfig.node.json"
6
+ },
7
+ {
8
+ "path": "./tsconfig.app.json"
9
+ }
10
+ ]
11
+ }
@@ -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
+ }
@@ -10,7 +10,7 @@ export default defineConfig({
10
10
  sourcemap: true,
11
11
  lib: {
12
12
  entry: [
13
- resolve(__dirname, 'index.js'),
13
+ resolve(__dirname, 'custom-elements.js'),
14
14
  resolve(__dirname, 'base-style.js'),
15
15
  ],
16
16
  name: '@energie360/ui-library',
@@ -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'