@lukso/web-components 1.15.0 → 1.16.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 (47) 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 +1 -1
  19. package/dist/components/lukso-navbar/index.js +1 -1
  20. package/dist/components/lukso-profile/index.cjs +2 -2
  21. package/dist/components/lukso-profile/index.js +2 -2
  22. package/dist/components/lukso-progress/index.cjs +72 -0
  23. package/dist/components/lukso-progress/index.d.ts +16 -0
  24. package/dist/components/lukso-progress/index.d.ts.map +1 -0
  25. package/dist/components/lukso-progress/index.js +70 -0
  26. package/dist/components/lukso-sanitize/index.cjs +1 -1
  27. package/dist/components/lukso-sanitize/index.js +1 -1
  28. package/dist/components/lukso-tag/index.cjs +2 -2
  29. package/dist/components/lukso-tag/index.js +2 -2
  30. package/dist/components/lukso-terms/index.cjs +2 -2
  31. package/dist/components/lukso-terms/index.js +2 -2
  32. package/dist/components/lukso-test/index.cjs +1 -1
  33. package/dist/components/lukso-test/index.js +1 -1
  34. package/dist/components/lukso-username/index.cjs +2 -2
  35. package/dist/components/lukso-username/index.js +2 -2
  36. package/dist/components/lukso-wizard/index.cjs +1 -1
  37. package/dist/components/lukso-wizard/index.js +1 -1
  38. package/dist/{index-92dc4a16.js → index-21210d1c.js} +1 -1
  39. package/dist/{index-49e68682.cjs → index-3597c5ae.cjs} +1 -1
  40. package/dist/index.cjs +7 -2
  41. package/dist/index.js +3 -2
  42. package/dist/shared/tailwind-element/index.cjs +1 -1
  43. package/dist/shared/tailwind-element/index.js +1 -1
  44. package/dist/{style-map-21d737a8.js → style-map-a69052e6.js} +1 -1
  45. package/dist/{style-map-917244c9.cjs → style-map-b0a755bb.cjs} +1 -1
  46. package/package.json +6 -1
  47. 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-3597c5ae.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-b0a755bb.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-21210d1c.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-a69052e6.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-3597c5ae.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,eAAe,CAEyD;IAEhF,OAAO,CAAC,aAAa,CAAgC;IAErD,OAAO,CAAC,kBAAkB,CAA2B;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AE3F,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-21210d1c.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-3597c5ae.cjs');
6
6
  const directive = require('../../directive-db00f5fb.cjs');
7
- const styleMap = require('../../style-map-917244c9.cjs');
7
+ const styleMap = require('../../style-map-b0a755bb.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-21210d1c.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-a69052e6.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-3597c5ae.cjs');
6
6
  const directive = require('../../directive-db00f5fb.cjs');
7
- const styleMap = require('../../style-map-917244c9.cjs');
7
+ const styleMap = require('../../style-map-b0a755bb.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-21210d1c.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-a69052e6.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-3597c5ae.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,kBAAkB,CAE4C;IAEtE,OAAO,CAAC,iBAAiB,CAG0B;IAEnD,aAAa;IAmCb,aAAa;IAUb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Ac;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-21210d1c.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-3597c5ae.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-21210d1c.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,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-3597c5ae.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-21210d1c.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,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-3597c5ae.cjs');
6
6
  const directive = require('../../directive-db00f5fb.cjs');
7
- const styleMap = require('../../style-map-917244c9.cjs');
7
+ const styleMap = require('../../style-map-b0a755bb.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-21210d1c.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-a69052e6.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,72 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const shared_tailwindElement_index = require('../../index-3597c5ae.cjs');
6
+ const directive = require('../../directive-db00f5fb.cjs');
7
+ const styleMap = require('../../style-map-b0a755bb.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
+ const width = this.current / this.max * 100;
31
+ if (width <= 1) {
32
+ return 1;
33
+ }
34
+ return width;
35
+ }
36
+ render() {
37
+ return shared_tailwindElement_index.y`
38
+ <div
39
+ data-testid="progress"
40
+ class='w-full h-[12px] shadow-neutral-inner-shadow rounded-24 bg-neutral-95'
41
+ >
42
+ <div
43
+ class=${index.customClassMap({
44
+ "h-[12px] rounded-s-24 rounded-e-16 border border-solid": true,
45
+ "bg-green-85 border-green-54": !!this.variant || this.variant === "success",
46
+ "bg-red-85 border-red-65": this.variant === "error"
47
+ })}
48
+ style=${styleMap.i({
49
+ width: `${this.progressWidth()}%`
50
+ })}
51
+ >
52
+ </div>
53
+ </div>
54
+ </div>
55
+ `;
56
+ }
57
+ };
58
+ __decorateClass([
59
+ directive.e({ type: Number })
60
+ ], exports.LuksoProgress.prototype, "min", 2);
61
+ __decorateClass([
62
+ directive.e({ type: Number })
63
+ ], exports.LuksoProgress.prototype, "max", 2);
64
+ __decorateClass([
65
+ directive.e({ type: Number })
66
+ ], exports.LuksoProgress.prototype, "current", 2);
67
+ __decorateClass([
68
+ directive.e({ type: String })
69
+ ], exports.LuksoProgress.prototype, "variant", 2);
70
+ exports.LuksoProgress = __decorateClass([
71
+ directive.e$1("lukso-progress")
72
+ ], 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;IAWrB,MAAM;CAsBP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAA;KAChC;CACF"}
@@ -0,0 +1,70 @@
1
+ import { a as TailwindElement, y } from '../../index-21210d1c.js';
2
+ import { e, a as e$1 } from '../../directive-9ec64c08.js';
3
+ import { i } from '../../style-map-a69052e6.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
+ const width = this.current / this.max * 100;
27
+ if (width <= 1) {
28
+ return 1;
29
+ }
30
+ return width;
31
+ }
32
+ render() {
33
+ return 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=${customClassMap({
40
+ "h-[12px] rounded-s-24 rounded-e-16 border border-solid": true,
41
+ "bg-green-85 border-green-54": !!this.variant || this.variant === "success",
42
+ "bg-red-85 border-red-65": this.variant === "error"
43
+ })}
44
+ style=${i({
45
+ width: `${this.progressWidth()}%`
46
+ })}
47
+ >
48
+ </div>
49
+ </div>
50
+ </div>
51
+ `;
52
+ }
53
+ };
54
+ __decorateClass([
55
+ e({ type: Number })
56
+ ], LuksoProgress.prototype, "min", 2);
57
+ __decorateClass([
58
+ e({ type: Number })
59
+ ], LuksoProgress.prototype, "max", 2);
60
+ __decorateClass([
61
+ e({ type: Number })
62
+ ], LuksoProgress.prototype, "current", 2);
63
+ __decorateClass([
64
+ e({ type: String })
65
+ ], LuksoProgress.prototype, "variant", 2);
66
+ LuksoProgress = __decorateClass([
67
+ e$1("lukso-progress")
68
+ ], LuksoProgress);
69
+
70
+ export { LuksoProgress };