@erplora/outfitkit 0.1.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/LICENSE +21 -0
- package/README.md +457 -0
- package/dist/base/anchor.d.ts +13 -0
- package/dist/base/define.d.ts +1 -0
- package/dist/base/relay.d.ts +1 -0
- package/dist/cdn.d.ts +96 -0
- package/dist/components/ok-app-launcher/ok-app-launcher.d.ts +57 -0
- package/dist/components/ok-audio/ok-audio.d.ts +45 -0
- package/dist/components/ok-avatar/ok-avatar.d.ts +36 -0
- package/dist/components/ok-avatar-group/ok-avatar-group.d.ts +38 -0
- package/dist/components/ok-bar-list/ok-bar-list.d.ts +36 -0
- package/dist/components/ok-bento/ok-bento.d.ts +17 -0
- package/dist/components/ok-bento-item/ok-bento-item.d.ts +34 -0
- package/dist/components/ok-calculator/ok-calculator.d.ts +46 -0
- package/dist/components/ok-calendar/ok-calendar.d.ts +63 -0
- package/dist/components/ok-carousel/ok-carousel.d.ts +48 -0
- package/dist/components/ok-chart/ok-chart.d.ts +55 -0
- package/dist/components/ok-chat/ok-chat.d.ts +54 -0
- package/dist/components/ok-coachmark/ok-coachmark.d.ts +69 -0
- package/dist/components/ok-code/ok-code.d.ts +28 -0
- package/dist/components/ok-color-picker/ok-color-picker.d.ts +63 -0
- package/dist/components/ok-combo/ok-combo.d.ts +46 -0
- package/dist/components/ok-command-palette/ok-command-palette.d.ts +72 -0
- package/dist/components/ok-contact-form/ok-contact-form.d.ts +54 -0
- package/dist/components/ok-cropper/ok-cropper.d.ts +60 -0
- package/dist/components/ok-cta-band/ok-cta-band.d.ts +18 -0
- package/dist/components/ok-currency/ok-currency.d.ts +31 -0
- package/dist/components/ok-data-table/ok-data-table.d.ts +312 -0
- package/dist/components/ok-date-picker/ok-date-picker.d.ts +81 -0
- package/dist/components/ok-detail-list/ok-detail-list.d.ts +30 -0
- package/dist/components/ok-diff/ok-diff.d.ts +38 -0
- package/dist/components/ok-donut/ok-donut.d.ts +38 -0
- package/dist/components/ok-drawer/ok-drawer.d.ts +56 -0
- package/dist/components/ok-dropzone/ok-dropzone.d.ts +48 -0
- package/dist/components/ok-empty-state/ok-empty-state.d.ts +16 -0
- package/dist/components/ok-error-page/ok-error-page.d.ts +77 -0
- package/dist/components/ok-event-card/ok-event-card.d.ts +56 -0
- package/dist/components/ok-feature-card/ok-feature-card.d.ts +23 -0
- package/dist/components/ok-file-item/ok-file-item.d.ts +31 -0
- package/dist/components/ok-file-manager/ok-file-manager.d.ts +145 -0
- package/dist/components/ok-footer/ok-footer.d.ts +10 -0
- package/dist/components/ok-funnel/ok-funnel.d.ts +31 -0
- package/dist/components/ok-gallery/ok-gallery.d.ts +34 -0
- package/dist/components/ok-gauge/ok-gauge.d.ts +49 -0
- package/dist/components/ok-heatmap/ok-heatmap.d.ts +45 -0
- package/dist/components/ok-hero/ok-hero.d.ts +10 -0
- package/dist/components/ok-hover-card/ok-hover-card.d.ts +76 -0
- package/dist/components/ok-icon-tile/ok-icon-tile.d.ts +24 -0
- package/dist/components/ok-image/ok-image.d.ts +56 -0
- package/dist/components/ok-inline-feedback/ok-inline-feedback.d.ts +33 -0
- package/dist/components/ok-invoice/ok-invoice.d.ts +137 -0
- package/dist/components/ok-json-viewer/ok-json-viewer.d.ts +31 -0
- package/dist/components/ok-kanban/ok-kanban.d.ts +56 -0
- package/dist/components/ok-kbd/ok-kbd.d.ts +21 -0
- package/dist/components/ok-keyboard/ok-keyboard.d.ts +35 -0
- package/dist/components/ok-kpi/ok-kpi.d.ts +24 -0
- package/dist/components/ok-language-select/ok-language-select.d.ts +31 -0
- package/dist/components/ok-lightbox/ok-lightbox.d.ts +59 -0
- package/dist/components/ok-logo-cloud/ok-logo-cloud.d.ts +14 -0
- package/dist/components/ok-loyalty-card/ok-loyalty-card.d.ts +35 -0
- package/dist/components/ok-mail/ok-mail.d.ts +117 -0
- package/dist/components/ok-menu/ok-menu.d.ts +75 -0
- package/dist/components/ok-menubar/ok-menubar.d.ts +75 -0
- package/dist/components/ok-navbar/ok-navbar.d.ts +42 -0
- package/dist/components/ok-notification-center/ok-notification-center.d.ts +79 -0
- package/dist/components/ok-org-chart/ok-org-chart.d.ts +67 -0
- package/dist/components/ok-otp/ok-otp.d.ts +31 -0
- package/dist/components/ok-page-header/ok-page-header.d.ts +23 -0
- package/dist/components/ok-pagination/ok-pagination.d.ts +44 -0
- package/dist/components/ok-pdf/ok-pdf.d.ts +32 -0
- package/dist/components/ok-phone/ok-phone.d.ts +48 -0
- package/dist/components/ok-pinpad/ok-pinpad.d.ts +29 -0
- package/dist/components/ok-pricing-card/ok-pricing-card.d.ts +31 -0
- package/dist/components/ok-product-card/ok-product-card.d.ts +25 -0
- package/dist/components/ok-qr/ok-qr.d.ts +24 -0
- package/dist/components/ok-qty-stepper/ok-qty-stepper.d.ts +35 -0
- package/dist/components/ok-range-dual/ok-range-dual.d.ts +38 -0
- package/dist/components/ok-rating/ok-rating.d.ts +33 -0
- package/dist/components/ok-receipt/ok-receipt.d.ts +103 -0
- package/dist/components/ok-reveal/ok-reveal.d.ts +21 -0
- package/dist/components/ok-rich-text/ok-rich-text.d.ts +46 -0
- package/dist/components/ok-scheduler/ok-scheduler.d.ts +74 -0
- package/dist/components/ok-select-card/ok-select-card.d.ts +37 -0
- package/dist/components/ok-signature/ok-signature.d.ts +55 -0
- package/dist/components/ok-skeleton/ok-skeleton.d.ts +40 -0
- package/dist/components/ok-sparkline/ok-sparkline.d.ts +27 -0
- package/dist/components/ok-split-button/ok-split-button.d.ts +49 -0
- package/dist/components/ok-splitter/ok-splitter.d.ts +36 -0
- package/dist/components/ok-stat/ok-stat.d.ts +16 -0
- package/dist/components/ok-status-dot/ok-status-dot.d.ts +24 -0
- package/dist/components/ok-status-pill/ok-status-pill.d.ts +22 -0
- package/dist/components/ok-stepper/ok-stepper.d.ts +33 -0
- package/dist/components/ok-store/ok-store.d.ts +33 -0
- package/dist/components/ok-tag-input/ok-tag-input.d.ts +39 -0
- package/dist/components/ok-testimonial/ok-testimonial.d.ts +21 -0
- package/dist/components/ok-time-picker/ok-time-picker.d.ts +50 -0
- package/dist/components/ok-timeline/ok-timeline.d.ts +33 -0
- package/dist/components/ok-tree/ok-tree.d.ts +46 -0
- package/dist/components/ok-video/ok-video.d.ts +49 -0
- package/dist/components/ok-widget-board/ok-widget-board.d.ts +71 -0
- package/dist/components/ok-wizard/ok-wizard.d.ts +30 -0
- package/dist/define.js +8 -0
- package/dist/erplora.css +112 -0
- package/dist/index.d.ts +158 -0
- package/dist/index.js +197 -0
- package/dist/layout.css +338 -0
- package/dist/ok-app-launcher.js +396 -0
- package/dist/ok-audio.js +308 -0
- package/dist/ok-avatar-group.js +158 -0
- package/dist/ok-avatar.js +179 -0
- package/dist/ok-bar-list.js +189 -0
- package/dist/ok-bento-item.js +168 -0
- package/dist/ok-bento.js +63 -0
- package/dist/ok-calculator.js +406 -0
- package/dist/ok-calendar.js +541 -0
- package/dist/ok-carousel.js +352 -0
- package/dist/ok-chart.js +325 -0
- package/dist/ok-chat.js +320 -0
- package/dist/ok-coachmark.js +500 -0
- package/dist/ok-code.js +190 -0
- package/dist/ok-color-picker.js +569 -0
- package/dist/ok-combo.js +294 -0
- package/dist/ok-command-palette.js +448 -0
- package/dist/ok-contact-form.js +288 -0
- package/dist/ok-cropper.js +404 -0
- package/dist/ok-cta-band.js +134 -0
- package/dist/ok-currency.js +172 -0
- package/dist/ok-data-table.js +1281 -0
- package/dist/ok-date-picker.js +736 -0
- package/dist/ok-detail-list.js +156 -0
- package/dist/ok-diff.js +200 -0
- package/dist/ok-donut.js +280 -0
- package/dist/ok-drawer.js +357 -0
- package/dist/ok-dropzone.js +376 -0
- package/dist/ok-empty-state.js +104 -0
- package/dist/ok-error-page.js +547 -0
- package/dist/ok-event-card.js +384 -0
- package/dist/ok-feature-card.js +152 -0
- package/dist/ok-file-item.js +259 -0
- package/dist/ok-file-manager.js +1116 -0
- package/dist/ok-footer.js +67 -0
- package/dist/ok-funnel.js +181 -0
- package/dist/ok-gallery.js +293 -0
- package/dist/ok-gauge.js +385 -0
- package/dist/ok-heatmap.js +268 -0
- package/dist/ok-hero.js +43 -0
- package/dist/ok-hover-card.js +480 -0
- package/dist/ok-icon-tile.js +123 -0
- package/dist/ok-image.js +471 -0
- package/dist/ok-inline-feedback.js +221 -0
- package/dist/ok-invoice.js +229 -0
- package/dist/ok-json-viewer.js +330 -0
- package/dist/ok-kanban.js +427 -0
- package/dist/ok-kbd.js +159 -0
- package/dist/ok-keyboard.js +402 -0
- package/dist/ok-kpi.js +147 -0
- package/dist/ok-language-select.js +188 -0
- package/dist/ok-lightbox.js +490 -0
- package/dist/ok-logo-cloud.js +92 -0
- package/dist/ok-loyalty-card.js +353 -0
- package/dist/ok-mail.js +562 -0
- package/dist/ok-menu.js +529 -0
- package/dist/ok-menubar.js +628 -0
- package/dist/ok-navbar.js +306 -0
- package/dist/ok-notification-center.js +545 -0
- package/dist/ok-org-chart.js +619 -0
- package/dist/ok-otp.js +199 -0
- package/dist/ok-page-header.js +202 -0
- package/dist/ok-pagination.js +366 -0
- package/dist/ok-pdf.js +160 -0
- package/dist/ok-phone.js +225 -0
- package/dist/ok-pinpad.js +171 -0
- package/dist/ok-pricing-card.js +184 -0
- package/dist/ok-product-card.js +178 -0
- package/dist/ok-qr.js +652 -0
- package/dist/ok-qty-stepper.js +212 -0
- package/dist/ok-range-dual.js +280 -0
- package/dist/ok-rating.js +199 -0
- package/dist/ok-receipt.js +183 -0
- package/dist/ok-reveal.js +94 -0
- package/dist/ok-rich-text.js +538 -0
- package/dist/ok-scheduler.js +518 -0
- package/dist/ok-select-card.js +231 -0
- package/dist/ok-signature.js +267 -0
- package/dist/ok-skeleton.js +345 -0
- package/dist/ok-sparkline.js +150 -0
- package/dist/ok-split-button.js +251 -0
- package/dist/ok-splitter.js +289 -0
- package/dist/ok-stat.js +77 -0
- package/dist/ok-status-dot.js +163 -0
- package/dist/ok-status-pill.js +123 -0
- package/dist/ok-stepper.js +299 -0
- package/dist/ok-store.js +83 -0
- package/dist/ok-tag-input.js +358 -0
- package/dist/ok-testimonial.js +136 -0
- package/dist/ok-time-picker.js +472 -0
- package/dist/ok-timeline.js +251 -0
- package/dist/ok-tree.js +266 -0
- package/dist/ok-video.js +362 -0
- package/dist/ok-widget-board.js +265 -0
- package/dist/ok-wizard.js +153 -0
- package/dist/outfitkit.js +96 -0
- package/dist/shared/anchor.js +14 -0
- package/dist/store/controller.d.ts +17 -0
- package/dist/store/idb.d.ts +16 -0
- package/dist/store/store.d.ts +39 -0
- package/dist/store-controller.js +31 -0
- package/dist/store.js +182 -0
- package/dist/theme.example.css +70 -0
- package/package.json +147 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { LitElement, css, html } from "lit";
|
|
2
|
+
import { property } from "lit/decorators.js";
|
|
3
|
+
import { define } from "./define.js";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
|
+
var result = void 0;
|
|
7
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8
|
+
if (decorator = decorators[i])
|
|
9
|
+
result = decorator(target, key, result) || result;
|
|
10
|
+
if (result) __defProp(target, key, result);
|
|
11
|
+
return result;
|
|
12
|
+
};
|
|
13
|
+
class OkLogoCloud extends LitElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.marquee = false;
|
|
17
|
+
}
|
|
18
|
+
static {
|
|
19
|
+
this.styles = css`
|
|
20
|
+
:host {
|
|
21
|
+
display: block;
|
|
22
|
+
width: 100%;
|
|
23
|
+
--muted: var(--ok-muted, rgba(var(--ion-text-color-rgb, 24, 24, 27), 0.55));
|
|
24
|
+
font-family: var(--ok-font, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
|
|
25
|
+
}
|
|
26
|
+
.label {
|
|
27
|
+
text-align: center;
|
|
28
|
+
font-size: 0.75rem;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
letter-spacing: 0.08em;
|
|
31
|
+
text-transform: uppercase;
|
|
32
|
+
color: var(--muted);
|
|
33
|
+
margin-bottom: 1.5rem;
|
|
34
|
+
}
|
|
35
|
+
.row {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-wrap: wrap;
|
|
38
|
+
align-items: center;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
gap: clamp(1.5rem, 5vw, 3.5rem);
|
|
41
|
+
}
|
|
42
|
+
::slotted(*) {
|
|
43
|
+
opacity: 0.55;
|
|
44
|
+
filter: grayscale(1);
|
|
45
|
+
transition: opacity var(--ok-transition, 200ms ease), filter var(--ok-transition, 200ms ease);
|
|
46
|
+
max-height: var(--ok-logo-height, 30px);
|
|
47
|
+
width: auto;
|
|
48
|
+
font-weight: 650;
|
|
49
|
+
font-size: 1.1rem;
|
|
50
|
+
color: var(--ok-text, var(--ion-text-color, #18181b));
|
|
51
|
+
}
|
|
52
|
+
::slotted(*:hover) {
|
|
53
|
+
opacity: 1;
|
|
54
|
+
filter: grayscale(0);
|
|
55
|
+
}
|
|
56
|
+
/* Marquee: track en bucle. Para continuidad perfecta duplica los logos en el HTML. */
|
|
57
|
+
:host([marquee]) .viewport {
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
-webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
|
|
60
|
+
mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
|
|
61
|
+
}
|
|
62
|
+
:host([marquee]) .row {
|
|
63
|
+
flex-wrap: nowrap;
|
|
64
|
+
width: max-content;
|
|
65
|
+
animation: scroll var(--ok-marquee-duration, 28s) linear infinite;
|
|
66
|
+
}
|
|
67
|
+
@keyframes scroll {
|
|
68
|
+
from { transform: translateX(0); }
|
|
69
|
+
to { transform: translateX(-50%); }
|
|
70
|
+
}
|
|
71
|
+
@media (prefers-reduced-motion: reduce) {
|
|
72
|
+
:host([marquee]) .row { animation: none; flex-wrap: wrap; }
|
|
73
|
+
}
|
|
74
|
+
`;
|
|
75
|
+
}
|
|
76
|
+
render() {
|
|
77
|
+
return html`
|
|
78
|
+
${this.label ? html`<div class="label">${this.label}</div>` : null}
|
|
79
|
+
<div class="viewport"><div class="row"><slot></slot></div></div>
|
|
80
|
+
`;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
__decorateClass([
|
|
84
|
+
property()
|
|
85
|
+
], OkLogoCloud.prototype, "label");
|
|
86
|
+
__decorateClass([
|
|
87
|
+
property({ type: Boolean, reflect: true })
|
|
88
|
+
], OkLogoCloud.prototype, "marquee");
|
|
89
|
+
define("ok-logo-cloud", OkLogoCloud);
|
|
90
|
+
export {
|
|
91
|
+
OkLogoCloud
|
|
92
|
+
};
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import { LitElement, css, html } from "lit";
|
|
2
|
+
import { property } from "lit/decorators.js";
|
|
3
|
+
import { define } from "./define.js";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
|
+
var result = void 0;
|
|
7
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8
|
+
if (decorator = decorators[i])
|
|
9
|
+
result = decorator(target, key, result) || result;
|
|
10
|
+
if (result) __defProp(target, key, result);
|
|
11
|
+
return result;
|
|
12
|
+
};
|
|
13
|
+
class OkLoyaltyCard extends LitElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.pointsLabel = "Reward points";
|
|
17
|
+
this.brand = "";
|
|
18
|
+
this.tier = "brand";
|
|
19
|
+
this.metaLabel = "Member since";
|
|
20
|
+
this.size = "md";
|
|
21
|
+
}
|
|
22
|
+
static {
|
|
23
|
+
this.styles = css`
|
|
24
|
+
:host {
|
|
25
|
+
display: block;
|
|
26
|
+
width: 100%;
|
|
27
|
+
/* Tokens propios estilo Ionic (overridables): --ok-* → --ion-* → hex. */
|
|
28
|
+
--brand-a: var(--ok-color-primary-shade, var(--ion-color-primary-shade, #b83a12));
|
|
29
|
+
--brand-b: var(--ok-color-primary, var(--ion-color-primary, #e8552a));
|
|
30
|
+
--brand-fg: var(--ok-color-primary-contrast, var(--ion-color-primary-contrast, #ffffff));
|
|
31
|
+
--radius: var(--ok-radius-xl, 18px);
|
|
32
|
+
--shadow: var(--ok-shadow-md, 0 8px 24px rgba(0, 0, 0, 0.18));
|
|
33
|
+
/* Paleta de tiers (defaults del diseño original). */
|
|
34
|
+
--tier-silver-a: #6e6e74;
|
|
35
|
+
--tier-silver-b: #b4b6bb;
|
|
36
|
+
--tier-silver-fg: #1a1a1c;
|
|
37
|
+
--tier-gold-a: #8a6418;
|
|
38
|
+
--tier-gold-b: #e6c159;
|
|
39
|
+
--tier-gold-fg: #2a1d05;
|
|
40
|
+
--tier-platinum-a: #1f2024;
|
|
41
|
+
--tier-platinum-b: #4a4d56;
|
|
42
|
+
--tier-platinum-fg: #f0f1f3;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.card {
|
|
46
|
+
/* Variables internas resueltas por la variante de tier. */
|
|
47
|
+
--grad-a: var(--brand-a);
|
|
48
|
+
--grad-b: var(--brand-b);
|
|
49
|
+
--fg: var(--brand-fg);
|
|
50
|
+
--w: 340px;
|
|
51
|
+
--h: 210px;
|
|
52
|
+
--pad: 1.25rem;
|
|
53
|
+
--num-size: 1.125rem;
|
|
54
|
+
--points-size: 1.5rem;
|
|
55
|
+
|
|
56
|
+
position: relative;
|
|
57
|
+
width: var(--w);
|
|
58
|
+
height: var(--h);
|
|
59
|
+
max-width: 100%;
|
|
60
|
+
box-sizing: border-box;
|
|
61
|
+
border-radius: var(--radius);
|
|
62
|
+
padding: var(--pad);
|
|
63
|
+
background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
|
|
64
|
+
color: var(--fg);
|
|
65
|
+
box-shadow: var(--shadow);
|
|
66
|
+
overflow: hidden;
|
|
67
|
+
isolation: isolate;
|
|
68
|
+
display: grid;
|
|
69
|
+
grid-template-rows: auto auto 1fr auto;
|
|
70
|
+
gap: 0.5rem;
|
|
71
|
+
font-family: var(
|
|
72
|
+
--ok-font-sans,
|
|
73
|
+
var(--ion-font-family, system-ui, -apple-system, sans-serif)
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Overlays radiales de luz (arriba-derecha) y sombra (abajo-izquierda). */
|
|
78
|
+
.card::before {
|
|
79
|
+
content: '';
|
|
80
|
+
position: absolute;
|
|
81
|
+
inset: 0;
|
|
82
|
+
background:
|
|
83
|
+
radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.18) 0%, transparent 45%),
|
|
84
|
+
radial-gradient(circle at 0% 100%, rgba(0, 0, 0, 0.22) 0%, transparent 55%);
|
|
85
|
+
z-index: -1;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.head {
|
|
89
|
+
display: flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
justify-content: space-between;
|
|
92
|
+
gap: 0.75rem;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.brand {
|
|
96
|
+
font-size: 1rem;
|
|
97
|
+
font-weight: 700;
|
|
98
|
+
letter-spacing: -0.01em;
|
|
99
|
+
text-transform: uppercase;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Chip EMV dibujado en CSS. */
|
|
103
|
+
.chip {
|
|
104
|
+
width: 36px;
|
|
105
|
+
height: 26px;
|
|
106
|
+
flex: 0 0 auto;
|
|
107
|
+
border-radius: 5px;
|
|
108
|
+
position: relative;
|
|
109
|
+
background: linear-gradient(
|
|
110
|
+
135deg,
|
|
111
|
+
rgba(255, 255, 255, 0.7),
|
|
112
|
+
rgba(255, 255, 255, 0.35)
|
|
113
|
+
);
|
|
114
|
+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
|
|
115
|
+
}
|
|
116
|
+
.chip::before,
|
|
117
|
+
.chip::after {
|
|
118
|
+
content: '';
|
|
119
|
+
position: absolute;
|
|
120
|
+
inset: 4px;
|
|
121
|
+
border: 1px solid rgba(0, 0, 0, 0.35);
|
|
122
|
+
border-radius: 2px;
|
|
123
|
+
}
|
|
124
|
+
.chip::after {
|
|
125
|
+
inset: 8px 6px;
|
|
126
|
+
border-top: 0;
|
|
127
|
+
border-bottom: 0;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.num {
|
|
131
|
+
font-family: var(--ok-font-mono, ui-monospace, 'SFMono-Regular', Menlo, monospace);
|
|
132
|
+
font-size: var(--num-size);
|
|
133
|
+
font-weight: 600;
|
|
134
|
+
letter-spacing: 0.12em;
|
|
135
|
+
word-spacing: 0.25em;
|
|
136
|
+
color: var(--fg);
|
|
137
|
+
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
|
|
138
|
+
align-self: center;
|
|
139
|
+
white-space: nowrap;
|
|
140
|
+
overflow: hidden;
|
|
141
|
+
text-overflow: ellipsis;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.points {
|
|
145
|
+
display: grid;
|
|
146
|
+
gap: 2px;
|
|
147
|
+
}
|
|
148
|
+
.points-value {
|
|
149
|
+
font-size: var(--points-size);
|
|
150
|
+
font-weight: 700;
|
|
151
|
+
letter-spacing: -0.02em;
|
|
152
|
+
font-variant-numeric: tabular-nums;
|
|
153
|
+
line-height: 1;
|
|
154
|
+
}
|
|
155
|
+
.points-label {
|
|
156
|
+
font-size: 0.625rem;
|
|
157
|
+
text-transform: uppercase;
|
|
158
|
+
letter-spacing: 0.1em;
|
|
159
|
+
opacity: 0.85;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.row {
|
|
163
|
+
display: grid;
|
|
164
|
+
grid-template-columns: 1fr auto;
|
|
165
|
+
gap: 0.75rem;
|
|
166
|
+
align-items: end;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.name {
|
|
170
|
+
font-size: 1rem;
|
|
171
|
+
font-weight: 600;
|
|
172
|
+
letter-spacing: -0.01em;
|
|
173
|
+
text-transform: uppercase;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* Badge de tier "glass". */
|
|
177
|
+
.tier-badge {
|
|
178
|
+
display: inline-flex;
|
|
179
|
+
align-items: center;
|
|
180
|
+
gap: 0.25rem;
|
|
181
|
+
margin-top: 0.25rem;
|
|
182
|
+
padding: 4px 0.5rem;
|
|
183
|
+
border-radius: 999px;
|
|
184
|
+
background: rgba(255, 255, 255, 0.22);
|
|
185
|
+
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
186
|
+
font-size: 0.625rem;
|
|
187
|
+
font-weight: 600;
|
|
188
|
+
text-transform: uppercase;
|
|
189
|
+
letter-spacing: 0.08em;
|
|
190
|
+
backdrop-filter: blur(6px);
|
|
191
|
+
-webkit-backdrop-filter: blur(6px);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.expires {
|
|
195
|
+
font-family: var(--ok-font-mono, ui-monospace, 'SFMono-Regular', Menlo, monospace);
|
|
196
|
+
font-size: 0.5625rem;
|
|
197
|
+
opacity: 0.85;
|
|
198
|
+
letter-spacing: 0.06em;
|
|
199
|
+
text-align: right;
|
|
200
|
+
}
|
|
201
|
+
.expires b {
|
|
202
|
+
display: block;
|
|
203
|
+
font-size: 0.75rem;
|
|
204
|
+
font-weight: 600;
|
|
205
|
+
letter-spacing: 0.04em;
|
|
206
|
+
margin-top: 2px;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* ── Variantes de tier ── */
|
|
210
|
+
.card.silver {
|
|
211
|
+
--grad-a: var(--tier-silver-a);
|
|
212
|
+
--grad-b: var(--tier-silver-b);
|
|
213
|
+
--fg: var(--tier-silver-fg);
|
|
214
|
+
}
|
|
215
|
+
.card.silver .tier-badge {
|
|
216
|
+
background: rgba(0, 0, 0, 0.12);
|
|
217
|
+
border-color: rgba(0, 0, 0, 0.22);
|
|
218
|
+
}
|
|
219
|
+
.card.gold {
|
|
220
|
+
--grad-a: var(--tier-gold-a);
|
|
221
|
+
--grad-b: var(--tier-gold-b);
|
|
222
|
+
--fg: var(--tier-gold-fg);
|
|
223
|
+
}
|
|
224
|
+
.card.gold .tier-badge {
|
|
225
|
+
background: rgba(0, 0, 0, 0.14);
|
|
226
|
+
border-color: rgba(0, 0, 0, 0.24);
|
|
227
|
+
}
|
|
228
|
+
.card.platinum {
|
|
229
|
+
--grad-a: var(--tier-platinum-a);
|
|
230
|
+
--grad-b: var(--tier-platinum-b);
|
|
231
|
+
--fg: var(--tier-platinum-fg);
|
|
232
|
+
}
|
|
233
|
+
/* platinum: barrido de brillo (sheen) animado. */
|
|
234
|
+
.card.platinum::after {
|
|
235
|
+
content: '';
|
|
236
|
+
position: absolute;
|
|
237
|
+
inset: 0;
|
|
238
|
+
background: linear-gradient(
|
|
239
|
+
115deg,
|
|
240
|
+
transparent 35%,
|
|
241
|
+
rgba(255, 255, 255, 0.18) 50%,
|
|
242
|
+
transparent 65%
|
|
243
|
+
);
|
|
244
|
+
pointer-events: none;
|
|
245
|
+
z-index: -1;
|
|
246
|
+
transform: translateX(-100%);
|
|
247
|
+
animation: ok-loyalty-sheen 4.5s ease-in-out infinite;
|
|
248
|
+
}
|
|
249
|
+
@keyframes ok-loyalty-sheen {
|
|
250
|
+
0%,
|
|
251
|
+
60% {
|
|
252
|
+
transform: translateX(-100%);
|
|
253
|
+
}
|
|
254
|
+
100% {
|
|
255
|
+
transform: translateX(100%);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
@media (prefers-reduced-motion: reduce) {
|
|
259
|
+
.card.platinum::after {
|
|
260
|
+
animation: none;
|
|
261
|
+
transform: none;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
.card.brand {
|
|
265
|
+
--grad-a: var(--brand-a);
|
|
266
|
+
--grad-b: var(--brand-b);
|
|
267
|
+
--fg: var(--brand-fg);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/* ── Tamaños ── */
|
|
271
|
+
.card.sm {
|
|
272
|
+
--w: 280px;
|
|
273
|
+
--h: 172px;
|
|
274
|
+
--pad: 1rem;
|
|
275
|
+
--num-size: 1rem;
|
|
276
|
+
--points-size: 1.25rem;
|
|
277
|
+
}
|
|
278
|
+
.card.lg {
|
|
279
|
+
--w: 400px;
|
|
280
|
+
--h: 250px;
|
|
281
|
+
--pad: 1.5rem;
|
|
282
|
+
--num-size: 1.25rem;
|
|
283
|
+
--points-size: 1.875rem;
|
|
284
|
+
}
|
|
285
|
+
`;
|
|
286
|
+
}
|
|
287
|
+
get badgeText() {
|
|
288
|
+
if (this.tierLabel) return this.tierLabel;
|
|
289
|
+
return this.tier.charAt(0).toUpperCase() + this.tier.slice(1);
|
|
290
|
+
}
|
|
291
|
+
render() {
|
|
292
|
+
const classes = ["card", this.tier, this.size].join(" ");
|
|
293
|
+
return html`
|
|
294
|
+
<div class=${classes} role="group" aria-label="Tarjeta de fidelización">
|
|
295
|
+
<div class="head">
|
|
296
|
+
<div class="brand">${this.brand}</div>
|
|
297
|
+
<div class="chip" aria-hidden="true"></div>
|
|
298
|
+
</div>
|
|
299
|
+
|
|
300
|
+
${this.number ? html`<div class="num">${this.number}</div>` : html`<div></div>`}
|
|
301
|
+
|
|
302
|
+
<div class="points">
|
|
303
|
+
${this.points != null && this.points !== "" ? html`<span class="points-value">${this.points}</span>` : null}
|
|
304
|
+
${this.pointsLabel ? html`<span class="points-label">${this.pointsLabel}</span>` : null}
|
|
305
|
+
</div>
|
|
306
|
+
|
|
307
|
+
<div class="row">
|
|
308
|
+
<div>
|
|
309
|
+
${this.holder ? html`<div class="name">${this.holder}</div>` : null}
|
|
310
|
+
<span class="tier-badge">${this.badgeText}</span>
|
|
311
|
+
</div>
|
|
312
|
+
${this.metaValue ? html`<div class="expires">
|
|
313
|
+
${this.metaLabel}<b>${this.metaValue}</b>
|
|
314
|
+
</div>` : null}
|
|
315
|
+
</div>
|
|
316
|
+
</div>
|
|
317
|
+
`;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
__decorateClass([
|
|
321
|
+
property()
|
|
322
|
+
], OkLoyaltyCard.prototype, "holder");
|
|
323
|
+
__decorateClass([
|
|
324
|
+
property()
|
|
325
|
+
], OkLoyaltyCard.prototype, "number");
|
|
326
|
+
__decorateClass([
|
|
327
|
+
property()
|
|
328
|
+
], OkLoyaltyCard.prototype, "points");
|
|
329
|
+
__decorateClass([
|
|
330
|
+
property({ attribute: "points-label" })
|
|
331
|
+
], OkLoyaltyCard.prototype, "pointsLabel");
|
|
332
|
+
__decorateClass([
|
|
333
|
+
property()
|
|
334
|
+
], OkLoyaltyCard.prototype, "brand");
|
|
335
|
+
__decorateClass([
|
|
336
|
+
property()
|
|
337
|
+
], OkLoyaltyCard.prototype, "tier");
|
|
338
|
+
__decorateClass([
|
|
339
|
+
property({ attribute: "tier-label" })
|
|
340
|
+
], OkLoyaltyCard.prototype, "tierLabel");
|
|
341
|
+
__decorateClass([
|
|
342
|
+
property({ attribute: "meta-label" })
|
|
343
|
+
], OkLoyaltyCard.prototype, "metaLabel");
|
|
344
|
+
__decorateClass([
|
|
345
|
+
property({ attribute: "meta-value" })
|
|
346
|
+
], OkLoyaltyCard.prototype, "metaValue");
|
|
347
|
+
__decorateClass([
|
|
348
|
+
property()
|
|
349
|
+
], OkLoyaltyCard.prototype, "size");
|
|
350
|
+
define("ok-loyalty-card", OkLoyaltyCard);
|
|
351
|
+
export {
|
|
352
|
+
OkLoyaltyCard
|
|
353
|
+
};
|