@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
@@ -9,17 +9,18 @@ const components_luksoInput_index = require('./lukso-input/index.cjs');
9
9
  const components_luksoModal_index = require('./lukso-modal/index.cjs');
10
10
  const components_luksoNavbar_index = require('./lukso-navbar/index.cjs');
11
11
  const components_luksoProfile_index = require('./lukso-profile/index.cjs');
12
+ const components_luksoProgress_index = require('./lukso-progress/index.cjs');
12
13
  const components_luksoSanitize_index = require('./lukso-sanitize/index.cjs');
13
14
  const components_luksoTag_index = require('./lukso-tag/index.cjs');
14
15
  const components_luksoTerms_index = require('./lukso-terms/index.cjs');
15
16
  const components_luksoTest_index = require('./lukso-test/index.cjs');
16
17
  const components_luksoUsername_index = require('./lukso-username/index.cjs');
17
18
  const components_luksoWizard_index = require('./lukso-wizard/index.cjs');
18
- const shared_tailwindElement_index = require('../index-49e68682.cjs');
19
+ const shared_tailwindElement_index = require('../index-0f13d58e.cjs');
19
20
  require('../directive-db00f5fb.cjs');
20
21
  require('../state-a62a7d5d.cjs');
21
22
  require('../index-7dc05ee5.cjs');
22
- require('../style-map-917244c9.cjs');
23
+ require('../style-map-0d95bd3c.cjs');
23
24
 
24
25
 
25
26
 
@@ -51,6 +52,10 @@ Object.defineProperty(exports, 'LuksoProfile', {
51
52
  enumerable: true,
52
53
  get: () => components_luksoProfile_index.LuksoProfile
53
54
  });
