@lukso/web-components 1.112.0 → 1.113.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.
Files changed (82) hide show
  1. package/dist/{cn-b54dcc61.js → cn-01b2d42a.js} +1 -1
  2. package/dist/{cn-5ceac001.cjs → cn-fc6d6aa9.cjs} +4 -4
  3. package/dist/components/index.cjs +6 -6
  4. package/dist/components/index.js +6 -6
  5. package/dist/components/lukso-button/index.cjs +2 -2
  6. package/dist/components/lukso-button/index.js +2 -2
  7. package/dist/components/lukso-card/index.cjs +13 -9
  8. package/dist/components/lukso-card/index.d.ts +1 -0
  9. package/dist/components/lukso-card/index.d.ts.map +1 -1
  10. package/dist/components/lukso-card/index.js +13 -9
  11. package/dist/components/lukso-card/lukso-card.stories.d.ts.map +1 -1
  12. package/dist/components/lukso-checkbox/index.cjs +1 -1
  13. package/dist/components/lukso-checkbox/index.js +1 -1
  14. package/dist/components/lukso-color-picker/index.cjs +3 -3
  15. package/dist/components/lukso-color-picker/index.js +3 -3
  16. package/dist/components/lukso-dropdown/index.cjs +6 -6
  17. package/dist/components/lukso-dropdown/index.js +6 -6
  18. package/dist/components/lukso-dropdown-option/index.cjs +1 -1
  19. package/dist/components/lukso-dropdown-option/index.js +1 -1
  20. package/dist/components/lukso-footer/index.cjs +1 -1
  21. package/dist/components/lukso-footer/index.js +1 -1
  22. package/dist/components/lukso-icon/index.cjs +2 -2
  23. package/dist/components/lukso-icon/index.js +2 -2
  24. package/dist/components/lukso-image/index.cjs +2 -2
  25. package/dist/components/lukso-image/index.js +2 -2
  26. package/dist/components/lukso-input/index.cjs +3 -3
  27. package/dist/components/lukso-input/index.js +3 -3
  28. package/dist/components/lukso-modal/index.cjs +1 -1
  29. package/dist/components/lukso-modal/index.js +1 -1
  30. package/dist/components/lukso-navbar/index.cjs +3 -3
  31. package/dist/components/lukso-navbar/index.js +3 -3
  32. package/dist/components/lukso-pagination/index.cjs +3 -3
  33. package/dist/components/lukso-pagination/index.js +3 -3
  34. package/dist/components/lukso-profile/index.cjs +9 -595
  35. package/dist/components/lukso-profile/index.js +5 -600
  36. package/dist/components/lukso-progress/index.cjs +3 -3
  37. package/dist/components/lukso-progress/index.js +3 -3
  38. package/dist/components/lukso-sanitize/index.cjs +1 -1
  39. package/dist/components/lukso-sanitize/index.js +1 -1
  40. package/dist/components/lukso-search/index.cjs +6 -6
  41. package/dist/components/lukso-search/index.js +6 -6
  42. package/dist/components/lukso-select/index.cjs +74 -74
  43. package/dist/components/lukso-select/index.js +74 -74
  44. package/dist/components/lukso-share/index.cjs +23 -26
  45. package/dist/components/lukso-share/index.js +23 -26
  46. package/dist/components/lukso-switch/index.cjs +7 -10
  47. package/dist/components/lukso-switch/index.js +7 -10
  48. package/dist/components/lukso-tag/index.cjs +31 -34
  49. package/dist/components/lukso-tag/index.js +31 -34
  50. package/dist/components/lukso-terms/index.cjs +5 -8
  51. package/dist/components/lukso-terms/index.js +5 -8
  52. package/dist/components/lukso-test/index.cjs +12 -15
  53. package/dist/components/lukso-test/index.js +12 -15
  54. package/dist/components/lukso-textarea/index.cjs +82 -85
  55. package/dist/components/lukso-textarea/index.js +82 -85
  56. package/dist/components/lukso-tooltip/index.cjs +33 -36
  57. package/dist/components/lukso-tooltip/index.js +33 -36
  58. package/dist/components/lukso-username/index.cjs +50 -53
  59. package/dist/components/lukso-username/index.js +50 -53
  60. package/dist/components/lukso-wizard/index.cjs +41 -44
  61. package/dist/components/lukso-wizard/index.js +41 -44
  62. package/dist/{index-a7ef4df5.js → index-0590cf31.js} +3 -5
  63. package/dist/{index-09e32e34.cjs → index-0917a814.cjs} +1 -1
  64. package/dist/{index-c026f363.js → index-0fbcd7f4.js} +2 -2
  65. package/dist/index-1b37efea.cjs +602 -0
  66. package/dist/{index-4c212653.cjs → index-6457c2f8.cjs} +3 -5
  67. package/dist/{index-71b9ef80.cjs → index-73fbf718.cjs} +2 -2
  68. package/dist/{index-4f97c98a.js → index-adf2fc92.js} +1 -1
  69. package/dist/index-ffb387db.js +600 -0
  70. package/dist/index.cjs +6 -6
  71. package/dist/index.d.ts +1 -0
  72. package/dist/index.d.ts.map +1 -1
  73. package/dist/index.js +6 -6
  74. package/dist/shared/tailwind-element/index.cjs +1 -1
  75. package/dist/shared/tailwind-element/index.js +1 -1
  76. package/dist/{style-map-2f57cddf.cjs → style-map-54c139bb.cjs} +1 -1
  77. package/dist/{style-map-cca13c1d.js → style-map-7a555e98.js} +1 -1
  78. package/package.json +1 -1
  79. package/tools/cn.cjs +1 -1
  80. package/tools/cn.d.ts +1 -1
  81. package/tools/cn.d.ts.map +1 -1
  82. package/tools/cn.js +1 -1
