@jegdev/sema-ui 0.0.8 → 0.0.9-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -52,6 +52,18 @@ export declare class SemaButton extends LitElement {
52
52
  render(): TemplateResult<1>;
53
53
  }
54
54
 
55
+ export declare class SemaCardProduct extends LitElement {
56
+ static styles: CSSResult[];
57
+ image: string;
58
+ category: string;
59
+ id: string;
60
+ title: string;
61
+ rate: number;
62
+ count: number;
63
+ price: number;
64
+ render(): TemplateResult<1>;
65
+ }
66
+
55
67
  export declare class SemaDropdown extends LitElement {
56
68
  static styles: CSSResult[];
57
69
  label: string;
@@ -1,7 +1,7 @@
1
- import { css as g, LitElement as m, html as l } from "lit";
2
- import { property as a, customElement as _ } from "lit/decorators.js";
3
- import { unsafeHTML as z } from "lit/directives/unsafe-html.js";
4
- const C = g`
1
+ import { css as m, LitElement as b, html as l } from "lit";
2
+ import { property as n, customElement as u } from "lit/decorators.js";
3
+ import { unsafeHTML as T } from "lit/directives/unsafe-html.js";
4
+ const j = m`
5
5
  /* ---------------- GENERAL STYLES ------------------- */
6
6
 
7
7
  a {
@@ -96,45 +96,45 @@ const C = g`
96
96
  color: var(--btn-secondary-color);
97
97
  }
98
98
  `;
99
- var T = Object.defineProperty, j = Object.getOwnPropertyDescriptor, p = (i, e, r, o) => {
100
- for (var t = o > 1 ? void 0 : o ? j(e, r) : e, s = i.length - 1, n; s >= 0; s--)
101
- (n = i[s]) && (t = (o ? n(e, r, t) : n(t)) || t);
102
- return o && t && T(e, r, t), t;
99
+ var D = Object.defineProperty, B = Object.getOwnPropertyDescriptor, p = (s, e, r, o) => {
100
+ for (var t = o > 1 ? void 0 : o ? B(e, r) : e, a = s.length - 1, i; a >= 0; a--)
101
+ (i = s[a]) && (t = (o ? i(e, r, t) : i(t)) || t);
102
+ return o && t && D(e, r, t), t;
103
103
  };
104
- let c = class extends m {
104
+ let c = class extends b {
105
105
  constructor() {
106
106
  super(...arguments), this.mode = "", this.kind = "button", this.custom = "off", this.size = "md", this.fontSize = "md", this.url = "", this.target = "_self", this.altText = "";
107
107
  }
108
108
  render() {
109
- const i = this.custom === "on", e = i ? `--btn-primary-color: ${this.firstColor}; --btn-secondary-color: ${this.secondaryColor};` : "";
109
+ const s = this.custom === "on", e = s ? `--btn-primary-color: ${this.firstColor}; --btn-secondary-color: ${this.secondaryColor};` : "";
110
110
  let r = "120px";
111
111
  this.size === "sm" ? r = "80px" : this.size === "md" ? r = "120px" : this.size === "lg" ? r = "160px" : this.size === "full" && (r = "100%");
112
112
  const o = `--btn-width: ${r};`;
113
113
  let t = "1rem";
114
114
  this.fontSize === "sm" ? t = "0.8rem" : this.fontSize === "md" ? t = "1rem" : this.fontSize === "lg" ? t = "1.5rem" : this.fontSize === "xl" && (t = "2rem");
115
- const s = `--btn-font-size: ${t}`;
115
+ const a = `--btn-font-size: ${t}`;
116
116
  return this.mode === "outline" ? this.kind === "link" ? l`
117
117
  <a
118
- style="${e}${o}${s}"
118
+ style="${e}${o}${a}"
119
119
  href="${this.url}"
120
120
  alt="${this.altText}"
121
121
  title="${this.altText}"
122
122
  target="${this.target}"
123
- class="btn ${i ? "btn-outline-custom" : "btn-outline"}"
123
+ class="btn ${s ? "btn-outline-custom" : "btn-outline"}"
124
124
  >
125
125
  <slot></slot>
126
126
  </a>
127
127
  ` : l`
128
128
  <button
129
- style="${e}${o}${s}"
130
- class="btn ${i ? "btn-outline-custom" : "btn-outline"}"
129
+ style="${e}${o}${a}"
130
+ class="btn ${s ? "btn-outline-custom" : "btn-outline"}"
131
131
  title="${this.altText}"
132
132
  >
133
133
  <slot></slot>
134
134
  </button>
135
135
  ` : this.mode === "ghost" ? this.kind === "link" ? l`
136
136
  <a
137
- style="${e}${o}${s}"
137
+ style="${e}${o}${a}"
138
138
  href="${this.url}"
139
139
  alt="${this.altText}"
140
140
  title="${this.altText}"
@@ -145,7 +145,7 @@ let c = class extends m {
145
145
  </a>
146
146
  ` : l`
147
147
  <button
148
- style="${e}${o}${s}"
148
+ style="${e}${o}${a}"
149
149
  class="btn ${this.custom === "on" ? "btn-ghost-custom" : "btn-ghost"}"
150
150
  title="${this.altText}"
151
151
  >
@@ -153,7 +153,7 @@ let c = class extends m {
153
153
  </button>
154
154
  ` : this.kind === "link" ? l`
155
155
  <a
156
- style="${e}${o}${s}"
156
+ style="${e}${o}${a}"
157
157
  href="${this.url}"
158
158
  alt="${this.altText}"
159
159
  title="${this.altText}"
@@ -164,7 +164,7 @@ let c = class extends m {
164
164
  </a>
165
165
  ` : l`
166
166
  <button
167
- style="${e}${o}${s}"
167
+ style="${e}${o}${a}"
168
168
  class="btn ${this.custom === "on" ? "btn-custom" : "btn-primary"}"
169
169
  title="${this.altText}"
170
170
  >
@@ -173,43 +173,43 @@ let c = class extends m {
173
173
  `;
174
174
  }
175
175
  };
176
- c.styles = [C];
176
+ c.styles = [j];
177
177
  p([
178
- a({ type: String })
178
+ n({ type: String })
179
179
  ], c.prototype, "mode", 2);
180
180
  p([
181
- a({ type: String })
181
+ n({ type: String })
182
182
  ], c.prototype, "kind", 2);
183
183
  p([
184
- a({ type: String })
184
+ n({ type: String })
185
185
  ], c.prototype, "custom", 2);
186
186
  p([
187
- a({ type: String })
187
+ n({ type: String })
188
188
  ], c.prototype, "firstColor", 2);
189
189
  p([
190
- a({ type: String })
190
+ n({ type: String })
191
191
  ], c.prototype, "secondaryColor", 2);
192
192
  p([
193
- a({ type: String })
193
+ n({ type: String })
194
194
  ], c.prototype, "size", 2);
195
195
  p([
196
- a({ type: String })
196
+ n({ type: String })
197
197
  ], c.prototype, "fontSize", 2);
198
198
  p([
199
- a({ type: String })
199
+ n({ type: String })
200
200
  ], c.prototype, "url", 2);
201
201
  p([
202
- a({ type: String })
202
+ n({ type: String })
203
203
  ], c.prototype, "target", 2);
204
204
  p([
205
- a({ type: String })
205
+ n({ type: String })
206
206
  ], c.prototype, "altText", 2);
207
207
  c = p([
208
- _("sema-button")
208
+ u("sema-button")
209
209
  ], c);
210
- const A = g`
210
+ const q = m`
211
211
  :host {
212
- font-family: Arial, Helvetica, sans-serif;
212
+ font-family: "Inter", system-ui, -apple-system, sans-serif;
213
213
  }
214
214
 
215
215
  .__section {
@@ -296,12 +296,12 @@ const A = g`
296
296
  }
297
297
  }
298
298
  `;
299
- var B = Object.defineProperty, D = Object.getOwnPropertyDescriptor, $ = (i, e, r, o) => {
300
- for (var t = o > 1 ? void 0 : o ? D(e, r) : e, s = i.length - 1, n; s >= 0; s--)
301
- (n = i[s]) && (t = (o ? n(e, r, t) : n(t)) || t);
302
- return o && t && B(e, r, t), t;
299
+ var L = Object.defineProperty, A = Object.getOwnPropertyDescriptor, O = (s, e, r, o) => {
300
+ for (var t = o > 1 ? void 0 : o ? A(e, r) : e, a = s.length - 1, i; a >= 0; a--)
301
+ (i = s[a]) && (t = (o ? i(e, r, t) : i(t)) || t);
302
+ return o && t && L(e, r, t), t;
303
303
  };
304
- let f = class extends m {
304
+ let y = class extends b {
305
305
  constructor() {
306
306
  super(...arguments), this.type = "info", this.title = "", this.message = "";
307
307
  }
@@ -314,23 +314,23 @@ let f = class extends m {
314
314
  `;
315
315
  }
316
316
  };
317
- f.styles = [A];
318
- $([
319
- a({ type: String })
320
- ], f.prototype, "type", 2);
321
- $([
322
- a({ type: String })
323
- ], f.prototype, "title", 2);
324
- $([
325
- a({ type: String })
326
- ], f.prototype, "message", 2);
327
- f = $([
328
- _("sema-alerts")
329
- ], f);
330
- const H = g`
317
+ y.styles = [q];
318
+ O([
319
+ n({ type: String })
320
+ ], y.prototype, "type", 2);
321
+ O([
322
+ n({ type: String })
323
+ ], y.prototype, "title", 2);
324
+ O([
325
+ n({ type: String })
326
+ ], y.prototype, "message", 2);
327
+ y = O([
328
+ u("sema-alerts")
329
+ ], y);
330
+ const E = m`
331
331
  :host {
332
332
  display: block;
333
- font-family: Arial, Helvetica, sans-serif;
333
+ font-family: "Inter", system-ui, -apple-system, sans-serif;
334
334
  }
335
335
 
336
336
  .accordion {
@@ -401,20 +401,20 @@ const H = g`
401
401
 
402
402
  }
403
403
  `;
404
- var L = Object.defineProperty, q = Object.getOwnPropertyDescriptor, v = (i, e, r, o) => {
405
- for (var t = o > 1 ? void 0 : o ? q(e, r) : e, s = i.length - 1, n; s >= 0; s--)
406
- (n = i[s]) && (t = (o ? n(e, r, t) : n(t)) || t);
407
- return o && t && L(e, r, t), t;
404
+ var I = Object.defineProperty, N = Object.getOwnPropertyDescriptor, $ = (s, e, r, o) => {
405
+ for (var t = o > 1 ? void 0 : o ? N(e, r) : e, a = s.length - 1, i; a >= 0; a--)
406
+ (i = s[a]) && (t = (o ? i(e, r, t) : i(t)) || t);
407
+ return o && t && I(e, r, t), t;
408
408
  };
409
- let h = class extends m {
409
+ let g = class extends b {
410
410
  constructor() {
411
411
  super(...arguments), this.question = "", this.answer = "", this.color = "", this.open = !1;
412
412
  }
413
413
  render() {
414
- const i = this.open === !0;
414
+ const s = this.open === !0;
415
415
  let e = this.color ? this.color : "#dc2626";
416
- const o = i ? `
417
- --color-btn: ${i ? "rgba(229, 231, 235, 0.2)" : ""};
416
+ const o = s ? `
417
+ --color-btn: ${s ? "rgba(229, 231, 235, 0.2)" : ""};
418
418
  --isOpenPadding: 1rem;
419
419
  --isOpenHeight: 200px;
420
420
  --isOpenOpacity: 1;
@@ -424,9 +424,9 @@ let h = class extends m {
424
424
  --isOpenHeight: 0;
425
425
  --isOpenOpacity: 0;
426
426
  --isOpenRotate: rotate(0);`, t = `
427
- --svgcolor: ${e};`, s = o + t;
427
+ --svgcolor: ${e};`, a = o + t;
428
428
  return l`
429
- <article class="accordion" style="${s}" >
429
+ <article class="accordion" style="${a}" >
430
430
  <div class="__btn" @click="${this._changeIsOpen}">
431
431
  <h3 class="__title">${this.question}</h3>
432
432
 
@@ -444,23 +444,23 @@ let h = class extends m {
444
444
  this.open === !1 ? this.open = !0 : this.open = !1;
445
445
  }
446
446
  };
447
- h.styles = [H];
448
- v([
449
- a({ type: String })
450
- ], h.prototype, "question", 2);
451
- v([
452
- a({ type: String })
453
- ], h.prototype, "answer", 2);
454
- v([
455
- a({ type: String })
456
- ], h.prototype, "color", 2);
457
- v([
458
- a({ type: Boolean })
459
- ], h.prototype, "open", 2);
460
- h = v([
461
- _("sema-accordion")
462
- ], h);
463
- const E = g`
447
+ g.styles = [E];
448
+ $([
449
+ n({ type: String })
450
+ ], g.prototype, "question", 2);
451
+ $([
452
+ n({ type: String })
453
+ ], g.prototype, "answer", 2);
454
+ $([
455
+ n({ type: String })
456
+ ], g.prototype, "color", 2);
457
+ $([
458
+ n({ type: Boolean })
459
+ ], g.prototype, "open", 2);
460
+ g = $([
461
+ u("sema-accordion")
462
+ ], g);
463
+ const R = m`
464
464
 
465
465
  .__title {
466
466
  color: #000;
@@ -470,7 +470,7 @@ const E = g`
470
470
  @media (prefers-color-scheme: dark) {
471
471
  :root {
472
472
  display: block;
473
- font-family: Arial, Helvetica, sans-serif;
473
+ font-family: "Inter", system-ui, -apple-system, sans-serif;
474
474
  }
475
475
 
476
476
  section {
@@ -490,17 +490,17 @@ const E = g`
490
490
  }
491
491
  }
492
492
  `;
493
- var S = Object.freeze, P = Object.defineProperty, R = Object.getOwnPropertyDescriptor, w = (i, e, r, o) => {
494
- for (var t = o > 1 ? void 0 : o ? R(e, r) : e, s = i.length - 1, n; s >= 0; s--)
495
- (n = i[s]) && (t = (o ? n(e, r, t) : n(t)) || t);
496
- return o && t && P(e, r, t), t;
497
- }, N = (i, e) => S(P(i, "raw", { value: S(i.slice()) })), k;
498
- let b = class extends m {
493
+ var P = Object.freeze, C = Object.defineProperty, H = Object.getOwnPropertyDescriptor, S = (s, e, r, o) => {
494
+ for (var t = o > 1 ? void 0 : o ? H(e, r) : e, a = s.length - 1, i; a >= 0; a--)
495
+ (i = s[a]) && (t = (o ? i(e, r, t) : i(t)) || t);
496
+ return o && t && C(e, r, t), t;
497
+ }, M = (s, e) => P(C(s, "raw", { value: P(s.slice()) })), z;
498
+ let _ = class extends b {
499
499
  constructor() {
500
500
  super(...arguments), this.title = "", this.color = "", this.faqs = [];
501
501
  }
502
502
  render() {
503
- const i = {
503
+ const s = {
504
504
  "@context": "https://schema.org",
505
505
  "@type": "FAQPage",
506
506
  mainEntity: this.faqs.map((r) => ({
@@ -511,8 +511,8 @@ let b = class extends m {
511
511
  text: r.answer
512
512
  }
513
513
  }))
514
- }, e = JSON.stringify(i).replace(/<\/script>/g, "<\\/script>");
515
- return l(k || (k = N([`
514
+ }, e = JSON.stringify(s).replace(/<\/script>/g, "<\\/script>");
515
+ return l(z || (z = M([`
516
516
  <section class="faqs-section">
517
517
  <h2 class="__title">`, `</h2>
518
518
  <article>
@@ -530,26 +530,26 @@ let b = class extends m {
530
530
  answer="${r.answer}"
531
531
  ></sema-accordion>
532
532
  `
533
- ), z(e));
533
+ ), T(e));
534
534
  }
535
535
  };
536
- b.styles = [E];
537
- w([
538
- a({ type: String })
539
- ], b.prototype, "title", 2);
540
- w([
541
- a({ type: String })
542
- ], b.prototype, "color", 2);
543
- w([
544
- a({ type: Array })
545
- ], b.prototype, "faqs", 2);
546
- b = w([
547
- _("sema-faqs")
548
- ], b);
549
- const Y = g`
536
+ _.styles = [R];
537
+ S([
538
+ n({ type: String })
539
+ ], _.prototype, "title", 2);
540
+ S([
541
+ n({ type: String })
542
+ ], _.prototype, "color", 2);
543
+ S([
544
+ n({ type: Array })
545
+ ], _.prototype, "faqs", 2);
546
+ _ = S([
547
+ u("sema-faqs")
548
+ ], _);
549
+ const Y = m`
550
550
  :host {
551
551
  display: block;
552
- font-family: Arial, Helvetica, sans-serif;
552
+ font-family: "Inter", system-ui, -apple-system, sans-serif;
553
553
  }
554
554
 
555
555
  ol {
@@ -583,19 +583,19 @@ const Y = g`
583
583
  }
584
584
  }
585
585
  `;
586
- var F = Object.defineProperty, I = Object.getOwnPropertyDescriptor, O = (i, e, r, o) => {
587
- for (var t = o > 1 ? void 0 : o ? I(e, r) : e, s = i.length - 1, n; s >= 0; s--)
588
- (n = i[s]) && (t = (o ? n(e, r, t) : n(t)) || t);
586
+ var F = Object.defineProperty, U = Object.getOwnPropertyDescriptor, k = (s, e, r, o) => {
587
+ for (var t = o > 1 ? void 0 : o ? U(e, r) : e, a = s.length - 1, i; a >= 0; a--)
588
+ (i = s[a]) && (t = (o ? i(e, r, t) : i(t)) || t);
589
589
  return o && t && F(e, r, t), t;
590
590
  };
591
- let y = class extends m {
591
+ let x = class extends b {
592
592
  constructor() {
593
593
  super(...arguments), this.items = [], this.color = "";
594
594
  }
595
595
  render() {
596
- const i = this.color ? `--color-primary: ${this.color};` : "--color-primary: #dc2626;";
596
+ const s = this.color ? `--color-primary: ${this.color};` : "--color-primary: #dc2626;";
597
597
  return l`
598
- <nav aria-label="breadcrumb" style="${i}">
598
+ <nav aria-label="breadcrumb" style="${s}">
599
599
  <ol>
600
600
  ${this.items.map((e, r) => l`
601
601
  <li class="${r === this.items.length - 1 ? "__active" : "__link"}">
@@ -608,20 +608,20 @@ let y = class extends m {
608
608
  `;
609
609
  }
610
610
  };
611
- y.styles = [Y];
612
- O([
613
- a({ type: Array })
614
- ], y.prototype, "items", 2);
615
- O([
616
- a({ type: String })
617
- ], y.prototype, "color", 2);
618
- y = O([
619
- _("sema-breadcrumbs")
620
- ], y);
621
- const M = g`
611
+ x.styles = [Y];
612
+ k([
613
+ n({ type: Array })
614
+ ], x.prototype, "items", 2);
615
+ k([
616
+ n({ type: String })
617
+ ], x.prototype, "color", 2);
618
+ x = k([
619
+ u("sema-breadcrumbs")
620
+ ], x);
621
+ const V = m`
622
622
  :host {
623
623
  display: block;
624
- font-family: Arial, Helvetica, sans-serif;
624
+ font-family: "Inter", system-ui, -apple-system, sans-serif;
625
625
  }
626
626
  .__btn {
627
627
  display: flex;
@@ -719,19 +719,19 @@ const M = g`
719
719
 
720
720
  }
721
721
  `;
722
- var U = Object.defineProperty, G = Object.getOwnPropertyDescriptor, u = (i, e, r, o) => {
723
- for (var t = o > 1 ? void 0 : o ? G(e, r) : e, s = i.length - 1, n; s >= 0; s--)
724
- (n = i[s]) && (t = (o ? n(e, r, t) : n(t)) || t);
725
- return o && t && U(e, r, t), t;
722
+ var G = Object.defineProperty, Q = Object.getOwnPropertyDescriptor, v = (s, e, r, o) => {
723
+ for (var t = o > 1 ? void 0 : o ? Q(e, r) : e, a = s.length - 1, i; a >= 0; a--)
724
+ (i = s[a]) && (t = (o ? i(e, r, t) : i(t)) || t);
725
+ return o && t && G(e, r, t), t;
726
726
  };
727
- let d = class extends m {
727
+ let h = class extends b {
728
728
  constructor() {
729
729
  super(...arguments), this.label = "", this.color = "", this.bgColor = "", this.open = !1, this.items = [];
730
730
  }
731
731
  render() {
732
- const i = this.open === !0;
732
+ const s = this.open === !0;
733
733
  let e = this.color ? this.color : "#dc2626", r = this.bgColor ? this.bgColor : "#dc2626";
734
- const o = i ? `
734
+ const o = s ? `
735
735
  --isOpenBgColor: ${r};
736
736
  --isOpenPadding: 1rem;
737
737
  --isOpenHeight: auto;
@@ -740,7 +740,7 @@ let d = class extends m {
740
740
  --isOpenPadding: 0;
741
741
  --isOpenHeight: 0;
742
742
  --isOpenOpacity: 0;
743
- --isOpenRotate: rotate(0);`, t = `--svgcolor: ${e};`, s = o + t;
743
+ --isOpenRotate: rotate(0);`, t = `--svgcolor: ${e};`, a = o + t;
744
744
  return l`
745
745
  <button class="__btn" @click="${this._changeIsOpen}" style="${t}">
746
746
  <span class="__label">${this.label}</span>
@@ -750,15 +750,15 @@ let d = class extends m {
750
750
  </div>
751
751
  </button>
752
752
 
753
- <div class="__content" style="${s}">
754
- ${this.items.map((n) => "category" in n ? l`
753
+ <div class="__content" style="${a}">
754
+ ${this.items.map((i) => "category" in i ? l`
755
755
  <div class="__category">
756
- <span class="__category-title">${n.category}</span>
757
- ${n.items.map((x) => l`
758
- <a href="${x.path || "#"}" title="${x.label}" aria-label="${x.label}" class="__link">${x.label}</a>
756
+ <span class="__category-title">${i.category}</span>
757
+ ${i.items.map((w) => l`
758
+ <a href="${w.path || "#"}" title="${w.label}" aria-label="${w.label}" class="__link">${w.label}</a>
759
759
  `)}
760
760
  </div>
761
- ` : l`<a href="${n.path || "#"}" title="${n.label}" aria-label="${n.label}" class="__link">${n.label}</a>`)}
761
+ ` : l`<a href="${i.path || "#"}" title="${i.label}" aria-label="${i.label}" class="__link">${i.label}</a>`)}
762
762
  </div>
763
763
  </div>
764
764
  `;
@@ -767,32 +767,264 @@ let d = class extends m {
767
767
  this.open = !this.open;
768
768
  }
769
769
  };
770
- d.styles = [M];
771
- u([
772
- a({ type: String })
773
- ], d.prototype, "label", 2);
774
- u([
775
- a({ type: String })
776
- ], d.prototype, "color", 2);
777
- u([
778
- a({ type: String })
779
- ], d.prototype, "bgColor", 2);
780
- u([
781
- a({ type: Boolean })
782
- ], d.prototype, "open", 2);
783
- u([
784
- a({ type: Array })
785
- ], d.prototype, "items", 2);
786
- d = u([
787
- _("sema-dropdown")
770
+ h.styles = [V];
771
+ v([
772
+ n({ type: String })
773
+ ], h.prototype, "label", 2);
774
+ v([
775
+ n({ type: String })
776
+ ], h.prototype, "color", 2);
777
+ v([
778
+ n({ type: String })
779
+ ], h.prototype, "bgColor", 2);
780
+ v([
781
+ n({ type: Boolean })
782
+ ], h.prototype, "open", 2);
783
+ v([
784
+ n({ type: Array })
785
+ ], h.prototype, "items", 2);
786
+ h = v([
787
+ u("sema-dropdown")
788
+ ], h);
789
+ const J = m`
790
+ .product-card {
791
+ background-color: white;
792
+ width: 300px;
793
+ border-radius: 12px;
794
+ overflow: hidden; /* Para que la imagen respete los bordes redondeados */
795
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
796
+ transition:
797
+ transform 0.3s ease,
798
+ box-shadow 0.3s ease;
799
+ cursor: pointer;
800
+ }
801
+
802
+ /* Efecto al pasar el mouse por encima */
803
+ .product-card:hover {
804
+ transform: translateY(-5px);
805
+ box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
806
+ }
807
+
808
+ /* 1. Imagen */
809
+ .card-image-container {
810
+ width: 100%;
811
+ height: 200px;
812
+ overflow: hidden;
813
+ position: relative;
814
+ }
815
+
816
+ .card-image-container img {
817
+ width: 100%;
818
+ height: 100%;
819
+ object-fit: cover; /* Mantiene la proporción de la imagen sin estirarla */
820
+ transition: transform 0.5s ease;
821
+ }
822
+
823
+ .product-card:hover .card-image-container img {
824
+ transform: scale(1.05); /* Zoom suave en la imagen */
825
+ }
826
+
827
+ /* Contenedor de la información */
828
+ .card-details {
829
+ padding: 20px;
830
+ }
831
+
832
+ /* 2. Categoría e ID (Cabecera pequeña) */
833
+ .card-meta {
834
+ display: flex;
835
+ justify-content: space-between;
836
+ align-items: center;
837
+ margin-bottom: 10px;
838
+ font-size: 0.75rem;
839
+ }
840
+
841
+ .category {
842
+ background-color: #e0e7ff;
843
+ color: #4338ca;
844
+ padding: 4px 8px;
845
+ border-radius: 4px;
846
+ font-weight: 700;
847
+ text-transform: uppercase;
848
+ letter-spacing: 0.5px;
849
+ }
850
+
851
+ .product-id {
852
+ color: #888;
853
+ }
854
+
855
+ /* 3. Título del Producto */
856
+ .product-title {
857
+ margin: 0 0 10px 0;
858
+ font-size: 1.2rem;
859
+ color: #333;
860
+ line-height: 1.4;
861
+ font-weight: 600;
862
+ display: -webkit-box;
863
+ -webkit-line-clamp: 1;
864
+ -webkit-box-orient: vertical;
865
+ overflow: hidden;
866
+ }
867
+
868
+ /* 4. Valoración (Estrellas y Promedio) */
869
+ .rating-container {
870
+ display: flex;
871
+ align-items: center;
872
+ margin-bottom: 15px;
873
+ font-size: 0.9rem;
874
+ }
875
+
876
+ .stars {
877
+ color: #fbbf24; /* Color dorado */
878
+ margin-right: 5px;
879
+ letter-spacing: 1px;
880
+ }
881
+
882
+ .average-rating {
883
+ font-weight: bold;
884
+ color: #333;
885
+ margin-right: 5px;
886
+ }
887
+
888
+ .review-count {
889
+ color: #6b7280;
890
+ font-size: 0.8rem;
891
+ }
892
+
893
+ /* Línea separadora */
894
+ hr {
895
+ border: 0;
896
+ border-top: 1px solid #eee;
897
+ margin: 10px 0;
898
+ }
899
+
900
+ /* 5. Precio */
901
+ .price-container {
902
+ display: flex;
903
+ justify-content: space-between;
904
+ align-items: center;
905
+ margin-top: 15px;
906
+ }
907
+
908
+ .price {
909
+ font-size: 1.5rem;
910
+ font-weight: 800;
911
+ color: #1f2937;
912
+ }
913
+
914
+ .currency {
915
+ font-size: 0.9rem;
916
+ vertical-align: top;
917
+ }
918
+
919
+ @media (prefers-color-scheme: dark) {
920
+ .product-card {
921
+ background-color: #1f2937;
922
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
923
+ }
924
+
925
+ .product-title {
926
+ color: #f9fafb;
927
+ }
928
+
929
+ .average-rating {
930
+ color: #f3f4f6;
931
+ }
932
+
933
+ .review-count {
934
+ color: #9ca3af;
935
+ }
936
+
937
+ .price {
938
+ color: #f9fafb;
939
+ }
940
+
941
+ .category {
942
+ background-color: #3730a3;
943
+ color: #e0e7ff;
944
+ }
945
+
946
+ hr {
947
+ border-top: 1px solid #374151;
948
+ }
949
+ }
950
+ `;
951
+ var Z = Object.defineProperty, K = Object.getOwnPropertyDescriptor, f = (s, e, r, o) => {
952
+ for (var t = o > 1 ? void 0 : o ? K(e, r) : e, a = s.length - 1, i; a >= 0; a--)
953
+ (i = s[a]) && (t = (o ? i(e, r, t) : i(t)) || t);
954
+ return o && t && Z(e, r, t), t;
955
+ };
956
+ let d = class extends b {
957
+ constructor() {
958
+ super(...arguments), this.image = "", this.category = "", this.id = "", this.title = "", this.rate = 0, this.count = 0, this.price = 0;
959
+ }
960
+ render() {
961
+ const s = Math.min(5, Math.max(0, Math.round(this.rate))), e = 5 - s;
962
+ return l`
963
+ <article class="product-card" id="${this.id}">
964
+ <div class="card-image-container">
965
+ <img
966
+ src="${this.image}"
967
+ alt="Auriculares Premium"
968
+ />
969
+ </div>
970
+
971
+ <div class="card-details">
972
+ <div class="card-meta">
973
+ <span class="category">${this.category}</span>
974
+ <span class="product-id">${this.id ? `ID: ${this.id}` : ""}</span>
975
+ </div>
976
+
977
+ <h3 class="product-title">${this.title}</h3>
978
+
979
+ <div class="rating-container">
980
+ <span class="stars">${"★".repeat(s)}${"☆".repeat(e)}</span>
981
+ <span class="average-rating">${this.rate}</span>
982
+ <span class="review-count">(${this.count} valoraciones)</span>
983
+ </div>
984
+
985
+ <hr />
986
+
987
+ <div class="price-container">
988
+ <span class="price"><span class="currency">$</span>${this.price}</span>
989
+ </div>
990
+ </div>
991
+ </article>
992
+ `;
993
+ }
994
+ };
995
+ d.styles = [J];
996
+ f([
997
+ n({ type: String })
998
+ ], d.prototype, "image", 2);
999
+ f([
1000
+ n({ type: String })
1001
+ ], d.prototype, "category", 2);
1002
+ f([
1003
+ n({ type: String })
1004
+ ], d.prototype, "id", 2);
1005
+ f([
1006
+ n({ type: String })
1007
+ ], d.prototype, "title", 2);
1008
+ f([
1009
+ n({ type: Number })
1010
+ ], d.prototype, "rate", 2);
1011
+ f([
1012
+ n({ type: Number })
1013
+ ], d.prototype, "count", 2);
1014
+ f([
1015
+ n({ type: Number })
1016
+ ], d.prototype, "price", 2);
1017
+ d = f([
1018
+ u("sema-card-product")
788
1019
  ], d);
789
- const K = "0.0.1";
1020
+ const et = "0.0.1";
790
1021
  export {
791
- h as SemaAccordion,
792
- f as SemaAlerts,
793
- y as SemaBreadcrumbs,
1022
+ g as SemaAccordion,
1023
+ y as SemaAlerts,
1024
+ x as SemaBreadcrumbs,
794
1025
  c as SemaButton,
795
- d as SemaDropdown,
796
- b as SemaFaqs,
797
- K as version
1026
+ d as SemaCardProduct,
1027
+ h as SemaDropdown,
1028
+ _ as SemaFaqs,
1029
+ et as version
798
1030
  };
@@ -1,4 +1,4 @@
1
- (function(t,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("lit"),require("lit/decorators.js"),require("lit/directives/unsafe-html.js")):typeof define=="function"&&define.amd?define(["exports","lit","lit/decorators.js","lit/directives/unsafe-html.js"],s):(t=typeof globalThis<"u"?globalThis:t||self,s(t.SemaUI={},t.lit,t.decorators_js,t.unsafeHtml_js))})(this,(function(t,s,l,S){"use strict";const $=s.css`
1
+ (function(t,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("lit"),require("lit/decorators.js"),require("lit/directives/unsafe-html.js")):typeof define=="function"&&define.amd?define(["exports","lit","lit/decorators.js","lit/directives/unsafe-html.js"],l):(t=typeof globalThis<"u"?globalThis:t||self,l(t.SemaUI={},t.lit,t.decorators_js,t.unsafeHtml_js))})(this,(function(t,l,n,w){"use strict";const $=l.css`
2
2
  /* ---------------- GENERAL STYLES ------------------- */
3
3
 
4
4
  a {
@@ -92,9 +92,9 @@
92
92
  .btn-ghost-custom:hover {
93
93
  color: var(--btn-secondary-color);
94
94
  }
95
- `;var w=Object.defineProperty,O=Object.getOwnPropertyDescriptor,p=(c,o,n,r)=>{for(var e=r>1?void 0:r?O(o,n):o,a=c.length-1,i;a>=0;a--)(i=c[a])&&(e=(r?i(o,n,e):i(e))||e);return r&&e&&w(o,n,e),e};t.SemaButton=class extends s.LitElement{constructor(){super(...arguments),this.mode="",this.kind="button",this.custom="off",this.size="md",this.fontSize="md",this.url="",this.target="_self",this.altText=""}render(){const o=this.custom==="on",n=o?`--btn-primary-color: ${this.firstColor}; --btn-secondary-color: ${this.secondaryColor};`:"";let r="120px";this.size==="sm"?r="80px":this.size==="md"?r="120px":this.size==="lg"?r="160px":this.size==="full"&&(r="100%");const e=`--btn-width: ${r};`;let a="1rem";this.fontSize==="sm"?a="0.8rem":this.fontSize==="md"?a="1rem":this.fontSize==="lg"?a="1.5rem":this.fontSize==="xl"&&(a="2rem");const i=`--btn-font-size: ${a}`;return this.mode==="outline"?this.kind==="link"?s.html`
95
+ `;var x=Object.defineProperty,O=Object.getOwnPropertyDescriptor,p=(c,o,a,r)=>{for(var e=r>1?void 0:r?O(o,a):o,s=c.length-1,i;s>=0;s--)(i=c[s])&&(e=(r?i(o,a,e):i(e))||e);return r&&e&&x(o,a,e),e};t.SemaButton=class extends l.LitElement{constructor(){super(...arguments),this.mode="",this.kind="button",this.custom="off",this.size="md",this.fontSize="md",this.url="",this.target="_self",this.altText=""}render(){const o=this.custom==="on",a=o?`--btn-primary-color: ${this.firstColor}; --btn-secondary-color: ${this.secondaryColor};`:"";let r="120px";this.size==="sm"?r="80px":this.size==="md"?r="120px":this.size==="lg"?r="160px":this.size==="full"&&(r="100%");const e=`--btn-width: ${r};`;let s="1rem";this.fontSize==="sm"?s="0.8rem":this.fontSize==="md"?s="1rem":this.fontSize==="lg"?s="1.5rem":this.fontSize==="xl"&&(s="2rem");const i=`--btn-font-size: ${s}`;return this.mode==="outline"?this.kind==="link"?l.html`
96
96
  <a
97
- style="${n}${e}${i}"
97
+ style="${a}${e}${i}"
98
98
  href="${this.url}"
99
99
  alt="${this.altText}"
100
100
  title="${this.altText}"
@@ -103,17 +103,17 @@
103
103
  >
104
104
  <slot></slot>
105
105
  </a>
106
- `:s.html`
106
+ `:l.html`
107
107
  <button
108
- style="${n}${e}${i}"
108
+ style="${a}${e}${i}"
109
109
  class="btn ${o?"btn-outline-custom":"btn-outline"}"
110
110
  title="${this.altText}"
111
111
  >
112
112
  <slot></slot>
113
113
  </button>
114
- `:this.mode==="ghost"?this.kind==="link"?s.html`
114
+ `:this.mode==="ghost"?this.kind==="link"?l.html`
115
115
  <a
116
- style="${n}${e}${i}"
116
+ style="${a}${e}${i}"
117
117
  href="${this.url}"
118
118
  alt="${this.altText}"
119
119
  title="${this.altText}"
@@ -122,17 +122,17 @@
122
122
  >
123
123
  <slot></slot>
124
124
  </a>
125
- `:s.html`
125
+ `:l.html`
126
126
  <button
127
- style="${n}${e}${i}"
127
+ style="${a}${e}${i}"
128
128
  class="btn ${this.custom==="on"?"btn-ghost-custom":"btn-ghost"}"
129
129
  title="${this.altText}"
130
130
  >
131
131
  <slot></slot>
132
132
  </button>
133
- `:this.kind==="link"?s.html`
133
+ `:this.kind==="link"?l.html`
134
134
  <a
135
- style="${n}${e}${i}"
135
+ style="${a}${e}${i}"
136
136
  href="${this.url}"
137
137
  alt="${this.altText}"
138
138
  title="${this.altText}"
@@ -141,17 +141,17 @@
141
141
  >
142
142
  <slot></slot>
143
143
  </a>
144
- `:s.html`
144
+ `:l.html`
145
145
  <button
146
- style="${n}${e}${i}"
146
+ style="${a}${e}${i}"
147
147
  class="btn ${this.custom==="on"?"btn-custom":"btn-primary"}"
148
148
  title="${this.altText}"
149
149
  >
150
150
  <slot></slot>
151
151
  </button>
152
- `}},t.SemaButton.styles=[$],p([l.property({type:String})],t.SemaButton.prototype,"mode",2),p([l.property({type:String})],t.SemaButton.prototype,"kind",2),p([l.property({type:String})],t.SemaButton.prototype,"custom",2),p([l.property({type:String})],t.SemaButton.prototype,"firstColor",2),p([l.property({type:String})],t.SemaButton.prototype,"secondaryColor",2),p([l.property({type:String})],t.SemaButton.prototype,"size",2),p([l.property({type:String})],t.SemaButton.prototype,"fontSize",2),p([l.property({type:String})],t.SemaButton.prototype,"url",2),p([l.property({type:String})],t.SemaButton.prototype,"target",2),p([l.property({type:String})],t.SemaButton.prototype,"altText",2),t.SemaButton=p([l.customElement("sema-button")],t.SemaButton);const x=s.css`
152
+ `}},t.SemaButton.styles=[$],p([n.property({type:String})],t.SemaButton.prototype,"mode",2),p([n.property({type:String})],t.SemaButton.prototype,"kind",2),p([n.property({type:String})],t.SemaButton.prototype,"custom",2),p([n.property({type:String})],t.SemaButton.prototype,"firstColor",2),p([n.property({type:String})],t.SemaButton.prototype,"secondaryColor",2),p([n.property({type:String})],t.SemaButton.prototype,"size",2),p([n.property({type:String})],t.SemaButton.prototype,"fontSize",2),p([n.property({type:String})],t.SemaButton.prototype,"url",2),p([n.property({type:String})],t.SemaButton.prototype,"target",2),p([n.property({type:String})],t.SemaButton.prototype,"altText",2),t.SemaButton=p([n.customElement("sema-button")],t.SemaButton);const P=l.css`
153
153
  :host {
154
- font-family: Arial, Helvetica, sans-serif;
154
+ font-family: "Inter", system-ui, -apple-system, sans-serif;
155
155
  }
156
156
 
157
157
  .__section {
@@ -237,15 +237,15 @@
237
237
  }
238
238
  }
239
239
  }
240
- `;var k=Object.defineProperty,B=Object.getOwnPropertyDescriptor,f=(c,o,n,r)=>{for(var e=r>1?void 0:r?B(o,n):o,a=c.length-1,i;a>=0;a--)(i=c[a])&&(e=(r?i(o,n,e):i(e))||e);return r&&e&&k(o,n,e),e};t.SemaAlerts=class extends s.LitElement{constructor(){super(...arguments),this.type="info",this.title="",this.message=""}render(){return s.html`
240
+ `;var C=Object.defineProperty,k=Object.getOwnPropertyDescriptor,u=(c,o,a,r)=>{for(var e=r>1?void 0:r?k(o,a):o,s=c.length-1,i;s>=0;s--)(i=c[s])&&(e=(r?i(o,a,e):i(e))||e);return r&&e&&C(o,a,e),e};t.SemaAlerts=class extends l.LitElement{constructor(){super(...arguments),this.type="info",this.title="",this.message=""}render(){return l.html`
241
241
  <section class="__section __${this.type}">
242
242
  <h3 class="__title">${this.title}</h3>
243
243
  <p class="__paragraph">${this.message}</p>
244
244
  </section>
245
- `}},t.SemaAlerts.styles=[x],f([l.property({type:String})],t.SemaAlerts.prototype,"type",2),f([l.property({type:String})],t.SemaAlerts.prototype,"title",2),f([l.property({type:String})],t.SemaAlerts.prototype,"message",2),t.SemaAlerts=f([l.customElement("sema-alerts")],t.SemaAlerts);const P=s.css`
245
+ `}},t.SemaAlerts.styles=[P],u([n.property({type:String})],t.SemaAlerts.prototype,"type",2),u([n.property({type:String})],t.SemaAlerts.prototype,"title",2),u([n.property({type:String})],t.SemaAlerts.prototype,"message",2),t.SemaAlerts=u([n.customElement("sema-alerts")],t.SemaAlerts);const B=l.css`
246
246
  :host {
247
247
  display: block;
248
- font-family: Arial, Helvetica, sans-serif;
248
+ font-family: "Inter", system-ui, -apple-system, sans-serif;
249
249
  }
250
250
 
251
251
  .accordion {
@@ -315,7 +315,7 @@
315
315
  }
316
316
 
317
317
  }
318
- `;var A=Object.defineProperty,z=Object.getOwnPropertyDescriptor,d=(c,o,n,r)=>{for(var e=r>1?void 0:r?z(o,n):o,a=c.length-1,i;a>=0;a--)(i=c[a])&&(e=(r?i(o,n,e):i(e))||e);return r&&e&&A(o,n,e),e};t.SemaAccordion=class extends s.LitElement{constructor(){super(...arguments),this.question="",this.answer="",this.color="",this.open=!1}render(){const o=this.open===!0;let n=this.color?this.color:"#dc2626";const e=o?`
318
+ `;var z=Object.defineProperty,A=Object.getOwnPropertyDescriptor,f=(c,o,a,r)=>{for(var e=r>1?void 0:r?A(o,a):o,s=c.length-1,i;s>=0;s--)(i=c[s])&&(e=(r?i(o,a,e):i(e))||e);return r&&e&&z(o,a,e),e};t.SemaAccordion=class extends l.LitElement{constructor(){super(...arguments),this.question="",this.answer="",this.color="",this.open=!1}render(){const o=this.open===!0;let a=this.color?this.color:"#dc2626";const e=o?`
319
319
  --color-btn: ${o?"rgba(229, 231, 235, 0.2)":""};
320
320
  --isOpenPadding: 1rem;
321
321
  --isOpenHeight: 200px;
@@ -325,8 +325,8 @@
325
325
  --isOpenPadding: 0;
326
326
  --isOpenHeight: 0;
327
327
  --isOpenOpacity: 0;
328
- --isOpenRotate: rotate(0);`,a=`
329
- --svgcolor: ${n};`,i=e+a;return s.html`
328
+ --isOpenRotate: rotate(0);`,s=`
329
+ --svgcolor: ${a};`,i=e+s;return l.html`
330
330
  <article class="accordion" style="${i}" >
331
331
  <div class="__btn" @click="${this._changeIsOpen}">
332
332
  <h3 class="__title">${this.question}</h3>
@@ -339,7 +339,7 @@
339
339
  <p class="__text">${this.answer}</p>
340
340
  </div>
341
341
  </article>
342
- `}_changeIsOpen(){this.open===!1?this.open=!0:this.open=!1}},t.SemaAccordion.styles=[P],d([l.property({type:String})],t.SemaAccordion.prototype,"question",2),d([l.property({type:String})],t.SemaAccordion.prototype,"answer",2),d([l.property({type:String})],t.SemaAccordion.prototype,"color",2),d([l.property({type:Boolean})],t.SemaAccordion.prototype,"open",2),t.SemaAccordion=d([l.customElement("sema-accordion")],t.SemaAccordion);const C=s.css`
342
+ `}_changeIsOpen(){this.open===!1?this.open=!0:this.open=!1}},t.SemaAccordion.styles=[B],f([n.property({type:String})],t.SemaAccordion.prototype,"question",2),f([n.property({type:String})],t.SemaAccordion.prototype,"answer",2),f([n.property({type:String})],t.SemaAccordion.prototype,"color",2),f([n.property({type:Boolean})],t.SemaAccordion.prototype,"open",2),t.SemaAccordion=f([n.customElement("sema-accordion")],t.SemaAccordion);const D=l.css`
343
343
 
344
344
  .__title {
345
345
  color: #000;
@@ -349,7 +349,7 @@
349
349
  @media (prefers-color-scheme: dark) {
350
350
  :root {
351
351
  display: block;
352
- font-family: Arial, Helvetica, sans-serif;
352
+ font-family: "Inter", system-ui, -apple-system, sans-serif;
353
353
  }
354
354
 
355
355
  section {
@@ -368,7 +368,7 @@
368
368
  color: #fff;
369
369
  }
370
370
  }
371
- `;var y=Object.freeze,_=Object.defineProperty,T=Object.getOwnPropertyDescriptor,b=(c,o,n,r)=>{for(var e=r>1?void 0:r?T(o,n):o,a=c.length-1,i;a>=0;a--)(i=c[a])&&(e=(r?i(o,n,e):i(e))||e);return r&&e&&_(o,n,e),e},D=(c,o)=>y(_(c,"raw",{value:y(c.slice())})),v;t.SemaFaqs=class extends s.LitElement{constructor(){super(...arguments),this.title="",this.color="",this.faqs=[]}render(){const o={"@context":"https://schema.org","@type":"FAQPage",mainEntity:this.faqs.map(r=>({"@type":"Question",name:r.question,acceptedAnswer:{"@type":"Answer",text:r.answer}}))},n=JSON.stringify(o).replace(/<\/script>/g,"<\\/script>");return s.html(v||(v=D([`
371
+ `;var v=Object.freeze,_=Object.defineProperty,T=Object.getOwnPropertyDescriptor,g=(c,o,a,r)=>{for(var e=r>1?void 0:r?T(o,a):o,s=c.length-1,i;s>=0;s--)(i=c[s])&&(e=(r?i(o,a,e):i(e))||e);return r&&e&&_(o,a,e),e},q=(c,o)=>v(_(c,"raw",{value:v(c.slice())})),S;t.SemaFaqs=class extends l.LitElement{constructor(){super(...arguments),this.title="",this.color="",this.faqs=[]}render(){const o={"@context":"https://schema.org","@type":"FAQPage",mainEntity:this.faqs.map(r=>({"@type":"Question",name:r.question,acceptedAnswer:{"@type":"Answer",text:r.answer}}))},a=JSON.stringify(o).replace(/<\/script>/g,"<\\/script>");return l.html(S||(S=q([`
372
372
  <section class="faqs-section">
373
373
  <h2 class="__title">`,`</h2>
374
374
  <article>
@@ -378,16 +378,16 @@
378
378
  <script type="application/ld+json">
379
379
  `,`
380
380
  <\/script>
381
- `])),this.title,this.faqs.map(r=>s.html`
381
+ `])),this.title,this.faqs.map(r=>l.html`
382
382
  <sema-accordion
383
383
  color="${this.color}"
384
384
  question="${r.question}"
385
385
  answer="${r.answer}"
386
386
  ></sema-accordion>
387
- `),S.unsafeHTML(n))}},t.SemaFaqs.styles=[C],b([l.property({type:String})],t.SemaFaqs.prototype,"title",2),b([l.property({type:String})],t.SemaFaqs.prototype,"color",2),b([l.property({type:Array})],t.SemaFaqs.prototype,"faqs",2),t.SemaFaqs=b([l.customElement("sema-faqs")],t.SemaFaqs);const q=s.css`
387
+ `),w.unsafeHTML(a))}},t.SemaFaqs.styles=[D],g([n.property({type:String})],t.SemaFaqs.prototype,"title",2),g([n.property({type:String})],t.SemaFaqs.prototype,"color",2),g([n.property({type:Array})],t.SemaFaqs.prototype,"faqs",2),t.SemaFaqs=g([n.customElement("sema-faqs")],t.SemaFaqs);const E=l.css`
388
388
  :host {
389
389
  display: block;
390
- font-family: Arial, Helvetica, sans-serif;
390
+ font-family: "Inter", system-ui, -apple-system, sans-serif;
391
391
  }
392
392
 
393
393
  ol {
@@ -420,21 +420,21 @@
420
420
  color: #fff;
421
421
  }
422
422
  }
423
- `;var E=Object.defineProperty,L=Object.getOwnPropertyDescriptor,g=(c,o,n,r)=>{for(var e=r>1?void 0:r?L(o,n):o,a=c.length-1,i;a>=0;a--)(i=c[a])&&(e=(r?i(o,n,e):i(e))||e);return r&&e&&E(o,n,e),e};t.SemaBreadcrumbs=class extends s.LitElement{constructor(){super(...arguments),this.items=[],this.color=""}render(){const o=this.color?`--color-primary: ${this.color};`:"--color-primary: #dc2626;";return s.html`
423
+ `;var L=Object.defineProperty,I=Object.getOwnPropertyDescriptor,y=(c,o,a,r)=>{for(var e=r>1?void 0:r?I(o,a):o,s=c.length-1,i;s>=0;s--)(i=c[s])&&(e=(r?i(o,a,e):i(e))||e);return r&&e&&L(o,a,e),e};t.SemaBreadcrumbs=class extends l.LitElement{constructor(){super(...arguments),this.items=[],this.color=""}render(){const o=this.color?`--color-primary: ${this.color};`:"--color-primary: #dc2626;";return l.html`
424
424
  <nav aria-label="breadcrumb" style="${o}">
425
425
  <ol>
426
- ${this.items.map((n,r)=>s.html`
426
+ ${this.items.map((a,r)=>l.html`
427
427
  <li class="${r===this.items.length-1?"__active":"__link"}">
428
- ${n.path&&r!==this.items.length-1?s.html`<a href="${n.path}">${n.label}</a>`:n.label}
428
+ ${a.path&&r!==this.items.length-1?l.html`<a href="${a.path}">${a.label}</a>`:a.label}
429
429
  </li>
430
- ${r<this.items.length-1?s.html`<li class="__slash">/</li>`:""}
430
+ ${r<this.items.length-1?l.html`<li class="__slash">/</li>`:""}
431
431
  `)}
432
432
  </ol>
433
433
  </nav>
434
- `}},t.SemaBreadcrumbs.styles=[q],g([l.property({type:Array})],t.SemaBreadcrumbs.prototype,"items",2),g([l.property({type:String})],t.SemaBreadcrumbs.prototype,"color",2),t.SemaBreadcrumbs=g([l.customElement("sema-breadcrumbs")],t.SemaBreadcrumbs);const H=s.css`
434
+ `}},t.SemaBreadcrumbs.styles=[E],y([n.property({type:Array})],t.SemaBreadcrumbs.prototype,"items",2),y([n.property({type:String})],t.SemaBreadcrumbs.prototype,"color",2),t.SemaBreadcrumbs=y([n.customElement("sema-breadcrumbs")],t.SemaBreadcrumbs);const F=l.css`
435
435
  :host {
436
436
  display: block;
437
- font-family: Arial, Helvetica, sans-serif;
437
+ font-family: "Inter", system-ui, -apple-system, sans-serif;
438
438
  }
439
439
  .__btn {
440
440
  display: flex;
@@ -531,7 +531,7 @@
531
531
  }
532
532
 
533
533
  }
534
- `;var F=Object.defineProperty,R=Object.getOwnPropertyDescriptor,h=(c,o,n,r)=>{for(var e=r>1?void 0:r?R(o,n):o,a=c.length-1,i;a>=0;a--)(i=c[a])&&(e=(r?i(o,n,e):i(e))||e);return r&&e&&F(o,n,e),e};t.SemaDropdown=class extends s.LitElement{constructor(){super(...arguments),this.label="",this.color="",this.bgColor="",this.open=!1,this.items=[]}render(){const o=this.open===!0;let n=this.color?this.color:"#dc2626",r=this.bgColor?this.bgColor:"#dc2626";const e=o?`
534
+ `;var H=Object.defineProperty,M=Object.getOwnPropertyDescriptor,h=(c,o,a,r)=>{for(var e=r>1?void 0:r?M(o,a):o,s=c.length-1,i;s>=0;s--)(i=c[s])&&(e=(r?i(o,a,e):i(e))||e);return r&&e&&H(o,a,e),e};t.SemaDropdown=class extends l.LitElement{constructor(){super(...arguments),this.label="",this.color="",this.bgColor="",this.open=!1,this.items=[]}render(){const o=this.open===!0;let a=this.color?this.color:"#dc2626",r=this.bgColor?this.bgColor:"#dc2626";const e=o?`
535
535
  --isOpenBgColor: ${r};
536
536
  --isOpenPadding: 1rem;
537
537
  --isOpenHeight: auto;
@@ -540,8 +540,8 @@
540
540
  --isOpenPadding: 0;
541
541
  --isOpenHeight: 0;
542
542
  --isOpenOpacity: 0;
543
- --isOpenRotate: rotate(0);`,a=`--svgcolor: ${n};`,i=e+a;return s.html`
544
- <button class="__btn" @click="${this._changeIsOpen}" style="${a}">
543
+ --isOpenRotate: rotate(0);`,s=`--svgcolor: ${a};`,i=e+s;return l.html`
544
+ <button class="__btn" @click="${this._changeIsOpen}" style="${s}">
545
545
  <span class="__label">${this.label}</span>
546
546
 
547
547
  <div class="__icon">
@@ -550,14 +550,205 @@
550
550
  </button>
551
551
 
552
552
  <div class="__content" style="${i}">
553
- ${this.items.map(m=>"category"in m?s.html`
553
+ ${this.items.map(d=>"category"in d?l.html`
554
554
  <div class="__category">
555
- <span class="__category-title">${m.category}</span>
556
- ${m.items.map(u=>s.html`
557
- <a href="${u.path||"#"}" title="${u.label}" aria-label="${u.label}" class="__link">${u.label}</a>
555
+ <span class="__category-title">${d.category}</span>
556
+ ${d.items.map(b=>l.html`
557
+ <a href="${b.path||"#"}" title="${b.label}" aria-label="${b.label}" class="__link">${b.label}</a>
558
558
  `)}
559
559
  </div>
560
- `:s.html`<a href="${m.path||"#"}" title="${m.label}" aria-label="${m.label}" class="__link">${m.label}</a>`)}
560
+ `:l.html`<a href="${d.path||"#"}" title="${d.label}" aria-label="${d.label}" class="__link">${d.label}</a>`)}
561
561
  </div>
562
562
  </div>
563
- `}_changeIsOpen(){this.open=!this.open}},t.SemaDropdown.styles=[H],h([l.property({type:String})],t.SemaDropdown.prototype,"label",2),h([l.property({type:String})],t.SemaDropdown.prototype,"color",2),h([l.property({type:String})],t.SemaDropdown.prototype,"bgColor",2),h([l.property({type:Boolean})],t.SemaDropdown.prototype,"open",2),h([l.property({type:Array})],t.SemaDropdown.prototype,"items",2),t.SemaDropdown=h([l.customElement("sema-dropdown")],t.SemaDropdown);const N="0.0.1";t.version=N,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
563
+ `}_changeIsOpen(){this.open=!this.open}},t.SemaDropdown.styles=[F],h([n.property({type:String})],t.SemaDropdown.prototype,"label",2),h([n.property({type:String})],t.SemaDropdown.prototype,"color",2),h([n.property({type:String})],t.SemaDropdown.prototype,"bgColor",2),h([n.property({type:Boolean})],t.SemaDropdown.prototype,"open",2),h([n.property({type:Array})],t.SemaDropdown.prototype,"items",2),t.SemaDropdown=h([n.customElement("sema-dropdown")],t.SemaDropdown);const N=l.css`
564
+ .product-card {
565
+ background-color: white;
566
+ width: 300px;
567
+ border-radius: 12px;
568
+ overflow: hidden; /* Para que la imagen respete los bordes redondeados */
569
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
570
+ transition:
571
+ transform 0.3s ease,
572
+ box-shadow 0.3s ease;
573
+ cursor: pointer;
574
+ }
575
+
576
+ /* Efecto al pasar el mouse por encima */
577
+ .product-card:hover {
578
+ transform: translateY(-5px);
579
+ box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
580
+ }
581
+
582
+ /* 1. Imagen */
583
+ .card-image-container {
584
+ width: 100%;
585
+ height: 200px;
586
+ overflow: hidden;
587
+ position: relative;
588
+ }
589
+
590
+ .card-image-container img {
591
+ width: 100%;
592
+ height: 100%;
593
+ object-fit: cover; /* Mantiene la proporción de la imagen sin estirarla */
594
+ transition: transform 0.5s ease;
595
+ }
596
+
597
+ .product-card:hover .card-image-container img {
598
+ transform: scale(1.05); /* Zoom suave en la imagen */
599
+ }
600
+
601
+ /* Contenedor de la información */
602
+ .card-details {
603
+ padding: 20px;
604
+ }
605
+
606
+ /* 2. Categoría e ID (Cabecera pequeña) */
607
+ .card-meta {
608
+ display: flex;
609
+ justify-content: space-between;
610
+ align-items: center;
611
+ margin-bottom: 10px;
612
+ font-size: 0.75rem;
613
+ }
614
+
615
+ .category {
616
+ background-color: #e0e7ff;
617
+ color: #4338ca;
618
+ padding: 4px 8px;
619
+ border-radius: 4px;
620
+ font-weight: 700;
621
+ text-transform: uppercase;
622
+ letter-spacing: 0.5px;
623
+ }
624
+
625
+ .product-id {
626
+ color: #888;
627
+ }
628
+
629
+ /* 3. Título del Producto */
630
+ .product-title {
631
+ margin: 0 0 10px 0;
632
+ font-size: 1.2rem;
633
+ color: #333;
634
+ line-height: 1.4;
635
+ font-weight: 600;
636
+ display: -webkit-box;
637
+ -webkit-line-clamp: 1;
638
+ -webkit-box-orient: vertical;
639
+ overflow: hidden;
640
+ }
641
+
642
+ /* 4. Valoración (Estrellas y Promedio) */
643
+ .rating-container {
644
+ display: flex;
645
+ align-items: center;
646
+ margin-bottom: 15px;
647
+ font-size: 0.9rem;
648
+ }
649
+
650
+ .stars {
651
+ color: #fbbf24; /* Color dorado */
652
+ margin-right: 5px;
653
+ letter-spacing: 1px;
654
+ }
655
+
656
+ .average-rating {
657
+ font-weight: bold;
658
+ color: #333;
659
+ margin-right: 5px;
660
+ }
661
+
662
+ .review-count {
663
+ color: #6b7280;
664
+ font-size: 0.8rem;
665
+ }
666
+
667
+ /* Línea separadora */
668
+ hr {
669
+ border: 0;
670
+ border-top: 1px solid #eee;
671
+ margin: 10px 0;
672
+ }
673
+
674
+ /* 5. Precio */
675
+ .price-container {
676
+ display: flex;
677
+ justify-content: space-between;
678
+ align-items: center;
679
+ margin-top: 15px;
680
+ }
681
+
682
+ .price {
683
+ font-size: 1.5rem;
684
+ font-weight: 800;
685
+ color: #1f2937;
686
+ }
687
+
688
+ .currency {
689
+ font-size: 0.9rem;
690
+ vertical-align: top;
691
+ }
692
+
693
+ @media (prefers-color-scheme: dark) {
694
+ .product-card {
695
+ background-color: #1f2937;
696
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
697
+ }
698
+
699
+ .product-title {
700
+ color: #f9fafb;
701
+ }
702
+
703
+ .average-rating {
704
+ color: #f3f4f6;
705
+ }
706
+
707
+ .review-count {
708
+ color: #9ca3af;
709
+ }
710
+
711
+ .price {
712
+ color: #f9fafb;
713
+ }
714
+
715
+ .category {
716
+ background-color: #3730a3;
717
+ color: #e0e7ff;
718
+ }
719
+
720
+ hr {
721
+ border-top: 1px solid #374151;
722
+ }
723
+ }
724
+ `;var R=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,m=(c,o,a,r)=>{for(var e=r>1?void 0:r?Y(o,a):o,s=c.length-1,i;s>=0;s--)(i=c[s])&&(e=(r?i(o,a,e):i(e))||e);return r&&e&&R(o,a,e),e};t.SemaCardProduct=class extends l.LitElement{constructor(){super(...arguments),this.image="",this.category="",this.id="",this.title="",this.rate=0,this.count=0,this.price=0}render(){const o=Math.min(5,Math.max(0,Math.round(this.rate))),a=5-o;return l.html`
725
+ <article class="product-card" id="${this.id}">
726
+ <div class="card-image-container">
727
+ <img
728
+ src="${this.image}"
729
+ alt="Auriculares Premium"
730
+ />
731
+ </div>
732
+
733
+ <div class="card-details">
734
+ <div class="card-meta">
735
+ <span class="category">${this.category}</span>
736
+ <span class="product-id">${this.id?`ID: ${this.id}`:""}</span>
737
+ </div>
738
+
739
+ <h3 class="product-title">${this.title}</h3>
740
+
741
+ <div class="rating-container">
742
+ <span class="stars">${"★".repeat(o)}${"☆".repeat(a)}</span>
743
+ <span class="average-rating">${this.rate}</span>
744
+ <span class="review-count">(${this.count} valoraciones)</span>
745
+ </div>
746
+
747
+ <hr />
748
+
749
+ <div class="price-container">
750
+ <span class="price"><span class="currency">$</span>${this.price}</span>
751
+ </div>
752
+ </div>
753
+ </article>
754
+ `}},t.SemaCardProduct.styles=[N],m([n.property({type:String})],t.SemaCardProduct.prototype,"image",2),m([n.property({type:String})],t.SemaCardProduct.prototype,"category",2),m([n.property({type:String})],t.SemaCardProduct.prototype,"id",2),m([n.property({type:String})],t.SemaCardProduct.prototype,"title",2),m([n.property({type:Number})],t.SemaCardProduct.prototype,"rate",2),m([n.property({type:Number})],t.SemaCardProduct.prototype,"count",2),m([n.property({type:Number})],t.SemaCardProduct.prototype,"price",2),t.SemaCardProduct=m([n.customElement("sema-card-product")],t.SemaCardProduct);const U="0.0.1";t.version=U,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jegdev/sema-ui",
3
3
  "private": false,
4
- "version": "0.0.8",
4
+ "version": "0.0.9-beta.1",
5
5
  "description": "Una colección de componentes Lit minimalistas estilo Swiss Design",
6
6
  "keywords": [
7
7
  "Next",