@energie360/ui-library 0.1.0 → 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.
- package/base/abstracts/_mixins.scss +11 -5
- package/base/main-base.scss +1 -0
- package/components/icon-text-block/{icon-text-block.vue → u-icon-text-block.vue} +10 -6
- package/components/index.js +14 -0
- package/components/panel/panel.scss +70 -0
- package/components/panel/u-panel.vue +37 -0
- package/components/progress-bar/progress-bar.scss +37 -0
- package/components/progress-bar/u-progress-bar.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 +33 -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 +47 -0
- package/components/table/u-table-header.vue +9 -0
- package/components/table/u-table-heading.vue +24 -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.js +200 -0
- package/components/tooltip/tooltip.scss +75 -0
- package/components/tooltip/u-tooltip.vue +92 -0
- package/components/tooltip/viewport.js +21 -0
- package/custom-elements.js +1 -0
- package/dist/base-style.css +1 -1
- package/dist/custom-elements.css +1 -0
- package/dist/{index.js → custom-elements.js} +1482 -1491
- package/dist/custom-elements.js.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 +44 -0
- package/elements/elements.js +35 -0
- package/elements/form-field/form-field-base.scss +142 -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/index.scss +4 -0
- package/elements/icon/icon.js +2 -2
- package/elements/icon/{icon.vue → u-icon.vue} +11 -15
- 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/spectro/spectro.scss +13 -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 +164 -0
- package/elements/types.ts +12 -0
- package/env.d.ts +1 -0
- package/layout/grid/grid.scss +6 -7
- package/package.json +17 -7
- package/tsconfig.app.json +12 -0
- package/tsconfig.json +11 -0
- package/tsconfig.node.json +19 -0
- package/{vite.config.js → vite.config.ts} +1 -1
- package/wizard/index.js +4 -0
- package/wizard/wizard-intro/{wizard-intro.vue → u-wizard-intro.vue} +12 -9
- package/wizard/wizard-layout/{wizard-layout-block.vue → u-wizard-layout-block.vue} +6 -4
- package/dist/index.css +0 -1
- 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/wizard/wizard-layout/{wizard-layout-element.vue → u-wizard-layout-element.vue} +0 -0
- /package/wizard/wizard-layout/{wizard-layout.vue → u-wizard-layout.vue} +0 -0
|
@@ -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
|
+
}
|
package/base/main-base.scss
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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>()
|
|
7
11
|
</script>
|
|
8
12
|
|
|
9
13
|
<template>
|
|
@@ -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,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,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,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>
|
|
@@ -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 class="progress-bar-label" v-if="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,47 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
TableCellBase,
|
|
4
|
+
TableCellHAlign,
|
|
5
|
+
TableCellTextStyle,
|
|
6
|
+
TableCellVAlign,
|
|
7
|
+
} from './table.type'
|
|
8
|
+
import UIcon from '../../elements/icon/u-icon.vue'
|
|
9
|
+
import UTooltip from '../tooltip/u-tooltip.vue'
|
|
10
|
+
|
|
11
|
+
interface Props extends TableCellBase {
|
|
12
|
+
infoText?: string
|
|
13
|
+
textStyle?: TableCellTextStyle
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const {
|
|
17
|
+
textStyle = TableCellTextStyle.normal,
|
|
18
|
+
hAlign = TableCellHAlign.left,
|
|
19
|
+
vAlign = TableCellVAlign.center,
|
|
20
|
+
} = defineProps<Props>()
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<div
|
|
25
|
+
role="cell"
|
|
26
|
+
:class="[
|
|
27
|
+
'table-cell',
|
|
28
|
+
`h-align-${hAlign}`,
|
|
29
|
+
`v-align-${vAlign}`,
|
|
30
|
+
{ 'has-tooltip': infoText },
|
|
31
|
+
]"
|
|
32
|
+
>
|
|
33
|
+
<div :class="['cell-content', `text-${textStyle}`]">
|
|
34
|
+
<slot>{{ text }}</slot>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div class="info-tooltip" v-if="infoText">
|
|
38
|
+
<UTooltip :title="infoText">
|
|
39
|
+
<UIcon name="info"></UIcon>
|
|
40
|
+
</UTooltip>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<style scoped lang="scss">
|
|
46
|
+
@use './table-cell.scss';
|
|
47
|
+
</style>
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
|
13
|
+
role="cell"
|
|
14
|
+
:class="['table-heading', `h-align-${hAlign}`, `v-align-${vAlign}`]"
|
|
15
|
+
>
|
|
16
|
+
<div class="cell-content">
|
|
17
|
+
<slot :text="text">{{ text }}</slot>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<style scoped lang="scss">
|
|
23
|
+
@use './table-heading.scss';
|
|
24
|
+
</style>
|