@erplora/outfitkit 0.1.14 → 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.
Files changed (43) hide show
  1. package/dist/base/icons.d.ts +59 -0
  2. package/dist/base/icons.test.d.ts +1 -0
  3. package/dist/components/ok-kpi/ok-kpi.d.ts +1 -1
  4. package/dist/ok-app-launcher.js +4 -3
  5. package/dist/ok-audio.js +4 -3
  6. package/dist/ok-calendar.js +4 -3
  7. package/dist/ok-carousel.js +3 -2
  8. package/dist/ok-chat.js +2 -1
  9. package/dist/ok-combo.js +2 -1
  10. package/dist/ok-command-palette.js +3 -2
  11. package/dist/ok-data-table.js +15 -14
  12. package/dist/ok-date-picker.js +4 -3
  13. package/dist/ok-drawer.js +3 -2
  14. package/dist/ok-dropzone.js +5 -4
  15. package/dist/ok-empty-state.js +2 -1
  16. package/dist/ok-error-page.js +2 -1
  17. package/dist/ok-file-manager.js +5 -4
  18. package/dist/ok-icon-tile.js +2 -1
  19. package/dist/ok-inline-feedback.js +8 -7
  20. package/dist/ok-kpi.js +7 -6
  21. package/dist/ok-lightbox.js +7 -6
  22. package/dist/ok-mail.js +10 -9
  23. package/dist/ok-menu.js +2 -1
  24. package/dist/ok-menubar.js +6 -5
  25. package/dist/ok-notification-center.js +4 -3
  26. package/dist/ok-pdf.js +4 -3
  27. package/dist/ok-pinpad.js +3 -2
  28. package/dist/ok-qty-stepper.js +3 -2
  29. package/dist/ok-rating.js +3 -2
  30. package/dist/ok-scheduler.js +3 -2
  31. package/dist/ok-select-card.js +2 -1
  32. package/dist/ok-signature.js +3 -2
  33. package/dist/ok-split-button.js +3 -2
  34. package/dist/ok-status-pill.js +2 -1
  35. package/dist/ok-stepper.js +2 -1
  36. package/dist/ok-tag-input.js +2 -1
  37. package/dist/ok-timeline.js +2 -1
  38. package/dist/ok-tree.js +3 -2
  39. package/dist/ok-video.js +5 -4
  40. package/dist/ok-widget-board.js +2 -1
  41. package/dist/outfitkit.bundle.js +3113 -3058
  42. package/dist/shared/icons.js +194 -0
  43. 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 {};
@@ -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 ion-icon de flecha según la tendencia. */
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
  }
@@ -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 .name=${icon}></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 name="apps-outline"></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 name="close-outline"></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 ? "volume-mute-outline" : this.volume < 0.5 ? "volume-low-outline" : "volume-high-outline";
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
- name=${this.playing ? "pause" : "play"}
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" name=${volIcon}></ion-icon>
262
+ <ion-icon slot="icon-only" .icon=${okIcon(volIcon)}></ion-icon>
262
263
  </ion-button>
263
264
  <input
264
265
  type="range"
@@ -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 name="chevron-forward-outline"></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" name="chevron-back-outline"></ion-icon>
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" name="chevron-forward-outline"></ion-icon>
495
+ <ion-icon slot="icon-only" .icon=${iconChevronForwardOutline}></ion-icon>
495
496
  </ion-button>
496
497
  </div>
497
498
  <div class="toggle" role="tablist">
@@ -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" name="chevron-back-outline"></ion-icon>
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" name="chevron-forward-outline"></ion-icon>
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" name="send"></ion-icon>
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 name="chevron-down-outline"></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 .name=${cmd.icon}></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 name="search-outline"></ion-icon>
395
+ <ion-icon .icon=${iconSearchOutline}></ion-icon>
395
396
  <input
396
397
  type="text"
397
398
  .value=${this.queryText}
@@ -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;
@@ -773,7 +774,7 @@ class OkDataTable extends LitElement {
773
774
  }