@@ -1,604 +1,9 @@
1
- import { a as TailwindElement, x } from '../../index-a7ef4df5.js';
2
- import { n, e } from '../../query-assigned-elements-1c8c9e90.js';
3
- import { c as ce } from '../../index-ca8e900d.js';
1
+ import '../../index-0590cf31.js';
2
+ import '../../query-assigned-elements-1c8c9e90.js';
3
+ export { L as LuksoProfile } from '../../index-ffb387db.js';
4
+ import '../../index-ca8e900d.js';
4
5
  import '../lukso-image/index.js';
5
6
  import '../../bundle-mjs-fbc6e2a8.js';
6
7
  import '../../state-b9ca4e74.js';
7
- import '../../style-map-cca13c1d.js';
8
+ import '../../style-map-7a555e98.js';
8
9
  import '../../directive-2bb7789e.js';
9
-
10
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
11
-
12
- function getDefaultExportFromCjs (x) {
13
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
14
- }
15
-
16
- var main = {exports: {}};
17
-
18
- (function (module, exports) {
19
- (function webpackUniversalModuleDefinition(root, factory) {
20
- module.exports = factory();
21
- })(commonjsGlobal, function() {
22
- return /******/ (function(modules) { // webpackBootstrap
23
- /******/ // The module cache
24
- /******/ var installedModules = {};
25
-
26
- /******/ // The require function
27
- /******/ function __webpack_require__(moduleId) {
28
-
29
- /******/ // Check if module is in cache
30
- /******/ if(installedModules[moduleId])
31
- /******/ return installedModules[moduleId].exports;
32
-
33
- /******/ // Create a new module (and put it into the cache)
34
- /******/ var module = installedModules[moduleId] = {
35
- /******/ exports: {},
36
- /******/ id: moduleId,
37
- /******/ loaded: false
38
- /******/ };
39
-
40
- /******/ // Execute the module function
41
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
42
-
43
- /******/ // Flag the module as loaded
44
- /******/ module.loaded = true;
45
-
46
- /******/ // Return the exports of the module
47
- /******/ return module.exports;
48
- /******/ }
49
-
50
-
51
- /******/ // expose the modules object (__webpack_modules__)
52
- /******/ __webpack_require__.m = modules;
53
-
54
- /******/ // expose the module cache
55
- /******/ __webpack_require__.c = installedModules;
56
-
57
- /******/ // __webpack_public_path__
58
- /******/ __webpack_require__.p = "";
59
-
60
- /******/ // Load entry module and return exports
61
- /******/ return __webpack_require__(0);
62
- /******/ })
63
- /************************************************************************/
64
- /******/ ([
65
- /* 0 */
66
- /***/ function(module, exports, __webpack_require__) {
67
-
68
- const pnglib = __webpack_require__(1);
69
- const hsl2rgb = __webpack_require__(2);
70
-
71
- // The random number is a js implementation of the Xorshift PRNG
72
- const randseed = new Array(4); // Xorshift: [x, y, z, w] 32 bit values
73
-
74
- function seedrand(seed) {
75
- for (let i = 0; i < randseed.length; i++) {
76
- randseed[i] = 0;
77
- }
78
- for (let i = 0; i < seed.length; i++) {
79
- randseed[i % 4] = (randseed[i % 4] << 5) - randseed[i % 4] + seed.charCodeAt(i);
80
- }
81
- }
82
-
83
- function rand() {
84
- // based on Java's String.hashCode(), expanded to 4 32bit values
85
- const t = randseed[0] ^ (randseed[0] << 11);
86
-
87
- randseed[0] = randseed[1];
88
- randseed[1] = randseed[2];
89
- randseed[2] = randseed[3];
90
- randseed[3] = randseed[3] ^ (randseed[3] >> 19) ^ t ^ (t >> 8);
91
-
92
- return (randseed[3] >>> 0) / (1 << 31 >>> 0);
93
- }
94
-
95
- function createColor() {
96
- //saturation is the whole color spectrum
97
- const h = Math.floor(rand() * 360);
98
- //saturation goes from 40 to 100, it avoids greyish colors
99
- const s = rand() * 60 + 40;
100
- //lightness can be anything from 0 to 100, but probabilities are a bell curve around 50%
101
- const l = (rand() + rand() + rand() + rand()) * 25 ;
102
-
103
- return [h / 360, s / 100, l / 100];
104
- }
105
-
106
- function createImageData(size) {
107
- const width = size; // Only support square icons for now
108
- const height = size;
109
-
110
- const dataWidth = Math.ceil(width / 2);
111
- const mirrorWidth = width - dataWidth;
112
-
113
- const data = [];
114
- for (let y = 0; y < height; y++) {
115
- let row = [];
116
- for (let x = 0; x < dataWidth; x++) {
117
- // this makes foreground and background color to have a 43% (1/2.3) probability
118
- // spot color has 13% chance
119
- row[x] = Math.floor(rand() * 2.3);
120
- }
121
- const r = row.slice(0, mirrorWidth).reverse();
122
- row = row.concat(r);
123
-
124
- for (let i = 0; i < row.length; i++) {
125
- data.push(row[i]);
126
- }
127
- }
128
-
129
- return data;
130
- }
131
-
132
- // Modifies the passed PNG to fill in a specified rectangle
133
- function fillRect(png, x, y, w, h, color) {
134
- for(let i = 0; i < w; i++) {
135
- for (let j = 0; j < h; j++) {
136
- png.buffer[png.index(x + i, y + j)] = color;
137
- }
138
- }
139
- }
140
-
141
- function buildOpts(opts) {
142
- if (!opts.seed) {
143
- throw new Error('No seed provided');
144
- }
145
-
146
- seedrand(opts.seed);
147
-
148
- return Object.assign({
149
- size: 8,
150
- scale: 16,
151
- color: createColor(),
152
- bgcolor: createColor(),
153
- spotcolor: createColor(),
154
- }, opts)
155
- }
156
-
157
- function makeBlockie(address) {
158
- const opts = buildOpts({ seed: address.toLowerCase() });
159
-
160
- const imageData = createImageData(opts.size);
161
- const width = Math.sqrt(imageData.length);
162
-
163
- const p = new pnglib(opts.size * opts.scale, opts.size * opts.scale, 3);
164
- p.color(...hsl2rgb(...opts.bgcolor));
165
- const color = p.color(...hsl2rgb(...opts.color));
166
- const spotcolor = p.color(...hsl2rgb(...opts.spotcolor));
167
-
168
- for (let i = 0; i < imageData.length; i++) {
169
- const row = Math.floor(i / width);
170
- const col = i % width;
171
- // if data is 0, leave the background
172
- if (imageData[i]) {
173
- // if data is 2, choose spot color, if 1 choose foreground
174
- const pngColor = imageData[i] == 1 ? color : spotcolor;
175
- fillRect(p, col * opts.scale, row * opts.scale, opts.scale, opts.scale, pngColor);
176
- }
177
- }
178
- return `data:image/png;base64,${p.getBase64()}`;
179
- }
180
-
181
- module.exports = makeBlockie;
182
-
183
-
184
- /***/ },
185
- /* 1 */
186
- /***/ function(module, exports) {
187
-
188
- /**
189
- * A handy class to calculate color values.
190
- *
191
- * @version 1.0
192
- * @author Robert Eisele <robert@xarg.org>
193
- * @copyright Copyright (c) 2010, Robert Eisele
194
- * @link http://www.xarg.org/2010/03/generate-client-side-png-files-using-javascript/
195
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
196
- *
197
- */
198
-
199
- // Modified by George Chan <gchan@21cn.com>
200
-
201
- // Further modified by Will O'B <@wbobeirne> to make it
202
- // UglifyJS and "use strict"; friendly
203
-
204
- module.exports = function(width,height,depth) {
205
-
206
-
207
- // helper functions for that ctx
208
- function write(buffer, offs) {
209
- for (var i = 2; i < arguments.length; i++) {
210
- for (var j = 0; j < arguments[i].length; j++) {
211
- buffer[offs++] = arguments[i].charAt(j);
212
- }
213
- }
214
- }
215
-
216
- function byte2(w) {
217
- return String.fromCharCode((w >> 8) & 255, w & 255);
218
- }
219
-
220
- function byte4(w) {
221
- return String.fromCharCode((w >> 24) & 255, (w >> 16) & 255, (w >> 8) & 255, w & 255);
222
- }
223
-
224
- function byte2lsb(w) {
225
- return String.fromCharCode(w & 255, (w >> 8) & 255);
226
- }
227
-
228
- this.width = width;
229
- this.height = height;
230
- this.depth = depth;
231
-
232
- // pixel data and row filter identifier size
233
- this.pix_size = height * (width + 1);
234
-
235
- // deflate header, pix_size, block headers, adler32 checksum
236
- this.data_size = 2 + this.pix_size + 5 * Math.floor((0xfffe + this.pix_size) / 0xffff) + 4;
237
-
238
- // offsets and sizes of Png chunks
239
- this.ihdr_offs = 0; // IHDR offset and size
240
- this.ihdr_size = 4 + 4 + 13 + 4;
241
- this.plte_offs = this.ihdr_offs + this.ihdr_size; // PLTE offset and size
242
- this.plte_size = 4 + 4 + 3 * depth + 4;
243
- this.trns_offs = this.plte_offs + this.plte_size; // tRNS offset and size
244
- this.trns_size = 4 + 4 + depth + 4;
245
- this.idat_offs = this.trns_offs + this.trns_size; // IDAT offset and size
246
- this.idat_size = 4 + 4 + this.data_size + 4;
247
- this.iend_offs = this.idat_offs + this.idat_size; // IEND offset and size
248
- this.iend_size = 4 + 4 + 4;
249
- this.buffer_size = this.iend_offs + this.iend_size; // total PNG size
250
-
251
- this.buffer = new Array();
252
- this.palette = new Object();
253
- this.pindex = 0;
254
-
255
- var _crc32 = new Array();
256
-
257
- // initialize buffer with zero bytes
258
- for (var i = 0; i < this.buffer_size; i++) {
259
- this.buffer[i] = "\x00";
260
- }
261
-
262
- // initialize non-zero elements
263
- write(this.buffer, this.ihdr_offs, byte4(this.ihdr_size - 12), 'IHDR', byte4(width), byte4(height), "\x08\x03");
264
- write(this.buffer, this.plte_offs, byte4(this.plte_size - 12), 'PLTE');
265
- write(this.buffer, this.trns_offs, byte4(this.trns_size - 12), 'tRNS');
266
- write(this.buffer, this.idat_offs, byte4(this.idat_size - 12), 'IDAT');
267
- write(this.buffer, this.iend_offs, byte4(this.iend_size - 12), 'IEND');
268
-
269
- // initialize deflate header
270
- var header = ((8 + (7 << 4)) << 8) | (3 << 6);
271
- header+= 31 - (header % 31);
272
-
273
- write(this.buffer, this.idat_offs + 8, byte2(header));
274
-
275
- // initialize deflate block headers
276
- for (var i = 0; (i << 16) - 1 < this.pix_size; i++) {
277
- var size, bits;
278
- if (i + 0xffff < this.pix_size) {
279
- size = 0xffff;
280
- bits = "\x00";
281
- } else {
282
- size = this.pix_size - (i << 16) - i;
283
- bits = "\x01";
284
- }
285
- write(this.buffer, this.idat_offs + 8 + 2 + (i << 16) + (i << 2), bits, byte2lsb(size), byte2lsb(~size));
286
- }
287
-
288
- /* Create crc32 lookup table */
289
- for (var i = 0; i < 256; i++) {
290
- var c = i;
291
- for (var j = 0; j < 8; j++) {
292
- if (c & 1) {
293
- c = -306674912 ^ ((c >> 1) & 0x7fffffff);
294
- } else {
295
- c = (c >> 1) & 0x7fffffff;
296
- }
297
- }
298
- _crc32[i] = c;
299
- }
300
-
301
- // compute the index into a png for a given pixel
302
- this.index = function(x,y) {
303
- var i = y * (this.width + 1) + x + 1;
304
- var j = this.idat_offs + 8 + 2 + 5 * Math.floor((i / 0xffff) + 1) + i;
305
- return j;
306
- };
307
-
308
- // convert a color and build up the palette
309
- this.color = function(red, green, blue, alpha) {
310
-
311
- alpha = alpha >= 0 ? alpha : 255;
312
- var color = (((((alpha << 8) | red) << 8) | green) << 8) | blue;
313
-
314
- if (typeof this.palette[color] == "undefined") {
315
- if (this.pindex == this.depth) return "\x00";
316
-
317
- var ndx = this.plte_offs + 8 + 3 * this.pindex;
318
-
319
- this.buffer[ndx + 0] = String.fromCharCode(red);
320
- this.buffer[ndx + 1] = String.fromCharCode(green);
321
- this.buffer[ndx + 2] = String.fromCharCode(blue);
322
- this.buffer[this.trns_offs+8+this.pindex] = String.fromCharCode(alpha);
323
-
324
- this.palette[color] = String.fromCharCode(this.pindex++);
325
- }
326
- return this.palette[color];
327
- };
328
-
329
- // output a PNG string, Base64 encoded
330
- this.getBase64 = function() {
331
-
332
- var s = this.getDump();
333
-
334
- var ch = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
335
- var c1, c2, c3, e1, e2, e3, e4;
336
- var l = s.length;
337
- var i = 0;
338
- var r = "";
339
-
340
- do {
341
- c1 = s.charCodeAt(i);
342
- e1 = c1 >> 2;
343
- c2 = s.charCodeAt(i+1);
344
- e2 = ((c1 & 3) << 4) | (c2 >> 4);
345
- c3 = s.charCodeAt(i+2);
346
- if (l < i+2) { e3 = 64; } else { e3 = ((c2 & 0xf) << 2) | (c3 >> 6); }
347
- if (l < i+3) { e4 = 64; } else { e4 = c3 & 0x3f; }
348
- r+= ch.charAt(e1) + ch.charAt(e2) + ch.charAt(e3) + ch.charAt(e4);
349
- } while ((i+= 3) < l);
350
- return r;
351
- };
352
-
353
- // output a PNG string
354
- this.getDump = function() {
355
- // compute adler32 of output pixels + row filter bytes
356
- var BASE = 65521; /* largest prime smaller than 65536 */
357
- var NMAX = 5552; /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
358
- var s1 = 1;
359
- var s2 = 0;
360
- var n = NMAX;
361
-
362
- for (var y = 0; y < this.height; y++) {
363
- for (var x = -1; x < this.width; x++) {
364
- s1+= this.buffer[this.index(x, y)].charCodeAt(0);
365
- s2+= s1;
366
- if ((n-= 1) == 0) {
367
- s1%= BASE;
368
- s2%= BASE;
369
- n = NMAX;
370
- }
371
- }
372
- }
373
- s1%= BASE;
374
- s2%= BASE;
375
- write(this.buffer, this.idat_offs + this.idat_size - 8, byte4((s2 << 16) | s1));
376
-
377
- // compute crc32 of the PNG chunks
378
- function crc32(png, offs, size) {
379
- var crc = -1;
380
- for (var i = 4; i < size-4; i += 1) {
381
- crc = _crc32[(crc ^ png[offs+i].charCodeAt(0)) & 0xff] ^ ((crc >> 8) & 0x00ffffff);
382
- }
383
- write(png, offs+size-4, byte4(crc ^ -1));
384
- }
385
-
386
- crc32(this.buffer, this.ihdr_offs, this.ihdr_size);
387
- crc32(this.buffer, this.plte_offs, this.plte_size);
388
- crc32(this.buffer, this.trns_offs, this.trns_size);
389
- crc32(this.buffer, this.idat_offs, this.idat_size);
390
- crc32(this.buffer, this.iend_offs, this.iend_size);
391
-
392
- // convert PNG to string
393
- return "\x89PNG\r\n\x1a\n" + this.buffer.join('');
394
- };
395
- };
396
-
397
-
398
- /***/ },
399
- /* 2 */
400
- /***/ function(module, exports) {
401
-
402
- // https://stackoverflow.com/questions/2353211/hsl-to-rgb-color-conversion
403
- /**
404
- * Converts an HSL color value to RGB. Conversion formula
405
- * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
406
- * Assumes h, s, and l are contained in the set [0, 1] and
407
- * returns r, g, and b in the set [0, 255].
408
- *
409
- * @param {number} h The hue
410
- * @param {number} s The saturation
411
- * @param {number} l The lightness
412
- * @return {Array} The RGB representation
413
- */
414
-
415
- function hue2rgb(p, q, t) {
416
- if(t < 0) t += 1;
417
- if(t > 1) t -= 1;
418
- if(t < 1/6) return p + (q - p) * 6 * t;
419
- if(t < 1/2) return q;
420
- if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
421
- return p;
422
- }
423
-
424
- function hsl2rgb(h, s, l){
425
- let r, g, b;
426
-
427
- if (s == 0) {
428
- r = g = b = l; // achromatic
429
- } else {
430
- const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
431
- const p = 2 * l - q;
432
- r = hue2rgb(p, q, h + 1/3);
433
- g = hue2rgb(p, q, h);
434
- b = hue2rgb(p, q, h - 1/3);
435
- }
436
-
437
- return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), 255];
438
- }
439
-
440
- module.exports = hsl2rgb;
441
-
442
-
443
- /***/ }
444
- /******/ ])
445
- });
446
- } (main));
447
-
448
- var mainExports = main.exports;
449
- const makeBlockie = /*@__PURE__*/getDefaultExportFromCjs(mainExports);
450
-
451
- var __defProp = Object.defineProperty;
452
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
453
- var __decorateClass = (decorators, target, key, kind) => {
454
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
455
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
456
- if (decorator = decorators[i])
457
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
458
- if (kind && result)
459
- __defProp(target, key, result);
460
- return result;
461
- };
462
- let LuksoProfile = class extends TailwindElement {
463
- constructor() {
464
- super(...arguments);
465
- this.profileUrl = "";
466
- this.profileAddress = "";
467
- this.hasIdenticon = false;
468
- this.size = "large";
469
- this.isSquare = false;
470
- this.placeholder = "/assets/images/profile-default.svg";
471
- this.profileStyles = ce({
472
- slots: {
473
- wrapper: "outline outline-2 outline-neutral-100 relative",
474
- profile: "overflow-hidden",
475
- identicon: "absolute shadow-shadow-1xl rounded-full outline outline-neutral-100 right-0 bottom-0"
476
- },
477
- variants: {
478
- isSquare: {
479
- false: {
480
- wrapper: "rounded-full",
481
- profile: "rounded-full"
482
- }
483
- },
484
- size: {
485
- "x-small": {
486
- wrapper: "w-6 h-6",
487
- profile: "w-6 h-6",
488
- identicon: "w-3 h-3 outline-1"
489
- },
490
- small: {
491
- wrapper: "w-10 h-10",
492
- profile: "w-10 h-10",
493
- identicon: "w-4 h-4 outline-2"
494
- },
495
- medium: {
496
- wrapper: "w-14 h-14",
497
- profile: "w-14 h-14",
498
- identicon: "w-5 h-5 outline-2"
499
- },
500
- large: {
501
- wrapper: "w-20 h-20",
502
- profile: "w-20 h-20",
503
- identicon: "w-6 h-6 outline-2"
504
- },
505
- "x-large": {
506
- wrapper: "w-24 h-24",
507
- profile: "w-24 h-24",
508
- identicon: "w-7 h-7 outline-2"
509
- },
510
- "2x-large": {
511
- wrapper: "w-30 h-30",
512
- profile: "w-30 h-30",
513
- identicon: "w-9 h-9 outline-[2.5px]"
514
- }
515
- }
516
- },
517
- compoundVariants: [
518
- {
519
- isSquare: true,
520
- size: "x-small",
521
- class: {
522
- wrapper: "rounded-[2px]",
523
- profile: "rounded-[2px]"
524
- }
525
- },
526
- {
527
- isSquare: true,
528
- size: "small",
529
- class: {
530
- wrapper: "rounded-4",
531
- profile: "rounded-4"
532
- }
533
- },
534
- {
535
- isSquare: true,
536
- size: "medium",
537
- class: {
538
- wrapper: "rounded-8",
539
- profile: "rounded-8"
540
- }
541
- },
542
- {
543
- isSquare: true,
544
- size: "large",
545
- class: {
546
- wrapper: "rounded-[10px]",
547
- profile: "rounded-[10px]"
548
- }
549
- },
550
- {
551
- isSquare: true,
552
- size: "x-large",
553
- class: {
554
- wrapper: "rounded-12",
555
- profile: "rounded-12"
556
- }
557
- }
558
- ]
559
- });
560
- }
561
- identicon() {
562
- return this.hasIdenticon && this.profileAddress ? makeBlockie(this.profileAddress) : "";
563
- }
564
- render() {
565
- const { wrapper, profile, identicon } = this.profileStyles({
566
- size: this.size,
567
- isSquare: this.isSquare
568
- });
569
- return x`
570
- <div data-testid="profile" class=${wrapper()}>
571
- <div class=${profile()}>
572
- <lukso-image
573
- src=${this.profileUrl}
574
- placeholder=${this.placeholder}
575
- ></lukso-image>
576
- </div>
577
- ${this.identicon() ? x`<img src=${this.identicon()} class=${identicon()} alt="" />` : ""}
578
- </div>
579
- `;
580
- }
581
- };
582
- __decorateClass([
583
- n({ type: String, attribute: "profile-url" })
584
- ], LuksoProfile.prototype, "profileUrl", 2);
585
- __decorateClass([
586
- n({ type: String, attribute: "profile-address" })
587
- ], LuksoProfile.prototype, "profileAddress", 2);
588
- __decorateClass([
589
- n({ type: Boolean, attribute: "has-identicon" })
590
- ], LuksoProfile.prototype, "hasIdenticon", 2);
591
- __decorateClass([
592
- n({ type: String })
593
- ], LuksoProfile.prototype, "size", 2);
594
- __decorateClass([
595
- n({ type: Boolean, attribute: "is-square" })
596
- ], LuksoProfile.prototype, "isSquare", 2);
597
- __decorateClass([
598
- n({ type: String })
599
- ], LuksoProfile.prototype, "placeholder", 2);
600
- LuksoProfile = __decorateClass([
601
- e("lukso-profile")
602
- ], LuksoProfile);
603
-
604
- export { LuksoProfile };
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-4c212653.cjs');
5
+ const shared_tailwindElement_index = require('../../index-6457c2f8.cjs');
6
6
  const queryAssignedElements = require('../../query-assigned-elements-d5e45650.cjs');
