@lukso/web-components 1.156.0 → 1.156.1
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/lukso-icon/index.cjs +33 -11
- package/dist/components/lukso-icon/index.d.ts +4 -4
- package/dist/components/lukso-icon/index.d.ts.map +1 -1
- package/dist/components/lukso-icon/index.js +33 -11
- package/dist/components/lukso-icon/lukso-icon.stories.d.ts +15 -1
- package/dist/components/lukso-icon/lukso-icon.stories.d.ts.map +1 -1
- package/dist/components/lukso-markdown-editor/index.cjs +493 -79
- package/dist/components/lukso-markdown-editor/index.d.ts +40 -1
- package/dist/components/lukso-markdown-editor/index.d.ts.map +1 -1
- package/dist/components/lukso-markdown-editor/index.js +493 -79
- package/dist/components/lukso-markdown-editor/lukso-markdown-editor.stories.d.ts +53 -1
- package/dist/components/lukso-markdown-editor/lukso-markdown-editor.stories.d.ts.map +1 -1
- package/dist/vitest.config.d.ts.map +1 -1
- package/package.json +1 -1
- package/LICENSE +0 -21
- package/README.md +0 -146
|
@@ -8320,15 +8320,17 @@ const iconMap = {
|
|
|
8320
8320
|
"logo-hyperlane": logoHyperlane,
|
|
8321
8321
|
"token-create": tokenCreate
|
|
8322
8322
|
};
|
|
8323
|
+
const DEFAULT_COLOR = "neutral-20";
|
|
8324
|
+
const DEFAULT_SIZE = "medium";
|
|
8323
8325
|
exports.LuksoIcon = class LuksoIcon extends shared_tailwindElement_index.TailwindStyledElement(style) {
|
|
8324
8326
|
constructor() {
|
|
8325
8327
|
super(...arguments);
|
|
8326
|
-
this.name =
|
|
8327
|
-
this.size =
|
|
8328
|
-
this.color =
|
|
8329
|
-
this.secondaryColor =
|
|
8328
|
+
this.name = void 0;
|
|
8329
|
+
this.size = DEFAULT_SIZE;
|
|
8330
|
+
this.color = DEFAULT_COLOR;
|
|
8331
|
+
this.secondaryColor = void 0;
|
|
8330
8332
|
this.pack = void 0;
|
|
8331
|
-
this.variant =
|
|
8333
|
+
this.variant = void 0;
|
|
8332
8334
|
this.svgContent = "";
|
|
8333
8335
|
this.sizes = {
|
|
8334
8336
|
"x-small": {
|
|
@@ -8444,16 +8446,36 @@ exports.LuksoIcon = class LuksoIcon extends shared_tailwindElement_index.Tailwin
|
|
|
8444
8446
|
}
|
|
8445
8447
|
async updated(changedProperties) {
|
|
8446
8448
|
super.updated(changedProperties);
|
|
8447
|
-
if (this.pack ===
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8449
|
+
if (this.pack === void 0) {
|
|
8450
|
+
if (this.variant) {
|
|
8451
|
+
this.variant = void 0;
|
|
8452
|
+
}
|
|
8451
8453
|
}
|
|
8452
|
-
if (this.pack === "vuesax"
|
|
8453
|
-
this.
|
|
8454
|
+
if (this.pack === "vuesax") {
|
|
8455
|
+
if (!this.variant) {
|
|
8456
|
+
this.variant = "linear";
|
|
8457
|
+
}
|
|
8458
|
+
if (changedProperties.has("name") || changedProperties.has("pack") || changedProperties.has("variant")) {
|
|
8459
|
+
const svgContent = await this.loadSvg(
|
|
8460
|
+
this.pack,
|
|
8461
|
+
this.variant,
|
|
8462
|
+
this.name
|
|
8463
|
+
);
|
|
8464
|
+
this.svgContent = svgContent;
|
|
8465
|
+
this.requestUpdate();
|
|
8466
|
+
}
|
|
8467
|
+
if (this.svgContent && (changedProperties.has("color") || changedProperties.has("secondaryColor") || changedProperties.has("size"))) {
|
|
8468
|
+
this.requestUpdate();
|
|
8469
|
+
}
|
|
8454
8470
|
}
|
|
8455
8471
|
}
|
|
8456
8472
|
render() {
|
|
8473
|
+
if (!this.color) {
|
|
8474
|
+
this.color = DEFAULT_COLOR;
|
|
8475
|
+
}
|
|
8476
|
+
if (!this.size) {
|
|
8477
|
+
this.size = DEFAULT_SIZE;
|
|
8478
|
+
}
|
|
8457
8479
|
const size = this.sizes[this.size];
|
|
8458
8480
|
if (!size) {
|
|
8459
8481
|
console.warn(`Size ${this.size} not found`);
|
|
@@ -11,12 +11,12 @@ export type IconPack = undefined | 'vuesax';
|
|
|
11
11
|
export type IconVariant = 'linear' | 'bold' | 'outline' | 'broken' | 'bulk' | 'twotone';
|
|
12
12
|
declare const LuksoIcon_base: typeof import('lit').LitElement;
|
|
13
13
|
export declare class LuksoIcon extends LuksoIcon_base {
|
|
14
|
-
name:
|
|
15
|
-
size:
|
|
14
|
+
name: any;
|
|
15
|
+
size: IconSize;
|
|
16
16
|
color: string;
|
|
17
|
-
secondaryColor:
|
|
17
|
+
secondaryColor: any;
|
|
18
18
|
pack: any;
|
|
19
|
-
variant:
|
|
19
|
+
variant: any;
|
|
20
20
|
private svgContent;
|
|
21
21
|
private sizes;
|
|
22
22
|
private svgModules;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AA0NjD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,UAAU,CAAA;AAEd,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;AAE3C,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,MAAM,GACN,SAAS,GACT,QAAQ,GACR,MAAM,GACN,SAAS,CAAA;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AA0NjD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,UAAU,CAAA;AAEd,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;AAE3C,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,MAAM,GACN,SAAS,GACT,QAAQ,GACR,MAAM,GACN,SAAS,CAAA;;AAkOb,qBACa,SAAU,SAAQ,cAA4B;IAEzD,IAAI,MAAY;IAGhB,IAAI,WAAe;IAGnB,KAAK,SAAgB;IAGrB,cAAc,MAAY;IAG1B,IAAI,MAAY;IAGhB,OAAO,MAAY;IAGnB,OAAO,CAAC,UAAU,CAAK;IAEvB,OAAO,CAAC,KAAK,CA+BZ;IAID,OAAO,CAAC,UAAU,CAGhB;IAEF;;;;;;;;OAQG;YACW,OAAO;IAsCrB;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAmElB,OAAO,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,IAAI,CAAC;IA6CvD,MAAM;CAuDP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAA;KACxB;CACF"}
|
|
@@ -8316,15 +8316,17 @@ const iconMap = {
|
|
|
8316
8316
|
"logo-hyperlane": logoHyperlane,
|
|
8317
8317
|
"token-create": tokenCreate
|
|
8318
8318
|
};
|
|
8319
|
+
const DEFAULT_COLOR = "neutral-20";
|
|
8320
|
+
const DEFAULT_SIZE = "medium";
|
|
8319
8321
|
let LuksoIcon = class extends TailwindStyledElement(style) {
|
|
8320
8322
|
constructor() {
|
|
8321
8323
|
super(...arguments);
|
|
8322
|
-
this.name =
|
|
8323
|
-
this.size =
|
|
8324
|
-
this.color =
|
|
8325
|
-
this.secondaryColor =
|
|
8324
|
+
this.name = void 0;
|
|
8325
|
+
this.size = DEFAULT_SIZE;
|
|
8326
|
+
this.color = DEFAULT_COLOR;
|
|
8327
|
+
this.secondaryColor = void 0;
|
|
8326
8328
|
this.pack = void 0;
|
|
8327
|
-
this.variant =
|
|
8329
|
+
this.variant = void 0;
|
|
8328
8330
|
this.svgContent = "";
|
|
8329
8331
|
this.sizes = {
|
|
8330
8332
|
"x-small": {
|
|
@@ -8440,16 +8442,36 @@ let LuksoIcon = class extends TailwindStyledElement(style) {
|
|
|
8440
8442
|
}
|
|
8441
8443
|
async updated(changedProperties) {
|
|
8442
8444
|
super.updated(changedProperties);
|
|
8443
|
-
if (this.pack ===
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8445
|
+
if (this.pack === void 0) {
|
|
8446
|
+
if (this.variant) {
|
|
8447
|
+
this.variant = void 0;
|
|
8448
|
+
}
|
|
8447
8449
|
}
|
|
8448
|
-
if (this.pack === "vuesax"
|
|
8449
|
-
this.
|
|
8450
|
+
if (this.pack === "vuesax") {
|
|
8451
|
+
if (!this.variant) {
|
|
8452
|
+
this.variant = "linear";
|
|
8453
|
+
}
|
|
8454
|
+
if (changedProperties.has("name") || changedProperties.has("pack") || changedProperties.has("variant")) {
|
|
8455
|
+
const svgContent = await this.loadSvg(
|
|
8456
|
+
this.pack,
|
|
8457
|
+
this.variant,
|
|
8458
|
+
this.name
|
|
8459
|
+
);
|
|
8460
|
+
this.svgContent = svgContent;
|
|
8461
|
+
this.requestUpdate();
|
|
8462
|
+
}
|
|
8463
|
+
if (this.svgContent && (changedProperties.has("color") || changedProperties.has("secondaryColor") || changedProperties.has("size"))) {
|
|
8464
|
+
this.requestUpdate();
|
|
8465
|
+
}
|
|
8450
8466
|
}
|
|
8451
8467
|
}
|
|
8452
8468
|
render() {
|
|
8469
|
+
if (!this.color) {
|
|
8470
|
+
this.color = DEFAULT_COLOR;
|
|
8471
|
+
}
|
|
8472
|
+
if (!this.size) {
|
|
8473
|
+
this.size = DEFAULT_SIZE;
|
|
8474
|
+
}
|
|
8453
8475
|
const size = this.sizes[this.size];
|
|
8454
8476
|
if (!size) {
|
|
8455
8477
|
console.warn(`Size ${this.size} not found`);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta } from '@storybook/web-components-vite';
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
2
|
/** Documentation and examples of `lukso-icon` component. Icons comes in `small`, `medium`, `large` and `x-large` size that is set in `size` property.
|
|
3
3
|
* The component supports multiple icon packs including the default `lukso` pack and the new `vuesax` pack with different variants.
|
|
4
4
|
* Please check all available icons in Icons Showcase.
|
|
@@ -29,4 +29,18 @@ export declare const AnimatedIcon: any;
|
|
|
29
29
|
export declare const VuesaxIconPack: any;
|
|
30
30
|
/** Example of Vuesax variants for `text-bold` icon. */
|
|
31
31
|
export declare const VuesaxIconVariants: () => import('lit-html').TemplateResult<1>;
|
|
32
|
+
/** Test story for icon with just name */
|
|
33
|
+
export declare const IconName: StoryObj;
|
|
34
|
+
/** Test story for icon with custom color */
|
|
35
|
+
export declare const IconCustomColor: StoryObj;
|
|
36
|
+
/** Test story for icon with large size */
|
|
37
|
+
export declare const IconLargeSize: StoryObj;
|
|
38
|
+
/** Test story for Vuesax linear icon */
|
|
39
|
+
export declare const VuesaxLinearIcon: StoryObj;
|
|
40
|
+
/** Test story for Vuesax bold icon */
|
|
41
|
+
export declare const VuesaxBoldIcon: StoryObj;
|
|
42
|
+
/** Test story for Vuesax colored icon */
|
|
43
|
+
export declare const VuesaxColoredIcon: StoryObj;
|
|
44
|
+
/** Test story for Vuesax large icon */
|
|
45
|
+
export declare const VuesaxLargeIcon: StoryObj;
|
|
32
46
|
//# sourceMappingURL=lukso-icon.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lukso-icon.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-icon/lukso-icon.stories.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lukso-icon.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-icon/lukso-icon.stories.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAA;AAEpE,OAAO,SAAS,CAAA;AAEhB;;;GAGG;AACH,QAAA,MAAM,IAAI,EAAE,IAkFX,CAAA;AAED,eAAe,IAAI,CAAA;AAqBnB,yFAAyF;AACzF,eAAO,MAAM,WAAW,KAAoB,CAAA;AAE5C,mDAAmD;AACnD,eAAO,MAAM,UAAU,KAAoB,CAAA;AAK3C,iDAAiD;AACjD,eAAO,MAAM,SAAS,KAAoB,CAAA;AAK1C,iDAAiD;AACjD,eAAO,MAAM,SAAS,KAAoB,CAAA;AAK1C,mDAAmD;AACnD,eAAO,MAAM,UAAU,KAAoB,CAAA;AAK3C,oDAAoD;AACpD,eAAO,MAAM,WAAW,KAAoB,CAAA;AAK5C,0EAA0E;AAC1E,eAAO,MAAM,eAAe,KAAoB,CAAA;AAKhD,0FAA0F;AAC1F,eAAO,MAAM,kBAAkB,KAAoB,CAAA;AAOnD,qHAAqH;AACrH,eAAO,MAAM,WAAW,KAAoB,CAAA;AAK5C,uKAAuK;AACvK,eAAO,MAAM,YAAY,KAAoB,CAAA;AAO7C,6CAA6C;AAC7C,eAAO,MAAM,cAAc,KAAoB,CAAA;AAO/C,uDAAuD;AACvD,eAAO,MAAM,kBAAkB,4CAS9B,CAAA;AACD,yCAAyC;AACzC,eAAO,MAAM,QAAQ,EAAE,QAsBtB,CAAA;AAED,4CAA4C;AAC5C,eAAO,MAAM,eAAe,EAAE,QAuB7B,CAAA;AAED,0CAA0C;AAC1C,eAAO,MAAM,aAAa,EAAE,QAuB3B,CAAA;AAED,wCAAwC;AACxC,eAAO,MAAM,gBAAgB,EAAE,QAuB9B,CAAA;AAED,sCAAsC;AACtC,eAAO,MAAM,cAAc,EAAE,QAwB5B,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,iBAAiB,EAAE,QAwB/B,CAAA;AAED,uCAAuC;AACvC,eAAO,MAAM,eAAe,EAAE,QAwB7B,CAAA"}
|