rei-kit 2.12.0 → 2.14.0

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/styles.css CHANGED
@@ -218,6 +218,34 @@
218
218
  opacity: 0;
219
219
  }
220
220
 
221
+ .rk-skeleton[data-v-37327de6] {
222
+ display: block;
223
+ flex-shrink: 0;
224
+ background: var(--color-muted);
225
+ animation: rk-skeleton-pulse-37327de6 1.6s ease-in-out infinite;
226
+ }
227
+ .rk-skeleton.is-block[data-v-37327de6] {
228
+ border-radius: var(--radius-cell);
229
+ }
230
+
231
+ /* A line of text, rounded like one and a little short of its box. */
232
+ .rk-skeleton.is-text[data-v-37327de6] {
233
+ border-radius: 9999px;
234
+ }
235
+ .rk-skeleton.is-circle[data-v-37327de6] {
236
+ border-radius: 9999px;
237
+ }
238
+ @keyframes rk-skeleton-pulse-37327de6 {
239
+ 50% {
240
+ opacity: 0.55;
241
+ }
242
+ }
243
+ @media (prefers-reduced-motion: reduce) {
244
+ .rk-skeleton[data-v-37327de6] {
245
+ animation: none;
246
+ }
247
+ }
248
+
221
249
  .rk-listbox[data-v-7f8cd788] {
222
250
  overflow-y: auto;
223
251
  border-radius: var(--radius-card);
@@ -276,34 +304,6 @@
276
304
  padding: 1rem;
277
305
  }
278
306
 
279
- .rk-skeleton[data-v-37327de6] {
280
- display: block;
281
- flex-shrink: 0;
282
- background: var(--color-muted);
283
- animation: rk-skeleton-pulse-37327de6 1.6s ease-in-out infinite;
284
- }
285
- .rk-skeleton.is-block[data-v-37327de6] {
286
- border-radius: var(--radius-cell);
287
- }
288
-
289
- /* A line of text, rounded like one and a little short of its box. */
290
- .rk-skeleton.is-text[data-v-37327de6] {
291
- border-radius: 9999px;
292
- }
293
- .rk-skeleton.is-circle[data-v-37327de6] {
294
- border-radius: 9999px;
295
- }
296
- @keyframes rk-skeleton-pulse-37327de6 {
297
- 50% {
298
- opacity: 0.55;
299
- }
300
- }
301
- @media (prefers-reduced-motion: reduce) {
302
- .rk-skeleton[data-v-37327de6] {
303
- animation: none;
304
- }
305
- }
306
-
307
307
  .rk-avatar[data-v-47586bec] {
308
308
  display: grid;
309
309
  place-items: center;
@@ -399,26 +399,58 @@
399
399
  background: color-mix(in srgb, var(--color-hair) 70%, transparent);
400
400
  }
401
401
 
