@lukso/web-components 1.129.0 → 1.131.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 (89) hide show
  1. package/dist/components/index.cjs +8 -7
  2. package/dist/components/index.js +8 -8
  3. package/dist/components/lukso-button/index.cjs +3 -3
  4. package/dist/components/lukso-button/index.js +3 -3
  5. package/dist/components/lukso-card/index.cjs +6 -6
  6. package/dist/components/lukso-card/index.js +6 -6
  7. package/dist/components/lukso-checkbox/index.cjs +3 -3
  8. package/dist/components/lukso-checkbox/index.js +3 -3
  9. package/dist/components/lukso-color-picker/index.cjs +4 -4
  10. package/dist/components/lukso-color-picker/index.js +4 -4
  11. package/dist/components/lukso-dropdown/index.cjs +9 -15
  12. package/dist/components/lukso-dropdown/index.d.ts +1 -1
  13. package/dist/components/lukso-dropdown/index.d.ts.map +1 -1
  14. package/dist/components/lukso-dropdown/index.js +9 -15
  15. package/dist/components/lukso-dropdown-option/index.cjs +3 -9
  16. package/dist/components/lukso-dropdown-option/index.d.ts +1 -1
  17. package/dist/components/lukso-dropdown-option/index.d.ts.map +1 -1
  18. package/dist/components/lukso-dropdown-option/index.js +3 -9
  19. package/dist/components/lukso-footer/index.cjs +2 -2
  20. package/dist/components/lukso-footer/index.js +2 -2
  21. package/dist/components/lukso-icon/index.cjs +3 -3
  22. package/dist/components/lukso-icon/index.js +3 -3
  23. package/dist/components/lukso-image/index.cjs +4 -4
  24. package/dist/components/lukso-image/index.js +4 -4
  25. package/dist/components/lukso-input/index.cjs +22 -21
  26. package/dist/components/lukso-input/index.d.ts +1 -1
  27. package/dist/components/lukso-input/index.d.ts.map +1 -1
  28. package/dist/components/lukso-input/index.js +22 -21
  29. package/dist/components/lukso-modal/index.cjs +14 -10
  30. package/dist/components/lukso-modal/index.d.ts.map +1 -1
  31. package/dist/components/lukso-modal/index.js +14 -10
  32. package/dist/components/lukso-navbar/index.cjs +5 -5
  33. package/dist/components/lukso-navbar/index.js +5 -5
  34. package/dist/components/lukso-pagination/index.cjs +4 -4
  35. package/dist/components/lukso-pagination/index.js +4 -4
  36. package/dist/components/lukso-profile/index.cjs +5 -5
  37. package/dist/components/lukso-profile/index.js +5 -5
  38. package/dist/components/lukso-progress/index.cjs +3 -3
  39. package/dist/components/lukso-progress/index.js +3 -3
  40. package/dist/components/lukso-sanitize/index.cjs +2 -2
  41. package/dist/components/lukso-sanitize/index.js +2 -2
  42. package/dist/components/lukso-search/index.cjs +110 -34
  43. package/dist/components/lukso-search/index.d.ts +17 -4
  44. package/dist/components/lukso-search/index.d.ts.map +1 -1
  45. package/dist/components/lukso-search/index.js +109 -35
  46. package/dist/components/lukso-search/lukso-search.stories.d.ts +1 -0
  47. package/dist/components/lukso-search/lukso-search.stories.d.ts.map +1 -1
  48. package/dist/components/lukso-select/index.cjs +7 -7
  49. package/dist/components/lukso-select/index.js +7 -7
  50. package/dist/components/lukso-share/index.cjs +2 -2
  51. package/dist/components/lukso-share/index.js +2 -2
  52. package/dist/components/lukso-switch/index.cjs +3 -3
  53. package/dist/components/lukso-switch/index.js +3 -3
  54. package/dist/components/lukso-tag/index.cjs +3 -3
  55. package/dist/components/lukso-tag/index.js +3 -3
  56. package/dist/components/lukso-terms/index.cjs +4 -4
  57. package/dist/components/lukso-terms/index.js +4 -4
  58. package/dist/components/lukso-test/index.cjs +2 -2
  59. package/dist/components/lukso-test/index.js +2 -2
  60. package/dist/components/lukso-textarea/index.cjs +4 -4
  61. package/dist/components/lukso-textarea/index.js +4 -4
  62. package/dist/components/lukso-tooltip/index.cjs +4 -4
  63. package/dist/components/lukso-tooltip/index.js +4 -4
  64. package/dist/components/lukso-username/index.cjs +9 -1330
  65. package/dist/components/lukso-username/index.js +6 -1336
  66. package/dist/components/lukso-wizard/index.cjs +2 -2
  67. package/dist/components/lukso-wizard/index.js +2 -2
  68. package/dist/index-2d057f81.js +37 -0
  69. package/dist/{index-da14e190.js → index-38990f38.js} +2 -2
  70. package/dist/{index-b74237f9.js → index-5387057e.js} +1 -1
  71. package/dist/{index-2ffc105b.cjs → index-5df012eb.cjs} +1 -1
  72. package/dist/index-96bba619.cjs +46 -0
  73. package/dist/index-9ba001cb.js +1337 -0
  74. package/dist/{index-e5b0ba18.cjs → index-9c39357d.cjs} +2 -2
  75. package/dist/index-ba49f23a.cjs +1339 -0
  76. package/dist/index.cjs +8 -7
  77. package/dist/index.js +8 -8
  78. package/dist/{property-ff5733e6.js → property-5367c26a.js} +1 -1
  79. package/dist/{property-65ed3fa1.cjs → property-98f7e05b.cjs} +1 -1
  80. package/dist/shared/tailwind-element/index.cjs +1 -1
  81. package/dist/shared/tailwind-element/index.js +1 -1
  82. package/dist/{state-9bdaddc0.js → state-bdfaec36.js} +1 -1
  83. package/dist/{state-ec4491d8.cjs → state-eba8ded5.cjs} +1 -1
  84. package/dist/{style-map-8a1e2472.js → style-map-9e6bb4a6.js} +1 -1
  85. package/dist/{style-map-227a49cb.cjs → style-map-b13b92c1.cjs} +1 -1
  86. package/package.json +1 -1
  87. package/tools/sass/colors.scss +1 -0
  88. package/dist/index-869a59a0.js +0 -37
  89. package/dist/index-b44989bb.cjs +0 -46