774
775
  return html`
775
776
  <span class="tk-daterange" role="group" aria-label=${col.header}>
776
- <ion-icon name="calendar-outline"></ion-icon>
777
+ <ion-icon .icon=${iconCalendarOutline}></ion-icon>
777
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>
778
779
  <span class="arr">→</span>
779
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>
@@ -785,7 +786,7 @@ class OkDataTable extends LitElement {
785
786
  if (!this.menuActions.length) return nothing;
786
787
  return html`
787
788
  <ion-button class="toolbtn" fill="clear" aria-label=${this.t.moreActions} @click=${(e) => this.openMenu(e)}>
788
- <ion-icon slot="icon-only" name="ellipsis-vertical"></ion-icon>
789
+ <ion-icon slot="icon-only" .icon=${iconEllipsisVertical}></ion-icon>
789
790
  </ion-button>
790
791
  <ion-popover
791
792
  .isOpen=${this.menuOpen}
@@ -801,7 +802,7 @@ class OkDataTable extends LitElement {
801
802
  this.menuOpen = false;
802
803
  this.emit("menuAction", { actionId: a.id });
803
804
  }}>
804
- ${a.icon ? html`<ion-icon slot="start" name=${a.icon} color=${a.color ?? nothing}></ion-icon>` : nothing}
805
+ ${a.icon ? html`<ion-icon slot="start" .icon=${okIcon(a.icon)} color=${a.color ?? nothing}></ion-icon>` : nothing}
805
806
  <ion-label color=${a.color ?? nothing}>${a.label}</ion-label>
806
807
  </ion-item>
807
808
  `
@@ -829,7 +830,7 @@ class OkDataTable extends LitElement {
829
830
  aria-disabled=${disabled ? "true" : nothing}
830
831
  @click=${() => this.emit("rowAction", { actionId: a.id, row })}
831
832
  >
832
- ${loading ? html`<ion-spinner slot="icon-only" name="dots"></ion-spinner>` : a.icon ? html`<ion-icon slot="icon-only" name=${a.icon}></ion-icon>` : a.label}
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}
833
834
  </ion-button>
834
835
  `;
835
836
  }
