@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.
Files changed (210) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +457 -0
  3. package/dist/base/anchor.d.ts +13 -0
  4. package/dist/base/define.d.ts +1 -0
  5. package/dist/base/relay.d.ts +1 -0
  6. package/dist/cdn.d.ts +96 -0
  7. package/dist/components/ok-app-launcher/ok-app-launcher.d.ts +57 -0
  8. package/dist/components/ok-audio/ok-audio.d.ts +45 -0
  9. package/dist/components/ok-avatar/ok-avatar.d.ts +36 -0
  10. package/dist/components/ok-avatar-group/ok-avatar-group.d.ts +38 -0
  11. package/dist/components/ok-bar-list/ok-bar-list.d.ts +36 -0
  12. package/dist/components/ok-bento/ok-bento.d.ts +17 -0
  13. package/dist/components/ok-bento-item/ok-bento-item.d.ts +34 -0
  14. package/dist/components/ok-calculator/ok-calculator.d.ts +46 -0
  15. package/dist/components/ok-calendar/ok-calendar.d.ts +63 -0
  16. package/dist/components/ok-carousel/ok-carousel.d.ts +48 -0
  17. package/dist/components/ok-chart/ok-chart.d.ts +55 -0
  18. package/dist/components/ok-chat/ok-chat.d.ts +54 -0
  19. package/dist/components/ok-coachmark/ok-coachmark.d.ts +69 -0
  20. package/dist/components/ok-code/ok-code.d.ts +28 -0
  21. package/dist/components/ok-color-picker/ok-color-picker.d.ts +63 -0
  22. package/dist/components/ok-combo/ok-combo.d.ts +46 -0
  23. package/dist/components/ok-command-palette/ok-command-palette.d.ts +72 -0
  24. package/dist/components/ok-contact-form/ok-contact-form.d.ts +54 -0
  25. package/dist/components/ok-cropper/ok-cropper.d.ts +60 -0
  26. package/dist/components/ok-cta-band/ok-cta-band.d.ts +18 -0
  27. package/dist/components/ok-currency/ok-currency.d.ts +31 -0
  28. package/dist/components/ok-data-table/ok-data-table.d.ts +312 -0
  29. package/dist/components/ok-date-picker/ok-date-picker.d.ts +81 -0
  30. package/dist/components/ok-detail-list/ok-detail-list.d.ts +30 -0
  31. package/dist/components/ok-diff/ok-diff.d.ts +38 -0
  32. package/dist/components/ok-donut/ok-donut.d.ts +38 -0
  33. package/dist/components/ok-drawer/ok-drawer.d.ts +56 -0
  34. package/dist/components/ok-dropzone/ok-dropzone.d.ts +48 -0
  35. package/dist/components/ok-empty-state/ok-empty-state.d.ts +16 -0
  36. package/dist/components/ok-error-page/ok-error-page.d.ts +77 -0
  37. package/dist/components/ok-event-card/ok-event-card.d.ts +56 -0
  38. package/dist/components/ok-feature-card/ok-feature-card.d.ts +23 -0
  39. package/dist/components/ok-file-item/ok-file-item.d.ts +31 -0
  40. package/dist/components/ok-file-manager/ok-file-manager.d.ts +145 -0
  41. package/dist/components/ok-footer/ok-footer.d.ts +10 -0
  42. package/dist/components/ok-funnel/ok-funnel.d.ts +31 -0
  43. package/dist/components/ok-gallery/ok-gallery.d.ts +34 -0
  44. package/dist/components/ok-gauge/ok-gauge.d.ts +49 -0
  45. package/dist/components/ok-heatmap/ok-heatmap.d.ts +45 -0
  46. package/dist/components/ok-hero/ok-hero.d.ts +10 -0
  47. package/dist/components/ok-hover-card/ok-hover-card.d.ts +76 -0
  48. package/dist/components/ok-icon-tile/ok-icon-tile.d.ts +24 -0
  49. package/dist/components/ok-image/ok-image.d.ts +56 -0
  50. package/dist/components/ok-inline-feedback/ok-inline-feedback.d.ts +33 -0
  51. package/dist/components/ok-invoice/ok-invoice.d.ts +137 -0
  52. package/dist/components/ok-json-viewer/ok-json-viewer.d.ts +31 -0
  53. package/dist/components/ok-kanban/ok-kanban.d.ts +56 -0
  54. package/dist/components/ok-kbd/ok-kbd.d.ts +21 -0
  55. package/dist/components/ok-keyboard/ok-keyboard.d.ts +35 -0
  56. package/dist/components/ok-kpi/ok-kpi.d.ts +24 -0
  57. package/dist/components/ok-language-select/ok-language-select.d.ts +31 -0
  58. package/dist/components/ok-lightbox/ok-lightbox.d.ts +59 -0
  59. package/dist/components/ok-logo-cloud/ok-logo-cloud.d.ts +14 -0
  60. package/dist/components/ok-loyalty-card/ok-loyalty-card.d.ts +35 -0
  61. package/dist/components/ok-mail/ok-mail.d.ts +117 -0
  62. package/dist/components/ok-menu/ok-menu.d.ts +75 -0
  63. package/dist/components/ok-menubar/ok-menubar.d.ts +75 -0
  64. package/dist/components/ok-navbar/ok-navbar.d.ts +42 -0
  65. package/dist/components/ok-notification-center/ok-notification-center.d.ts +79 -0
  66. package/dist/components/ok-org-chart/ok-org-chart.d.ts +67 -0
  67. package/dist/components/ok-otp/ok-otp.d.ts +31 -0
  68. package/dist/components/ok-page-header/ok-page-header.d.ts +23 -0
  69. package/dist/components/ok-pagination/ok-pagination.d.ts +44 -0
  70. package/dist/components/ok-pdf/ok-pdf.d.ts +32 -0
  71. package/dist/components/ok-phone/ok-phone.d.ts +48 -0
  72. package/dist/components/ok-pinpad/ok-pinpad.d.ts +29 -0
  73. package/dist/components/ok-pricing-card/ok-pricing-card.d.ts +31 -0
  74. package/dist/components/ok-product-card/ok-product-card.d.ts +25 -0
  75. package/dist/components/ok-qr/ok-qr.d.ts +24 -0
  76. package/dist/components/ok-qty-stepper/ok-qty-stepper.d.ts +35 -0
  77. package/dist/components/ok-range-dual/ok-range-dual.d.ts +38 -0
  78. package/dist/components/ok-rating/ok-rating.d.ts +33 -0
  79. package/dist/components/ok-receipt/ok-receipt.d.ts +103 -0
  80. package/dist/components/ok-reveal/ok-reveal.d.ts +21 -0
  81. package/dist/components/ok-rich-text/ok-rich-text.d.ts +46 -0
  82. package/dist/components/ok-scheduler/ok-scheduler.d.ts +74 -0
  83. package/dist/components/ok-select-card/ok-select-card.d.ts +37 -0
  84. package/dist/components/ok-signature/ok-signature.d.ts +55 -0
  85. package/dist/components/ok-skeleton/ok-skeleton.d.ts +40 -0
  86. package/dist/components/ok-sparkline/ok-sparkline.d.ts +27 -0
  87. package/dist/components/ok-split-button/ok-split-button.d.ts +49 -0
  88. package/dist/components/ok-splitter/ok-splitter.d.ts +36 -0
  89. package/dist/components/ok-stat/ok-stat.d.ts +16 -0
  90. package/dist/components/ok-status-dot/ok-status-dot.d.ts +24 -0
  91. package/dist/components/ok-status-pill/ok-status-pill.d.ts +22 -0
  92. package/dist/components/ok-stepper/ok-stepper.d.ts +33 -0
  93. package/dist/components/ok-store/ok-store.d.ts +33 -0
  94. package/dist/components/ok-tag-input/ok-tag-input.d.ts +39 -0
  95. package/dist/components/ok-testimonial/ok-testimonial.d.ts +21 -0
  96. package/dist/components/ok-time-picker/ok-time-picker.d.ts +50 -0
  97. package/dist/components/ok-timeline/ok-timeline.d.ts +33 -0
  98. package/dist/components/ok-tree/ok-tree.d.ts +46 -0
  99. package/dist/components/ok-video/ok-video.d.ts +49 -0
  100. package/dist/components/ok-widget-board/ok-widget-board.d.ts +71 -0
  101. package/dist/components/ok-wizard/ok-wizard.d.ts +30 -0
  102. package/dist/define.js +8 -0
  103. package/dist/erplora.css +112 -0
  104. package/dist/index.d.ts +158 -0
  105. package/dist/index.js +197 -0
  106. package/dist/layout.css +338 -0
  107. package/dist/ok-app-launcher.js +396 -0
  108. package/dist/ok-audio.js +308 -0
  109. package/dist/ok-avatar-group.js +158 -0
  110. package/dist/ok-avatar.js +179 -0
  111. package/dist/ok-bar-list.js +189 -0
  112. package/dist/ok-bento-item.js +168 -0
  113. package/dist/ok-bento.js +63 -0
  114. package/dist/ok-calculator.js +406 -0
  115. package/dist/ok-calendar.js +541 -0
  116. package/dist/ok-carousel.js +352 -0
  117. package/dist/ok-chart.js +325 -0
  118. package/dist/ok-chat.js +320 -0
  119. package/dist/ok-coachmark.js +500 -0
  120. package/dist/ok-code.js +190 -0
  121. package/dist/ok-color-picker.js +569 -0
  122. package/dist/ok-combo.js +294 -0
  123. package/dist/ok-command-palette.js +448 -0
  124. package/dist/ok-contact-form.js +288 -0
  125. package/dist/ok-cropper.js +404 -0
  126. package/dist/ok-cta-band.js +134 -0
  127. package/dist/ok-currency.js +172 -0
  128. package/dist/ok-data-table.js +1281 -0
  129. package/dist/ok-date-picker.js +736 -0
  130. package/dist/ok-detail-list.js +156 -0
  131. package/dist/ok-diff.js +200 -0
  132. package/dist/ok-donut.js +280 -0
  133. package/dist/ok-drawer.js +357 -0
  134. package/dist/ok-dropzone.js +376 -0
  135. package/dist/ok-empty-state.js +104 -0
  136. package/dist/ok-error-page.js +547 -0
  137. package/dist/ok-event-card.js +384 -0
  138. package/dist/ok-feature-card.js +152 -0
  139. package/dist/ok-file-item.js +259 -0
  140. package/dist/ok-file-manager.js +1116 -0
  141. package/dist/ok-footer.js +67 -0
  142. package/dist/ok-funnel.js +181 -0
  143. package/dist/ok-gallery.js +293 -0
  144. package/dist/ok-gauge.js +385 -0
  145. package/dist/ok-heatmap.js +268 -0
  146. package/dist/ok-hero.js +43 -0
  147. package/dist/ok-hover-card.js +480 -0
  148. package/dist/ok-icon-tile.js +123 -0
  149. package/dist/ok-image.js +471 -0
  150. package/dist/ok-inline-feedback.js +221 -0
  151. package/dist/ok-invoice.js +229 -0
  152. package/dist/ok-json-viewer.js +330 -0
  153. package/dist/ok-kanban.js +427 -0
  154. package/dist/ok-kbd.js +159 -0
  155. package/dist/ok-keyboard.js +402 -0
  156. package/dist/ok-kpi.js +147 -0
  157. package/dist/ok-language-select.js +188 -0
  158. package/dist/ok-lightbox.js +490 -0
  159. package/dist/ok-logo-cloud.js +92 -0
  160. package/dist/ok-loyalty-card.js +353 -0
  161. package/dist/ok-mail.js +562 -0
  162. package/dist/ok-menu.js +529 -0
  163. package/dist/ok-menubar.js +628 -0
  164. package/dist/ok-navbar.js +306 -0
  165. package/dist/ok-notification-center.js +545 -0
  166. package/dist/ok-org-chart.js +619 -0
  167. package/dist/ok-otp.js +199 -0
  168. package/dist/ok-page-header.js +202 -0
  169. package/dist/ok-pagination.js +366 -0
  170. package/dist/ok-pdf.js +160 -0
  171. package/dist/ok-phone.js +225 -0
  172. package/dist/ok-pinpad.js +171 -0
  173. package/dist/ok-pricing-card.js +184 -0
  174. package/dist/ok-product-card.js +178 -0
  175. package/dist/ok-qr.js +652 -0
  176. package/dist/ok-qty-stepper.js +212 -0
  177. package/dist/ok-range-dual.js +280 -0
  178. package/dist/ok-rating.js +199 -0
  179. package/dist/ok-receipt.js +183 -0
  180. package/dist/ok-reveal.js +94 -0
  181. package/dist/ok-rich-text.js +538 -0
  182. package/dist/ok-scheduler.js +518 -0
  183. package/dist/ok-select-card.js +231 -0
  184. package/dist/ok-signature.js +267 -0
  185. package/dist/ok-skeleton.js +345 -0
  186. package/dist/ok-sparkline.js +150 -0
  187. package/dist/ok-split-button.js +251 -0
  188. package/dist/ok-splitter.js +289 -0
  189. package/dist/ok-stat.js +77 -0
  190. package/dist/ok-status-dot.js +163 -0
  191. package/dist/ok-status-pill.js +123 -0
  192. package/dist/ok-stepper.js +299 -0
  193. package/dist/ok-store.js +83 -0
  194. package/dist/ok-tag-input.js +358 -0
  195. package/dist/ok-testimonial.js +136 -0
  196. package/dist/ok-time-picker.js +472 -0
  197. package/dist/ok-timeline.js +251 -0
  198. package/dist/ok-tree.js +266 -0
  199. package/dist/ok-video.js +362 -0
  200. package/dist/ok-widget-board.js +265 -0
  201. package/dist/ok-wizard.js +153 -0
  202. package/dist/outfitkit.js +96 -0
  203. package/dist/shared/anchor.js +14 -0
  204. package/dist/store/controller.d.ts +17 -0
  205. package/dist/store/idb.d.ts +16 -0
  206. package/dist/store/store.d.ts +39 -0
  207. package/dist/store-controller.js +31 -0
  208. package/dist/store.js +182 -0
  209. package/dist/theme.example.css +70 -0
  210. package/package.json +147 -0
