overview-components 1.0.68 → 1.0.70
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/dist/components/lit-chart.js +392 -0
- package/dist/components/lit-multiselect-item.js +526 -0
- package/dist/components/lit-tabs-overview.js +300 -0
- package/dist/components/react-wrappers/button.d.ts +3 -0
- package/dist/components/react-wrappers/button.d.ts.map +1 -0
- package/dist/components/react-wrappers/button.js +14 -0
- package/dist/components/react-wrappers/chart.js +14 -0
- package/dist/components/react-wrappers/progress-bar.d.ts +1 -1
- package/dist/components/react-wrappers/progress-bar.d.ts.map +1 -1
- package/dist/components/react-wrappers/progress-bar.js +14 -0
- package/dist/components/react-wrappers/tabs-overview.js +14 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -20
- package/dist/shared/lit-button.js +139 -0
- package/dist/shared/lit-progress-bar.js +80 -0
- package/dist/shared/styles/button-shared-styles.js +202 -0
- package/package.json +7 -7
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { customElement as c } from "../node_modules/@lit/reactive-element/decorators/custom-element.js";
|
|
2
|
+
import { property as n } from "../node_modules/@lit/reactive-element/decorators/property.js";
|
|
3
|
+
import { LitElement as g, html as d, css as v } from "lit";
|
|
4
|
+
var h = Object.defineProperty, f = Object.getOwnPropertyDescriptor, l = (e, t, i, o) => {
|
|
5
|
+
for (var r = o > 1 ? void 0 : o ? f(t, i) : t, a = e.length - 1, p; a >= 0; a--)
|
|
6
|
+
(p = e[a]) && (r = (o ? p(t, i, r) : p(r)) || r);
|
|
7
|
+
return o && r && h(t, i, r), r;
|
|
8
|
+
};
|
|
9
|
+
let s = class extends g {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments), this.label = "", this.progress = 0;
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
const e = Math.min(100, Math.max(0, this.progress));
|
|
15
|
+
return d`
|
|
16
|
+
<div class="container">
|
|
17
|
+
<div class="label">${this.label}</div>
|
|
18
|
+
<div class="progress-bar-container">
|
|
19
|
+
<div class="percentage">${e}%</div>
|
|
20
|
+
<div class="progress-bar">
|
|
21
|
+
<div class="progress-fill" style="width: ${e}%"></div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
`;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
s.styles = [
|
|
29
|
+
v`
|
|
30
|
+
.container {
|
|
31
|
+
gap: 4px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.label {
|
|
35
|
+
font-weight: 500;
|
|
36
|
+
font-size: 14px;
|
|
37
|
+
color: var(--text-secondary, #5d6371);
|
|
38
|
+
gap: 10px;
|
|
39
|
+
line-height: 24px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.progress-bar-container {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
gap: 4px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.progress-bar {
|
|
49
|
+
display: flex;
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 12px;
|
|
52
|
+
border-radius: 8px;
|
|
53
|
+
background-color: var(--color-primary-light, #f0fadf);
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.progress-fill {
|
|
58
|
+
height: 100%;
|
|
59
|
+
background-color: var(--color-primary-main, #76b703);
|
|
60
|
+
transition: width 0.05s ease-in-out;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.percentage {
|
|
64
|
+
font-weight: 500;
|
|
65
|
+
font-size: 14px;
|
|
66
|
+
}
|
|
67
|
+
`
|
|
68
|
+
];
|
|
69
|
+
l([
|
|
70
|
+
n({ type: String })
|
|
71
|
+
], s.prototype, "label", 2);
|
|
72
|
+
l([
|
|
73
|
+
n({ type: Number })
|
|
74
|
+
], s.prototype, "progress", 2);
|
|
75
|
+
s = l([
|
|
76
|
+
c("lit-progress-bar")
|
|
77
|
+
], s);
|
|
78
|
+
export {
|
|
79
|
+
s as LitProgressBar
|
|
80
|
+
};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { css as o } from "lit";
|
|
2
|
+
const t = o`
|
|
3
|
+
button {
|
|
4
|
+
font-family: inherit;
|
|
5
|
+
border-radius: var(--border-radius-small, 0.5rem);
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
transition:
|
|
8
|
+
background-color 0.3s,
|
|
9
|
+
color 0.3s,
|
|
10
|
+
border 0.3s;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
}
|
|
15
|
+
/* Disabled button state */
|
|
16
|
+
|
|
17
|
+
.button--contained:disabled {
|
|
18
|
+
background-color: var(--color-primary-disabled, #d0d3db);
|
|
19
|
+
cursor: not-allowed;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.button--outlined:disabled {
|
|
23
|
+
color: var(--color-primary-disabled);
|
|
24
|
+
border: 1px solid var(--color-primary-disabled, #d0d3db);
|
|
25
|
+
cursor: not-allowed;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.button--text:disabled {
|
|
29
|
+
color: var(--color-primary-disabled, #d0d3db);
|
|
30
|
+
cursor: not-allowed;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.button--dashed:disabled {
|
|
34
|
+
color: var(--color-primary-disabled, #d0d3db);
|
|
35
|
+
cursor: not-allowed;
|
|
36
|
+
border: 1px dashed var(--color-primary-disabled, #d0d3db);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.button--error:disabled {
|
|
40
|
+
background-color: var(--color-primary-disabled, #d0d3db);
|
|
41
|
+
cursor: not-allowed;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.button--ai:disabled {
|
|
45
|
+
background: var(--color-primary-disabled, #d0d3db);
|
|
46
|
+
cursor: not-allowed;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.button--outlined-ai:disabled {
|
|
50
|
+
color: var(--color-primary-disabled);
|
|
51
|
+
cursor: not-allowed;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.button--outlined-ai:disabled::before {
|
|
55
|
+
background: var(--color-primary-disabled);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.button--outlined-ai:disabled .button-inner {
|
|
59
|
+
background: none;
|
|
60
|
+
color: var(--color-primary-disabled);
|
|
61
|
+
-webkit-text-fill-color: var(--color-primary-disabled);
|
|
62
|
+
-webkit-background-clip: border-box;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Button Variants */
|
|
66
|
+
.button--outlined {
|
|
67
|
+
color: var(--text-primary);
|
|
68
|
+
border: 1px solid var(--text-primary, #111827);
|
|
69
|
+
background-color: var(--background-paper, #fff);
|
|
70
|
+
}
|
|
71
|
+
.button--outlined:not(:disabled):hover {
|
|
72
|
+
background-color: var(--color-primary-light, #f0fadf);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.button--contained {
|
|
76
|
+
border: none;
|
|
77
|
+
color: #fff;
|
|
78
|
+
background-color: var(--color-primary-main, #76b703);
|
|
79
|
+
}
|
|
80
|
+
.button--contained:not(:disabled):hover {
|
|
81
|
+
background-color: var(--color-primary-dark, #5f9402);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.button--error {
|
|
85
|
+
border: none;
|
|
86
|
+
color: var(--color-error-light, #ffd6cd);
|
|
87
|
+
background-color: var(--color-error-main, #ca2d0a);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.button--error:not(:disabled):hover {
|
|
91
|
+
background-color: var(--color-error-dark, #a52103);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.button--ai {
|
|
95
|
+
border: none;
|
|
96
|
+
color: #fff;
|
|
97
|
+
background: linear-gradient(to right, #573493, #e78047);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.button--ai:not(:disabled):hover {
|
|
101
|
+
opacity: 80%;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.button--outlined-ai {
|
|
105
|
+
position: relative;
|
|
106
|
+
background-color: var(--background-paper, #fff);
|
|
107
|
+
border: none;
|
|
108
|
+
z-index: 0;
|
|
109
|
+
color: transparent;
|
|
110
|
+
|
|
111
|
+
background-image: linear-gradient(to right, #573493, #e78047);
|
|
112
|
+
-webkit-background-clip: text;
|
|
113
|
+
-webkit-text-fill-color: transparent;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.button--outlined-ai::before {
|
|
117
|
+
content: '';
|
|
118
|
+
position: absolute;
|
|
119
|
+
top: -1px;
|
|
120
|
+
left: -1px;
|
|
121
|
+
right: -1px;
|
|
122
|
+
bottom: -1px;
|
|
123
|
+
z-index: -1;
|
|
124
|
+
background: linear-gradient(to right, #573493, #e78047);
|
|
125
|
+
border-radius: inherit;
|
|
126
|
+
padding: 1px;
|
|
127
|
+
-webkit-mask:
|
|
128
|
+
linear-gradient(#fff 0 0) content-box,
|
|
129
|
+
linear-gradient(#fff 0 0);
|
|
130
|
+
mask-composite: exclude;
|
|
131
|
+
}
|
|
132
|
+
.button--outlined-ai .button-inner {
|
|
133
|
+
background: linear-gradient(to right, #573493, #e78047);
|
|
134
|
+
-webkit-background-clip: text;
|
|
135
|
+
-webkit-text-fill-color: transparent;
|
|
136
|
+
display: inline-flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
gap: 0.5rem;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.button--outlined-ai:not(:disabled) .out-ai {
|
|
142
|
+
color: #573493;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.button--outlined-ai:not(:disabled) .start-icon {
|
|
146
|
+
color: #573493;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.button--outlined-ai:not(:disabled):hover {
|
|
150
|
+
opacity: 80%;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.button--text {
|
|
154
|
+
border: none;
|
|
155
|
+
color: var(--text-primary, #111827);
|
|
156
|
+
background-color: var(--background-paper, #fff);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.button--text:not(:disabled):hover {
|
|
160
|
+
background-color: var(--color-primary-light, #f0fadf);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.button--dashed {
|
|
164
|
+
position: relative;
|
|
165
|
+
border: none;
|
|
166
|
+
color: var(--text-primary, #111827);
|
|
167
|
+
background-color: var(--background-paper, #fff);
|
|
168
|
+
display: flex !important;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.button--dashed::before {
|
|
172
|
+
content: '';
|
|
173
|
+
top: 1px;
|
|
174
|
+
left: 1px;
|
|
175
|
+
right: 1px;
|
|
176
|
+
bottom: 1px;
|
|
177
|
+
position: absolute;
|
|
178
|
+
border: 1px dashed var(--color-divider, #d0d3db);
|
|
179
|
+
border-radius: 6px; /* 2px less than main radius */
|
|
180
|
+
box-sizing: border-box;
|
|
181
|
+
z-index: 1;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.button--dashed:not(:disabled):hover {
|
|
185
|
+
background-color: var(--color-primary-light, #f0fadf);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.button--text.active {
|
|
189
|
+
background-color: var(--color-primary-light, #f0fadf);
|
|
190
|
+
}
|
|
191
|
+
.button--dashed.active {
|
|
192
|
+
background-color: var(--color-primary-light, #f0fadf);
|
|
193
|
+
}
|
|
194
|
+
.button--inherit {
|
|
195
|
+
background-color: inherit;
|
|
196
|
+
color: var(--text-primary, #111827);
|
|
197
|
+
border: none;
|
|
198
|
+
}
|
|
199
|
+
`;
|
|
200
|
+
export {
|
|
201
|
+
t as default
|
|
202
|
+
};
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "overview-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.70",
|
|
4
4
|
"description": "A reusable design Lit components for case overview section.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"require": "./dist/index.js",
|
|
10
12
|
"types": "./dist/index.d.ts",
|
|
11
|
-
"
|
|
13
|
+
"default": "./dist/index.js"
|
|
12
14
|
},
|
|
13
15
|
"./dist/*": {
|
|
16
|
+
"import": "./dist/*.js",
|
|
17
|
+
"require": "./dist/*.js",
|
|
14
18
|
"types": "./dist/*.d.ts",
|
|
15
|
-
"
|
|
16
|
-
},
|
|
17
|
-
"./*": {
|
|
18
|
-
"types": "./dist/*.d.ts",
|
|
19
|
-
"import": "./dist/*.js"
|
|
19
|
+
"default": "./dist/*.js"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"files": [
|