@@ -4,19 +4,31 @@ export type SearchStringResult = {
4
4
  id?: string;
5
5
  value: string;
6
6
  };
7
+ export declare enum SearchProfileType {
8
+ UP = "up",
9
+ EOA = "eoa",
10
+ SmartContract = "sc"
11
+ }
7
12
  export type SearchProfileResult = {
8
13
  address: Address;
9
14
  image?: string;
10
15
  name?: string;
11
- isEOA?: boolean;
16
+ type?: SearchProfileType;
17
+ };
18
+ export type SearchUniversalNameResult = {
19
+ id?: string;
20
+ value: string;
21
+ status: boolean;
12
22
  };
13
- export type SearchResult = SearchStringResult | SearchProfileResult;
23
+ export type SearchResult = SearchStringResult | SearchProfileResult | SearchUniversalNameResult;
14
24
  declare const LuksoSearch_base: typeof import("lit").LitElement;
15
25
  export declare class LuksoSearch extends LuksoSearch_base {
16
26
  value: string;
17
27
  name: string;
18
28
  placeholder: string;
19
29
  label: string;
30
+ availableText: string;
31
+ unavailableText: string;
20
32
  autocomplete: string;
21
33
  id: string;
22
34
  description: string;
@@ -37,19 +49,20 @@ export declare class LuksoSearch extends LuksoSearch_base {
37
49
  hasReset: boolean;
38
50
  keepValueOnEscapeHit: boolean;
39
51
  selected: any;
40
- size: InputSize | 'large';
52
+ size: InputSize | 'large' | 'x-large';
41
53
  private isDebouncing;
42
54
  private debounceTimer;
43
55
  private resultsParsed;
44
- private searchTerm;
45
56
  private styles;
46
57
  connectedCallback(): void;
47
58
  disconnectedCallback(): void;
48
59
  willUpdate(changedProperties: PropertyValues<this>): void;
60
+ sizeDropdown(): InputSize;
49
61
  resultsTemplate(): TemplateResult<1>;
50
62
  noResultsTemplate(): TemplateResult<1>;
51
63
  loadingTemplate(): TemplateResult<1>;
52
64
  resultStringTemplate(result: SearchStringResult, index: number): TemplateResult<1>;
65
+ resultUniversalNameTemplate(result: SearchUniversalNameResult, index: number): TemplateResult<1>;
53
66
  resultProfileTemplate(result: SearchProfileResult, index: number): TemplateResult<1>;
54
67
  private handleOutsideDropdownClick;
55
68
  private handleDropdownKeydown;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-search/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAiB,MAAM,KAAK,CAAA;AAI7E,OAAO,6BAA6B,CAAA;AACpC,OAAO,oCAAoC,CAAA;AAC3C,OAAO,yBAAyB,CAAA;AAChC,OAAO,0BAA0B,CAAA;AACjC,OAAO,4BAA4B,CAAA;AACnC,OAAO,6BAA6B,CAAA;AAIpC,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAExD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;I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AYZ,UAAU;YAeV,gBAAgB;YAehB,WAAW;YAuBX,WAAW;YAmBX,cAAc;IAiB5B,OAAO,CAAC,YAAY;IAUpB,MAAM;CAgDP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAA;KAC5B;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-search/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAiB,MAAM,KAAK,CAAA;AAI7E,OAAO,6BAA6B,CAAA;AACpC,OAAO,oCAAoC,CAAA;AAC3C,OAAO,yBAAyB,CAAA;AAChC,OAAO,0BAA0B,CAAA;AACjC,OAAO,4BAA4B,CAAA;AACnC,OAAO,wBAAwB,CAAA;AAC/B,OAAO,6BAA6B,CAAA;AAKpC,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAExD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,oBAAY,iBAAiB;IAC3B,EAAE,OAAO;IACT,GAAG,QAAQ;IACX,aAAa,OAAO;CACrB;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,iBAAiB,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,YAAY,GACpB,kBAAkB,GAClB,mBAAmB,GACnB,yBAAyB,CAAA;;AAE7B,qBACa,WAAY,SAAQ,gBAA4B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ACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAA;KAC5B;CACF"}
@@ -1,21 +1,22 @@
1
- import { m as makeBlockie } from '../../index-da14e190.js';
2
- import { T as TailwindStyledElement, x, E } from '../../index-869a59a0.js';
3
- import { n, t } from '../../property-ff5733e6.js';
4
- import { r } from '../../state-9bdaddc0.js';
1
+ import { m as makeBlockie } from '../../index-38990f38.js';
2
+ import { T as TailwindStyledElement, x, E } from '../../index-2d057f81.js';
3
+ import { n, t } from '../../property-5367c26a.js';
4
+ import { r } from '../../state-bdfaec36.js';
5
5
  import { c as ce } from '../../index-d14b6a34.js';
6
6
  import '../lukso-dropdown/index.js';
7
7
  import '../lukso-dropdown-option/index.js';
8
8
  import '../lukso-icon/index.js';
9
9
  import '../lukso-input/index.js';
10
- import '../lukso-username/index.js';
10
+ import '../lukso-tag/index.js';
11
+ import { s as sliceAddress } from '../../index-9ba001cb.js';
12
+ import '../../tailwind-config.js';
13
+ import '../../cn-90c03edf.js';
11
14
  import '../lukso-image/index.js';
12
- import '../../style-map-8a1e2472.js';
15
+ import '../../style-map-9e6bb4a6.js';
13
16
  import '../../directive-2bb7789e.js';
14
17
  import '../../uniq-id-ce2d165c.js';
15
- import '../../tailwind-config.js';
16
- import '../../cn-90c03edf.js';
17
18
  import '../lukso-sanitize/index.js';
18
- import '../../index-b74237f9.js';
19
+ import '../../index-5387057e.js';
19
20
 
20
21
  const style = ":host {\n\n display: inline-flex\n}\n\n:host([is-full-width]) {\n\n display: flex;\n\n width: 100%\n}";
21
22
 
@@ -30,6 +31,12 @@ var __decorateClass = (decorators, target, key, kind) => {
30
31
  __defProp(target, key, result);
31
32
  return result;
32
33
  };
34
+ var SearchProfileType = /* @__PURE__ */ ((SearchProfileType2) => {
35
+ SearchProfileType2["UP"] = "up";
36
+ SearchProfileType2["EOA"] = "eoa";
37
+ SearchProfileType2["SmartContract"] = "sc";
38
+ return SearchProfileType2;
39
+ })(SearchProfileType || {});
33
40
  let LuksoSearch = class extends TailwindStyledElement(style) {
34
41
  constructor() {
35
42
  super(...arguments);
@@ -37,6 +44,8 @@ let LuksoSearch = class extends TailwindStyledElement(style) {
37
44
  this.name = "";
38
45
  this.placeholder = "";
39
46
  this.label = "";
47
+ this.availableText = "Available";
48
+ this.unavailableText = "Registered";
40
49
  this.autocomplete = "off";
41
50
  this.id = "";
42
51
  this.description = "";
@@ -57,10 +66,9 @@ let LuksoSearch = class extends TailwindStyledElement(style) {
57
66
  this.hasReset = false;
58
67
  this.keepValueOnEscapeHit = false;
59
68
  this.selected = void 0;
60
- this.size = "medium";
69
+ this.size = "large";
61
70
  this.isDebouncing = false;
62
71
  this.resultsParsed = [];
63
- this.searchTerm = "";
64
72
  this.styles = ce({
65
73
  slots: {
66
74
  loading: "bg-neutral-95 w-full animate-pulse animation-delay-none"
@@ -74,6 +82,9 @@ let LuksoSearch = class extends TailwindStyledElement(style) {
74
82
  loading: "h-10 rounded-8"
75
83
  },
76
84
  large: {
85
+ loading: "h-10 rounded-8"
86
+ },
87
+ "x-large": {
77
88
  loading: "h-12 rounded-8"
78
89
  }
79
90
  }
@@ -107,21 +118,34 @@ let LuksoSearch = class extends TailwindStyledElement(style) {
107
118
  }
108
119
  }
109
120
  }
121
+ sizeDropdown() {
122
+ const dropdownSize = this.size === "large" || this.size === "x-large" ? "medium" : this.size;
123
+ return dropdownSize;
124
+ }
110
125
  resultsTemplate() {
111
126
  const resultTemplates = [];
112
127
  this.resultsParsed = JSON.parse(this.results);
113
128
  for (const result of Object.entries(this.resultsParsed)) {
114
129
  const index = Number(result[0]);
115
- if ("value" in result[1]) {
116
- resultTemplates.push(this.resultStringTemplate(result[1], index));
130
+ if ("value" in result[1] && "status" in result[1]) {
131
+ resultTemplates.push(
132
+ this.resultUniversalNameTemplate(
133
+ result[1],
134
+ index
135
+ )
136
+ );
137
+ } else if ("value" in result[1]) {
138
+ resultTemplates.push(
139
+ this.resultStringTemplate(result[1], index)
140
+ );
117
141
  } else if ("address" in result[1]) {
118
142
  resultTemplates.push(this.resultProfileTemplate(result[1], index));
119
- } else {
143
+ } else if ("value" in result[1]) ; else {
120
144
  console.error("Unknown result type", result);
121
145
  }
122
146
  }
123
147
  return x`<lukso-dropdown
124
- size=${this.size}
148
+ size=${this.sizeDropdown()}
125
149
  is-open
126
150
  is-open-on-outside-click
127
151
  is-full-width
@@ -130,7 +154,7 @@ let LuksoSearch = class extends TailwindStyledElement(style) {
130
154
  }
131
155
  noResultsTemplate() {
132
156
  return x`<lukso-dropdown
133
- size=${this.size}
157
+ size=${this.sizeDropdown()}
134
158
  is-open
135
159
  is-open-on-outside-click
136
160
  is-full-width
@@ -145,7 +169,7 @@ let LuksoSearch = class extends TailwindStyledElement(style) {
145
169
  });
146
170
  if (this.showNoResults) {
147
171
  return x`<lukso-dropdown
148
- size=${this.size}
172
+ size=${this.sizeDropdown()}
149
173
  is-open
150
174
  is-open-on-outside-click
151
175
  is-full-width
@@ -158,7 +182,7 @@ let LuksoSearch = class extends TailwindStyledElement(style) {
158
182
  }
159
183
  if (this.resultsParsed.length === 0 || this.resultsParsed.length > 5) {
160
184
  return x`<lukso-dropdown
161
- size=${this.size}
185
+ size=${this.sizeDropdown()}
162
186
  is-open
163
187
  is-open-on-outside-click
164
188
  is-full-width
@@ -170,7 +194,7 @@ let LuksoSearch = class extends TailwindStyledElement(style) {
170
194
  >`;
171
195
  }
172
196
  return x`<lukso-dropdown
173
- size=${this.size}
197
+ size=${this.sizeDropdown()}
174
198
  is-open
175
199
  is-open-on-outside-click
176
200
  is-full-width
@@ -182,16 +206,37 @@ let LuksoSearch = class extends TailwindStyledElement(style) {
182
206
  >`;
183
207
  }
184
208
  resultStringTemplate(result, index) {
209
+ const dropdownSize = this.size === "large" || this.size === "x-large" ? "medium" : this.size;
185
210
  return x`<lukso-dropdown-option
186
211
  data-id="${result.id}"
187
212
  data-index="${index + 1}"
188
213
  ?is-selected=${this.selected === index + 1}
189
- size=${this.size}
214
+ size=${dropdownSize}
190
215
  @click=${() => this.handleSelect(result)}
191
216
  >
192
217
  ${result.value}
193
218
  </lukso-dropdown-option>`;
194
219
  }
220
+ resultUniversalNameTemplate(result, index) {
221
+ const tag = x`<lukso-tag
222
+ is-rounded
223
+ background-color="${result.status ? "green-90" : "neutral-95"}"
224
+ text-color="${result.status ? "green-45" : "neutral-60"}"
225
+ >${!!result.status ? this.availableText : this.unavailableText}</lukso-tag
226
+ >`;
227
+ return x`<lukso-dropdown-option
228
+ data-id="${result.id}"
229
+ data-index="${index + 1}"
230
+ ?is-selected=${this.selected === index + 1}
231
+ size=${this.sizeDropdown()}
232
+ @click=${() => this.handleSelect(result)}
233
+ >
234
+ <div class="flex flex-row items-center justify-between w-full">
235
+ <div class="paragraph-inter-14-semi-bold">${result.value}</div>
236
+ ${tag}
237
+ </div>
238
+ </lukso-dropdown-option>`;
239
+ }
195
240
  resultProfileTemplate(result, index) {
196
241
  const eoaProfilePicture = x`<lukso-profile
197
242
  profile-address="${result.address}"
@@ -204,23 +249,49 @@ let LuksoSearch = class extends TailwindStyledElement(style) {
204
249
  size="x-small"
205
250
  has-identicon
206
251
  ></lukso-profile>`;
207
- const profilePicture = result.isEOA ? eoaProfilePicture : lsp3ProfilePicture;
252
+ const type = result.type || "up" /* UP */;
253
+ const profilePicture = type !== "up" /* UP */ ? eoaProfilePicture : lsp3ProfilePicture;
254
+ const upProfileUsername = x`<lukso-username
255
+ name="${result.name?.toLowerCase() || "anonymous-profile"}"
256
+ address="${result.address}"
257
+ name-color="neutral-20"
258
+ max-width="300"
259
+ size="medium"
260
+ ?hide-prefix="${!result.name}"
261
+ class="ml-1"
262
+ ></lukso-username> `;
263
+ const eoaUsername = x`<lukso-username
264
+ name="${sliceAddress(result.address, 8)}"
265
+ address="__EOA"
266
+ name-color="neutral-20"
267
+ max-width="300"
268
+ size="medium"
269
+ hide-prefix
270
+ class="ml-1"
271
+ ></lukso-username>`;
272
+ const scUsername = x`<lukso-username
273
+ name=""
274
+ address="${sliceAddress(result.address, 8)}"
275
+ name-color="neutral-20"
276
+ max-width="300"
277
+ size="medium"
278
+ hide-prefix
279
+ class="ml-1"
280
+ ></lukso-username>`;
281
+ let profileName = scUsername;
282
+ if (type === "eoa" /* EOA */) {
283
+ profileName = eoaUsername;
284
+ } else if (type === "up" /* UP */) {
285
+ profileName = upProfileUsername;
286
+ }
208
287
  return x`<lukso-dropdown-option
209
288
  data-id="${result.address}"
210
289
  data-index="${index + 1}"
211
290
  ?is-selected=${this.selected === index + 1}
212
- size=${this.size}
291
+ size=${this.sizeDropdown()}
213
292
  @click=${() => this.handleSelect(result)}
214
293
  >
215
- ${profilePicture}
216
- <lukso-username
217
- name="${result.name?.toLowerCase()}"
218
- address="${result.address}"
219
- name-color="neutral-20"
220
- max-width="300"
221
- size="medium"
222
- class="ml-1"
223
- ></lukso-username>
294
+ ${profilePicture} ${profileName}
224
295
  </lukso-dropdown-option>`;
225
296
  }
226
297
  async handleOutsideDropdownClick(event) {
@@ -402,6 +473,12 @@ __decorateClass([
402
473
  __decorateClass([
403
474
  n({ type: String })
404
475
  ], LuksoSearch.prototype, "label", 2);
476
+ __decorateClass([
477
+ n({ type: String, attribute: "available-text" })
478
+ ], LuksoSearch.prototype, "availableText", 2);
479
+ __decorateClass([
480
+ n({ type: String, attribute: "unavailable-text" })
481
+ ], LuksoSearch.prototype, "unavailableText", 2);
405
482
  __decorateClass([
406
483
  n({ type: String })
407
484
  ], LuksoSearch.prototype, "autocomplete", 2);
@@ -474,11 +551,8 @@ __decorateClass([
474
551
  __decorateClass([
475
552
  r()
476
553
  ], LuksoSearch.prototype, "resultsParsed", 2);
477
- __decorateClass([
478
- r()
479
- ], LuksoSearch.prototype, "searchTerm", 2);
480
554
  LuksoSearch = __decorateClass([
481
555
  t("lukso-search")
482
556
  ], LuksoSearch);
483
557
 
484
- export { LuksoSearch };
558
+ export { LuksoSearch, SearchProfileType };
@@ -6,6 +6,7 @@ export default meta;
6
6
  export declare const DefaultSearch: any;
7
7
  /** Example of search with `profile` values. */
8
8
  export declare const ProfileSearch: any;
9
+ export declare const UniversalNameSearch: any;
9
10
  /** To indicate when search is processing results you can add `is-searching` attribute. */
10
11
  export declare const SearchingState: any;
11
12
  /** To show that search hes no results add `show-no-results` attribute. You can also customize no results text with `no-results-text` attribute. */
@@ -1 +1 @@
1
- {"version":3,"file":"lukso-search.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-search/lukso-search.stories.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AAErD,OAAO,SAAS,CAAA;AAEhB,mHAAmH;AACnH,QAAA,MAAM,IAAI,EAAE,IA8TX,CAAA;AAED,eAAe,IAAI,CAAA;AA8FnB,+CAA+C;AAC/C,eAAO,MAAM,aAAa,KAAoB,CAAA;AAM9C,gDAAgD;AAChD,eAAO,MAAM,aAAa,KAAoB,CAAA;AA0B9C,0FAA0F;AAC1F,eAAO,MAAM,cAAc,KAAoB,CAAA;AAQ/C,mJAAmJ;AACnJ,eAAO,MAAM,SAAS,KAAoB,CAAA;AAQ1C,mCAAmC;AACnC,eAAO,MAAM,eAAe,KAAoB,CAAA;AAMhD,mCAAmC;AACnC,eAAO,MAAM,cAAc,KAAoB,CAAA;AAM/C,gCAAgC;AAChC,eAAO,MAAM,KAAK,KAAoB,CAAA"}
1
+ {"version":3,"file":"lukso-search.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-search/lukso-search.stories.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AAErD,OAAO,SAAS,CAAA;AAEhB,mHAAmH;AACnH,QAAA,MAAM,IAAI,EAAE,IAwVX,CAAA;AAED,eAAe,IAAI,CAAA;AA8FnB,+CAA+C;AAC/C,eAAO,MAAM,aAAa,KAAoB,CAAA;AAM9C,gDAAgD;AAChD,eAAO,MAAM,aAAa,KAAoB,CAAA;AAkC9C,eAAO,MAAM,mBAAmB,KAAoB,CAAA;AAmBpD,0FAA0F;AAC1F,eAAO,MAAM,cAAc,KAAoB,CAAA;AAQ/C,mJAAmJ;AACnJ,eAAO,MAAM,SAAS,KAAoB,CAAA;AAQ1C,mCAAmC;AACnC,eAAO,MAAM,eAAe,KAAoB,CAAA;AAMhD,mCAAmC;AACnC,eAAO,MAAM,cAAc,KAAoB,CAAA;AAM/C,gCAAgC;AAChC,eAAO,MAAM,KAAK,KAAoB,CAAA"}
@@ -2,21 +2,21 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-b44989bb.cjs');
6
- const property = require('../../property-65ed3fa1.cjs');
7
- const state = require('../../state-ec4491d8.cjs');
5
+ const shared_tailwindElement_index = require('../../index-96bba619.cjs');
6
+ const property = require('../../property-98f7e05b.cjs');
7
+ const state = require('../../state-eba8ded5.cjs');
8
8
  const index = require('../../index-2b104ecb.cjs');
9
- const components_luksoProfile_index = require('../../index-e5b0ba18.cjs');
9
+ const components_luksoProfile_index = require('../../index-9c39357d.cjs');
10
10
  require('../lukso-icon/index.cjs');
11
- require('../lukso-username/index.cjs');
11
+ require('../../index-ba49f23a.cjs');
12
12
  require('../lukso-dropdown/index.cjs');
13
13
  require('../lukso-dropdown-option/index.cjs');
14
14
  require('../lukso-sanitize/index.cjs');
15
15
  const uniqId = require('../../uniq-id-f0b18085.cjs');
16
16
  require('../lukso-image/index.cjs');
17
- require('../../style-map-227a49cb.cjs');
17
+ require('../../style-map-b13b92c1.cjs');
18
18
  require('../../directive-8278ab14.cjs');
19
- require('../../index-2ffc105b.cjs');
19
+ require('../../index-5df012eb.cjs');
20
20
  require('../../tailwind-config.cjs');
21
21
  require('../../cn-b6daa995.cjs');
22
22
 
@@ -1,18 +1,18 @@
1
- import { T as TailwindStyledElement, x, E } from '../../index-869a59a0.js';
2
- import { n, t } from '../../property-ff5733e6.js';
3
- import { r } from '../../state-9bdaddc0.js';
1
+ import { T as TailwindStyledElement, x, E } from '../../index-2d057f81.js';
2
+ import { n, t } from '../../property-5367c26a.js';
3
+ import { r } from '../../state-bdfaec36.js';
4
4
  import { c as ce } from '../../index-d14b6a34.js';
5
- import { m as makeBlockie } from '../../index-da14e190.js';
5
+ import { m as makeBlockie } from '../../index-38990f38.js';
6
6
  import '../lukso-icon/index.js';
7
- import '../lukso-username/index.js';
7
+ import '../../index-9ba001cb.js';
8
8
  import '../lukso-dropdown/index.js';
9
9
  import '../lukso-dropdown-option/index.js';
10
10
  import '../lukso-sanitize/index.js';
11
11
  import { u as uniqId } from '../../uniq-id-ce2d165c.js';
12
12
  import '../lukso-image/index.js';
13
- import '../../style-map-8a1e2472.js';
13
+ import '../../style-map-9e6bb4a6.js';
14
14
  import '../../directive-2bb7789e.js';
15
- import '../../index-b74237f9.js';
15
+ import '../../index-5387057e.js';
16
16
  import '../../tailwind-config.js';
17
17
  import '../../cn-90c03edf.js';
18
18
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-b44989bb.cjs');
6
- const property = require('../../property-65ed3fa1.cjs');
5
+ const shared_tailwindElement_index = require('../../index-96bba619.cjs');
6
+ const property = require('../../property-98f7e05b.cjs');
7
7
 
8
8
  const style = ":host {\n display: inline-flex\n}";
9
9
 
@@ -1,5 +1,5 @@
1
- import { T as TailwindStyledElement, x } from '../../index-869a59a0.js';
2
- import { n, t } from '../../property-ff5733e6.js';
1
+ import { T as TailwindStyledElement, x } from '../../index-2d057f81.js';
2
+ import { n, t } from '../../property-5367c26a.js';
3
3
 
4
4
  const style = ":host {\n display: inline-flex\n}";
5
5
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-b44989bb.cjs');
6
- const property = require('../../property-65ed3fa1.cjs');
7
- const styleMap = require('../../style-map-227a49cb.cjs');
5
+ const shared_tailwindElement_index = require('../../index-96bba619.cjs');
6
+ const property = require('../../property-98f7e05b.cjs');
7
+ const styleMap = require('../../style-map-b13b92c1.cjs');
8
8
  const index = require('../../index-2b104ecb.cjs');
9
9
  const uniqId = require('../../uniq-id-f0b18085.cjs');
10
10
  require('../lukso-sanitize/index.cjs');
@@ -1,6 +1,6 @@
1
- import { a as TailwindElement, x, E } from '../../index-869a59a0.js';
2
- import { n, t } from '../../property-ff5733e6.js';
3
- import { o } from '../../style-map-8a1e2472.js';
1
+ import { a as TailwindElement, x, E } from '../../index-2d057f81.js';
2
+ import { n, t } from '../../property-5367c26a.js';
3
+ import { o } from '../../style-map-9e6bb4a6.js';
4
4
  import { c as ce } from '../../index-d14b6a34.js';
5
5
  import { u as uniqId } from '../../uniq-id-ce2d165c.js';
6
6
  import '../lukso-sanitize/index.js';
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-b44989bb.cjs');
6
- const property = require('../../property-65ed3fa1.cjs');
5
+ const shared_tailwindElement_index = require('../../index-96bba619.cjs');
6
+ const property = require('../../property-98f7e05b.cjs');
7
7
  const index = require('../../index-2b104ecb.cjs');
8
- const index$1 = require('../../index-2ffc105b.cjs');
8
+ const index$1 = require('../../index-5df012eb.cjs');
9
9
  require('../../directive-8278ab14.cjs');
10
10
 
11
11
  const style = ":host {\n display: inline-flex\n}";
@@ -1,7 +1,7 @@
1
- import { T as TailwindStyledElement, x } from '../../index-869a59a0.js';
2
- import { n, t } from '../../property-ff5733e6.js';
1
+ import { T as TailwindStyledElement, x } from '../../index-2d057f81.js';
2
+ import { n, t } from '../../property-5367c26a.js';
3
3
  import { c as ce } from '../../index-d14b6a34.js';
4
- import { c as customStyleMap } from '../../index-b74237f9.js';
4
+ import { c as customStyleMap } from '../../index-5387057e.js';
5
5
  import '../../directive-2bb7789e.js';
6
6
 
7
7
  const style = ":host {\n display: inline-flex\n}";
@@ -2,14 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-b44989bb.cjs');
6
- const property = require('../../property-65ed3fa1.cjs');
7
- const state = require('../../state-ec4491d8.cjs');
5
+ const shared_tailwindElement_index = require('../../index-96bba619.cjs');
6
+ const property = require('../../property-98f7e05b.cjs');
7
+ const state = require('../../state-eba8ded5.cjs');
8
8
  const index = require('../../index-e9668573.cjs');
9
9
  require('../lukso-icon/index.cjs');
10
10
  require('../lukso-sanitize/index.cjs');
11
11
  require('../../directive-8278ab14.cjs');
12
- require('../../style-map-227a49cb.cjs');
12
+ require('../../style-map-b13b92c1.cjs');
13
13
 
14
14
  const style = ":host {\n display: flex;\n height: 100%\n}";
15
15
 
@@ -1,11 +1,11 @@
1
- import { T as TailwindStyledElement, x } from '../../index-869a59a0.js';
2
- import { n, t } from '../../property-ff5733e6.js';
3
- import { r } from '../../state-9bdaddc0.js';
1
+ import { T as TailwindStyledElement, x } from '../../index-2d057f81.js';
2
+ import { n, t } from '../../property-5367c26a.js';
3
+ import { r } from '../../state-bdfaec36.js';
4
4
  import { c as customClassMap } from '../../index-5e194caf.js';
5
5
  import '../lukso-icon/index.js';
6
6
  import '../lukso-sanitize/index.js';
7
7
  import '../../directive-2bb7789e.js';
8
- import '../../style-map-8a1e2472.js';
8
+ import '../../style-map-9e6bb4a6.js';
9
9
 
10
10
  const style = ":host {\n display: flex;\n height: 100%\n}";
11
11
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-b44989bb.cjs');
6
- const property = require('../../property-65ed3fa1.cjs');
5
+ const shared_tailwindElement_index = require('../../index-96bba619.cjs');
6
+ const property = require('../../property-98f7e05b.cjs');
7
7
  const directive = require('../../directive-8278ab14.cjs');
8
8
 
9
9
  /**
@@ -1,5 +1,5 @@
1
- import { b as T$1, T as TailwindStyledElement, x as x$1 } from '../../index-869a59a0.js';
2
- import { n as n$3, t as t$4 } from '../../property-ff5733e6.js';
1
+ import { b as T$1, T as TailwindStyledElement, x as x$1 } from '../../index-2d057f81.js';
2
+ import { n as n$3, t as t$4 } from '../../property-5367c26a.js';
3
3
  import { e as e$3, i as i$3, t as t$3 } from '../../directive-2bb7789e.js';
4
4
 
5
5
  /**
@@ -2,15 +2,15 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-b44989bb.cjs');
6
- const property = require('../../property-65ed3fa1.cjs');
7
- const state = require('../../state-ec4491d8.cjs');
5
+ const shared_tailwindElement_index = require('../../index-96bba619.cjs');
6
+ const property = require('../../property-98f7e05b.cjs');
7
+ const state = require('../../state-eba8ded5.cjs');
8
8
  const index = require('../../index-2b104ecb.cjs');
9
9
  require('../../tailwind-config.cjs');
10
10
  const cn = require('../../cn-b6daa995.cjs');
11
11
  require('../lukso-icon/index.cjs');
12
12
  require('../lukso-sanitize/index.cjs');
13
- require('../../style-map-227a49cb.cjs');
13
+ require('../../style-map-b13b92c1.cjs');
14
14
  require('../../directive-8278ab14.cjs');
15
15
 
16
16
  const style = ":host {\n\n display: inline-flex\n}\n\n:host([is-full-width]) {\n\n display: flex;\n\n width: 100%\n}";
@@ -1,12 +1,12 @@
1
- import { T as TailwindStyledElement, x, E } from '../../index-869a59a0.js';
2
- import { n, t } from '../../property-ff5733e6.js';
3
- import { r } from '../../state-9bdaddc0.js';
1
+ import { T as TailwindStyledElement, x, E } from '../../index-2d057f81.js';
2
+ import { n, t } from '../../property-5367c26a.js';
3
+ import { r } from '../../state-bdfaec36.js';
4
4
  import { c as ce } from '../../index-d14b6a34.js';
5
5
  import '../../tailwind-config.js';
6
6
  import { c as cn } from '../../cn-90c03edf.js';
7
7
  import '../lukso-icon/index.js';
8
8
  import '../lukso-sanitize/index.js';
9
- import '../../style-map-8a1e2472.js';
9
+ import '../../style-map-9e6bb4a6.js';
10
10
  import '../../directive-2bb7789e.js';
11
11
 
12
12
  const style = ":host {\n\n display: inline-flex\n}\n\n:host([is-full-width]) {\n\n display: flex;\n\n width: 100%\n}";
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-b44989bb.cjs');
6
- const property = require('../../property-65ed3fa1.cjs');
7
- const state = require('../../state-ec4491d8.cjs');
5
+ const shared_tailwindElement_index = require('../../index-96bba619.cjs');
6
+ const property = require('../../property-98f7e05b.cjs');
7
+ const state = require('../../state-eba8ded5.cjs');
8
8
  const index = require('../../index-2b104ecb.cjs');
9
- const styleMap = require('../../style-map-227a49cb.cjs');
9
+ const styleMap = require('../../style-map-b13b92c1.cjs');
10
10
  require('../../directive-8278ab14.cjs');
11
11
 
12
12
  var top = 'top';
@@ -1,8 +1,8 @@
1
- import { T as TailwindStyledElement, x } from '../../index-869a59a0.js';
2
- import { n, t } from '../../property-ff5733e6.js';
3
- import { r } from '../../state-9bdaddc0.js';
1
+ import { T as TailwindStyledElement, x } from '../../index-2d057f81.js';
2
+ import { n, t } from '../../property-5367c26a.js';
3
+ import { r } from '../../state-bdfaec36.js';
4
4
  import { c as ce } from '../../index-d14b6a34.js';
5
- import { o } from '../../style-map-8a1e2472.js';
5
+ import { o } from '../../style-map-9e6bb4a6.js';
6
6
  import '../../directive-2bb7789e.js';
7
7
 
8
8
  var top = 'top';