@lukso/web-components 1.35.0 → 1.36.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.
@@ -1,9 +1,10 @@
1
+ import { Address } from '../../shared/types';
1
2
  export type StringResult = {
2
3
  id?: string;
3
4
  value: string;
4
5
  };
5
6
  export type ProfileResult = {
6
- address: string;
7
+ address: Address;
7
8
  image?: string;
8
9
  name?: string;
9
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-search/index.ts"],"names":[],"mappings":"AAMA,OAAO,yBAAyB,CAAA;AAChC,OAAO,4BAA4B,CAAA;AACnC,OAAO,6BAA6B,CAAA;AAEpC,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;;AAED,qBACa,WAAY,SAAQ,gBAA4B;IAE3D,KAAK,SAAK;IAGV,IAAI,SAAK;IAGT,IAAI,SAAS;IAGb,WAAW,SAAK;IAGhB,KAAK,SAAK;IAGV,YAAY,SAAQ;IAGpB,EAAE,SAAK;IAGP,WAAW,SAAK;IAGhB,KAAK,SAAK;IAGV,WAAW,SAAK;IAGhB,WAAW,UAAQ;IAGnB,UAAU,UAAQ;IAGlB,UAAU,UAAQ;IAGlB,SAAS,UAAQ;IAGjB,UAAU,UAAQ;IAGlB,OAAO,SAAK;IAGZ,QAAQ,SAAM;IAGd,OAAO,CAAC,QAAQ,CAAQ;IAGxB,OAAO,CAAC,YAAY,CAAQ;IAG5B,OAAO,CAAC,WAAW,CAAQ;IAG3B,OAAO,CAAC,aAAa,CAAgB;IAErC,OAAO,CAAC,kBAAkB,CAEuD;IAEjF,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GZ,QAAQ,SAAM;IAGd,OAAO,CAAC,QAAQ,CAAQ;IAGxB,OAAO,CAAC,YAAY,CAAQ;IAG5B,OAAO,CAAC,WAAW,CAAQ;IAG3B,OAAO,CAAC,aAAa,CAAgB;IAErC,OAAO,CAAC,kBAAkB,CAEuD;IAEjF,aAAa;IAoCb,aAAa;IAUb,mBAAmB;IAQnB,aAAa;IAMb,eAAe;IA2Bf,oBAAoB,CAAC,MAAM,EAAE,YAAY;IAUzC,qBAAqB,CAAC,MAAM,EAAE,aAAa;IAqB3C,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,cAAc;IAetB,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,cAAc;IAMtB,MAAM;CAoBP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAA;KAC5B;CACF"}
@@ -44,6 +44,8 @@ exports.LuksoUsername = class LuksoUsername extends shared_tailwindElement_index
44
44
  this.addressColor = "";
45
45
  this.nameColor = "";
46
46
  this.customClass = "";
47
+ this.hidePrefix = false;
48
+ this.prefix = "@";
47
49
  /** Width of the first 4 bytes of the address */
48
50
  this.bytesWidth = 52;
49
51
  }
@@ -77,7 +79,7 @@ exports.LuksoUsername = class LuksoUsername extends shared_tailwindElement_index
77
79
  maxWidth: `${this.maxWidth - this.bytesWidth}px`
78
80
  })}
79
81
  >
