@wpic/ui 0.9.86 → 0.9.146

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wpic/ui",
3
- "version": "0.9.86",
3
+ "version": "0.9.146",
4
4
  "type": "module",
5
5
  "description": "WPIC shared Vue 3 component library",
6
6
  "publishConfig": {
@@ -46,6 +46,7 @@
46
46
  "@floating-ui/vue": "^1.1.11",
47
47
  "@playwright/test": "^1.63.0",
48
48
  "@tailwindcss/vite": "^4.2.1",
49
+ "@types/markdown-it": "^14.2.0",
49
50
  "@vitejs/plugin-vue": "^6.0.0",
50
51
  "lucide-vue-next": "^0.577.0",
51
52
  "pinia": "^3.0.4",
@@ -63,10 +64,11 @@
63
64
  "@tiptap/extension-character-count": "3.31.3",
64
65
  "@tiptap/extension-document": "3.31.3",
65
66
  "@tiptap/extension-paragraph": "3.31.3",
67
+ "@tiptap/extension-placeholder": "3.31.3",
66
68
  "@tiptap/extension-text": "3.31.3",
67
69
  "@tiptap/pm": "3.31.3",
68
- "@tiptap/vue-3": "3.31.3",
69
70
  "@tiptap/starter-kit": "3.31.3",
70
- "@tiptap/extension-placeholder": "3.31.3"
71
+ "@tiptap/vue-3": "3.31.3",
72
+ "markdown-it": "^15.0.3"
71
73
  }
72
74
  }
package/src/style.css CHANGED
@@ -228,6 +228,23 @@
228
228
  .dark .wpic-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.28); }
229
229
  .dark .wpic-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.44); }
230
230
 
231
+ /* installWpicScrollReveal(): thin scrollbars everywhere, shown while scrolling and faded out by
232
+ script through --wpic-scrollbar-alpha (not inherited, so nested scrollers stay hidden). */
233
+ @property --wpic-scrollbar-alpha { syntax: '<number>'; inherits: false; initial-value: 0; }
234
+ html.wpic-scroll-reveal-root { --wpic-scrollbar-rgb: 82 82 91; --wpic-scrollbar-max: 0.48; }
235
+ html.wpic-scroll-reveal-root.dark { --wpic-scrollbar-rgb: 255 255 255; --wpic-scrollbar-max: 0.28; }
236
+ html.wpic-scroll-reveal-root, html.wpic-scroll-reveal-root * {
237
+ scrollbar-width: thin;
238
+ scrollbar-color: rgb(var(--wpic-scrollbar-rgb) / calc(var(--wpic-scrollbar-max) * var(--wpic-scrollbar-alpha, 0))) transparent;
239
+ }
240
+ html.wpic-scroll-reveal-root ::-webkit-scrollbar { width: 6px; height: 6px; }
241
+ html.wpic-scroll-reveal-root ::-webkit-scrollbar-track, html.wpic-scroll-reveal-root ::-webkit-scrollbar-corner { background: transparent; }
242
+ html.wpic-scroll-reveal-root ::-webkit-scrollbar-thumb {
243
+ border-radius: 6px;
244
+ background: rgb(var(--wpic-scrollbar-rgb) / calc(var(--wpic-scrollbar-max) * var(--wpic-scrollbar-alpha, 0)));
245
+ }
246
+ html.wpic-scroll-reveal-root ::-webkit-scrollbar-thumb:hover { background: rgb(var(--wpic-scrollbar-rgb) / var(--wpic-scrollbar-max)); }
247
+
231
248
  /* ── Range slider ─────────────────────────────────────────────────────── */