@@ -0,0 +1,384 @@
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 OkEventCard extends LitElement {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.title = "";
17
+ this.color = "brand";
18
+ this.size = "md";
19
+ this.now = false;
20
+ this.maxAvatars = 4;
21
+ this.attendees = [];
22
+ }
23
+ static {
24
+ this.styles = css`
25
+ :host {
26
+ display: block;
27
+ width: 100%;
28
+ box-sizing: border-box;
29
+
30
+ /* Tokens propios estilo Ionic (overridables): --ok-* → --ion-* → hex. */
31
+ --accent: var(--ok-color-primary, var(--ion-color-primary, #3880ff));
32
+ --accent-soft: var(--ok-color-primary-soft, color-mix(in srgb, var(--accent) 12%, transparent));
33
+ --bg: var(--ok-surface, var(--ion-card-background, var(--ion-background-color, #ffffff)));
34
+ --line: var(--ok-border-color, var(--ion-border-color, #e0e0e0));
35
+ --line-strong: var(--ok-border-color-strong, color-mix(in srgb, var(--line) 70%, var(--ink)));
36
+ --ink: var(--ok-text-color, var(--ion-text-color, #1f2933));
37
+ --ink-2: var(--ok-text-color-2, color-mix(in srgb, var(--ink) 80%, transparent));
38
+ --ink-3: var(--ok-color-medium, var(--ion-color-medium, #6b7280));
39
+ --avatar-bg: var(--ok-color-light, var(--ion-color-light, #f1f2f4));
40
+ --radius: var(--ok-radius-lg, 14px);
41
+ --radius-inner: var(--ok-radius-md, 10px);
42
+ --shadow: var(--ok-shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04));
43
+ }
44
+
45
+ /* Variantes de color: redefinen accent + accent-soft. */
46
+ :host([color='brand']) {
47
+ --accent: var(--ok-color-primary, var(--ion-color-primary, #3880ff));
48
+ }
49
+ :host([color='leaf']) {
50
+ --accent: var(--ok-color-success, var(--ion-color-success, #2dd36f));
51
+ }
52
+ :host([color='warn']) {
53
+ --accent: var(--ok-color-warning, var(--ion-color-warning, #ffc409));
54
+ }
55
+ :host([color='danger']) {
56
+ --accent: var(--ok-color-danger, var(--ion-color-danger, #eb445a));
57
+ }
58
+ :host([color='info']) {
59
+ --accent: var(--ok-color-tertiary, var(--ion-color-tertiary, #5260ff));
60
+ }
61
+ /* accent-soft se recalcula siempre a partir del accent actual. */
62
+ :host([color]) {
63
+ --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
64
+ }
65
+
66
+ .card {
67
+ display: grid;
68
+ grid-template-columns: auto 1fr;
69
+ gap: 1rem;
70
+ align-items: stretch;
71
+ box-sizing: border-box;
72
+ width: 100%;
73
+ background: var(--bg);
74
+ border: 1px solid var(--line);
75
+ border-left: 3px solid var(--accent);
76
+ border-radius: var(--radius);
77
+ padding: 1rem;
78
+ transition: transform 0.15s ease-out, border-color 0.15s, box-shadow 0.15s;
79
+ }
80
+ .card:hover {
81
+ transform: translateY(-1px);
82
+ border-color: var(--line-strong);
83
+ border-left-color: var(--accent);
84
+ box-shadow: var(--shadow);
85
+ }
86
+
87
+ /* Bloque de fecha */
88
+ .date-block {
89
+ display: grid;
90
+ place-content: center;
91
+ text-align: center;
92
+ background: var(--accent-soft);
93
+ color: var(--accent);
94
+ border-radius: var(--radius-inner);
95
+ padding: 0.375rem 0.625rem;
96
+ min-width: 64px;
97
+ }
98
+ .day {
99
+ font-size: 1.75rem;
100
+ font-weight: 700;
101
+ letter-spacing: -0.02em;
102
+ line-height: 1;
103
+ font-variant-numeric: tabular-nums;
104
+ }
105
+ .month {
106
+ font-size: 0.625rem;
107
+ font-weight: 600;
108
+ text-transform: uppercase;
109
+ letter-spacing: 0.12em;
110
+ margin-top: 2px;
111
+ }
112
+
113
+ /* Cuerpo */
114
+ .body {
115
+ display: flex;
116
+ flex-direction: column;
117
+ gap: 0.25rem;
118
+ min-width: 0;
119
+ }
120
+ .title {
121
+ margin: 0;
122
+ font-size: 0.9375rem;
123
+ font-weight: 600;
124
+ letter-spacing: -0.01em;
125
+ color: var(--ink);
126
+ line-height: 1.35;
127
+ text-overflow: ellipsis;
128
+ overflow: hidden;
129
+ white-space: nowrap;
130
+ }
131
+ .meta {
132
+ display: inline-flex;
133
+ align-items: center;
134
+ gap: 6px;
135
+ font-size: 0.75rem;
136
+ color: var(--ink-3);
137
+ min-width: 0;
138
+ }
139
+ .meta span {
140
+ overflow: hidden;
141
+ text-overflow: ellipsis;
142
+ white-space: nowrap;
143
+ }
144
+ .meta svg {
145
+ width: 12px;
146
+ height: 12px;
147
+ flex-shrink: 0;
148
+ }
149
+
150
+ /* Asistentes */
151
+ .attendees {
152
+ display: inline-flex;
153
+ align-items: center;
154
+ gap: 0.5rem;
155
+ margin-top: 0.25rem;
156
+ font-size: 0.75rem;
157
+ color: var(--ink-3);
158
+ }
159
+ .avatars {
160
+ display: inline-flex;
161
+ }
162
+ .avatars > * {
163
+ width: 22px;
164
+ height: 22px;
165
+ border-radius: 50%;
166
+ border: 2px solid var(--bg);
167
+ background: var(--avatar-bg);
168
+ margin-left: -6px;
169
+ display: inline-grid;
170
+ place-items: center;
171
+ font-size: 9px;
172
+ font-weight: 600;
173
+ color: var(--ink-2);
174
+ background-size: cover;
175
+ background-position: center;
176
+ box-sizing: border-box;
177
+ }
178
+ .avatars > *:first-child {
179
+ margin-left: 0;
180
+ }
181
+ .avatars .more {
182
+ background: var(--accent-soft);
183
+ color: var(--accent);
184
+ }
185
+
186
+ /* Estado "ahora": pulso en el borde izquierdo. */
187
+ :host([now]) .card {
188
+ border-left-width: 4px;
189
+ animation: ok-event-now 1.6s ease-in-out infinite;
190
+ }
191
+ @keyframes ok-event-now {
192
+ 0%,
193
+ 100% {
194
+ box-shadow: 0 0 0 0 transparent;
195
+ }
196
+ 50% {
197
+ box-shadow: -4px 0 0 0 color-mix(in srgb, var(--accent) 35%, transparent);
198
+ }
199
+ }
200
+
201
+ /* Tamaño sm: layout en fila más compacto. */
202
+ :host([size='sm']) .card {
203
+ padding: 0.375rem 0.625rem;
204
+ gap: 0.75rem;
205
+ }
206
+ :host([size='sm']) .date-block {
207
+ display: inline-flex;
208
+ flex-direction: row;
209
+ align-items: baseline;
210
+ gap: 4px;
211
+ min-width: 0;
212
+ padding: 2px 0.5rem;
213
+ }
214
+ :host([size='sm']) .day {
215
+ font-size: 1.125rem;
216
+ }
217
+ :host([size='sm']) .month {
218
+ font-size: 0.625rem;
219
+ margin-top: 0;
220
+ }
221
+ :host([size='sm']) .body {
222
+ flex-direction: row;
223
+ align-items: center;
224
+ gap: 0.75rem;
225
+ }
226
+ :host([size='sm']) .attendees {
227
+ margin-top: 0;
228
+ }
229
+
230
+ /* Tamaño lg: más aire y tipografía mayor. */
231
+ :host([size='lg']) .card {
232
+ padding: 1.25rem;
233
+ gap: 1.25rem;
234
+ }
235
+ :host([size='lg']) .day {
236
+ font-size: 2.25rem;
237
+ }
238
+ :host([size='lg']) .title {
239
+ font-size: 1.0625rem;
240
+ }
241
+
242
+ @media (prefers-reduced-motion: reduce) {
243
+ :host([now]) .card {
244
+ animation: none;
245
+ }
246
+ .card {
247
+ transition: none;
248
+ }
249
+ }
250
+ `;
251
+ }
252
+ /** Devuelve {day, month} a mostrar, derivando de `date` si hace falta. */
253
+ resolveDate() {
254
+ if (this.day != null || this.month != null) {
255
+ return { day: this.day ?? "", month: this.month ?? "" };
256
+ }
257
+ if (this.date) {
258
+ const d = new Date(this.date);
259
+ if (!Number.isNaN(d.getTime())) {
260
+ const month = d.toLocaleString(this.locale || void 0, { month: "short" }).replace(".", "");
261
+ return { day: String(d.getDate()), month };
262
+ }
263
+ }
264
+ return { day: "", month: "" };
265
+ }
266
+ /** Iniciales (máx. 2) a partir del nombre. */
267
+ initialsOf(a) {
268
+ if (a.initials) return a.initials.slice(0, 2).toUpperCase();
269
+ const parts = (a.name ?? "").trim().split(/\s+/).filter(Boolean);
270
+ if (parts.length === 0) return "";
271
+ const chars = parts.length === 1 ? parts[0].slice(0, 2) : parts[0][0] + parts[parts.length - 1][0];
272
+ return chars.toUpperCase();
273
+ }
274
+ renderAvatars() {
275
+ const list = this.attendees ?? [];
276
+ if (list.length === 0) return null;
277
+ const max = Math.max(1, this.maxAvatars);
278
+ const shown = list.slice(0, max);
279
+ const extra = list.length - shown.length;
280
+ return html`
281
+ <div class="attendees">
282
+ <div class="avatars" role="list" aria-label="Asistentes">
283
+ ${shown.map(
284
+ (a) => a.avatar ? html`<span
285
+ role="listitem"
286
+ title=${a.name ?? ""}
287
+ style=${`background-image:url("${a.avatar}")`}
288
+ ></span>` : html`<span role="listitem" title=${a.name ?? ""}>${this.initialsOf(a)}</span>`
289
+ )}
290
+ ${extra > 0 ? html`<span class="more" title=${`+${extra} más`} aria-label=${`${extra} más`}
291
+ >+${extra}</span
292
+ >` : null}
293
+ </div>
294
+ </div>
295
+ `;
296
+ }
297
+ render() {
298
+ const { day, month } = this.resolveDate();
299
+ return html`
300
+ <article
301
+ class="card"
302
+ role="group"
303
+ aria-label=${this.title || "Evento"}
304
+ aria-current=${this.now ? "true" : "false"}
305
+ >
306
+ <div class="date-block" aria-hidden=${day || month ? "false" : "true"}>
307
+ ${day ? html`<span class="day">${day}</span>` : null}
308
+ ${month ? html`<span class="month">${month}</span>` : null}
309
+ </div>
310
+ <div class="body">
311
+ ${this.title ? html`<h3 class="title" title=${this.title}>${this.title}</h3>` : null}
312
+ ${this.time ? html`<span class="meta">
313
+ <!-- icono reloj inline (sin dependencias) -->
314
+ <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
315
+ <circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="2" />
316
+ <path
317
+ d="M12 7v5l3 2"
318
+ stroke="currentColor"
319
+ stroke-width="2"
320
+ stroke-linecap="round"
321
+ stroke-linejoin="round"
322
+ />
323
+ </svg>
324
+ <span>${this.time}</span>
325
+ </span>` : null}
326
+ ${this.location ? html`<span class="meta">
327
+ <!-- icono pin inline -->
328
+ <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
329
+ <path
330
+ d="M12 21s7-5.686 7-11a7 7 0 1 0-14 0c0 5.314 7 11 7 11Z"
331
+ stroke="currentColor"
332
+ stroke-width="2"
333
+ stroke-linejoin="round"
334
+ />
335
+ <circle cx="12" cy="10" r="2.5" stroke="currentColor" stroke-width="2" />
336
+ </svg>
337
+ <span>${this.location}</span>
338
+ </span>` : null}
339
+ ${this.renderAvatars()}
340
+ </div>
341
+ </article>
342
+ `;
343
+ }
344
+ }
345
+ __decorateClass([
346
+ property()
347
+ ], OkEventCard.prototype, "title");
348
+ __decorateClass([
349
+ property()
350
+ ], OkEventCard.prototype, "date");
351
+ __decorateClass([
352
+ property()
353
+ ], OkEventCard.prototype, "day");
354
+ __decorateClass([
355
+ property()
356
+ ], OkEventCard.prototype, "month");
357
+ __decorateClass([
358
+ property()
359
+ ], OkEventCard.prototype, "time");
360
+ __decorateClass([
361
+ property()
362
+ ], OkEventCard.prototype, "location");
363
+ __decorateClass([
364
+ property({ reflect: true })
365
+ ], OkEventCard.prototype, "color");
366
+ __decorateClass([
367
+ property({ reflect: true })
368
+ ], OkEventCard.prototype, "size");
369
+ __decorateClass([
370
+ property({ type: Boolean, reflect: true })
371
+ ], OkEventCard.prototype, "now");
372
+ __decorateClass([
373
+ property()
374
+ ], OkEventCard.prototype, "locale");
375
+ __decorateClass([
376
+ property({ type: Number, attribute: "max-avatars" })
377
+ ], OkEventCard.prototype, "maxAvatars");
378
+ __decorateClass([
379
+ property({ attribute: false })
380
+ ], OkEventCard.prototype, "attendees");
381
+ define("ok-event-card", OkEventCard);
382
+ export {
383
+ OkEventCard
384
+ };
@@ -0,0 +1,152 @@
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 OkFeatureCard extends LitElement {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.glass = false;
17
+ }
18
+ static {
19
+ this.styles = css`
20
+ :host {
21
+ display: block;
22
+ width: 100%;
23
+ height: 100%;
24
+ --color: var(--ok-text, var(--ion-text-color, #18181b));
25
+ --muted: var(--ok-muted, rgba(var(--ion-text-color-rgb, 24, 24, 27), 0.62));
26
+ --surface: var(--ok-surface, var(--ion-card-background, var(--ion-background-color, #fff)));
27
+ --border: var(--ok-border, rgba(var(--ion-text-color-rgb, 24, 24, 27), 0.1));
28
+ --radius: var(--ok-radius, 16px);
29
+ --accent: var(--ion-color-primary, #1496d6);
30
+ font-family: var(--ok-font, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
31
+ }
32
+ .card {
33
+ box-sizing: border-box;
34
+ height: 100%;
35
+ display: flex;
36
+ flex-direction: column;
37
+ gap: 0.55rem;
38
+ padding: clamp(1.2rem, 2vw, 1.6rem);
39
+ color: var(--color);
40
+ text-decoration: none;
41
+ background: var(--surface);
42
+ border: 1px solid var(--border);
43
+ border-radius: var(--radius);
44
+ position: relative;
45
+ overflow: hidden;
46
+ transition: transform var(--ok-transition, 160ms ease), box-shadow var(--ok-transition, 160ms ease),
47
+ border-color var(--ok-transition, 160ms ease);
48
+ }
49
+ /* Línea de acento superior que aparece al hover */
50
+ .card::before {
51
+ content: '';
52
+ position: absolute;
53
+ inset: 0 0 auto 0;
54
+ height: 3px;
55
+ background: linear-gradient(90deg, var(--accent), color-mix(in oklab, var(--accent) 30%, transparent));
56
+ transform: scaleX(0);
57
+ transform-origin: left;
58
+ transition: transform var(--ok-transition, 200ms ease);
59
+ }
60
+ :host([glass]) .card {
61
+ background: color-mix(in oklab, var(--surface) 62%, transparent);
62
+ -webkit-backdrop-filter: blur(14px) saturate(1.4);
63
+ backdrop-filter: blur(14px) saturate(1.4);
64
+ border-color: color-mix(in oklab, var(--color) 12%, transparent);
65
+ }
66
+ .card:hover {
67
+ transform: translateY(-4px);
68
+ border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
69
+ box-shadow: 0 22px 48px -26px color-mix(in oklab, var(--accent) 60%, transparent);
70
+ }
71
+ .card:hover::before { transform: scaleX(1); }
72
+ .ico {
73
+ display: inline-grid;
74
+ place-items: center;
75
+ width: 2.75rem;
76
+ height: 2.75rem;
77
+ border-radius: 13px;
78
+ color: var(--accent);
79
+ background: color-mix(in oklab, var(--accent) 13%, transparent);
80
+ font-size: 1.4rem;
81
+ margin-bottom: 0.35rem;
82
+ }
83
+ .ico ::slotted(img),
84
+ .ico img { width: 1.4rem; height: 1.4rem; }
85
+ /* Glifo via máscara CSS sobre la SVG del API de Iconify (funciona en Shadow DOM). */
86
+ .glyph {
87
+ width: 1.5rem;
88
+ height: 1.5rem;
89
+ background-color: currentColor;
90
+ -webkit-mask: var(--u) center / contain no-repeat;
91
+ mask: var(--u) center / contain no-repeat;
92
+ }
93
+ .eyebrow {
94
+ font-size: 0.7rem;
95
+ font-weight: 600;
96
+ letter-spacing: 0.05em;
97
+ text-transform: uppercase;
98
+ color: var(--muted);
99
+ }
100
+ .title {
101
+ margin: 0;
102
+ font-size: 1.15rem;
103
+ font-weight: 620;
104
+ letter-spacing: -0.015em;
105
+ line-height: 1.25;
106
+ }
107
+ .desc {
108
+ color: var(--muted);
109
+ font-size: 0.92rem;
110
+ line-height: 1.55;
111
+ }
112
+ ::slotted(*) { margin: 0; }
113
+ `;
114
+ }
115
+ /** "lucide:box" → "https://api.iconify.design/lucide/box.svg" (prefijo:nombre → prefijo/nombre). */
116
+ iconUrl(name) {
117
+ const i = name.indexOf(":");
118
+ const prefix = i === -1 ? "lucide" : name.slice(0, i);
119
+ const icon = i === -1 ? name : name.slice(i + 1);
120
+ return `https://api.iconify.design/${prefix}/${icon}.svg`;
121
+ }
122
+ inner() {
123
+ return html`
124
+ ${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>`}
125
+ ${this.eyebrow ? html`<span class="eyebrow">${this.eyebrow}</span>` : null}
126
+ ${this.heading ? html`<h3 class="title">${this.heading}</h3>` : null}
127
+ <div class="desc"><slot></slot></div>
128
+ `;
129
+ }
130
+ render() {
131
+ return this.href ? html`<a class="card" href=${this.href}>${this.inner()}</a>` : html`<div class="card">${this.inner()}</div>`;
132
+ }
133
+ }
134
+ __decorateClass([
135
+ property()
136
+ ], OkFeatureCard.prototype, "icon");
137
+ __decorateClass([
138
+ property()
139
+ ], OkFeatureCard.prototype, "eyebrow");
140
+ __decorateClass([
141
+ property()
142
+ ], OkFeatureCard.prototype, "heading");
143
+ __decorateClass([
144
+ property()
145
+ ], OkFeatureCard.prototype, "href");
146
+ __decorateClass([
147
+ property({ type: Boolean, reflect: true })
148
+ ], OkFeatureCard.prototype, "glass");
149
+ define("ok-feature-card", OkFeatureCard);
150
+ export {
151
+ OkFeatureCard
152
+ };