@erplora/outfitkit 0.1.13 → 0.1.15
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/base/icons.d.ts +59 -0
- package/dist/base/icons.test.d.ts +1 -0
- package/dist/components/ok-data-table/ok-data-table.d.ts +7 -0
- package/dist/components/ok-kpi/ok-kpi.d.ts +1 -1
- package/dist/ok-app-launcher.js +4 -3
- package/dist/ok-audio.js +4 -3
- package/dist/ok-calendar.js +4 -3
- package/dist/ok-carousel.js +3 -2
- package/dist/ok-chat.js +2 -1
- package/dist/ok-combo.js +2 -1
- package/dist/ok-command-palette.js +3 -2
- package/dist/ok-data-table.js +27 -16
- package/dist/ok-date-picker.js +4 -3
- package/dist/ok-drawer.js +3 -2
- package/dist/ok-dropzone.js +5 -4
- package/dist/ok-empty-state.js +2 -1
- package/dist/ok-error-page.js +2 -1
- package/dist/ok-file-manager.js +5 -4
- package/dist/ok-icon-tile.js +2 -1
- package/dist/ok-inline-feedback.js +8 -7
- package/dist/ok-kpi.js +7 -6
- package/dist/ok-lightbox.js +7 -6
- package/dist/ok-mail.js +10 -9
- package/dist/ok-menu.js +2 -1
- package/dist/ok-menubar.js +6 -5
- package/dist/ok-notification-center.js +4 -3
- package/dist/ok-pdf.js +4 -3
- package/dist/ok-pinpad.js +3 -2
- package/dist/ok-qty-stepper.js +3 -2
- package/dist/ok-rating.js +3 -2
- package/dist/ok-scheduler.js +3 -2
- package/dist/ok-select-card.js +2 -1
- package/dist/ok-signature.js +3 -2
- package/dist/ok-split-button.js +3 -2
- package/dist/ok-status-pill.js +2 -1
- package/dist/ok-stepper.js +2 -1
- package/dist/ok-tag-input.js +2 -1
- package/dist/ok-timeline.js +2 -1
- package/dist/ok-tree.js +3 -2
- package/dist/ok-video.js +5 -4
- package/dist/ok-widget-board.js +2 -1
- package/dist/outfitkit.bundle.js +3124 -3060
- package/dist/shared/icons.js +194 -0
- package/package.json +7 -2
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export declare const iconAdd: string;
|
|
2
|
+
export declare const iconAlertCircle: string;
|
|
3
|
+
export declare const iconAlertCircleOutline: string;
|
|
4
|
+
export declare const iconAppsOutline: string;
|
|
5
|
+
export declare const iconArchiveOutline: string;
|
|
6
|
+
export declare const iconArrowRedoOutline: string;
|
|
7
|
+
export declare const iconArrowUndoOutline: string;
|
|
8
|
+
export declare const iconBackspaceOutline: string;
|
|
9
|
+
export declare const iconCalendarOutline: string;
|
|
10
|
+
export declare const iconCheckmarkCircle: string;
|
|
11
|
+
export declare const iconCheckmarkOutline: string;
|
|
12
|
+
export declare const iconChevronBack: string;
|
|
13
|
+
export declare const iconChevronBackOutline: string;
|
|
14
|
+
export declare const iconChevronDownOutline: string;
|
|
15
|
+
export declare const iconChevronForward: string;
|
|
16
|
+
export declare const iconChevronForwardOutline: string;
|
|
17
|
+
export declare const iconChevronUpOutline: string;
|
|
18
|
+
export declare const iconClose: string;
|
|
19
|
+
export declare const iconCloseOutline: string;
|
|
20
|
+
export declare const iconCloudUploadOutline: string;
|
|
21
|
+
export declare const iconCreateOutline: string;
|
|
22
|
+
export declare const iconDocumentAttachOutline: string;
|
|
23
|
+
export declare const iconDocumentOutline: string;
|
|
24
|
+
export declare const iconDocumentTextOutline: string;
|
|
25
|
+
export declare const iconDownloadOutline: string;
|
|
26
|
+
export declare const iconEllipsisVertical: string;
|
|
27
|
+
export declare const iconExpandOutline: string;
|
|
28
|
+
export declare const iconFileTrayOutline: string;
|
|
29
|
+
export declare const iconFolderOpenOutline: string;
|
|
30
|
+
export declare const iconInformationCircle: string;
|
|
31
|
+
export declare const iconMenuOutline: string;
|
|
32
|
+
export declare const iconNotificationsOffOutline: string;
|
|
33
|
+
export declare const iconOpenOutline: string;
|
|
34
|
+
export declare const iconPlayOutline: string;
|
|
35
|
+
export declare const iconRemove: string;
|
|
36
|
+
export declare const iconSearchOutline: string;
|
|
37
|
+
export declare const iconSend: string;
|
|
38
|
+
export declare const iconSwapVerticalOutline: string;
|
|
39
|
+
export declare const iconTrashOutline: string;
|
|
40
|
+
export declare const iconTrendingDown: string;
|
|
41
|
+
export declare const iconTrendingUp: string;
|
|
42
|
+
export declare const iconVolumeHighOutline: string;
|
|
43
|
+
export declare const iconVolumeLowOutline: string;
|
|
44
|
+
export declare const iconVolumeMuteOutline: string;
|
|
45
|
+
export declare const iconWarning: string;
|
|
46
|
+
/**
|
|
47
|
+
* Normaliza un icono que llega como STRING: el que pasa el consumidor por prop
|
|
48
|
+
* (`<ok-kpi icon="receipt-outline">`, las rowActions de ok-data-table, los items de un menú) o el
|
|
49
|
+
* valor por defecto de una prop. Devuelve algo listo para la prop `.icon` de ion-icon:
|
|
50
|
+
*
|
|
51
|
+
* · SVG inline (`<svg …>`) → lo hornea aquí mismo a data-URI.
|
|
52
|
+
* · un nombre que OutfitKit trae → su SVG horneado (sin red, sin depender del host).
|
|
53
|
+
* · cualquier otro nombre → se devuelve tal cual: ion-icon lo resuelve contra el registro
|
|
54
|
+
* global del host (window.Ionicons.map). Es el comportamiento de siempre → no rompe a nadie.
|
|
55
|
+
*
|
|
56
|
+
* Usamos `.icon` y no `name` porque la prop `icon` de ion-icon acepta AMBOS (un data-URI lo trata
|
|
57
|
+
* como src; un nombre lo busca en el registro), mientras que `name` solo acepta nombres.
|
|
58
|
+
*/
|
|
59
|
+
export declare function okIcon(value?: string | null): string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -39,6 +39,13 @@ export interface DataTableAction {
|
|
|
39
39
|
icon?: string;
|
|
40
40
|
/** Color Ionic del botón (p.ej. 'danger', 'primary'). */
|
|
41
41
|
color?: string;
|
|
42
|
+
/** (opcional, por fila) Si devuelve `true` para una fila, el botón de esa acción se renderiza
|
|
43
|
+
* deshabilitado (`?disabled` + `aria-disabled="true"`). */
|
|
44
|
+
disabled?: (row: Record<string, unknown>) => boolean;
|
|
45
|
+
/** (opcional, por fila) Si devuelve `true` para una fila, el botón muestra un
|
|
46
|
+
* `<ion-spinner name="dots">` en lugar del icono/label Y queda deshabilitado
|
|
47
|
+
* (una acción en curso no debe ser re-clicable). */
|
|
48
|
+
loading?: (row: Record<string, unknown>) => boolean;
|
|
42
49
|
}
|
|
43
50
|
/** Acción primaria de la topbar (botón destacado). Emite el evento `primaryAction`. */
|
|
44
51
|
export interface DataTablePrimaryAction {
|
|
@@ -12,7 +12,7 @@ export declare class OkKpi extends LitElement {
|
|
|
12
12
|
trend: OkKpiTrend;
|
|
13
13
|
/** Nombre de un ion-icon opcional mostrado junto al label. */
|
|
14
14
|
icon?: string;
|
|
15
|
-
/** Devuelve el
|
|
15
|
+
/** Devuelve el icono de flecha según la tendencia (SVG horneado, ver base/icons.ts). */
|
|
16
16
|
private trendIcon;
|
|
17
17
|
render(): unknown;
|
|
18
18
|
}
|
package/dist/ok-app-launcher.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, css, render, nothing, html } from "lit";
|
|
2
2
|
import { property, state } from "lit/decorators.js";
|
|
3
3
|
import { define } from "./define.js";
|
|
4
|
+
import { o as okIcon, A as iconAppsOutline, B as iconCloseOutline } from "./shared/icons.js";
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
7
|
var result = void 0;
|
|
@@ -337,7 +338,7 @@ class OkAppLauncher extends LitElement {
|
|
|
337
338
|
@click=${() => this.selectApp(app)}
|
|
338
339
|
>
|
|
339
340
|
<span class="box">
|
|
340
|
-
${this.isResolvedSvg(icon) ? html`<ion-icon .icon=${icon}></ion-icon>` : html`<ion-icon .
|
|
341
|
+
${this.isResolvedSvg(icon) ? html`<ion-icon .icon=${icon}></ion-icon>` : html`<ion-icon .icon=${okIcon(icon)}></ion-icon>`}
|
|
341
342
|
</span>
|
|
342
343
|
<span class="label">${app.label}</span>
|
|
343
344
|
</button>`;
|
|
@@ -352,7 +353,7 @@ class OkAppLauncher extends LitElement {
|
|
|
352
353
|
aria-label=${this.t.apps}
|
|
353
354
|
@click=${() => this.toggle()}
|
|
354
355
|
>
|
|
355
|
-
<ion-icon
|
|
356
|
+
<ion-icon .icon=${iconAppsOutline}></ion-icon>
|
|
356
357
|
</button>
|
|
357
358
|
`;
|
|
358
359
|
}
|
|
@@ -370,7 +371,7 @@ class OkAppLauncher extends LitElement {
|
|
|
370
371
|
aria-label=${this.t.close}
|
|
371
372
|
@click=${() => this.close()}
|
|
372
373
|
>
|
|
373
|
-
<ion-icon
|
|
374
|
+
<ion-icon .icon=${iconCloseOutline}></ion-icon>
|
|
374
375
|
</button>
|
|
375
376
|
</div>
|
|
376
377
|
${this.apps.length ? html`<div class="grid">${this.apps.map((app) => this.renderApp(app))}</div>` : html`<div class="empty">${this.t.empty}</div>`}
|
package/dist/ok-audio.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, css, html } from "lit";
|
|
2
2
|
import { property, state, query } from "lit/decorators.js";
|
|
3
3
|
import { define } from "./define.js";
|
|
4
|
+
import { J as iconVolumeMuteOutline, K as iconVolumeLowOutline, L as iconVolumeHighOutline, o as okIcon } from "./shared/icons.js";
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
7
|
var result = void 0;
|
|
@@ -217,7 +218,7 @@ class OkAudio extends LitElement {
|
|
|
217
218
|
}
|
|
218
219
|
render() {
|
|
219
220
|
const pct = this.duration ? this.current / this.duration * 100 : 0;
|
|
220
|
-
const volIcon = this.muted || this.volume === 0 ?
|
|
221
|
+
const volIcon = this.muted || this.volume === 0 ? iconVolumeMuteOutline : this.volume < 0.5 ? iconVolumeLowOutline : iconVolumeHighOutline;
|
|
221
222
|
return html`
|
|
222
223
|
<div class="player">
|
|
223
224
|
${this.title ? html`<div class="title">${this.title}</div>` : ""}
|
|
@@ -240,7 +241,7 @@ class OkAudio extends LitElement {
|
|
|
240
241
|
>
|
|
241
242
|
<ion-icon
|
|
242
243
|
slot="icon-only"
|
|
243
|
-
|
|
244
|
+
.icon=${okIcon(this.playing ? "pause" : "play")}
|
|
244
245
|
></ion-icon>
|
|
245
246
|
</ion-button>
|
|
246
247
|
|
|
@@ -258,7 +259,7 @@ class OkAudio extends LitElement {
|
|
|
258
259
|
aria-label=${this.muted ? this.t.unmute : this.t.mute}
|
|
259
260
|
@click=${this.toggleMute}
|
|
260
261
|
>
|
|
261
|
-
<ion-icon slot="icon-only"
|
|
262
|
+
<ion-icon slot="icon-only" .icon=${okIcon(volIcon)}></ion-icon>
|
|
262
263
|
</ion-button>
|
|
263
264
|
<input
|
|
264
265
|
type="range"
|
package/dist/ok-calendar.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, css, html } from "lit";
|
|
2
2
|
import { property, state } from "lit/decorators.js";
|
|
3
3
|
import { define } from "./define.js";
|
|
4
|
+
import { q as iconChevronForwardOutline, z as iconChevronBackOutline } from "./shared/icons.js";
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
7
|
var result = void 0;
|
|
@@ -461,7 +462,7 @@ class OkCalendar extends LitElement {
|
|
|
461
462
|
(ev) => html`<div class="agenda-item" @click=${(e) => this.clickEvent(ev, e)}>
|
|
462
463
|
<span class="dot" style=${`background:${ev.color || "var(--primary-color)"}`}></span>
|
|
463
464
|
<span class="agenda-title">${ev.title}</span>
|
|
464
|
-
<ion-icon
|
|
465
|
+
<ion-icon .icon=${iconChevronForwardOutline}></ion-icon>
|
|
465
466
|
</div>`
|
|
466
467
|
)}
|
|
467
468
|
</div>`;
|
|
@@ -482,7 +483,7 @@ class OkCalendar extends LitElement {
|
|
|
482
483
|
aria-label=${this.t.prevMonth}
|
|
483
484
|
@click=${() => this.navMonth(-1)}
|
|
484
485
|
>
|
|
485
|
-
<ion-icon slot="icon-only"
|
|
486
|
+
<ion-icon slot="icon-only" .icon=${iconChevronBackOutline}></ion-icon>
|
|
486
487
|
</ion-button>
|
|
487
488
|
<span class="title">${this.monthLabel()}</span>
|
|
488
489
|
<ion-button
|
|
@@ -491,7 +492,7 @@ class OkCalendar extends LitElement {
|
|
|
491
492
|
aria-label=${this.t.nextMonth}
|
|
492
493
|
@click=${() => this.navMonth(1)}
|
|
493
494
|
>
|
|
494
|
-
<ion-icon slot="icon-only"
|
|
495
|
+
<ion-icon slot="icon-only" .icon=${iconChevronForwardOutline}></ion-icon>
|
|
495
496
|
</ion-button>
|
|
496
497
|
</div>
|
|
497
498
|
<div class="toggle" role="tablist">
|
package/dist/ok-carousel.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, css, html } from "lit";
|
|
2
2
|
import { property, state, query } from "lit/decorators.js";
|
|
3
3
|
import { define } from "./define.js";
|
|
4
|
+
import { z as iconChevronBackOutline, q as iconChevronForwardOutline } from "./shared/icons.js";
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
7
|
var result = void 0;
|
|
@@ -272,7 +273,7 @@ class OkCarousel extends LitElement {
|
|
|
272
273
|
?disabled=${n <= 1 || !this.loop && atStart}
|
|
273
274
|
@click=${() => this.prev()}
|
|
274
275
|
>
|
|
275
|
-
<ion-icon slot="icon-only"
|
|
276
|
+
<ion-icon slot="icon-only" .icon=${iconChevronBackOutline}></ion-icon>
|
|
276
277
|
</ion-button>
|
|
277
278
|
|
|
278
279
|
<div
|
|
@@ -298,7 +299,7 @@ class OkCarousel extends LitElement {
|
|
|
298
299
|
?disabled=${n <= 1 || !this.loop && atEnd}
|
|
299
300
|
@click=${() => this.next()}
|
|
300
301
|
>
|
|
301
|
-
<ion-icon slot="icon-only"
|
|
302
|
+
<ion-icon slot="icon-only" .icon=${iconChevronForwardOutline}></ion-icon>
|
|
302
303
|
</ion-button>
|
|
303
304
|
</div>
|
|
304
305
|
|
package/dist/ok-chat.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, css, html } from "lit";
|
|
2
2
|
import { property, query } from "lit/decorators.js";
|
|
3
3
|
import { define } from "./define.js";
|
|
4
|
+
import { G as iconSend } from "./shared/icons.js";
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
7
|
var result = void 0;
|
|
@@ -287,7 +288,7 @@ class OkChat extends LitElement {
|
|
|
287
288
|
aria-label=${this.t.send}
|
|
288
289
|
@click=${() => this.send()}
|
|
289
290
|
>
|
|
290
|
-
<ion-icon slot="icon-only"
|
|
291
|
+
<ion-icon slot="icon-only" .icon=${iconSend}></ion-icon>
|
|
291
292
|
</ion-button>
|
|
292
293
|
</div>`}
|
|
293
294
|
`;
|
package/dist/ok-combo.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, css, html } from "lit";
|
|
2
2
|
import { property, state } from "lit/decorators.js";
|
|
3
3
|
import { define } from "./define.js";
|
|
4
|
+
import { h as iconChevronDownOutline } from "./shared/icons.js";
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
7
|
var result = void 0;
|
|
@@ -244,7 +245,7 @@ class OkCombo extends LitElement {
|
|
|
244
245
|
@keydown=${(e) => this.handleKeydown(e)}
|
|
245
246
|
></ion-input>
|
|
246
247
|
<span class="chevron">
|
|
247
|
-
<ion-icon
|
|
248
|
+
<ion-icon .icon=${iconChevronDownOutline}></ion-icon>
|
|
248
249
|
</span>
|
|
249
250
|
${this.open ? html`<ul class="dropdown" role="listbox">
|
|
250
251
|
${items.length ? items.map(
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, css, html } from "lit";
|
|
2
2
|
import { property, state, query } from "lit/decorators.js";
|
|
3
3
|
import { define } from "./define.js";
|
|
4
|
+
import { o as okIcon, Q as iconSearchOutline } from "./shared/icons.js";
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
7
|
var result = void 0;
|
|
@@ -367,7 +368,7 @@ class OkCommandPalette extends LitElement {
|
|
|
367
368
|
}}
|
|
368
369
|
>
|
|
369
370
|
<span class="icon">
|
|
370
|
-
${cmd.icon ? html`<ion-icon .
|
|
371
|
+
${cmd.icon ? html`<ion-icon .icon=${okIcon(cmd.icon)}></ion-icon>` : ""}
|
|
371
372
|
</span>
|
|
372
373
|
<span class="body">
|
|
373
374
|
<span class="label">${cmd.label}</span>
|
|
@@ -391,7 +392,7 @@ class OkCommandPalette extends LitElement {
|
|
|
391
392
|
>
|
|
392
393
|
<div class="panel">
|
|
393
394
|
<div class="search">
|
|
394
|
-
<ion-icon
|
|
395
|
+
<ion-icon .icon=${iconSearchOutline}></ion-icon>
|
|
395
396
|
<input
|
|
396
397
|
type="text"
|
|
397
398
|
.value=${this.queryText}
|
package/dist/ok-data-table.js
CHANGED
|
@@ -3,6 +3,7 @@ import { property, state } from "lit/decorators.js";
|
|
|
3
3
|
import { repeat } from "lit/directives/repeat.js";
|
|
4
4
|
import { styleMap } from "lit/directives/style-map.js";
|
|
5
5
|
import { define } from "./define.js";
|
|
6
|
+
import { i as iconCalendarOutline, a as iconEllipsisVertical, o as okIcon, b as iconClose, c as iconChevronBack, d as iconChevronForward, e as iconFileTrayOutline, f as iconSwapVerticalOutline, g as iconChevronUpOutline, h as iconChevronDownOutline } from "./shared/icons.js";
|
|
6
7
|
var __defProp = Object.defineProperty;
|
|
7
8
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
8
9
|
var result = void 0;
|
|
@@ -304,6 +305,10 @@ class OkDataTable extends LitElement {
|
|
|
304
305
|
.empty .empty-ic { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 999px; background: var(--header-background); font-size: 26px; }
|
|
305
306
|
|
|
306
307
|
.actions { display: flex; gap: 0.25rem; justify-content: flex-end; }
|
|
308
|
+
/* Spinner de acción en curso (loading): contenido dentro del ion-button small (Ionic lo fija
|
|
309
|
+
* a 28px en el :host, por eso width/height y no font-size). Cubre tabla y tarjetas: los
|
|
310
|
+
* botones de fila siempre van dentro de .actions. */
|
|
311
|
+
.actions ion-spinner { width: 18px; height: 18px; }
|
|
307
312
|
|
|
308
313
|
/* ── Pie: contador + paginación ──────────────────────────────────────────────────────── */
|
|
309
314
|
.pager { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.55rem 1rem; border-top: 1px solid var(--border-color); background: var(--header-background); font-size: 12.5px; color: var(--color-muted); }
|
|
@@ -769,7 +774,7 @@ class OkDataTable extends LitElement {
|
|
|
769
774
|
}
|
|
770
775
|
return html`
|
|
771
776
|
<span class="tk-daterange" role="group" aria-label=${col.header}>
|
|
772
|
-
<ion-icon
|
|
777
|
+
<ion-icon .icon=${iconCalendarOutline}></ion-icon>
|
|
773
778
|
<ion-input type="date" aria-label=${this.t.fromOf.replace("{label}", col.header)} .value=${f?.from ?? ""} @ionChange=${(e) => this.onInlineRange(col, "from", e)}></ion-input>
|
|
774
779
|
<span class="arr">→</span>
|
|
775
780
|
<ion-input type="date" aria-label=${this.t.toOf.replace("{label}", col.header)} .value=${f?.to ?? ""} @ionChange=${(e) => this.onInlineRange(col, "to", e)}></ion-input>
|
|
@@ -781,7 +786,7 @@ class OkDataTable extends LitElement {
|
|
|
781
786
|
if (!this.menuActions.length) return nothing;
|
|
782
787
|
return html`
|
|
783
788
|
<ion-button class="toolbtn" fill="clear" aria-label=${this.t.moreActions} @click=${(e) => this.openMenu(e)}>
|
|
784
|
-
<ion-icon slot="icon-only"
|
|
789
|
+
<ion-icon slot="icon-only" .icon=${iconEllipsisVertical}></ion-icon>
|
|
785
790
|
</ion-button>
|
|
786
791
|
<ion-popover
|
|
787
792
|
.isOpen=${this.menuOpen}
|
|
@@ -797,7 +802,7 @@ class OkDataTable extends LitElement {
|
|
|
797
802
|
this.menuOpen = false;
|
|
798
803
|
this.emit("menuAction", { actionId: a.id });
|
|
799
804
|
}}>
|
|
800
|
-
${a.icon ? html`<ion-icon slot="start"
|
|
805
|
+
${a.icon ? html`<ion-icon slot="start" .icon=${okIcon(a.icon)} color=${a.color ?? nothing}></ion-icon>` : nothing}
|
|
801
806
|
<ion-label color=${a.color ?? nothing}>${a.label}</ion-label>
|
|
802
807
|
</ion-item>
|
|
803
808
|
`
|
|
@@ -813,16 +818,22 @@ class OkDataTable extends LitElement {
|
|
|
813
818
|
return html`
|
|
814
819
|
<div class="actions">
|
|
815
820
|
${this.actions.map(
|
|
816
|
-
(a) =>
|
|
821
|
+
(a) => {
|
|
822
|
+
const loading = a.loading?.(row) === true;
|
|
823
|
+
const disabled = loading || a.disabled?.(row) === true;
|
|
824
|
+
return html`
|
|
817
825
|
<ion-button
|
|
818
826
|
size="small"
|
|
819
827
|
fill="clear"
|
|
820
828
|
color=${a.color ?? "medium"}
|
|
829
|
+
?disabled=${disabled}
|
|
830
|
+
aria-disabled=${disabled ? "true" : nothing}
|
|
821
831
|
@click=${() => this.emit("rowAction", { actionId: a.id, row })}
|
|
822
832
|
>
|
|
823
|
-
${a.icon ? html`<ion-icon slot="icon-only"
|
|
833
|
+
${loading ? html`<ion-spinner slot="icon-only" name="dots"></ion-spinner>` : a.icon ? html`<ion-icon slot="icon-only" .icon=${okIcon(a.icon)}></ion-icon>` : a.label}
|
|
824
834
|
</ion-button>
|
|
825
|
-
|
|
835
|
+
`;
|
|
836
|
+
}
|
|
826
837
|
)}
|
|
827
838
|
</div>
|
|
828
839
|
`;
|
|
@@ -832,7 +843,7 @@ class OkDataTable extends LitElement {
|
|
|
832
843
|
toolButton(icon, on, onClick, label, badge) {
|
|
833
844
|
return html`
|
|
834
845
|
<ion-button class="toolbtn" size="small" fill=${on ? "solid" : "outline"} title=${label} aria-label=${label} @click=${onClick}>
|
|
835
|
-
<ion-icon slot="icon-only"
|
|
846
|
+
<ion-icon slot="icon-only" .icon=${okIcon(icon)}></ion-icon>
|
|
836
847
|
${badge && badge > 0 ? html`<span class="badge">${badge}</span>` : nothing}
|
|
837
848
|
</ion-button>
|
|
838
849
|
`;
|
|
@@ -948,7 +959,7 @@ class OkDataTable extends LitElement {
|
|
|
948
959
|
title=${this.primaryAction.label}
|
|
949
960
|
aria-label=${this.primaryAction.label}
|
|
950
961
|
@click=${() => this.emit("primaryAction", {})}
|
|
951
|
-
><ion-icon slot="icon-only"
|
|
962
|
+
><ion-icon slot="icon-only" .icon=${okIcon(this.primaryAction.icon ?? "add")}></ion-icon></ion-button>
|
|
952
963
|
` : nothing}
|
|
953
964
|
<!-- El módulo proyecta aquí acciones globales adicionales. -->
|
|
954
965
|
<slot name="toolbar"></slot>
|
|
@@ -957,7 +968,7 @@ class OkDataTable extends LitElement {
|
|
|
957
968
|
<div class="selbar">
|
|
958
969
|
<strong>${this.t.selected.replace("{n}", String(selCount))}</strong>
|
|
959
970
|
<button class="sel-clear" @click=${() => this.setSelection(/* @__PURE__ */ new Set())}>
|
|
960
|
-
<ion-icon
|
|
971
|
+
<ion-icon .icon=${iconClose} style="font-size:14px"></ion-icon> ${this.t.clear}
|
|
961
972
|
</button>
|
|
962
973
|
</div>
|
|
963
974
|
` : nothing}
|
|
@@ -981,11 +992,11 @@ class OkDataTable extends LitElement {
|
|
|
981
992
|
</div>
|
|
982
993
|
${pages > 1 ? html`
|
|
983
994
|
<div class="nav">
|
|
984
|
-
<ion-button size="small" fill="clear" ?disabled=${current === 0} @click=${() => goTo(current - 1)}><ion-icon slot="icon-only"
|
|
995
|
+
<ion-button size="small" fill="clear" ?disabled=${current === 0} @click=${() => goTo(current - 1)}><ion-icon slot="icon-only" .icon=${iconChevronBack}></ion-icon></ion-button>
|
|
985
996
|
${this.pageList(current + 1, pages).map(
|
|
986
997
|
(p) => p === "…" ? html`<span class="pgap">…</span>` : html`<button class=${`pnum${p === current + 1 ? " on" : ""}`} @click=${() => goTo(p - 1)}>${p}</button>`
|
|
987
998
|
)}
|
|
988
|
-
<ion-button size="small" fill="clear" ?disabled=${current >= pages - 1} @click=${() => goTo(current + 1)}><ion-icon slot="icon-only"
|
|
999
|
+
<ion-button size="small" fill="clear" ?disabled=${current >= pages - 1} @click=${() => goTo(current + 1)}><ion-icon slot="icon-only" .icon=${iconChevronForward}></ion-icon></ion-button>
|
|
989
1000
|
</div>
|
|
990
1001
|
` : nothing}
|
|
991
1002
|
</div>
|
|
@@ -1004,7 +1015,7 @@ class OkDataTable extends LitElement {
|
|
|
1004
1015
|
<aside class="drawer" role="dialog" aria-label=${isFilters ? this.t.filters : this.t.form}>
|
|
1005
1016
|
<header class="dh">
|
|
1006
1017
|
<strong>${isFilters ? this.t.filters : this.t.newRecord}</strong>
|
|
1007
|
-
<ion-button fill="clear" size="small" aria-label=${this.t.close} @click=${() => this.close()}><ion-icon slot="icon-only"
|
|
1018
|
+
<ion-button fill="clear" size="small" aria-label=${this.t.close} @click=${() => this.close()}><ion-icon slot="icon-only" .icon=${iconClose}></ion-icon></ion-button>
|
|
1008
1019
|
</header>
|
|
1009
1020
|
<div class="db">
|
|
1010
1021
|
${isFilters ? clientFilters ? this.filterColumns.map((c) => this.renderClientFilter(c)) : this.filterColumns.map((c) => html`<div class="fblock">${this.renderFilterControl(c)}</div>`) : html`<slot name="create"></slot>`}
|
|
@@ -1056,7 +1067,7 @@ class OkDataTable extends LitElement {
|
|
|
1056
1067
|
emptyState() {
|
|
1057
1068
|
return html`
|
|
1058
1069
|
<div class="empty">
|
|
1059
|
-
<span class="empty-ic"><ion-icon
|
|
1070
|
+
<span class="empty-ic"><ion-icon .icon=${iconFileTrayOutline}></ion-icon></span>
|
|
1060
1071
|
<span>${this.effEmptyMessage}</span>
|
|
1061
1072
|
</div>
|
|
1062
1073
|
`;
|
|
@@ -1078,7 +1089,7 @@ class OkDataTable extends LitElement {
|
|
|
1078
1089
|
const sortable = this.isSortable(c);
|
|
1079
1090
|
const active = sortable && (this.serverSide ? this.sort === c.key : this.clientSort === c.key);
|
|
1080
1091
|
const dir = this.serverSide ? this.sortDir : this.clientSortDir;
|
|
1081
|
-
const caretIcon = !active ?
|
|
1092
|
+
const caretIcon = !active ? iconSwapVerticalOutline : dir === "asc" ? iconChevronUpOutline : iconChevronDownOutline;
|
|
1082
1093
|
return html`
|
|
1083
1094
|
<div
|
|
1084
1095
|
class=${`gcell gh ${alignCls(c.align)}${sortable ? " sortable" : ""}`}
|
|
@@ -1086,7 +1097,7 @@ class OkDataTable extends LitElement {
|
|
|
1086
1097
|
@click=${() => this.onHeaderClick(c)}
|
|
1087
1098
|
>
|
|
1088
1099
|
<span>${c.header}</span>
|
|
1089
|
-
${sortable ? html`<span class=${`caret${active ? " on" : ""}`}><ion-icon
|
|
1100
|
+
${sortable ? html`<span class=${`caret${active ? " on" : ""}`}><ion-icon .icon=${okIcon(caretIcon)}></ion-icon></span>` : nothing}
|
|
1090
1101
|
</div>
|
|
1091
1102
|
`;
|
|
1092
1103
|
})}
|
|
@@ -1131,7 +1142,7 @@ class OkDataTable extends LitElement {
|
|
|
1131
1142
|
<ion-card class=${`rcard${selected ? " selected" : ""}`}>
|
|
1132
1143
|
${hasHead ? html`
|
|
1133
1144
|
<ion-card-header class="rcard-head">
|
|
1134
|
-
${icon != null && icon !== "" ? html`<span class="rc-icon">${typeof icon === "string" ? html`<ion-icon
|
|
1145
|
+
${icon != null && icon !== "" ? html`<span class="rc-icon">${typeof icon === "string" ? html`<ion-icon .icon=${okIcon(icon)}></ion-icon>` : icon}</span>` : nothing}
|
|
1135
1146
|
<span class="rc-title">${this.cardTitle ? this.cardTitle(row) : nothing}</span>
|
|
1136
1147
|
${this.selectable ? html`<ion-checkbox .checked=${selected} aria-label=${this.t.select} @ionChange=${() => this.toggleRow(key)}></ion-checkbox>` : nothing}
|
|
1137
1148
|
</ion-card-header>
|
package/dist/ok-date-picker.js
CHANGED
|
@@ -2,6 +2,7 @@ import { LitElement, css, nothing, html } from "lit";
|
|
|
2
2
|
import { property, state } from "lit/decorators.js";
|
|
3
3
|
import { define } from "./define.js";
|
|
4
4
|
import { c as computeAnchor } from "./shared/anchor.js";
|
|
5
|
+
import { i as iconCalendarOutline, z as iconChevronBackOutline, q as iconChevronForwardOutline } from "./shared/icons.js";
|
|
5
6
|
var __defProp = Object.defineProperty;
|
|
6
7
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
7
8
|
var result = void 0;
|
|
@@ -533,7 +534,7 @@ class OkDatePicker extends LitElement {
|
|
|
533
534
|
aria-label=${label || this.t.open}
|
|
534
535
|
@click=${() => this.toggle()}
|
|
535
536
|
>
|
|
536
|
-
<ion-icon
|
|
537
|
+
<ion-icon .icon=${iconCalendarOutline}></ion-icon>
|
|
537
538
|
<span class="label ${label ? "" : "placeholder"}">${label || this.placeholder}</span>
|
|
538
539
|
</button>
|
|
539
540
|
${this.open ? html`<div
|
|
@@ -573,7 +574,7 @@ class OkDatePicker extends LitElement {
|
|
|
573
574
|
aria-label=${this.t.prev}
|
|
574
575
|
@click=${() => this.prevMonth()}
|
|
575
576
|
>
|
|
576
|
-
<ion-icon
|
|
577
|
+
<ion-icon .icon=${iconChevronBackOutline}></ion-icon>
|
|
577
578
|
</button>` : html`<span style="width:28px"></span>`}
|
|
578
579
|
<span class="title">${title}</span>
|
|
579
580
|
${offset === (this.months === 2 ? 1 : 0) ? html`<button
|
|
@@ -582,7 +583,7 @@ class OkDatePicker extends LitElement {
|
|
|
582
583
|
aria-label=${this.t.next}
|
|
583
584
|
@click=${() => this.nextMonth()}
|
|
584
585
|
>
|
|
585
|
-
<ion-icon
|
|
586
|
+
<ion-icon .icon=${iconChevronForwardOutline}></ion-icon>
|
|
586
587
|
</button>` : html`<span style="width:28px"></span>`}
|
|
587
588
|
</div>
|
|
588
589
|
<div class="grid" role="grid">
|
package/dist/ok-drawer.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, css, html } from "lit";
|
|
2
2
|
import { property, query } from "lit/decorators.js";
|
|
3
3
|
import { define } from "./define.js";
|
|
4
|
+
import { o as okIcon, B as iconCloseOutline } from "./shared/icons.js";
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
7
|
var result = void 0;
|
|
@@ -301,7 +302,7 @@ class OkDrawer extends LitElement {
|
|
|
301
302
|
tabindex="-1"
|
|
302
303
|
>
|
|
303
304
|
<header class="header">
|
|
304
|
-
${this.icon ? html`<ion-icon .
|
|
305
|
+
${this.icon ? html`<ion-icon .icon=${okIcon(this.icon)} aria-hidden="true"></ion-icon>` : ""}
|
|
305
306
|
${this.heading ? html`<h2 class="heading">${this.heading}</h2>` : html`<span class="heading"></span>`}
|
|
306
307
|
<div class="header-actions">
|
|
307
308
|
<slot name="header-actions"></slot>
|
|
@@ -312,7 +313,7 @@ class OkDrawer extends LitElement {
|
|
|
312
313
|
title=${this.t.close}
|
|
313
314
|
@click=${() => this.requestClose("button")}
|
|
314
315
|
>
|
|
315
|
-
<ion-icon
|
|
316
|
+
<ion-icon .icon=${iconCloseOutline} aria-hidden="true"></ion-icon>
|
|
316
317
|
</button>` : ""}
|
|
317
318
|
</div>
|
|
318
319
|
</header>
|
package/dist/ok-dropzone.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, css, html } from "lit";
|
|
2
2
|
import { property, state, query } from "lit/decorators.js";
|
|
3
3
|
import { define } from "./define.js";
|
|
4
|
+
import { D as iconCloudUploadOutline, E as iconAlertCircleOutline, F as iconDocumentOutline, B as iconCloseOutline } from "./shared/icons.js";
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
7
|
var result = void 0;
|
|
@@ -302,7 +303,7 @@ class OkDropzone extends LitElement {
|
|
|
302
303
|
@dragleave=${this.onDragLeave}
|
|
303
304
|
@drop=${this.onDrop}
|
|
304
305
|
>
|
|
305
|
-
<ion-icon class="big-icon"
|
|
306
|
+
<ion-icon class="big-icon" .icon=${iconCloudUploadOutline}></ion-icon>
|
|
306
307
|
<span class="title">
|
|
307
308
|
${titleBefore}<span class="link">${this.t.browse}</span>${titleAfter}
|
|
308
309
|
</span>
|
|
@@ -316,12 +317,12 @@ class OkDropzone extends LitElement {
|
|
|
316
317
|
@change=${this.onInputChange}
|
|
317
318
|
/>
|
|
318
319
|
|
|
319
|
-
${this.error ? html`<div class="error"><ion-icon
|
|
320
|
+
${this.error ? html`<div class="error"><ion-icon .icon=${iconAlertCircleOutline}></ion-icon>${this.error}</div>` : ""}
|
|
320
321
|
|
|
321
322
|
${this.files.length ? html`<ul class="files">
|
|
322
323
|
${this.files.map(
|
|
323
324
|
(file, i) => html`<li class="file">
|
|
324
|
-
<ion-icon class="file-icon"
|
|
325
|
+
<ion-icon class="file-icon" .icon=${iconDocumentOutline}></ion-icon>
|
|
325
326
|
<span class="meta">
|
|
326
327
|
<span class="name">${file.name}</span>
|
|
327
328
|
<span class="size">${this.formatSize(file.size)}</span>
|
|
@@ -335,7 +336,7 @@ class OkDropzone extends LitElement {
|
|
|
335
336
|
this.removeAt(i);
|
|
336
337
|
}}
|
|
337
338
|
>
|
|
338
|
-
<ion-icon
|
|
339
|
+
<ion-icon .icon=${iconCloseOutline}></ion-icon>
|
|
339
340
|
</button>
|
|
340
341
|
</li>`
|
|
341
342
|
)}
|
package/dist/ok-empty-state.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, css, html } from "lit";
|
|
2
2
|
import { property } from "lit/decorators.js";
|
|
3
3
|
import { define } from "./define.js";
|
|
4
|
+
import { o as okIcon } from "./shared/icons.js";
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
7
|
var result = void 0;
|
|
@@ -78,7 +79,7 @@ class OkEmptyState extends LitElement {
|
|
|
78
79
|
render() {
|
|
79
80
|
return html`
|
|
80
81
|
<div class="wrap">
|
|
81
|
-
<ion-icon
|
|
82
|
+
<ion-icon .icon=${okIcon(this.icon)} aria-hidden="true"></ion-icon>
|
|
82
83
|
${this.heading ? html`<h2 class="heading">${this.heading}</h2>` : null}
|
|
83
84
|
${this.message ? html`<p class="message">${this.message}</p>` : null}
|
|
84
85
|
<slot></slot>
|
package/dist/ok-error-page.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, css, html } from "lit";
|
|
2
2
|
import { property, state } from "lit/decorators.js";
|
|
3
3
|
import { define } from "./define.js";
|
|
4
|
+
import { o as okIcon } from "./shared/icons.js";
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
7
|
var result = void 0;
|
|
@@ -406,7 +407,7 @@ class OkErrorPage extends LitElement {
|
|
|
406
407
|
<div class="shortcuts" role="list">
|
|
407
408
|
${this.shortcuts.map((s) => {
|
|
408
409
|
const body = html`
|
|
409
|
-
${s.icon ? html`<ion-icon
|
|
410
|
+
${s.icon ? html`<ion-icon .icon=${okIcon(s.icon)} aria-hidden="true"></ion-icon>` : null}
|
|
410
411
|
<span class="shortcut-body">
|
|
411
412
|
<span class="shortcut-title">${s.title}</span>
|
|
412
413
|
${s.desc ? html`<span class="shortcut-desc">${s.desc}</span>` : null}
|
package/dist/ok-file-manager.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, css, html } from "lit";
|
|
2
2
|
import { property, state, query } from "lit/decorators.js";
|
|
3
3
|
import { define } from "./define.js";
|
|
4
|
+
import { q as iconChevronForwardOutline, o as okIcon, T as iconFolderOpenOutline } from "./shared/icons.js";
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
7
|
var result = void 0;
|
|
@@ -770,10 +771,10 @@ class OkFileManager extends LitElement {
|
|
|
770
771
|
this.toggle(folder);
|
|
771
772
|
}}
|
|
772
773
|
>
|
|
773
|
-
<ion-icon
|
|
774
|
+
<ion-icon .icon=${iconChevronForwardOutline}></ion-icon>
|
|
774
775
|
</button>
|
|
775
776
|
<span class="ticon"
|
|
776
|
-
><ion-icon
|
|
777
|
+
><ion-icon .icon=${okIcon(folder.icon || "folder-outline")}></ion-icon
|
|
777
778
|
></span>
|
|
778
779
|
<span class="tlabel" title=${folder.label}>${folder.label}</span>
|
|
779
780
|
${folder.count != null ? html`<span class="tcount">${folder.count}</span>` : ""}
|
|
@@ -829,7 +830,7 @@ class OkFileManager extends LitElement {
|
|
|
829
830
|
${crumbs.map((c, i) => {
|
|
830
831
|
const isLast = i === crumbs.length - 1;
|
|
831
832
|
return html`${i > 0 ? html`<span class="crumb-sep" aria-hidden="true"
|
|
832
|
-
><ion-icon
|
|
833
|
+
><ion-icon .icon=${iconChevronForwardOutline}></ion-icon
|
|
833
834
|
></span>` : ""}<button
|
|
834
835
|
type="button"
|
|
835
836
|
class=${`crumb ${isLast ? "current" : ""}`.trim()}
|
|
@@ -973,7 +974,7 @@ class OkFileManager extends LitElement {
|
|
|
973
974
|
}
|
|
974
975
|
if (!this.files.length) {
|
|
975
976
|
return html`<div class="empty">
|
|
976
|
-
<ion-icon
|
|
977
|
+
<ion-icon .icon=${iconFolderOpenOutline}></ion-icon>
|
|
977
978
|
<span>${this.t.empty}</span>
|
|
978
979
|
</div>`;
|
|
979
980
|
}
|
package/dist/ok-icon-tile.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, css, html } from "lit";
|
|
2
2
|
import { property } from "lit/decorators.js";
|
|
3
3
|
import { define } from "./define.js";
|
|
4
|
+
import { o as okIcon } from "./shared/icons.js";
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
7
|
var result = void 0;
|
|
@@ -86,7 +87,7 @@ class OkIconTile extends LitElement {
|
|
|
86
87
|
if (this.icon.includes(":")) {
|
|
87
88
|
return html`<iconify-icon icon=${this.icon} aria-hidden="true"></iconify-icon>`;
|
|
88
89
|
}
|
|
89
|
-
return html`<ion-icon
|
|
90
|
+
return html`<ion-icon .icon=${okIcon(this.icon)} aria-hidden="true"></ion-icon>`;
|
|
90
91
|
}
|
|
91
92
|
render() {
|
|
92
93
|
const decorative = !this.label;
|