80
- @${this.name}
82
+ ${this.hidePrefix ? shared_tailwindElement_index.A$1 : this.prefix}${this.name}
81
83
  </div>`;
82
84
  }
83
85
  /**
@@ -143,6 +145,12 @@ __decorateClass([
143
145
  __decorateClass([
144
146
  directive.e({ type: String, attribute: "custom-class" })
145
147
  ], exports.LuksoUsername.prototype, "customClass", 2);
148
+ __decorateClass([
149
+ directive.e({ type: Boolean, attribute: "hide-prefix" })
150
+ ], exports.LuksoUsername.prototype, "hidePrefix", 2);
151
+ __decorateClass([
152
+ directive.e({ type: String })
153
+ ], exports.LuksoUsername.prototype, "prefix", 2);
146
154
  exports.LuksoUsername = __decorateClass([
147
155
  directive.e$1("lukso-username")
148
156
  ], exports.LuksoUsername);
@@ -9,6 +9,8 @@ export declare class LuksoUsername extends LuksoUsername_base {
9
9
  addressColor: string;
10
10
  nameColor: string;
11
11
  customClass: string;
12
+ hidePrefix: boolean;
13
+ prefix: string;
12
14
  /** Width of the first 4 bytes of the address */
13
15
  private bytesWidth;
14
16
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-username/index.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;;AAEnE,qBACa,aAAc,SAAQ,kBAA4B;IAE7D,IAAI,SAAK;IAGT,OAAO,SAAK;IAGZ,QAAQ,SAAM;IAGd,IAAI,EAAE,YAAY,CAAU;IAG5B,OAAO,SAAI;IAGX,YAAY,SAAK;IAGjB,SAAS,SAAK;IAGd,WAAW,SAAK;IAEhB,gDAAgD;IAChD,OAAO,CAAC,UAAU,CAAK;IAEvB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAW5B;;;OAGG;IACH,OAAO,CAAC,YAAY;IAiBpB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAWvB,MAAM;CA2BP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAA;KAChC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-username/index.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;;AAEnE,qBACa,aAAc,SAAQ,kBAA4B;IAE7D,IAAI,SAAK;IAGT,OAAO,SAAK;IAGZ,QAAQ,SAAM;IAGd,IAAI,EAAE,YAAY,CAAU;IAG5B,OAAO,SAAI;IAGX,YAAY,SAAK;IAGjB,SAAS,SAAK;IAGd,WAAW,SAAK;IAGhB,UAAU,UAAQ;IAGlB,MAAM,SAAM;IAEZ,gDAAgD;IAChD,OAAO,CAAC,UAAU,CAAK;IAEvB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAW5B;;;OAGG;IACH,OAAO,CAAC,YAAY;IAiBpB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAWvB,MAAM;CA2BP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAA;KAChC;CACF"}
@@ -1,4 +1,4 @@
1
- import { T as TailwindStyledElement, x } from '../../index-e65ce6e8.js';
1
+ import { T as TailwindStyledElement, x, c as A } from '../../index-e65ce6e8.js';
2
2
  import { e, a as e$1 } from '../../directive-9ec64c08.js';
3
3
  import { o } from '../../style-map-0a64ef32.js';
4
4
  import { c as customClassMap } from '../../index-714323c9.js';
@@ -40,6 +40,8 @@ let LuksoUsername = class extends TailwindStyledElement(style) {
40
40
  this.addressColor = "";
41
41
  this.nameColor = "";
42
42
  this.customClass = "";
43
+ this.hidePrefix = false;
44
+ this.prefix = "@";
43
45
  /** Width of the first 4 bytes of the address */
44
46
  this.bytesWidth = 52;
45
47
  }
@@ -73,7 +75,7 @@ let LuksoUsername = class extends TailwindStyledElement(style) {
73
75
  maxWidth: `${this.maxWidth - this.bytesWidth}px`
74
76
  })}
75
77
  >
76
- @${this.name}
78
+ ${this.hidePrefix ? A : this.prefix}${this.name}
77
79
  </div>`;
78
80
  }
79
81
  /**
@@ -139,6 +141,12 @@ __decorateClass([
139
141
  __decorateClass([
140
142
  e({ type: String, attribute: "custom-class" })
141
143
  ], LuksoUsername.prototype, "customClass", 2);
144
+ __decorateClass([
145
+ e({ type: Boolean, attribute: "hide-prefix" })
146
+ ], LuksoUsername.prototype, "hidePrefix", 2);
147
+ __decorateClass([
148
+ e({ type: String })
149
+ ], LuksoUsername.prototype, "prefix", 2);
142
150
  LuksoUsername = __decorateClass([
143
151
  e$1("lukso-username")
144
152
  ], LuksoUsername);
@@ -4,14 +4,18 @@ declare const meta: Meta;
4
4
  export default meta;
5
5
  /** By default user name is displayed as `name` prefixed with `@` character and 4 bytes of `address` */
