@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.
Files changed (148) hide show
  1. package/base/_input-resets.scss +9 -3
  2. package/base/_resets.scss +5 -0
  3. package/base/abstracts/_mixins.scss +11 -5
  4. package/base/main-base.scss +1 -0
  5. package/components/accordion-item/accordion-item.scss +62 -0
  6. package/components/accordion-item/u-accordion-item.vue +44 -0
  7. package/components/card/card.scss +58 -0
  8. package/components/card/u-card.vue +26 -0
  9. package/components/card-header/card-header.scss +102 -0
  10. package/components/card-header/u-card-header.vue +51 -0
  11. package/components/card-hint/card-hint.scss +13 -0
  12. package/components/card-hint/u-card-hint.vue +23 -0
  13. package/components/card-price/card-price.scss +110 -0
  14. package/components/card-price/u-card-price.vue +47 -0
  15. package/components/card-table/card-table.scss +76 -0
  16. package/components/card-table/u-card-table.vue +77 -0
  17. package/components/card-toggle-switches/card-toggle-switches.scss +13 -0
  18. package/components/card-toggle-switches/u-card-toggle-switches.vue +30 -0
  19. package/components/collapsible/collapsible.scss +14 -0
  20. package/components/collapsible/u-collapsible.vue +81 -0
  21. package/components/collapsible-group/u-collapsible-group.vue +14 -0
  22. package/components/icon-teaser/icon-teaser.scss +58 -0
  23. package/components/icon-teaser/u-icon-teaser.vue +35 -0
  24. package/components/icon-teaser-group/icon-teaser-group.scss +10 -0
  25. package/components/icon-teaser-group/u-icon-teaser-group.vue +19 -0
  26. package/components/icon-text-block/{icon-text-block.vue → u-icon-text-block.vue} +11 -12
  27. package/components/index.js +14 -0
  28. package/components/language-nav/language-nav.scss +32 -0
  29. package/components/language-nav/u-language-nav.vue +27 -0
  30. package/components/panel/panel.scss +107 -0
  31. package/components/panel/u-panel.vue +48 -0
  32. package/components/progress-bar/progress-bar.scss +37 -0
  33. package/components/progress-bar/u-progress-bar.vue +21 -0
  34. package/components/richtext/richtext.scss +208 -0
  35. package/components/richtext/u-richtext.vue +21 -0
  36. package/components/table/cell-ctas.scss +12 -0
  37. package/components/table/cell-icon-group.scss +12 -0
  38. package/components/table/cell-icon-text.scss +22 -0
  39. package/components/table/cell-progress-bar.scss +23 -0
  40. package/components/table/table-cell.mixins.scss +60 -0
  41. package/components/table/table-cell.scss +24 -0
  42. package/components/table/table-header.scss +5 -0
  43. package/components/table/table-heading.scss +8 -0
  44. package/components/table/table-row.scss +20 -0
  45. package/components/table/table.scss +12 -0
  46. package/components/table/table.type.ts +31 -0
  47. package/components/table/u-cell-ctas.vue +28 -0
  48. package/components/table/u-cell-icon-group.vue +31 -0
  49. package/components/table/u-cell-icon-text.vue +23 -0
  50. package/components/table/u-cell-progress-bar.vue +22 -0
  51. package/components/table/u-table-cell.vue +37 -0
  52. package/components/table/u-table-header.vue +9 -0
  53. package/components/table/u-table-heading.vue +21 -0
  54. package/components/table/u-table-row.vue +17 -0
  55. package/components/table/u-table.vue +11 -0
  56. package/components/tooltip/dom.js +167 -0
  57. package/components/tooltip/popover.ts +208 -0
  58. package/components/tooltip/tooltip.scss +75 -0
  59. package/components/tooltip/u-tooltip.vue +72 -0
  60. package/components/tooltip/viewport.js +21 -0
  61. package/custom-elements.js +1 -0
  62. package/dist/base-style.css +409 -2
  63. package/dist/base-style.css.map +1 -0
  64. package/dist/elements/text-link.css +40 -0
  65. package/dist/elements/text-link.css.map +1 -0
  66. package/dist/layout/split.css +124 -0
  67. package/dist/layout/split.css.map +1 -0
  68. package/elements/button/_button-base.scss +1 -1
  69. package/elements/button/_button-filled-inverted.scss +3 -3
  70. package/elements/button/_button-filled.scss +3 -3
  71. package/elements/button/_button-outlined-inverted.scss +3 -3
  72. package/elements/button/_button-outlined.scss +3 -3
  73. package/elements/button/_button-plain.scss +3 -3
  74. package/elements/button/_button-secondary-outlined.scss +3 -3
  75. package/elements/button/button.js +2 -2
  76. package/elements/button/button.scss +1 -1
  77. package/elements/button/u-button.vue +41 -0
  78. package/elements/button-chip/button-chip.scss +83 -0
  79. package/elements/button-chip/u-button-chip.vue +45 -0
  80. package/elements/elements.js +35 -0
  81. package/elements/form-field/form-field-base.scss +141 -0
  82. package/elements/form-field/form-field-error.scss +20 -0
  83. package/elements/form-field/form-field-prefix-suffix.scss +80 -0
  84. package/elements/form-field/form-field-states.scss +59 -0
  85. package/elements/form-field/form-field.types.ts +8 -0
  86. package/elements/form-field/index.scss +4 -0
  87. package/elements/icon/icon.js +2 -2
  88. package/elements/icon/{icon.vue → u-icon.vue} +12 -18
  89. package/elements/icon-button/icon-button.js +2 -2
  90. package/elements/icon-button/{icon-button.vue → u-icon-button.vue} +14 -15
  91. package/elements/image/image.scss +3 -0
  92. package/elements/image/u-image.vue +17 -0
  93. package/elements/index.js +6 -31
  94. package/elements/loader/loader.js +2 -2
  95. package/elements/loader/{loader.vue → u-loader.vue} +6 -7
  96. package/elements/numeric-stepper/numeric-stepper.scss +110 -0
  97. package/elements/numeric-stepper/u-numeric-stepper.vue +135 -0
  98. package/elements/select/select.scss +32 -0
  99. package/elements/select/u-select.vue +130 -0
  100. package/elements/select-chip/select-chip.scss +18 -0
  101. package/elements/select-chip/u-select-chip.vue +50 -0
  102. package/elements/select-chips/select-chips.scss +5 -0
  103. package/elements/select-chips/u-select-chips.vue +23 -0
  104. package/elements/spectro/spectro.scss +10 -0
  105. package/elements/spectro/u-spectro.vue +11 -0
  106. package/elements/text-field/text-field.scss +30 -0
  107. package/elements/text-field/text-field.types.ts +6 -0
  108. package/elements/text-field/u-text-field.vue +180 -0
  109. package/elements/text-link/text-link.scss +57 -0
  110. package/elements/toggle-switch/toggle-switch-small.scss +40 -0
  111. package/elements/toggle-switch/toggle-switch.scss +149 -0
  112. package/elements/toggle-switch/u-toggle-switch.vue +68 -0
  113. package/elements/types.ts +19 -0
  114. package/env.d.ts +1 -0
  115. package/globals.js +1 -2
  116. package/helpers/transition-height.vue +39 -0
  117. package/i18n/i18n.ts +40 -0
  118. package/layout/grid/grid.mixin.scss +4 -11
  119. package/layout/grid/grid.scss +6 -7
  120. package/layout/split/split.scss +96 -0
  121. package/modules/footer/footer.scss +161 -0
  122. package/modules/footer/u-footer.vue +59 -0
  123. package/package.json +33 -13
  124. package/tsconfig.app.json +12 -0
  125. package/tsconfig.json +11 -0
  126. package/tsconfig.node.json +19 -0
  127. package/utility/elements/text-link.scss +1 -0
  128. package/utility/layout/split.scss +1 -0
  129. package/utility/utility-text.js +1 -0
  130. package/utils/object/deep-get.js +1 -2
  131. package/utils/translations/translate.js +13 -0
  132. package/{vite.config.js → vite.config.ts} +2 -1
  133. package/watch.js +27 -0
  134. package/wizard/index.js +4 -0
  135. package/wizard/wizard-intro/{wizard-intro.vue → u-wizard-intro.vue} +12 -9
  136. package/wizard/wizard-intro/wizard-intro.scss +4 -0
  137. package/wizard/wizard-layout/{wizard-layout-block.vue → u-wizard-layout-block.vue} +7 -5
  138. package/wizard/wizard-layout/{wizard-layout-element.vue → u-wizard-layout-element.vue} +1 -1
  139. package/wizard/wizard-layout/{wizard-layout.vue → u-wizard-layout.vue} +1 -1
  140. package/wizard/wizard-layout/wizard-layout.scss +6 -6
  141. package/dist/base-style.js +0 -2
  142. package/dist/base-style.js.map +0 -1
  143. package/dist/index.css +0 -1
  144. package/dist/index.js +0 -5194
  145. package/dist/index.js.map +0 -1
  146. package/elements/button/button.vue +0 -42
  147. package/index.js +0 -1
  148. /package/components/icon-text-block-group/{icon-text-block-group.vue → u-icon-text-block-group.vue} +0 -0
