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