232
249
  input[type="range"].wpic-legacy-slider-themed {
233
250
  -webkit-appearance: none; appearance: none;
@@ -434,25 +451,13 @@ input[type="range"].wpic-legacy-slider-themed::-webkit-slider-thumb {
434
451
  .wpic-theme .wpic-stat-card--featured > .wpic-card__body { padding-top: 0; }
435
452
  .wpic-theme .wpic-stat-card--featured .wpic-stat-card__label { margin-inline: calc(-1 * var(--wpic-card-padding-x)); padding: 0.75rem var(--wpic-card-padding-x); background: var(--wpic-accent); color: var(--wpic-on-accent); font-weight: 600; }
436
453
 
437
- /* UI5 segmented options and teleported surfaces. */
438
- /* Outrank the component's legacy dark/subtle rules, regardless of CSS order. */
439
- .wpic-theme .wpic-segmented-control:is(.wpic-segmented-control--default, .wpic-segmented-control--subtle) { background: var(--wpic-segment-track); border: 0; padding: 3px; border-radius: var(--radius-lg, 0.5rem); gap: 2px; box-shadow: inset 0 0 0 1px var(--wpic-segment-outline); }
440
- .wpic-theme .wpic-segmented-control .wpic-segmented-control__button { border: 0; color: var(--wpic-segment-muted); background: transparent; }
441
- .wpic-theme .wpic-segmented-control:is(.wpic-segmented-control--default, .wpic-segmented-control--subtle) .wpic-segmented-control__button { border-radius: max(0px, calc(var(--radius-lg, 0.5rem) - 3px)); }
442
- .wpic-theme .wpic-segmented-control .wpic-segmented-control__button:hover:not(:disabled) { color: var(--wpic-text); background: var(--wpic-segment-hover); }
443
- .wpic-theme .wpic-segmented-control:is(.wpic-segmented-control--default, .wpic-segmented-control--subtle) .wpic-segmented-control__button--active,
444
- .wpic-theme .wpic-segmented-control:is(.wpic-segmented-control--default, .wpic-segmented-control--subtle) .wpic-segmented-control__button--active:hover:not(:disabled) { color: var(--wpic-text); background: var(--wpic-segment-active); box-shadow: var(--wpic-segment-shadow); }
445
- /* Match WButton outer heights and text sizes, including the track padding. */
446
- .wpic-theme .wpic-segmented-control--xs { height: 24px; }
447
- .wpic-theme .wpic-segmented-control--sm { height: 32px; }
448
- .wpic-theme .wpic-segmented-control--md { height: 36px; }
449
- .wpic-theme .wpic-segmented-control--lg { height: 44px; }
450
- .wpic-theme .wpic-segmented-control:is(.wpic-segmented-control--xs, .wpic-segmented-control--sm, .wpic-segmented-control--md, .wpic-segmented-control--lg) { box-sizing: border-box; }
451
- .wpic-theme .wpic-segmented-control--xs .wpic-segmented-control__button { height: 18px; min-height: 0; font-size: 0.75rem; }
452
- .wpic-theme .wpic-segmented-control--sm .wpic-segmented-control__button { height: 26px; min-height: 0; font-size: 0.875rem; }
453
- .wpic-theme .wpic-segmented-control--md .wpic-segmented-control__button { height: 30px; min-height: 0; font-size: 1rem; }
454
- .wpic-theme .wpic-segmented-control--lg .wpic-segmented-control__button { height: 38px; min-height: 0; font-size: 1rem; }
455
- .wpic-theme .wpic-segmented-control .wpic-segmented-control__button:focus-visible { outline: 1px solid var(--wpic-accent); box-shadow: 0 0 0 3px var(--wpic-focus-ring); }
454
+ /* Flat segmented controls share the input border and keep all options flush. */
455
+ .wpic-theme .wpic-segmented-control:is(.wpic-segmented-control--default,.wpic-segmented-control--subtle) {background:var(--wpic-segment-track);border-color:var(--wpic-border);}
456
+ .wpic-theme .wpic-segmented-control .wpic-segmented-control__button {color:var(--wpic-segment-muted);background:transparent;}
457
+ .wpic-theme .wpic-segmented-control .wpic-segmented-control__button + .wpic-segmented-control__button {border-left-color:var(--wpic-border);}
458
+ .wpic-theme .wpic-segmented-control .wpic-segmented-control__button:hover:not(:disabled) {color:var(--wpic-text);background:var(--wpic-segment-hover);}
459
+ .wpic-theme .wpic-segmented-control .wpic-segmented-control__button--active,
460
+ .wpic-theme .wpic-segmented-control .wpic-segmented-control__button--active:hover:not(:disabled) {color:var(--wpic-text);background:var(--wpic-segment-active);}
456
461
  .wpic-theme .wpic-modal-panel:not(.wpic-modal-panel--frameless) { background: var(--wpic-popover); color: var(--wpic-text); border-color: var(--wpic-border); }
457
462
  /* Tooltips keep an inverse surface, independent of popover customization. */
458
463
  .wpic-tooltip-panel {
@@ -490,11 +495,40 @@ input[type="range"].wpic-legacy-slider-themed::-webkit-slider-thumb {
490
495
  .wpic-table__expand { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin: -2px -4px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: inherit; cursor: pointer; }
491
496
  .wpic-table__expand:focus-visible { outline: 2px solid var(--wpic-focus-ring, #85c531); outline-offset: 1px; }
492
497
  /* Neutral table surfaces; themes may override either shade independently. */
493
- .wpic-table__header { background: var(--wpic-table-header, #f4f4f5); }
494
- .dark .wpic-table__header { background: var(--wpic-table-header, color-mix(in srgb, var(--wpic-surface, #18181b) 92%, #a1a1aa 8%)); }
495
- .wpic-table__summary { background: var(--wpic-raised, var(--wpic-legacy-bg-input)); }
498
+ .wpic-table__header, .wpic-table__summary { background: var(--wpic-table-header, #f4f4f5); }
499
+ .dark .wpic-table__header, .dark .wpic-table__summary { background: var(--wpic-table-header, color-mix(in srgb, var(--wpic-surface, #18181b) 92%, #a1a1aa 8%)); }
496
500
  .wpic-table__row:hover { background: var(--wpic-table-row-hover, color-mix(in srgb, var(--wpic-surface, #fff) 96%, #71717a 4%)); }
497
501
  .dark .wpic-table__row:hover { background: var(--wpic-table-row-hover, color-mix(in srgb, var(--wpic-surface, #18181b) 96%, #a1a1aa 4%)); }
502
+ /* Editable body cells match WSpreadsheet; opaque so a fixed first column stays solid. */
503
+ .wpic-table__row > .wpic-table__cell--editable { background: var(--wpic-table-editable, #fffbeb); }
504
+ .dark .wpic-table__row > .wpic-table__cell--editable { background: var(--wpic-table-editable, color-mix(in srgb, var(--wpic-surface, #18181b) 90%, #facc15 10%)); }
505
+ .wpic-table__row > .wpic-table__cell--editable:focus-within { box-shadow: inset 0 0 0 2px var(--wpic-primary, #6366f1); }
506
+ .wpic-table__resizable { position: relative; }
507
+ .wpic-table__resizable.wpic-table__sticky { position: sticky; }
508
+ .wpic-table__resize-handle {
509
+ position: absolute;
510
+ z-index: 5;
511
+ top: 0;
512
+ /* Centred on the column border: half over this header, half over the next. */
513
+ right: -5px;
514
+ bottom: 0;
515
+ width: 10px;
516
+ cursor: col-resize;
517
+ touch-action: none;
518
+ }
519
+ .wpic-table__resize-handle::after {
520
+ position: absolute;
521
+ top: 25%;
522
+ bottom: 25%;
523
+ left: 4px;
524
+ width: 2px;
525
+ background: transparent;
526
+ content: '';
527
+ }
528
+ .wpic-table__resize-handle:hover::after,
529
+ .wpic-table__resize-handle:focus-visible::after { background: var(--wpic-primary, #6366f1); }
530
+ .wpic-table__resize-handle:focus-visible { outline: 2px solid var(--wpic-primary, #6366f1); outline-offset: -2px; }
531
+ .wpic-table--resized td { overflow: hidden; text-overflow: ellipsis; }
498
532
  .wpic-table__sticky {
499
533
  background: inherit;
500
534
  }
@@ -508,10 +542,13 @@ input[type="range"].wpic-legacy-slider-themed::-webkit-slider-thumb {
508
542
  .wpic-theme .wpic-table__divider {
509
543
  border-color: var(--wpic-table-border, var(--wpic-border));
510
544
  }
545
+ .wpic-theme .wpic-table--top-divider {
546
+ border-top: 1px solid var(--wpic-table-border, var(--wpic-border));
547
+ }
511
548
  /* A table inside a card starts with the same 1px divider as the card edge.
512
549
  When it directly follows the card header, that divider replaces the
513
550
  header's bottom border so the seam remains one pixel thick. */
514
- .wpic-theme .wpic-card--bordered > .wpic-card__body > .wpic-table:not(.border-t) .wpic-table__scroll {
551
+ .wpic-theme .wpic-card--bordered > .wpic-card__body > .wpic-table:not(.border-t):not(.wpic-table--top-divider):not(.wpic-table--bordered) .wpic-table__scroll {
515
552
  border-top: 1px solid var(--wpic-border);
516
553
  }
517
554
  .wpic-theme .wpic-card--bordered:has(> .wpic-card__body > .wpic-table:first-child:not(.border-t)) > .wpic-card__header--divided {
@@ -535,3 +572,85 @@ input[type="range"].wpic-legacy-slider-themed::-webkit-slider-thumb {
535
572
  .wpic-table__pagination { max-width: 100%; }
536
573
  .wpic-table__pagination button { min-width: 44px; height: 44px; flex-shrink: 0; }
537
574
  }
575
+
576
+ /* Geometry of a chat composer's toolbar buttons (Send is the reference), shared so hosts can add
577
+ buttons that match it exactly. The panel composer uses 32px rounded squares in a 40px toolbar;
578
+ the launcher composer 40px in a 52px band. */
579
+ .wpic-chat-composer-metrics { --wpic-composer-action-size: 2rem; --wpic-composer-action-radius: 0.5rem; --wpic-composer-toolbar-height: 2.5rem; --wpic-composer-text-inset: 0.625rem 1rem 0.75rem; }
580
+ .wpic-chat-composer-metrics--launcher { --wpic-composer-action-size: 2.5rem; --wpic-composer-action-radius: 0.75rem; --wpic-composer-toolbar-height: 3.25rem; --wpic-composer-text-inset: 1.375rem 2rem 0.75rem; }
581
+
582
+ /* Content shown in place of a chat composer's text area, such as a dictation in progress. The
583
+ text area keeps its size underneath and the toolbar stays in place, so nothing moves. */
584
+ .wpic-chat-composer-overlay {
585
+ position: absolute;
586
+ inset: 0 0 var(--wpic-composer-toolbar-height, 2.5rem) 0;
587
+ z-index: 5;
588
+ display: flex;
589
+ align-items: center;
590
+ border-top-left-radius: inherit;
591
+ border-top-right-radius: inherit;
592
+ }
593
+ /* The text area keeps its size under the overlay but is not shown or reachable. */
594
+ .is-overlaid .wpic-chat-editor,
595
+ .is-overlaid > textarea { visibility: hidden; }
596
+ .wpic-composer-overlay-enter-active,
597
+ .wpic-composer-overlay-leave-active {
598
+ transition: opacity 180ms ease, transform 180ms ease;
599
+ }
600
+ .wpic-composer-overlay-enter-from,
601
+ .wpic-composer-overlay-leave-to {
602
+ opacity: 0;
603
+ transform: translateY(2px);
604
+ }
605
+ @media (prefers-reduced-motion: reduce) {
606
+ .wpic-composer-overlay-enter-active,
607
+ .wpic-composer-overlay-leave-active { transition: none; }
608
+ }
609
+
610
+ /* Optional custom hues for WTag/WBadge, including explicit theme previews. */
611
+ .wpic-custom-color {
612
+ background: var(--wpic-custom-bg-light);
613
+ color: var(--wpic-custom-text-light);
614
+ border-color: var(--wpic-custom-border-light);
615
+ }
616
+ .dark .wpic-custom-color--auto, .wpic-custom-color--dark {
617
+ background: var(--wpic-custom-bg-dark);
618
+ color: var(--wpic-custom-text-dark);
619
+ border-color: var(--wpic-custom-border-dark);
620
+ }
621
+
622
+ /* Inset tables own their frame; edge-to-edge tables retain their card frame. */
623
+ .wpic-table--bordered {
624
+ border: 1px solid var(--wpic-table-border, var(--wpic-border, #e4e4e7));
625
+ border-radius: 8px;
626
+ overflow: hidden;
627
+ }
628
+ .dark .wpic-table--bordered { border-color: var(--wpic-table-border, var(--wpic-border, #27272a)); }
629
+ .wpic-table__header { border-bottom-width: 2px; }
630
+ .wpic-table__summary { border-top: 2px solid var(--wpic-table-border, var(--wpic-border, #e4e4e7)); border-bottom-width: 2px; }
631
+ .dark .wpic-table__summary { border-top-color: var(--wpic-table-border, var(--wpic-border, #27272a)); }
632
+ .wpic-table__summary:last-child { border-bottom-width: 0; }
633
+
634
+ /* Readable secondary text in controls; chart fills and control surfaces stay unchanged. */
635
+ .wpic-theme .wpic-select__placeholder,
636
+ .wpic-theme .wpic-pagination > span,
637
+ .wpic-theme .wpic-table__footer > span { color: var(--wpic-muted); }
638
+
639
+ .wpic-btn-primary { color: var(--wpic-on-accent, #fff); }
640
+
641
+ /* Bounded scrolling keeps sticky headers in the same coordinate system as body cells. */
642
+ .wpic-table--sticky-header thead th {
643
+ position: sticky;
644
+ top: 0;
645
+ z-index: 20;
646
+ background: var(--wpic-table-header, #f4f4f5);
647
+ }
648
+ .dark .wpic-table--sticky-header thead th {
649
+ background: var(--wpic-table-header, color-mix(in srgb, var(--wpic-surface, #18181b) 92%, #a1a1aa 8%));
650
+ }
651
+ .wpic-table--sticky-header thead th.wpic-table__sticky { z-index: 30; }
652
+ .wpic-table__top-scroll { overflow-x: auto; overflow-y: hidden; height: 16px; max-width: 100%; scrollbar-width: thin; }
653
+ .wpic-table__top-scroll::-webkit-scrollbar { height: 12px; }
654
+ .wpic-table__top-scroll::-webkit-scrollbar-thumb { background: var(--wpic-muted, #71717a); border-radius: 6px; }
655
+ .wpic-table__top-scroll::-webkit-scrollbar-track { background: var(--wpic-table-header, #f4f4f5); }
656
+ .wpic-table__scroll:focus-visible, .wpic-table__top-scroll:focus-visible { outline: 2px solid var(--wpic-primary, #85c531); outline-offset: -2px; }