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