@lukso/web-components 1.65.0 → 1.66.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.
@@ -174,6 +174,9 @@ exports.LuksoButton = class LuksoButton extends shared_tailwindElement_index.Tai
174
174
  type=${this.type}
175
175
  class=${cn.cn(buttonStyles, this.customClass)}
176
176
  @mousedown=${this.handleMouseDown}
177
+ @touchstart=${this.handleMouseDown}
178
+ @touchend=${this.handleMouseUp}
179
+ @touchcancel=${this.handleMouseUp}
177
180
  @mouseup=${this.handleMouseUp}
178
181
  @mouseleave=${this.handleMouseUp}
179
182
  >
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-button/index.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,WAAW,GACX,SAAS,GACT,MAAM,GACN,YAAY,GACZ,UAAU,GACV,MAAM,CAAA;AACV,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAA;AAC3C,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAA;AACtD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;;AAIhE,qBACa,WAAY,SAAQ,gBAA4B;IAE3D,OAAO,EAAE,aAAa,CAAY;IAGlC,IAAI,EAAE,UAAU,CAAW;IAG3B,QAAQ,UAAQ;IAGhB,WAAW,UAAQ;IAGnB,WAAW,UAAQ;IAGnB,MAAM,UAAQ;IAGd,SAAS,UAAQ;IAGjB,IAAI,EAAE,UAAU,CAAW;IAG3B,IAAI,SAAK;IAGT,MAAM,EAAE,UAAU,CAAW;IAG7B,GAAG,SAAK;IAGR,WAAW,SAAK;IAGhB,WAAW,SAAK;IAGhB,QAAQ,UAAQ;IAGhB,KAAK,SAAK;IAGV,OAAO,CAAC,SAAS,CAAQ;IAGzB,OAAO,CAAC,YAA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;IAEF,OAAO,CAAC,YAAY,CA6DlB;IAEF,OAAO,CAAC,eAAe;IA2BvB,OAAO,CAAC,aAAa;IAcrB,eAAe,IAAI,OAAO;IAa1B,eAAe;IAQf,cAAc;IA6Bd,YAAY;IAsBZ,MAAM;CAGP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAA;KAC5B;CACF"}
@@ -170,6 +170,9 @@ let LuksoButton = class extends TailwindStyledElement(style) {
170
170
  type=${this.type}
171
171
  class=${cn(buttonStyles, this.customClass)}
172
172
  @mousedown=${this.handleMouseDown}
173
+ @touchstart=${this.handleMouseDown}
174
+ @touchend=${this.handleMouseUp}
175
+ @touchcancel=${this.handleMouseUp}
173
176
  @mouseup=${this.handleMouseUp}
174
177
  @mouseleave=${this.handleMouseUp}
175
178
  >
@@ -10,7 +10,7 @@ require('../lukso-icon/index.cjs');
10
10
  require('../lukso-tag/index.cjs');
11
11
  require('../../style-map-c86dd6e2.cjs');
12
12
  require('../../directive-8278ab14.cjs');
13
- require('../../index-e9668573.cjs');
13
+ require('../../index-98e8e0d5.cjs');
14
14
 
15
15
  var __defProp = Object.defineProperty;
16
16
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -6,7 +6,7 @@ import '../lukso-icon/index.js';
6
6
  import '../lukso-tag/index.js';
7
7
  import '../../style-map-9fdda015.js';
8
8
  import '../../directive-2bb7789e.js';
9
- import '../../index-5e194caf.js';
9
+ import '../../index-1765cfe1.js';
10
10
 
11
11
  var __defProp = Object.defineProperty;
12
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -4,8 +4,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
5
  const shared_tailwindElement_index = require('../../index-688c3040.cjs');
6
6
  const queryAssignedElements = require('../../query-assigned-elements-1d5d9d4c.cjs');
7
- const styleMap = require('../../style-map-c86dd6e2.cjs');
8
- const index = require('../../index-e9668573.cjs');
7
+ const index = require('../../index-e8741080.cjs');
8
+ const index$1 = require('../../index-98e8e0d5.cjs');
9
9
  require('../../directive-8278ab14.cjs');
10
10
 
11
11
  const style = ":host {\n display: inline-flex\n}";
@@ -27,42 +27,55 @@ exports.LuksoTag = class LuksoTag extends shared_tailwindElement_index.TailwindS
27
27
  this.size = "small";
28
28
  this.isRounded = false;
29
29
  this.backgroundColor = "";
30
+ this.borderColor = "";
30
31
  this.textColor = "";
31
- this.defaultStyles = `inline-flex items-center justify-center border border-neutral-20 text-neutral-20`;
32
- this.extraSmallStyles = `font-inter text-8 font-500 leading-20 h-[20px]`;
33
- this.smallStyles = `paragraph-inter-12-medium h-[28px]`;
34
- this.largeStyles = `paragraph-inter-14-medium h-[34px]`;
32
+ this.tagStyles = index.se({
33
+ base: "inline-flex items-center justify-center border border-neutral-20 text-neutral-20 px-2",
34
+ variants: {
35
+ size: {
36
+ "x-small": "font-inter text-8 font-500 leading-20 h-[20px] px-1 rounded-4",
37
+ small: "paragraph-inter-12-medium h-[28px] px-2 rounded-8",
38
+ large: "paragraph-inter-14-medium h-[34px] px-4 rounded-8"
39
+ },
40
+ isRounded: {
41
+ true: "rounded-[56px]"
42
+ }
43
+ },
44
+ compoundVariants: [
45
+ {
46
+ size: "small",
47
+ isRounded: true,
48
+ class: "px-3"
49
+ },
50
+ {
51
+ size: "x-small",
52
+ isRounded: true,
53
+ class: "px-2"
54
+ }
55
+ ]
56
+ });
35
57
  }
