@lukso/web-components 1.172.13 → 1.172.14
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/chunks/cn-LM_JlZIN.js +36 -0
- package/dist/chunks/cn-zamUNFMe.js +39 -0
- package/dist/chunks/directive-CY66atYi.js +22 -0
- package/dist/chunks/directive-DUHAbymA.js +15 -0
- package/dist/chunks/index-BNt_JinF.js +212 -0
- package/dist/chunks/{index-DG4rMUh3.js → index-BOEPqh0N.js} +1 -1
- package/dist/chunks/{index-F8ll4iy2.js → index-C5S-_QDF.js} +1 -1
- package/dist/chunks/{index-B_H2eYG_.js → index-CA6SrfZ-.js} +9 -8
- package/dist/chunks/{index-CZGvLdJ0.js → index-CqZm8OfY.js} +1 -2
- package/dist/chunks/index-Cy2_2lFt.js +214 -0
- package/dist/chunks/{index-Dn2DJhID.js → index-Ds-r8fCt.js} +77 -74
- package/dist/chunks/{index-C5YyB6ug.js → index-DvLZWpq9.js} +2 -3
- package/dist/chunks/{index-D_5wz2k1.js → index-UVrFZqIM.js} +79 -76
- package/dist/chunks/{index-BHAtoIlu.js → index-cakeic-M.js} +9 -8
- package/dist/chunks/{style-map-B7XFhSOK.js → style-map-AEeBQfPb.js} +2 -3
- package/dist/chunks/{style-map-BPljJihp.js → style-map-auscxO0L.js} +1 -2
- package/dist/components/index.cjs +4 -5
- package/dist/components/index.js +4 -5
- package/dist/components/lukso-alert/index.cjs +16 -15
- package/dist/components/lukso-alert/index.js +16 -15
- package/dist/components/lukso-button/index.cjs +42 -40
- package/dist/components/lukso-button/index.js +39 -37
- package/dist/components/lukso-card/index.cjs +66 -71
- package/dist/components/lukso-card/index.js +48 -53
- package/dist/components/lukso-checkbox/index.cjs +27 -26
- package/dist/components/lukso-checkbox/index.js +27 -26
- package/dist/components/lukso-collapse/index.cjs +27 -26
- package/dist/components/lukso-collapse/index.js +26 -25
- package/dist/components/lukso-color-picker/index.cjs +33 -31
- package/dist/components/lukso-color-picker/index.js +32 -30
- package/dist/components/lukso-dropdown/index.cjs +20 -19
- package/dist/components/lukso-dropdown/index.js +20 -19
- package/dist/components/lukso-dropdown-option/index.cjs +12 -11
- package/dist/components/lukso-dropdown-option/index.js +12 -11
- package/dist/components/lukso-footer/index.cjs +5 -4
- package/dist/components/lukso-footer/index.js +5 -4
- package/dist/components/lukso-form-description/index.cjs +7 -6
- package/dist/components/lukso-form-description/index.js +7 -6
- package/dist/components/lukso-form-error/index.cjs +7 -6
- package/dist/components/lukso-form-error/index.js +7 -6
- package/dist/components/lukso-form-label/index.cjs +8 -7
- package/dist/components/lukso-form-label/index.js +8 -7
- package/dist/components/lukso-icon/index.cjs +268 -267
- package/dist/components/lukso-icon/index.js +268 -267
- package/dist/components/lukso-image/index.cjs +12 -12
- package/dist/components/lukso-image/index.js +12 -12
- package/dist/components/lukso-input/index.cjs +49 -47
- package/dist/components/lukso-input/index.js +48 -46
- package/dist/components/lukso-markdown/index.cjs +13 -83
- package/dist/components/lukso-markdown/index.js +13 -83
- package/dist/components/lukso-markdown-editor/index.cjs +68 -67
- package/dist/components/lukso-markdown-editor/index.js +67 -66
- package/dist/components/lukso-modal/index.cjs +12 -11
- package/dist/components/lukso-modal/index.js +11 -10
- package/dist/components/lukso-navbar/index.cjs +30 -30
- package/dist/components/lukso-navbar/index.js +30 -30
- package/dist/components/lukso-pagination/index.cjs +16 -16
- package/dist/components/lukso-pagination/index.js +16 -16
- package/dist/components/lukso-profile/index.cjs +162 -11
- package/dist/components/lukso-profile/index.js +165 -5
- package/dist/components/lukso-progress/index.cjs +16 -13
- package/dist/components/lukso-progress/index.js +13 -10
- package/dist/components/lukso-qr-code/index.cjs +17 -34
- package/dist/components/lukso-qr-code/index.js +16 -33
- package/dist/components/lukso-radio/index.cjs +27 -25
- package/dist/components/lukso-radio/index.js +25 -23
- package/dist/components/lukso-radio-group/index.cjs +9 -9
- package/dist/components/lukso-radio-group/index.js +9 -9
- package/dist/components/lukso-sanitize/index.cjs +5 -4
- package/dist/components/lukso-sanitize/index.js +5 -4
- package/dist/components/lukso-search/index.cjs +11 -8
- package/dist/components/lukso-search/index.js +11 -8
- package/dist/components/lukso-select/index.cjs +47 -46
- package/dist/components/lukso-select/index.js +46 -45
- package/dist/components/lukso-share/index.cjs +7 -6
- package/dist/components/lukso-share/index.js +7 -6
- package/dist/components/lukso-switch/index.cjs +16 -15
- package/dist/components/lukso-switch/index.js +16 -15
- package/dist/components/lukso-tag/index.cjs +13 -12
- package/dist/components/lukso-tag/index.js +12 -11
- package/dist/components/lukso-terms/index.cjs +9 -8
- package/dist/components/lukso-terms/index.js +9 -8
- package/dist/components/lukso-textarea/index.cjs +36 -34
- package/dist/components/lukso-textarea/index.js +35 -33
- package/dist/components/lukso-tooltip/index.cjs +27 -3461
- package/dist/components/lukso-tooltip/index.js +27 -3461
- package/dist/components/lukso-username/index.cjs +11 -7
- package/dist/components/lukso-username/index.js +11 -7
- package/dist/components/lukso-wizard/index.cjs +13 -12
- package/dist/components/lukso-wizard/index.js +11 -10
- package/dist/index.cjs +6 -6
- package/dist/index.js +5 -5
- package/dist/shared/tailwind-element/index.cjs +15 -3
- package/dist/shared/tailwind-element/index.js +17 -1
- package/dist/vite.full.config.d.ts.map +1 -1
- package/package.json +7 -1
- package/dist/chunks/_commonjsHelpers-B85MJLTf.js +0 -5
- package/dist/chunks/_commonjsHelpers-CFO10eej.js +0 -7
- package/dist/chunks/axe-DJKac19y.js +0 -35093
- package/dist/chunks/axe-MHuN9KU0.js +0 -35097
- package/dist/chunks/base-Bn-zDNuZ.js +0 -93
- package/dist/chunks/base-Cl6v8-BZ.js +0 -8
- package/dist/chunks/base-KJhhKWYy.js +0 -91
- package/dist/chunks/base-NFGX42U4.js +0 -10
- package/dist/chunks/chunk-LQIOVPBE-CGhQ79Di.js +0 -370
- package/dist/chunks/chunk-LQIOVPBE-kQFZF_OS.js +0 -372
- package/dist/chunks/directive-BKuZRRPO.js +0 -8
- package/dist/chunks/directive-DT5Y-Nw0.js +0 -12
- package/dist/chunks/index-5X9ujrWL.js +0 -41
- package/dist/chunks/index-B9iart53.js +0 -2545
- package/dist/chunks/index-BAf8Hzhe.js +0 -611
- package/dist/chunks/index-BBFSnMaE.js +0 -1345
- package/dist/chunks/index-BDyLu6M0.js +0 -609
- package/dist/chunks/index-BxQ_0s_1.js +0 -50
- package/dist/chunks/index-CaJky2qL.js +0 -2547
- package/dist/chunks/index-glHBylgQ.js +0 -1347
- package/dist/chunks/isAddress-B1R_6-uN.js +0 -745
- package/dist/chunks/isAddress-BUdSrCaY.js +0 -743
- package/dist/chunks/property-D6IL6zax.js +0 -11
- package/dist/chunks/property-DfumgIL6.js +0 -9
- package/dist/chunks/query-CHb9Ft_d.js +0 -9
- package/dist/chunks/query-D3HF7Pde.js +0 -11
- package/dist/chunks/state-CFjY89m3.js +0 -11
- package/dist/chunks/state-CaelFSbE.js +0 -9
- package/dist/chunks/unsafe-html-BHBLEMoa.js +0 -10
- package/dist/chunks/unsafe-html-DiwkOQlV.js +0 -12
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { c as ce } from '../../chunks/index-B9iart53.js';
|
|
1
|
+
import { html, nothing } from 'lit';
|
|
2
|
+
import { property, state } from 'lit/decorators.js';
|
|
3
|
+
import { tv } from 'tailwind-variants';
|
|
5
4
|
import { s as safeCustomElement } from '../../chunks/safe-custom-element-qdGIR_v6.js';
|
|
5
|
+
import { TailwindElement } from '../../shared/tailwind-element/index.js';
|
|
6
6
|
import '../lukso-icon/index.js';
|
|
7
7
|
import '../lukso-tag/index.js';
|
|
8
8
|
|
|
@@ -31,7 +31,7 @@ let LuksoNavbar = class extends TailwindElement {
|
|
|
31
31
|
this.mobileBreakpoint = "md";
|
|
32
32
|
this.isMenuOpen = false;
|
|
33
33
|
this.defaultLogoUrl = "/assets/images/up-logo.png";
|
|
34
|
-
this.styles =
|
|
34
|
+
this.styles = tv({
|
|
35
35
|
slots: {
|
|
36
36
|
wrapper: "h-78 grid items-center",
|
|
37
37
|
mobileMenuWrapper: "items-center justify-end pr-6 flex gap-2",
|
|
@@ -143,21 +143,21 @@ let LuksoNavbar = class extends TailwindElement {
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
desktopMenuTemplate(styles) {
|
|
146
|
-
return
|
|
146
|
+
return html` <div class=${styles.desktopMenuWrapper()}>
|
|
147
147
|
<slot name="desktop-menu"></slot>
|
|
148
148
|
</div>`;
|
|
149
149
|
}
|
|
150
150
|
desktopCenterTemplate(styles) {
|
|
151
|
-
return
|
|
151
|
+
return html`<div class=${styles.desktopCenterWrapper()}>
|
|
152
152
|
<slot name="desktop-center"></slot>
|
|
153
153
|
</div>
|
|
154
154
|
<div class=${styles.desktopCenterPlaceholder()}></div>`;
|
|
155
155
|
}
|
|
156
156
|
mobileMenuTemplate(styles) {
|
|
157
|
-
return
|
|
157
|
+
return html`<div class=${styles.mobileMenuWrapper()}>
|
|
158
158
|
<slot name="mobile-menu"></slot>
|
|
159
159
|
|
|
160
|
-
${this.hasMobileDropdownMenu ?
|
|
160
|
+
${this.hasMobileDropdownMenu ? html` <div
|
|
161
161
|
class="flex items-center justify-center w-8 h-8 cursor-pointer"
|
|
162
162
|
@click=${this.handleMenuToggle}
|
|
163
163
|
>
|
|
@@ -168,11 +168,11 @@ let LuksoNavbar = class extends TailwindElement {
|
|
|
168
168
|
@click=${this.handleMenuToggle}
|
|
169
169
|
>
|
|
170
170
|
<slot name="mobile-dropdown"></slot>
|
|
171
|
-
</div>` :
|
|
171
|
+
</div>` : nothing}
|
|
172
172
|
</div>`;
|
|
173
173
|
}
|
|
174
174
|
brandTemplate() {
|
|
175
|
-
return
|
|
175
|
+
return html`
|
|
176
176
|
<div class="flex items-center px-6 md:px-10 h-[inherit]">
|
|
177
177
|
<div class="flex cursor-pointer group" @click=${this.handleBrandClick}>
|
|
178
178
|
<img
|
|
@@ -186,11 +186,11 @@ let LuksoNavbar = class extends TailwindElement {
|
|
|
186
186
|
>
|
|
187
187
|
<span>${this.title}</span>
|
|
188
188
|
</div>
|
|
189
|
-
${this.isTestnet ?
|
|
189
|
+
${this.isTestnet ? html`<lukso-tag background-color="yellow-65" class="ml-2">
|
|
190
190
|
TESTNET
|
|
191
|
-
</lukso-tag>` :
|
|
191
|
+
</lukso-tag>` : nothing}
|
|
192
192
|
</div>
|
|
193
|
-
${this.icon ?
|
|
193
|
+
${this.icon ? html`<div
|
|
194
194
|
class="flex border-l border-l-purple-82 h-7 items-center pl-3 ml-3"
|
|
195
195
|
>
|
|
196
196
|
<lukso-icon
|
|
@@ -199,12 +199,12 @@ let LuksoNavbar = class extends TailwindElement {
|
|
|
199
199
|
color="purple-51"
|
|
200
200
|
@click=${this.handleIconClick}
|
|
201
201
|
></lukso-icon>
|
|
202
|
-
</div>` :
|
|
202
|
+
</div>` : nothing}
|
|
203
203
|
</div>
|
|
204
204
|
`;
|
|
205
205
|
}
|
|
206
206
|
menuTemplate(styles) {
|
|
207
|
-
return
|
|
207
|
+
return html`<div class="flex items-center justify-end">
|
|
208
208
|
${this.desktopMenuTemplate(styles)} ${this.mobileMenuTemplate(styles)}
|
|
209
209
|
</div>`;
|
|
210
210
|
}
|
|
@@ -216,47 +216,47 @@ let LuksoNavbar = class extends TailwindElement {
|
|
|
216
216
|
mobileBreakpoint: this.mobileBreakpoint,
|
|
217
217
|
isMenuOpen: this.isMenuOpen
|
|
218
218
|
});
|
|
219
|
-
return
|
|
219
|
+
return html`
|
|
220
220
|
<nav data-testid="navbar" class=${styles.wrapper()}>
|
|
221
221
|
${this.brandTemplate()}
|
|
222
|
-
${this.isCenter ?
|
|
223
|
-
${this.isCenter ?
|
|
222
|
+
${this.isCenter ? nothing : this.desktopCenterTemplate(styles)}
|
|
223
|
+
${this.isCenter ? nothing : this.hasMenu ? this.menuTemplate(styles) : nothing}
|
|
224
224
|
</nav>
|
|
225
225
|
`;
|
|
226
226
|
}
|
|
227
227
|
};
|
|
228
228
|
__decorateClass([
|
|
229
|
-
|
|
229
|
+
property({ type: String })
|
|
230
230
|
], LuksoNavbar.prototype, "title", 2);
|
|
231
231
|
__decorateClass([
|
|
232
|
-
|
|
232
|
+
property({ type: Boolean, attribute: "is-center" })
|
|
233
233
|
], LuksoNavbar.prototype, "isCenter", 2);
|
|
234
234
|
__decorateClass([
|
|
235
|
-
|
|
235
|
+
property({ type: Boolean, attribute: "is-sticky" })
|
|
236
236
|
], LuksoNavbar.prototype, "isSticky", 2);
|
|
237
237
|
__decorateClass([
|
|
238
|
-
|
|
238
|
+
property({ type: Boolean, attribute: "is-transparent" })
|
|
239
239
|
], LuksoNavbar.prototype, "isTransparent", 2);
|
|
240
240
|
__decorateClass([
|
|
241
|
-
|
|
241
|
+
property({ type: Boolean, attribute: "is-testnet" })
|
|
242
242
|
], LuksoNavbar.prototype, "isTestnet", 2);
|
|
243
243
|
__decorateClass([
|
|
244
|
-
|
|
244
|
+
property({ type: String })
|
|
245
245
|
], LuksoNavbar.prototype, "icon", 2);
|
|
246
246
|
__decorateClass([
|
|
247
|
-
|
|
247
|
+
property({ type: Boolean, attribute: "has-menu" })
|
|
248
248
|
], LuksoNavbar.prototype, "hasMenu", 2);
|
|
249
249
|
__decorateClass([
|
|
250
|
-
|
|
250
|
+
property({ type: Boolean, attribute: "has-mobile-dropdown-menu" })
|
|
251
251
|
], LuksoNavbar.prototype, "hasMobileDropdownMenu", 2);
|
|
252
252
|
__decorateClass([
|
|
253
|
-
|
|
253
|
+
property({ type: String, attribute: "logo-url" })
|
|
254
254
|
], LuksoNavbar.prototype, "logoUrl", 2);
|
|
255
255
|
__decorateClass([
|
|
256
|
-
|
|
256
|
+
property({ type: String, attribute: "mobile-breakpoint" })
|
|
257
257
|
], LuksoNavbar.prototype, "mobileBreakpoint", 2);
|
|
258
258
|
__decorateClass([
|
|
259
|
-
|
|
259
|
+
state()
|
|
260
260
|
], LuksoNavbar.prototype, "isMenuOpen", 2);
|
|
261
261
|
LuksoNavbar = __decorateClass([
|
|
262
262
|
safeCustomElement("lukso-navbar")
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const index = require('../../chunks/index-CaJky2qL.js');
|
|
5
|
+
const lit = require('lit');
|
|
6
|
+
const decorators_js = require('lit/decorators.js');
|
|
7
|
+
const tailwindVariants = require('tailwind-variants');
|
|
9
8
|
const safeCustomElement = require('../../chunks/safe-custom-element-tQ-epw6h.js');
|
|
9
|
+
const shared_tailwindElement_index = require('../../shared/tailwind-element/index.cjs');
|
|
10
10
|
require('../lukso-icon/index.cjs');
|
|
11
11
|
require('../lukso-button/index.cjs');
|
|
12
12
|
|
|
@@ -30,7 +30,7 @@ exports.LuksoPagination = class LuksoPagination extends shared_tailwindElement_i
|
|
|
30
30
|
this.currentPage = 1;
|
|
31
31
|
this.totalPages = 0;
|
|
32
32
|
this.isMobile = false;
|
|
33
|
-
this.styles =
|
|
33
|
+
this.styles = tailwindVariants.tv({
|
|
34
34
|
slots: {
|
|
35
35
|
wrapper: "flex gap-2",
|
|
36
36
|
ellipsis: "items-center flex justify-center",
|
|
@@ -125,7 +125,7 @@ exports.LuksoPagination = class LuksoPagination extends shared_tailwindElement_i
|
|
|
125
125
|
return this.size === "small" ? "medium" : "large";
|
|
126
126
|
}
|
|
127
127
|
prevPageTemplate() {
|
|
128
|
-
return
|
|
128
|
+
return lit.html`<lukso-button
|
|
129
129
|
size=${this.size}
|
|
130
130
|
variant=${this.variant}
|
|
131
131
|
is-icon
|
|
@@ -140,7 +140,7 @@ exports.LuksoPagination = class LuksoPagination extends shared_tailwindElement_i
|
|
|
140
140
|
</lukso-button>`;
|
|
141
141
|
}
|
|
142
142
|
nextPageTemplate() {
|
|
143
|
-
return
|
|
143
|
+
return lit.html`<lukso-button
|
|
144
144
|
size=${this.size}
|
|
145
145
|
variant=${this.variant}
|
|
146
146
|
is-icon
|
|
@@ -158,12 +158,12 @@ exports.LuksoPagination = class LuksoPagination extends shared_tailwindElement_i
|
|
|
158
158
|
const numberTemplates = [];
|
|
159
159
|
for (const item of this.pagination.items) {
|
|
160
160
|
if (item === "...") {
|
|
161
|
-
numberTemplates.push(
|
|
161
|
+
numberTemplates.push(lit.html` <div class=${ellipsisStyles}>...</div> `);
|
|
162
162
|
continue;
|
|
163
163
|
}
|
|
164
164
|
if (typeof item === "number") {
|
|
165
165
|
numberTemplates.push(
|
|
166
|
-
|
|
166
|
+
lit.html`<lukso-button
|
|
167
167
|
size=${this.size}
|
|
168
168
|
variant=${this.variant}
|
|
169
169
|
?disabled=${this.currentPage === item}
|
|
@@ -182,7 +182,7 @@ exports.LuksoPagination = class LuksoPagination extends shared_tailwindElement_i
|
|
|
182
182
|
const { wrapper, ellipsis, numbers } = this.styles({
|
|
183
183
|
size: this.size
|
|
184
184
|
});
|
|
185
|
-
return
|
|
185
|
+
return lit.html`
|
|
186
186
|
<div class=${wrapper()}>
|
|
187
187
|
${this.prevPageTemplate()}
|
|
188
188
|
${this.numbersTemplate(ellipsis(), numbers())}
|
|
@@ -192,22 +192,22 @@ exports.LuksoPagination = class LuksoPagination extends shared_tailwindElement_i
|
|
|
192
192
|
}
|
|
193
193
|
};
|
|
194
194
|
__decorateClass([
|
|
195
|
-
property
|
|
195
|
+
decorators_js.property({ type: String })
|
|
196
196
|
], exports.LuksoPagination.prototype, "variant", 2);
|
|
197
197
|
__decorateClass([
|
|
198
|
-
property
|
|
198
|
+
decorators_js.property({ type: String })
|
|
199
199
|
], exports.LuksoPagination.prototype, "size", 2);
|
|
200
200
|
__decorateClass([
|
|
201
|
-
property
|
|
201
|
+
decorators_js.property({ type: Number, attribute: "current-page" })
|
|
202
202
|
], exports.LuksoPagination.prototype, "currentPage", 2);
|
|
203
203
|
__decorateClass([
|
|
204
|
-
property
|
|
204
|
+
decorators_js.property({ type: Number, attribute: "total-pages" })
|
|
205
205
|
], exports.LuksoPagination.prototype, "totalPages", 2);
|
|
206
206
|
__decorateClass([
|
|
207
|
-
property
|
|
207
|
+
decorators_js.property({ type: Boolean, attribute: "is-mobile" })
|
|
208
208
|
], exports.LuksoPagination.prototype, "isMobile", 2);
|
|
209
209
|
__decorateClass([
|
|
210
|
-
state
|
|
210
|
+
decorators_js.state()
|
|
211
211
|
], exports.LuksoPagination.prototype, "pagination", 2);
|
|
212
212
|
exports.LuksoPagination = __decorateClass([
|
|
213
213
|
safeCustomElement.safeCustomElement("lukso-pagination")
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { c as ce } from '../../chunks/index-B9iart53.js';
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { property, state } from 'lit/decorators.js';
|
|
3
|
+
import { tv } from 'tailwind-variants';
|
|
5
4
|
import { s as safeCustomElement } from '../../chunks/safe-custom-element-qdGIR_v6.js';
|
|
5
|
+
import { TailwindStyledElement } from '../../shared/tailwind-element/index.js';
|
|
6
6
|
import '../lukso-icon/index.js';
|
|
7
7
|
import '../lukso-button/index.js';
|
|
8
8
|
|
|
@@ -26,7 +26,7 @@ let LuksoPagination = class extends TailwindStyledElement(style) {
|
|
|
26
26
|
this.currentPage = 1;
|
|
27
27
|
this.totalPages = 0;
|
|
28
28
|
this.isMobile = false;
|
|
29
|
-
this.styles =
|
|
29
|
+
this.styles = tv({
|
|
30
30
|
slots: {
|
|
31
31
|
wrapper: "flex gap-2",
|
|
32
32
|
ellipsis: "items-center flex justify-center",
|
|
@@ -121,7 +121,7 @@ let LuksoPagination = class extends TailwindStyledElement(style) {
|
|
|
121
121
|
return this.size === "small" ? "medium" : "large";
|
|
122
122
|
}
|
|
123
123
|
prevPageTemplate() {
|
|
124
|
-
return
|
|
124
|
+
return html`<lukso-button
|
|
125
125
|
size=${this.size}
|
|
126
126
|
variant=${this.variant}
|
|
127
127
|
is-icon
|
|
@@ -136,7 +136,7 @@ let LuksoPagination = class extends TailwindStyledElement(style) {
|
|
|
136
136
|
</lukso-button>`;
|
|
137
137
|
}
|
|
138
138
|
nextPageTemplate() {
|
|
139
|
-
return
|
|
139
|
+
return html`<lukso-button
|
|
140
140
|
size=${this.size}
|
|
141
141
|
variant=${this.variant}
|
|
142
142
|
is-icon
|
|
@@ -154,12 +154,12 @@ let LuksoPagination = class extends TailwindStyledElement(style) {
|
|
|
154
154
|
const numberTemplates = [];
|
|
155
155
|
for (const item of this.pagination.items) {
|
|
156
156
|
if (item === "...") {
|
|
157
|
-
numberTemplates.push(
|
|
157
|
+
numberTemplates.push(html` <div class=${ellipsisStyles}>...</div> `);
|
|
158
158
|
continue;
|
|
159
159
|
}
|
|
160
160
|
if (typeof item === "number") {
|
|
161
161
|
numberTemplates.push(
|
|
162
|
-
|
|
162
|
+
html`<lukso-button
|
|
163
163
|
size=${this.size}
|
|
164
164
|
variant=${this.variant}
|
|
165
165
|
?disabled=${this.currentPage === item}
|
|
@@ -178,7 +178,7 @@ let LuksoPagination = class extends TailwindStyledElement(style) {
|
|
|
178
178
|
const { wrapper, ellipsis, numbers } = this.styles({
|
|
179
179
|
size: this.size
|
|
180
180
|
});
|
|
181
|
-
return
|
|
181
|
+
return html`
|
|
182
182
|
<div class=${wrapper()}>
|
|
183
183
|
${this.prevPageTemplate()}
|
|
184
184
|
${this.numbersTemplate(ellipsis(), numbers())}
|
|
@@ -188,22 +188,22 @@ let LuksoPagination = class extends TailwindStyledElement(style) {
|
|
|
188
188
|
}
|
|
189
189
|
};
|
|
190
190
|
__decorateClass([
|
|
191
|
-
|
|
191
|
+
property({ type: String })
|
|
192
192
|
], LuksoPagination.prototype, "variant", 2);
|
|
193
193
|
__decorateClass([
|
|
194
|
-
|
|
194
|
+
property({ type: String })
|
|
195
195
|
], LuksoPagination.prototype, "size", 2);
|
|
196
196
|
__decorateClass([
|
|
197
|
-
|
|
197
|
+
property({ type: Number, attribute: "current-page" })
|
|
198
198
|
], LuksoPagination.prototype, "currentPage", 2);
|
|
199
199
|
__decorateClass([
|
|
200
|
-
|
|
200
|
+
property({ type: Number, attribute: "total-pages" })
|
|
201
201
|
], LuksoPagination.prototype, "totalPages", 2);
|
|
202
202
|
__decorateClass([
|
|
203
|
-
|
|
203
|
+
property({ type: Boolean, attribute: "is-mobile" })
|
|
204
204
|
], LuksoPagination.prototype, "isMobile", 2);
|
|
205
205
|
__decorateClass([
|
|
206
|
-
|
|
206
|
+
state()
|
|
207
207
|
], LuksoPagination.prototype, "pagination", 2);
|
|
208
208
|
LuksoPagination = __decorateClass([
|
|
209
209
|
safeCustomElement("lukso-pagination")
|
|
@@ -2,16 +2,167 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
require('
|
|
7
|
-
const
|
|
8
|
-
require('
|
|
9
|
-
require('../../chunks/safe-custom-element-tQ-epw6h.js');
|
|
5
|
+
const lit = require('lit');
|
|
6
|
+
const decorators_js = require('lit/decorators.js');
|
|
7
|
+
const makeBlockie = require('ethereum-blockies-base64');
|
|
8
|
+
const tailwindVariants = require('tailwind-variants');
|
|
9
|
+
const safeCustomElement = require('../../chunks/safe-custom-element-tQ-epw6h.js');
|
|
10
|
+
const shared_tailwindElement_index = require('../../shared/tailwind-element/index.cjs');
|
|
10
11
|
require('../lukso-image/index.cjs');
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
var __defProp = Object.defineProperty;
|
|
14
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
15
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
16
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
17
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
18
|
+
if (decorator = decorators[i])
|
|
19
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
20
|
+
if (kind && result) __defProp(target, key, result);
|
|
21
|
+
return result;
|
|
22
|
+
};
|
|
23
|
+
exports.LuksoProfile = class LuksoProfile extends shared_tailwindElement_index.TailwindElement {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments);
|
|
26
|
+
this.profileUrl = "";
|
|
27
|
+
this.profileAddress = "";
|
|
28
|
+
this.hasIdenticon = false;
|
|
29
|
+
this.size = "large";
|
|
30
|
+
this.isSquare = false;
|
|
31
|
+
this.placeholder = "/assets/images/profile-default.svg";
|
|
32
|
+
this.profileStyles = tailwindVariants.tv({
|
|
33
|
+
slots: {
|
|
34
|
+
wrapper: "outline outline-2 outline-neutral-100 relative",
|
|
35
|
+
profile: "overflow-hidden",
|
|
36
|
+
identicon: "absolute shadow-shadow-1xl rounded-full outline outline-neutral-100 right-0 bottom-0"
|
|
37
|
+
},
|
|
38
|
+
variants: {
|
|
39
|
+
isSquare: {
|
|
40
|
+
false: {
|
|
41
|
+
wrapper: "rounded-full",
|
|
42
|
+
profile: "rounded-full"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
size: {
|
|
46
|
+
"2x-small": {
|
|
47
|
+
wrapper: "w-4 h-4",
|
|
48
|
+
profile: "w-4 h-4",
|
|
49
|
+
identicon: "w-2 h-2 outline-1"
|
|
50
|
+
},
|
|
51
|
+
"x-small": {
|
|
52
|
+
wrapper: "w-6 h-6",
|
|
53
|
+
profile: "w-6 h-6",
|
|
54
|
+
identicon: "w-3 h-3 outline-1"
|
|
55
|
+
},
|
|
56
|
+
small: {
|
|
57
|
+
wrapper: "w-10 h-10",
|
|
58
|
+
profile: "w-10 h-10",
|
|
59
|
+
identicon: "w-4 h-4 outline-2"
|
|
60
|
+
},
|
|
61
|
+
medium: {
|
|
62
|
+
wrapper: "w-14 h-14",
|
|
63
|
+
profile: "w-14 h-14",
|
|
64
|
+
identicon: "w-5 h-5 outline-2"
|
|
65
|
+
},
|
|
66
|
+
large: {
|
|
67
|
+
wrapper: "w-20 h-20",
|
|
68
|
+
profile: "w-20 h-20",
|
|
69
|
+
identicon: "w-6 h-6 outline-2"
|
|
70
|
+
},
|
|
71
|
+
"x-large": {
|
|
72
|
+
wrapper: "w-24 h-24",
|
|
73
|
+
profile: "w-24 h-24",
|
|
74
|
+
identicon: "w-7 h-7 outline-2"
|
|
75
|
+
},
|
|
76
|
+
"2x-large": {
|
|
77
|
+
wrapper: "w-30 h-30",
|
|
78
|
+
profile: "w-30 h-30",
|
|
79
|
+
identicon: "w-9 h-9 outline-[2.5px]"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
compoundVariants: [
|
|
84
|
+
{
|
|
85
|
+
isSquare: true,
|
|
86
|
+
size: ["2x-small", "x-small"],
|
|
87
|
+
class: {
|
|
88
|
+
wrapper: "rounded-[2px]",
|
|
89
|
+
profile: "rounded-[2px]"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
isSquare: true,
|
|
94
|
+
size: "small",
|
|
95
|
+
class: {
|
|
96
|
+
wrapper: "rounded-4",
|
|
97
|
+
profile: "rounded-4"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
isSquare: true,
|
|
102
|
+
size: "medium",
|
|
103
|
+
class: {
|
|
104
|
+
wrapper: "rounded-8",
|
|
105
|
+
profile: "rounded-8"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
isSquare: true,
|
|
110
|
+
size: "large",
|
|
111
|
+
class: {
|
|
112
|
+
wrapper: "rounded-[10px]",
|
|
113
|
+
profile: "rounded-[10px]"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
isSquare: true,
|
|
118
|
+
size: ["2x-large", "x-large"],
|
|
119
|
+
class: {
|
|
120
|
+
wrapper: "rounded-12",
|
|
121
|
+
profile: "rounded-12"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
identicon() {
|
|
128
|
+
return this.hasIdenticon && this.profileAddress ? makeBlockie(this.profileAddress) : "";
|
|
129
|
+
}
|
|
130
|
+
render() {
|
|
131
|
+
const { wrapper, profile, identicon } = this.profileStyles({
|
|
132
|
+
size: this.size,
|
|
133
|
+
isSquare: this.isSquare
|
|
134
|
+
});
|
|
135
|
+
return lit.html`
|
|
136
|
+
<div data-testid="profile" class=${wrapper()}>
|
|
137
|
+
<div class=${profile()}>
|
|
138
|
+
<lukso-image
|
|
139
|
+
src=${this.profileUrl}
|
|
140
|
+
placeholder=${this.placeholder}
|
|
141
|
+
></lukso-image>
|
|
142
|
+
</div>
|
|
143
|
+
${this.identicon() ? lit.html`<img src=${this.identicon()} class=${identicon()} alt="" />` : ""}
|
|
144
|
+
</div>
|
|
145
|
+
`;
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
__decorateClass([
|
|
149
|
+
decorators_js.property({ type: String, attribute: "profile-url", reflect: true })
|
|
150
|
+
], exports.LuksoProfile.prototype, "profileUrl", 2);
|
|
151
|
+
__decorateClass([
|
|
152
|
+
decorators_js.property({ type: String, attribute: "profile-address", reflect: true })
|
|
153
|
+
], exports.LuksoProfile.prototype, "profileAddress", 2);
|
|
154
|
+
__decorateClass([
|
|
155
|
+
decorators_js.property({ type: Boolean, attribute: "has-identicon", reflect: true })
|
|
156
|
+
], exports.LuksoProfile.prototype, "hasIdenticon", 2);
|
|
157
|
+
__decorateClass([
|
|
158
|
+
decorators_js.property({ type: String, reflect: true })
|
|
159
|
+
], exports.LuksoProfile.prototype, "size", 2);
|
|
160
|
+
__decorateClass([
|
|
161
|
+
decorators_js.property({ type: Boolean, attribute: "is-square" })
|
|
162
|
+
], exports.LuksoProfile.prototype, "isSquare", 2);
|
|
163
|
+
__decorateClass([
|
|
164
|
+
decorators_js.property({ type: String })
|
|
165
|
+
], exports.LuksoProfile.prototype, "placeholder", 2);
|
|
166
|
+
exports.LuksoProfile = __decorateClass([
|
|
167
|
+
safeCustomElement.safeCustomElement("lukso-profile")
|
|
168
|
+
], exports.LuksoProfile);
|