@lukso/web-components 1.15.0 → 1.17.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 (49) hide show
  1. package/dist/components/index.cjs +7 -2
  2. package/dist/components/index.d.ts +1 -0
  3. package/dist/components/index.d.ts.map +1 -1
  4. package/dist/components/index.js +3 -2
  5. package/dist/components/lukso-button/index.cjs +3 -3
  6. package/dist/components/lukso-button/index.d.ts.map +1 -1
  7. package/dist/components/lukso-button/index.js +3 -3
  8. package/dist/components/lukso-card/index.cjs +2 -2
  9. package/dist/components/lukso-card/index.js +2 -2
  10. package/dist/components/lukso-icon/index.cjs +2 -2
  11. package/dist/components/lukso-icon/index.js +2 -2
  12. package/dist/components/lukso-input/index.cjs +52 -5
  13. package/dist/components/lukso-input/index.d.ts +6 -0
  14. package/dist/components/lukso-input/index.d.ts.map +1 -1
  15. package/dist/components/lukso-input/index.js +52 -5
  16. package/dist/components/lukso-modal/index.cjs +1 -1
  17. package/dist/components/lukso-modal/index.js +1 -1
  18. package/dist/components/lukso-navbar/index.cjs +51 -6
  19. package/dist/components/lukso-navbar/index.d.ts +4 -1
  20. package/dist/components/lukso-navbar/index.d.ts.map +1 -1
  21. package/dist/components/lukso-navbar/index.js +51 -6
  22. package/dist/components/lukso-profile/index.cjs +2 -2
  23. package/dist/components/lukso-profile/index.js +2 -2
  24. package/dist/components/lukso-progress/index.cjs +69 -0
  25. package/dist/components/lukso-progress/index.d.ts +16 -0
  26. package/dist/components/lukso-progress/index.d.ts.map +1 -0
  27. package/dist/components/lukso-progress/index.js +67 -0
  28. package/dist/components/lukso-sanitize/index.cjs +1 -1
  29. package/dist/components/lukso-sanitize/index.js +1 -1
  30. package/dist/components/lukso-tag/index.cjs +2 -2
  31. package/dist/components/lukso-tag/index.js +2 -2
  32. package/dist/components/lukso-terms/index.cjs +2 -2
  33. package/dist/components/lukso-terms/index.js +2 -2
  34. package/dist/components/lukso-test/index.cjs +1 -1
  35. package/dist/components/lukso-test/index.js +1 -1
  36. package/dist/components/lukso-username/index.cjs +2 -2
  37. package/dist/components/lukso-username/index.js +2 -2
  38. package/dist/components/lukso-wizard/index.cjs +1 -1
  39. package/dist/components/lukso-wizard/index.js +1 -1
  40. package/dist/{index-49e68682.cjs → index-0f13d58e.cjs} +1 -1
  41. package/dist/{index-92dc4a16.js → index-7a686142.js} +1 -1
  42. package/dist/index.cjs +7 -2
  43. package/dist/index.js +3 -2
  44. package/dist/shared/tailwind-element/index.cjs +1 -1
  45. package/dist/shared/tailwind-element/index.js +1 -1
  46. package/dist/{style-map-917244c9.cjs → style-map-0d95bd3c.cjs} +1 -1
  47. package/dist/{style-map-21d737a8.js → style-map-9d612f4e.js} +1 -1
  48. package/package.json +6 -1
  49. package/tailwind.config.cjs +1 -0
@@ -1,5 +1,6 @@
1
- import { a as TailwindElement, y } from '../../index-92dc4a16.js';
1
+ import { a as TailwindElement, y } from '../../index-7a686142.js';
2
2
  import { e, a as e$1 } from '../../directive-9ec64c08.js';
3
+ import { t } from '../../state-7fde94d1.js';
3
4
  import { c as customClassMap } from '../../index-714323c9.js';
4
5
 
5
6
  var __defProp = Object.defineProperty;