@@ -842,7 +843,7 @@ class OkDataTable extends LitElement {
842
843
  toolButton(icon, on, onClick, label, badge) {
843
844
  return html`
844
845
  <ion-button class="toolbtn" size="small" fill=${on ? "solid" : "outline"} title=${label} aria-label=${label} @click=${onClick}>
845
- <ion-icon slot="icon-only" name=${icon}></ion-icon>
846
+ <ion-icon slot="icon-only" .icon=${okIcon(icon)}></ion-icon>
846
847
  ${badge && badge > 0 ? html`<span class="badge">${badge}</span>` : nothing}
847
848
  </ion-button>
848
849
  `;
@@ -958,7 +959,7 @@ class OkDataTable extends LitElement {
958
959
  title=${this.primaryAction.label}
959
960
  aria-label=${this.primaryAction.label}
960
961
  @click=${() => this.emit("primaryAction", {})}
961
- ><ion-icon slot="icon-only" name=${this.primaryAction.icon ?? "add"}></ion-icon></ion-button>
962
+ ><ion-icon slot="icon-only" .icon=${okIcon(this.primaryAction.icon ?? "add")}></ion-icon></ion-button>
962
963
  ` : nothing}
963
964
  <!-- El módulo proyecta aquí acciones globales adicionales. -->
964
965
  <slot name="toolbar"></slot>
@@ -967,7 +968,7 @@ class OkDataTable extends LitElement {
967
968
  <div class="selbar">
968
969
  <strong>${this.t.selected.replace("{n}", String(selCount))}</strong>
969
970
  <button class="sel-clear" @click=${() => this.setSelection(/* @__PURE__ */ new Set())}>
970
- <ion-icon name="close" style="font-size:14px"></ion-icon> ${this.t.clear}
971
+ <ion-icon .icon=${iconClose} style="font-size:14px"></ion-icon> ${this.t.clear}
971
972
  </button>
972
973
  </div>
973
974
  ` : nothing}
@@ -991,11 +992,11 @@ class OkDataTable extends LitElement {
991
992
  </div>
992
993
  ${pages > 1 ? html`
993
994
  <div class="nav">
994
- <ion-button size="small" fill="clear" ?disabled=${current === 0} @click=${() => goTo(current - 1)}><ion-icon slot="icon-only" name="chevron-back"></ion-icon></ion-button>
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>
995
996
  ${this.pageList(current + 1, pages).map(
996
997
  (p) => p === "…" ? html`<span class="pgap">…</span>` : html`<button class=${`pnum${p === current + 1 ? " on" : ""}`} @click=${() => goTo(p - 1)}>${p}</button>`
997
998
  )}
998
- <ion-button size="small" fill="clear" ?disabled=${current >= pages - 1} @click=${() => goTo(current + 1)}><ion-icon slot="icon-only" name="chevron-forward"></ion-icon></ion-button>
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>
999
1000
  </div>
1000
1001
  ` : nothing}
1001
1002
  </div>
@@ -1014,7 +1015,7 @@ class OkDataTable extends LitElement {
1014
1015
  <aside class="drawer" role="dialog" aria-label=${isFilters ? this.t.filters : this.t.form}>
1015
1016
  <header class="dh">
1016
1017
  <strong>${isFilters ? this.t.filters : this.t.newRecord}</strong>
1017
- <ion-button fill="clear" size="small" aria-label=${this.t.close} @click=${() => this.close()}><ion-icon slot="icon-only" name="close"></ion-icon></ion-button>
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>
1018
1019
  </header>
1019
1020
  <div class="db">
1020
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>`}
@@ -1066,7 +1067,7 @@ class OkDataTable extends LitElement {
1066
1067
  emptyState() {
1067
1068
  return html`
1068
1069
  <div class="empty">
1069
- <span class="empty-ic"><ion-icon name="file-tray-outline"></ion-icon></span>
1070
+ <span class="empty-ic"><ion-icon .icon=${iconFileTrayOutline}></ion-icon></span>
1070
1071
  <span>${this.effEmptyMessage}</span>
1071
1072
  </div>
1072
1073
  `;
@@ -1088,7 +1089,7 @@ class OkDataTable extends LitElement {
1088
1089
  const sortable = this.isSortable(c);
1089
1090
  const active = sortable && (this.serverSide ? this.sort === c.key : this.clientSort === c.key);
1090
1091
  const dir = this.serverSide ? this.sortDir : this.clientSortDir;
1091
- const caretIcon = !active ? "swap-vertical-outline" : dir === "asc" ? "chevron-up-outline" : "chevron-down-outline";
1092
+ const caretIcon = !active ? iconSwapVerticalOutline : dir === "asc" ? iconChevronUpOutline : iconChevronDownOutline;
1092
1093
  return html`
1093
1094
  <div
1094
1095
  class=${`gcell gh ${alignCls(c.align)}${sortable ? " sortable" : ""}`}
@@ -1096,7 +1097,7 @@ class OkDataTable extends LitElement {
1096
1097
  @click=${() => this.onHeaderClick(c)}
1097
1098
  >
1098
1099
  <span>${c.header}</span>
1099
- ${sortable ? html`<span class=${`caret${active ? " on" : ""}`}><ion-icon name=${caretIcon}></ion-icon></span>` : nothing}
1100
+ ${sortable ? html`<span class=${`caret${active ? " on" : ""}`}><ion-icon .icon=${okIcon(caretIcon)}></ion-icon></span>` : nothing}
1100
1101
  </div>
1101
1102
  `;
1102
1103
  })}
@@ -1141,7 +1142,7 @@ class OkDataTable extends LitElement {
1141
1142
  <ion-card class=${`rcard${selected ? " selected" : ""}`}>
1142
1143
  ${hasHead ? html`
1143
1144
  <ion-card-header class="rcard-head">
1144
- ${icon != null && icon !== "" ? html`<span class="rc-icon">${typeof icon === "string" ? html`<ion-icon name=${icon}></ion-icon>` : icon}</span>` : nothing}
1145
+ ${icon != null && icon !== "" ? html`<span class="rc-icon">${typeof icon === "string" ? html`<ion-icon .icon=${okIcon(icon)}></ion-icon>` : icon}</span>` : nothing}
1145
1146
  <span class="rc-title">${this.cardTitle ? this.cardTitle(row) : nothing}</span>
1146
1147
  ${this.selectable ? html`<ion-checkbox .checked=${selected} aria-label=${this.t.select} @ionChange=${() => this.toggleRow(key)}></ion-checkbox>` : nothing}
1147
1148
  </ion-card-header>
@@ -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 name="calendar-outline"></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 name="chevron-back-outline"></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 name="chevron-forward-outline"></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 .name=${this.icon} aria-hidden="true"></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 name="close-outline" aria-hidden="true"></ion-icon>
316
+ <ion-icon .icon=${iconCloseOutline} aria-hidden="true"></ion-icon>
316
317
  </button>` : ""}
317
318
  </div>
318
319
  </header>
@@ -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" name="cloud-upload-outline"></ion-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 name="alert-circle-outline"></ion-icon>${this.error}</div>` : ""}
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" name="document-outline"></ion-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 name="close-outline"></ion-icon>
339
+ <ion-icon .icon=${iconCloseOutline}></ion-icon>
339
340
  </button>
340
341
  </li>`
341
342
  )}
@@ -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 name=${this.icon} aria-hidden="true"></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>
@@ -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 name=${s.icon} aria-hidden="true"></ion-icon>` : null}
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}
@@ -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 name="chevron-forward-outline"></ion-icon>
774
+ <ion-icon .icon=${iconChevronForwardOutline}></ion-icon>
774
775
  </button>
775
776
  <span class="ticon"
776
- ><ion-icon name=${folder.icon || "folder-outline"}></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 name="chevron-forward-outline"></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 name="folder-open-outline"></ion-icon>
977
+ <ion-icon .icon=${iconFolderOpenOutline}></ion-icon>
977
978
  <span>${this.t.empty}</span>
978
979
  </div>`;
979
980
  }
@@ -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 name=${this.icon} aria-hidden="true"></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;
@@ -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 { r as iconInformationCircle, s as iconAlertCircle, t as iconWarning, u as iconCheckmarkCircle, o as okIcon, b as iconClose } from "./shared/icons.js";
4
5
  var __defProp = Object.defineProperty;
5
6
  var __decorateClass = (decorators, target, key, kind) => {
6
7
  var result = void 0;
@@ -152,16 +153,16 @@ class OkInlineFeedback extends LitElement {
152
153
  defaultIcon() {
153
154
  switch (this.tone) {
154
155
  case "success":
155
- return "checkmark-circle";
156
+ return iconCheckmarkCircle;
156
157
  case "warning":
157
- return "warning";
158
+ return iconWarning;
158
159
  case "danger":
159
- return "alert-circle";
160
+ return iconAlertCircle;
160
161
  case "neutral":
161
- return "information-circle";
162
+ return iconInformationCircle;
162
163
  case "info":
163
164
  default:
164
- return "information-circle";
165
+ return iconInformationCircle;
165
166
  }
166
167
  }
167
168
  // Oculta el banner y avisa al consumidor; éste puede revertir restaurando `hidden=false`.
@@ -173,7 +174,7 @@ class OkInlineFeedback extends LitElement {
173
174
  const iconName = this.icon ?? this.defaultIcon();
174
175
  return html`
175
176
  <div class="box" role="status">
176
- <ion-icon class="icon" name=${iconName} aria-hidden="true"></ion-icon>
177
+ <ion-icon class="icon" .icon=${okIcon(iconName)} aria-hidden="true"></ion-icon>
177
178
  <div class="content">
178
179
  <div class="row">
179
180
  <div class="text">
@@ -187,7 +188,7 @@ class OkInlineFeedback extends LitElement {
187
188
  </div>
188
189
  ${this.dismissible ? html`
189
190
  <button class="close" aria-label=${this.t.dismiss} @click=${this.dismiss}>
190
- <ion-icon name="close" aria-hidden="true"></ion-icon>
191
+ <ion-icon .icon=${iconClose} aria-hidden="true"></ion-icon>
191
192
  </button>
192
193
  ` : null}
193
194
  </div>