7
- const styleMap = require('../../style-map-2f57cddf.cjs');
7
+ const styleMap = require('../../style-map-54c139bb.cjs');
8
8
  require('../../tailwind-config.cjs');
9
- const cn = require('../../cn-5ceac001.cjs');
9
+ const cn = require('../../cn-fc6d6aa9.cjs');
10
10
  require('../../directive-8278ab14.cjs');
11
11
  require('../../bundle-mjs-d58a83c6.cjs');
12
12
 
@@ -1,8 +1,8 @@
1
- import { a as TailwindElement, x } from '../../index-a7ef4df5.js';
1
+ import { a as TailwindElement, x } from '../../index-0590cf31.js';
2
2
  import { n, e } from '../../query-assigned-elements-1c8c9e90.js';
3
- import { o } from '../../style-map-cca13c1d.js';
3
+ import { o } from '../../style-map-7a555e98.js';
4
4
  import '../../tailwind-config.js';
5
- import { c as cn } from '../../cn-b54dcc61.js';
5
+ import { c as cn } from '../../cn-01b2d42a.js';
6
6
  import '../../directive-2bb7789e.js';
7
7
  import '../../bundle-mjs-fbc6e2a8.js';
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-4c212653.cjs');
5
+ const shared_tailwindElement_index = require('../../index-6457c2f8.cjs');
6
6
  const queryAssignedElements = require('../../query-assigned-elements-d5e45650.cjs');
