@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/base/_resets.scss CHANGED
@@ -13,6 +13,8 @@ h5,
13
13
  h6 {
14
14
  margin: 0;
15
15
  text-wrap: balance;
16
+ font-size: unset;
17
+ font-weight: unset;
16
18
  }
17
19
 
18
20
  p,
@@ -60,11 +60,6 @@ $letter-spacings: (
60
60
  -moz-osx-font-smoothing: grayscale;
61
61
  }
62
62
  }
63
-
64
- @media print {
65
- font-size: calc(var(--e-type-size-#{$size}) * 0.75);
66
- line-height: calc(var(--e-type-line-height-#{$size}) * 0.75);
67
- }
68
63
  }
69
64
 
70
65
  // This mixin will simply add an animated background.
@@ -78,3 +73,14 @@ $letter-spacings: (
78
73
  overflow: hidden;
79
74
  color: transparent;
80
75
  }
76
+
77
+ // From https://medium.com/codyhouse/line-height-crop-a-simple-css-formula-to-remove-top-space-from-your-text-9c3de06d7c6f
78
+ @mixin line-height-crop($line-height) {
79
+ &::before {
80
+ content: '';
81
+ display: block;
82
+ height: 0;
83
+ width: 0;
84
+ margin-top: calc((1 - #{$line-height}) * 0.5em);
85
+ }
86
+ }
@@ -4,6 +4,7 @@ This must be loaded before all other styles.
4
4
  */
5
5
 
6
6
  @use './resets';
7
+ @use './input-resets';
7
8
  @use './html';
8
9
  @use './body';
9
10
  @use './focus-handling';
@@ -0,0 +1,55 @@
1
+ @use '../../base/abstracts/' as a;
2
+
3
+ .icon-text-block {
4
+ display: flex;
5
+ gap: var(--e-space-6);
6
+ align-items: center;
7
+
8
+ @include a.bp(m) {
9
+ flex-direction: column;
10
+ align-items: flex-start;
11
+ }
12
+
13
+ .illu-wrapper {
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ flex: 0 0 auto;
18
+ width: a.rem(120);
19
+ height: a.rem(120);
20
+ border-radius: 100%;
21
+ background-color: var(--e-c-primary-01-50);
22
+
23
+ @include a.bp(m) {
24
+ width: a.rem(104);
25
+ height: a.rem(104);
26
+ }
27
+ }
28
+
29
+ .illustration {
30
+ width: a.rem(56);
31
+ height: a.rem(56);
32
+ }
33
+
34
+ .content {
35
+ display: flex;
36
+ flex-direction: column;
37
+ row-gap: var(--e-space-2);
38
+ }
39
+
40
+ .title {
41
+ @include a.type(300, strong);
42
+
43
+ @include a.bp(m) {
44
+ @include a.type(200, strong);
45
+ }
46
+ }
47
+
48
+ .description {
49
+ @include a.type(300);
50
+
51
+ @include a.bp(m) {
52
+ @include a.type(200);
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,32 @@
1
+ <script setup lang="ts">
2
+ import { ImageBase } from '../../elements/image/u-image.vue'
3
+
4
+ interface Props {
5
+ title: string
6
+ description?: string
7
+ image: ImageBase
8
+ }
9
+
10
+ defineProps<Props>()
11
+ </script>
12
+
13
+ <template>
14
+ <div class="icon-text-block">
15
+ <div class="illu-wrapper">
16
+ <img
17
+ class="illustration"
18
+ aria-hidden="true"
19
+ :src="image.src"
20
+ :alt="image.alt"
21
+ />
22
+ </div>
23
+ <div class="content">
24
+ <h2 class="title">{{ title }}</h2>
25
+ <p class="description" v-html="description"></p>
26
+ </div>
27
+ </div>
28
+ </template>
29
+
30
+ <style scoped lang="scss">
31
+ @use './icon-text-block.scss';
32
+ </style>
@@ -0,0 +1,5 @@
1
+ .icon-text-block-group {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: var(--e-space-10);
5
+ }
@@ -0,0 +1,9 @@
1
+ <template>
2
+ <div class="icon-text-block-group">
3
+ <slot></slot>
4
+ </div>
5
+ </template>
6
+
7
+ <style lang="scss" scoped>
8
+ @use './icon-text-block-group.scss';
9
+ </style>
@@ -0,0 +1,14 @@
1
+ /**
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
4
+ */
5
+ export { default as UIconTextBlock } from './icon-text-block/u-icon-text-block.vue'
6
+ export { default as UIconTextBlockGroup } from './icon-text-block-group/u-icon-text-block-group.vue'
7
+ export { default as UTable } from './table/u-table.vue'
8
+ export { default as UTableHeader } from './table/u-table-header.vue'
9
+ export { default as UTableRow } from './table/u-table-row.vue'
10
+ export { default as UTableCell } from './table/u-table-cell.vue'
11
+ export { default as UTableHeading } from './table/u-table-heading.vue'
12
+ export { default as UCellIconText } from './table/u-cell-icon-text.vue'
13
+ export { default as UCellCtas } from './table/u-cell-ctas.vue'
14
+ export { default as UTooltip } from './tooltip/u-tooltip.vue'
@@ -0,0 +1,70 @@
1
+ @use '../../base/abstracts' as a;
2
+
3
+ .panel{
4
+ position: relative;
5
+ padding: var(--e-space-14) a.rem(400) a.rem(88) var(--e-space-14);
6
+ box-shadow: var(--e-elevation-md);
7
+ background-color: var(--e-c-mono-00);
8
+ border-radius: var(--e-brd-radius-3);
9
+ border: 1px solid var(--e-c-mono-200);
10
+ overflow: hidden;
11
+
12
+ @include a.bp('2xl') {
13
+ padding: var(--e-space-10) a.rem(344) a.rem(72) var(--e-space-10);
14
+ }
15
+
16
+ @include a.bp('lg') {
17
+ padding: var(--e-space-6) var(--e-space-6) a.rem(104) var(--e-space-6);
18
+ }
19
+ }
20
+
21
+ .title {
22
+ margin-bottom: var(--e-space-3);
23
+
24
+ h2 {
25
+ @include a.type(500, strong);
26
+ }
27
+
28
+ @include a.bp(lg) {
29
+ margin-bottom: var(--e-space-2);
30
+
31
+ h2 {
32
+ @include a.type(300, strong);
33
+ }
34
+ }
35
+ }
36
+
37
+ .text {
38
+ @include a.type(300);
39
+
40
+ @include a.bp(lg) {
41
+ @include a.type(200);
42
+ }
43
+ }
44
+
45
+ .panel-spectro {
46
+ pointer-events: none;
47
+ position: absolute;
48
+ top: calc(50% - 700px);
49
+ right: a.rem(-1560 + 400);
50
+ width: a.rem(1560);
51
+ height: a.rem(1560);
52
+ user-select: none;
53
+
54
+ @include a.bp('2xl') {
55
+ right: a.rem(-1400 + 344);
56
+ width: a.rem(1400);
57
+ height: a.rem(1400);
58
+ }
59
+
60
+ @include a.bp(lg) {
61
+ top: calc(100% - 95px);
62
+ right: -180px;
63
+ width: a.rem(600);
64
+ height: a.rem(600);
65
+ }
66
+
67
+ @include a.bp(s) {
68
+ right: calc(50% - 300px);
69
+ }
70
+ }
@@ -0,0 +1,37 @@
1
+ <script setup lang="ts">
2
+ import USpectro from "../../elements/spectro/u-spectro.vue";
3
+ import {Image} from "../../elements/types";
4
+
5
+ interface Props {
6
+ title?: string
7
+ text?: string
8
+ useSpectro?: boolean,
9
+ image?: Image
10
+ }
11
+
12
+ defineProps<Props>()
13
+ </script>
14
+
15
+ <template>
16
+ <aside class="panel">
17
+ <div v-if="useSpectro" class="panel-spectro">
18
+ <USpectro/>
19
+ </div>
20
+
21
+ <div class="content">
22
+ <div class="title">
23
+ <h2>
24
+ <slot name="title">{{title}}</slot>
25
+ </h2>
26
+ </div>
27
+
28
+ <div class="text">
29
+ <slot name="text"><div v-html="text"></div></slot>
30
+ </div>
31
+ </div>
32
+ </aside>
33
+ </template>
34
+
35
+ <style scoped lang="scss">
36
+ @use './panel.scss';
37
+ </style>
@@ -0,0 +1,37 @@
1
+ @use '../../base/abstracts' as a;
2
+
3
+ .progress-bar {
4
+ display: flex;
5
+ align-items: center;
6
+ column-gap: a.rem(4);
7
+ height: a.rem(10);
8
+ width: #{a.rem(64 + 4 + 10)}; // progress-track + space + icon
9
+
10
+ &.full-width {
11
+ width: 100%;
12
+
13
+ .progress-track {
14
+ width: calc(100% - #{a.rem(4 + 10)});
15
+ }
16
+ }
17
+ }
18
+
19
+ .progress-track {
20
+ width: a.rem(64);
21
+ min-width: a.rem(64);
22
+ height: a.rem(4);
23
+ background-color: var(--e-c-mono-100);
24
+ border-radius: a.rem(4);
25
+ overflow: hidden;
26
+ }
27
+
28
+ .progress-position {
29
+ height: 100%;
30
+ background-color: var(--e-c-primary-01-500);
31
+ }
32
+
33
+ .star-icon {
34
+ width: a.rem(10);
35
+ height: a.rem(10);
36
+ background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%234BA528' d='M4.822 1.35a.2.2 0 0 1 .356 0l.975 1.909a.2.2 0 0 0 .147.107l2.117.336a.2.2 0 0 1 .11.34L7.012 5.557a.2.2 0 0 0-.056.173l.334 2.118a.2.2 0 0 1-.288.21L5.09 7.085a.2.2 0 0 0-.182 0L3 8.058a.2.2 0 0 1-.29-.209l.335-2.118a.2.2 0 0 0-.056-.173L1.473 4.041a.2.2 0 0 1 .11-.339L3.7 3.366a.2.2 0 0 0 .147-.107l.975-1.91Z'/%3E%3C/svg%3E");
37
+ }
@@ -0,0 +1,21 @@
1
+ <script setup lang="ts">
2
+ interface Props {
3
+ value: number
4
+ fullWidth?: boolean
5
+ }
6
+
7
+ const { fullWidth = false } = defineProps<Props>()
8
+ </script>
9
+
10
+ <template>
11
+ <div :class="['progress-bar', { 'full-width': fullWidth }]">
12
+ <div class="progress-track">
13
+ <div class="progress-position" :style="{ width: `${value}%` }"></div>
14
+ </div>
15
+ <div class="star-icon" v-if="value >= 100"></div>
16
+ </div>
17
+ </template>
18
+
19
+ <style scoped lang="scss">
20
+ @use './progress-bar.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,33 @@
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 in ctas">
19
+ <UButton
20
+ variant="plain"
21
+ :icon="cta.icon"
22
+ :href="cta.href"
23
+ :target="cta.target"
24
+ >
25
+ <span class="button-label">{{ cta.label }}</span>
26
+ </UButton>
27
+ </template>
28
+ </div>
29
+ </template>
30
+
31
+ <style scoped lang="scss">
32
+ @use './cell-ctas.scss';
33
+ </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 in icons">
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>