36
- padding() {
37
- if (this.size === "x-small" && !this.isRounded) {
38
- return "px-1";
58
+ resolveBorderColor() {
59
+ if (this.borderColor) {
60
+ return this.borderColor;
39
61
  }
40
- if (this.size === "small" && this.isRounded) {
41
- return "px-3";
62
+ if (this.backgroundColor) {
63
+ return this.backgroundColor;
42
64
  }
43
- if (this.size === "large") {
44
- return "px-4";
45
- }
46
- return "px-2";
47
65
  }
48
66
  render() {
67
+ const tagStyles = this.tagStyles({
68
+ size: this.size,
69
+ isRounded: this.isRounded
70
+ });
49
71
  return shared_tailwindElement_index.x`
50
72
  <div
51
73
  data-testid="tag"
52
- class=${index.customClassMap({
53
- [this.defaultStyles]: true,
54
- [this.padding()]: true,
55
- ["rounded-[56px]"]: this.isRounded,
56
- ["rounded-8"]: !this.isRounded && this.size !== "x-small",
57
- ["rounded-4"]: !this.isRounded && this.size === "x-small",
58
- [this.extraSmallStyles]: this.size === "x-small",
59
- [this.smallStyles]: this.size === "small",
60
- [this.largeStyles]: this.size === "large"
61
- })}
62
- style=${styleMap.o({
63
- backgroundColor: `var(--${this.backgroundColor})`,
64
- borderColor: `var(--${this.backgroundColor})`,
65
- color: `var(--${this.textColor})`
74
+ class=${tagStyles}
75
+ style=${index$1.customStyleMap({
76
+ [`background-color: var(--${this.backgroundColor})`]: !!this.backgroundColor,
77
+ [`border-color: var(--${this.resolveBorderColor()})`]: !!this.resolveBorderColor(),
78
+ [`color: var(--${this.textColor})`]: !!this.textColor
66
79
  })}
67
80
  >
68
81
  <slot></slot>
@@ -79,6 +92,9 @@ __decorateClass([
79
92
  __decorateClass([
80
93
  queryAssignedElements.n({ type: String, attribute: "background-color" })
81
94
  ], exports.LuksoTag.prototype, "backgroundColor", 2);
95
+ __decorateClass([
96
+ queryAssignedElements.n({ type: String, attribute: "border-color" })
97
+ ], exports.LuksoTag.prototype, "borderColor", 2);
82
98
  __decorateClass([
83
99
  queryAssignedElements.n({ type: String, attribute: "text-color" })
84
100
  ], exports.LuksoTag.prototype, "textColor", 2);
@@ -4,12 +4,10 @@ export declare class LuksoTag extends LuksoTag_base {
4
4
  size: TagSizes;
5
5
  isRounded: boolean;
6
6
  backgroundColor: string;
7
+ borderColor: string;
7
8
  textColor: string;
8
- private defaultStyles;
9
- private extraSmallStyles;
10
- private smallStyles;
11
- private largeStyles;
12
- private padding;
9
+ private tagStyles;
10
+ private resolveBorderColor;
13
11
  render(): import("lit-html").TemplateResult<1>;
14
12
  }
15
13
  declare global {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-tag/index.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;;AAEpD,qBACa,QAAS,SAAQ,aAA4B;IAExD,IAAI,EAAE,QAAQ,CAAU;IAGxB,SAAS,UAAQ;IAGjB,eAAe,SAAK;IAGpB,SAAS,SAAK;IAEd,OAAO,CAAC,aAAa,CAAqF;IAC1G,OAAO,CAAC,gBAAgB,CAAmD;IAC3E,OAAO,CAAC,WAAW,CAAuC;IAC1D,OAAO,CAAC,WAAW,CAAuC;IAE1D,OAAO,CAAC,OAAO;IAgBf,MAAM;CAwBP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAA;KACtB;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-tag/index.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;;AAEpD,qBACa,QAAS,SAAQ,aAA4B;IAExD,IAAI,EAAE,QAAQ,CAAU;IAGxB,SAAS,UAAQ;IAGjB,eAAe,SAAK;IAGpB,WAAW,SAAK;IAGhB,SAAS,SAAK;IAEd,OAAO,CAAC,SAAS,CAyBf;IAEF,OAAO,CAAC,kBAAkB;IAU1B,MAAM;CAsBP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAA;KACtB;CACF"}
@@ -1,7 +1,7 @@
1
1
  import { T as TailwindStyledElement, x } from '../../index-3527fb14.js';
2
2
  import { n, e } from '../../query-assigned-elements-5d94572f.js';
3
- import { o } from '../../style-map-9fdda015.js';
4
- import { c as customClassMap } from '../../index-5e194caf.js';
3
+ import { s as se } from '../../index-c55a1069.js';
4
+ import { c as customStyleMap } from '../../index-1765cfe1.js';
5
5
  import '../../directive-2bb7789e.js';
6
6
 
7
7
  const style = ":host {\n display: inline-flex\n}";
@@ -23,42 +23,55 @@ let LuksoTag = class extends TailwindStyledElement(style) {
23
23
  this.size = "small";
24
24
  this.isRounded = false;
25
25
  this.backgroundColor = "";
26
+ this.borderColor = "";
26
27
  this.textColor = "";
27
- this.defaultStyles = `inline-flex items-center justify-center border border-neutral-20 text-neutral-20`;
28
- this.extraSmallStyles = `font-inter text-8 font-500 leading-20 h-[20px]`;
29
- this.smallStyles = `paragraph-inter-12-medium h-[28px]`;
30
- this.largeStyles = `paragraph-inter-14-medium h-[34px]`;
28
+ this.tagStyles = se({
29
+ base: "inline-flex items-center justify-center border border-neutral-20 text-neutral-20 px-2",
30
+ variants: {
31
+ size: {
32
+ "x-small": "font-inter text-8 font-500 leading-20 h-[20px] px-1 rounded-4",
33
+ small: "paragraph-inter-12-medium h-[28px] px-2 rounded-8",
34
+ large: "paragraph-inter-14-medium h-[34px] px-4 rounded-8"
35
+ },
36
+ isRounded: {
37
+ true: "rounded-[56px]"
38
+ }
39
+ },
40
+ compoundVariants: [
41
+ {
42
+ size: "small",
43
+ isRounded: true,
44
+ class: "px-3"
45
+ },
46
+ {
47
+ size: "x-small",
48
+ isRounded: true,
49
+ class: "px-2"
50
+ }
51
+ ]
52
+ });
31
53
  }
32
- padding() {
33
- if (this.size === "x-small" && !this.isRounded) {
34
- return "px-1";
54
+ resolveBorderColor() {
55
+ if (this.borderColor) {
56
+ return this.borderColor;
35
57
  }
36
- if (this.size === "small" && this.isRounded) {
37
- return "px-3";
58
+ if (this.backgroundColor) {
59
+ return this.backgroundColor;
38
60
  }
39
- if (this.size === "large") {
40
- return "px-4";
41
- }
42
- return "px-2";
43
61
  }
44
62
  render() {
63
+ const tagStyles = this.tagStyles({
64
+ size: this.size,
65
+ isRounded: this.isRounded
66
+ });
45
67
  return x`
46
68
  <div
47
69
  data-testid="tag"
48
- class=${customClassMap({
49
- [this.defaultStyles]: true,
50
- [this.padding()]: true,
51
- ["rounded-[56px]"]: this.isRounded,
52
- ["rounded-8"]: !this.isRounded && this.size !== "x-small",
53
- ["rounded-4"]: !this.isRounded && this.size === "x-small",
54
- [this.extraSmallStyles]: this.size === "x-small",
55
- [this.smallStyles]: this.size === "small",
56
- [this.largeStyles]: this.size === "large"
57
- })}
58
- style=${o({
59
- backgroundColor: `var(--${this.backgroundColor})`,
60
- borderColor: `var(--${this.backgroundColor})`,
61
- color: `var(--${this.textColor})`
70
+ class=${tagStyles}
71
+ style=${customStyleMap({
72
+ [`background-color: var(--${this.backgroundColor})`]: !!this.backgroundColor,
73
+ [`border-color: var(--${this.resolveBorderColor()})`]: !!this.resolveBorderColor(),
74
+ [`color: var(--${this.textColor})`]: !!this.textColor
62
75
  })}
63
76
  >
64
77
  <slot></slot>
@@ -75,6 +88,9 @@ __decorateClass([
75
88
  __decorateClass([
76
89
  n({ type: String, attribute: "background-color" })
77
90
  ], LuksoTag.prototype, "backgroundColor", 2);
91
+ __decorateClass([
92
+ n({ type: String, attribute: "border-color" })
93
+ ], LuksoTag.prototype, "borderColor", 2);
78
94
  __decorateClass([
79
95
  n({ type: String, attribute: "text-color" })
80
96
  ], LuksoTag.prototype, "textColor", 2);
@@ -1,4 +1,4 @@
1
- import { Meta } from '@storybook/web-components';
1
+ import type { Meta } from '@storybook/web-components';
2
2
  /** Documentation and examples of `lukso-tag` component. */
3
3
  declare const meta: Meta;
4
4
  export default meta;
@@ -10,7 +10,7 @@ export declare const LargeTag: any;
10
10
  export declare const ExtraSmallTag: any;
11
11
  /** You can create "pill" tags when adding `is-rounded` property. */
12
12
  export declare const RoundedTag: any;
13
- /** You can change color of the tag to any from the palette with `text-color` and `background-color` property. */
13
+ /** You can change color of the tag to any from the palette with `text-color`, `background-color` and 'border-color` property. */
14
14
  export declare const CustomColorTag: any;
15
15
  /** Tags can have icons inside. Please check `lukso-icon` component for more details about using icons. */
16
16
  export declare const IconTag: any;
@@ -1 +1 @@
1
- {"version":3,"file":"lukso-tag.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-tag/lukso-tag.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AAGhD,OAAO,SAAS,CAAA;AAChB,OAAO,eAAe,CAAA;AAEtB,4DAA4D;AAC5D,QAAA,MAAM,IAAI,EAAE,IAyEX,CAAA;AAED,eAAe,IAAI,CAAA;AAWnB,mDAAmD;AACnD,eAAO,MAAM,UAAU,KAAoB,CAAA;AAQ3C,oFAAoF;AACpF,eAAO,MAAM,QAAQ,KAAoB,CAAA;AAYzC,yCAAyC;AACzC,eAAO,MAAM,aAAa,KAAoB,CAAA;AAY9C,oEAAoE;AACpE,eAAO,MAAM,UAAU,KAAoB,CAAA;AAW3C,iHAAiH;AACjH,eAAO,MAAM,cAAc,KAAoB,CAAA;AAa/C,0GAA0G;AAC1G,eAAO,MAAM,OAAO,KAAoB,CAAA"}
1
+ {"version":3,"file":"lukso-tag.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-tag/lukso-tag.stories.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AAErD,OAAO,SAAS,CAAA;AAChB,OAAO,eAAe,CAAA;AAEtB,4DAA4D;AAC5D,QAAA,MAAM,IAAI,EAAE,IAqFX,CAAA;AAED,eAAe,IAAI,CAAA;AAmBnB,mDAAmD;AACnD,eAAO,MAAM,UAAU,KAAoB,CAAA;AAQ3C,oFAAoF;AACpF,eAAO,MAAM,QAAQ,KAAoB,CAAA;AAYzC,yCAAyC;AACzC,eAAO,MAAM,aAAa,KAAoB,CAAA;AAY9C,oEAAoE;AACpE,eAAO,MAAM,UAAU,KAAoB,CAAA;AAW3C,iIAAiI;AACjI,eAAO,MAAM,cAAc,KAAoB,CAAA;AAa/C,0GAA0G;AAC1G,eAAO,MAAM,OAAO,KAAoB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukso/web-components",
3
- "version": "1.65.0",
3
+ "version": "1.66.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",