@@ -0,0 +1,208 @@
1
+ @use '../../base/abstracts/' as a;
2
+ @use '../../elements/text-link/text-link.scss' as t;
3
+
4
+ .richtext {
5
+ // Spacing rules
6
+ * + * {
7
+ margin-top: var(--e-space-3);
8
+ }
9
+
10
+ ul + *,
11
+ ol + * {
12
+ margin-top: var(--e-space-8);
13
+ }
14
+
15
+ * + h2,
16
+ * + h3,
17
+ * + .richtext__title-large,
18
+ * + .richtext__title-small {
19
+ margin-top: var(--e-space-16);
20
+ }
21
+
22
+ * + ul,
23
+ * + ol {
24
+ margin-top: var(--e-space-6);
25
+ }
26
+
27
+ @include a.bp(lg) {
28
+ * + * {
29
+ margin-top: var(--e-space-2);
30
+ }
31
+
32
+ ul + *,
33
+ ol + * {
34
+ margin-top: var(--e-space-6);
35
+ }
36
+
37
+ * + h2,
38
+ * + h3,
39
+ * + .richtext__title-large,
40
+ * + .richtext__title-small {
41
+ margin-top: var(--e-space-10);
42
+ }
43
+ }
44
+
45
+ // Element styles
46
+ h2,
47
+ .richtext__title-large {
48
+ @include a.type(700, strong);
49
+
50
+ color: var(--e-c-primary-01-500);
51
+
52
+ @include a.bp(lg) {
53
+ @include a.type(400, strong);
54
+ }
55
+ }
56
+
57
+ h3,
58
+ .richtext__title-small {
59
+ @include a.type(400, strong);
60
+
61
+ color: var(--e-c-primary-01-500);
62
+
63
+ @include a.bp(lg) {
64
+ @include a.type(300, strong);
65
+ }
66
+ }
67
+
68
+ p {
69
+ @include a.type(300);
70
+
71
+ @include a.bp(lg) {
72
+ @include a.type(200);
73
+ }
74
+ }
75
+
76
+ a {
77
+ @include t.text-link;
78
+ }
79
+
80
+ ul,
81
+ ol {
82
+ @include a.type(300);
83
+
84
+ padding-left: var(--e-space-4);
85
+
86
+ > li {
87
+ position: relative;
88
+ }
89
+
90
+ br {
91
+ font-size: 0; // Firefox hack
92
+ }
93
+
94
+ @include a.bp(lg) {
95
+ @include a.type(200);
96
+ }
97
+ }
98
+
99
+ ul {
100
+ > li {
101
+ &::before {
102
+ content: '';
103
+ position: absolute;
104
+ top: var(--e-space-2_5);
105
+ left: calc(var(--e-space-4) * -1);
106
+ display: block;
107
+ width: a.rem(8);
108
+ height: a.rem(8);
109
+ border-radius: 100%;
110
+ background-color: var(--e-c-secondary-05-500);
111
+ }
112
+
113
+ @include a.bp(lg) {
114
+ &::before {
115
+ top: var(--e-space-2);
116
+ }
117
+ }
118
+ }
119
+ }
120
+
121
+ ol {
122
+ counter-reset: li;
123
+
124
+ > li {
125
+ counter-increment: li;
126
+
127
+ &::before {
128
+ @include a.type(200, strong);
129
+
130
+ content: counter(li);
131
+ position: absolute;
132
+ top: 2px;
133
+ left: calc(var(--e-space-4) * -1);
134
+ display: block;
135
+ color: var(--e-c-secondary-05-500);
136
+ font-weight: 700;
137
+ }
138
+ }
139
+
140
+ @include a.bp(lg) {
141
+ > li::before {
142
+ top: 0;
143
+ }
144
+ }
145
+ }
146
+
147
+ u {
148
+ text-underline-offset: a.rem(4);
149
+ }
150
+
151
+ p,
152
+ h2,
153
+ h3,
154
+ a,
155
+ li {
156
+ text-wrap: pretty;
157
+ }
158
+
159
+ // Modifiers
160
+ &.richtext--inverted {
161
+ color: var(--e-c-mono-00);
162
+
163
+ h2,
164
+ h3,
165
+ .richtext__title-small,
166
+ .richtext__title-large {
167
+ color: var(--e-c-mono-00);
168
+ }
169
+
170
+ a {
171
+ @include t.text-link--inverted;
172
+ }
173
+
174
+ ul > li::before {
175
+ background-color: var(--e-c-mono-00);
176
+ }
177
+
178
+ ol > li::before {
179
+ color: var(--e-c-mono-00);
180
+ }
181
+ }
182
+
183
+ // TODO: Spacing between must also be adjusted for richtext--small.
184
+ &.richtext--small {
185
+ p {
186
+ @include a.type(200);
187
+ }
188
+
189
+ ul,
190
+ ol {
191
+ @include a.type(200);
192
+ }
193
+
194
+ ul {
195
+ > li {
196
+ &::before {
197
+ top: var(--e-space-2);
198
+ }
199
+ }
200
+ }
201
+
202
+ ol {
203
+ > li::before {
204
+ top: 0;
205
+ }
206
+ }
207
+ }
208
+ }
@@ -0,0 +1,21 @@
1
+ <script setup lang="ts">
2
+ interface Props {
3
+ text?: string
4
+ small?: boolean
5
+ inverted?: boolean
6
+ }
7
+
8
+ const { small = false, inverted = false } = defineProps<Props>()
9
+
10
+ const classes = ['richtext', { 'richtext--small': small, 'richtext--inverted': inverted }]
11
+ </script>
12
+
13
+ <template>
14
+ <div v-if="text" :class="classes" v-html="text"></div>
15
+
16
+ <div v-else :class="classes"><slot></slot></div>
17
+ </template>
18
+
19
+ <style lang="scss">
20
+ @use './richtext.scss';
21
+ </style>
@@ -0,0 +1,12 @@
1
+ @use '../../base/abstracts' as a;
2
+
3
+ .cell-ctas {
4
+ display: flex;
5
+ column-gap: var(--e-space-2);
6
+
7
+ .button-label {
8
+ @include a.bp(m) {
9
+ @include a.visually-hidden;
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,12 @@
1
+ @use './table-cell.mixins' as c;
2
+
3
+ .cell-icon-group {
4
+ display: flex;
5
+ column-gap: var(--e-space-2);
6
+
7
+ @each $name, $color-var in c.$table-cell-icon-colors {
8
+ .icon-color-#{$name} {
9
+ color: #{$color-var};
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,22 @@
1
+ @use '../../base/abstracts' as a;
2
+ @use './table-cell.mixins' as c;
3
+
4
+ .cell-icon-text {
5
+ display: flex;
6
+ align-items: center;
7
+ column-gap: var(--e-space-2);
8
+
9
+ @each $name, $color-var in c.$table-cell-icon-colors {
10
+ &.icon-color-#{$name} .icon {
11
+ color: #{$color-var};
12
+ }
13
+ }
14
+
15
+ @include a.type(100);
16
+ }
17
+
18
+ .cell-text {
19
+ @include a.bp(m) {
20
+ @include a.visually-hidden;
21
+ }
22
+ }
@@ -0,0 +1,23 @@
1
+ @use '../../base/abstracts' as a;
2
+
3
+ .cell-progress-bar {
4
+ &.label-position-top {
5
+ .progress-bar-label {
6
+ @include a.line-height-crop(var(--e-type-line-height-100));
7
+
8
+ margin-bottom: var(--e-space-0_5);
9
+ }
10
+ }
11
+
12
+ &.label-position-right {
13
+ display: flex;
14
+ column-gap: var(--e-space-1);
15
+ flex-direction: row-reverse;
16
+ justify-content: flex-end;
17
+ align-items: center;
18
+ }
19
+ }
20
+
21
+ .progress-bar-label {
22
+ @include a.type(100);
23
+ }
@@ -0,0 +1,60 @@
1
+ @use '../../base/abstracts' as a;
2
+
3
+ @mixin table-cell-base {
4
+ display: table-cell;
5
+ padding: var(--e-space-4);
6
+ height: a.rem(56);
7
+
8
+ @include a.type(100);
9
+
10
+ @include a.bp(m) {
11
+ height: auto;
12
+ }
13
+
14
+ &.has-tooltip {
15
+ .cell-content {
16
+ width: calc(100% - #{a.rem(24 + 8)});
17
+ }
18
+ }
19
+
20
+ .cell-content {
21
+ display: inline-flex;
22
+ column-gap: var(--e-space-2);
23
+ min-height: a.rem(24);
24
+ }
25
+
26
+ // Horizontal align options
27
+ &.h-align-left {
28
+ text-align: left;
29
+ }
30
+
31
+ &.h-align-center {
32
+ text-align: center;
33
+ }
34
+
35
+ &.h-align-right {
36
+ text-align: right;
37
+ }
38
+
39
+ // Vertical align options
40
+ &.v-align-top {
41
+ vertical-align: top;
42
+ }
43
+
44
+ &.v-align-center {
45
+ vertical-align: middle;
46
+ }
47
+
48
+ &.v-align-bottom {
49
+ vertical-align: bottom;
50
+ }
51
+ }
52
+
53
+ $table-cell-icon-colors: (
54
+ 'black': var(--e-c-mono-900),
55
+ 'grey': var(--e-c-mono-500),
56
+ 'red': var(--e-c-signal-03-500),
57
+ 'orange': var(--e-c-signal-02-500),
58
+ 'blue': var(--e-c-secondary-05-500),
59
+ 'green': var(--e-c-signal-01-500),
60
+ );
@@ -0,0 +1,24 @@
1
+ @use '../../base/abstracts' as a;
2
+ @use './table-cell.mixins' as c;
3
+
4
+ .table-cell {
5
+ @include c.table-cell-base;
6
+ }
7
+
8
+ .cell-content {
9
+ // Text Styles
10
+ &.text-normal {
11
+ font-weight: var(--e-type-weight-weak);
12
+ }
13
+
14
+ &.text-bold {
15
+ font-weight: var(--e-type-weight-strong);
16
+ }
17
+ }
18
+
19
+ .info-tooltip {
20
+ margin-left: var(--e-space-2);
21
+ float: inline-end;
22
+ vertical-align: middle;
23
+ color: var(--e-c-secondary-05-500);
24
+ }
@@ -0,0 +1,5 @@
1
+ @use '../../base/abstracts' as a;
2
+
3
+ .table-header {
4
+ display: table-header-group;
5
+ }
@@ -0,0 +1,8 @@
1
+ @use '../../base/abstracts' as a;
2
+ @use './table-cell.mixins' as c;
3
+
4
+ .table-heading {
5
+ font-weight: var(--e-type-weight-strong);
6
+
7
+ @include c.table-cell-base;
8
+ }
@@ -0,0 +1,20 @@
1
+ @use '../../base/abstracts' as a;
2
+
3
+ .table-row {
4
+ display: table-row;
5
+ border-bottom: 1px solid var(--e-c-mono-100);
6
+
7
+ &.highlight {
8
+ background-color: var(--e-c-mono-50);
9
+ }
10
+
11
+ &.mobile-layout-card {
12
+ @include a.bp(m) {
13
+ display: grid;
14
+ gap: var(--e-space-2);
15
+ padding: var(--e-space-4);
16
+ border: 1px solid var(--e-c-mono-200);
17
+ border-radius: var(--e-brd-radius-2);
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,12 @@
1
+ @use '../../base/abstracts' as a;
2
+
3
+ .table {
4
+ display: table;
5
+ border-collapse: collapse;
6
+ width: 100%;
7
+ min-width: a.rem(500);
8
+ }
9
+
10
+ .table-scroll-wrapper {
11
+ overflow-x: auto;
12
+ }
@@ -0,0 +1,31 @@
1
+ export interface TableCellBase {
2
+ text?: string
3
+ hAlign?: TableCellHAlign
4
+ vAlign?: TableCellVAlign
5
+ }
6
+
7
+ export enum TableCellHAlign {
8
+ left = 'left',
9
+ center = 'center',
10
+ right = 'right',
11
+ }
12
+
13
+ export enum TableCellVAlign {
14
+ top = 'top',
15
+ center = 'center',
16
+ bottom = 'bottom',
17
+ }
18
+
19
+ export enum TableCellIconColor {
20
+ black = 'black',
21
+ grey = 'grey',
22
+ red = 'red',
23
+ orange = 'orange',
24
+ blue = 'blue',
25
+ green = 'green',
26
+ }
27
+
28
+ export enum TableCellTextStyle {
29
+ normal = 'normal',
30
+ bold = 'bold',
31
+ }
@@ -0,0 +1,28 @@
1
+ <script setup lang="ts">
2
+ import { Cta } from '../../elements/types'
3
+ import UButton from '../../elements/button/u-button.vue'
4
+
5
+ interface CellCta extends Cta {
6
+ icon: string
7
+ }
8
+
9
+ interface Props {
10
+ ctas: CellCta[]
11
+ }
12
+
13
+ defineProps<Props>()
14
+ </script>
15
+
16
+ <template>
17
+ <div class="cell-ctas">
18
+ <template v-for="(cta, idx) in ctas" :key="idx">
19
+ <UButton variant="plain" :icon="cta.icon" :href="cta.href" :target="cta.target">
20
+ <span class="button-label">{{ cta.label }}</span>
21
+ </UButton>
22
+ </template>
23
+ </div>
24
+ </template>
25
+
26
+ <style scoped lang="scss">
27
+ @use './cell-ctas.scss';
28
+ </style>
@@ -0,0 +1,31 @@
1
+ <script setup lang="ts">
2
+ import UIcon from '../../elements/icon/u-icon.vue'
3
+ import UTooltip from '../tooltip/u-tooltip.vue'
4
+ import { TableCellIconColor } from './table.type'
5
+
6
+ interface IconItem {
7
+ icon: string
8
+ title: string
9
+ color: TableCellIconColor
10
+ }
11
+
12
+ interface Props {
13
+ icons: IconItem[]
14
+ }
15
+
16
+ defineProps<Props>()
17
+ </script>
18
+
19
+ <template>
20
+ <div class="cell-icon-group">
21
+ <template v-for="(item, idx) in icons" :key="idx">
22
+ <UTooltip :title="item.title">
23
+ <UIcon :name="item.icon" :class="[`icon-color-${item.color}`]"></UIcon>
24
+ </UTooltip>
25
+ </template>
26
+ </div>
27
+ </template>
28
+
29
+ <style lang="scss" scoped>
30
+ @use './cell-icon-group.scss';
31
+ </style>
@@ -0,0 +1,23 @@
1
+ <script setup lang="ts">
2
+ import { TableCellBase, TableCellIconColor } from './table.type'
3
+ import UIcon from '../../elements/icon/u-icon.vue'
4
+
5
+ interface Props extends TableCellBase {
6
+ icon: string
7
+ iconColor?: TableCellIconColor
8
+ }
9
+
10
+ const { iconColor = TableCellIconColor.grey } = defineProps<Props>()
11
+ </script>
12
+
13
+ <template>
14
+ <div :class="['cell-icon-text', `icon-color-${iconColor}`]">
15
+ <UIcon :name="icon"></UIcon>
16
+
17
+ <span class="cell-text">{{ text }}</span>
18
+ </div>
19
+ </template>
20
+
21
+ <style scoped lang="scss">
22
+ @use './cell-icon-text.scss';
23
+ </style>
@@ -0,0 +1,22 @@
1
+ <script setup lang="ts">
2
+ import UProgressBar from '../progress-bar/u-progress-bar.vue'
3
+
4
+ interface Props {
5
+ label?: string
6
+ value: number
7
+ labelPosition?: 'top' | 'right'
8
+ }
9
+
10
+ const { labelPosition = 'top' } = defineProps<Props>()
11
+ </script>
12
+
13
+ <template>
14
+ <div :class="['cell-progress-bar', `label-position-${labelPosition}`]">
15
+ <p v-if="label" class="progress-bar-label">{{ label }}</p>
16
+ <UProgressBar :value="value"></UProgressBar>
17
+ </div>
18
+ </template>
19
+
20
+ <style scoped lang="scss">
21
+ @use './cell-progress-bar.scss';
22
+ </style>
@@ -0,0 +1,37 @@
1
+ <script setup lang="ts">
2
+ import { TableCellBase, TableCellHAlign, TableCellTextStyle, TableCellVAlign } from './table.type'
3
+ import UIcon from '../../elements/icon/u-icon.vue'
4
+ import UTooltip from '../tooltip/u-tooltip.vue'
5
+
6
+ interface Props extends TableCellBase {
7
+ infoText?: string
8
+ textStyle?: TableCellTextStyle
9
+ }
10
+
11
+ const {
12
+ textStyle = TableCellTextStyle.normal,
13
+ hAlign = TableCellHAlign.left,
14
+ vAlign = TableCellVAlign.center,
15
+ } = defineProps<Props>()
16
+ </script>
17
+
18
+ <template>
19
+ <div
20
+ role="cell"
21
+ :class="['table-cell', `h-align-${hAlign}`, `v-align-${vAlign}`, { 'has-tooltip': infoText }]"
22
+ >
23
+ <div :class="['cell-content', `text-${textStyle}`]">
24
+ <slot>{{ text }}</slot>
25
+ </div>
26
+
27
+ <div v-if="infoText" class="info-tooltip">
28
+ <UTooltip :title="infoText">
29
+ <UIcon name="info"></UIcon>
30
+ </UTooltip>
31
+ </div>
32
+ </div>
33
+ </template>
34
+
35
+ <style scoped lang="scss">
36
+ @use './table-cell.scss';
37
+ </style>
@@ -0,0 +1,9 @@
1
+ <template>
2
+ <div class="table-header">
3
+ <slot></slot>
4
+ </div>
5
+ </template>
6
+
7
+ <style scoped lang="scss">
8
+ @use './table-header.scss';
9
+ </style>
@@ -0,0 +1,21 @@
1
+ <script setup lang="ts">
2
+ interface Props {
3
+ text?: string
4
+ hAlign?: 'left' | 'center' | 'right'
5
+ vAlign?: 'top' | 'center' | 'bottom'
6
+ }
7
+
8
+ const { hAlign = 'left', vAlign = 'top' } = defineProps<Props>()
9
+ </script>
10
+
11
+ <template>
12
+ <div role="cell" :class="['table-heading', `h-align-${hAlign}`, `v-align-${vAlign}`]">
13
+ <div class="cell-content">
14
+ <slot :text="text">{{ text }}</slot>
15
+ </div>
16
+ </div>
17
+ </template>
18
+
19
+ <style scoped lang="scss">
20
+ @use './table-heading.scss';
21
+ </style>
@@ -0,0 +1,17 @@
1
+ <script setup lang="ts">
2
+ interface Props {
3
+ highlight?: boolean
4
+ }
5
+
6
+ defineProps<Props>()
7
+ </script>
8
+
9
+ <template>
10
+ <div role="row" :class="['table-row', { highlight }]">
11
+ <slot></slot>
12
+ </div>
13
+ </template>
14
+
15
+ <style scoped lang="scss">
16
+ @use './table-row.scss';
17
+ </style>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <div class="table-scroll-wrapper">
3
+ <div role="table" class="table">
4
+ <slot></slot>
5
+ </div>
6
+ </div>
7
+ </template>
8
+
9
+ <style scoped lang="scss">
10
+ @use './table.scss';
11
+ </style>