@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,178 @@
|
|
|
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 OkProductCard extends LitElement {
|
|
14
|
+
static {
|
|
15
|
+
this.styles = css`
|
|
16
|
+
:host {
|
|
17
|
+
display: block;
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
--color: var(--ok-text, var(--ion-text-color, #18181b));
|
|
21
|
+
--muted: var(--ok-muted, rgba(var(--ion-text-color-rgb, 24, 24, 27), 0.62));
|
|
22
|
+
--surface: var(--ok-surface, var(--ion-card-background, var(--ion-background-color, #fff)));
|
|
23
|
+
--border: var(--ok-border, rgba(var(--ion-text-color-rgb, 24, 24, 27), 0.1));
|
|
24
|
+
--radius: var(--ok-radius, 16px);
|
|
25
|
+
--accent: var(--ion-color-primary, #1496d6);
|
|
26
|
+
font-family: var(--ok-font, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
|
|
27
|
+
}
|
|
28
|
+
.card {
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
height: 100%;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
gap: 0.45rem;
|
|
34
|
+
padding: clamp(1.1rem, 2vw, 1.5rem);
|
|
35
|
+
color: var(--color);
|
|
36
|
+
text-decoration: none;
|
|
37
|
+
background: var(--surface);
|
|
38
|
+
border: 1px solid var(--border);
|
|
39
|
+
border-radius: var(--radius);
|
|
40
|
+
position: relative;
|
|
41
|
+
transition: transform var(--ok-transition, 160ms ease), box-shadow var(--ok-transition, 160ms ease),
|
|
42
|
+
border-color var(--ok-transition, 160ms ease);
|
|
43
|
+
}
|
|
44
|
+
.card:hover {
|
|
45
|
+
transform: translateY(-3px);
|
|
46
|
+
border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
|
|
47
|
+
box-shadow: 0 18px 40px -24px color-mix(in oklab, var(--accent) 55%, transparent);
|
|
48
|
+
}
|
|
49
|
+
.top {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: space-between;
|
|
53
|
+
gap: 0.5rem;
|
|
54
|
+
}
|
|
55
|
+
.head {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: 0.6rem;
|
|
59
|
+
}
|
|
60
|
+
.ico {
|
|
61
|
+
display: inline-grid;
|
|
62
|
+
place-items: center;
|
|
63
|
+
width: 2.25rem;
|
|
64
|
+
height: 2.25rem;
|
|
65
|
+
border-radius: 11px;
|
|
66
|
+
color: var(--accent);
|
|
67
|
+
background: color-mix(in oklab, var(--accent) 13%, transparent);
|
|
68
|
+
font-size: 1.15rem;
|
|
69
|
+
flex: 0 0 auto;
|
|
70
|
+
}
|
|
71
|
+
.ico img { width: 1.2rem; height: 1.2rem; }
|
|
72
|
+
/* Glifo via máscara CSS sobre la SVG del API de Iconify (funciona en Shadow DOM). */
|
|
73
|
+
.glyph {
|
|
74
|
+
width: 1.25rem;
|
|
75
|
+
height: 1.25rem;
|
|
76
|
+
background-color: currentColor;
|
|
77
|
+
-webkit-mask: var(--u) center / contain no-repeat;
|
|
78
|
+
mask: var(--u) center / contain no-repeat;
|
|
79
|
+
}
|
|
80
|
+
.cat {
|
|
81
|
+
font-size: 0.68rem;
|
|
82
|
+
font-weight: 600;
|
|
83
|
+
letter-spacing: 0.05em;
|
|
84
|
+
text-transform: uppercase;
|
|
85
|
+
color: var(--muted);
|
|
86
|
+
}
|
|
87
|
+
.badge {
|
|
88
|
+
padding: 0.2rem 0.55rem;
|
|
89
|
+
border-radius: 999px;
|
|
90
|
+
font-size: 0.66rem;
|
|
91
|
+
font-weight: 700;
|
|
92
|
+
letter-spacing: 0.02em;
|
|
93
|
+
text-transform: uppercase;
|
|
94
|
+
color: var(--accent);
|
|
95
|
+
background: color-mix(in oklab, var(--accent) 14%, transparent);
|
|
96
|
+
white-space: nowrap;
|
|
97
|
+
}
|
|
98
|
+
.name {
|
|
99
|
+
margin: 0.3rem 0 0;
|
|
100
|
+
font-size: 1.05rem;
|
|
101
|
+
font-weight: 620;
|
|
102
|
+
letter-spacing: -0.01em;
|
|
103
|
+
line-height: 1.25;
|
|
104
|
+
}
|
|
105
|
+
.desc {
|
|
106
|
+
color: var(--muted);
|
|
107
|
+
font-size: 0.88rem;
|
|
108
|
+
line-height: 1.5;
|
|
109
|
+
flex: 1;
|
|
110
|
+
}
|
|
111
|
+
.foot {
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
justify-content: space-between;
|
|
115
|
+
margin-top: 0.6rem;
|
|
116
|
+
}
|
|
117
|
+
.price { font-weight: 650; font-size: 0.92rem; }
|
|
118
|
+
.go {
|
|
119
|
+
color: var(--accent);
|
|
120
|
+
font-size: 1.05rem;
|
|
121
|
+
opacity: 0;
|
|
122
|
+
transform: translateX(-4px);
|
|
123
|
+
transition: opacity var(--ok-transition, 160ms ease), transform var(--ok-transition, 160ms ease);
|
|
124
|
+
}
|
|
125
|
+
.card:hover .go { opacity: 1; transform: none; }
|
|
126
|
+
::slotted(*) { margin: 0; }
|
|
127
|
+
`;
|
|
128
|
+
}
|
|
129
|
+
/** "lucide:box" → "https://api.iconify.design/lucide/box.svg". */
|
|
130
|
+
iconUrl(name) {
|
|
131
|
+
const i = name.indexOf(":");
|
|
132
|
+
const prefix = i === -1 ? "lucide" : name.slice(0, i);
|
|
133
|
+
const icon = i === -1 ? name : name.slice(i + 1);
|
|
134
|
+
return `https://api.iconify.design/${prefix}/${icon}.svg`;
|
|
135
|
+
}
|
|
136
|
+
inner() {
|
|
137
|
+
return html`
|
|
138
|
+
<div class="top">
|
|
139
|
+
<div class="head">
|
|
140
|
+
${this.icon ? html`<span class="ico"><i class="glyph" style="--u:url('${this.iconUrl(this.icon)}')"></i></span>` : html`<span class="ico"><slot name="icon"></slot></span>`}
|
|
141
|
+
${this.category ? html`<span class="cat">${this.category}</span>` : null}
|
|
142
|
+
</div>
|
|
143
|
+
${this.badge ? html`<span class="badge">${this.badge}</span>` : null}
|
|
144
|
+
</div>
|
|
145
|
+
${this.name ? html`<h3 class="name">${this.name}</h3>` : null}
|
|
146
|
+
<div class="desc"><slot></slot></div>
|
|
147
|
+
${this.price || this.href ? html`<div class="foot">
|
|
148
|
+
<span class="price">${this.price ?? ""}</span>
|
|
149
|
+
${this.href ? html`<svg class="go" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M13 6l6 6-6 6" /></svg>` : null}
|
|
150
|
+
</div>` : null}
|
|
151
|
+
`;
|
|
152
|
+
}
|
|
153
|
+
render() {
|
|
154
|
+
return this.href ? html`<a class="card" href=${this.href}>${this.inner()}</a>` : html`<div class="card">${this.inner()}</div>`;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
__decorateClass([
|
|
158
|
+
property()
|
|
159
|
+
], OkProductCard.prototype, "icon");
|
|
160
|
+
__decorateClass([
|
|
161
|
+
property()
|
|
162
|
+
], OkProductCard.prototype, "category");
|
|
163
|
+
__decorateClass([
|
|
164
|
+
property()
|
|
165
|
+
], OkProductCard.prototype, "name");
|
|
166
|
+
__decorateClass([
|
|
167
|
+
property()
|
|
168
|
+
], OkProductCard.prototype, "badge");
|
|
169
|
+
__decorateClass([
|
|
170
|
+
property()
|
|
171
|
+
], OkProductCard.prototype, "price");
|
|
172
|
+
__decorateClass([
|
|
173
|
+
property()
|
|
174
|
+
], OkProductCard.prototype, "href");
|
|
175
|
+
define("ok-product-card", OkProductCard);
|
|
176
|
+
export {
|
|
177
|
+
OkProductCard
|
|
178
|
+
};
|