402
- .rk-combo[data-v-ce4c503f] {
402
+ .rk-combo[data-v-aa2335fa] {
403
403
  position: relative;
404
404
  display: flex;
405
405
  flex-direction: column;
406
406
  gap: 0.375rem;
407
407
  }
408
- .rk-combo-label[data-v-ce4c503f] {
408
+ .rk-combo-label[data-v-aa2335fa] {
409
409
  font-size: 0.875rem;
410
410
  font-weight: 500;
411
411
  color: var(--color-ink);
412
412
  }
413
- .rk-combo-field[data-v-ce4c503f] {
413
+ .rk-combo-field[data-v-aa2335fa] {
414
414
  position: relative;
415
415
  display: flex;
416
416
  align-items: center;
417
417
  }
418
418
 
419
+ /* With chips the field is a box that wraps, and the input is one item in it
420
+ that grows into whatever is left. */
421
+ .rk-combo-field.is-multiple[data-v-aa2335fa] {
422
+ flex-wrap: wrap;
423
+ gap: 0.25rem;
424
+ min-height: 2.75rem;
425
+ border-radius: var(--radius-card);
426
+ padding: 0.3125rem 2rem 0.3125rem 0.375rem;
427
+ }
428
+ .rk-combo-chip[data-v-aa2335fa] {
429
+ display: inline-flex;
430
+ align-items: center;
431
+ gap: 0.25rem;
432
+ border-radius: 9999px;
433
+ background: var(--color-muted);
434
+ padding: 0.125rem 0.25rem 0.125rem 0.5rem;
435
+ font-size: 0.8125rem;
436
+ color: var(--color-ink);
437
+ }
438
+ .rk-combo-chip-x[data-v-aa2335fa] {
439
+ display: grid;
440
+ width: 1.125rem;
441
+ height: 1.125rem;
442
+ place-items: center;
443
+ border-radius: 9999px;
444
+ color: var(--color-ink-soft);
445
+ line-height: 1;
446
+ }
447
+ .rk-combo-chip-x[data-v-aa2335fa]:hover {
448
+ color: var(--color-ink);
449
+ }
450
+
419
451
  /* 16px, like every other text control here: iOS zooms the viewport when it
420
452
  focuses a field under 16px and never zooms back. */
421
- .rk-combo-input[data-v-ce4c503f] {
453
+ .rk-combo-input[data-v-aa2335fa] {
422
454
  width: 100%;
423
455
  height: 2.75rem;
424
456
  border-radius: var(--radius-card);
@@ -426,20 +458,40 @@
426
458
  font-size: 1rem;
427
459
  color: var(--color-ink);
428
460
  }
429
- .rk-combo-input[data-v-ce4c503f]:focus-visible {
461
+ .is-multiple .rk-combo-input[data-v-aa2335fa] {
462
+ width: auto;
463
+ height: 1.75rem;
464
+ min-width: 6rem;
465
+ flex: 1;
466
+ border: 0;
467
+ border-radius: 0;
468
+ padding: 0;
469
+ background: transparent;
470
+ box-shadow: none;
471
+ }
472
+ .rk-combo-input[data-v-aa2335fa]:focus-visible {
473
+ outline: 2px solid var(--color-primary);
474
+ outline-offset: -1px;
475
+ }
476
+ .is-multiple .rk-combo-input[data-v-aa2335fa]:focus-visible {
477
+ outline: none;
478
+ }
479
+
480
+ /* The ring belongs to the whole box once the box is the control. */
481
+ .rk-combo-field.is-multiple[data-v-aa2335fa]:focus-within {
430
482
  outline: 2px solid var(--color-primary);
431
483
  outline-offset: -1px;
432
484
  }
433
- .rk-combo-input[data-v-ce4c503f]:disabled {
485
+ .rk-combo-input[data-v-aa2335fa]:disabled {
434
486
  opacity: 0.5;
435
487
  }
436
- .rk-combo-toggle[data-v-ce4c503f] {
488
+ .rk-combo-toggle[data-v-aa2335fa] {
437
489
  position: absolute;
438
490
  right: 0.5rem;
439
491
  color: var(--color-ink-soft);
440
492
  font-size: 0.75rem;
441
493
  }
442
- .rk-combo-list[data-v-ce4c503f] {
494
+ .rk-combo-list[data-v-aa2335fa] {
443
495
  position: absolute;
444
496
  top: calc(100% - 1.25rem);
445
497
  z-index: 50;
@@ -449,29 +501,48 @@
449
501
  border-radius: var(--radius-card);
450
502
  padding: 0.25rem;
451
503
  }
452
- .rk-combo-option[data-v-ce4c503f] {
504
+ .rk-combo-option[data-v-aa2335fa] {
453
505
  cursor: pointer;
454
506
  border-radius: var(--radius-cell);
455
507
  padding: 0.5rem 0.625rem;
456
508
  font-size: 0.875rem;
457
509
  color: var(--color-ink);
458
510
  }
459
- .rk-combo-option.is-highlighted[data-v-ce4c503f] {
511
+
512
+ /* A virtual row's height is the arithmetic the spacers are built on, so it
513
+ cannot be left to the text inside it. */
514
+ .rk-combo-option[style][data-v-aa2335fa] {
515
+ display: flex;
516
+ align-items: center;
517
+ padding-block: 0;
518
+ }
519
+ .rk-combo-option.is-highlighted[data-v-aa2335fa] {
460
520
  background: var(--color-muted);
461
521
  }
462
- .rk-combo-option.is-selected[data-v-ce4c503f] {
522
+ .rk-combo-option.is-selected[data-v-aa2335fa] {
463
523
  font-weight: 600;
464
524
  }
465
- .rk-combo-empty[data-v-ce4c503f] {
525
+ .rk-combo-empty[data-v-aa2335fa],
526
+ .rk-combo-status[data-v-aa2335fa] {
466
527
  padding: 0.75rem 0.625rem;
467
528
  font-size: 0.875rem;
468
529
  color: var(--color-ink-soft);
469
530
  }
470
- .rk-combo-error[data-v-ce4c503f] {
531
+ .rk-combo-status[data-v-aa2335fa] {
532
+ display: flex;
533
+ flex-direction: column;
534
+ gap: 0.5rem;
535
+ }
536
+ .rk-combo-status-rows[data-v-aa2335fa] {
537
+ display: flex;
538
+ flex-direction: column;
539
+ gap: 0.5rem;
540
+ }
541
+ .rk-combo-error[data-v-aa2335fa] {
471
542
  font-size: 0.75rem;
472
543
  color: var(--color-negative);
473
544
  }
474
- .rk-combo-hint[data-v-ce4c503f] {
545
+ .rk-combo-hint[data-v-aa2335fa] {
475
546
  font-size: 0.75rem;
476
547
  color: var(--color-ink-soft);
477
548
  }
@@ -3036,6 +3107,110 @@ to {
3036
3107
  }
3037
3108
  }
3038
3109
 
3110
+ .rk-mega[data-v-343f9362] {
3111
+ position: relative;
3112
+ }
3113
+ .rk-mega-bar[data-v-343f9362] {
3114
+ display: flex;
3115
+ align-items: center;
3116
+ gap: 0.25rem;
3117
+ }
3118
+ .rk-mega-item[data-v-343f9362] {
3119
+ position: static;
3120
+ }
3121
+ .rk-mega-top[data-v-343f9362] {
3122
+ display: inline-flex;
3123
+ align-items: center;
3124
+ gap: 0.25rem;
3125
+ border-radius: var(--radius-cell);
3126
+ padding: 0.5rem 0.75rem;
3127
+ font-size: 0.875rem;
3128
+ font-weight: 500;
3129
+ color: var(--color-ink-soft);
3130
+ transition: color var(--duration-fast) var(--ease-standard);
3131
+ }
3132
+ .rk-mega-top[data-v-343f9362]:hover,
3133
+ .rk-mega-top[aria-expanded='true'][data-v-343f9362] {
3134
+ color: var(--color-ink);
3135
+ }
3136
+ .rk-mega-top.is-active[data-v-343f9362] {
3137
+ color: var(--color-primary);
3138
+ }
3139
+ .rk-mega-twist[data-v-343f9362] {
3140
+ width: 0.875rem;
3141
+ height: 0.875rem;
3142
+ transition: rotate var(--duration-fast) var(--ease-standard);
3143
+ }
3144
+ .rk-mega-twist.is-open[data-v-343f9362] {
3145
+ rotate: 180deg;
3146
+ }
3147
+
3148
+ /* Full width of the bar rather than of the button: that is what makes it a
3149
+ mega menu and not a dropdown. */
3150
+ .rk-mega-panel[data-v-343f9362] {
3151
+ position: absolute;
3152
+ top: calc(100% + 0.5rem);
3153
+ left: 0;
3154
+ z-index: 50;
3155
+ width: 100%;
3156
+ border-radius: var(--radius-card);
3157
+ padding: 1.25rem;
3158
+ }
3159
+ .rk-mega-panel[hidden][data-v-343f9362] {
3160
+ display: none;
3161
+ }
3162
+ .rk-mega-columns[data-v-343f9362] {
3163
+ display: grid;
3164
+ grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
3165
+ gap: 1.5rem;
3166
+ }
3167
+ .rk-mega-column-title[data-v-343f9362] {
3168
+ margin-bottom: 0.5rem;
3169
+ font-size: 0.6875rem;
3170
+ font-weight: 600;
3171
+ letter-spacing: 0.04em;
3172
+ text-transform: uppercase;
3173
+ color: var(--color-ink-soft);
3174
+ }
3175
+ .rk-mega-links[data-v-343f9362] {
3176
+ display: flex;
3177
+ flex-direction: column;
3178
+ gap: 1px;
3179
+ }
3180
+ .rk-mega-link[data-v-343f9362] {
3181
+ display: block;
3182
+ border-radius: var(--radius-cell);
3183
+ padding: 0.375rem 0.5rem;
3184
+ transition: background-color var(--duration-fast) var(--ease-standard);
3185
+ }
3186
+ .rk-mega-link[data-v-343f9362]:hover {
3187
+ background: var(--color-muted);
3188
+ }
3189
+ .rk-mega-link-label[data-v-343f9362] {
3190
+ display: block;
3191
+ font-size: 0.875rem;
3192
+ color: var(--color-ink);
3193
+ }
3194
+ .rk-mega-link-note[data-v-343f9362] {
3195
+ display: block;
3196
+ margin-top: 0.125rem;
3197
+ font-size: 0.75rem;
3198
+ line-height: 1.4;
3199
+ color: var(--color-ink-soft);
3200
+ }
3201
+
3202
+ /* On a narrow screen the panel is the page width and the columns stack,
3203
+ because a four-column grid in a 390px column is four unreadable columns. */
3204
+ @media (max-width: 48rem) {
3205
+ .rk-mega-panel[data-v-343f9362] {
3206
+ padding: 1rem;
3207
+ }
3208
+ .rk-mega-columns[data-v-343f9362] {
3209
+ grid-template-columns: minmax(0, 1fr);
3210
+ gap: 1rem;
3211
+ }
3212
+ }
3213
+
3039
3214
  /* The root carries no layout of its own, and that is the fix for a real bug
3040
3215
  rather than a style preference.
3041
3216
 
@@ -0,0 +1,53 @@
1
+ export interface MegaMenuLink {
2
+ key: string;
3
+ /** Router destination. */
4
+ to: string;
5
+ /** Already translated. */
6
+ label: string;
7
+ /** A line under the label, for a link whose name is not enough. */
8
+ description?: string | undefined;
9
+ }
10
+ export interface MegaMenuColumn {
11
+ key: string;
12
+ /** A heading over the column. Already translated. */
13
+ title?: string | undefined;
14
+ links: readonly MegaMenuLink[];
15
+ }
16
+ export interface MegaMenuItem<K extends string> {
17
+ /** Identity, compared against `active`. */
18
+ key: K;
19
+ /** Already translated. */
20
+ label: string;
21
+ /** A plain link, for a top-level item with nothing under it. */
22
+ to?: string | undefined;
23
+ /** What the panel holds. With none, the item is just a link. */
24
+ columns?: readonly MegaMenuColumn[] | undefined;
25
+ }
26
+ declare const __VLS_export: <K extends string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
27
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<{
28
+ items: readonly MegaMenuItem<K>[];
29
+ /** Which section is current. Usually derived from the route. */
30
+ active?: K | undefined;
31
+ /** Accessible name for the navigation landmark. */
32
+ label?: string | undefined;
33
+ /** Whether a pointer opens a panel as well as a click. */
34
+ openOnHover?: boolean | undefined;
35
+ /** How long the pointer has to leave before the panel closes, in ms. */
36
+ hoverDelay?: number | undefined;
37
+ }> & (typeof globalThis extends {
38
+ __VLS_PROPS_FALLBACK: infer P;
39
+ } ? P : {});
40
+ expose: (exposed: {}) => void;
41
+ attrs: any;
42
+ slots: { [K_1 in K]?: (props: {}) => any; };
43
+ emit: {};
44
+ }>) => import('vue').VNode & {
45
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
46
+ };
47
+ declare const _default: typeof __VLS_export;
48
+ export default _default;
49
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
50
+ [K in keyof T]: T[K];
51
+ } : {
52
+ [K in keyof T as K]: T[K];
53
+ }) & {};
@@ -65,5 +65,7 @@ export { default as ResponsiveDialog } from './ResponsiveDialog.vue';
65
65
  export { default as BaseTabs } from './BaseTabs.vue';
66
66
  export type { TabPanel } from './BaseTabs.vue';
67
67
  export { default as BaseTooltip } from './BaseTooltip.vue';
68
+ export { default as MegaMenu } from './MegaMenu.vue';
69
+ export type { MegaMenuColumn, MegaMenuItem, MegaMenuLink } from './MegaMenu.vue';
68
70
  export { default as NavLinks } from './NavLinks.vue';
69
71
  export type { NavLinkItem } from './NavLinks.vue';