@vokality/design-system 4.0.2 → 5.0.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/CHANGELOG.md +18 -0
- package/README.md +2 -2
- package/dist/chat.d.ts +65 -2
- package/dist/components/ChatInbox/ChatInbox.d.ts +3 -1
- package/dist/components/ChatInbox/ChatInbox.js +3 -2
- package/dist/components/ChatPanel/ChatPanel.d.ts +1 -1
- package/dist/components/ChatPanel/ChatPanel.js +2 -2
- package/dist/components/ChatPanel/activity.d.ts +6 -0
- package/dist/components/ChatPanel/activity.js +102 -0
- package/dist/components/ChatPanel/transcript.d.ts +3 -3
- package/dist/components/ChatPanel/transcript.js +5 -4
- package/dist/components.css +58 -4
- package/dist/internal/useThrottled.d.ts +2 -0
- package/dist/internal/useThrottled.js +17 -0
- package/dist/localization.d.ts +13 -0
- package/dist/localization.js +13 -1
- package/dist/vokality.css +58 -4
- package/dist/vokality.iife.js +475 -96
- package/docs/components/ChatInbox/README.md +24 -7
- package/docs/components/ChatWidget/README.md +48 -7
- package/package.json +1 -1
- package/skills/vokality-design-system/SKILL.md +2 -2
- package/skills/vokality-design-system/references/examples.tsx +8 -8
package/dist/vokality.css
CHANGED
|
@@ -2285,6 +2285,8 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; padding-bl
|
|
|
2285
2285
|
.vk-chat-message-outgoing .vk-chat-message-body { border-color: var(--primary-line); background: var(--primary-tint); }
|
|
2286
2286
|
.vk-chat-message-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-xs) var(--space-sm); margin-bottom: var(--space-xs); }
|
|
2287
2287
|
.vk-chat-message-author { font-size: var(--text-xs); font-weight: 600; color: var(--foreground); overflow-wrap: anywhere; }
|
|
2288
|
+
.vk-chat-message-source { display: inline-flex; align-items: center; gap: var(--space-xs); padding-inline: var(--space-xs); border: 1px solid var(--border-subtle); font-size: var(--text-xs); line-height: 1.5; color: var(--muted-foreground); overflow-wrap: anywhere; }
|
|
2289
|
+
.vk-chat-message-source > svg, .vk-chat-message-source > img { flex: none; width: 0.75rem; height: 0.75rem; }
|
|
2288
2290
|
.vk-chat-message-time { font: var(--text-xs)/1.5 var(--font-numeric); font-variant-numeric: tabular-nums; color: var(--muted-foreground); }
|
|
2289
2291
|
.vk-chat-message-content { min-width: 0; max-width: none; font-size: var(--text-sm); color: var(--foreground); white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
2290
2292
|
.vk-chat-message-content > :last-child { margin-bottom: 0; }
|
|
@@ -2295,24 +2297,73 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; padding-bl
|
|
|
2295
2297
|
.vk-chat-delivery { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); margin-top: var(--space-sm); font-size: var(--text-xs); color: var(--muted-foreground); overflow-wrap: anywhere; }
|
|
2296
2298
|
.vk-chat-delivery-failed { color: var(--danger); }
|
|
2297
2299
|
.vk-chat-delivery .vk-btn { width: auto; }
|
|
2300
|
+
.vk-chat-message-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--space-xs); }
|
|
2301
|
+
.vk-chat-message-outgoing .vk-chat-message-actions { justify-content: flex-end; }
|
|
2302
|
+
.vk-chat-message-actions .vk-btn { width: auto; }
|
|
2303
|
+
/* An agent run: a status line over its narration and steps. The log ignores the entries; a throttled status announces them. */
|
|
2304
|
+
.vk-chat-activity { min-width: 0; border: 1px solid var(--border-subtle); color: var(--foreground); }
|
|
2305
|
+
.vk-chat-activity-line { display: flex; align-items: flex-start; gap: var(--space-sm); box-sizing: border-box; width: 100%; min-width: 0; padding: calc((var(--control-height) - 1.5em) / 2) var(--space-md); border: 0; background: transparent; color: inherit; font: inherit; font-size: var(--text-sm); line-height: 1.5; text-align: start; }
|
|
2306
|
+
/* Marks line up with the first line of text when the summary wraps. */
|
|
2307
|
+
.vk-chat-activity-line > .vk-icon { margin-top: calc((1.5em - 16px) / 2); }
|
|
2308
|
+
.vk-chat-activity-line > .vk-chat-activity-spinner { margin-top: calc((1.5em - 0.75rem) / 2); }
|
|
2309
|
+
.vk-chat-activity-toggle { cursor: pointer; }
|
|
2310
|
+
.vk-chat-activity-toggle:hover { background: var(--card-fill); }
|
|
2311
|
+
.vk-chat-activity-toggle:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
|
|
2312
|
+
.vk-chat-activity-text { display: flex; flex: 1; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-sm); min-width: 0; }
|
|
2313
|
+
.vk-chat-activity-title { font-weight: 600; overflow-wrap: anywhere; }
|
|
2314
|
+
.vk-chat-activity-state, .vk-chat-activity-outcome { color: var(--muted-foreground); overflow-wrap: anywhere; }
|
|
2315
|
+
.vk-chat-activity-elapsed { margin-inline-start: auto; font: var(--text-xs)/1.5 var(--font-numeric); font-variant-numeric: tabular-nums; color: var(--muted-foreground); }
|
|
2316
|
+
.vk-chat-activity-icon { flex: none; color: var(--muted-foreground); }
|
|
2317
|
+
.vk-chat-activity[data-state="finished"] .vk-chat-activity-icon { color: var(--success); }
|
|
2318
|
+
/* Waiting on a person: the accent, with the word "Waiting" beside it. */
|
|
2319
|
+
.vk-chat-activity[data-state="waiting"] { border-color: var(--primary-line); }
|
|
2320
|
+
.vk-chat-activity[data-state="waiting"] .vk-chat-activity-icon, .vk-chat-activity[data-state="waiting"] .vk-chat-activity-state { color: var(--primary); }
|
|
2321
|
+
.vk-chat-activity[data-state="failed"] .vk-chat-activity-icon, .vk-chat-activity[data-state="failed"] .vk-chat-activity-state { color: var(--danger); }
|
|
2322
|
+
.vk-chat-activity-spinner { flex: none; width: 0.75rem; height: 0.75rem; }
|
|
2323
|
+
.vk-chat-activity-chevron { flex: none; color: var(--muted-foreground); transition: transform 0.16s ease-out; }
|
|
2324
|
+
[data-state="open"] > .vk-chat-activity-chevron { transform: rotate(180deg); }
|
|
2325
|
+
.vk-chat-activity-body { display: grid; gap: var(--space-xs); padding: var(--space-sm) var(--space-md); border-top: 1px solid var(--border-subtle); }
|
|
2326
|
+
.vk-chat-activity-body[hidden] { display: none; }
|
|
2327
|
+
.vk-chat-activity-earlier { display: grid; gap: var(--space-xs); justify-items: start; }
|
|
2328
|
+
.vk-chat-activity-earlier > .vk-btn { width: auto; }
|
|
2329
|
+
.vk-chat-activity-entries { display: grid; gap: var(--space-xs); width: 100%; margin: 0; padding: 0; list-style: none; }
|
|
2330
|
+
.vk-chat-narration { max-width: none; padding-block: var(--space-xs); font-size: var(--text-sm); color: var(--foreground); overflow-wrap: anywhere; }
|
|
2331
|
+
.vk-chat-narration > :last-child { margin-bottom: 0; }
|
|
2332
|
+
.vk-chat-step { display: flex; align-items: baseline; gap: var(--space-sm); min-width: 0; font-size: var(--text-xs); line-height: 1.5; color: var(--muted-foreground); }
|
|
2333
|
+
.vk-chat-step-icon { flex: none; align-self: center; }
|
|
2334
|
+
.vk-chat-step-text { display: flex; flex: 1; flex-wrap: wrap; gap: 0 var(--space-sm); min-width: 0; }
|
|
2335
|
+
.vk-chat-step-label { color: var(--foreground); overflow-wrap: anywhere; }
|
|
2336
|
+
.vk-chat-step-outcome { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
|
|
2337
|
+
.vk-chat-step-state { display: inline-flex; flex: none; align-items: center; align-self: center; gap: var(--space-xs); }
|
|
2338
|
+
.vk-chat-step[data-state="failed"] .vk-chat-step-state { color: var(--danger); }
|
|
2339
|
+
.vk-chat-activity-omitted { margin: 0; font-size: var(--text-xs); line-height: 1.5; color: var(--muted-foreground); }
|
|
2298
2340
|
.vk-chat-empty { display: grid; align-content: center; min-width: 0; padding: var(--space-xl) var(--space-md); font-size: var(--text-sm); line-height: 1.6; color: var(--muted-foreground); overflow-wrap: anywhere; }
|
|
2299
2341
|
.vk-chat-pending { padding-block: var(--space-md); font-size: var(--text-sm); color: var(--muted-foreground); overflow-wrap: anywhere; }
|
|
2300
2342
|
.vk-chat-feedback { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); border-top: 1px solid var(--danger-line); color: var(--danger); font-size: var(--text-sm); overflow-wrap: anywhere; }
|
|
2301
2343
|
.vk-chat-feedback > div { flex: 1; min-width: 0; }
|
|
2302
2344
|
.vk-chat-feedback .vk-btn { width: auto; }
|
|
2345
|
+
.vk-chat-read-only { display: flex; flex: none; align-items: flex-start; gap: var(--space-sm); padding: var(--space-md); border-top: 1px solid var(--border-subtle); background: var(--background); font-size: var(--text-sm); line-height: 1.5; color: var(--muted-foreground); overflow-wrap: anywhere; }
|
|
2346
|
+
.vk-chat-read-only > svg { flex: none; margin-top: 0.125rem; }
|
|
2347
|
+
.vk-chat-read-only > div { flex: 1; min-width: 0; }
|
|
2303
2348
|
.vk-chat-composer { display: grid; grid-template-rows: minmax(0, 1fr) auto; flex: 0 1 auto; gap: var(--space-sm); box-sizing: border-box; min-width: 0; min-height: 0; max-height: 65%; overflow: hidden; padding: var(--space-md); border-top: 1px solid var(--border-subtle); background: var(--background); }
|
|
2304
2349
|
.vk-chat-composer > .vk-field { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
|
|
2305
2350
|
.vk-chat-composer .vk-rich-content { min-height: 4rem; max-height: 8rem; overflow-y: auto; padding: var(--space-sm); }
|
|
2306
2351
|
.vk-chat-composer-actions { display: flex; justify-content: flex-end; }
|
|
2307
2352
|
.vk-chat-composer-actions .vk-btn { width: auto; }
|
|
2308
2353
|
@media (max-width: 40rem) {
|
|
2309
|
-
.vk-chat-header, .vk-chat-transcript, .vk-chat-composer { padding: var(--space-sm); }
|
|
2354
|
+
.vk-chat-header, .vk-chat-transcript, .vk-chat-composer, .vk-chat-read-only { padding: var(--space-sm); }
|
|
2355
|
+
.vk-chat-activity-line, .vk-chat-activity-body { padding-inline: var(--space-sm); }
|
|
2310
2356
|
.vk-chat-message { max-width: 100%; }
|
|
2311
2357
|
.vk-chat-message-body { padding: var(--space-sm); }
|
|
2312
2358
|
}
|
|
2313
2359
|
@media (forced-colors: active) {
|
|
2314
2360
|
.vk-chat-message-outgoing .vk-chat-message-body { border-color: Highlight; }
|
|
2315
|
-
.vk-chat-delivery-failed, .vk-chat-feedback { color: CanvasText; }
|
|
2361
|
+
.vk-chat-delivery-failed, .vk-chat-feedback, .vk-chat-step[data-state="failed"] .vk-chat-step-state, .vk-chat-activity[data-state="failed"] .vk-chat-activity-state, .vk-chat-activity[data-state="waiting"] .vk-chat-activity-state, .vk-chat-activity-icon { color: CanvasText; }
|
|
2362
|
+
.vk-chat-activity[data-state="waiting"] { border-color: Highlight; }
|
|
2363
|
+
.vk-chat-activity-toggle { color: ButtonText; }
|
|
2364
|
+
}
|
|
2365
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2366
|
+
.vk-chat-activity-chevron { transition: none; }
|
|
2316
2367
|
}
|
|
2317
2368
|
.vk-chat-widget-launcher { position: fixed; z-index: var(--z-fixed); inset-block-end: calc(var(--space-lg) + env(safe-area-inset-bottom, 0px)); inset-inline-end: calc(var(--space-lg) + env(safe-area-inset-right, 0px)); }
|
|
2318
2369
|
.vk-chat-widget-start { inset-inline-end: auto; inset-inline-start: calc(var(--space-lg) + env(safe-area-inset-left, 0px)); }
|
|
@@ -2324,7 +2375,7 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; padding-bl
|
|
|
2324
2375
|
.vk-chat-widget-panel { transform-origin: var(--radix-popover-content-transform-origin); }
|
|
2325
2376
|
.vk-chat-widget-panel[data-state="closed"] { pointer-events: none; }
|
|
2326
2377
|
@media (max-height: 32rem) {
|
|
2327
|
-
.vk-chat-widget-panel .vk-chat-header, .vk-chat-widget-panel .vk-chat-transcript, .vk-chat-widget-panel .vk-chat-composer { padding: var(--space-sm); }
|
|
2378
|
+
.vk-chat-widget-panel .vk-chat-header, .vk-chat-widget-panel .vk-chat-transcript, .vk-chat-widget-panel .vk-chat-composer, .vk-chat-widget-panel .vk-chat-read-only { padding: var(--space-sm); }
|
|
2328
2379
|
.vk-chat-widget-panel .vk-chat-transcript { flex: 0 1 4rem; min-height: 0; max-height: 25%; }
|
|
2329
2380
|
.vk-chat-widget-panel .vk-chat-composer { flex: 1; max-height: none; }
|
|
2330
2381
|
.vk-chat-widget-panel .vk-chat-composer .vk-rich-content { min-height: 2rem; padding-block: var(--space-xs); }
|
|
@@ -2333,7 +2384,8 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; padding-bl
|
|
|
2333
2384
|
.vk-chat-widget-trigger { border-color: ButtonText; color: ButtonText; }
|
|
2334
2385
|
.vk-chat-unread { background: Highlight; color: HighlightText; }
|
|
2335
2386
|
}
|
|
2336
|
-
|
|
2387
|
+
/* The inbox fills its container; the application gives the container a height (a docked pane, a page region). */
|
|
2388
|
+
.vk-chat-inbox { container-type: inline-size; display: grid; grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr); box-sizing: border-box; width: 100%; height: 100%; min-width: 0; min-height: 0; border: 1px solid var(--border-subtle); background: var(--background); color: var(--foreground); }
|
|
2337
2389
|
.vk-chat-inbox-list { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-inline-end: 1px solid var(--border-subtle); }
|
|
2338
2390
|
.vk-chat-threads { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 0; list-style: none; }
|
|
2339
2391
|
.vk-chat-threads > li + li { border-top: 1px solid var(--border-subtle); }
|
|
@@ -2350,6 +2402,8 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; padding-bl
|
|
|
2350
2402
|
.vk-chat-inbox-detail { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
|
|
2351
2403
|
.vk-chat-no-selection { flex: 1; }
|
|
2352
2404
|
.vk-chat-back { display: none; }
|
|
2405
|
+
.vk-chat-header-actions { display: flex; flex: none; align-items: center; gap: var(--space-xs); margin-inline-start: auto; }
|
|
2406
|
+
.vk-chat-header-actions .vk-btn { width: auto; }
|
|
2353
2407
|
@container (max-width: 40rem) {
|
|
2354
2408
|
.vk-chat-inbox-list { border-inline-end: 0; }
|
|
2355
2409
|
.vk-chat-inbox:not(.vk-chat-inbox-selected) .vk-chat-inbox-detail, .vk-chat-inbox-selected .vk-chat-inbox-list { display: none; }
|