@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,17 +1,20 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import '
|
|
3
|
-
import '
|
|
4
|
-
import '
|
|
5
|
-
import '../../chunks/index-B9iart53.js';
|
|
1
|
+
import 'ethereum-blockies-base64';
|
|
2
|
+
import 'lit';
|
|
3
|
+
import 'lit/decorators.js';
|
|
4
|
+
import 'tailwind-variants';
|
|
6
5
|
import '../../chunks/safe-custom-element-qdGIR_v6.js';
|
|
7
6
|
import '../lukso-dropdown/index.js';
|
|
8
7
|
import '../lukso-dropdown-option/index.js';
|
|
9
8
|
import '../lukso-icon/index.js';
|
|
10
9
|
import '../lukso-input/index.js';
|
|
10
|
+
import '../lukso-profile/index.js';
|
|
11
11
|
import '../lukso-tag/index.js';
|
|
12
|
-
import '../../chunks/index-
|
|
12
|
+
import '../../chunks/index-BNt_JinF.js';
|
|
13
13
|
import '../lukso-tooltip/index.js';
|
|
14
|
+
import '../../shared/tailwind-element/index.js';
|
|
14
15
|
import '../../tailwind-config.js';
|
|
15
|
-
import '../../chunks/
|
|
16
|
-
|
|
16
|
+
import '../../chunks/cn-LM_JlZIN.js';
|
|
17
|
+
import 'viem';
|
|
18
|
+
import 'axe-core';
|
|
19
|
+
export { L as LuksoSearch } from '../../chunks/index-Ds-r8fCt.js';
|
|
17
20
|
import '../../chunks/uniq-id-CGUN-pJV.js';
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const components_luksoProfile_index = require('../../chunks/index-BAf8Hzhe.js');
|
|
5
|
+
const lit = require('lit');
|
|
6
|
+
const decorators_js = require('lit/decorators.js');
|
|
7
|
+
const tailwindVariants = require('tailwind-variants');
|
|
8
|
+
const makeBlockie = require('ethereum-blockies-base64');
|
|
10
9
|
const safeCustomElement = require('../../chunks/safe-custom-element-tQ-epw6h.js');
|
|
10
|
+
const shared_tailwindElement_index = require('../../shared/tailwind-element/index.cjs');
|
|
11
11
|
require('../lukso-icon/index.cjs');
|
|
12
|
-
require('
|
|
12
|
+
require('../lukso-profile/index.cjs');
|
|
13
|
+
require('../../chunks/index-Cy2_2lFt.js');
|
|
13
14
|
require('../lukso-dropdown/index.cjs');
|
|
14
15
|
require('../lukso-dropdown-option/index.cjs');
|
|
15
|
-
require('../../chunks/index-
|
|
16
|
+
require('../../chunks/index-cakeic-M.js');
|
|
16
17
|
require('../lukso-form-label/index.cjs');
|
|
17
18
|
require('../lukso-form-description/index.cjs');
|
|
18
19
|
require('../lukso-form-error/index.cjs');
|
|
@@ -52,7 +53,7 @@ exports.LuksoSelect = class LuksoSelect extends shared_tailwindElement_index.Tai
|
|
|
52
53
|
this.showSelectionCounter = false;
|
|
53
54
|
this.optionsParsed = [];
|
|
54
55
|
this.valueParsed = void 0;
|
|
55
|
-
this.inputStyles =
|
|
56
|
+
this.inputStyles = tailwindVariants.tv({
|
|
56
57
|
base: `bg-neutral-100
|
|
57
58
|
border border-solid placeholder:text-neutral-70 select-none whitespace-nowrap
|
|
58
59
|
outline-none transition transition-all duration-150 appearance-none
|
|
@@ -76,7 +77,7 @@ exports.LuksoSelect = class LuksoSelect extends shared_tailwindElement_index.Tai
|
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
});
|
|
79
|
-
this.counterStyles =
|
|
80
|
+
this.counterStyles = tailwindVariants.tv({
|
|
80
81
|
base: "border border-neutral-20",
|
|
81
82
|
variants: {
|
|
82
83
|
isDisabled: {
|
|
@@ -90,7 +91,7 @@ exports.LuksoSelect = class LuksoSelect extends shared_tailwindElement_index.Tai
|
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
});
|
|
93
|
-
this.iconStyles =
|
|
94
|
+
this.iconStyles = tailwindVariants.tv({
|
|
94
95
|
base: "absolute right-0 transition cursor-pointer",
|
|
95
96
|
variants: {
|
|
96
97
|
isDisabled: {
|
|
@@ -161,7 +162,7 @@ exports.LuksoSelect = class LuksoSelect extends shared_tailwindElement_index.Tai
|
|
|
161
162
|
borderless: this.borderless,
|
|
162
163
|
size: this.size
|
|
163
164
|
});
|
|
164
|
-
return
|
|
165
|
+
return lit.html`
|
|
165
166
|
<div
|
|
166
167
|
id=${this.id}
|
|
167
168
|
data-testid=${this.id ? `select-${this.id}` : "select"}
|
|
@@ -169,9 +170,9 @@ exports.LuksoSelect = class LuksoSelect extends shared_tailwindElement_index.Tai
|
|
|
169
170
|
@blur=${this.handleBlur}
|
|
170
171
|
@click=${this.handleClick}
|
|
171
172
|
>
|
|
172
|
-
${this.placeholder ? this.placeholder :
|
|
173
|
-
${!this.placeholder && this.valueParsed?.length ? this.selectedValueTemplate() :
|
|
174
|
-
${this.showSelectionCounter && this.valueParsed?.length ? this.selectedOptionsCounterTemplate() :
|
|
173
|
+
${this.placeholder ? this.placeholder : lit.nothing}
|
|
174
|
+
${!this.placeholder && this.valueParsed?.length ? this.selectedValueTemplate() : lit.nothing}
|
|
175
|
+
${this.showSelectionCounter && this.valueParsed?.length ? this.selectedOptionsCounterTemplate() : lit.nothing}
|
|
175
176
|
</div>
|
|
176
177
|
`;
|
|
177
178
|
}
|
|
@@ -180,7 +181,7 @@ exports.LuksoSelect = class LuksoSelect extends shared_tailwindElement_index.Tai
|
|
|
180
181
|
isDisabled: this.isDisabled,
|
|
181
182
|
size: this.size
|
|
182
183
|
});
|
|
183
|
-
return
|
|
184
|
+
return lit.html`<div class=${counterStyles}>${this.valueParsed?.length}</div>`;
|
|
184
185
|
}
|
|
185
186
|
optionsTemplate() {
|
|
186
187
|
const optionTemplates = [];
|
|
@@ -215,7 +216,7 @@ exports.LuksoSelect = class LuksoSelect extends shared_tailwindElement_index.Tai
|
|
|
215
216
|
console.error("Unknown option type", option);
|
|
216
217
|
}
|
|
217
218
|
}
|
|
218
|
-
return
|
|
219
|
+
return lit.html`<lukso-dropdown
|
|
219
220
|
size=${this.size}
|
|
220
221
|
is-open
|
|
221
222
|
is-open-on-outside-click
|
|
@@ -227,7 +228,7 @@ exports.LuksoSelect = class LuksoSelect extends shared_tailwindElement_index.Tai
|
|
|
227
228
|
>`;
|
|
228
229
|
}
|
|
229
230
|
optionGroupedStringTemplate(option, index) {
|
|
230
|
-
return
|
|
231
|
+
return lit.html`<div
|
|
231
232
|
class="paragraph-inter-10-bold-uppercase text-neutral-20 p-1 text-left"
|
|
232
233
|
>
|
|
233
234
|
${option.group}
|
|
@@ -240,7 +241,7 @@ exports.LuksoSelect = class LuksoSelect extends shared_tailwindElement_index.Tai
|
|
|
240
241
|
})}`;
|
|
241
242
|
}
|
|
242
243
|
optionStringTemplate(option, index) {
|
|
243
|
-
return
|
|
244
|
+
return lit.html`<lukso-dropdown-option
|
|
244
245
|
data-id="${option.id}"
|
|
245
246
|
data-index="${index + 1}"
|
|
246
247
|
?is-selected=${!!this.valueParsed?.find((value) => value.id === option.id)}
|
|
@@ -255,7 +256,7 @@ exports.LuksoSelect = class LuksoSelect extends shared_tailwindElement_index.Tai
|
|
|
255
256
|
</lukso-dropdown-option>`;
|
|
256
257
|
}
|
|
257
258
|
optionProfileTemplate(option, index) {
|
|
258
|
-
return
|
|
259
|
+
return lit.html`<lukso-dropdown-option
|
|
259
260
|
data-id="${option.id}"
|
|
260
261
|
data-index="${index + 1}"
|
|
261
262
|
?is-selected=${!!this.valueParsed?.find((value) => value.id === option.id)}
|
|
@@ -272,19 +273,19 @@ exports.LuksoSelect = class LuksoSelect extends shared_tailwindElement_index.Tai
|
|
|
272
273
|
return option.value;
|
|
273
274
|
}
|
|
274
275
|
optionProfileValue(option) {
|
|
275
|
-
const eoaProfilePicture =
|
|
276
|
+
const eoaProfilePicture = lit.html`<lukso-profile
|
|
276
277
|
profile-address="${option.address}"
|
|
277
|
-
profile-url="${option.address ?
|
|
278
|
+
profile-url="${option.address ? makeBlockie(option.address) : ""}"
|
|
278
279
|
size="x-small"
|
|
279
280
|
></lukso-profile>`;
|
|
280
|
-
const lsp3ProfilePicture =
|
|
281
|
+
const lsp3ProfilePicture = lit.html`<lukso-profile
|
|
281
282
|
profile-address="${option.address}"
|
|
282
283
|
profile-url="${option.image}"
|
|
283
284
|
size="x-small"
|
|
284
285
|
has-identicon
|
|
285
286
|
></lukso-profile>`;
|
|
286
287
|
const profilePicture = option.isEOA ? eoaProfilePicture : lsp3ProfilePicture;
|
|
287
|
-
return
|
|
288
|
+
return lit.html`${profilePicture}
|
|
288
289
|
<lukso-username
|
|
289
290
|
name="${option.name?.toLowerCase()}"
|
|
290
291
|
address="${option.address}"
|
|
@@ -391,7 +392,7 @@ exports.LuksoSelect = class LuksoSelect extends shared_tailwindElement_index.Tai
|
|
|
391
392
|
isOpen: this.isOpen,
|
|
392
393
|
size: this.size
|
|
393
394
|
});
|
|
394
|
-
return
|
|
395
|
+
return lit.html`
|
|
395
396
|
<div class="relative w-[inherit]">
|
|
396
397
|
<lukso-form-label label=${this.label}></lukso-form-label>
|
|
397
398
|
<lukso-form-description
|
|
@@ -406,7 +407,7 @@ exports.LuksoSelect = class LuksoSelect extends shared_tailwindElement_index.Tai
|
|
|
406
407
|
></lukso-icon>
|
|
407
408
|
</div>
|
|
408
409
|
<!-- options dropdown -->
|
|
409
|
-
${this.isOpen && this.optionsParsed.length > 0 ? this.optionsTemplate() :
|
|
410
|
+
${this.isOpen && this.optionsParsed.length > 0 ? this.optionsTemplate() : lit.nothing}
|
|
410
411
|
</div>
|
|
411
412
|
<lukso-form-error error=${this.error}></lukso-form-error>
|
|
412
413
|
</div>
|
|
@@ -414,67 +415,67 @@ exports.LuksoSelect = class LuksoSelect extends shared_tailwindElement_index.Tai
|
|
|
414
415
|
}
|
|
415
416
|
};
|
|
416
417
|
__decorateClass([
|
|
417
|
-
property
|
|
418
|
+
decorators_js.property({ type: String })
|
|
418
419
|
], exports.LuksoSelect.prototype, "value", 2);
|
|
419
420
|
__decorateClass([
|
|
420
|
-
property
|
|
421
|
+
decorators_js.property({ type: String })
|
|
421
422
|
], exports.LuksoSelect.prototype, "placeholder", 2);
|
|
422
423
|
__decorateClass([
|
|
423
|
-
property
|
|
424
|
+
decorators_js.property({ type: String })
|
|
424
425
|
], exports.LuksoSelect.prototype, "label", 2);
|
|
425
426
|
__decorateClass([
|
|
426
|
-
property
|
|
427
|
+
decorators_js.property({ type: String })
|
|
427
428
|
], exports.LuksoSelect.prototype, "id", 2);
|
|
428
429
|
__decorateClass([
|
|
429
|
-
property
|
|
430
|
+
decorators_js.property({ type: String })
|
|
430
431
|
], exports.LuksoSelect.prototype, "description", 2);
|
|
431
432
|
__decorateClass([
|
|
432
|
-
property
|
|
433
|
+
decorators_js.property({ type: String })
|
|
433
434
|
], exports.LuksoSelect.prototype, "error", 2);
|
|
434
435
|
__decorateClass([
|
|
435
|
-
property
|
|
436
|
+
decorators_js.property({ type: Boolean, attribute: "is-full-width" })
|
|
436
437
|
], exports.LuksoSelect.prototype, "isFullWidth", 2);
|
|
437
438
|
__decorateClass([
|
|
438
|
-
property
|
|
439
|
+
decorators_js.property({ type: Boolean, attribute: "is-readonly" })
|
|
439
440
|
], exports.LuksoSelect.prototype, "isReadonly", 2);
|
|
440
441
|
__decorateClass([
|
|
441
|
-
property
|
|
442
|
+
decorators_js.property({ type: Boolean, attribute: "is-disabled" })
|
|
442
443
|
], exports.LuksoSelect.prototype, "isDisabled", 2);
|
|
443
444
|
__decorateClass([
|
|
444
|
-
property
|
|
445
|
+
decorators_js.property({ type: Boolean })
|
|
445
446
|
], exports.LuksoSelect.prototype, "borderless", 2);
|
|
446
447
|
__decorateClass([
|
|
447
|
-
property
|
|
448
|
+
decorators_js.property({ type: String })
|
|
448
449
|
], exports.LuksoSelect.prototype, "options", 2);
|
|
449
450
|
__decorateClass([
|
|
450
|
-
property
|
|
451
|
+
decorators_js.property({ type: Number })
|
|
451
452
|
], exports.LuksoSelect.prototype, "selected", 2);
|
|
452
453
|
__decorateClass([
|
|
453
|
-
property
|
|
454
|
+
decorators_js.property({ type: Boolean, attribute: "is-open" })
|
|
454
455
|
], exports.LuksoSelect.prototype, "isOpen", 2);
|
|
455
456
|
__decorateClass([
|
|
456
|
-
property
|
|
457
|
+
decorators_js.property({ type: Boolean, attribute: "open-top" })
|
|
457
458
|
], exports.LuksoSelect.prototype, "openTop", 2);
|
|
458
459
|
__decorateClass([
|
|
459
|
-
property
|
|
460
|
+
decorators_js.property({ type: Boolean, attribute: "is-large-icon" })
|
|
460
461
|
], exports.LuksoSelect.prototype, "isLargeIcon", 2);
|
|
461
462
|
__decorateClass([
|
|
462
|
-
property
|
|
463
|
+
decorators_js.property({ type: Boolean, attribute: "is-right" })
|
|
463
464
|
], exports.LuksoSelect.prototype, "isRight", 2);
|
|
464
465
|
__decorateClass([
|
|
465
|
-
property
|
|
466
|
+
decorators_js.property({ type: String })
|
|
466
467
|
], exports.LuksoSelect.prototype, "size", 2);
|
|
467
468
|
__decorateClass([
|
|
468
|
-
property
|
|
469
|
+
decorators_js.property({ type: Boolean, attribute: "show-selection-counter" })
|
|
469
470
|
], exports.LuksoSelect.prototype, "showSelectionCounter", 2);
|
|
470
471
|
__decorateClass([
|
|
471
|
-
property
|
|
472
|
+
decorators_js.property({ type: Number, attribute: "max-height", reflect: true })
|
|
472
473
|
], exports.LuksoSelect.prototype, "maxHeight", 2);
|
|
473
474
|
__decorateClass([
|
|
474
|
-
state
|
|
475
|
+
decorators_js.state()
|
|
475
476
|
], exports.LuksoSelect.prototype, "optionsParsed", 2);
|
|
476
477
|
__decorateClass([
|
|
477
|
-
state
|
|
478
|
+
decorators_js.state()
|
|
478
479
|
], exports.LuksoSelect.prototype, "valueParsed", 2);
|
|
479
480
|
exports.LuksoSelect = __decorateClass([
|
|
480
481
|
safeCustomElement.safeCustomElement("lukso-select")
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { m as makeBlockie } from '../../chunks/index-BDyLu6M0.js';
|
|
1
|
+
import { nothing, html } from 'lit';
|
|
2
|
+
import { property, state } from 'lit/decorators.js';
|
|
3
|
+
import { tv } from 'tailwind-variants';
|
|
4
|
+
import makeBlockie from 'ethereum-blockies-base64';
|
|
6
5
|
import { s as safeCustomElement } from '../../chunks/safe-custom-element-qdGIR_v6.js';
|
|
6
|
+
import { TailwindStyledElement } from '../../shared/tailwind-element/index.js';
|
|
7
7
|
import '../lukso-icon/index.js';
|
|
8
|
-
import '
|
|
8
|
+
import '../lukso-profile/index.js';
|
|
9
|
+
import '../../chunks/index-BNt_JinF.js';
|
|
9
10
|
import '../lukso-dropdown/index.js';
|
|
10
11
|
import '../lukso-dropdown-option/index.js';
|
|
11
|
-
import '../../chunks/index-
|
|
12
|
+
import '../../chunks/index-CA6SrfZ-.js';
|
|
12
13
|
import '../lukso-form-label/index.js';
|
|
13
14
|
import '../lukso-form-description/index.js';
|
|
14
15
|
import '../lukso-form-error/index.js';
|
|
@@ -48,7 +49,7 @@ let LuksoSelect = class extends TailwindStyledElement(style) {
|
|
|
48
49
|
this.showSelectionCounter = false;
|
|
49
50
|
this.optionsParsed = [];
|
|
50
51
|
this.valueParsed = void 0;
|
|
51
|
-
this.inputStyles =
|
|
52
|
+
this.inputStyles = tv({
|
|
52
53
|
base: `bg-neutral-100
|
|
53
54
|
border border-solid placeholder:text-neutral-70 select-none whitespace-nowrap
|
|
54
55
|
outline-none transition transition-all duration-150 appearance-none
|
|
@@ -72,7 +73,7 @@ let LuksoSelect = class extends TailwindStyledElement(style) {
|
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
});
|
|
75
|
-
this.counterStyles =
|
|
76
|
+
this.counterStyles = tv({
|
|
76
77
|
base: "border border-neutral-20",
|
|
77
78
|
variants: {
|
|
78
79
|
isDisabled: {
|
|
@@ -86,7 +87,7 @@ let LuksoSelect = class extends TailwindStyledElement(style) {
|
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
89
|
});
|
|
89
|
-
this.iconStyles =
|
|
90
|
+
this.iconStyles = tv({
|
|
90
91
|
base: "absolute right-0 transition cursor-pointer",
|
|
91
92
|
variants: {
|
|
92
93
|
isDisabled: {
|
|
@@ -157,7 +158,7 @@ let LuksoSelect = class extends TailwindStyledElement(style) {
|
|
|
157
158
|
borderless: this.borderless,
|
|
158
159
|
size: this.size
|
|
159
160
|
});
|
|
160
|
-
return
|
|
161
|
+
return html`
|
|
161
162
|
<div
|
|
162
163
|
id=${this.id}
|
|
163
164
|
data-testid=${this.id ? `select-${this.id}` : "select"}
|
|
@@ -165,9 +166,9 @@ let LuksoSelect = class extends TailwindStyledElement(style) {
|
|
|
165
166
|
@blur=${this.handleBlur}
|
|
166
167
|
@click=${this.handleClick}
|
|
167
168
|
>
|
|
168
|
-
${this.placeholder ? this.placeholder :
|
|
169
|
-
${!this.placeholder && this.valueParsed?.length ? this.selectedValueTemplate() :
|
|
170
|
-
${this.showSelectionCounter && this.valueParsed?.length ? this.selectedOptionsCounterTemplate() :
|
|
169
|
+
${this.placeholder ? this.placeholder : nothing}
|
|
170
|
+
${!this.placeholder && this.valueParsed?.length ? this.selectedValueTemplate() : nothing}
|
|
171
|
+
${this.showSelectionCounter && this.valueParsed?.length ? this.selectedOptionsCounterTemplate() : nothing}
|
|
171
172
|
</div>
|
|
172
173
|
`;
|
|
173
174
|
}
|
|
@@ -176,7 +177,7 @@ let LuksoSelect = class extends TailwindStyledElement(style) {
|
|
|
176
177
|
isDisabled: this.isDisabled,
|
|
177
178
|
size: this.size
|
|
178
179
|
});
|
|
179
|
-
return
|
|
180
|
+
return html`<div class=${counterStyles}>${this.valueParsed?.length}</div>`;
|
|
180
181
|
}
|
|
181
182
|
optionsTemplate() {
|
|
182
183
|
const optionTemplates = [];
|
|
@@ -211,7 +212,7 @@ let LuksoSelect = class extends TailwindStyledElement(style) {
|
|
|
211
212
|
console.error("Unknown option type", option);
|
|
212
213
|
}
|
|
213
214
|
}
|
|
214
|
-
return
|
|
215
|
+
return html`<lukso-dropdown
|
|
215
216
|
size=${this.size}
|
|
216
217
|
is-open
|
|
217
218
|
is-open-on-outside-click
|
|
@@ -223,7 +224,7 @@ let LuksoSelect = class extends TailwindStyledElement(style) {
|
|
|
223
224
|
>`;
|
|
224
225
|
}
|
|
225
226
|
optionGroupedStringTemplate(option, index) {
|
|
226
|
-
return
|
|
227
|
+
return html`<div
|
|
227
228
|
class="paragraph-inter-10-bold-uppercase text-neutral-20 p-1 text-left"
|
|
228
229
|
>
|
|
229
230
|
${option.group}
|
|
@@ -236,7 +237,7 @@ let LuksoSelect = class extends TailwindStyledElement(style) {
|
|
|
236
237
|
})}`;
|
|
237
238
|
}
|
|
238
239
|
optionStringTemplate(option, index) {
|
|
239
|
-
return
|
|
240
|
+
return html`<lukso-dropdown-option
|
|
240
241
|
data-id="${option.id}"
|
|
241
242
|
data-index="${index + 1}"
|
|
242
243
|
?is-selected=${!!this.valueParsed?.find((value) => value.id === option.id)}
|
|
@@ -251,7 +252,7 @@ let LuksoSelect = class extends TailwindStyledElement(style) {
|
|
|
251
252
|
</lukso-dropdown-option>`;
|
|
252
253
|
}
|
|
253
254
|
optionProfileTemplate(option, index) {
|
|
254
|
-
return
|
|
255
|
+
return html`<lukso-dropdown-option
|
|
255
256
|
data-id="${option.id}"
|
|
256
257
|
data-index="${index + 1}"
|
|
257
258
|
?is-selected=${!!this.valueParsed?.find((value) => value.id === option.id)}
|
|
@@ -268,19 +269,19 @@ let LuksoSelect = class extends TailwindStyledElement(style) {
|
|
|
268
269
|
return option.value;
|
|
269
270
|
}
|
|
270
271
|
optionProfileValue(option) {
|
|
271
|
-
const eoaProfilePicture =
|
|
272
|
+
const eoaProfilePicture = html`<lukso-profile
|
|
272
273
|
profile-address="${option.address}"
|
|
273
274
|
profile-url="${option.address ? makeBlockie(option.address) : ""}"
|
|
274
275
|
size="x-small"
|
|
275
276
|
></lukso-profile>`;
|
|
276
|
-
const lsp3ProfilePicture =
|
|
277
|
+
const lsp3ProfilePicture = html`<lukso-profile
|
|
277
278
|
profile-address="${option.address}"
|
|
278
279
|
profile-url="${option.image}"
|
|
279
280
|
size="x-small"
|
|
280
281
|
has-identicon
|
|
281
282
|
></lukso-profile>`;
|
|
282
283
|
const profilePicture = option.isEOA ? eoaProfilePicture : lsp3ProfilePicture;
|
|
283
|
-
return
|
|
284
|
+
return html`${profilePicture}
|
|
284
285
|
<lukso-username
|
|
285
286
|
name="${option.name?.toLowerCase()}"
|
|
286
287
|
address="${option.address}"
|
|
@@ -387,7 +388,7 @@ let LuksoSelect = class extends TailwindStyledElement(style) {
|
|
|
387
388
|
isOpen: this.isOpen,
|
|
388
389
|
size: this.size
|
|
389
390
|
});
|
|
390
|
-
return
|
|
391
|
+
return html`
|
|
391
392
|
<div class="relative w-[inherit]">
|
|
392
393
|
<lukso-form-label label=${this.label}></lukso-form-label>
|
|
393
394
|
<lukso-form-description
|
|
@@ -402,7 +403,7 @@ let LuksoSelect = class extends TailwindStyledElement(style) {
|
|
|
402
403
|
></lukso-icon>
|
|
403
404
|
</div>
|
|
404
405
|
<!-- options dropdown -->
|
|
405
|
-
${this.isOpen && this.optionsParsed.length > 0 ? this.optionsTemplate() :
|
|
406
|
+
${this.isOpen && this.optionsParsed.length > 0 ? this.optionsTemplate() : nothing}
|
|
406
407
|
</div>
|
|
407
408
|
<lukso-form-error error=${this.error}></lukso-form-error>
|
|
408
409
|
</div>
|
|
@@ -410,67 +411,67 @@ let LuksoSelect = class extends TailwindStyledElement(style) {
|
|
|
410
411
|
}
|
|
411
412
|
};
|
|
412
413
|
__decorateClass([
|
|
413
|
-
|
|
414
|
+
property({ type: String })
|
|
414
415
|
], LuksoSelect.prototype, "value", 2);
|
|
415
416
|
__decorateClass([
|
|
416
|
-
|
|
417
|
+
property({ type: String })
|
|
417
418
|
], LuksoSelect.prototype, "placeholder", 2);
|
|
418
419
|
__decorateClass([
|
|
419
|
-
|
|
420
|
+
property({ type: String })
|
|
420
421
|
], LuksoSelect.prototype, "label", 2);
|
|
421
422
|
__decorateClass([
|
|
422
|
-
|
|
423
|
+
property({ type: String })
|
|
423
424
|
], LuksoSelect.prototype, "id", 2);
|
|
424
425
|
__decorateClass([
|
|
425
|
-
|
|
426
|
+
property({ type: String })
|
|
426
427
|
], LuksoSelect.prototype, "description", 2);
|
|
427
428
|
__decorateClass([
|
|
428
|
-
|
|
429
|
+
property({ type: String })
|
|
429
430
|
], LuksoSelect.prototype, "error", 2);
|
|
430
431
|
__decorateClass([
|
|
431
|
-
|
|
432
|
+
property({ type: Boolean, attribute: "is-full-width" })
|
|
432
433
|
], LuksoSelect.prototype, "isFullWidth", 2);
|
|
433
434
|
__decorateClass([
|
|
434
|
-
|
|
435
|
+
property({ type: Boolean, attribute: "is-readonly" })
|
|
435
436
|
], LuksoSelect.prototype, "isReadonly", 2);
|
|
436
437
|
__decorateClass([
|
|
437
|
-
|
|
438
|
+
property({ type: Boolean, attribute: "is-disabled" })
|
|
438
439
|
], LuksoSelect.prototype, "isDisabled", 2);
|
|
439
440
|
__decorateClass([
|
|
440
|
-
|
|
441
|
+
property({ type: Boolean })
|
|
441
442
|
], LuksoSelect.prototype, "borderless", 2);
|
|
442
443
|
__decorateClass([
|
|
443
|
-
|
|
444
|
+
property({ type: String })
|
|
444
445
|
], LuksoSelect.prototype, "options", 2);
|
|
445
446
|
__decorateClass([
|
|
446
|
-
|
|
447
|
+
property({ type: Number })
|
|
447
448
|
], LuksoSelect.prototype, "selected", 2);
|
|
448
449
|
__decorateClass([
|
|
449
|
-
|
|
450
|
+
property({ type: Boolean, attribute: "is-open" })
|
|
450
451
|
], LuksoSelect.prototype, "isOpen", 2);
|
|
451
452
|
__decorateClass([
|
|
452
|
-
|
|
453
|
+
property({ type: Boolean, attribute: "open-top" })
|
|
453
454
|
], LuksoSelect.prototype, "openTop", 2);
|
|
454
455
|
__decorateClass([
|
|
455
|
-
|
|
456
|
+
property({ type: Boolean, attribute: "is-large-icon" })
|
|
456
457
|
], LuksoSelect.prototype, "isLargeIcon", 2);
|
|
457
458
|
__decorateClass([
|
|
458
|
-
|
|
459
|
+
property({ type: Boolean, attribute: "is-right" })
|
|
459
460
|
], LuksoSelect.prototype, "isRight", 2);
|
|
460
461
|
__decorateClass([
|
|
461
|
-
|
|
462
|
+
property({ type: String })
|
|
462
463
|
], LuksoSelect.prototype, "size", 2);
|
|
463
464
|
__decorateClass([
|
|
464
|
-
|
|
465
|
+
property({ type: Boolean, attribute: "show-selection-counter" })
|
|
465
466
|
], LuksoSelect.prototype, "showSelectionCounter", 2);
|
|
466
467
|
__decorateClass([
|
|
467
|
-
|
|
468
|
+
property({ type: Number, attribute: "max-height", reflect: true })
|
|
468
469
|
], LuksoSelect.prototype, "maxHeight", 2);
|
|
469
470
|
__decorateClass([
|
|
470
|
-
|
|
471
|
+
state()
|
|
471
472
|
], LuksoSelect.prototype, "optionsParsed", 2);
|
|
472
473
|
__decorateClass([
|
|
473
|
-
|
|
474
|
+
state()
|
|
474
475
|
], LuksoSelect.prototype, "valueParsed", 2);
|
|
475
476
|
LuksoSelect = __decorateClass([
|
|
476
477
|
safeCustomElement("lukso-select")
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const lit = require('lit');
|
|
6
|
+
const decorators_js = require('lit/decorators.js');
|
|
7
7
|
const safeCustomElement = require('../../chunks/safe-custom-element-tQ-epw6h.js');
|
|
8
|
+
const shared_tailwindElement_index = require('../../shared/tailwind-element/index.cjs');
|
|
8
9
|
|
|
9
10
|
const style = ":host {\n display: inline-flex\n}";
|
|
10
11
|
|
|
@@ -45,7 +46,7 @@ exports.LuksoShare = class LuksoShare extends shared_tailwindElement_index.Tailw
|
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
48
|
linkTemplate(name, url) {
|
|
48
|
-
return
|
|
49
|
+
return lit.html`<a
|
|
49
50
|
href=${url}
|
|
50
51
|
target="_blank"
|
|
51
52
|
class="transition-all duration-300 rounded-full opacity-50 hover:opacity-80 hover:shadow-button-medium-hover-primary h-7 w-7"
|
|
@@ -69,7 +70,7 @@ exports.LuksoShare = class LuksoShare extends shared_tailwindElement_index.Tailw
|
|
|
69
70
|
linkTemplates.push(this.linkTemplate(provider.name, provider.url));
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
|
-
return
|
|
73
|
+
return lit.html`<div
|
|
73
74
|
class="grid gap-2 sm:gap-4"
|
|
74
75
|
style="grid-template-columns: repeat(${providers.length}, max-content); ${this.customStyle}"
|
|
75
76
|
>
|
|
@@ -78,10 +79,10 @@ exports.LuksoShare = class LuksoShare extends shared_tailwindElement_index.Tailw
|
|
|
78
79
|
}
|
|
79
80
|
};
|
|
80
81
|
__decorateClass([
|
|
81
|
-
property
|
|
82
|
+
decorators_js.property({ type: String, attribute: "custom-style" })
|
|
82
83
|
], exports.LuksoShare.prototype, "customStyle", 2);
|
|
83
84
|
__decorateClass([
|
|
84
|
-
property
|
|
85
|
+
decorators_js.property({ type: String })
|
|
85
86
|
], exports.LuksoShare.prototype, "providers", 2);
|
|
86
87
|
exports.LuksoShare = __decorateClass([
|
|
87
88
|
safeCustomElement.safeCustomElement("lukso-share")
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { property } from 'lit/decorators.js';
|
|
3
3
|
import { s as safeCustomElement } from '../../chunks/safe-custom-element-qdGIR_v6.js';
|
|
4
|
+
import { TailwindStyledElement } from '../../shared/tailwind-element/index.js';
|
|
4
5
|
|
|
5
6
|
const style = ":host {\n display: inline-flex\n}";
|
|
6
7
|
|
|
@@ -41,7 +42,7 @@ let LuksoShare = class extends TailwindStyledElement(style) {
|
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
44
|
linkTemplate(name, url) {
|
|
44
|
-
return
|
|
45
|
+
return html`<a
|
|
45
46
|
href=${url}
|
|
46
47
|
target="_blank"
|
|
47
48
|
class="transition-all duration-300 rounded-full opacity-50 hover:opacity-80 hover:shadow-button-medium-hover-primary h-7 w-7"
|
|
@@ -65,7 +66,7 @@ let LuksoShare = class extends TailwindStyledElement(style) {
|
|
|
65
66
|
linkTemplates.push(this.linkTemplate(provider.name, provider.url));
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
|
-
return
|
|
69
|
+
return html`<div
|
|
69
70
|
class="grid gap-2 sm:gap-4"
|
|
70
71
|
style="grid-template-columns: repeat(${providers.length}, max-content); ${this.customStyle}"
|
|
71
72
|
>
|
|
@@ -74,10 +75,10 @@ let LuksoShare = class extends TailwindStyledElement(style) {
|
|
|
74
75
|
}
|
|
75
76
|
};
|
|
76
77
|
__decorateClass([
|
|
77
|
-
|
|
78
|
+
property({ type: String, attribute: "custom-style" })
|
|
78
79
|
], LuksoShare.prototype, "customStyle", 2);
|
|
79
80
|
__decorateClass([
|
|
80
|
-
|
|
81
|
+
property({ type: String })
|
|
81
82
|
], LuksoShare.prototype, "providers", 2);
|
|
82
83
|
LuksoShare = __decorateClass([
|
|
83
84
|
safeCustomElement("lukso-share")
|