6
6
  export declare const DefaultUsername: any;
7
- /** Long names get truncated. You can control width of the component with `max-width` property. */
7
+ /** Long names get truncated. You can control width of the component with `max-width` attribute. */
8
8
  export declare const LongName: any;
9
- /** Example of component that has only `name` property. */
9
+ /** Example of component that has only `name` attribute. */
10
10
  export declare const OnlyName: any;
11
- /** Example of component that has only `address` property and `small` size. */
11
+ /** Example of component that has only `address` attribute and `small` size. */
12
12
  export declare const OnlyAddress: any;
13
- /** You can specify amount of sliced characters in the address with `slice-by` property. */
13
+ /** You can specify amount of sliced characters in the address with `slice-by` attribute. */
14
14
  export declare const SliceAddressBy4: any;
15
- /** Color of the address and name can be changed via `name-color` and `address-color` property. */
15
+ /** Color of the address and name can be changed via `name-color` and `address-color` attribute. */
16
16
  export declare const CustomColor: any;
17
+ /** You can customize prefix with `prefix` attribute. */
18
+ export declare const CustomPrefixColor: any;
19
+ /** You can hide prefix completely by adding `hide-prefix` attribute. */
20
+ export declare const HidePrefix: any;
17
21
  //# sourceMappingURL=lukso-username.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lukso-username.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-username/lukso-username.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AAEhD,OAAO,SAAS,CAAA;AAEhB,iIAAiI;AACjI,QAAA,MAAM,IAAI,EAAE,IA0FX,CAAA;AAED,eAAe,IAAI,CAAA;AAqBnB,uGAAuG;AACvG,eAAO,MAAM,eAAe,KAAoB,CAAA;AAEhD,kGAAkG;AAClG,eAAO,MAAM,QAAQ,KAAoB,CAAA;AAKzC,0DAA0D;AAC1D,eAAO,MAAM,QAAQ,KAAoB,CAAA;AAKzC,8EAA8E;AAC9E,eAAO,MAAM,WAAW,KAAoB,CAAA;AAO5C,2FAA2F;AAC3F,eAAO,MAAM,eAAe,KAAoB,CAAA;AAOhD,kGAAkG;AAClG,eAAO,MAAM,WAAW,KAAoB,CAAA"}
1
+ {"version":3,"file":"lukso-username.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-username/lukso-username.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AAEhD,OAAO,SAAS,CAAA;AAEhB,iIAAiI;AACjI,QAAA,MAAM,IAAI,EAAE,IA2HX,CAAA;AAED,eAAe,IAAI,CAAA;AA2BnB,uGAAuG;AACvG,eAAO,MAAM,eAAe,KAAoB,CAAA;AAEhD,mGAAmG;AACnG,eAAO,MAAM,QAAQ,KAAoB,CAAA;AAKzC,2DAA2D;AAC3D,eAAO,MAAM,QAAQ,KAAoB,CAAA;AAKzC,+EAA+E;AAC/E,eAAO,MAAM,WAAW,KAAoB,CAAA;AAO5C,4FAA4F;AAC5F,eAAO,MAAM,eAAe,KAAoB,CAAA;AAOhD,mGAAmG;AACnG,eAAO,MAAM,WAAW,KAAoB,CAAA;AAM5C,wDAAwD;AACxD,eAAO,MAAM,iBAAiB,KAAoB,CAAA;AAKlD,wEAAwE;AACxE,eAAO,MAAM,UAAU,KAAoB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export type Address = `0x${string}`;
2
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,KAAK,MAAM,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukso/web-components",
3
- "version": "1.35.0",
3
+ "version": "1.36.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",