7
7
  const directive = require('../../directive-8278ab14.cjs');
8
8
 
@@ -1,4 +1,4 @@
1
- import { A, b as T, a as TailwindElement, x } from '../../index-a7ef4df5.js';
1
+ import { A, b as T, a as TailwindElement, x } from '../../index-0590cf31.js';
2
2
  import { n, e as e$2 } from '../../query-assigned-elements-1c8c9e90.js';
3
3
  import { i, t, e as e$1 } from '../../directive-2bb7789e.js';
4
4
 
@@ -2,23 +2,23 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-4c212653.cjs');
5
+ const shared_tailwindElement_index = require('../../index-6457c2f8.cjs');
6
6
  const queryAssignedElements = require('../../query-assigned-elements-d5e45650.cjs');
7
7
  const state = require('../../state-d9fb972b.cjs');
8
8
  const index = require('../../index-1d3f4a5a.cjs');
9
9
  require('../lukso-icon/index.cjs');
10
- require('../lukso-profile/index.cjs');
10
+ require('../../index-1b37efea.cjs');
11
11
  require('../lukso-username/index.cjs');
12
12
  require('../lukso-input/index.cjs');
13
- require('../../index-71b9ef80.cjs');
13
+ require('../../index-73fbf718.cjs');
14
14
  require('../lukso-dropdown-option/index.cjs');
15
15
  require('../../bundle-mjs-d58a83c6.cjs');
16
- require('../../style-map-2f57cddf.cjs');
16
+ require('../../style-map-54c139bb.cjs');
17
17
  require('../../directive-8278ab14.cjs');
18
18
  require('../lukso-image/index.cjs');
19
- require('../../index-09e32e34.cjs');
19
+ require('../../index-0917a814.cjs');
20
20
  require('../../tailwind-config.cjs');
21
- require('../../cn-5ceac001.cjs');
21
+ require('../../cn-fc6d6aa9.cjs');
22
22
 
23
23
  const style = ":host {\n\n display: inline-flex\n}\n\n:host([is-full-width]) {\n\n display: flex;\n\n width: 100%\n}";
24
24