@lukso/web-components 1.55.0 → 1.56.0
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/index.cjs +3 -3
- package/dist/components/index.js +3 -3
- package/dist/components/lukso-button/index.cjs +1 -1
- package/dist/components/lukso-button/index.js +1 -1
- package/dist/components/lukso-card/index.cjs +97 -50
- package/dist/components/lukso-card/index.d.ts +3 -0
- package/dist/components/lukso-card/index.d.ts.map +1 -1
- package/dist/components/lukso-card/index.js +92 -45
- package/dist/components/lukso-card/lukso-card.stories.d.ts +2 -0
- package/dist/components/lukso-card/lukso-card.stories.d.ts.map +1 -1
- package/dist/components/lukso-checkbox/index.cjs +1 -1
- package/dist/components/lukso-checkbox/index.js +1 -1
- package/dist/components/lukso-footer/index.cjs +1 -1
- package/dist/components/lukso-footer/index.js +1 -1
- package/dist/components/lukso-icon/index.cjs +2 -2
- package/dist/components/lukso-icon/index.js +2 -2
- package/dist/components/lukso-input/index.cjs +1 -1
- package/dist/components/lukso-input/index.js +1 -1
- package/dist/components/lukso-modal/index.cjs +1 -1
- package/dist/components/lukso-modal/index.js +1 -1
- package/dist/components/lukso-navbar/index.cjs +2 -2
- package/dist/components/lukso-navbar/index.js +2 -2
- package/dist/components/lukso-profile/index.cjs +2 -2
- package/dist/components/lukso-profile/index.js +2 -2
- package/dist/components/lukso-progress/index.cjs +2 -2
- package/dist/components/lukso-progress/index.js +2 -2
- package/dist/components/lukso-sanitize/index.cjs +1 -1
- package/dist/components/lukso-sanitize/index.js +1 -1
- package/dist/components/lukso-search/index.cjs +3 -3
- package/dist/components/lukso-search/index.js +3 -3
- package/dist/components/lukso-select/index.cjs +3 -3
- package/dist/components/lukso-select/index.js +3 -3
- package/dist/components/lukso-share/index.cjs +1 -1
- package/dist/components/lukso-share/index.js +1 -1
- package/dist/components/lukso-switch/index.cjs +2 -2
- package/dist/components/lukso-switch/index.js +2 -2
- package/dist/components/lukso-tag/index.cjs +2 -2
- package/dist/components/lukso-tag/index.js +2 -2
- package/dist/components/lukso-terms/index.cjs +2 -2
- package/dist/components/lukso-terms/index.js +2 -2
- package/dist/components/lukso-test/index.cjs +1 -1
- package/dist/components/lukso-test/index.js +1 -1
- package/dist/components/lukso-tooltip/index.cjs +1 -1
- package/dist/components/lukso-tooltip/index.js +1 -1
- package/dist/components/lukso-username/index.cjs +2 -2
- package/dist/components/lukso-username/index.js +2 -2
- package/dist/components/lukso-wizard/index.cjs +1 -1
- package/dist/components/lukso-wizard/index.js +1 -1
- package/dist/{index-3373dd2c.js → index-3d7e2144.js} +1 -1
- package/dist/{index-b02bfbc3.js → index-3e1c4760.js} +1 -1
- package/dist/{index-21cb1f33.cjs → index-4f378e44.cjs} +1 -1
- package/dist/{index-534893a1.cjs → index-6da9ae7b.cjs} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +3 -3
- package/dist/shared/tailwind-element/index.cjs +1 -1
- package/dist/shared/tailwind-element/index.js +1 -1
- package/dist/{style-map-04ec407e.js → style-map-6fdea6cc.js} +1 -1
- package/dist/{style-map-beffabf7.cjs → style-map-ed77e6b4.cjs} +1 -1
- package/package.json +1 -1
|
@@ -23,15 +23,15 @@ const components_luksoTest_index = require('./lukso-test/index.cjs');
|
|
|
23
23
|
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
|
-
const shared_tailwindElement_index = require('../index-
|
|
26
|
+
const shared_tailwindElement_index = require('../index-6da9ae7b.cjs');
|
|
27
27
|
require('../cn-4ec0bd94.cjs');
|
|
28
28
|
require('../query-assigned-elements-1d5d9d4c.cjs');
|
|
29
29
|
require('../state-f73a8b4f.cjs');
|
|
30
30
|
require('../index-e8741080.cjs');
|
|
31
31
|
require('../tailwind-config.cjs');
|
|
32
|
-
require('../style-map-
|
|
32
|
+
require('../style-map-ed77e6b4.cjs');
|
|
33
33
|
require('../directive-8278ab14.cjs');
|
|
34
|
-
require('../index-
|
|
34
|
+
require('../index-4f378e44.cjs');
|
|
35
35
|
require('../index-e9668573.cjs');
|
|
36
36
|
|
|
37
37
|
|
package/dist/components/index.js
CHANGED
|
@@ -19,13 +19,13 @@ export { LuksoTest } from './lukso-test/index.js';
|
|
|
19
19
|
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
|
-
export { a as TailwindElement, T as TailwindStyledElement } from '../index-
|
|
22
|
+
export { a as TailwindElement, T as TailwindStyledElement } from '../index-3d7e2144.js';
|
|
23
23
|
import '../cn-616567d4.js';
|
|
24
24
|
import '../query-assigned-elements-5d94572f.js';
|
|
25
25
|
import '../state-0a779257.js';
|
|
26
26
|
import '../index-c55a1069.js';
|
|
27
27
|
import '../tailwind-config.js';
|
|
28
|
-
import '../style-map-
|
|
28
|
+
import '../style-map-6fdea6cc.js';
|
|
29
29
|
import '../directive-2bb7789e.js';
|
|
30
|
-
import '../index-
|
|
30
|
+
import '../index-3e1c4760.js';
|
|
31
31
|
import '../index-5e194caf.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const shared_tailwindElement_index = require('../../index-
|
|
5
|
+
const shared_tailwindElement_index = require('../../index-6da9ae7b.cjs');
|
|
6
6
|
const queryAssignedElements = require('../../query-assigned-elements-1d5d9d4c.cjs');
|
|
7
7
|
const state = require('../../state-f73a8b4f.cjs');
|
|
8
8
|
const index = require('../../index-e8741080.cjs');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TailwindStyledElement, x, A } from '../../index-
|
|
1
|
+
import { T as TailwindStyledElement, x, A } from '../../index-3d7e2144.js';
|
|
2
2
|
import { n, e } from '../../query-assigned-elements-5d94572f.js';
|
|
3
3
|
import { t } from '../../state-0a779257.js';
|
|
4
4
|
import { s as se } from '../../index-c55a1069.js';
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const shared_tailwindElement_index = require('../../index-
|
|
5
|
+
const shared_tailwindElement_index = require('../../index-6da9ae7b.cjs');
|
|
6
6
|
const queryAssignedElements = require('../../query-assigned-elements-1d5d9d4c.cjs');
|
|
7
|
-
const styleMap = require('../../style-map-
|
|
7
|
+
const styleMap = require('../../style-map-ed77e6b4.cjs');
|
|
8
|
+
const index = require('../../index-e8741080.cjs');
|
|
8
9
|
require('../lukso-profile/index.cjs');
|
|
9
10
|
require('../../tailwind-config.cjs');
|
|
10
11
|
const cn = require('../../cn-4ec0bd94.cjs');
|
|
11
|
-
const index = require('../../index-
|
|
12
|
+
const index$1 = require('../../index-4f378e44.cjs');
|
|
12
13
|
require('../../directive-8278ab14.cjs');
|
|
13
14
|
require('../../index-e9668573.cjs');
|
|
14
15
|
|
|
@@ -37,10 +38,48 @@ exports.LuksoCard = class LuksoCard extends shared_tailwindElement_index.Tailwin
|
|
|
37
38
|
this.customClass = "";
|
|
38
39
|
this.headerClass = "";
|
|
39
40
|
this.size = "medium";
|
|
41
|
+
this.shadow = "large";
|
|
40
42
|
this.isHoverable = false;
|
|
41
43
|
this.mediumStyles = `rounded-24 shadow-neutral-drop-shadow-2xl`;
|
|
42
44
|
this.smallStyles = `rounded-12 shadow-neutral-drop-shadow`;
|
|
43
45
|
this.smallHoverStyles = `hover:shadow-neutral-drop-shadow-1xl cursor-pointer transition`;
|
|
46
|
+
this.cardStyles = index.se({
|
|
47
|
+
base: `bg-neutral-100`,
|
|
48
|
+
variants: {
|
|
49
|
+
size: {
|
|
50
|
+
small: `rounded-12`,
|
|
51
|
+
medium: `rounded-24`
|
|
52
|
+
},
|
|
53
|
+
shadow: {
|
|
54
|
+
small: `shadow-neutral-drop-shadow`,
|
|
55
|
+
medium: `shadow-neutral-drop-shadow-1xl`,
|
|
56
|
+
large: `shadow-neutral-drop-shadow-2xl`
|
|
57
|
+
},
|
|
58
|
+
isHoverable: {
|
|
59
|
+
true: `cursor-pointer transition`
|
|
60
|
+
},
|
|
61
|
+
hasNoWidth: {
|
|
62
|
+
true: `w-full`
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
compoundVariants: [
|
|
66
|
+
{
|
|
67
|
+
shadow: "small",
|
|
68
|
+
isHoverable: true,
|
|
69
|
+
class: `hover:shadow-neutral-drop-shadow-1xl`
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
shadow: "medium",
|
|
73
|
+
isHoverable: true,
|
|
74
|
+
class: `hover:shadow-neutral-drop-shadow-2xl`
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
shadow: "large",
|
|
78
|
+
isHoverable: true,
|
|
79
|
+
class: `hover:shadow-neutral-drop-shadow-3xl`
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
});
|
|
44
83
|
}
|
|
45
84
|
backgroundImageOrGradient() {
|
|
46
85
|
const opacity = "80";
|
|
@@ -52,26 +91,33 @@ exports.LuksoCard = class LuksoCard extends shared_tailwindElement_index.Tailwin
|
|
|
52
91
|
return `linear-gradient(90deg, ${gradientStart}, ${gradientEnd})`;
|
|
53
92
|
}
|
|
54
93
|
basicTemplate() {
|
|
94
|
+
const cardStyles = this.cardStyles({
|
|
95
|
+
size: this.size,
|
|
96
|
+
shadow: this.shadow,
|
|
97
|
+
isHoverable: this.isHoverable,
|
|
98
|
+
hasNoWidth: !this.width
|
|
99
|
+
});
|
|
55
100
|
return shared_tailwindElement_index.x`
|
|
56
101
|
<div
|
|
57
102
|
data-testid="card"
|
|
58
|
-
style=${index.customStyleMap({
|
|
103
|
+
style=${index$1.customStyleMap({
|
|
59
104
|
[`min-height: ${this.height}px`]: !!this.height,
|
|
60
105
|
[`width: ${this.width}px`]: !!this.width
|
|
61
106
|
})}
|
|
62
|
-
class=${cn.cn(
|
|
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
|
-
})}
|
|
107
|
+
class=${cn.cn(cardStyles, this.customClass)}
|
|
69
108
|
>
|
|
70
109
|
<slot name="content"></slot>
|
|
71
110
|
</div>
|
|
72
111
|
`;
|
|
73
112
|
}
|
|
74
113
|
withHeaderTemplate() {
|
|
114
|
+
const cardStyles = this.cardStyles({
|
|
115
|
+
size: this.size,
|
|
116
|
+
shadow: this.shadow,
|
|
117
|
+
isHoverable: this.isHoverable,
|
|
118
|
+
hasNoWidth: !this.width,
|
|
119
|
+
class: `grid grid-rows-[auto,1fr] overflow-hidden`
|
|
120
|
+
});
|
|
75
121
|
return shared_tailwindElement_index.x`
|
|
76
122
|
<div
|
|
77
123
|
data-testid="card"
|
|
@@ -79,13 +125,7 @@ exports.LuksoCard = class LuksoCard extends shared_tailwindElement_index.Tailwin
|
|
|
79
125
|
minHeight: `${this.height}px`,
|
|
80
126
|
width: `${this.width}px`
|
|
81
127
|
})}
|
|
82
|
-
class=${cn.cn(
|
|
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
|
-
})}
|
|
128
|
+
class=${cn.cn(cardStyles, this.customClass)}
|
|
89
129
|
>
|
|
90
130
|
<div class=${this.headerClass}>
|
|
91
131
|
<slot name="header"></slot>
|
|
@@ -97,20 +137,21 @@ exports.LuksoCard = class LuksoCard extends shared_tailwindElement_index.Tailwin
|
|
|
97
137
|
`;
|
|
98
138
|
}
|
|
99
139
|
profileTemplate() {
|
|
140
|
+
const cardStyles = this.cardStyles({
|
|
141
|
+
size: this.size,
|
|
142
|
+
shadow: this.shadow,
|
|
143
|
+
isHoverable: this.isHoverable,
|
|
144
|
+
hasNoWidth: !this.width,
|
|
145
|
+
class: `grid`
|
|
146
|
+
});
|
|
100
147
|
return shared_tailwindElement_index.x`
|
|
101
148
|
<div
|
|
102
149
|
data-testid="card"
|
|
103
|
-
style=${index.customStyleMap({
|
|
150
|
+
style=${index$1.customStyleMap({
|
|
104
151
|
[`min-height: ${this.height}px`]: !!this.height,
|
|
105
152
|
[`width: ${this.width}px`]: !!this.width
|
|
106
153
|
})}
|
|
107
|
-
class=${cn.cn(
|
|
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
|
-
})}
|
|
154
|
+
class=${cn.cn(cardStyles, this.customClass)}
|
|
114
155
|
>
|
|
115
156
|
<div
|
|
116
157
|
style=${styleMap.o({
|
|
@@ -154,20 +195,21 @@ exports.LuksoCard = class LuksoCard extends shared_tailwindElement_index.Tailwin
|
|
|
154
195
|
`;
|
|
155
196
|
}
|
|
156
197
|
profile2Template() {
|
|
198
|
+
const cardStyles = this.cardStyles({
|
|
199
|
+
size: this.size,
|
|
200
|
+
shadow: this.shadow,
|
|
201
|
+
isHoverable: this.isHoverable,
|
|
202
|
+
hasNoWidth: !this.width,
|
|
203
|
+
class: `grid grid-rows-[auto,1fr]`
|
|
204
|
+
});
|
|
157
205
|
return shared_tailwindElement_index.x`
|
|
158
206
|
<div
|
|
159
207
|
data-testid="card"
|
|
160
|
-
style=${index.customStyleMap({
|
|
208
|
+
style=${index$1.customStyleMap({
|
|
161
209
|
[`min-height: ${this.height}px`]: !!this.height,
|
|
162
210
|
[`width: ${this.width}px`]: !!this.width
|
|
163
211
|
})}
|
|
164
|
-
class=${cn.cn(
|
|
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
|
-
})}
|
|
212
|
+
class=${cn.cn(cardStyles, this.customClass)}
|
|
171
213
|
>
|
|
172
214
|
<div
|
|
173
215
|
style=${styleMap.o({
|
|
@@ -213,20 +255,21 @@ exports.LuksoCard = class LuksoCard extends shared_tailwindElement_index.Tailwin
|
|
|
213
255
|
`;
|
|
214
256
|
}
|
|
215
257
|
heroTemplate() {
|
|
258
|
+
const cardStyles = this.cardStyles({
|
|
259
|
+
size: this.size,
|
|
260
|
+
shadow: this.shadow,
|
|
261
|
+
isHoverable: this.isHoverable,
|
|
262
|
+
hasNoWidth: !this.width,
|
|
263
|
+
class: `h-[240px] flex`
|
|
264
|
+
});
|
|
216
265
|
return shared_tailwindElement_index.x`
|
|
217
266
|
<div
|
|
218
267
|
data-testid="card"
|
|
219
|
-
style=${index.customStyleMap({
|
|
268
|
+
style=${index$1.customStyleMap({
|
|
220
269
|
[`min-height: ${this.height}px`]: !!this.height,
|
|
221
270
|
[`width: ${this.width}px`]: !!this.width
|
|
222
271
|
})}
|
|
223
|
-
class=${cn.cn(
|
|
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
|
-
})}
|
|
272
|
+
class=${cn.cn(cardStyles, this.customClass)}
|
|
230
273
|
>
|
|
231
274
|
<div
|
|
232
275
|
style=${styleMap.o({
|
|
@@ -247,20 +290,21 @@ exports.LuksoCard = class LuksoCard extends shared_tailwindElement_index.Tailwin
|
|
|
247
290
|
`;
|
|
248
291
|
}
|
|
249
292
|
dappTemplate() {
|
|
293
|
+
const cardStyles = this.cardStyles({
|
|
294
|
+
size: this.size,
|
|
295
|
+
shadow: this.shadow,
|
|
296
|
+
isHoverable: this.isHoverable,
|
|
297
|
+
hasNoWidth: !this.width,
|
|
298
|
+
class: `grid grid-rows-[auto,1fr]`
|
|
299
|
+
});
|
|
250
300
|
return shared_tailwindElement_index.x`
|
|
251
301
|
<div
|
|
252
302
|
data-testid="card"
|
|
253
|
-
style=${index.customStyleMap({
|
|
303
|
+
style=${index$1.customStyleMap({
|
|
254
304
|
[`min-height: ${this.height}px`]: !!this.height,
|
|
255
305
|
[`width: ${this.width}px`]: !!this.width
|
|
256
306
|
})}
|
|
257
|
-
class=${cn.cn(
|
|
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
|
-
})}
|
|
307
|
+
class=${cn.cn(cardStyles, this.customClass)}
|
|
264
308
|
>
|
|
265
309
|
<div
|
|
266
310
|
style=${styleMap.o({
|
|
@@ -327,6 +371,9 @@ __decorateClass([
|
|
|
327
371
|
__decorateClass([
|
|
328
372
|
queryAssignedElements.n({ type: String })
|
|
329
373
|
], exports.LuksoCard.prototype, "size", 2);
|
|
374
|
+
__decorateClass([
|
|
375
|
+
queryAssignedElements.n({ type: String })
|
|
376
|
+
], exports.LuksoCard.prototype, "shadow", 2);
|
|
330
377
|
__decorateClass([
|
|
331
378
|
queryAssignedElements.n({ type: Boolean, attribute: "is-hoverable" })
|
|
332
379
|
], exports.LuksoCard.prototype, "isHoverable", 2);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type CardVariants = 'basic' | 'with-header' | 'profile' | 'profile-2' | 'hero' | 'dapp';
|
|
2
2
|
export type CardSizes = 'small' | 'medium';
|
|
3
|
+
export type CardShadows = 'small' | 'medium' | 'large';
|
|
3
4
|
declare const LuksoCard_base: typeof import("lit").LitElement;
|
|
4
5
|
export declare class LuksoCard extends LuksoCard_base {
|
|
5
6
|
variant: CardVariants;
|
|
@@ -11,11 +12,13 @@ export declare class LuksoCard extends LuksoCard_base {
|
|
|
11
12
|
customClass: string;
|
|
12
13
|
headerClass: string;
|
|
13
14
|
size: CardSizes;
|
|
15
|
+
shadow: CardShadows;
|
|
14
16
|
isHoverable: boolean;
|
|
15
17
|
private mediumStyles;
|
|
16
18
|
private smallStyles;
|
|
17
19
|
private smallHoverStyles;
|
|
18
20
|
private backgroundImageOrGradient;
|
|
21
|
+
private cardStyles;
|
|
19
22
|
basicTemplate(): import("lit-html").TemplateResult<1>;
|
|
20
23
|
withHeaderTemplate(): import("lit-html").TemplateResult<1>;
|
|
21
24
|
profileTemplate(): import("lit-html").TemplateResult<1>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-card/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-card/index.ts"],"names":[],"mappings":"AAOA,OAAO,4BAA4B,CAAA;AAInC,MAAM,MAAM,YAAY,GACpB,OAAO,GACP,aAAa,GACb,SAAS,GACT,WAAW,GACX,MAAM,GACN,MAAM,CAAA;AAEV,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAA;AAE1C,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;;AAEtD,qBACa,SAAU,SAAQ,cAA4B;IAEzD,OAAO,EAAE,YAAY,CAAU;IAG/B,aAAa,SAAK;IAGlB,UAAU,SAAK;IAGf,cAAc,SAAK;IAGnB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAY;IAGrC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAY;IAGtC,WAAW,SAAK;IAGhB,WAAW,SAAK;IAGhB,IAAI,EAAE,SAAS,CAAW;IAG1B,MAAM,EAAE,WAAW,CAAU;IAG7B,WAAW,UAAQ;IAEnB,OAAO,CAAC,YAAY,CAA8C;IAClE,OAAO,CAAC,WAAW,CAA0C;IAC7D,OAAO,CAAC,gBAAgB,CAAmE;IAE3F,OAAO,CAAC,yBAAyB;IAYjC,OAAO,CAAC,UAAU,CAoChB;IAEF,aAAa;IAsBb,kBAAkB;IA4BlB,eAAe;IA6Df,gBAAgB;IA+DhB,YAAY;IAsCZ,YAAY;IAwCZ,MAAM;CAgBP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAA;KACxB;CACF"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { T as TailwindStyledElement, x } from '../../index-
|
|
1
|
+
import { T as TailwindStyledElement, x } from '../../index-3d7e2144.js';
|
|
2
2
|
import { n, e } from '../../query-assigned-elements-5d94572f.js';
|
|
3
|
-
import { o } from '../../style-map-
|
|
3
|
+
import { o } from '../../style-map-6fdea6cc.js';
|
|
4
|
+
import { s as se } from '../../index-c55a1069.js';
|
|
4
5
|
import '../lukso-profile/index.js';
|
|
5
6
|
import '../../tailwind-config.js';
|
|
6
7
|
import { c as cn } from '../../cn-616567d4.js';
|
|
7
|
-
import { c as customStyleMap } from '../../index-
|
|
8
|
+
import { c as customStyleMap } from '../../index-3e1c4760.js';
|
|
8
9
|
import '../../directive-2bb7789e.js';
|
|
9
10
|
import '../../index-5e194caf.js';
|
|
10
11
|
|
|
@@ -33,10 +34,48 @@ let LuksoCard = class extends TailwindStyledElement(style) {
|
|
|
33
34
|
this.customClass = "";
|
|
34
35
|
this.headerClass = "";
|
|
35
36
|
this.size = "medium";
|
|
37
|
+
this.shadow = "large";
|
|
36
38
|
this.isHoverable = false;
|
|
37
39
|
this.mediumStyles = `rounded-24 shadow-neutral-drop-shadow-2xl`;
|
|
38
40
|
this.smallStyles = `rounded-12 shadow-neutral-drop-shadow`;
|
|
39
41
|
this.smallHoverStyles = `hover:shadow-neutral-drop-shadow-1xl cursor-pointer transition`;
|
|
42
|
+
this.cardStyles = se({
|
|
43
|
+
base: `bg-neutral-100`,
|
|
44
|
+
variants: {
|
|
45
|
+
size: {
|
|
46
|
+
small: `rounded-12`,
|
|
47
|
+
medium: `rounded-24`
|
|
48
|
+
},
|
|
49
|
+
shadow: {
|
|
50
|
+
small: `shadow-neutral-drop-shadow`,
|
|
51
|
+
medium: `shadow-neutral-drop-shadow-1xl`,
|
|
52
|
+
large: `shadow-neutral-drop-shadow-2xl`
|
|
53
|
+
},
|
|
54
|
+
isHoverable: {
|
|
55
|
+
true: `cursor-pointer transition`
|
|
56
|
+
},
|
|
57
|
+
hasNoWidth: {
|
|
58
|
+
true: `w-full`
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
compoundVariants: [
|
|
62
|
+
{
|
|
63
|
+
shadow: "small",
|
|
64
|
+
isHoverable: true,
|
|
65
|
+
class: `hover:shadow-neutral-drop-shadow-1xl`
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
shadow: "medium",
|
|
69
|
+
isHoverable: true,
|
|
70
|
+
class: `hover:shadow-neutral-drop-shadow-2xl`
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
shadow: "large",
|
|
74
|
+
isHoverable: true,
|
|
75
|
+
class: `hover:shadow-neutral-drop-shadow-3xl`
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
});
|
|
40
79
|
}
|
|
41
80
|
backgroundImageOrGradient() {
|
|
42
81
|
const opacity = "80";
|
|
@@ -48,6 +87,12 @@ let LuksoCard = class extends TailwindStyledElement(style) {
|
|
|
48
87
|
return `linear-gradient(90deg, ${gradientStart}, ${gradientEnd})`;
|
|
49
88
|
}
|
|
50
89
|
basicTemplate() {
|
|
90
|
+
const cardStyles = this.cardStyles({
|
|
91
|
+
size: this.size,
|
|
92
|
+
shadow: this.shadow,
|
|
93
|
+
isHoverable: this.isHoverable,
|
|
94
|
+
hasNoWidth: !this.width
|
|
95
|
+
});
|
|
51
96
|
return x`
|
|
52
97
|
<div
|
|
53
98
|
data-testid="card"
|
|
@@ -55,19 +100,20 @@ let LuksoCard = class extends TailwindStyledElement(style) {
|
|
|
55
100
|
[`min-height: ${this.height}px`]: !!this.height,
|
|
56
101
|
[`width: ${this.width}px`]: !!this.width
|
|
57
102
|
})}
|
|
58
|
-
class=${cn(
|
|
59
|
-
[this.mediumStyles]: !this.customClass && this.size === "medium",
|
|
60
|
-
[this.smallStyles]: !this.customClass && this.size === "small",
|
|
61
|
-
[this.smallHoverStyles]: this.isHoverable && this.size === "small",
|
|
62
|
-
[this.customClass]: !!this.customClass,
|
|
63
|
-
"w-full": !this.width
|
|
64
|
-
})}
|
|
103
|
+
class=${cn(cardStyles, this.customClass)}
|
|
65
104
|
>
|
|
66
105
|
<slot name="content"></slot>
|
|
67
106
|
</div>
|
|
68
107
|
`;
|
|
69
108
|
}
|
|
70
109
|
withHeaderTemplate() {
|
|
110
|
+
const cardStyles = this.cardStyles({
|
|
111
|
+
size: this.size,
|
|
112
|
+
shadow: this.shadow,
|
|
113
|
+
isHoverable: this.isHoverable,
|
|
114
|
+
hasNoWidth: !this.width,
|
|
115
|
+
class: `grid grid-rows-[auto,1fr] overflow-hidden`
|
|
116
|
+
});
|
|
71
117
|
return x`
|
|
72
118
|
<div
|
|
73
119
|
data-testid="card"
|
|
@@ -75,13 +121,7 @@ let LuksoCard = class extends TailwindStyledElement(style) {
|
|
|
75
121
|
minHeight: `${this.height}px`,
|
|
76
122
|
width: `${this.width}px`
|
|
77
123
|
})}
|
|
78
|
-
class=${cn(
|
|
79
|
-
[this.mediumStyles]: !this.customClass && this.size === "medium",
|
|
80
|
-
[this.smallStyles]: !this.customClass && this.size === "small",
|
|
81
|
-
[this.smallHoverStyles]: this.isHoverable && this.size === "small",
|
|
82
|
-
[this.customClass]: !!this.customClass,
|
|
83
|
-
"w-full": !this.width
|
|
84
|
-
})}
|
|
124
|
+
class=${cn(cardStyles, this.customClass)}
|
|
85
125
|
>
|
|
86
126
|
<div class=${this.headerClass}>
|
|
87
127
|
<slot name="header"></slot>
|
|
@@ -93,6 +133,13 @@ let LuksoCard = class extends TailwindStyledElement(style) {
|
|
|
93
133
|
`;
|
|
94
134
|
}
|
|
95
135
|
profileTemplate() {
|
|
136
|
+
const cardStyles = this.cardStyles({
|
|
137
|
+
size: this.size,
|
|
138
|
+
shadow: this.shadow,
|
|
139
|
+
isHoverable: this.isHoverable,
|
|
140
|
+
hasNoWidth: !this.width,
|
|
141
|
+
class: `grid`
|
|
142
|
+
});
|
|
96
143
|
return x`
|
|
97
144
|
<div
|
|
98
145
|
data-testid="card"
|
|
@@ -100,13 +147,7 @@ let LuksoCard = class extends TailwindStyledElement(style) {
|
|
|
100
147
|
[`min-height: ${this.height}px`]: !!this.height,
|
|
101
148
|
[`width: ${this.width}px`]: !!this.width
|
|
102
149
|
})}
|
|
103
|
-
class=${cn(
|
|
104
|
-
[this.mediumStyles]: !this.customClass && this.size === "medium",
|
|
105
|
-
[this.smallStyles]: !this.customClass && this.size === "small",
|
|
106
|
-
[this.smallHoverStyles]: this.isHoverable && this.size === "small",
|
|
107
|
-
[this.customClass]: !!this.customClass,
|
|
108
|
-
"w-full": !this.width
|
|
109
|
-
})}
|
|
150
|
+
class=${cn(cardStyles, this.customClass)}
|
|
110
151
|
>
|
|
111
152
|
<div
|
|
112
153
|
style=${o({
|
|
@@ -150,6 +191,13 @@ let LuksoCard = class extends TailwindStyledElement(style) {
|
|
|
150
191
|
`;
|
|
151
192
|
}
|
|
152
193
|
profile2Template() {
|
|
194
|
+
const cardStyles = this.cardStyles({
|
|
195
|
+
size: this.size,
|
|
196
|
+
shadow: this.shadow,
|
|
197
|
+
isHoverable: this.isHoverable,
|
|
198
|
+
hasNoWidth: !this.width,
|
|
199
|
+
class: `grid grid-rows-[auto,1fr]`
|
|
200
|
+
});
|
|
153
201
|
return x`
|
|
154
202
|
<div
|
|
155
203
|
data-testid="card"
|
|
@@ -157,13 +205,7 @@ let LuksoCard = class extends TailwindStyledElement(style) {
|
|
|
157
205
|
[`min-height: ${this.height}px`]: !!this.height,
|
|
158
206
|
[`width: ${this.width}px`]: !!this.width
|
|
159
207
|
})}
|
|
160
|
-
class=${cn(
|
|
161
|
-
[this.mediumStyles]: !this.customClass && this.size === "medium",
|
|
162
|
-
[this.smallStyles]: !this.customClass && this.size === "small",
|
|
163
|
-
[this.smallHoverStyles]: this.isHoverable && this.size === "small",
|
|
164
|
-
[this.customClass]: !!this.customClass,
|
|
165
|
-
["w-full"]: !this.width
|
|
166
|
-
})}
|
|
208
|
+
class=${cn(cardStyles, this.customClass)}
|
|
167
209
|
>
|
|
168
210
|
<div
|
|
169
211
|
style=${o({
|
|
@@ -209,6 +251,13 @@ let LuksoCard = class extends TailwindStyledElement(style) {
|
|
|
209
251
|
`;
|
|
210
252
|
}
|
|
211
253
|
heroTemplate() {
|
|
254
|
+
const cardStyles = this.cardStyles({
|
|
255
|
+
size: this.size,
|
|
256
|
+
shadow: this.shadow,
|
|
257
|
+
isHoverable: this.isHoverable,
|
|
258
|
+
hasNoWidth: !this.width,
|
|
259
|
+
class: `h-[240px] flex`
|
|
260
|
+
});
|
|
212
261
|
return x`
|
|
213
262
|
<div
|
|
214
263
|
data-testid="card"
|
|
@@ -216,13 +265,7 @@ let LuksoCard = class extends TailwindStyledElement(style) {
|
|
|
216
265
|
[`min-height: ${this.height}px`]: !!this.height,
|
|
217
266
|
[`width: ${this.width}px`]: !!this.width
|
|
218
267
|
})}
|
|
219
|
-
class=${cn(
|
|
220
|
-
[this.mediumStyles]: !this.customClass && this.size === "medium",
|
|
221
|
-
[this.smallStyles]: !this.customClass && this.size === "small",
|
|
222
|
-
[this.smallHoverStyles]: this.isHoverable && this.size === "small",
|
|
223
|
-
[this.customClass]: !!this.customClass,
|
|
224
|
-
["w-full"]: !this.width
|
|
225
|
-
})}
|
|
268
|
+
class=${cn(cardStyles, this.customClass)}
|
|
226
269
|
>
|
|
227
270
|
<div
|
|
228
271
|
style=${o({
|
|
@@ -243,6 +286,13 @@ let LuksoCard = class extends TailwindStyledElement(style) {
|
|
|
243
286
|
`;
|
|
244
287
|
}
|
|
245
288
|
dappTemplate() {
|
|
289
|
+
const cardStyles = this.cardStyles({
|
|
290
|
+
size: this.size,
|
|
291
|
+
shadow: this.shadow,
|
|
292
|
+
isHoverable: this.isHoverable,
|
|
293
|
+
hasNoWidth: !this.width,
|
|
294
|
+
class: `grid grid-rows-[auto,1fr]`
|
|
295
|
+
});
|
|
246
296
|
return x`
|
|
247
297
|
<div
|
|
248
298
|
data-testid="card"
|
|
@@ -250,13 +300,7 @@ let LuksoCard = class extends TailwindStyledElement(style) {
|
|
|
250
300
|
[`min-height: ${this.height}px`]: !!this.height,
|
|
251
301
|
[`width: ${this.width}px`]: !!this.width
|
|
252
302
|
})}
|
|
253
|
-
class=${cn(
|
|
254
|
-
[this.mediumStyles]: !this.customClass && this.size === "medium",
|
|
255
|
-
[this.smallStyles]: !this.customClass && this.size === "small",
|
|
256
|
-
[this.smallHoverStyles]: this.isHoverable && this.size === "small",
|
|
257
|
-
[this.customClass]: !!this.customClass,
|
|
258
|
-
["w-full"]: !this.width
|
|
259
|
-
})}
|
|
303
|
+
class=${cn(cardStyles, this.customClass)}
|
|
260
304
|
>
|
|
261
305
|
<div
|
|
262
306
|
style=${o({
|
|
@@ -323,6 +367,9 @@ __decorateClass([
|
|
|
323
367
|
__decorateClass([
|
|
324
368
|
n({ type: String })
|
|
325
369
|
], LuksoCard.prototype, "size", 2);
|
|
370
|
+
__decorateClass([
|
|
371
|
+
n({ type: String })
|
|
372
|
+
], LuksoCard.prototype, "shadow", 2);
|
|
326
373
|
__decorateClass([
|
|
327
374
|
n({ type: Boolean, attribute: "is-hoverable" })
|
|
328
375
|
], LuksoCard.prototype, "isHoverable", 2);
|
|
@@ -24,4 +24,6 @@ export declare const CustomCard: any;
|
|
|
24
24
|
export declare const SmallCard: any;
|
|
25
25
|
/** Card can be as hoverable element with `is-hoverable` property. */
|
|
26
26
|
export declare const HoverableCard: any;
|
|
27
|
+
/** You can select card shadow with `shadow` property. */
|
|
28
|
+
export declare const Shadow: any;
|
|
27
29
|
//# sourceMappingURL=lukso-card.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lukso-card.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-card/lukso-card.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AAEhD,OAAO,SAAS,CAAA;AAChB,OAAO,kBAAkB,CAAA;AACzB,OAAO,mBAAmB,CAAA;AAE1B,qJAAqJ;AACrJ,QAAA,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"lukso-card.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-card/lukso-card.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AAEhD,OAAO,SAAS,CAAA;AAChB,OAAO,kBAAkB,CAAA;AACzB,OAAO,mBAAmB,CAAA;AAE1B,qJAAqJ;AACrJ,QAAA,MAAM,IAAI,EAAE,IAyIX,CAAA;AAED,eAAe,IAAI,CAAA;AA4InB,iDAAiD;AACjD,eAAO,MAAM,WAAW,KAA2B,CAAA;AAQnD,iHAAiH;AACjH,eAAO,MAAM,SAAS,KAA2B,CAAA;AAYjD,wCAAwC;AACxC,eAAO,MAAM,cAAc,KAA2B,CAAA;AAatD,+EAA+E;AAC/E,eAAO,MAAM,oBAAoB,KAAgC,CAAA;AAajE,sIAAsI;AACtI,eAAO,MAAM,WAAW,KAA2B,CAAA;AAmBnD,uCAAuC;AACvC,eAAO,MAAM,YAAY,KAA2B,CAAA;AAOpD,kCAAkC;AAClC,eAAO,MAAM,QAAQ,KAAwB,CAAA;AAK7C,kCAAkC;AAClC,eAAO,MAAM,QAAQ,KAA2B,CAAA;AAKhD,uGAAuG;AACvG,eAAO,MAAM,UAAU,KAA2B,CAAA;AAalD,sDAAsD;AACtD,eAAO,MAAM,SAAS,KAA2B,CAAA;AAKjD,sEAAsE;AACtE,eAAO,MAAM,aAAa,KAA2B,CAAA;AAOrD,0DAA0D;AAC1D,eAAO,MAAM,MAAM,KAA2B,CAAA"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const shared_tailwindElement_index = require('../../index-
|
|
5
|
+
const shared_tailwindElement_index = require('../../index-6da9ae7b.cjs');
|
|
6
6
|
const queryAssignedElements = require('../../query-assigned-elements-1d5d9d4c.cjs');
|
|
7
7
|
const state = require('../../state-f73a8b4f.cjs');
|
|
8
8
|
const index = require('../../index-e9668573.cjs');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as TailwindElement, x, A } from '../../index-
|
|
1
|
+
import { a as TailwindElement, x, A } from '../../index-3d7e2144.js';
|
|
2
2
|
import { n, e } from '../../query-assigned-elements-5d94572f.js';
|
|
3
3
|
import { t } from '../../state-0a779257.js';
|
|
4
4
|
import { c as customClassMap } from '../../index-5e194caf.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const shared_tailwindElement_index = require('../../index-
|
|
5
|
+
const shared_tailwindElement_index = require('../../index-6da9ae7b.cjs');
|
|
6
6
|
const queryAssignedElements = require('../../query-assigned-elements-1d5d9d4c.cjs');
|
|
7
7
|
|
|
8
8
|
var __defProp = Object.defineProperty;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const shared_tailwindElement_index = require('../../index-
|
|
5
|
+
const shared_tailwindElement_index = require('../../index-6da9ae7b.cjs');
|
|
6
6
|
const queryAssignedElements = require('../../query-assigned-elements-1d5d9d4c.cjs');
|
|
7
|
-
const styleMap = require('../../style-map-
|
|
7
|
+
const styleMap = require('../../style-map-ed77e6b4.cjs');
|
|
8
8
|
require('../../directive-8278ab14.cjs');
|
|
9
9
|
|
|
10
10
|
const style = ":host {\n display: inline-flex\n}";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { x, T as TailwindStyledElement } from '../../index-
|
|
1
|
+
import { x, T as TailwindStyledElement } from '../../index-3d7e2144.js';
|
|
2
2
|
import { n, e } from '../../query-assigned-elements-5d94572f.js';
|
|
3
|
-
import { o } from '../../style-map-
|
|
3
|
+
import { o } from '../../style-map-6fdea6cc.js';
|
|
4
4
|
import '../../directive-2bb7789e.js';
|
|
5
5
|
|
|
6
6
|
const style = ":host {\n display: inline-flex\n}";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const shared_tailwindElement_index = require('../../index-
|
|
5
|
+
const shared_tailwindElement_index = require('../../index-6da9ae7b.cjs');
|
|
6
6
|
const queryAssignedElements = require('../../query-assigned-elements-1d5d9d4c.cjs');
|
|
7
7
|
const state = require('../../state-f73a8b4f.cjs');
|
|
8
8
|
const index = require('../../index-e9668573.cjs');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as TailwindElement, x, A } from '../../index-
|
|
1
|
+
import { a as TailwindElement, x, A } from '../../index-3d7e2144.js';
|
|
2
2
|
import { n, e } from '../../query-assigned-elements-5d94572f.js';
|
|
3
3
|
import { t } from '../../state-0a779257.js';
|
|
4
4
|
import { c as customClassMap } from '../../index-5e194caf.js';
|