@@ -20,7 +21,7 @@ let LuksoNavbar = class extends TailwindElement {
20
21
  this.isCenter = false;
21
22
  this.isSticky = false;
22
23
  this.isTransparent = false;
23
- this.defaultStyles = `bg-neutral-100 shadow-pink-drop-shadow h-78 flex`;
24
+ this.isMenuOpen = false;
24
25
  this.centerStyles = `justify-center`;
25
26
  this.stickyStyles = `sticky top-0 z-[1000]`;
26
27
  this.transparentStyles = `!bg-transparent !shadow-none`;
@@ -32,16 +33,57 @@ let LuksoNavbar = class extends TailwindElement {
32
33
  });
33
34
  this.dispatchEvent(event);
34
35
  }
36
+ handleMenuToggle() {
37
+ this.isMenuOpen = !this.isMenuOpen;
38
+ }
39
+ desktopMenuTemplate() {
40
+ return y`<div
41
+ class="w-full items-center justify-end pr-10 no-underline hidden md:flex"
42
+ >
43
+ <slot name="desktop"></slot>
44
+ </div>`;
45
+ }
46
+ mobileMenuTemplate() {
47
+ return y`<div
48
+ class="w-full items-center justify-end pr-6 flex md:hidden"
49
+ >
50
+ <div
51
+ class="flex items-center justify-center w-8 h-8 cursor-pointer"
52
+ @click=${this.handleMenuToggle}
53
+ >
54
+ <div
55
+ class="w-[18px] h-[2px] rounded-4 bg-neutral-20 transition-all
56
+ before:content-[''] before:absolute before:w-[18px] before:h-[2px] before:bg-neutral-20 before:rounded-4 before:transition-all before:-translate-y-[6px]
57
+ after:content-[''] after:absolute after:w-[18px] after:h-[2px] after:bg-neutral-20 after:rounded-4 after:transition-all after:translate-y-[6px]
58
+ ${customClassMap({
59
+ "!bg-transparent before:rotate-[45deg] before:!-translate-y-[0px] after:-rotate-[45deg] after:!translate-y-[0px]": this.isMenuOpen
60
+ })}
61
+ "
62
+ ></div>
63
+ </div>
64
+ <div
65
+ class="fixed top-[78px] left-0 w-full h-full bg-neutral-100 z-[1000] justify-center
66
+ items-center flex md:hidden
67
+ ${customClassMap({
68
+ "animate-fade-in animation-duration-150": this.isMenuOpen,
69
+ "!hidden": !this.isMenuOpen
70
+ })}"
71
+ @click=${this.handleMenuToggle}
72
+ >
73
+ <slot name="mobile"></slot>
74
+ </div>
75
+ </div>`;
76
+ }
35
77
  render() {
36
78
  return y`
37
79
  <nav
38
80
  data-testid="navbar"
39
- class=${customClassMap({
40
- [this.defaultStyles]: true,
81
+ class="bg-neutral-100 shadow-pink-drop-shadow h-78 flex
82
+ ${customClassMap({
41
83
  [this.centerStyles]: this.isCenter,
42
84
  [this.stickyStyles]: this.isSticky,
43
85
  [this.transparentStyles]: this.isTransparent
44
- })}
86
+ })}"
45
87
  >
46
88
  <div
47
89
  class="flex items-center px-7 h-full cursor-pointer sm:px-10"
@@ -55,7 +97,7 @@ let LuksoNavbar = class extends TailwindElement {
55
97
  <span>${this.title}</span>
56
98
  </div>
57
99
  </div>
58
- <slot></slot>
100
+ ${this.desktopMenuTemplate()} ${this.mobileMenuTemplate()}
59
101
  </nav>
60
102
  `;
61
103
  }