55
+ Object.defineProperty(exports, 'LuksoProgress', {
56
+ enumerable: true,
57
+ get: () => components_luksoProgress_index.LuksoProgress
58
+ });
54
59
  Object.defineProperty(exports, 'LuksoSanitize', {
55
60
  enumerable: true,
56
61
  get: () => components_luksoSanitize_index.LuksoSanitize
@@ -5,6 +5,7 @@ export * from './lukso-input/index';
5
5
  export * from './lukso-modal/index';
6
6
  export * from './lukso-navbar/index';
7
7
  export * from './lukso-profile/index';
8
+ export * from './lukso-progress/index';
8
9
  export * from './lukso-sanitize/index';
9
10
  export * from './lukso-tag/index';
10
11
  export * from './lukso-terms/index';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,8BAA8B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,8BAA8B,CAAA"}
@@ -5,14 +5,15 @@ export { LuksoInput } from './lukso-input/index.js';
5
5
  export { LuksoModal } from './lukso-modal/index.js';
6
6
  export { LuksoNavbar } from './lukso-navbar/index.js';
7
7
  export { LuksoProfile } from './lukso-profile/index.js';
8
+ export { LuksoProgress } from './lukso-progress/index.js';
8
9
  export { LuksoSanitize } from './lukso-sanitize/index.js';
9
10
  export { LuksoTag } from './lukso-tag/index.js';
10
11
  export { LuksoTerms } from './lukso-terms/index.js';
11
12
  export { LuksoTest } from './lukso-test/index.js';
12
13
  export { LuksoUsername } from './lukso-username/index.js';
13
14
  export { LuksoWizard } from './lukso-wizard/index.js';
14
- export { a as TailwindElement, T as TailwindStyledElement } from '../index-92dc4a16.js';
15
+ export { a as TailwindElement, T as TailwindStyledElement } from '../index-7a686142.js';
15
16
  import '../directive-9ec64c08.js';
16
17
  import '../state-7fde94d1.js';
17
18
  import '../index-714323c9.js';
18
- import '../style-map-21d737a8.js';
19
+ import '../style-map-9d612f4e.js';
@@ -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 state = require('../../state-a62a7d5d.cjs');
8
8
  const index = require('../../index-7dc05ee5.cjs');
@@ -66,8 +66,8 @@ exports.LuksoButton = class LuksoButton extends shared_tailwindElement_index.Tai
66
66
  before:transition-all before:duration-[2000ms] before:z-[-1] before:rounded-0`;
67
67
  this.pressedStyles = `before:w-full before:z-[-1]`;
68
68
  this.noTransitionStyles = `before:transition-none`;
69
- this.mediumSize = `py-3 px-6 paragraph-inter-16-semi-bold rounded-12`;
70
- this.smallSize = `py-1 px-3 paragraph-inter-12-regular rounded-8 hover:shadow-none active:shadow-none`;
69
+ this.mediumSize = `h-[48px] px-6 paragraph-inter-16-semi-bold rounded-12`;
70
+ this.smallSize = `h-[28px] px-3 paragraph-inter-12-regular rounded-8 hover:shadow-none active:shadow-none`;
71
71
  }
72
72
  handleMouseDown() {
73
73
  if (this.variant !== "primary" && this.variant !== "landing" && this.isLongPress) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAOA,oBAAY,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,MAAM,CAAA;AACxE,oBAAY,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAA;AAC3C,oBAAY,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAA;AACtD,oBAAY,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,OAAO,CAAC,SAAS,CAAQ;IAGzB,OAAO,CAAC,YAAY,CAAQ;IAG5B,OAAO,CAAC,KAAK,CAAI;IAEjB,OAAO,CAAC,aAAa,CAGqE;IAE1F,OAAO,CAAC,eAAe,CACoD;IAE3E,OAAO,CAAC,aAAa,CAIE;IAEvB,OAAO,CAAC,aAAa,CAIC;IAEtB,OAAO,CAAC,UAAU,CAGS;IAE3B,OAAO,CAAC,UAAU,CAAyE;IAE3F,OAAO,CAAC,eA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aAAa,CAIC;IAEtB,OAAO,CAAC,UAAU,CAGS;IAE3B,OAAO,CAAC,UAAU,CAAyE;IAE3F,OAAO,CAAC,eAAe,CAEyD;IAEhF,OAAO,CAAC,aAAa,CAAgC;IAErD,OAAO,CAAC,kBAAkB,CAA2B;IAErD,OAAO,CAAC,UAAU,CAA0D;IAE5E,OAAO,CAAC,SAAS,CAA4F;IAE7G,OAAO,CAAC,eAAe;IA2BvB,OAAO,CAAC,aAAa;IAcrB,eAAe,IAAI,OAAO;IAc1B,cAAc;IA6Bd,YAAY;IAyBZ,MAAM;CAGP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAA;KAC5B;CACF"}
@@ -1,4 +1,4 @@
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';
@@ -62,8 +62,8 @@ let LuksoButton = class extends TailwindStyledElement(style) {
62
62
  before:transition-all before:duration-[2000ms] before:z-[-1] before:rounded-0`;
63
63
  this.pressedStyles = `before:w-full before:z-[-1]`;
64
64
  this.noTransitionStyles = `before:transition-none`;
65
- this.mediumSize = `py-3 px-6 paragraph-inter-16-semi-bold rounded-12`;
66
- this.smallSize = `py-1 px-3 paragraph-inter-12-regular rounded-8 hover:shadow-none active:shadow-none`;
65
+ this.mediumSize = `h-[48px] px-6 paragraph-inter-16-semi-bold rounded-12`;
66
+ this.smallSize = `h-[28px] px-3 paragraph-inter-12-regular rounded-8 hover:shadow-none active:shadow-none`;
67
67
  }
68
68
  handleMouseDown() {
69
69
  if (this.variant !== "primary" && this.variant !== "landing" && this.isLongPress) {
@@ -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
  require('../lukso-profile/index.cjs');
10
10
 
@@ -1,6 +1,6 @@
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
- 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
  import '../lukso-profile/index.js';
6
6
 
@@ -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
  const style = ":host {\n display: inline-flex\n}";
10
10
 
@@ -1,6 +1,6 @@
1
- import { y, T as TailwindStyledElement } from '../../index-92dc4a16.js';
1
+ import { y, T as TailwindStyledElement } 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
  const style = ":host {\n display: inline-flex\n}";
6
6
 
@@ -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 state = require('../../state-a62a7d5d.cjs');
8
8
  const index = require('../../index-7dc05ee5.cjs');
@@ -26,16 +26,21 @@ exports.LuksoInput = class LuksoInput extends shared_tailwindElement_index.Tailw
26
26
  this.type = "text";
27
27
  this.placeholder = "";
28
28
  this.label = "";
29
+ this.autocomplete = "on";
30
+ this.id = "";
31
+ this.ref = void 0;
32
+ this.accept = void 0;
29
33
  this.description = "";
30
34
  this.error = "";
31
35
  this.unit = "";
32
36
  this.isFullWidth = false;
37
+ this.isReadonly = false;
33
38
  this.autofocus = false;
34
39
  this.max = void 0;
35
40
  this.min = void 0;
36
41
  this.hasHocus = false;
37
42
  this.hasHighlight = false;
38
- this.defaultInputStyles = `bg-neutral-100 text-neutral-20 paragraph-inter-16-regular px-4 py-3
43
+ this.defaultInputStyles = `bg-neutral-100 text-neutral-20 paragraph-inter-14-regular px-4 py-3
39
44
  border border-solid h-[48px] placeholder:text-neutral-70
40
45
  outline-none transition transition-all duration-150 appearance-none`;
41
46
  this.defaultUnitStyles = `paragraph-inter-12-regular text-neutral-60 flex px-3.5 items-center relative
@@ -46,8 +51,6 @@ exports.LuksoInput = class LuksoInput extends shared_tailwindElement_index.Tailw
46
51
  inputTemplate() {
47
52
  return shared_tailwindElement_index.y`
48
53
  <input
49
- data-testid="input"
50
- id=${this.name}
51
54
  name=${this.name}
52
55
  type=${this.type}
53
56
  value=${this.value}
@@ -55,6 +58,12 @@ exports.LuksoInput = class LuksoInput extends shared_tailwindElement_index.Tailw
55
58
  ?autofocus=${this.autofocus}
56
59
  min=${this.min}
57
60
  max=${this.max}
61
+ autocomplete=${this.autocomplete}
62
+ ref=${this.ref}
63
+ id=${this.id || this.name}
64
+ data-testid=${this.name ? `input-${this.name}` : "input"}
65
+ accept=${this.accept}
66
+ ?readonly=${this.isReadonly ? true : void 0}
58
67
  class=${index.customClassMap({
59
68
  [this.defaultInputStyles]: true,
60
69
  [this.error === "" ? "border-neutral-90" : "border-red-85"]: !this.hasHighlight,
@@ -66,6 +75,7 @@ exports.LuksoInput = class LuksoInput extends shared_tailwindElement_index.Tailw
66
75
  ["w-[300px]"]: !this.isFullWidth && this.unit !== ""
67
76
  })}
68
77
  @focus=${this.handleFocus}
78
+ @change=${this.handleChange}
69
79
  @blur=${this.handleBlur}
70
80
  @keyup=${this.handleKeyUp}
71
81
  @keydown=${this.handleKeyDown}
@@ -113,9 +123,31 @@ exports.LuksoInput = class LuksoInput extends shared_tailwindElement_index.Tailw
113
123
  this.hasHocus = true;
114
124
  this.hasHighlight = true;
115
125
  }
116
- handleBlur() {
126
+ handleBlur(event) {
117
127
  this.hasHocus = false;
118
128
  this.hasHighlight = false;
129
+ const target = event.target;
130
+ const blurEvent = new CustomEvent("on-blur", {
131
+ detail: {
132
+ value: target.value,
133
+ event
134
+ },
135
+ bubbles: false,
136
+ composed: true
137
+ });
138
+ this.dispatchEvent(blurEvent);
139
+ }
140
+ handleChange(event) {
141
+ const target = event.target;
142
+ const changeEvent = new CustomEvent("on-change", {
143
+ detail: {
144
+ value: target.value,
145
+ event
146
+ },
147
+ bubbles: false,
148
+ composed: true
149
+ });
150
+ this.dispatchEvent(changeEvent);
119
151
  }
120
152
  handleKeyUp(event) {
121
153
  const target = event.target;
@@ -189,6 +221,18 @@ __decorateClass([
189
221
  __decorateClass([
190
222
  directive.e({ type: String })
191
223
  ], exports.LuksoInput.prototype, "label", 2);
224
+ __decorateClass([
225
+ directive.e({ type: String })
226
+ ], exports.LuksoInput.prototype, "autocomplete", 2);
227
+ __decorateClass([
228
+ directive.e({ type: String })
229
+ ], exports.LuksoInput.prototype, "id", 2);
230
+ __decorateClass([
231
+ directive.e({ type: String })
232
+ ], exports.LuksoInput.prototype, "ref", 2);
233
+ __decorateClass([
234
+ directive.e({ type: String })
235
+ ], exports.LuksoInput.prototype, "accept", 2);
192
236
  __decorateClass([
193
237
  directive.e({ type: String })
194
238
  ], exports.LuksoInput.prototype, "description", 2);
@@ -201,6 +245,9 @@ __decorateClass([
201
245
  __decorateClass([
202
246
  directive.e({ type: Boolean, attribute: "is-full-width" })
203
247
  ], exports.LuksoInput.prototype, "isFullWidth", 2);
248
+ __decorateClass([
249
+ directive.e({ type: Boolean, attribute: "is-readonly" })
250
+ ], exports.LuksoInput.prototype, "isReadonly", 2);
204
251
  __decorateClass([
205
252
  directive.e({ type: Boolean })
206
253
  ], exports.LuksoInput.prototype, "autofocus", 2);
@@ -5,10 +5,15 @@ export declare class LuksoInput extends TailwindElement {
5
5
  type: string;
6
6
  placeholder: string;
7
7
  label: string;
8
+ autocomplete: string;
9
+ id: string;
10
+ ref: any;
11
+ accept: any;
8
12
  description: string;
9
13
  error: string;
10
14
  unit: string;
11
15
  isFullWidth: boolean;
16
+ isReadonly: boolean;
12
17
  autofocus: boolean;
13
18
  max: number | undefined;
14
19
  min: number | undefined;
@@ -23,6 +28,7 @@ export declare class LuksoInput extends TailwindElement {
23
28
  unitTemplate(): import("lit").TemplateResult<1>;
24
29
  private handleFocus;
25
30
  private handleBlur;
31
+ private handleChange;
26
32
  private handleKeyUp;
27
33
  private handleKeyDown;
28
34
  private handleKeyPress;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAG3D,qBACa,UAAW,SAAQ,eAAe;IAE7C,KAAK,SAAK;IAGV,IAAI,SAAK;IAGT,IAAI,SAAS;IAGb,WAAW,SAAK;IAGhB,KAAK,SAAK;IAGV,WAAW,SAAK;IAGhB,KAAK,SAAK;IAGV,IAAI,SAAK;IAGT,WAAW,UAAQ;IAGnB,SAAS,UAAQ;IAGjB,GAAG,EAAE,MAAM,GAAG,SAAS,CAAY;IAGnC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAY;IAGnC,OAAO,CAAC,QAAQ,CAAQ;IAGxB,OAAO,CAAC,YAAY,CAAQ;IAE5B,OAAO,CAAC,kBA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C,aAAa;IAarB,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,cAAc;IAMtB,MAAM;CAYP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAA;KAC1B;CACF"}
@@ -1,4 +1,4 @@
1
- import { a as TailwindElement, y, b } from '../../index-92dc4a16.js';
1
+ import { a as TailwindElement, y, b } 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';
@@ -22,16 +22,21 @@ let LuksoInput = class extends TailwindElement {
22
22
  this.type = "text";
23
23
  this.placeholder = "";
24
24
  this.label = "";
25
+ this.autocomplete = "on";
26
+ this.id = "";
27
+ this.ref = void 0;
28
+ this.accept = void 0;
25
29
  this.description = "";
26
30
  this.error = "";
27
31
  this.unit = "";
28
32
  this.isFullWidth = false;
33
+ this.isReadonly = false;
29
34
  this.autofocus = false;
30
35
  this.max = void 0;
31
36
  this.min = void 0;
32
37
  this.hasHocus = false;
33
38
  this.hasHighlight = false;
34
- this.defaultInputStyles = `bg-neutral-100 text-neutral-20 paragraph-inter-16-regular px-4 py-3
39
+ this.defaultInputStyles = `bg-neutral-100 text-neutral-20 paragraph-inter-14-regular px-4 py-3
35
40
  border border-solid h-[48px] placeholder:text-neutral-70
36
41
  outline-none transition transition-all duration-150 appearance-none`;
37
42
  this.defaultUnitStyles = `paragraph-inter-12-regular text-neutral-60 flex px-3.5 items-center relative
@@ -42,8 +47,6 @@ let LuksoInput = class extends TailwindElement {
42
47
  inputTemplate() {
43
48
  return y`
44
49
  <input
45
- data-testid="input"
46
- id=${this.name}
47
50
  name=${this.name}
48
51
  type=${this.type}
49
52
  value=${this.value}
@@ -51,6 +54,12 @@ let LuksoInput = class extends TailwindElement {
51
54
  ?autofocus=${this.autofocus}
52
55
  min=${this.min}
53
56
  max=${this.max}
57
+ autocomplete=${this.autocomplete}
58
+ ref=${this.ref}
59
+ id=${this.id || this.name}
60
+ data-testid=${this.name ? `input-${this.name}` : "input"}
61
+ accept=${this.accept}
62
+ ?readonly=${this.isReadonly ? true : void 0}
54
63
  class=${customClassMap({
55
64
  [this.defaultInputStyles]: true,
56
65
  [this.error === "" ? "border-neutral-90" : "border-red-85"]: !this.hasHighlight,
@@ -62,6 +71,7 @@ let LuksoInput = class extends TailwindElement {
62
71
  ["w-[300px]"]: !this.isFullWidth && this.unit !== ""
63
72
  })}
64
73
  @focus=${this.handleFocus}
74
+ @change=${this.handleChange}
65
75
  @blur=${this.handleBlur}
66
76
  @keyup=${this.handleKeyUp}
67
77
  @keydown=${this.handleKeyDown}
@@ -109,9 +119,31 @@ let LuksoInput = class extends TailwindElement {
109
119
  this.hasHocus = true;
110
120
  this.hasHighlight = true;
111
121
  }
112
- handleBlur() {
122
+ handleBlur(event) {
113
123
  this.hasHocus = false;
114
124
  this.hasHighlight = false;
125
+ const target = event.target;
126
+ const blurEvent = new CustomEvent("on-blur", {
127
+ detail: {
128
+ value: target.value,
129
+ event
130
+ },
131
+ bubbles: false,
132
+ composed: true
133
+ });
134
+ this.dispatchEvent(blurEvent);
135
+ }
136
+ handleChange(event) {
137
+ const target = event.target;
138
+ const changeEvent = new CustomEvent("on-change", {
139
+ detail: {
140
+ value: target.value,
141
+ event
142
+ },
143
+ bubbles: false,
144
+ composed: true
145
+ });
146
+ this.dispatchEvent(changeEvent);
115
147
  }
116
148
  handleKeyUp(event) {
117
149
  const target = event.target;
@@ -185,6 +217,18 @@ __decorateClass([
185
217
  __decorateClass([
186
218
  e({ type: String })
187
219
  ], LuksoInput.prototype, "label", 2);
220
+ __decorateClass([
221
+ e({ type: String })
222
+ ], LuksoInput.prototype, "autocomplete", 2);
223
+ __decorateClass([
224
+ e({ type: String })
225
+ ], LuksoInput.prototype, "id", 2);
226
+ __decorateClass([
227
+ e({ type: String })
228
+ ], LuksoInput.prototype, "ref", 2);
229
+ __decorateClass([
230
+ e({ type: String })
231
+ ], LuksoInput.prototype, "accept", 2);
188
232
  __decorateClass([
189
233
  e({ type: String })
190
234
  ], LuksoInput.prototype, "description", 2);
@@ -197,6 +241,9 @@ __decorateClass([
197
241
  __decorateClass([
198
242
  e({ type: Boolean, attribute: "is-full-width" })
199
243
  ], LuksoInput.prototype, "isFullWidth", 2);
244
+ __decorateClass([
245
+ e({ type: Boolean, attribute: "is-readonly" })
246
+ ], LuksoInput.prototype, "isReadonly", 2);
200
247
  __decorateClass([
201
248
  e({ type: Boolean })
202
249
  ], LuksoInput.prototype, "autofocus", 2);
@@ -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 { 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
3
  import { c as customClassMap } from '../../index-714323c9.js';
4
4
 
@@ -2,8 +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 state = require('../../state-a62a7d5d.cjs');
7
8
  const index = require('../../index-7dc05ee5.cjs');
8
9
 
9
10
  var __defProp = Object.defineProperty;
@@ -24,7 +25,7 @@ exports.LuksoNavbar = class LuksoNavbar extends shared_tailwindElement_index.Tai
24
25
  this.isCenter = false;
25
26
  this.isSticky = false;
26
27
  this.isTransparent = false;
27
- this.defaultStyles = `bg-neutral-100 shadow-pink-drop-shadow h-78 flex`;
28
+ this.isMenuOpen = false;
28
29
  this.centerStyles = `justify-center`;
29
30
  this.stickyStyles = `sticky top-0 z-[1000]`;
30
31
  this.transparentStyles = `!bg-transparent !shadow-none`;
@@ -36,16 +37,57 @@ exports.LuksoNavbar = class LuksoNavbar extends shared_tailwindElement_index.Tai
36
37
  });
37
38
  this.dispatchEvent(event);
38
39
  }
40
+ handleMenuToggle() {
41
+ this.isMenuOpen = !this.isMenuOpen;
42
+ }
43
+ desktopMenuTemplate() {
44
+ return shared_tailwindElement_index.y`<div
45
+ class="w-full items-center justify-end pr-10 no-underline hidden md:flex"
46
+ >
47
+ <slot name="desktop"></slot>
48
+ </div>`;
49
+ }
50
+ mobileMenuTemplate() {
51
+ return shared_tailwindElement_index.y`<div
52
+ class="w-full items-center justify-end pr-6 flex md:hidden"
53
+ >
54
+ <div
55
+ class="flex items-center justify-center w-8 h-8 cursor-pointer"
56
+ @click=${this.handleMenuToggle}
57
+ >
58
+ <div
59
+ class="w-[18px] h-[2px] rounded-4 bg-neutral-20 transition-all
60
+ before:content-[''] before:absolute before:w-[18px] before:h-[2px] before:bg-neutral-20 before:rounded-4 before:transition-all before:-translate-y-[6px]
61
+ after:content-[''] after:absolute after:w-[18px] after:h-[2px] after:bg-neutral-20 after:rounded-4 after:transition-all after:translate-y-[6px]
62
+ ${index.customClassMap({
63
+ "!bg-transparent before:rotate-[45deg] before:!-translate-y-[0px] after:-rotate-[45deg] after:!translate-y-[0px]": this.isMenuOpen
64
+ })}
65
+ "
66
+ ></div>
67
+ </div>
68
+ <div
69
+ class="fixed top-[78px] left-0 w-full h-full bg-neutral-100 z-[1000] justify-center
70
+ items-center flex md:hidden
71
+ ${index.customClassMap({
72
+ "animate-fade-in animation-duration-150": this.isMenuOpen,
73
+ "!hidden": !this.isMenuOpen
74
+ })}"
75
+ @click=${this.handleMenuToggle}
76
+ >
77
+ <slot name="mobile"></slot>
78
+ </div>
79
+ </div>`;
80
+ }
39
81
  render() {
40
82
  return shared_tailwindElement_index.y`
41
83
  <nav
42
84
  data-testid="navbar"
43
- class=${index.customClassMap({
44
- [this.defaultStyles]: true,
85
+ class="bg-neutral-100 shadow-pink-drop-shadow h-78 flex
86
+ ${index.customClassMap({
45
87
  [this.centerStyles]: this.isCenter,
46
88
  [this.stickyStyles]: this.isSticky,
47
89
  [this.transparentStyles]: this.isTransparent
48
- })}
90
+ })}"
49
91
  >
50
92
  <div
51
93
  class="flex items-center px-7 h-full cursor-pointer sm:px-10"
@@ -59,7 +101,7 @@ exports.LuksoNavbar = class LuksoNavbar extends shared_tailwindElement_index.Tai
59
101
  <span>${this.title}</span>
60
102
  </div>
61
103
  </div>
62
- <slot></slot>
104
+ ${this.desktopMenuTemplate()} ${this.mobileMenuTemplate()}
63
105
  </nav>
64
106
  `;
65
107
  }
@@ -76,6 +118,9 @@ __decorateClass([
76
118
  __decorateClass([
77
119
  directive.e({ type: Boolean, attribute: "is-transparent" })
78
120
  ], exports.LuksoNavbar.prototype, "isTransparent", 2);
121
+ __decorateClass([
122
+ state.t()
123
+ ], exports.LuksoNavbar.prototype, "isMenuOpen", 2);
79
124
  exports.LuksoNavbar = __decorateClass([
80
125
  directive.e$1("lukso-navbar")
81
126
  ], exports.LuksoNavbar);
@@ -4,11 +4,14 @@ export declare class LuksoNavbar extends TailwindElement {
4
4
  isCenter: boolean;
5
5
  isSticky: boolean;
6
6
  isTransparent: boolean;
7
- private defaultStyles;
7
+ private isMenuOpen;
8
8
  private centerStyles;
9
9
  private stickyStyles;
10
10
  private transparentStyles;
11
11
  private handleBrandClick;
12
+ private handleMenuToggle;
13
+ desktopMenuTemplate(): import("lit").TemplateResult<1>;
14
+ mobileMenuTemplate(): import("lit").TemplateResult<1>;
12
15
  render(): import("lit").TemplateResult<1>;
13
16
  }
14
17
  declare global {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAG3D,qBACa,WAAY,SAAQ,eAAe;IAE9C,KAAK,SAAK;IAGV,QAAQ,UAAQ;IAGhB,QAAQ,UAAQ;IAGhB,aAAa,UAAQ;IAErB,OAAO,CAAC,aAAa,CAAqD;IAE1E,OAAO,CAAC,YAAY,CAAmB;IAEvC,OAAO,CAAC,YAAY,CAA0B;IAE9C,OAAO,CAAC,iBAAiB,CAAiC;IAE1D,OAAO,CAAC,gBAAgB;IAQxB,MAAM;CA2BP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAA;KAC5B;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAG3D,qBACa,WAAY,SAAQ,eAAe;IAE9C,KAAK,SAAK;IAGV,QAAQ,UAAQ;IAGhB,QAAQ,UAAQ;IAGhB,aAAa,UAAQ;IAGrB,OAAO,CAAC,UAAU,CAAQ;IAE1B,OAAO,CAAC,YAAY,CAAmB;IAEvC,OAAO,CAAC,YAAY,CAA0B;IAE9C,OAAO,CAAC,iBAAiB,CAAiC;IAE1D,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,gBAAgB;IAIxB,mBAAmB;IAQnB,kBAAkB;IAiClB,MAAM;CA2BP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAA;KAC5B;CACF"}