@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,259 @@
|
|
|
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 OkFileItem extends LitElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.name = "";
|
|
17
|
+
this.ext = "";
|
|
18
|
+
this.progress = 0;
|
|
19
|
+
this.state = "done";
|
|
20
|
+
this.removable = false;
|
|
21
|
+
}
|
|
22
|
+
static {
|
|
23
|
+
this.styles = css`
|
|
24
|
+
:host {
|
|
25
|
+
display: block;
|
|
26
|
+
width: 100%;
|
|
27
|
+
/* Tokens propios estilo Ionic: --ok-* → --ion-* → hex. */
|
|
28
|
+
--bg: var(--ok-surface-step-50, var(--ion-color-step-50, #f7f8fa));
|
|
29
|
+
--border: var(--ok-border-color, var(--ion-border-color, #e4e7ec));
|
|
30
|
+
--border-hover: var(--ok-color-step-200, var(--ion-color-step-200, #cdd1d8));
|
|
31
|
+
--radius: var(--ok-radius-md, 10px);
|
|
32
|
+
--radius-sm: var(--ok-radius-sm, 7px);
|
|
33
|
+
--ink: var(--ok-text-color, var(--ion-text-color, #1f2933));
|
|
34
|
+
--ink-2: var(--ok-color-step-600, var(--ion-color-step-600, #565a63));
|
|
35
|
+
--ink-3: var(--ok-color-medium, var(--ion-color-medium, #92949c));
|
|
36
|
+
--badge-bg: var(--ok-color-step-100, var(--ion-color-step-100, #eef0f3));
|
|
37
|
+
--brand: var(--ok-color-primary, var(--ion-color-primary, #0091ce));
|
|
38
|
+
--danger: var(--ok-color-danger, var(--ion-color-danger, #eb445a));
|
|
39
|
+
--leaf: var(--ok-color-success, var(--ion-color-success, #2dd55b));
|
|
40
|
+
--info: var(--ok-color-primary, var(--ion-color-primary, #0091ce));
|
|
41
|
+
--warn: var(--ok-color-warning, var(--ion-color-warning, #ffc409));
|
|
42
|
+
--track: var(--ok-color-step-100, var(--ion-color-step-100, #eef0f3));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.item {
|
|
46
|
+
display: grid;
|
|
47
|
+
grid-template-columns: 36px 1fr auto auto;
|
|
48
|
+
gap: 12px;
|
|
49
|
+
align-items: center;
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
padding: 10px 12px;
|
|
52
|
+
background: var(--bg);
|
|
53
|
+
border: 1px solid var(--border);
|
|
54
|
+
border-radius: var(--radius);
|
|
55
|
+
transition: border-color 0.18s ease-out;
|
|
56
|
+
}
|
|
57
|
+
.item:hover {
|
|
58
|
+
border-color: var(--border-hover);
|
|
59
|
+
}
|
|
60
|
+
.item.error {
|
|
61
|
+
border-color: var(--danger);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Badge cuadrado mono uppercase, tintado por extensión. */
|
|
65
|
+
.badge {
|
|
66
|
+
width: 36px;
|
|
67
|
+
height: 36px;
|
|
68
|
+
border-radius: var(--radius-sm);
|
|
69
|
+
display: inline-flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
background: var(--badge-bg);
|
|
73
|
+
color: var(--ink-2);
|
|
74
|
+
font-family: var(
|
|
75
|
+
--ok-font-mono,
|
|
76
|
+
ui-monospace,
|
|
77
|
+
'SFMono-Regular',
|
|
78
|
+
'Menlo',
|
|
79
|
+
'Consolas',
|
|
80
|
+
monospace
|
|
81
|
+
);
|
|
82
|
+
font-size: 10px;
|
|
83
|
+
font-weight: 600;
|
|
84
|
+
line-height: 1;
|
|
85
|
+
text-transform: uppercase;
|
|
86
|
+
letter-spacing: 0.04em;
|
|
87
|
+
}
|
|
88
|
+
.badge.pdf {
|
|
89
|
+
background: color-mix(in srgb, var(--danger) 16%, transparent);
|
|
90
|
+
color: var(--danger);
|
|
91
|
+
}
|
|
92
|
+
.badge.xls {
|
|
93
|
+
background: color-mix(in srgb, var(--leaf) 16%, transparent);
|
|
94
|
+
color: var(--leaf);
|
|
95
|
+
}
|
|
96
|
+
.badge.img {
|
|
97
|
+
background: color-mix(in srgb, var(--info) 16%, transparent);
|
|
98
|
+
color: var(--info);
|
|
99
|
+
}
|
|
100
|
+
.badge.zip {
|
|
101
|
+
background: color-mix(in srgb, var(--warn) 22%, transparent);
|
|
102
|
+
color: var(--warn);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.body {
|
|
106
|
+
min-width: 0;
|
|
107
|
+
}
|
|
108
|
+
.name {
|
|
109
|
+
font-size: 13px;
|
|
110
|
+
font-weight: 500;
|
|
111
|
+
color: var(--ink);
|
|
112
|
+
white-space: nowrap;
|
|
113
|
+
overflow: hidden;
|
|
114
|
+
text-overflow: ellipsis;
|
|
115
|
+
}
|
|
116
|
+
.meta {
|
|
117
|
+
margin-top: 1px;
|
|
118
|
+
font-size: 11.5px;
|
|
119
|
+
color: var(--ink-3);
|
|
120
|
+
font-variant-numeric: tabular-nums;
|
|
121
|
+
white-space: nowrap;
|
|
122
|
+
overflow: hidden;
|
|
123
|
+
text-overflow: ellipsis;
|
|
124
|
+
}
|
|
125
|
+
.meta.error {
|
|
126
|
+
color: var(--danger);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* Mini barra de progreso compacta (columna auto, al estilo attachment). */
|
|
130
|
+
.progress {
|
|
131
|
+
width: 80px;
|
|
132
|
+
height: 4px;
|
|
133
|
+
background: var(--track);
|
|
134
|
+
border-radius: 999px;
|
|
135
|
+
overflow: hidden;
|
|
136
|
+
}
|
|
137
|
+
.progress > i {
|
|
138
|
+
display: block;
|
|
139
|
+
height: 100%;
|
|
140
|
+
background: var(--brand);
|
|
141
|
+
border-radius: inherit;
|
|
142
|
+
transition: width 0.4s ease-out;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Botón fantasma de quitar/cancelar. */
|
|
146
|
+
.remove {
|
|
147
|
+
width: 28px;
|
|
148
|
+
height: 28px;
|
|
149
|
+
border-radius: var(--radius-sm);
|
|
150
|
+
background: transparent;
|
|
151
|
+
border: none;
|
|
152
|
+
color: var(--ink-3);
|
|
153
|
+
cursor: pointer;
|
|
154
|
+
display: inline-flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
justify-content: center;
|
|
157
|
+
padding: 0;
|
|
158
|
+
transition: background 0.15s ease-out, color 0.15s ease-out;
|
|
159
|
+
}
|
|
160
|
+
.remove:hover {
|
|
161
|
+
background: var(--badge-bg);
|
|
162
|
+
color: var(--danger);
|
|
163
|
+
}
|
|
164
|
+
.remove svg {
|
|
165
|
+
width: 16px;
|
|
166
|
+
height: 16px;
|
|
167
|
+
display: block;
|
|
168
|
+
}
|
|
169
|
+
`;
|
|
170
|
+
}
|
|
171
|
+
/** Normaliza la extensión a una de las variantes tintadas conocidas. */
|
|
172
|
+
variant() {
|
|
173
|
+
const e = this.ext.trim().toLowerCase();
|
|
174
|
+
if (!e) return "";
|
|
175
|
+
if (e === "pdf") return "pdf";
|
|
176
|
+
if (["xls", "xlsx", "csv", "ods", "numbers"].includes(e)) return "xls";
|
|
177
|
+
if (["img", "jpg", "jpeg", "png", "gif", "webp", "svg", "heic", "avif"].includes(e))
|
|
178
|
+
return "img";
|
|
179
|
+
if (["zip", "rar", "7z", "tar", "gz", "bz2"].includes(e)) return "zip";
|
|
180
|
+
return "";
|
|
181
|
+
}
|
|
182
|
+
/** Etiqueta corta para el badge (máx 4 chars). */
|
|
183
|
+
badgeLabel() {
|
|
184
|
+
const e = this.ext.trim();
|
|
185
|
+
return (e || "?").slice(0, 4).toUpperCase();
|
|
186
|
+
}
|
|
187
|
+
onRemove() {
|
|
188
|
+
this.dispatchEvent(
|
|
189
|
+
new CustomEvent("ok-remove", {
|
|
190
|
+
detail: { name: this.name, ext: this.ext, state: this.state },
|
|
191
|
+
bubbles: true,
|
|
192
|
+
composed: true
|
|
193
|
+
})
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
render() {
|
|
197
|
+
const uploading = this.state === "uploading";
|
|
198
|
+
const isError = this.state === "error";
|
|
199
|
+
const pct = Math.max(0, Math.min(100, this.progress));
|
|
200
|
+
const metaText = isError ? this.error || "Error al subir" : this.size;
|
|
201
|
+
return html`
|
|
202
|
+
<div class="item ${isError ? "error" : ""}">
|
|
203
|
+
<span class="badge ${this.variant()}" aria-hidden="true">${this.badgeLabel()}</span>
|
|
204
|
+
|
|
205
|
+
<div class="body">
|
|
206
|
+
<div class="name" title=${this.name}>${this.name}</div>
|
|
207
|
+
${metaText ? html`<div class="meta ${isError ? "error" : ""}">${metaText}</div>` : null}
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
${uploading ? html`<div
|
|
211
|
+
class="progress"
|
|
212
|
+
role="progressbar"
|
|
213
|
+
aria-valuemin="0"
|
|
214
|
+
aria-valuemax="100"
|
|
215
|
+
aria-valuenow=${pct}
|
|
216
|
+
>
|
|
217
|
+
<i style="width:${pct}%"></i>
|
|
218
|
+
</div>` : html`<span></span>`}
|
|
219
|
+
|
|
220
|
+
${this.removable ? html`<button
|
|
221
|
+
class="remove"
|
|
222
|
+
type="button"
|
|
223
|
+
aria-label=${uploading ? "Cancelar" : "Quitar"}
|
|
224
|
+
@click=${this.onRemove}
|
|
225
|
+
>
|
|
226
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
227
|
+
stroke-linecap="round">
|
|
228
|
+
<path d="M18 6 6 18M6 6l12 12" />
|
|
229
|
+
</svg>
|
|
230
|
+
</button>` : html`<span></span>`}
|
|
231
|
+
</div>
|
|
232
|
+
`;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
__decorateClass([
|
|
236
|
+
property()
|
|
237
|
+
], OkFileItem.prototype, "name");
|
|
238
|
+
__decorateClass([
|
|
239
|
+
property()
|
|
240
|
+
], OkFileItem.prototype, "size");
|
|
241
|
+
__decorateClass([
|
|
242
|
+
property()
|
|
243
|
+
], OkFileItem.prototype, "ext");
|
|
244
|
+
__decorateClass([
|
|
245
|
+
property({ type: Number })
|
|
246
|
+
], OkFileItem.prototype, "progress");
|
|
247
|
+
__decorateClass([
|
|
248
|
+
property()
|
|
249
|
+
], OkFileItem.prototype, "state");
|
|
250
|
+
__decorateClass([
|
|
251
|
+
property()
|
|
252
|
+
], OkFileItem.prototype, "error");
|
|
253
|
+
__decorateClass([
|
|
254
|
+
property({ type: Boolean })
|
|
255
|
+
], OkFileItem.prototype, "removable");
|
|
256
|
+
define("ok-file-item", OkFileItem);
|
|
257
|
+
export {
|
|
258
|
+
OkFileItem
|
|
259
|
+
};
|