@@ -72,6 +114,9 @@ __decorateClass([
72
114
  __decorateClass([
73
115
  e({ type: Boolean, attribute: "is-transparent" })
74
116
  ], LuksoNavbar.prototype, "isTransparent", 2);
117
+ __decorateClass([
118
+ t()
119
+ ], LuksoNavbar.prototype, "isMenuOpen", 2);
75
120
  LuksoNavbar = __decorateClass([
76
121
  e$1("lukso-navbar")
77
122
  ], LuksoNavbar);
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-49e68682.cjs');
5
+ const shared_tailwindElement_index = require('../../index-0f13d58e.cjs');
6
6
  const directive = require('../../directive-db00f5fb.cjs');
7
- const styleMap = require('../../style-map-917244c9.cjs');
7
+ const styleMap = require('../../style-map-0d95bd3c.cjs');
8
8
 
9
9
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
10
10
 
@@ -1,6 +1,6 @@
1
- import { a as TailwindElement, y } from '../../index-92dc4a16.js';
1
+ import { a as TailwindElement, y } from '../../index-7a686142.js';
2
2
  import { e, a as e$1 } from '../../directive-9ec64c08.js';
3
- import { i } from '../../style-map-21d737a8.js';
3
+ import { i } from '../../style-map-9d612f4e.js';
4
4
 
5
5
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
6
6
 
@@ -0,0 +1,69 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const shared_tailwindElement_index = require('../../index-0f13d58e.cjs');
6
+ const directive = require('../../directive-db00f5fb.cjs');
7
+ const styleMap = require('../../style-map-0d95bd3c.cjs');
8
+ const index = require('../../index-7dc05ee5.cjs');
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __decorateClass = (decorators, target, key, kind) => {
13
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
14
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
15
+ if (decorator = decorators[i])
16
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
17
+ if (kind && result)
18
+ __defProp(target, key, result);
19
+ return result;
20
+ };
21
+ exports.LuksoProgress = class LuksoProgress extends shared_tailwindElement_index.TailwindElement {
22
+ constructor() {
23
+ super(...arguments);
24
+ this.min = 0;
25
+ this.max = 100;
26
+ this.current = 0;
27
+ this.variant = "success";
28
+ }
29
+ progressWidth() {
30
+ return this.current / this.max * 100;
31
+ }
32
+ render() {
33
+ return shared_tailwindElement_index.y`
34
+ <div
35
+ data-testid="progress"
36
+ class='w-full h-[12px] shadow-neutral-inner-shadow rounded-24 bg-neutral-95'
37
+ >
38
+ <div
39
+ class="h-[12px] rounded-s-24 rounded-e-16 border border-solid transition-all w-[1%] ${index.customClassMap(
40
+ {
41
+ "bg-green-85 border-green-54": !!this.variant || this.variant === "success",
42
+ "bg-red-85 border-red-65": this.variant === "error"
43
+ }
44
+ )}"
45
+ style=${styleMap.i({
46
+ width: `${this.progressWidth()}%`
47
+ })}
48
+ >
49
+ </div>
50
+ </div>
51
+ </div>
52
+ `;
53
+ }
54
+ };
55
+ __decorateClass([
56
+ directive.e({ type: Number })
57
+ ], exports.LuksoProgress.prototype, "min", 2);
58
+ __decorateClass([
59
+ directive.e({ type: Number })
60
+ ], exports.LuksoProgress.prototype, "max", 2);
61
+ __decorateClass([
62
+ directive.e({ type: Number })
63
+ ], exports.LuksoProgress.prototype, "current", 2);
64
+ __decorateClass([
65
+ directive.e({ type: String })
66
+ ], exports.LuksoProgress.prototype, "variant", 2);
67
+ exports.LuksoProgress = __decorateClass([
68
+ directive.e$1("lukso-progress")
69
+ ], exports.LuksoProgress);
@@ -0,0 +1,16 @@
1
+ import { TailwindElement } from '../../shared/tailwind-element';
2
+ export declare type ProgressVariant = 'success' | 'error';
3
+ export declare class LuksoProgress extends TailwindElement {
4
+ min: number;
5
+ max: number;
6
+ current: number;
7
+ variant: ProgressVariant;
8
+ private progressWidth;
9
+ render(): import("lit").TemplateResult<1>;
10
+ }
11
+ declare global {
12
+ interface HTMLElementTagNameMap {
13
+ 'lukso-progress': LuksoProgress;
14
+ }
15
+ }
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAG3D,oBAAY,eAAe,GAAG,SAAS,GAAG,OAAO,CAAA;AAEjD,qBACa,aAAc,SAAQ,eAAe;IAEhD,GAAG,SAAI;IAGP,GAAG,SAAM;IAGT,OAAO,SAAI;IAGX,OAAO,EAAE,eAAe,CAAY;IAEpC,OAAO,CAAC,aAAa;IAIrB,MAAM;CAuBP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAA;KAChC;CACF"}
@@ -0,0 +1,67 @@
1
+ import { a as TailwindElement, y } from '../../index-7a686142.js';
2
+ import { e, a as e$1 } from '../../directive-9ec64c08.js';
3
+ import { i } from '../../style-map-9d612f4e.js';
4
+ import { c as customClassMap } from '../../index-714323c9.js';
5
+
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __decorateClass = (decorators, target, key, kind) => {
9
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
10
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
11
+ if (decorator = decorators[i])
12
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
13
+ if (kind && result)
14
+ __defProp(target, key, result);
15
+ return result;
16
+ };
17
+ let LuksoProgress = class extends TailwindElement {
18
+ constructor() {
19
+ super(...arguments);
20
+ this.min = 0;
21
+ this.max = 100;
22
+ this.current = 0;
23
+ this.variant = "success";
24
+ }
25
+ progressWidth() {
26
+ return this.current / this.max * 100;
27
+ }
28
+ render() {
29
+ return y`
30
+ <div
31
+ data-testid="progress"
32
+ class='w-full h-[12px] shadow-neutral-inner-shadow rounded-24 bg-neutral-95'
33
+ >
34
+ <div
35
+ class="h-[12px] rounded-s-24 rounded-e-16 border border-solid transition-all w-[1%] ${customClassMap(
36
+ {
37
+ "bg-green-85 border-green-54": !!this.variant || this.variant === "success",
38
+ "bg-red-85 border-red-65": this.variant === "error"
39
+ }
40
+ )}"
41
+ style=${i({
42
+ width: `${this.progressWidth()}%`
43
+ })}
44
+ >
45
+ </div>
46
+ </div>
47
+ </div>
48
+ `;
49
+ }
50
+ };
51
+ __decorateClass([
52
+ e({ type: Number })
53
+ ], LuksoProgress.prototype, "min", 2);
54
+ __decorateClass([
55
+ e({ type: Number })
56
+ ], LuksoProgress.prototype, "max", 2);
57
+ __decorateClass([
58
+ e({ type: Number })
59
+ ], LuksoProgress.prototype, "current", 2);
60
+ __decorateClass([
61
+ e({ type: String })
62
+ ], LuksoProgress.prototype, "variant", 2);
63
+ LuksoProgress = __decorateClass([
64
+ e$1("lukso-progress")
65
+ ], LuksoProgress);
66
+
67
+ export { LuksoProgress };
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-49e68682.cjs');
5
+ const shared_tailwindElement_index = require('../../index-0f13d58e.cjs');
6
6
  const directive = require('../../directive-db00f5fb.cjs');
7
7
 
8
8
  /**
@@ -1,4 +1,4 @@
1
- import { c as b, x, a as TailwindElement, y } from '../../index-92dc4a16.js';
1
+ import { c as b, x, a as TailwindElement, y } from '../../index-7a686142.js';
2
2
  import { i, t, b as e$1, e as e$2, a as e$3 } from '../../directive-9ec64c08.js';
3
3
 
4
4
  /**
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-49e68682.cjs');
5
+ const shared_tailwindElement_index = require('../../index-0f13d58e.cjs');
6
6
  const directive = require('../../directive-db00f5fb.cjs');
7
- const styleMap = require('../../style-map-917244c9.cjs');
7
+ const styleMap = require('../../style-map-0d95bd3c.cjs');
8
8
  const index = require('../../index-7dc05ee5.cjs');
9
9
 
10
10
  var __defProp = Object.defineProperty;
@@ -1,6 +1,6 @@
1
- import { a as TailwindElement, y } from '../../index-92dc4a16.js';
1
+ import { a as TailwindElement, y } from '../../index-7a686142.js';
2
2
  import { e, a as e$1 } from '../../directive-9ec64c08.js';
3
- import { i } from '../../style-map-21d737a8.js';
3
+ import { i } from '../../style-map-9d612f4e.js';
4
4
  import { c as customClassMap } from '../../index-714323c9.js';
5
5
 
6
6
  var __defProp = Object.defineProperty;
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-49e68682.cjs');
5
+ const shared_tailwindElement_index = require('../../index-0f13d58e.cjs');
6
6
  const directive = require('../../directive-db00f5fb.cjs');
7
7
  const state = require('../../state-a62a7d5d.cjs');
8
8
  const index = require('../../index-7dc05ee5.cjs');
9
9
  require('../lukso-icon/index.cjs');
10
10
  require('../lukso-sanitize/index.cjs');
11
- require('../../style-map-917244c9.cjs');
11
+ require('../../style-map-0d95bd3c.cjs');
12
12
 
13
13
  const style = ":host {\n display: flex;\n height: 100%\n}";
14
14
 
@@ -1,10 +1,10 @@
1
- import { T as TailwindStyledElement, y } from '../../index-92dc4a16.js';
1
+ import { T as TailwindStyledElement, y } from '../../index-7a686142.js';
2
2
  import { e, a as e$1 } from '../../directive-9ec64c08.js';
3
3
  import { t } from '../../state-7fde94d1.js';
4
4
  import { c as customClassMap } from '../../index-714323c9.js';
5
5
  import '../lukso-icon/index.js';
6
6
  import '../lukso-sanitize/index.js';
7
- import '../../style-map-21d737a8.js';
7
+ import '../../style-map-9d612f4e.js';
8
8
 
9
9
  const style = ":host {\n display: flex;\n height: 100%\n}";
10
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-49e68682.cjs');
5
+ const shared_tailwindElement_index = require('../../index-0f13d58e.cjs');
6
6
  const directive = require('../../directive-db00f5fb.cjs');
7
7
 
8
8
  /**
@@ -1,4 +1,4 @@
1
- import { x as x$2, T as TailwindStyledElement, y } from '../../index-92dc4a16.js';
1
+ import { x as x$2, T as TailwindStyledElement, y } from '../../index-7a686142.js';
2
2
  import { b as e$3, i as i$3, t as t$3, e as e$4, a as e$5 } from '../../directive-9ec64c08.js';
3
3
 
4
4
  /**
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-49e68682.cjs');
5
+ const shared_tailwindElement_index = require('../../index-0f13d58e.cjs');
6
6
  const directive = require('../../directive-db00f5fb.cjs');
7
- const styleMap = require('../../style-map-917244c9.cjs');
7
+ const styleMap = require('../../style-map-0d95bd3c.cjs');
8
8
  const index = require('../../index-7dc05ee5.cjs');
9
9
 
10
10
  const sliceAddress = (address, startSliceBy = 6, endSliceBy) => {
@@ -1,6 +1,6 @@
1
- import { a as TailwindElement, y } from '../../index-92dc4a16.js';
1
+ import { a as TailwindElement, y } from '../../index-7a686142.js';
2
2
  import { e, a as e$1 } from '../../directive-9ec64c08.js';
3
- import { i } from '../../style-map-21d737a8.js';
3
+ import { i } from '../../style-map-9d612f4e.js';
4
4
  import { c as customClassMap } from '../../index-714323c9.js';
5
5
 
6
6
  const sliceAddress = (address, startSliceBy = 6, endSliceBy) => {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-49e68682.cjs');
5
+ const shared_tailwindElement_index = require('../../index-0f13d58e.cjs');
6
6
  const directive = require('../../directive-db00f5fb.cjs');
7
7
  const index = require('../../index-7dc05ee5.cjs');
8
8
 
@@ -1,4 +1,4 @@
1
- import { L, x, a as TailwindElement, y } from '../../index-92dc4a16.js';
1
+ import { L, x, a as TailwindElement, y } from '../../index-7a686142.js';
2
2
  import { b as e, i, t, e as e$1, a as e$2 } from '../../directive-9ec64c08.js';
3
3
  import { c as customClassMap } from '../../index-714323c9.js';
4
4