@jegdev/sema-ui 0.0.6 → 0.0.8

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.
@@ -0,0 +1,798 @@
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`
5
+ /* ---------------- GENERAL STYLES ------------------- */
6
+
7
+ a {
8
+ text-decoration: none;
9
+ }
10
+
11
+ .btn {
12
+ display: inline-flex;
13
+ align-items: center;
14
+ justify-content: center;
15
+ border-radius: 8px;
16
+ cursor: pointer;
17
+ font-weight: 600;
18
+ outline: none;
19
+ padding: 0.6rem 1.2rem;
20
+ font-size: var(--btn-font-size);
21
+ border: 1px solid transparent;
22
+ width: var(--btn-width);
23
+ font-family:
24
+ "Inter",
25
+ system-ui,
26
+ -apple-system,
27
+ sans-serif;
28
+ }
29
+
30
+ .btn:hover {
31
+ border: 1px solid #b3b3b3;
32
+ }
33
+
34
+ /* ---------------- PRIMARY BUTTON STYLES ------------------- */
35
+
36
+ .btn-primary {
37
+ background: #ef4444;
38
+ color: #f9fafb;
39
+ }
40
+
41
+ .btn-primary:hover {
42
+ background: #f9fafb;
43
+ color: #ef4444;
44
+ }
45
+
46
+ .btn-custom {
47
+ background: var(--btn-primary-color);
48
+ color: var(--btn-secondary-color);
49
+ }
50
+ .btn-custom:hover {
51
+ background: var(--btn-secondary-color);
52
+ color: var(--btn-primary-color);
53
+ }
54
+
55
+ /* ---------------- OUTLINE BUTTON STYLES ------------------- */
56
+
57
+ .btn-outline {
58
+ background: #f9fafb;
59
+ color: #ef4444;
60
+ border: 1.5px solid #ef4444;
61
+ }
62
+
63
+ .btn-outline:hover {
64
+ background: #ef4444;
65
+ color: #f9fafb;
66
+ border: 1.5px solid #ef4444;
67
+ }
68
+
69
+ .btn-outline-custom {
70
+ background: var(--btn-secondary-color);
71
+ color: var(--btn-primary-color);
72
+ border: 1.5px solid var(--btn-primary-color, currentColor);
73
+ }
74
+
75
+ .btn-outline-custom:hover {
76
+ background: var(--btn-primary-color);
77
+ color: var(--btn-secondary-color);
78
+ border: 1.5px solid var(--btn-primary-color, currentColor);
79
+ }
80
+
81
+ /* ---------------- GHOST BUTTON STYLES ------------------- */
82
+
83
+ .btn-ghost {
84
+ color: #999999;
85
+ }
86
+
87
+ .btn-ghost:hover {
88
+ color: #ef4444;
89
+ }
90
+
91
+ .btn-ghost-custom {
92
+ color: var(--btn-primary-color);
93
+ }
94
+
95
+ .btn-ghost-custom:hover {
96
+ color: var(--btn-secondary-color);
97
+ }
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;
103
+ };
104
+ let c = class extends m {
105
+ constructor() {
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
+ }
108
+ render() {
109
+ const i = this.custom === "on", e = i ? `--btn-primary-color: ${this.firstColor}; --btn-secondary-color: ${this.secondaryColor};` : "";
110
+ let r = "120px";
111
+ this.size === "sm" ? r = "80px" : this.size === "md" ? r = "120px" : this.size === "lg" ? r = "160px" : this.size === "full" && (r = "100%");
112
+ const o = `--btn-width: ${r};`;
113
+ let t = "1rem";
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}`;
116
+ return this.mode === "outline" ? this.kind === "link" ? l`
117
+ <a
118
+ style="${e}${o}${s}"
119
+ href="${this.url}"
120
+ alt="${this.altText}"
121
+ title="${this.altText}"
122
+ target="${this.target}"
123
+ class="btn ${i ? "btn-outline-custom" : "btn-outline"}"
124
+ >
125
+ <slot></slot>
126
+ </a>
127
+ ` : l`
128
+ <button
129
+ style="${e}${o}${s}"
130
+ class="btn ${i ? "btn-outline-custom" : "btn-outline"}"
131
+ title="${this.altText}"
132
+ >
133
+ <slot></slot>
134
+ </button>
135
+ ` : this.mode === "ghost" ? this.kind === "link" ? l`
136
+ <a
137
+ style="${e}${o}${s}"
138
+ href="${this.url}"
139
+ alt="${this.altText}"
140
+ title="${this.altText}"
141
+ target="${this.target}"
142
+ class="btn ${this.custom === "on" ? "btn-ghost-custom" : "btn-ghost"}"
143
+ >
144
+ <slot></slot>
145
+ </a>
146
+ ` : l`
147
+ <button
148
+ style="${e}${o}${s}"
149
+ class="btn ${this.custom === "on" ? "btn-ghost-custom" : "btn-ghost"}"
150
+ title="${this.altText}"
151
+ >
152
+ <slot></slot>
153
+ </button>
154
+ ` : this.kind === "link" ? l`
155
+ <a
156
+ style="${e}${o}${s}"
157
+ href="${this.url}"
158
+ alt="${this.altText}"
159
+ title="${this.altText}"
160
+ target="${this.target}"
161
+ class="btn ${this.custom === "on" ? "btn-custom" : "btn-primary"}"
162
+ >
163
+ <slot></slot>
164
+ </a>
165
+ ` : l`
166
+ <button
167
+ style="${e}${o}${s}"
168
+ class="btn ${this.custom === "on" ? "btn-custom" : "btn-primary"}"
169
+ title="${this.altText}"
170
+ >
171
+ <slot></slot>
172
+ </button>
173
+ `;
174
+ }
175
+ };
176
+ c.styles = [C];
177
+ p([
178
+ a({ type: String })
179
+ ], c.prototype, "mode", 2);
180
+ p([
181
+ a({ type: String })
182
+ ], c.prototype, "kind", 2);
183
+ p([
184
+ a({ type: String })
185
+ ], c.prototype, "custom", 2);
186
+ p([
187
+ a({ type: String })
188
+ ], c.prototype, "firstColor", 2);
189
+ p([
190
+ a({ type: String })
191
+ ], c.prototype, "secondaryColor", 2);
192
+ p([
193
+ a({ type: String })
194
+ ], c.prototype, "size", 2);
195
+ p([
196
+ a({ type: String })
197
+ ], c.prototype, "fontSize", 2);
198
+ p([
199
+ a({ type: String })
200
+ ], c.prototype, "url", 2);
201
+ p([
202
+ a({ type: String })
203
+ ], c.prototype, "target", 2);
204
+ p([
205
+ a({ type: String })
206
+ ], c.prototype, "altText", 2);
207
+ c = p([
208
+ _("sema-button")
209
+ ], c);
210
+ const A = g`
211
+ :host {
212
+ font-family: Arial, Helvetica, sans-serif;
213
+ }
214
+
215
+ .__section {
216
+ display: flex;
217
+ flex-direction: column;
218
+ width: 100%;
219
+ height: auto;
220
+ border-radius: 8px;
221
+ box-sizing: border-box;
222
+ overflow: hidden;
223
+ padding: 1rem 1rem 1rem 0;
224
+ }
225
+
226
+ .__title {
227
+ margin-left: 1rem;
228
+ margin-top: 0;
229
+ margin-bottom: 0.5rem;
230
+ font-size: 1rem;
231
+ font-weight: bold;
232
+ }
233
+ .__paragraph {
234
+ margin-left: 1rem;
235
+ margin-top: 0;
236
+ margin-bottom: 0;
237
+ font-size: 0.9rem;
238
+ }
239
+
240
+ .__error {
241
+ border: 1px solid #dc2626;
242
+ border-left-width: 4px;
243
+ background: #450a0a;
244
+ -webkit-backdrop-filter: blur(4px);
245
+ backdrop-filter: blur(4px);
246
+
247
+ .__title {
248
+ color: #dc2626;
249
+ }
250
+ .__paragraph {
251
+ color: #fff;
252
+ }
253
+ }
254
+
255
+ .__warn {
256
+ border: 1px solid #ffbb27;
257
+ border-left-width: 4px;
258
+ background: #775a1a;
259
+ -webkit-backdrop-filter: blur(4px);
260
+ backdrop-filter: blur(4px);
261
+
262
+ .__title {
263
+ color: #ffbb27;
264
+ }
265
+ .__paragraph {
266
+ color: #fff;
267
+ }
268
+ }
269
+
270
+ .__info {
271
+ border-left: 4px solid #3ffc38;
272
+ border: 1px solid #3ffc38;
273
+ border-left-width: 4px;
274
+ background: #f1f1f1;
275
+ -webkit-backdrop-filter: blur(4px);
276
+ backdrop-filter: blur(4px);
277
+
278
+ .__title {
279
+ color: #0a0a0a;
280
+ }
281
+ .__paragraph {
282
+ color: #585858;
283
+ }
284
+ }
285
+
286
+ @media (prefers-color-scheme: dark) {
287
+ .__info {
288
+ background: transparent;
289
+
290
+ .__title {
291
+ color: #e0e0e0;
292
+ }
293
+ .__paragraph {
294
+ color: #fff;
295
+ }
296
+ }
297
+ }
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;
303
+ };
304
+ let f = class extends m {
305
+ constructor() {
306
+ super(...arguments), this.type = "info", this.title = "", this.message = "";
307
+ }
308
+ render() {
309
+ return l`
310
+ <section class="__section __${this.type}">
311
+ <h3 class="__title">${this.title}</h3>
312
+ <p class="__paragraph">${this.message}</p>
313
+ </section>
314
+ `;
315
+ }
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`
331
+ :host {
332
+ display: block;
333
+ font-family: Arial, Helvetica, sans-serif;
334
+ }
335
+
336
+ .accordion {
337
+ border-radius: 4px;
338
+ margin-bottom: 0.5rem;
339
+ background: var(--isOpenBackground);
340
+ overflow: hidden;
341
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
342
+ }
343
+
344
+ .__btn {
345
+ padding: 1rem;
346
+ cursor: pointer;
347
+ display: flex;
348
+ justify-content: space-between;
349
+ align-items: center;
350
+ font-weight: 600;
351
+ background: var(--color-btn);
352
+ backdrop-filter: blur(5px);
353
+ transition: background 0.2s ease, color 0.2s ease;
354
+ max-height: 200px;
355
+ gap: 1rem;
356
+ }
357
+
358
+ .__title {
359
+ margin: 0;
360
+ color: #000;
361
+ }
362
+
363
+ svg {
364
+ width: 1rem;
365
+ height: 1rem;
366
+ fill: var(--svgcolor);
367
+ transform: var(--isOpenRotate);
368
+ transition: transform 0.3s;
369
+ }
370
+
371
+ .__dropdown {
372
+ padding: var(--isOpenPadding);
373
+ max-height: var(--isOpenHeight);
374
+ overflow: hidden;
375
+ transition: all 0.3s ease;
376
+ opacity: var(--isOpenOpacity);
377
+ }
378
+
379
+ .__text {
380
+ color: #444547;
381
+ margin: 0;
382
+ }
383
+
384
+ @media (prefers-color-scheme: dark) {
385
+
386
+ .__btn {
387
+ background: var(--svgcolor);
388
+ }
389
+
390
+ .__title {
391
+ color: #fff;
392
+ }
393
+
394
+ svg {
395
+ fill: #fff;
396
+ }
397
+
398
+ .__text {
399
+ color: #dbdbdd;
400
+ }
401
+
402
+ }
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;
408
+ };
409
+ let h = class extends m {
410
+ constructor() {
411
+ super(...arguments), this.question = "", this.answer = "", this.color = "", this.open = !1;
412
+ }
413
+ render() {
414
+ const i = this.open === !0;
415
+ let e = this.color ? this.color : "#dc2626";
416
+ const o = i ? `
417
+ --color-btn: ${i ? "rgba(229, 231, 235, 0.2)" : ""};
418
+ --isOpenPadding: 1rem;
419
+ --isOpenHeight: 200px;
420
+ --isOpenOpacity: 1;
421
+ --isOpenRotate: rotate(180deg);` : `
422
+ --color-btn: transparent;
423
+ --isOpenPadding: 0;
424
+ --isOpenHeight: 0;
425
+ --isOpenOpacity: 0;
426
+ --isOpenRotate: rotate(0);`, t = `
427
+ --svgcolor: ${e};`, s = o + t;
428
+ return l`
429
+ <article class="accordion" style="${s}" >
430
+ <div class="__btn" @click="${this._changeIsOpen}">
431
+ <h3 class="__title">${this.question}</h3>
432
+
433
+ <div class="__icon">
434
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512" x="0" y="0" viewBox="0 0 451.847 451.847" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g><path d="M225.923 354.706c-8.098 0-16.195-3.092-22.369-9.263L9.27 151.157c-12.359-12.359-12.359-32.397 0-44.751 12.354-12.354 32.388-12.354 44.748 0l171.905 171.915 171.906-171.909c12.359-12.354 32.391-12.354 44.744 0 12.365 12.354 12.365 32.392 0 44.751L248.292 345.449c-6.177 6.172-14.274 9.257-22.369 9.257z" opacity="1" data-original="#000000" class=""></path></g></svg>
435
+ </div>
436
+ </div>
437
+ <div class="__dropdown">
438
+ <p class="__text">${this.answer}</p>
439
+ </div>
440
+ </article>
441
+ `;
442
+ }
443
+ _changeIsOpen() {
444
+ this.open === !1 ? this.open = !0 : this.open = !1;
445
+ }
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`
464
+
465
+ .__title {
466
+ color: #000;
467
+ text-align: center;
468
+ }
469
+
470
+ @media (prefers-color-scheme: dark) {
471
+ :root {
472
+ display: block;
473
+ font-family: Arial, Helvetica, sans-serif;
474
+ }
475
+
476
+ section {
477
+ display: flex;
478
+ flex-direction: column;
479
+ justify-content: center;
480
+ align-items: center;
481
+ width: 100%;
482
+ }
483
+
484
+ article {
485
+ max-width: 980px;
486
+ width: 100%;
487
+ }
488
+ .__title{
489
+ color: #fff;
490
+ }
491
+ }
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 {
499
+ constructor() {
500
+ super(...arguments), this.title = "", this.color = "", this.faqs = [];
501
+ }
502
+ render() {
503
+ const i = {
504
+ "@context": "https://schema.org",
505
+ "@type": "FAQPage",
506
+ mainEntity: this.faqs.map((r) => ({
507
+ "@type": "Question",
508
+ name: r.question,
509
+ acceptedAnswer: {
510
+ "@type": "Answer",
511
+ text: r.answer
512
+ }
513
+ }))
514
+ }, e = JSON.stringify(i).replace(/<\/script>/g, "<\\/script>");
515
+ return l(k || (k = N([`
516
+ <section class="faqs-section">
517
+ <h2 class="__title">`, `</h2>
518
+ <article>
519
+ `, `
520
+ </article>
521
+ </section>
522
+ <script type="application/ld+json">
523
+ `, `
524
+ <\/script>
525
+ `])), this.title, this.faqs.map(
526
+ (r) => l`
527
+ <sema-accordion
528
+ color="${this.color}"
529
+ question="${r.question}"
530
+ answer="${r.answer}"
531
+ ></sema-accordion>
532
+ `
533
+ ), z(e));
534
+ }
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`
550
+ :host {
551
+ display: block;
552
+ font-family: Arial, Helvetica, sans-serif;
553
+ }
554
+
555
+ ol {
556
+ display: flex;
557
+ list-style: none;
558
+ padding: 0;
559
+ margin: 0;
560
+ font-size: 0.9rem;
561
+ }
562
+
563
+ .__link a {
564
+ color: #000;
565
+ cursor: pointer;
566
+ font-weight: 500;
567
+ }
568
+
569
+ .__slash {
570
+ margin: 0 8px;
571
+ color: #9ca3af;
572
+ }
573
+
574
+ .__active, .__link, a {
575
+ color: var(--color-primary);
576
+ cursor: default;
577
+ font-weight: 600;
578
+ }
579
+
580
+ @media (prefers-color-scheme: dark) {
581
+ .__link a {
582
+ color: #fff;
583
+ }
584
+ }
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);
589
+ return o && t && F(e, r, t), t;
590
+ };
591
+ let y = class extends m {
592
+ constructor() {
593
+ super(...arguments), this.items = [], this.color = "";
594
+ }
595
+ render() {
596
+ const i = this.color ? `--color-primary: ${this.color};` : "--color-primary: #dc2626;";
597
+ return l`
598
+ <nav aria-label="breadcrumb" style="${i}">
599
+ <ol>
600
+ ${this.items.map((e, r) => l`
601
+ <li class="${r === this.items.length - 1 ? "__active" : "__link"}">
602
+ ${e.path && r !== this.items.length - 1 ? l`<a href="${e.path}">${e.label}</a>` : e.label}
603
+ </li>
604
+ ${r < this.items.length - 1 ? l`<li class="__slash">/</li>` : ""}
605
+ `)}
606
+ </ol>
607
+ </nav>
608
+ `;
609
+ }
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`
622
+ :host {
623
+ display: block;
624
+ font-family: Arial, Helvetica, sans-serif;
625
+ }
626
+ .__btn {
627
+ display: flex;
628
+ justify-content: space-between;
629
+ align-items: center;
630
+ background: transparent;
631
+ backdrop-filter: blur(5px);
632
+ transition: background 0.2s ease, color 0.2s ease;
633
+ max-height: 200px;
634
+ min-width: 100px;
635
+ cursor: pointer;
636
+ border: none;
637
+ border-radius: 4px;
638
+ padding: 1rem;
639
+ gap: 1rem;
640
+ }
641
+
642
+ .__label {
643
+ margin: 0;
644
+ color: #fff;
645
+ }
646
+
647
+ svg {
648
+ width: 1rem;
649
+ height: 1rem;
650
+ fill: var(--svgcolor);
651
+ transform: var(--isOpenRotate);
652
+ transition: transform 0.3s;
653
+ }
654
+
655
+ .__content {
656
+ display: flex;
657
+ padding: var(--isOpenPadding);
658
+ max-height: var(--isOpenHeight);
659
+ overflow: hidden;
660
+ transition: all 0.3s ease;
661
+ opacity: var(--isOpenOpacity);
662
+ background: #f1f1f1;
663
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
664
+ flex-direction: column;
665
+ max-width: 150px;
666
+ border-radius: 4px;
667
+ }
668
+
669
+ .__category {
670
+ display: flex;
671
+ flex-direction: column;
672
+ margin-bottom: 0.5rem;
673
+ }
674
+
675
+ .__category-title {
676
+ font-size: 0.7rem;
677
+ font-weight: bold;
678
+ color: var(--svgcolor);
679
+ padding: 0.25rem 0.5rem;
680
+ text-transform: uppercase;
681
+ }
682
+
683
+ .__link {
684
+ color: #444547;
685
+ text-decoration: none;
686
+ padding: 0.5rem;
687
+ padding-left: 1rem;
688
+ border-radius: 4px;
689
+ transition: background-color 0.2s;
690
+ }
691
+
692
+ .__link:hover {
693
+ background-color: rgba(0, 0, 0, 0.05);
694
+ }
695
+
696
+ @media (prefers-color-scheme: dark) {
697
+ .__label {
698
+ color: #fff;
699
+ }
700
+
701
+ svg {
702
+ fill: var(--svgcolor);
703
+ }
704
+
705
+ .__content {
706
+ background: #131313;
707
+ }
708
+ .__link {
709
+ color: #dbdbdd;
710
+ }
711
+
712
+ .__link:hover {
713
+ background-color: rgba(255, 255, 255, 0.1);
714
+ }
715
+
716
+ .__category-title {
717
+ color: var(--svgcolor);
718
+ }
719
+
720
+ }
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;
726
+ };
727
+ let d = class extends m {
728
+ constructor() {
729
+ super(...arguments), this.label = "", this.color = "", this.bgColor = "", this.open = !1, this.items = [];
730
+ }
731
+ render() {
732
+ const i = this.open === !0;
733
+ let e = this.color ? this.color : "#dc2626", r = this.bgColor ? this.bgColor : "#dc2626";
734
+ const o = i ? `
735
+ --isOpenBgColor: ${r};
736
+ --isOpenPadding: 1rem;
737
+ --isOpenHeight: auto;
738
+ --isOpenOpacity: 1;
739
+ --isOpenRotate: rotate(180deg);` : `
740
+ --isOpenPadding: 0;
741
+ --isOpenHeight: 0;
742
+ --isOpenOpacity: 0;
743
+ --isOpenRotate: rotate(0);`, t = `--svgcolor: ${e};`, s = o + t;
744
+ return l`
745
+ <button class="__btn" @click="${this._changeIsOpen}" style="${t}">
746
+ <span class="__label">${this.label}</span>
747
+
748
+ <div class="__icon">
749
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512" x="0" y="0" viewBox="0 0 451.847 451.847" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g><path d="M225.923 354.706c-8.098 0-16.195-3.092-22.369-9.263L9.27 151.157c-12.359-12.359-12.359-32.397 0-44.751 12.354-12.354 32.388-12.354 44.748 0l171.905 171.915 171.906-171.909c12.359-12.354 32.391-12.354 44.744 0 12.365 12.354 12.365 32.392 0 44.751L248.292 345.449c-6.177 6.172-14.274 9.257-22.369 9.257z" opacity="1" data-original="#000000" class=""></path></g></svg>
750
+ </div>
751
+ </button>
752
+
753
+ <div class="__content" style="${s}">
754
+ ${this.items.map((n) => "category" in n ? l`
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>
759
+ `)}
760
+ </div>
761
+ ` : l`<a href="${n.path || "#"}" title="${n.label}" aria-label="${n.label}" class="__link">${n.label}</a>`)}
762
+ </div>
763
+ </div>
764
+ `;
765
+ }
766
+ _changeIsOpen() {
767
+ this.open = !this.open;
768
+ }
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")
788
+ ], d);
789
+ const K = "0.0.1";
790
+ export {
791
+ h as SemaAccordion,
792
+ f as SemaAlerts,
793
+ y as SemaBreadcrumbs,
794
+ c as SemaButton,
795
+ d as SemaDropdown,
796
+ b as SemaFaqs,
797
+ K as version
798
+ };