@lukso/web-components 1.49.0 → 1.49.2
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.
- package/dist/components/index.cjs +2 -2
- package/dist/components/index.js +2 -2
- package/dist/components/lukso-button/index.cjs +1 -1
- package/dist/components/lukso-button/index.js +1 -1
- package/dist/components/lukso-card/index.cjs +1 -1
- package/dist/components/lukso-card/index.js +1 -1
- package/dist/components/lukso-checkbox/index.cjs +1 -1
- package/dist/components/lukso-checkbox/index.js +1 -1
- package/dist/components/lukso-footer/index.cjs +10 -5
- package/dist/components/lukso-footer/index.d.ts +2 -2
- package/dist/components/lukso-footer/index.d.ts.map +1 -1
- package/dist/components/lukso-footer/index.js +10 -5
- package/dist/components/lukso-footer/lukso-footer.stories.d.ts.map +1 -1
- package/dist/components/lukso-input/index.cjs +1 -1
- package/dist/components/lukso-input/index.js +1 -1
- package/dist/components/lukso-modal/index.cjs +1 -1
- package/dist/components/lukso-modal/index.js +1 -1
- package/dist/components/lukso-navbar/index.cjs +1 -1
- package/dist/components/lukso-navbar/index.js +1 -1
- package/dist/components/lukso-profile/index.cjs +1 -1
- package/dist/components/lukso-profile/index.js +1 -1
- package/dist/components/lukso-progress/index.cjs +1 -1
- package/dist/components/lukso-progress/index.js +1 -1
- package/dist/components/lukso-search/index.cjs +1 -1
- package/dist/components/lukso-search/index.js +1 -1
- package/dist/components/lukso-select/index.cjs +1 -1
- package/dist/components/lukso-select/index.js +1 -1
- package/dist/components/lukso-share/index.cjs +10 -4
- package/dist/components/lukso-share/index.d.ts +2 -1
- package/dist/components/lukso-share/index.d.ts.map +1 -1
- package/dist/components/lukso-share/index.js +10 -4
- package/dist/components/lukso-share/lukso-share.stories.d.ts.map +1 -1
- package/dist/components/lukso-switch/index.cjs +1 -1
- package/dist/components/lukso-switch/index.js +1 -1
- package/dist/components/lukso-tag/index.cjs +1 -1
- package/dist/components/lukso-tag/index.js +1 -1
- package/dist/components/lukso-terms/index.cjs +1 -1
- package/dist/components/lukso-terms/index.js +1 -1
- package/dist/components/lukso-username/index.cjs +28 -20
- package/dist/components/lukso-username/index.d.ts +0 -12
- package/dist/components/lukso-username/index.d.ts.map +1 -1
- package/dist/components/lukso-username/index.js +31 -23
- package/dist/components/lukso-username/lukso-username.stories.d.ts +1 -1
- package/dist/components/lukso-username/lukso-username.stories.d.ts.map +1 -1
- package/dist/components/lukso-wizard/index.cjs +1 -1
- package/dist/components/lukso-wizard/index.js +1 -1
- package/dist/index-5e194caf.js +18 -0
- package/dist/index-e9668573.cjs +20 -0
- package/dist/index.cjs +2565 -42
- package/dist/index.js +2528 -1
- package/package.json +1 -1
- package/dist/index-944f6ebe.js +0 -2543
- package/dist/index-97750d66.cjs +0 -2546
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-username/index.ts"],"names":[],"mappings":"
|
|
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;IAGhB,UAAU,UAAQ;IAGlB,MAAM,SAAM;IAEZ,gDAAgD;IAChD,OAAO,CAAC,UAAU,CAAK;IAEvB,OAAO,CAAC,oBAAoB;IAa5B,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,eAAe;IAWvB,MAAM;CA2BP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAA;KAChC;CACF"}
|
|
@@ -1,8 +1,26 @@
|
|
|
1
|
-
import { T as TailwindStyledElement, x
|
|
2
|
-
import { n, e } from '../../query-assigned-elements-5d94572f.js';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { A, T as TailwindStyledElement, x } from '../../index-cfea1b58.js';
|
|
2
|
+
import { n, e as e$1 } from '../../query-assigned-elements-5d94572f.js';
|
|
3
|
+
import { c as customClassMap } from '../../index-5e194caf.js';
|
|
4
|
+
import { e, i, t } from '../../directive-2bb7789e.js';
|
|
5
|
+
|
|
6
|
+
class CustomStyleMapDirective extends i {
|
|
7
|
+
constructor(partInfo) {
|
|
8
|
+
super(partInfo);
|
|
9
|
+
if (partInfo.type !== t.ATTRIBUTE || partInfo.name !== "style" || partInfo.strings?.length > 2) {
|
|
10
|
+
throw new Error(
|
|
11
|
+
"`customStyleMap()` can only be used in the `style` attribute and must be the only part in the attribute."
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
render(styleInfoList) {
|
|
16
|
+
const styles = Object.keys(styleInfoList).filter((key) => styleInfoList[key]);
|
|
17
|
+
if (styles.length === 0) {
|
|
18
|
+
return A;
|
|
19
|
+
}
|
|
20
|
+
return ` ${styles.join("; ")} `;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const customStyleMap = e(CustomStyleMapDirective);
|
|
6
24
|
|
|
7
25
|
const sliceAddress = (address, startSliceBy = 6, endSliceBy) => {
|
|
8
26
|
if (!address) {
|
|
@@ -46,43 +64,33 @@ let LuksoUsername = class extends TailwindStyledElement(style) {
|
|
|
46
64
|
/** Width of the first 4 bytes of the address */
|
|
47
65
|
this.bytesWidth = 52;
|
|
48
66
|
}
|
|
49
|
-
/**
|
|
50
|
-
* Template for 4byte address
|
|
51
|
-
* e.g: #1234
|
|
52
|
-
*/
|
|
53
67
|
addressBytesTemplate() {
|
|
54
68
|
return x`<div
|
|
55
69
|
class="inline-block ${customClassMap({
|
|
56
|
-
["text-" + this.addressColor]: this.addressColor !== "",
|
|
57
70
|
["text-neutral-60"]: this.addressColor === ""
|
|
58
71
|
})}"
|
|
72
|
+
style=${customStyleMap({
|
|
73
|
+
[`color: var(--${this.addressColor})`]: this.addressColor !== ""
|
|
74
|
+
})}
|
|
59
75
|
>
|
|
60
76
|
#${this.address.slice(2, 6)}
|
|
61
77
|
</div>`;
|
|
62
78
|
}
|
|
63
|
-
/**
|
|
64
|
-
* Template for name
|
|
65
|
-
* e.g: @John
|
|
66
|
-
*/
|
|
67
79
|
nameTemplate() {
|
|
68
80
|
return x`<div
|
|
69
81
|
class="inline-block whitespace-nowrap overflow-hidden text-ellipsis ${customClassMap(
|
|
70
82
|
{
|
|
71
|
-
["text-transparent bg-clip-text bg-gradient-to-r from-gradient-1-start to-gradient-1-end"]: this.nameColor === ""
|
|
72
|
-
["text-" + this.nameColor]: this.nameColor !== ""
|
|
83
|
+
["text-transparent bg-clip-text bg-gradient-to-r from-gradient-1-start to-gradient-1-end"]: this.nameColor === ""
|
|
73
84
|
}
|
|
74
85
|
)}"
|
|
75
|
-
style=${
|
|
76
|
-
|
|
86
|
+
style=${customStyleMap({
|
|
87
|
+
[`max-width: ${this.maxWidth - this.bytesWidth}px`]: true,
|
|
88
|
+
[`color: var(--${this.nameColor})`]: this.nameColor !== ""
|
|
77
89
|
})}
|
|
78
90
|
>
|
|
79
91
|
${this.hidePrefix ? A : this.prefix}${this.name}
|
|
80
92
|
</div>`;
|
|
81
93
|
}
|
|
82
|
-
/**
|
|
83
|
-
* Template for address
|
|
84
|
-
* e.g: 0x123...789
|
|
85
|
-
*/
|
|
86
94
|
addressTemplate() {
|
|
87
95
|
return x`<div
|
|
88
96
|
class="inline-block ${customClassMap({
|
|
@@ -149,7 +157,7 @@ __decorateClass([
|
|
|
149
157
|
n({ type: String })
|
|
150
158
|
], LuksoUsername.prototype, "prefix", 2);
|
|
151
159
|
LuksoUsername = __decorateClass([
|
|
152
|
-
e("lukso-username")
|
|
160
|
+
e$1("lukso-username")
|
|
153
161
|
], LuksoUsername);
|
|
154
162
|
|
|
155
163
|
export { LuksoUsername };
|
|
@@ -15,7 +15,7 @@ export declare const SliceAddressBy4: any;
|
|
|
15
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
17
|
/** You can customize prefix with `prefix` attribute. */
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const CustomPrefix: any;
|
|
19
19
|
/** You can hide prefix completely by adding `hide-prefix` attribute. */
|
|
20
20
|
export declare const HidePrefix: any;
|
|
21
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,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,
|
|
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,YAAY,KAAoB,CAAA;AAK7C,wEAAwE;AACxE,eAAO,MAAM,UAAU,KAAoB,CAAA"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
const shared_tailwindElement_index = require('../../index-c04e4744.cjs');
|
|
6
6
|
const queryAssignedElements = require('../../query-assigned-elements-1d5d9d4c.cjs');
|
|
7
7
|
const directive = require('../../directive-8278ab14.cjs');
|
|
8
|
-
const index = require('../../index-
|
|
8
|
+
const index = require('../../index-e9668573.cjs');
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @license
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j, b as T, T as TailwindStyledElement, x } from '../../index-cfea1b58.js';
|
|
2
2
|
import { n, e as e$1 } from '../../query-assigned-elements-5d94572f.js';
|
|
3
3
|
import { e, i, t } from '../../directive-2bb7789e.js';
|
|
4
|
-
import {
|
|
4
|
+
import { c as customClassMap } from '../../index-5e194caf.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @license
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { e, i, t } from './directive-2bb7789e.js';
|
|
2
|
+
|
|
3
|
+
class CustomClassMapDirective extends i {
|
|
4
|
+
constructor(partInfo) {
|
|
5
|
+
super(partInfo);
|
|
6
|
+
if (partInfo.type !== t.ATTRIBUTE || partInfo.name !== "class" || partInfo.strings?.length > 2) {
|
|
7
|
+
throw new Error(
|
|
8
|
+
"`customClassMap()` can only be used in the `class` attribute and must be the only part in the attribute."
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
render(classInfoList) {
|
|
13
|
+
return " " + Object.keys(classInfoList).filter((key) => classInfoList[key]).join(" ") + " ";
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
const customClassMap = e(CustomClassMapDirective);
|
|
17
|
+
|
|
18
|
+
export { customClassMap as c };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const directive = require('./directive-8278ab14.cjs');
|
|
4
|
+
|
|
5
|
+
class CustomClassMapDirective extends directive.i {
|
|
6
|
+
constructor(partInfo) {
|
|
7
|
+
super(partInfo);
|
|
8
|
+
if (partInfo.type !== directive.t.ATTRIBUTE || partInfo.name !== "class" || partInfo.strings?.length > 2) {
|
|
9
|
+
throw new Error(
|
|
10
|
+
"`customClassMap()` can only be used in the `class` attribute and must be the only part in the attribute."
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
render(classInfoList) {
|
|
15
|
+
return " " + Object.keys(classInfoList).filter((key) => classInfoList[key]).join(" ") + " ";
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
const customClassMap = directive.e(CustomClassMapDirective);
|
|
19
|
+
|
|
20
|
+
exports.customClassMap = customClassMap;
|