@lukso/web-components 1.51.5 → 1.51.6
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/{index-b83c7efa.js → cn-3e29cec8.js} +1 -330
- package/dist/{index-619f20e8.cjs → cn-98077c72.cjs} +3 -332
- package/dist/components/index.cjs +2 -1
- package/dist/components/index.js +2 -1
- package/dist/components/lukso-card/index.cjs +325 -10
- package/dist/components/lukso-card/index.js +329 -5
- package/dist/components/lukso-progress/index.cjs +19 -8
- package/dist/components/lukso-progress/index.d.ts +1 -0
- package/dist/components/lukso-progress/index.d.ts.map +1 -1
- package/dist/components/lukso-progress/index.js +19 -8
- package/dist/components/lukso-progress/lukso-progress.stories.d.ts.map +1 -1
- package/dist/index.cjs +3 -2
- package/dist/index.js +2 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const components_luksoButton_index = require('./lukso-button/index.cjs');
|
|
6
|
-
const components_luksoCard_index = require('
|
|
6
|
+
const components_luksoCard_index = require('./lukso-card/index.cjs');
|
|
7
7
|
const components_luksoCheckbox_index = require('./lukso-checkbox/index.cjs');
|
|
8
8
|
const components_luksoFooter_index = require('./lukso-footer/index.cjs');
|
|
9
9
|
const components_luksoIcon_index = require('./lukso-icon/index.cjs');
|
|
@@ -24,6 +24,7 @@ const components_luksoTooltip_index = require('./lukso-tooltip/index.cjs');
|
|
|
24
24
|
const components_luksoUsername_index = require('./lukso-username/index.cjs');
|
|
25
25
|
const components_luksoWizard_index = require('./lukso-wizard/index.cjs');
|
|
26
26
|
const shared_tailwindElement_index = require('../index-997f3f0e.cjs');
|
|
27
|
+
require('../cn-98077c72.cjs');
|
|
27
28
|
require('../query-assigned-elements-1d5d9d4c.cjs');
|
|
28
29
|
require('../state-f73a8b4f.cjs');
|
|
29
30
|
require('../index-e9668573.cjs');
|
package/dist/components/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { LuksoButton } from './lukso-button/index.js';
|
|
2
|
-
export {
|
|
2
|
+
export { LuksoCard } from './lukso-card/index.js';
|
|
3
3
|
export { LuksoCheckbox } from './lukso-checkbox/index.js';
|
|
4
4
|
export { LuksoFooter } from './lukso-footer/index.js';
|
|
5
5
|
export { LuksoIcon } from './lukso-icon/index.js';
|
|
@@ -20,6 +20,7 @@ export { LuksoTooltip } from './lukso-tooltip/index.js';
|
|
|
20
20
|
export { LuksoUsername } from './lukso-username/index.js';
|
|
21
21
|
export { LuksoWizard } from './lukso-wizard/index.js';
|
|
22
22
|
export { a as TailwindElement, T as TailwindStyledElement } from '../index-04d11436.js';
|
|
23
|
+
import '../cn-3e29cec8.js';
|
|
23
24
|
import '../query-assigned-elements-5d94572f.js';
|
|
24
25
|
import '../state-0a779257.js';
|
|
25
26
|
import '../index-5e194caf.js';
|
|
@@ -2,19 +2,334 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
require('../../index-997f3f0e.cjs');
|
|
6
|
-
require('../../query-assigned-elements-1d5d9d4c.cjs');
|
|
7
|
-
require('../../style-map-671a0511.cjs');
|
|
8
|
-
const components_luksoCard_index = require('../../index-619f20e8.cjs');
|
|
5
|
+
const shared_tailwindElement_index = require('../../index-997f3f0e.cjs');
|
|
6
|
+
const queryAssignedElements = require('../../query-assigned-elements-1d5d9d4c.cjs');
|
|
7
|
+
const styleMap = require('../../style-map-671a0511.cjs');
|
|
9
8
|
require('../lukso-profile/index.cjs');
|
|
10
9
|
require('../../color-palette.cjs');
|
|
11
|
-
require('../../
|
|
10
|
+
const cn = require('../../cn-98077c72.cjs');
|
|
11
|
+
const index = require('../../index-beb7703d.cjs');
|
|
12
12
|
require('../../directive-8278ab14.cjs');
|
|
13
13
|
require('../../index-e9668573.cjs');
|
|
14
14
|
|
|
15
|
+
const style = ":host {\n display: inline-flex;\n width: 100%;\n}\n\n:host([width]) {\n width: inherit;\n}";
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
Object.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
var __defProp = Object.defineProperty;
|
|
18
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
19
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
20
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
21
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
22
|
+
if (decorator = decorators[i])
|
|
23
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
24
|
+
if (kind && result)
|
|
25
|
+
__defProp(target, key, result);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
exports.LuksoCard = class LuksoCard extends shared_tailwindElement_index.TailwindStyledElement(style) {
|
|
29
|
+
constructor() {
|
|
30
|
+
super(...arguments);
|
|
31
|
+
this.variant = "basic";
|
|
32
|
+
this.backgroundUrl = "";
|
|
33
|
+
this.profileUrl = "";
|
|
34
|
+
this.profileAddress = "";
|
|
35
|
+
this.width = void 0;
|
|
36
|
+
this.height = void 0;
|
|
37
|
+
this.customClass = "";
|
|
38
|
+
this.headerClass = "";
|
|
39
|
+
this.size = "medium";
|
|
40
|
+
this.isHoverable = false;
|
|
41
|
+
this.mediumStyles = `rounded-24 shadow-neutral-drop-shadow-2xl`;
|
|
42
|
+
this.smallStyles = `rounded-12 shadow-neutral-drop-shadow`;
|
|
43
|
+
this.smallHoverStyles = `hover:shadow-neutral-drop-shadow-1xl cursor-pointer transition`;
|
|
44
|
+
}
|
|
45
|
+
backgroundImageOrGradient() {
|
|
46
|
+
const opacity = "80";
|
|
47
|
+
const gradientStart = `#${this.profileAddress.slice(2, 8)}${opacity}`;
|
|
48
|
+
const gradientEnd = `#${this.profileAddress.slice(36, 42)}${opacity}`;
|
|
49
|
+
if (this.backgroundUrl) {
|
|
50
|
+
return `url(${this.backgroundUrl})`;
|
|
51
|
+
}
|
|
52
|
+
return `linear-gradient(90deg, ${gradientStart}, ${gradientEnd})`;
|
|
53
|
+
}
|
|
54
|
+
basicTemplate() {
|
|
55
|
+
return shared_tailwindElement_index.x`
|
|
56
|
+
<div
|
|
57
|
+
data-testid="card"
|
|
58
|
+
style=${index.customStyleMap({
|
|
59
|
+
[`min-height: ${this.height}px`]: !!this.height,
|
|
60
|
+
[`width: ${this.width}px`]: !!this.width
|
|
61
|
+
})}
|
|
62
|
+
class=${cn.cn("bg-neutral-100", {
|
|
63
|
+
[this.mediumStyles]: !this.customClass && this.size === "medium",
|
|
64
|
+
[this.smallStyles]: !this.customClass && this.size === "small",
|
|
65
|
+
[this.smallHoverStyles]: this.isHoverable && this.size === "small",
|
|
66
|
+
[this.customClass]: !!this.customClass,
|
|
67
|
+
"w-full": !this.width
|
|
68
|
+
})}
|
|
69
|
+
>
|
|
70
|
+
<slot name="content"></slot>
|
|
71
|
+
</div>
|
|
72
|
+
`;
|
|
73
|
+
}
|
|
74
|
+
withHeaderTemplate() {
|
|
75
|
+
return shared_tailwindElement_index.x`
|
|
76
|
+
<div
|
|
77
|
+
data-testid="card"
|
|
78
|
+
style=${styleMap.o({
|
|
79
|
+
minHeight: `${this.height}px`,
|
|
80
|
+
width: `${this.width}px`
|
|
81
|
+
})}
|
|
82
|
+
class=${cn.cn("bg-neutral-100 grid grid-rows-[auto,1fr] overflow-hidden", {
|
|
83
|
+
[this.mediumStyles]: !this.customClass && this.size === "medium",
|
|
84
|
+
[this.smallStyles]: !this.customClass && this.size === "small",
|
|
85
|
+
[this.smallHoverStyles]: this.isHoverable && this.size === "small",
|
|
86
|
+
[this.customClass]: !!this.customClass,
|
|
87
|
+
"w-full": !this.width
|
|
88
|
+
})}
|
|
89
|
+
>
|
|
90
|
+
<div class=${this.headerClass}>
|
|
91
|
+
<slot name="header"></slot>
|
|
92
|
+
</div>
|
|
93
|
+
<div class="bg-neutral-100 shadow-neutral-above-shadow-1xl rounded-24">
|
|
94
|
+
<slot name="content"></slot>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
`;
|
|
98
|
+
}
|
|
99
|
+
profileTemplate() {
|
|
100
|
+
return shared_tailwindElement_index.x`
|
|
101
|
+
<div
|
|
102
|
+
data-testid="card"
|
|
103
|
+
style=${index.customStyleMap({
|
|
104
|
+
[`min-height: ${this.height}px`]: !!this.height,
|
|
105
|
+
[`width: ${this.width}px`]: !!this.width
|
|
106
|
+
})}
|
|
107
|
+
class=${cn.cn("bg-neutral-100 grid", {
|
|
108
|
+
[this.mediumStyles]: !this.customClass && this.size === "medium",
|
|
109
|
+
[this.smallStyles]: !this.customClass && this.size === "small",
|
|
110
|
+
[this.smallHoverStyles]: this.isHoverable && this.size === "small",
|
|
111
|
+
[this.customClass]: !!this.customClass,
|
|
112
|
+
"w-full": !this.width
|
|
113
|
+
})}
|
|
114
|
+
>
|
|
115
|
+
<div
|
|
116
|
+
style=${styleMap.o({
|
|
117
|
+
backgroundImage: this.backgroundImageOrGradient()
|
|
118
|
+
})}
|
|
119
|
+
class=${cn.cn(
|
|
120
|
+
"row-end-1 col-span-1 col-end-1 row-span-1 h-full w-full bg-center bg-cover rounded-24 relative",
|
|
121
|
+
this.headerClass
|
|
122
|
+
)}
|
|
123
|
+
>
|
|
124
|
+
${this.backgroundUrl && shared_tailwindElement_index.x` <div
|
|
125
|
+
class="h-full full rounded-[24px_24px_0_0] bg-neutral-20/10 absolute"
|
|
126
|
+
></div>`}
|
|
127
|
+
<div>
|
|
128
|
+
<slot name="header"></slot>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
<div
|
|
132
|
+
class="grid grid-rows-[1fr,auto] row-end-1 col-span-1 col-end-1 row-span-1"
|
|
133
|
+
>
|
|
134
|
+
<div></div>
|
|
135
|
+
<div class="bg-neutral-100 rounded-24 relative">
|
|
136
|
+
<lukso-profile
|
|
137
|
+
profile-url=${this.profileUrl}
|
|
138
|
+
size="large"
|
|
139
|
+
profile-address=${this.profileAddress}
|
|
140
|
+
has-identicon
|
|
141
|
+
class="absolute -top-[40px] left-[calc(50%_-_40px)] z-10"
|
|
142
|
+
></lukso-profile>
|
|
143
|
+
<div
|
|
144
|
+
class="overflow-hidden w-[153px] h-[70px] -top-[70px] relative mx-auto flex items-end justify-center -mb-3"
|
|
145
|
+
>
|
|
146
|
+
<div
|
|
147
|
+
class="bg-neutral-100 rounded-[103px_103px_0_0] w-[96px] h-[48px]"
|
|
148
|
+
></div>
|
|
149
|
+
</div>
|
|
150
|
+
<slot name="content"></slot>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
`;
|
|
155
|
+
}
|
|
156
|
+
profile2Template() {
|
|
157
|
+
return shared_tailwindElement_index.x`
|
|
158
|
+
<div
|
|
159
|
+
data-testid="card"
|
|
160
|
+
style=${index.customStyleMap({
|
|
161
|
+
[`min-height: ${this.height}px`]: !!this.height,
|
|
162
|
+
[`width: ${this.width}px`]: !!this.width
|
|
163
|
+
})}
|
|
164
|
+
class=${cn.cn("bg-neutral-100 grid grid-rows-[auto,1fr]", {
|
|
165
|
+
[this.mediumStyles]: !this.customClass && this.size === "medium",
|
|
166
|
+
[this.smallStyles]: !this.customClass && this.size === "small",
|
|
167
|
+
[this.smallHoverStyles]: this.isHoverable && this.size === "small",
|
|
168
|
+
[this.customClass]: !!this.customClass,
|
|
169
|
+
["w-full"]: !this.width
|
|
170
|
+
})}
|
|
171
|
+
>
|
|
172
|
+
<div
|
|
173
|
+
style=${styleMap.o({
|
|
174
|
+
backgroundImage: this.backgroundImageOrGradient()
|
|
175
|
+
})}
|
|
176
|
+
class=${cn.cn(
|
|
177
|
+
"min-h-[129px] -mb-6 bg-center bg-cover rounded-[24px_24px_0_0] relative bg-neutral-100",
|
|
178
|
+
this.headerClass
|
|
179
|
+
)}
|
|
180
|
+
>
|
|
181
|
+
${this.backgroundUrl && shared_tailwindElement_index.x`<div
|
|
182
|
+
class="min-h-full min-w-full rounded-[24px_24px_0_0] bg-neutral-10/10 absolute"
|
|
183
|
+
></div>`}
|
|
184
|
+
<div>
|
|
185
|
+
<slot name="header"></slot>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
<div class="grid grid-rows-[max-content,auto]">
|
|
189
|
+
<div class="bg-neutral-100 relative">
|
|
190
|
+
<lukso-profile
|
|
191
|
+
profile-url=${this.profileUrl}
|
|
192
|
+
size="large"
|
|
193
|
+
profile-address=${this.profileAddress}
|
|
194
|
+
has-identicon
|
|
195
|
+
class="absolute -top-[40px] left-[calc(50%_-_40px)] z-10"
|
|
196
|
+
></lukso-profile>
|
|
197
|
+
<div
|
|
198
|
+
class="overflow-hidden w-[153px] h-[70px] -top-[70px] relative mx-auto flex items-end justify-center -mb-2"
|
|
199
|
+
>
|
|
200
|
+
<div
|
|
201
|
+
class="bg-neutral-100 rounded-[103px_103px_0_0] w-[96px] h-[48px]"
|
|
202
|
+
></div>
|
|
203
|
+
</div>
|
|
204
|
+
<slot name="content"></slot>
|
|
205
|
+
</div>
|
|
206
|
+
<div
|
|
207
|
+
class="bg-neutral-97 rounded-b-24 shadow-neutral-inner-shadow-top"
|
|
208
|
+
>
|
|
209
|
+
<slot name="bottom"></slot>
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
`;
|
|
214
|
+
}
|
|
215
|
+
heroTemplate() {
|
|
216
|
+
return shared_tailwindElement_index.x`
|
|
217
|
+
<div
|
|
218
|
+
data-testid="card"
|
|
219
|
+
style=${index.customStyleMap({
|
|
220
|
+
[`min-height: ${this.height}px`]: !!this.height,
|
|
221
|
+
[`width: ${this.width}px`]: !!this.width
|
|
222
|
+
})}
|
|
223
|
+
class=${cn.cn("h-[240px] flex bg-neutral-100", {
|
|
224
|
+
[this.mediumStyles]: !this.customClass && this.size === "medium",
|
|
225
|
+
[this.smallStyles]: !this.customClass && this.size === "small",
|
|
226
|
+
[this.smallHoverStyles]: this.isHoverable && this.size === "small",
|
|
227
|
+
[this.customClass]: !!this.customClass,
|
|
228
|
+
["w-full"]: !this.width
|
|
229
|
+
})}
|
|
230
|
+
>
|
|
231
|
+
<div
|
|
232
|
+
style=${styleMap.o({
|
|
233
|
+
backgroundImage: `url(${this.backgroundUrl})`
|
|
234
|
+
})}
|
|
235
|
+
class="h-full w-full -mb-6 bg-center bg-cover rounded-24 relative"
|
|
236
|
+
>
|
|
237
|
+
${this.backgroundUrl && shared_tailwindElement_index.x`<div
|
|
238
|
+
class="h-full w-full rounded-24 bg-neutral-20/10 absolute"
|
|
239
|
+
></div>`}
|
|
240
|
+
<div
|
|
241
|
+
class="h-full w-full flex flex-col items-center justify-center absolute"
|
|
242
|
+
>
|
|
243
|
+
<slot name="content"></slot>
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
`;
|
|
248
|
+
}
|
|
249
|
+
dappTemplate() {
|
|
250
|
+
return shared_tailwindElement_index.x`
|
|
251
|
+
<div
|
|
252
|
+
data-testid="card"
|
|
253
|
+
style=${index.customStyleMap({
|
|
254
|
+
[`min-height: ${this.height}px`]: !!this.height,
|
|
255
|
+
[`width: ${this.width}px`]: !!this.width
|
|
256
|
+
})}
|
|
257
|
+
class=${cn.cn("bg-neutral-100 grid grid-rows-[auto,1fr]", {
|
|
258
|
+
[this.mediumStyles]: !this.customClass && this.size === "medium",
|
|
259
|
+
[this.smallStyles]: !this.customClass && this.size === "small",
|
|
260
|
+
[this.smallHoverStyles]: this.isHoverable && this.size === "small",
|
|
261
|
+
[this.customClass]: !!this.customClass,
|
|
262
|
+
["w-full"]: !this.width
|
|
263
|
+
})}
|
|
264
|
+
>
|
|
265
|
+
<div
|
|
266
|
+
style=${styleMap.o({
|
|
267
|
+
backgroundImage: this.backgroundImageOrGradient()
|
|
268
|
+
})}
|
|
269
|
+
class=${cn.cn(
|
|
270
|
+
"min-h-[240px] bg-center bg-cover rounded-[24px_24px_0_0] relative",
|
|
271
|
+
this.headerClass
|
|
272
|
+
)}
|
|
273
|
+
>
|
|
274
|
+
<div>
|
|
275
|
+
<slot name="header"></slot>
|
|
276
|
+
</div>
|
|
277
|
+
</div>
|
|
278
|
+
<div
|
|
279
|
+
class="bg-neutral-100 shadow-neutral-above-shadow-1xl rounded-[0_0_24px_24px] relative"
|
|
280
|
+
>
|
|
281
|
+
<slot name="content"></slot>
|
|
282
|
+
</div>
|
|
283
|
+
</div>
|
|
284
|
+
`;
|
|
285
|
+
}
|
|
286
|
+
render() {
|
|
287
|
+
switch (this.variant) {
|
|
288
|
+
case "with-header":
|
|
289
|
+
return this.withHeaderTemplate();
|
|
290
|
+
case "profile":
|
|
291
|
+
return this.profileTemplate();
|
|
292
|
+
case "profile-2":
|
|
293
|
+
return this.profile2Template();
|
|
294
|
+
case "hero":
|
|
295
|
+
return this.heroTemplate();
|
|
296
|
+
case "dapp":
|
|
297
|
+
return this.dappTemplate();
|
|
298
|
+
default:
|
|
299
|
+
return this.basicTemplate();
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
__decorateClass([
|
|
304
|
+
queryAssignedElements.n({ type: String })
|
|
305
|
+
], exports.LuksoCard.prototype, "variant", 2);
|
|
306
|
+
__decorateClass([
|
|
307
|
+
queryAssignedElements.n({ type: String, attribute: "background-url" })
|
|
308
|
+
], exports.LuksoCard.prototype, "backgroundUrl", 2);
|
|
309
|
+
__decorateClass([
|
|
310
|
+
queryAssignedElements.n({ type: String, attribute: "profile-url" })
|
|
311
|
+
], exports.LuksoCard.prototype, "profileUrl", 2);
|
|
312
|
+
__decorateClass([
|
|
313
|
+
queryAssignedElements.n({ type: String, attribute: "profile-address" })
|
|
314
|
+
], exports.LuksoCard.prototype, "profileAddress", 2);
|
|
315
|
+
__decorateClass([
|
|
316
|
+
queryAssignedElements.n({ type: Number })
|
|
317
|
+
], exports.LuksoCard.prototype, "width", 2);
|
|
318
|
+
__decorateClass([
|
|
319
|
+
queryAssignedElements.n({ type: Number })
|
|
320
|
+
], exports.LuksoCard.prototype, "height", 2);
|
|
321
|
+
__decorateClass([
|
|
322
|
+
queryAssignedElements.n({ type: String, attribute: "custom-class" })
|
|
323
|
+
], exports.LuksoCard.prototype, "customClass", 2);
|
|
324
|
+
__decorateClass([
|
|
325
|
+
queryAssignedElements.n({ type: String, attribute: "header-class" })
|
|
326
|
+
], exports.LuksoCard.prototype, "headerClass", 2);
|
|
327
|
+
__decorateClass([
|
|
328
|
+
queryAssignedElements.n({ type: String })
|
|
329
|
+
], exports.LuksoCard.prototype, "size", 2);
|
|
330
|
+
__decorateClass([
|
|
331
|
+
queryAssignedElements.n({ type: Boolean, attribute: "is-hoverable" })
|
|
332
|
+
], exports.LuksoCard.prototype, "isHoverable", 2);
|
|
333
|
+
exports.LuksoCard = __decorateClass([
|
|
334
|
+
queryAssignedElements.e("lukso-card")
|
|
335
|
+
], exports.LuksoCard);
|