@lukso/web-components 1.141.0 → 1.142.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.
@@ -0,0 +1,682 @@
1
+ import { m as makeBlockie } from './index-C2gvsCnK.js';
2
+ import { T as TailwindStyledElement, x, E } from './index-Ctu_Y4Qk.js';
3
+ import { n, t } from './property-B5uoP6xb.js';
4
+ import { r } from './state-THRbrpGV.js';
5
+ import { c as ce } from './index-B9iart53.js';
6
+ import './components/lukso-dropdown/index.js';
7
+ import './components/lukso-dropdown-option/index.js';
8
+ import './components/lukso-icon/index.js';
9
+ import './components/lukso-input/index.js';
10
+ import './components/lukso-tag/index.js';
11
+ import { s as sliceAddress } from './index-omLmsjy0.js';
12
+ import './tailwind-config.js';
13
+ import './cn-Cu9aP49j.js';
14
+
15
+ const style = ":host {\n\n display: inline-flex\n}\n\n:host([is-full-width]) {\n\n display: flex;\n\n width: 100%\n}";
16
+
17
+ var STANDARDS = /* @__PURE__ */ ((STANDARDS2) => {
18
+ STANDARDS2["EOA"] = "EOA";
19
+ STANDARDS2["LSP3"] = "LSP0ERC725Account";
20
+ STANDARDS2["LSP7"] = "LSP7DigitalAsset";
21
+ STANDARDS2["LSP8"] = "LSP8IdentifiableDigitalAsset";
22
+ STANDARDS2["UNKNOWN"] = "UnknownContract";
23
+ return STANDARDS2;
24
+ })(STANDARDS || {});
25
+ var SEARCH_RESULT_TYPES = /* @__PURE__ */ ((SEARCH_RESULT_TYPES2) => {
26
+ SEARCH_RESULT_TYPES2["STRING"] = "string";
27
+ SEARCH_RESULT_TYPES2["PROFILE"] = "profile";
28
+ SEARCH_RESULT_TYPES2["ASSET"] = "asset";
29
+ SEARCH_RESULT_TYPES2["APP"] = "app";
30
+ SEARCH_RESULT_TYPES2["UNIVERSAL_NAME"] = "universal-name";
31
+ return SEARCH_RESULT_TYPES2;
32
+ })(SEARCH_RESULT_TYPES || {});
33
+
34
+ var __defProp = Object.defineProperty;
35
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
36
+ var __decorateClass = (decorators, target, key, kind) => {
37
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
38
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
39
+ if (decorator = decorators[i])
40
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
41
+ if (kind && result) __defProp(target, key, result);
42
+ return result;
43
+ };
44
+ let LuksoSearch = class extends TailwindStyledElement(style) {
45
+ constructor() {
46
+ super(...arguments);
47
+ this.value = "";
48
+ this.name = "";
49
+ this.placeholder = "";
50
+ this.label = "";
51
+ this.groupLabels = JSON.stringify({
52
+ [SEARCH_RESULT_TYPES.UNIVERSAL_NAME]: "Universal Names",
53
+ [SEARCH_RESULT_TYPES.PROFILE]: "Profiles",
54
+ [SEARCH_RESULT_TYPES.ASSET]: "Assets",
55
+ [SEARCH_RESULT_TYPES.APP]: "Apps",
56
+ [SEARCH_RESULT_TYPES.STRING]: "Other"
57
+ });
58
+ this.availableText = "Available";
59
+ this.unavailableText = "Registered";
60
+ this.autocomplete = "off";
61
+ this.id = "";
62
+ this.description = "";
63
+ this.error = "";
64
+ this.customClass = "";
65
+ this.isFullWidth = false;
66
+ this.isReadonly = false;
67
+ this.isDisabled = false;
68
+ this.autofocus = false;
69
+ this.borderless = false;
70
+ this.results = "";
71
+ this.rightIcon = "search";
72
+ this.debounce = 700;
73
+ this.isSearching = false;
74
+ this.noResultsText = "";
75
+ this.showNoResults = false;
76
+ this.hideLoading = false;
77
+ this.hasReset = false;
78
+ this.keepValueOnEscapeHit = false;
79
+ this.selected = void 0;
80
+ this.size = "large";
81
+ this.maxHeight = void 0;
82
+ this.withGroupLabels = false;
83
+ this.isDebouncing = false;
84
+ this.resultsParsed = [];
85
+ this.styles = ce({
86
+ slots: {
87
+ loading: "bg-neutral-95 w-full animate-pulse animation-delay-none"
88
+ },
89
+ variants: {
90
+ size: {
91
+ small: {
92
+ loading: "h-7 rounded-4"
93
+ },
94
+ medium: {
95
+ loading: "h-10 rounded-8"
96
+ },
97
+ large: {
98
+ loading: "h-10 rounded-8"
99
+ },
100
+ "x-large": {
101
+ loading: "h-12 rounded-8"
102
+ }
103
+ }
104
+ }
105
+ });
106
+ this.dropdownSize = {
107
+ small: "small",
108
+ medium: "medium",
109
+ large: "medium",
110
+ "x-large": "medium"
111
+ };
112
+ this.profileSize = {
113
+ small: "2x-small",
114
+ medium: "x-small",
115
+ large: "x-small",
116
+ "x-large": "small"
117
+ };
118
+ this.usernameSize = {
119
+ small: "small",
120
+ medium: "medium",
121
+ large: "large",
122
+ "x-large": "x-large"
123
+ };
124
+ this.textSize = {
125
+ small: "text-12",
126
+ medium: "text-14",
127
+ large: "text-16",
128
+ "x-large": "text-16"
129
+ };
130
+ }
131
+ connectedCallback() {
132
+ super.connectedCallback();
133
+ window.addEventListener("click", this.handleOutsideDropdownClick.bind(this));
134
+ window.addEventListener("keydown", this.handleDropdownKeydown.bind(this));
135
+ }
136
+ disconnectedCallback() {
137
+ super.disconnectedCallback();
138
+ window.removeEventListener("click", this.handleOutsideDropdownClick);
139
+ window.removeEventListener("keydown", this.handleDropdownKeydown);
140
+ }
141
+ willUpdate(changedProperties) {
142
+ if (changedProperties.has("selected")) {
143
+ const selectedOption = this.shadowRoot?.querySelector(
144
+ `[data-index="${changedProperties.get("selected")}"`
145
+ );
146
+ if (selectedOption) {
147
+ if ("scrollIntoViewIfNeeded" in selectedOption && typeof selectedOption.scrollIntoViewIfNeeded === "function") {
148
+ selectedOption.scrollIntoViewIfNeeded();
149
+ } else {
150
+ selectedOption.scrollIntoView({
151
+ behavior: "smooth",
152
+ block: "center"
153
+ });
154
+ }
155
+ }
156
+ }
157
+ }
158
+ resultsTemplate() {
159
+ const resultTemplates = [];
160
+ this.resultsParsed = JSON.parse(this.results);
161
+ const groupLabelsParsed = JSON.parse(this.groupLabels);
162
+ for (const result of Object.entries(this.resultsParsed)) {
163
+ const index = Number(result[0]);
164
+ if (this.withGroupLabels) {
165
+ const currentType = result[1].type;
166
+ const prevType = index > 0 ? this.resultsParsed[index - 1].type : null;
167
+ if (index === 0 || currentType !== prevType) {
168
+ let headerText = "";
169
+ switch (currentType) {
170
+ case SEARCH_RESULT_TYPES.UNIVERSAL_NAME:
171
+ headerText = groupLabelsParsed[SEARCH_RESULT_TYPES.UNIVERSAL_NAME];
172
+ break;
173
+ case SEARCH_RESULT_TYPES.PROFILE:
174
+ headerText = groupLabelsParsed[SEARCH_RESULT_TYPES.PROFILE];
175
+ break;
176
+ case SEARCH_RESULT_TYPES.ASSET:
177
+ headerText = groupLabelsParsed[SEARCH_RESULT_TYPES.ASSET];
178
+ break;
179
+ case SEARCH_RESULT_TYPES.APP:
180
+ headerText = groupLabelsParsed[SEARCH_RESULT_TYPES.APP];
181
+ break;
182
+ default:
183
+ headerText = groupLabelsParsed[SEARCH_RESULT_TYPES.STRING];
184
+ break;
185
+ }
186
+ resultTemplates.push(
187
+ x`<div
188
+ class="py-1 my-1 text-neutral-35 paragraph-inter-12-medium tracking-wider border-b border-b-neutral-95"
189
+ >
190
+ ${headerText}
191
+ </div>`
192
+ );
193
+ }
194
+ }
195
+ switch (result[1].type) {
196
+ // UniversalName result
197
+ case SEARCH_RESULT_TYPES.UNIVERSAL_NAME:
198
+ resultTemplates.push(
199
+ this.resultUniversalNameTemplate(result[1], index)
200
+ );
201
+ break;
202
+ // Profile result
203
+ case SEARCH_RESULT_TYPES.PROFILE:
204
+ resultTemplates.push(this.resultProfileTemplate(result[1], index));
205
+ break;
206
+ // Asset result
207
+ case SEARCH_RESULT_TYPES.ASSET:
208
+ resultTemplates.push(this.resultAssetTemplate(result[1], index));
209
+ break;
210
+ // App result
211
+ case SEARCH_RESULT_TYPES.APP:
212
+ resultTemplates.push(this.resultAppTemplate(result[1], index));
213
+ break;
214
+ // Default string result
215
+ default:
216
+ resultTemplates.push(this.resultStringTemplate(result[1], index));
217
+ break;
218
+ }
219
+ }
220
+ return x`<lukso-dropdown
221
+ size=${this.dropdownSize[this.size]}
222
+ is-open
223
+ is-open-on-outside-click
224
+ is-full-width
225
+ max-height=${this.maxHeight || E}
226
+ >${resultTemplates}</lukso-dropdown
227
+ >`;
228
+ }
229
+ noResultsTemplate() {
230
+ return x`<lukso-dropdown
231
+ size=${this.dropdownSize[this.size]}
232
+ is-open
233
+ is-open-on-outside-click
234
+ is-full-width
235
+ >${x`<div class="paragraph-inter-14-semi-bold text-neutral-20 pl-1">
236
+ ${this.noResultsText}
237
+ </div>`}</lukso-dropdown
238
+ >`;
239
+ }
240
+ loadingTemplate() {
241
+ const { loading } = this.styles({
242
+ size: this.size
243
+ });
244
+ if (this.showNoResults) {
245
+ return x`<lukso-dropdown
246
+ size=${this.dropdownSize[this.size]}
247
+ is-open
248
+ is-open-on-outside-click
249
+ is-full-width
250
+ >${x`
251
+ <div role="status" class="flex flex-col gap-1">
252
+ <div class=${loading()}></div>
253
+ </div>
254
+ `}</lukso-dropdown
255
+ >`;
256
+ }
257
+ if (this.resultsParsed.length === 0 || this.resultsParsed.length > 5) {
258
+ return x`<lukso-dropdown
259
+ size=${this.dropdownSize[this.size]}
260
+ is-open
261
+ is-open-on-outside-click
262
+ is-full-width
263
+ >${x`
264
+ <div role="status" class="flex flex-col gap-1">
265
+ ${[...Array(5)].map(() => x`<div class=${loading()}></div>`)}
266
+ </div>
267
+ `}</lukso-dropdown
268
+ >`;
269
+ }
270
+ return x`<lukso-dropdown
271
+ size=${this.dropdownSize[this.size]}
272
+ is-open
273
+ is-open-on-outside-click
274
+ is-full-width
275
+ >${x`
276
+ <div role="status" class="flex flex-col gap-1">
277
+ ${this.resultsParsed.map(() => x`<div class=${loading()}></div>`)}
278
+ </div>
279
+ `}</lukso-dropdown
280
+ >`;
281
+ }
282
+ resultStringTemplate(result, index) {
283
+ const dropdownSize = this.size === "large" || this.size === "x-large" ? "medium" : this.size;
284
+ return x`<lukso-dropdown-option
285
+ data-id="${result.id}"
286
+ data-index="${index + 1}"
287
+ ?is-selected=${this.selected === index + 1}
288
+ size=${dropdownSize}
289
+ @click=${() => this.handleSelect(result)}
290
+ >
291
+ ${result.value}
292
+ </lukso-dropdown-option>`;
293
+ }
294
+ resultUniversalNameTemplate(result, index) {
295
+ const tag = x`<lukso-tag
296
+ is-rounded
297
+ background-color="${result.status ? "green-95" : "neutral-95"}"
298
+ text-color="${result.status ? "green-45" : "neutral-60"}"
299
+ >${!!result.status ? this.availableText : this.unavailableText}</lukso-tag
300
+ >`;
301
+ return x`<lukso-dropdown-option
302
+ data-id="${result.id}"
303
+ data-index="${index + 1}"
304
+ ?is-selected=${this.selected === index + 1}
305
+ size=${this.dropdownSize[this.size]}
306
+ @click=${() => this.handleSelect(result)}
307
+ >
308
+ <div class="flex flex-row items-center justify-between w-full">
309
+ <div class="paragraph-inter-14-semi-bold">${result.value}</div>
310
+ ${tag}
311
+ </div>
312
+ </lukso-dropdown-option>`;
313
+ }
314
+ resultProfileTemplate(result, index) {
315
+ const eoaProfilePicture = x`<lukso-profile
316
+ profile-address="${result.address}"
317
+ profile-url="${result.address ? makeBlockie(result.address) : ""}"
318
+ size=${this.profileSize[this.size]}
319
+ ></lukso-profile>`;
320
+ const lsp3ProfilePicture = x`<lukso-profile
321
+ profile-address="${result.address}"
322
+ profile-url="${result.image}"
323
+ size=${this.profileSize[this.size]}
324
+ has-identicon
325
+ ></lukso-profile>`;
326
+ const standard = result.standard || STANDARDS.LSP3;
327
+ const profilePicture = standard !== STANDARDS.LSP3 ? eoaProfilePicture : lsp3ProfilePicture;
328
+ const upProfileUsername = x`<lukso-username
329
+ name="${result.name?.toLowerCase() || "anonymous-profile"}"
330
+ address="${result.address}"
331
+ name-color="neutral-20"
332
+ max-width="300"
333
+ size=${this.usernameSize[this.size]}
334
+ ?hide-prefix="${!result.name}"
335
+ class="ml-1"
336
+ ></lukso-username> `;
337
+ const eoaUsername = x`<lukso-username
338
+ name="${sliceAddress(result.address, 8)}"
339
+ address="__EOA"
340
+ name-color="neutral-20"
341
+ max-width="300"
342
+ size=${this.usernameSize[this.size]}
343
+ hide-prefix
344
+ class="ml-1"
345
+ ></lukso-username>`;
346
+ const scUsername = x`<lukso-username
347
+ name=""
348
+ address="${sliceAddress(result.address, 8)}"
349
+ name-color="neutral-20"
350
+ max-width="300"
351
+ size=${this.usernameSize[this.size]}
352
+ hide-prefix
353
+ class="ml-1"
354
+ ></lukso-username>`;
355
+ let profileName = scUsername;
356
+ if (standard === STANDARDS.EOA) {
357
+ profileName = eoaUsername;
358
+ } else if (standard === STANDARDS.LSP3) {
359
+ profileName = upProfileUsername;
360
+ }
361
+ return x`<lukso-dropdown-option
362
+ data-id="${result.address}"
363
+ data-index="${index + 1}"
364
+ ?is-selected=${this.selected === index + 1}
365
+ size=${this.dropdownSize[this.size]}
366
+ @click=${() => this.handleSelect(result)}
367
+ >
368
+ ${profilePicture} ${profileName}
369
+ </lukso-dropdown-option>`;
370
+ }
371
+ resultAssetTemplate(result, index) {
372
+ return x`<lukso-dropdown-option
373
+ data-id="${result.address}"
374
+ data-index="${index + 1}"
375
+ ?is-selected=${this.selected === index + 1}
376
+ size=${this.dropdownSize[this.size]}
377
+ @click=${() => this.handleSelect(result)}
378
+ >
379
+ <lukso-profile
380
+ profile-address="${result.address}"
381
+ profile-url="${result.image}"
382
+ placeholder="/assets/images/token-default.svg"
383
+ size=${this.profileSize[this.size]}
384
+ ></lukso-profile>
385
+ <span class="paragraph-inter-14-semi-bold ${this.textSize[this.size]}"
386
+ >${result.name}
387
+ <span
388
+ class="text-neutral-60 paragraph-inter-14-regular ${this.textSize[this.size]}"
389
+ >${result.symbol}</span
390
+ ></span
391
+ >
392
+ </lukso-dropdown-option>`;
393
+ }
394
+ resultAppTemplate(result, index) {
395
+ return x`<lukso-dropdown-option
396
+ data-id="${result.address}"
397
+ data-index="${index + 1}"
398
+ ?is-selected=${this.selected === index + 1}
399
+ size=${this.dropdownSize[this.size]}
400
+ @click=${() => this.handleSelect(result)}
401
+ >
402
+ <lukso-profile
403
+ profile-address="${result.address}"
404
+ profile-url="${result.image}"
405
+ size=${this.profileSize[this.size]}
406
+ ></lukso-profile>
407
+ <span class="paragraph-inter-14-semi-bold ${this.textSize[this.size]}"
408
+ >${result.name}
409
+ </span>
410
+ </lukso-dropdown-option>`;
411
+ }
412
+ async handleOutsideDropdownClick(event) {
413
+ const element = event.target;
414
+ if (element?.dataset?.component === "lukso-search") {
415
+ return;
416
+ }
417
+ this.results = "";
418
+ }
419
+ async handleDropdownKeydown(event) {
420
+ if (event.key === "ArrowUp" && this.selected && this.selected > 1 && this.resultsParsed?.length) {
421
+ event.preventDefault();
422
+ this.selected = this.selected - 1;
423
+ }
424
+ if (event.key === "ArrowDown" && this.resultsParsed?.length) {
425
+ event.preventDefault();
426
+ if (!this.selected) {
427
+ this.selected = 1;
428
+ } else if (this.selected < this.resultsParsed.length) {
429
+ this.selected = this.selected + 1;
430
+ }
431
+ }
432
+ if (event.key === "Enter" && this.resultsParsed?.length) {
433
+ if (this.selected) {
434
+ const selectedResult = this.resultsParsed[this.selected - 1];
435
+ await this.handleSelect(selectedResult);
436
+ }
437
+ }
438
+ if (event.key === "Escape") {
439
+ this.results = "";
440
+ }
441
+ }
442
+ async handleSelect(result) {
443
+ await this.updateComplete;
444
+ const selectEvent = new CustomEvent("on-select", {
445
+ detail: {
446
+ value: result
447
+ },
448
+ bubbles: false,
449
+ composed: true
450
+ });
451
+ this.dispatchEvent(selectEvent);
452
+ }
453
+ async handleBlur(event) {
454
+ event.stopPropagation();
455
+ await this.updateComplete;
456
+ const target = event.target;
457
+ const blurEvent = new CustomEvent("on-blur", {
458
+ detail: {
459
+ value: target.value,
460
+ event
461
+ },
462
+ bubbles: false,
463
+ composed: true
464
+ });
465
+ this.dispatchEvent(blurEvent);
466
+ }
467
+ async handleInputClick(event) {
468
+ event.stopPropagation();
469
+ await this.updateComplete;
470
+ const target = event.target;
471
+ const clickEvent = new CustomEvent("on-input-click", {
472
+ detail: {
473
+ value: target.value,
474
+ event
475
+ },
476
+ bubbles: false,
477
+ composed: true
478
+ });
479
+ this.dispatchEvent(clickEvent);
480
+ }
481
+ async handleKeyUp(event) {
482
+ event.stopPropagation();
483
+ await this.updateComplete;
484
+ const value = event?.detail?.value;
485
+ if (!this.keepValueOnEscapeHit && event?.detail?.event?.key === "Escape") {
486
+ this.value = "";
487
+ event.detail.value = "";
488
+ this.handleSearch(event);
489
+ }
490
+ const keyEvent = new CustomEvent("on-key-up", {
491
+ detail: {
492
+ value,
493
+ event
494
+ },
495
+ bubbles: true,
496
+ composed: true
497
+ });
498
+ this.dispatchEvent(keyEvent);
499
+ }
500
+ async handleReset(event) {
501
+ if (!this.hasReset) {
502
+ return;
503
+ }
504
+ await this.updateComplete;
505
+ this.value = "";
506
+ const target = event.target;
507
+ const clickEvent = new CustomEvent("on-reset", {
508
+ detail: {
509
+ value: target.value,
510
+ event
511
+ },
512
+ bubbles: false,
513
+ composed: true
514
+ });
515
+ this.dispatchEvent(clickEvent);
516
+ }
517
+ async searchDebounce(searchTerm) {
518
+ await this.updateComplete;
519
+ this.value = searchTerm;
520
+ this.debounceTimer = setTimeout(() => {
521
+ const changeEvent = new CustomEvent("on-search", {
522
+ detail: {
523
+ value: searchTerm
524
+ },
525
+ bubbles: false,
526
+ composed: true
527
+ });
528
+ this.dispatchEvent(changeEvent);
529
+ this.isDebouncing = false;
530
+ }, this.debounce);
531
+ }
532
+ handleSearch(event) {
533
+ if (this.isDebouncing) {
534
+ clearTimeout(this.debounceTimer);
535
+ }
536
+ this.isDebouncing = true;
537
+ const target = event.target;
538
+ this.searchDebounce(target.value);
539
+ }
540
+ render() {
541
+ return x`
542
+ <div class="relative w-full">
543
+ <lukso-input
544
+ name=${this.name}
545
+ type="text"
546
+ .value=${this.value}
547
+ placeholder=${this.placeholder}
548
+ autocomplete=${this.autocomplete}
549
+ label=${this.label}
550
+ description=${this.description}
551
+ error=${this.error}
552
+ custom-class=${this.customClass}
553
+ id=${this.id}
554
+ size=${this.size}
555
+ data-component="lukso-search"
556
+ right-icon="${this.hasReset && this.value ? "close-sm" : this.rightIcon}"
557
+ ?is-right-icon-clickable=${this.hasReset && this.value}
558
+ ?autofocus=${this.autofocus}
559
+ ?is-readonly=${this.isReadonly}
560
+ ?is-disabled=${this.isDisabled}
561
+ ?is-full-width=${this.isFullWidth}
562
+ keep-focus-on-escape
563
+ @on-input=${this.handleSearch}
564
+ @on-blur=${this.handleBlur}
565
+ @on-input-click=${this.handleInputClick}
566
+ @on-right-icon-click=${this.handleReset}
567
+ @on-key-up=${this.handleKeyUp}
568
+ ></lukso-input>
569
+ <!-- results dropdown -->
570
+ ${this.results && !(this.isSearching || this.isDebouncing) ? this.resultsTemplate() : E}
571
+ <!-- no results dropdown -->
572
+ ${this.showNoResults && !(this.isSearching || this.isDebouncing) ? this.noResultsTemplate() : E}
573
+ <!-- loading dropdown -->
574
+ ${!this.hideLoading && this.value && (this.isSearching || this.isDebouncing) ? this.loadingTemplate() : E}
575
+ </div>
576
+ `;
577
+ }
578
+ };
579
+ __decorateClass([
580
+ n({ type: String })
581
+ ], LuksoSearch.prototype, "value", 2);
582
+ __decorateClass([
583
+ n({ type: String })
584
+ ], LuksoSearch.prototype, "name", 2);
585
+ __decorateClass([
586
+ n({ type: String })
587
+ ], LuksoSearch.prototype, "placeholder", 2);
588
+ __decorateClass([
589
+ n({ type: String })
590
+ ], LuksoSearch.prototype, "label", 2);
591
+ __decorateClass([
592
+ n({ type: String, attribute: "group-labels" })
593
+ ], LuksoSearch.prototype, "groupLabels", 2);
594
+ __decorateClass([
595
+ n({ type: String, attribute: "available-text" })
596
+ ], LuksoSearch.prototype, "availableText", 2);
597
+ __decorateClass([
598
+ n({ type: String, attribute: "unavailable-text" })
599
+ ], LuksoSearch.prototype, "unavailableText", 2);
600
+ __decorateClass([
601
+ n({ type: String })
602
+ ], LuksoSearch.prototype, "autocomplete", 2);
603
+ __decorateClass([
604
+ n({ type: String })
605
+ ], LuksoSearch.prototype, "id", 2);
606
+ __decorateClass([
607
+ n({ type: String })
608
+ ], LuksoSearch.prototype, "description", 2);
609
+ __decorateClass([
610
+ n({ type: String })
611
+ ], LuksoSearch.prototype, "error", 2);
612
+ __decorateClass([
613
+ n({ type: String, attribute: "custom-class" })
614
+ ], LuksoSearch.prototype, "customClass", 2);
615
+ __decorateClass([
616
+ n({ type: Boolean, attribute: "is-full-width" })
617
+ ], LuksoSearch.prototype, "isFullWidth", 2);
618
+ __decorateClass([
619
+ n({ type: Boolean, attribute: "is-readonly" })
620
+ ], LuksoSearch.prototype, "isReadonly", 2);
621
+ __decorateClass([
622
+ n({ type: Boolean, attribute: "is-disabled" })
623
+ ], LuksoSearch.prototype, "isDisabled", 2);
624
+ __decorateClass([
625
+ n({ type: Boolean })
626
+ ], LuksoSearch.prototype, "autofocus", 2);
627
+ __decorateClass([
628
+ n({ type: Boolean })
629
+ ], LuksoSearch.prototype, "borderless", 2);
630
+ __decorateClass([
631
+ n({ type: String })
632
+ ], LuksoSearch.prototype, "results", 2);
633
+ __decorateClass([
634
+ n({ type: String, attribute: "right-icon" })
635
+ ], LuksoSearch.prototype, "rightIcon", 2);
636
+ __decorateClass([
637
+ n({ type: Number })
638
+ ], LuksoSearch.prototype, "debounce", 2);
639
+ __decorateClass([
640
+ n({ type: Boolean, attribute: "is-searching" })
641
+ ], LuksoSearch.prototype, "isSearching", 2);
642
+ __decorateClass([
643
+ n({ type: String, attribute: "no-results-text" })
644
+ ], LuksoSearch.prototype, "noResultsText", 2);
645
+ __decorateClass([
646
+ n({ type: Boolean, attribute: "show-no-results" })
647
+ ], LuksoSearch.prototype, "showNoResults", 2);
648
+ __decorateClass([
649
+ n({ type: Boolean, attribute: "hide-loading" })
650
+ ], LuksoSearch.prototype, "hideLoading", 2);
651
+ __decorateClass([
652
+ n({ type: Boolean, attribute: "has-reset" })
653
+ ], LuksoSearch.prototype, "hasReset", 2);
654
+ __decorateClass([
655
+ n({ type: Boolean, attribute: "keep-value-on-escape-hit" })
656
+ ], LuksoSearch.prototype, "keepValueOnEscapeHit", 2);
657
+ __decorateClass([
658
+ n({ type: Number })
659
+ ], LuksoSearch.prototype, "selected", 2);
660
+ __decorateClass([
661
+ n({ type: String })
662
+ ], LuksoSearch.prototype, "size", 2);
663
+ __decorateClass([
664
+ n({ type: Number, attribute: "max-height" })
665
+ ], LuksoSearch.prototype, "maxHeight", 2);
666
+ __decorateClass([
667
+ n({ type: Boolean, attribute: "with-group-labels" })
668
+ ], LuksoSearch.prototype, "withGroupLabels", 2);
669
+ __decorateClass([
670
+ r()
671
+ ], LuksoSearch.prototype, "isDebouncing", 2);
672
+ __decorateClass([
673
+ r()
674
+ ], LuksoSearch.prototype, "debounceTimer", 2);
675
+ __decorateClass([
676
+ r()
677
+ ], LuksoSearch.prototype, "resultsParsed", 2);
678
+ LuksoSearch = __decorateClass([
679
+ t("lukso-search")
680
+ ], LuksoSearch);
681
+
682
+ export { LuksoSearch as L, STANDARDS as S, SEARCH_RESULT_TYPES as a };
package/dist/index.cjs CHANGED
@@ -20,7 +20,7 @@ const components_luksoProgress_index = require('./components/lukso-progress/inde
20
20
  const components_luksoRadio_index = require('./components/lukso-radio/index.cjs');
21
21
  const components_luksoRadioGroup_index = require('./components/lukso-radio-group/index.cjs');
22
22
  const components_luksoSanitize_index = require('./components/lukso-sanitize/index.cjs');
23
- const components_luksoSearch_index = require('./components/lukso-search/index.cjs');
23
+ const components_luksoSearch_index = require('./index-3-fNQzHs.cjs');
24
24
  const components_luksoSelect_index = require('./components/lukso-select/index.cjs');
25
25
  const components_luksoShare_index = require('./components/lukso-share/index.cjs');
26
26
  const components_luksoSwitch_index = require('./components/lukso-switch/index.cjs');
@@ -112,6 +112,8 @@ Object.defineProperty(exports, "LuksoSearch", {
112
112
  enumerable: true,
113
113
  get: () => components_luksoSearch_index.LuksoSearch
114
114
  });
115
+ exports.SEARCH_RESULT_TYPES = components_luksoSearch_index.SEARCH_RESULT_TYPES;
116
+ exports.STANDARDS = components_luksoSearch_index.STANDARDS;
115
117
  Object.defineProperty(exports, "LuksoSelect", {
116
118
  enumerable: true,
117
119
  get: () => components_luksoSelect_index.LuksoSelect
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './components';
2
2
  export * from './shared/tools/cn';
3
3
  export * from './shared/types';
4
+ export * from './shared/enums';
4
5
  //# sourceMappingURL=index.d.ts.map