@sofya-ds/react 1.13.1 → 1.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/index.cjs +1692 -211
- package/dist/index.css +1 -1
- package/dist/index.d.cts +227 -3
- package/dist/index.d.ts +227 -3
- package/dist/index.js +1694 -214
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -113,6 +113,15 @@ __export(index_exports, {
|
|
|
113
113
|
RadioGroupOptionDescription: () => RadioGroupOptionDescription,
|
|
114
114
|
RadioGroupOptionIndicator: () => RadioGroupOptionIndicator,
|
|
115
115
|
RadioGroupOptionLabel: () => RadioGroupOptionLabel,
|
|
116
|
+
ReasoningLabsWidget: () => ReasoningLabsWidget,
|
|
117
|
+
ReasoningSummaryWidget: () => ReasoningSummaryWidget,
|
|
118
|
+
ReasoningVitalsWidget: () => ReasoningVitalsWidget,
|
|
119
|
+
ReasoningWidget: () => ReasoningWidget,
|
|
120
|
+
ReasoningWidgetActionButton: () => ReasoningWidgetActionButton,
|
|
121
|
+
ReasoningWidgetActions: () => ReasoningWidgetActions,
|
|
122
|
+
ReasoningWidgetList: () => ReasoningWidgetList,
|
|
123
|
+
ReasoningWidgetRenderer: () => ReasoningWidgetRenderer,
|
|
124
|
+
ReasoningWidgetTable: () => ReasoningWidgetTable,
|
|
116
125
|
RichTextToolbar: () => RichTextToolbar,
|
|
117
126
|
RichTextToolbarButton: () => RichTextToolbarButton,
|
|
118
127
|
RichTextToolbarGroup: () => RichTextToolbarGroup,
|
|
@@ -217,6 +226,14 @@ __export(index_exports, {
|
|
|
217
226
|
progressSizeOptions: () => progressSizeOptions,
|
|
218
227
|
radioGroupOrientationOptions: () => radioGroupOrientationOptions,
|
|
219
228
|
radioGroupVariantOptions: () => radioGroupVariantOptions,
|
|
229
|
+
reasoningWidgetActionScopeOptions: () => reasoningWidgetActionScopeOptions,
|
|
230
|
+
reasoningWidgetActionToneOptions: () => reasoningWidgetActionToneOptions,
|
|
231
|
+
reasoningWidgetDensityOptions: () => reasoningWidgetDensityOptions,
|
|
232
|
+
reasoningWidgetFrameOptions: () => reasoningWidgetFrameOptions,
|
|
233
|
+
reasoningWidgetTableAlignOptions: () => reasoningWidgetTableAlignOptions,
|
|
234
|
+
reasoningWidgetTableColumnVariantOptions: () => reasoningWidgetTableColumnVariantOptions,
|
|
235
|
+
reasoningWidgetToneOptions: () => reasoningWidgetToneOptions,
|
|
236
|
+
reasoningWidgetVariantOptions: () => reasoningWidgetVariantOptions,
|
|
220
237
|
renderTextContent: () => renderTextContent,
|
|
221
238
|
resolveSurfaceToken: () => import_tokens4.resolveSurfaceToken,
|
|
222
239
|
resolveTextStyle: () => import_tokens4.resolveTextStyle,
|
|
@@ -369,26 +386,42 @@ var React2 = __toESM(require("react"), 1);
|
|
|
369
386
|
var import_icons_react = require("@tabler/icons-react");
|
|
370
387
|
var tablerIconRegistry = {
|
|
371
388
|
IconAdjustmentsHorizontalFilled: import_icons_react.IconAdjustmentsHorizontalFilled,
|
|
389
|
+
IconActivity: import_icons_react.IconActivity,
|
|
390
|
+
IconActivityHeartbeat: import_icons_react.IconActivityHeartbeat,
|
|
372
391
|
IconAlignCenter: import_icons_react.IconAlignCenter,
|
|
373
392
|
IconAlignJustified: import_icons_react.IconAlignJustified,
|
|
374
393
|
IconAlignLeft: import_icons_react.IconAlignLeft,
|
|
375
394
|
IconAlignRight: import_icons_react.IconAlignRight,
|
|
395
|
+
IconAlertCircle: import_icons_react.IconAlertCircle,
|
|
376
396
|
IconArrowUp: import_icons_react.IconArrowUp,
|
|
377
397
|
IconArchive: import_icons_react.IconArchive,
|
|
378
398
|
IconBold: import_icons_react.IconBold,
|
|
399
|
+
IconBrain: import_icons_react.IconBrain,
|
|
379
400
|
IconBuildingHospital: import_icons_react.IconBuildingHospital,
|
|
380
401
|
IconBooks: import_icons_react.IconBooks,
|
|
381
402
|
IconBulb: import_icons_react.IconBulb,
|
|
382
403
|
IconChartBar: import_icons_react.IconChartBar,
|
|
383
404
|
IconCheck: import_icons_react.IconCheck,
|
|
384
405
|
IconChecklist: import_icons_react.IconChecklist,
|
|
406
|
+
IconClipboardList: import_icons_react.IconClipboardList,
|
|
407
|
+
IconClipboardText: import_icons_react.IconClipboardText,
|
|
385
408
|
IconCode: import_icons_react.IconCode,
|
|
409
|
+
IconFileText: import_icons_react.IconFileText,
|
|
410
|
+
IconFlask: import_icons_react.IconFlask,
|
|
411
|
+
IconHeartbeat: import_icons_react.IconHeartbeat,
|
|
386
412
|
IconItalic: import_icons_react.IconItalic,
|
|
387
413
|
IconLink: import_icons_react.IconLink,
|
|
388
414
|
IconList: import_icons_react.IconList,
|
|
415
|
+
IconListCheck: import_icons_react.IconListCheck,
|
|
389
416
|
IconListNumbers: import_icons_react.IconListNumbers,
|
|
417
|
+
IconNotes: import_icons_react.IconNotes,
|
|
418
|
+
IconPill: import_icons_react.IconPill,
|
|
390
419
|
IconQuote: import_icons_react.IconQuote,
|
|
420
|
+
IconReportMedical: import_icons_react.IconReportMedical,
|
|
391
421
|
IconStrikethrough: import_icons_react.IconStrikethrough,
|
|
422
|
+
IconStethoscope: import_icons_react.IconStethoscope,
|
|
423
|
+
IconTable: import_icons_react.IconTable,
|
|
424
|
+
IconTemperature: import_icons_react.IconTemperature,
|
|
392
425
|
IconUnderline: import_icons_react.IconUnderline,
|
|
393
426
|
IconChevronLeft: import_icons_react.IconChevronLeft,
|
|
394
427
|
IconChevronDown: import_icons_react.IconChevronDown,
|
|
@@ -456,6 +489,7 @@ var legacyIconToTablerNameMap = {
|
|
|
456
489
|
"lightbulb": "IconBulb",
|
|
457
490
|
"chats": "IconMessages",
|
|
458
491
|
"file": "IconFile",
|
|
492
|
+
"file-text": "IconFileText",
|
|
459
493
|
"folders": "IconFolders",
|
|
460
494
|
"sparkle": "IconSparkles",
|
|
461
495
|
"x": "IconX",
|
|
@@ -463,6 +497,21 @@ var legacyIconToTablerNameMap = {
|
|
|
463
497
|
"search": "IconSearch",
|
|
464
498
|
"arrow-up": "IconArrowUp",
|
|
465
499
|
"question": "IconHelpCircle",
|
|
500
|
+
"activity": "IconActivity",
|
|
501
|
+
"activity-heartbeat": "IconActivityHeartbeat",
|
|
502
|
+
"alert-circle": "IconAlertCircle",
|
|
503
|
+
"brain": "IconBrain",
|
|
504
|
+
"clipboard-list": "IconClipboardList",
|
|
505
|
+
"clipboard-text": "IconClipboardText",
|
|
506
|
+
"flask": "IconFlask",
|
|
507
|
+
"heartbeat": "IconHeartbeat",
|
|
508
|
+
"list-check": "IconListCheck",
|
|
509
|
+
"notes": "IconNotes",
|
|
510
|
+
"pill": "IconPill",
|
|
511
|
+
"report-medical": "IconReportMedical",
|
|
512
|
+
"stethoscope": "IconStethoscope",
|
|
513
|
+
"table": "IconTable",
|
|
514
|
+
"temperature": "IconTemperature",
|
|
466
515
|
"user-filled": "IconUserFilled",
|
|
467
516
|
"caret-up": "IconChevronUp",
|
|
468
517
|
"caret-left": "IconChevronLeft",
|
|
@@ -676,8 +725,10 @@ var defaultElements = {
|
|
|
676
725
|
"body-md": "p",
|
|
677
726
|
"body-sm": "p",
|
|
678
727
|
body: "p",
|
|
728
|
+
"clinical-body": "p",
|
|
679
729
|
"label-md": "span",
|
|
680
730
|
"settings-section-title": "span",
|
|
731
|
+
"clinical-section-title": "span",
|
|
681
732
|
"section-label": "span",
|
|
682
733
|
"eyebrow-md": "span",
|
|
683
734
|
"overline-md": "span",
|
|
@@ -705,7 +756,7 @@ var textSizeStyles = Object.fromEntries(
|
|
|
705
756
|
fontWeight: `var(--sofya-text-${size}-font-weight)`,
|
|
706
757
|
lineHeight: `var(--sofya-text-${size}-line-height)`,
|
|
707
758
|
letterSpacing: `var(--sofya-text-${size}-letter-spacing)`,
|
|
708
|
-
...size === "settings-section-title" ? { textTransform: "uppercase" } : {}
|
|
759
|
+
...size === "settings-section-title" || size === "clinical-section-title" ? { textTransform: "uppercase" } : {}
|
|
709
760
|
}
|
|
710
761
|
])
|
|
711
762
|
);
|
|
@@ -5184,11 +5235,1424 @@ var RichTextToolbarButton = React31.forwardRef(function RichTextToolbarButton2({
|
|
|
5184
5235
|
});
|
|
5185
5236
|
RichTextToolbarButton.displayName = "RichTextToolbarButton";
|
|
5186
5237
|
|
|
5187
|
-
// src/components/
|
|
5238
|
+
// src/components/reasoning-widget.tsx
|
|
5188
5239
|
var React32 = __toESM(require("react"), 1);
|
|
5189
5240
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5190
|
-
var
|
|
5191
|
-
|
|
5241
|
+
var reasoningWidgetToneOptions = [
|
|
5242
|
+
"default",
|
|
5243
|
+
"info",
|
|
5244
|
+
"success",
|
|
5245
|
+
"warning",
|
|
5246
|
+
"critical",
|
|
5247
|
+
"muted"
|
|
5248
|
+
];
|
|
5249
|
+
var reasoningWidgetDensityOptions = ["default", "compact"];
|
|
5250
|
+
var reasoningWidgetVariantOptions = [
|
|
5251
|
+
"flat",
|
|
5252
|
+
"outline",
|
|
5253
|
+
"muted",
|
|
5254
|
+
"suggestion"
|
|
5255
|
+
];
|
|
5256
|
+
var reasoningWidgetActionScopeOptions = ["item", "widget"];
|
|
5257
|
+
var reasoningWidgetActionToneOptions = [
|
|
5258
|
+
"primary",
|
|
5259
|
+
"neutral",
|
|
5260
|
+
"danger"
|
|
5261
|
+
];
|
|
5262
|
+
var reasoningWidgetTableAlignOptions = [
|
|
5263
|
+
"left",
|
|
5264
|
+
"center",
|
|
5265
|
+
"right"
|
|
5266
|
+
];
|
|
5267
|
+
var reasoningWidgetTableColumnVariantOptions = [
|
|
5268
|
+
"default",
|
|
5269
|
+
"value"
|
|
5270
|
+
];
|
|
5271
|
+
var reasoningWidgetFrameOptions = ["bordered", "minimal"];
|
|
5272
|
+
var ReasoningWidgetDensityContext = React32.createContext("default");
|
|
5273
|
+
var actionIconNames = {
|
|
5274
|
+
accept: "check",
|
|
5275
|
+
add: "plus",
|
|
5276
|
+
edit: "edit",
|
|
5277
|
+
reject: "x",
|
|
5278
|
+
remove: "trash"
|
|
5279
|
+
};
|
|
5280
|
+
var actionToneById = {
|
|
5281
|
+
accept: "primary",
|
|
5282
|
+
add: "primary",
|
|
5283
|
+
edit: "neutral",
|
|
5284
|
+
reject: "danger",
|
|
5285
|
+
remove: "danger"
|
|
5286
|
+
};
|
|
5287
|
+
var actionVariantByTone = {
|
|
5288
|
+
danger: "destructive",
|
|
5289
|
+
neutral: "ghost",
|
|
5290
|
+
primary: "subtle"
|
|
5291
|
+
};
|
|
5292
|
+
var toneSurfaceClassName = {
|
|
5293
|
+
default: "border-[color:var(--sofya-neutral-600)] bg-card",
|
|
5294
|
+
info: "border-[color:var(--sofya-tone-info-border)] bg-[color:var(--sofya-tone-info-background)]",
|
|
5295
|
+
success: "border-[color:var(--sofya-tone-success-border)] bg-[color:var(--sofya-tone-success-background)]",
|
|
5296
|
+
warning: "border-[color:var(--sofya-tone-warning-border)] bg-[color:var(--sofya-tone-warning-background)]",
|
|
5297
|
+
critical: "border-[color:var(--sofya-tone-destructive-border)] bg-[color:var(--sofya-tone-destructive-background)]",
|
|
5298
|
+
muted: "border-[color:var(--sofya-neutral-600)] bg-card"
|
|
5299
|
+
};
|
|
5300
|
+
var clinicalToneMarkerClassName = {
|
|
5301
|
+
default: "bg-[color:var(--sofya-neutral-600)]",
|
|
5302
|
+
info: "bg-secondary",
|
|
5303
|
+
success: "bg-[color:var(--sofya-tag-green)]",
|
|
5304
|
+
warning: "bg-[color:var(--sofya-tag-red)]",
|
|
5305
|
+
critical: "bg-[color:var(--sofya-tag-red)]",
|
|
5306
|
+
muted: "bg-[color:var(--sofya-neutral-600)]"
|
|
5307
|
+
};
|
|
5308
|
+
var clinicalToneSurfaceClassName = {
|
|
5309
|
+
default: "bg-transparent",
|
|
5310
|
+
info: "bg-[color:var(--sofya-neutral-50)]",
|
|
5311
|
+
success: "bg-transparent",
|
|
5312
|
+
warning: "bg-transparent",
|
|
5313
|
+
critical: "bg-transparent",
|
|
5314
|
+
muted: "bg-transparent"
|
|
5315
|
+
};
|
|
5316
|
+
var clinicalToneStatusClassName = {
|
|
5317
|
+
default: "text-[color:var(--sofya-text-subtle)]",
|
|
5318
|
+
info: "text-secondary",
|
|
5319
|
+
success: "text-[color:var(--sofya-tag-green)]",
|
|
5320
|
+
warning: "text-[color:var(--sofya-tag-red)]",
|
|
5321
|
+
critical: "text-[color:var(--sofya-tag-red)]",
|
|
5322
|
+
muted: "text-[color:var(--sofya-text-subtle)]"
|
|
5323
|
+
};
|
|
5324
|
+
var clinicalToneValueClassName = {
|
|
5325
|
+
default: "text-[color:var(--sofya-neutral-900)]",
|
|
5326
|
+
info: "text-[color:var(--sofya-neutral-900)]",
|
|
5327
|
+
success: "text-[color:var(--sofya-neutral-900)]",
|
|
5328
|
+
warning: "text-[color:var(--sofya-tag-red)]",
|
|
5329
|
+
critical: "text-[color:var(--sofya-tag-red)]",
|
|
5330
|
+
muted: "text-[color:var(--sofya-neutral-900)]"
|
|
5331
|
+
};
|
|
5332
|
+
var clinicalToneBadgeClassName = {
|
|
5333
|
+
default: "bg-[color:var(--sofya-neutral-50)] text-[color:var(--sofya-text-subtle)]",
|
|
5334
|
+
info: "bg-[color:var(--sofya-neutral-50)] text-secondary",
|
|
5335
|
+
success: "bg-[color:var(--sofya-agent-mint)] text-[color:var(--sofya-tag-green)]",
|
|
5336
|
+
warning: "bg-[color:var(--sofya-tag-sand)] text-[color:var(--sofya-tag-red)]",
|
|
5337
|
+
critical: "bg-[color:var(--sofya-tag-sand)] text-[color:var(--sofya-tag-red)]",
|
|
5338
|
+
muted: "bg-[color:var(--sofya-neutral-50)] text-[color:var(--sofya-text-subtle)]"
|
|
5339
|
+
};
|
|
5340
|
+
var clinicalDataFrameClassName = {
|
|
5341
|
+
bordered: "w-full overflow-hidden rounded-[var(--sofya-radius-lg)] border border-[color:var(--sofya-neutral-600)] bg-card",
|
|
5342
|
+
minimal: "w-full overflow-hidden rounded-[var(--sofya-radius-md)] border-0 bg-[color:var(--sofya-neutral-50)]"
|
|
5343
|
+
};
|
|
5344
|
+
var clinicalDataHeaderClassName = {
|
|
5345
|
+
bordered: "border-b border-[color:var(--sofya-neutral-600)] bg-[color:var(--sofya-neutral-50)]",
|
|
5346
|
+
minimal: "border-b border-[color:var(--sofya-neutral-600)] bg-transparent"
|
|
5347
|
+
};
|
|
5348
|
+
var clinicalLabsFrameClassName = {
|
|
5349
|
+
bordered: "w-full overflow-x-auto overflow-y-hidden rounded-[var(--sofya-radius-lg)] border border-[color:var(--sofya-neutral-600)] bg-card",
|
|
5350
|
+
minimal: "w-fit max-w-full overflow-x-auto overflow-y-hidden rounded-[var(--sofya-radius-md)] border-0 bg-[color:var(--sofya-neutral-50)]"
|
|
5351
|
+
};
|
|
5352
|
+
var tableAlignClassName = {
|
|
5353
|
+
center: "text-center",
|
|
5354
|
+
left: "text-left",
|
|
5355
|
+
right: "text-right"
|
|
5356
|
+
};
|
|
5357
|
+
function isWidgetAction(action) {
|
|
5358
|
+
return action.scope === "widget";
|
|
5359
|
+
}
|
|
5360
|
+
function isItemAction(action) {
|
|
5361
|
+
return action.scope !== "widget";
|
|
5362
|
+
}
|
|
5363
|
+
function getActionIcon(action) {
|
|
5364
|
+
if (action.icon) {
|
|
5365
|
+
return action.icon;
|
|
5366
|
+
}
|
|
5367
|
+
return actionIconNames[action.id] ?? "square-toggle";
|
|
5368
|
+
}
|
|
5369
|
+
function getActionTone(action) {
|
|
5370
|
+
if (action.tone) {
|
|
5371
|
+
return action.tone;
|
|
5372
|
+
}
|
|
5373
|
+
return actionToneById[action.id] ?? "neutral";
|
|
5374
|
+
}
|
|
5375
|
+
function getTargetLabel(target) {
|
|
5376
|
+
if (!target) {
|
|
5377
|
+
return void 0;
|
|
5378
|
+
}
|
|
5379
|
+
if ("label" in target) {
|
|
5380
|
+
return typeof target.label === "string" || typeof target.label === "number" ? String(target.label) : target.id;
|
|
5381
|
+
}
|
|
5382
|
+
return target.id;
|
|
5383
|
+
}
|
|
5384
|
+
function getActionLabel(action, target) {
|
|
5385
|
+
if (action.ariaLabel) {
|
|
5386
|
+
return action.ariaLabel;
|
|
5387
|
+
}
|
|
5388
|
+
const targetLabel = getTargetLabel(target);
|
|
5389
|
+
return targetLabel ? `${action.label} ${targetLabel}` : action.label;
|
|
5390
|
+
}
|
|
5391
|
+
function getItemsFromDescriptor(widget) {
|
|
5392
|
+
return widget.items ?? widget.data?.items ?? [];
|
|
5393
|
+
}
|
|
5394
|
+
function getDescriptionFromDescriptor(widget) {
|
|
5395
|
+
return widget.description ?? widget.data?.description;
|
|
5396
|
+
}
|
|
5397
|
+
function getEmptyLabelFromDescriptor(widget) {
|
|
5398
|
+
return widget.emptyLabel ?? widget.data?.emptyLabel;
|
|
5399
|
+
}
|
|
5400
|
+
function getFrameFromDescriptor(widget) {
|
|
5401
|
+
return widget.frame ?? widget.data?.frame;
|
|
5402
|
+
}
|
|
5403
|
+
function getDescriptorKind(widget) {
|
|
5404
|
+
return `${widget.component ?? ""} ${widget.type ?? ""}`.toLowerCase();
|
|
5405
|
+
}
|
|
5406
|
+
function getIconFromDescriptor(widget) {
|
|
5407
|
+
if (widget.icon) {
|
|
5408
|
+
return widget.icon;
|
|
5409
|
+
}
|
|
5410
|
+
const descriptorKind = getDescriptorKind(widget);
|
|
5411
|
+
if (descriptorKind.includes("summary") || descriptorKind.includes("impression") || hasRenderableNode(widget.data?.impression)) {
|
|
5412
|
+
return "stethoscope";
|
|
5413
|
+
}
|
|
5414
|
+
if (descriptorKind.includes("vitals")) {
|
|
5415
|
+
return "activity-heartbeat";
|
|
5416
|
+
}
|
|
5417
|
+
if (descriptorKind.includes("question")) {
|
|
5418
|
+
return "question";
|
|
5419
|
+
}
|
|
5420
|
+
if (descriptorKind.includes("prescription") || descriptorKind.includes("medication")) {
|
|
5421
|
+
return "pill";
|
|
5422
|
+
}
|
|
5423
|
+
if (descriptorKind.includes("lab")) {
|
|
5424
|
+
return "flask";
|
|
5425
|
+
}
|
|
5426
|
+
if (descriptorKind.includes("alert")) {
|
|
5427
|
+
return "alert-circle";
|
|
5428
|
+
}
|
|
5429
|
+
if (widget.data?.tableColumns && widget.data.rows) {
|
|
5430
|
+
return "table";
|
|
5431
|
+
}
|
|
5432
|
+
return "clipboard-list";
|
|
5433
|
+
}
|
|
5434
|
+
function hasRenderableNode(value) {
|
|
5435
|
+
return value !== null && value !== void 0 && value !== false;
|
|
5436
|
+
}
|
|
5437
|
+
function isEditableTextValue(value) {
|
|
5438
|
+
return typeof value === "string" || typeof value === "number";
|
|
5439
|
+
}
|
|
5440
|
+
function ReasoningEditableText({
|
|
5441
|
+
as = "span",
|
|
5442
|
+
ariaLabel,
|
|
5443
|
+
className,
|
|
5444
|
+
editable = false,
|
|
5445
|
+
multiline = false,
|
|
5446
|
+
onCommit,
|
|
5447
|
+
size,
|
|
5448
|
+
value,
|
|
5449
|
+
weight
|
|
5450
|
+
}) {
|
|
5451
|
+
if (!editable || !isEditableTextValue(value)) {
|
|
5452
|
+
return renderTextContent(value, {
|
|
5453
|
+
as,
|
|
5454
|
+
className,
|
|
5455
|
+
size,
|
|
5456
|
+
weight
|
|
5457
|
+
});
|
|
5458
|
+
}
|
|
5459
|
+
const initialValue = String(value);
|
|
5460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5461
|
+
Text,
|
|
5462
|
+
{
|
|
5463
|
+
as,
|
|
5464
|
+
"aria-label": ariaLabel,
|
|
5465
|
+
className: cn(
|
|
5466
|
+
"rounded-[4px] text-inherit outline-none transition-[background-color,box-shadow] duration-sofya ease-sofya",
|
|
5467
|
+
"-mx-1 px-1 hover:bg-[color:var(--sofya-surface-hover)] focus-visible:bg-card focus-visible:ring-2 focus-visible:ring-[color:var(--sofya-focus-ring-strong)]",
|
|
5468
|
+
multiline ? "whitespace-pre-wrap" : "truncate",
|
|
5469
|
+
className
|
|
5470
|
+
),
|
|
5471
|
+
contentEditable: true,
|
|
5472
|
+
"data-editable": "true",
|
|
5473
|
+
role: "textbox",
|
|
5474
|
+
size,
|
|
5475
|
+
spellCheck: true,
|
|
5476
|
+
suppressContentEditableWarning: true,
|
|
5477
|
+
tabIndex: 0,
|
|
5478
|
+
weight,
|
|
5479
|
+
onBlur: (event) => {
|
|
5480
|
+
const nextValue = event.currentTarget.textContent ?? "";
|
|
5481
|
+
if (nextValue !== initialValue) {
|
|
5482
|
+
onCommit?.(nextValue);
|
|
5483
|
+
}
|
|
5484
|
+
},
|
|
5485
|
+
onKeyDown: (event) => {
|
|
5486
|
+
if (event.key === "Enter" && !multiline) {
|
|
5487
|
+
event.preventDefault();
|
|
5488
|
+
event.currentTarget.blur();
|
|
5489
|
+
}
|
|
5490
|
+
},
|
|
5491
|
+
children: initialValue
|
|
5492
|
+
}
|
|
5493
|
+
);
|
|
5494
|
+
}
|
|
5495
|
+
var ReasoningWidgetActionButton = React32.forwardRef(function ReasoningWidgetActionButton2({ action, className, disabled, onAction, target, widgetId, ...props }, ref) {
|
|
5496
|
+
const tone = getActionTone(action);
|
|
5497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5498
|
+
IconButton,
|
|
5499
|
+
{
|
|
5500
|
+
ref,
|
|
5501
|
+
"aria-label": getActionLabel(
|
|
5502
|
+
action,
|
|
5503
|
+
target
|
|
5504
|
+
),
|
|
5505
|
+
"data-action-id": action.id,
|
|
5506
|
+
"data-action-scope": action.scope,
|
|
5507
|
+
disabled: disabled ?? action.disabled,
|
|
5508
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { name: getActionIcon(action), size: "sm" }),
|
|
5509
|
+
size: "sm",
|
|
5510
|
+
variant: actionVariantByTone[tone],
|
|
5511
|
+
className: cn(
|
|
5512
|
+
"rounded-[var(--sofya-radius-sm)] text-[color:var(--sofya-text-soft)]",
|
|
5513
|
+
tone === "primary" && "text-primary",
|
|
5514
|
+
className
|
|
5515
|
+
),
|
|
5516
|
+
onClick: () => {
|
|
5517
|
+
onAction?.({
|
|
5518
|
+
action,
|
|
5519
|
+
target,
|
|
5520
|
+
widgetId
|
|
5521
|
+
});
|
|
5522
|
+
},
|
|
5523
|
+
...props
|
|
5524
|
+
}
|
|
5525
|
+
);
|
|
5526
|
+
});
|
|
5527
|
+
var ReasoningWidgetActions = React32.forwardRef(function ReasoningWidgetActions2({
|
|
5528
|
+
actions = [],
|
|
5529
|
+
className,
|
|
5530
|
+
onAction,
|
|
5531
|
+
reveal = "widget-hover",
|
|
5532
|
+
target,
|
|
5533
|
+
widgetId,
|
|
5534
|
+
...props
|
|
5535
|
+
}, ref) {
|
|
5536
|
+
if (actions.length === 0) {
|
|
5537
|
+
return null;
|
|
5538
|
+
}
|
|
5539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5540
|
+
"div",
|
|
5541
|
+
{
|
|
5542
|
+
ref,
|
|
5543
|
+
"data-slot": "reasoning-widget-actions",
|
|
5544
|
+
"data-reveal": reveal,
|
|
5545
|
+
className: cn(
|
|
5546
|
+
"z-10 flex shrink-0 items-center gap-1 transition-opacity duration-sofya ease-sofya",
|
|
5547
|
+
reveal === "widget-hover" && "pointer-events-none opacity-0 group-hover/reasoning:pointer-events-auto group-hover/reasoning:opacity-100 group-focus-within/reasoning:pointer-events-auto group-focus-within/reasoning:opacity-100",
|
|
5548
|
+
reveal === "item-hover" && "pointer-events-none opacity-0 group-hover/item:pointer-events-auto group-hover/item:opacity-100 group-focus-within/item:pointer-events-auto group-focus-within/item:opacity-100",
|
|
5549
|
+
className
|
|
5550
|
+
),
|
|
5551
|
+
...props,
|
|
5552
|
+
children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5553
|
+
ReasoningWidgetActionButton,
|
|
5554
|
+
{
|
|
5555
|
+
action,
|
|
5556
|
+
onAction,
|
|
5557
|
+
target,
|
|
5558
|
+
widgetId
|
|
5559
|
+
},
|
|
5560
|
+
action.id
|
|
5561
|
+
))
|
|
5562
|
+
}
|
|
5563
|
+
);
|
|
5564
|
+
});
|
|
5565
|
+
var ReasoningWidget = React32.forwardRef(
|
|
5566
|
+
function ReasoningWidget2({
|
|
5567
|
+
actions = [],
|
|
5568
|
+
children,
|
|
5569
|
+
className,
|
|
5570
|
+
density = "default",
|
|
5571
|
+
description,
|
|
5572
|
+
empty = false,
|
|
5573
|
+
emptyLabel = "No extracted information yet.",
|
|
5574
|
+
eyebrow,
|
|
5575
|
+
icon,
|
|
5576
|
+
onAction,
|
|
5577
|
+
sectionDivider = false,
|
|
5578
|
+
title,
|
|
5579
|
+
variant = "flat",
|
|
5580
|
+
widgetId,
|
|
5581
|
+
...props
|
|
5582
|
+
}, ref) {
|
|
5583
|
+
const widgetActions = actions.filter(isWidgetAction);
|
|
5584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ReasoningWidgetDensityContext.Provider, { value: density, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
5585
|
+
"article",
|
|
5586
|
+
{
|
|
5587
|
+
ref,
|
|
5588
|
+
"data-density": density,
|
|
5589
|
+
"data-slot": "reasoning-widget",
|
|
5590
|
+
"data-variant": variant,
|
|
5591
|
+
className: cn(
|
|
5592
|
+
"group/reasoning w-full shadow-none",
|
|
5593
|
+
"transition-[border-color,box-shadow] duration-sofya ease-sofya",
|
|
5594
|
+
variant === "flat" && "rounded-none border-0 bg-transparent p-0",
|
|
5595
|
+
variant === "outline" && "rounded-[var(--sofya-radius-md)] border border-[color:var(--sofya-border-strong)] bg-card",
|
|
5596
|
+
variant === "muted" && "rounded-[var(--sofya-radius-md)] border-0 bg-[color:var(--sofya-surface-muted)]",
|
|
5597
|
+
variant === "suggestion" && "rounded-[var(--sofya-radius-md)] border border-[color:var(--sofya-border-hover)] bg-card",
|
|
5598
|
+
variant !== "flat" && (density === "compact" ? "p-4" : "p-5"),
|
|
5599
|
+
className
|
|
5600
|
+
),
|
|
5601
|
+
...props,
|
|
5602
|
+
children: [
|
|
5603
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
5604
|
+
"div",
|
|
5605
|
+
{
|
|
5606
|
+
"data-slot": "reasoning-widget-header",
|
|
5607
|
+
className: "relative flex items-start gap-4",
|
|
5608
|
+
children: [
|
|
5609
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex min-w-0 flex-1 items-start gap-3", children: [
|
|
5610
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex min-w-0 items-start gap-2.5", children: [
|
|
5611
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5612
|
+
"span",
|
|
5613
|
+
{
|
|
5614
|
+
"aria-hidden": "true",
|
|
5615
|
+
"data-icon": icon,
|
|
5616
|
+
"data-slot": "reasoning-widget-icon",
|
|
5617
|
+
className: "mt-0.5 inline-flex size-4 shrink-0 items-center justify-center text-secondary",
|
|
5618
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { name: icon, size: 14, strokeWidth: 1.8 })
|
|
5619
|
+
}
|
|
5620
|
+
) : null,
|
|
5621
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "min-w-0", children: [
|
|
5622
|
+
eyebrow ? renderTextContent(eyebrow, {
|
|
5623
|
+
as: "span",
|
|
5624
|
+
className: "mb-1 block uppercase text-secondary [font-weight:var(--sofya-text-section-label-font-weight)]",
|
|
5625
|
+
size: "section-label"
|
|
5626
|
+
}) : null,
|
|
5627
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5628
|
+
"h3",
|
|
5629
|
+
{
|
|
5630
|
+
className: cn(
|
|
5631
|
+
"m-0",
|
|
5632
|
+
eyebrow ? "text-[color:var(--sofya-neutral-800)]" : "text-secondary"
|
|
5633
|
+
),
|
|
5634
|
+
children: renderTextContent(title, {
|
|
5635
|
+
as: "span",
|
|
5636
|
+
className: cn(
|
|
5637
|
+
"block text-inherit",
|
|
5638
|
+
!eyebrow && "uppercase"
|
|
5639
|
+
),
|
|
5640
|
+
size: eyebrow ? density === "compact" ? "label-md" : "title-sm" : density === "compact" ? "section-label" : "clinical-section-title"
|
|
5641
|
+
})
|
|
5642
|
+
}
|
|
5643
|
+
),
|
|
5644
|
+
description ? renderTextContent(description, {
|
|
5645
|
+
as: "p",
|
|
5646
|
+
className: "mt-2 text-[color:var(--sofya-text-subtle)]",
|
|
5647
|
+
size: "body-md"
|
|
5648
|
+
}) : null
|
|
5649
|
+
] })
|
|
5650
|
+
] }),
|
|
5651
|
+
sectionDivider ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5652
|
+
"span",
|
|
5653
|
+
{
|
|
5654
|
+
"aria-hidden": "true",
|
|
5655
|
+
"data-slot": "reasoning-widget-section-divider",
|
|
5656
|
+
className: cn(
|
|
5657
|
+
"mt-2 h-px min-w-8 flex-1 bg-[color:var(--sofya-neutral-600)]",
|
|
5658
|
+
widgetActions.length > 0 && "mr-12"
|
|
5659
|
+
)
|
|
5660
|
+
}
|
|
5661
|
+
) : null
|
|
5662
|
+
] }),
|
|
5663
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5664
|
+
ReasoningWidgetActions,
|
|
5665
|
+
{
|
|
5666
|
+
actions: widgetActions,
|
|
5667
|
+
className: "absolute right-0 top-1/2 -translate-y-1/2",
|
|
5668
|
+
onAction,
|
|
5669
|
+
reveal: "widget-hover",
|
|
5670
|
+
widgetId
|
|
5671
|
+
}
|
|
5672
|
+
)
|
|
5673
|
+
]
|
|
5674
|
+
}
|
|
5675
|
+
),
|
|
5676
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5677
|
+
"div",
|
|
5678
|
+
{
|
|
5679
|
+
"data-slot": "reasoning-widget-content",
|
|
5680
|
+
className: cn(density === "compact" ? "mt-3" : "mt-4"),
|
|
5681
|
+
children: empty ? renderTextContent(emptyLabel, {
|
|
5682
|
+
as: "p",
|
|
5683
|
+
className: "m-0 text-[color:var(--sofya-text-subtle)]",
|
|
5684
|
+
size: "body-md"
|
|
5685
|
+
}) : children
|
|
5686
|
+
}
|
|
5687
|
+
)
|
|
5688
|
+
]
|
|
5689
|
+
}
|
|
5690
|
+
) });
|
|
5691
|
+
}
|
|
5692
|
+
);
|
|
5693
|
+
var ReasoningWidgetList = React32.forwardRef(function ReasoningWidgetList2({
|
|
5694
|
+
actions = [],
|
|
5695
|
+
className,
|
|
5696
|
+
editable = false,
|
|
5697
|
+
emptyLabel,
|
|
5698
|
+
items,
|
|
5699
|
+
onAction,
|
|
5700
|
+
onItemEdit,
|
|
5701
|
+
widgetId,
|
|
5702
|
+
...props
|
|
5703
|
+
}, ref) {
|
|
5704
|
+
const itemActions = actions.filter(isItemAction);
|
|
5705
|
+
const density = React32.useContext(ReasoningWidgetDensityContext);
|
|
5706
|
+
const primaryTextSize = density === "compact" ? "body-md" : "clinical-body";
|
|
5707
|
+
const supportingTextSize = density === "compact" ? "body-sm" : "clinical-body";
|
|
5708
|
+
if (items.length === 0) {
|
|
5709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "m-0 text-[color:var(--sofya-text-subtle)]", children: renderTextContent(emptyLabel ?? "No extracted items.", {
|
|
5710
|
+
as: "span",
|
|
5711
|
+
className: "block text-inherit",
|
|
5712
|
+
size: "body-md"
|
|
5713
|
+
}) });
|
|
5714
|
+
}
|
|
5715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5716
|
+
"ul",
|
|
5717
|
+
{
|
|
5718
|
+
ref,
|
|
5719
|
+
"data-slot": "reasoning-widget-list",
|
|
5720
|
+
className: cn("m-0 list-none space-y-0 p-0", className),
|
|
5721
|
+
...props,
|
|
5722
|
+
children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
5723
|
+
"li",
|
|
5724
|
+
{
|
|
5725
|
+
"data-slot": "reasoning-widget-list-item",
|
|
5726
|
+
"data-tone": item.tone,
|
|
5727
|
+
className: "group/item relative grid grid-cols-[auto_minmax(0,1fr)] items-start gap-3 rounded-[var(--sofya-radius-sm)] pr-2 transition-colors duration-sofya ease-sofya hover:bg-[color:var(--sofya-surface-hover)] focus-within:bg-[color:var(--sofya-surface-hover)]",
|
|
5728
|
+
children: [
|
|
5729
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5730
|
+
"span",
|
|
5731
|
+
{
|
|
5732
|
+
"aria-hidden": "true",
|
|
5733
|
+
"data-slot": "reasoning-widget-list-marker",
|
|
5734
|
+
className: "mt-2 size-2 rounded-full bg-[color:var(--sofya-text-soft)]"
|
|
5735
|
+
}
|
|
5736
|
+
),
|
|
5737
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "min-w-0", children: [
|
|
5738
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1", children: [
|
|
5739
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "min-w-0 text-[color:var(--sofya-neutral-800)]", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5740
|
+
ReasoningEditableText,
|
|
5741
|
+
{
|
|
5742
|
+
ariaLabel: `Edit ${getTargetLabel(item) ?? "item"} label`,
|
|
5743
|
+
className: "block text-inherit",
|
|
5744
|
+
editable,
|
|
5745
|
+
size: primaryTextSize,
|
|
5746
|
+
value: item.label,
|
|
5747
|
+
onCommit: (value) => {
|
|
5748
|
+
onItemEdit?.({
|
|
5749
|
+
field: "label",
|
|
5750
|
+
item,
|
|
5751
|
+
value,
|
|
5752
|
+
widgetId
|
|
5753
|
+
});
|
|
5754
|
+
}
|
|
5755
|
+
}
|
|
5756
|
+
) }),
|
|
5757
|
+
hasRenderableNode(item.value) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5758
|
+
ReasoningEditableText,
|
|
5759
|
+
{
|
|
5760
|
+
ariaLabel: `Edit ${getTargetLabel(item) ?? "item"} value`,
|
|
5761
|
+
className: "text-[color:var(--sofya-text-soft)]",
|
|
5762
|
+
editable,
|
|
5763
|
+
size: primaryTextSize,
|
|
5764
|
+
value: item.value,
|
|
5765
|
+
onCommit: (value) => {
|
|
5766
|
+
onItemEdit?.({
|
|
5767
|
+
field: "value",
|
|
5768
|
+
item,
|
|
5769
|
+
value,
|
|
5770
|
+
widgetId
|
|
5771
|
+
});
|
|
5772
|
+
}
|
|
5773
|
+
}
|
|
5774
|
+
) : null,
|
|
5775
|
+
hasRenderableNode(item.status) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5776
|
+
ReasoningEditableText,
|
|
5777
|
+
{
|
|
5778
|
+
ariaLabel: `Edit ${getTargetLabel(item) ?? "item"} status`,
|
|
5779
|
+
className: "text-[color:var(--sofya-text-subtle)]",
|
|
5780
|
+
editable,
|
|
5781
|
+
size: "caption",
|
|
5782
|
+
value: item.status,
|
|
5783
|
+
onCommit: (value) => {
|
|
5784
|
+
onItemEdit?.({
|
|
5785
|
+
field: "status",
|
|
5786
|
+
item,
|
|
5787
|
+
value,
|
|
5788
|
+
widgetId
|
|
5789
|
+
});
|
|
5790
|
+
}
|
|
5791
|
+
}
|
|
5792
|
+
) : null
|
|
5793
|
+
] }),
|
|
5794
|
+
hasRenderableNode(item.evidence) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5795
|
+
ReasoningEditableText,
|
|
5796
|
+
{
|
|
5797
|
+
as: "p",
|
|
5798
|
+
ariaLabel: `Edit ${getTargetLabel(item) ?? "item"} evidence`,
|
|
5799
|
+
className: "mt-1 text-[color:var(--sofya-text-subtle)]",
|
|
5800
|
+
editable,
|
|
5801
|
+
multiline: true,
|
|
5802
|
+
size: supportingTextSize,
|
|
5803
|
+
value: item.evidence,
|
|
5804
|
+
onCommit: (value) => {
|
|
5805
|
+
onItemEdit?.({
|
|
5806
|
+
field: "evidence",
|
|
5807
|
+
item,
|
|
5808
|
+
value,
|
|
5809
|
+
widgetId
|
|
5810
|
+
});
|
|
5811
|
+
}
|
|
5812
|
+
}
|
|
5813
|
+
) : null
|
|
5814
|
+
] }),
|
|
5815
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5816
|
+
ReasoningWidgetActions,
|
|
5817
|
+
{
|
|
5818
|
+
actions: itemActions,
|
|
5819
|
+
className: "absolute right-1 top-1",
|
|
5820
|
+
onAction,
|
|
5821
|
+
reveal: "item-hover",
|
|
5822
|
+
target: item,
|
|
5823
|
+
widgetId
|
|
5824
|
+
}
|
|
5825
|
+
)
|
|
5826
|
+
]
|
|
5827
|
+
},
|
|
5828
|
+
item.id ?? `reasoning-widget-item-${index}`
|
|
5829
|
+
))
|
|
5830
|
+
}
|
|
5831
|
+
);
|
|
5832
|
+
});
|
|
5833
|
+
var ReasoningWidgetTable = React32.forwardRef(function ReasoningWidgetTable2({
|
|
5834
|
+
actions = [],
|
|
5835
|
+
className,
|
|
5836
|
+
columns,
|
|
5837
|
+
editable = false,
|
|
5838
|
+
emptyLabel = "No rows available.",
|
|
5839
|
+
onAction,
|
|
5840
|
+
onCellEdit,
|
|
5841
|
+
rows,
|
|
5842
|
+
showHeader = true,
|
|
5843
|
+
widgetId,
|
|
5844
|
+
...props
|
|
5845
|
+
}, ref) {
|
|
5846
|
+
const itemActions = actions.filter(isItemAction);
|
|
5847
|
+
const hasActions = itemActions.length > 0;
|
|
5848
|
+
const density = React32.useContext(ReasoningWidgetDensityContext);
|
|
5849
|
+
const headerTextSize = density === "compact" ? "label-md" : "body-sm";
|
|
5850
|
+
const cellTextSize = density === "compact" ? "body-sm" : "body-sm";
|
|
5851
|
+
if (rows.length === 0) {
|
|
5852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "m-0 text-[color:var(--sofya-text-subtle)]", children: renderTextContent(emptyLabel, {
|
|
5853
|
+
as: "span",
|
|
5854
|
+
className: "block text-inherit",
|
|
5855
|
+
size: "body-md"
|
|
5856
|
+
}) });
|
|
5857
|
+
}
|
|
5858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5859
|
+
"div",
|
|
5860
|
+
{
|
|
5861
|
+
ref,
|
|
5862
|
+
"data-slot": "reasoning-widget-table",
|
|
5863
|
+
className: cn(
|
|
5864
|
+
"overflow-hidden rounded-[10px] border border-[color:var(--sofya-neutral-600)] bg-[color:var(--sofya-neutral-50)]",
|
|
5865
|
+
className
|
|
5866
|
+
),
|
|
5867
|
+
...props,
|
|
5868
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("table", { className: "w-full border-collapse table-fixed", children: [
|
|
5869
|
+
showHeader ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("tr", { className: "border-b border-[color:var(--sofya-neutral-600)]", children: columns.map((column, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5870
|
+
"th",
|
|
5871
|
+
{
|
|
5872
|
+
className: cn(
|
|
5873
|
+
"align-middle text-[color:var(--sofya-text-subtle)]",
|
|
5874
|
+
density === "compact" ? "px-3 py-2" : "px-4 py-2",
|
|
5875
|
+
columnIndex > 0 && "border-l border-[color:var(--sofya-neutral-600)]",
|
|
5876
|
+
tableAlignClassName[column.align ?? "left"]
|
|
5877
|
+
),
|
|
5878
|
+
style: column.width ? { width: column.width } : void 0,
|
|
5879
|
+
scope: "col",
|
|
5880
|
+
children: renderTextContent(column.header, {
|
|
5881
|
+
as: "span",
|
|
5882
|
+
className: "block truncate text-inherit",
|
|
5883
|
+
size: headerTextSize
|
|
5884
|
+
})
|
|
5885
|
+
},
|
|
5886
|
+
column.key
|
|
5887
|
+
)) }) }) : null,
|
|
5888
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("tbody", { children: rows.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5889
|
+
"tr",
|
|
5890
|
+
{
|
|
5891
|
+
"data-tone": row.tone,
|
|
5892
|
+
className: cn(
|
|
5893
|
+
"group/item border-t border-[color:var(--sofya-neutral-600)] transition-colors duration-sofya ease-sofya first:border-t-0 hover:bg-[color:var(--sofya-surface-hover)] focus-within:bg-[color:var(--sofya-surface-hover)]",
|
|
5894
|
+
row.tone && toneSurfaceClassName[row.tone]
|
|
5895
|
+
),
|
|
5896
|
+
children: columns.map((column, columnIndex) => {
|
|
5897
|
+
const isLastColumn = columnIndex === columns.length - 1;
|
|
5898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
5899
|
+
"td",
|
|
5900
|
+
{
|
|
5901
|
+
className: cn(
|
|
5902
|
+
"relative min-w-0 align-top",
|
|
5903
|
+
density === "compact" ? "px-3 py-2" : "px-4 py-2",
|
|
5904
|
+
column.variant === "value" ? "text-[color:var(--sofya-neutral-800)]" : "text-[color:var(--sofya-neutral-800)]",
|
|
5905
|
+
columnIndex > 0 && "border-l border-[color:var(--sofya-neutral-600)]",
|
|
5906
|
+
hasActions && isLastColumn && "pr-24",
|
|
5907
|
+
tableAlignClassName[column.align ?? "left"]
|
|
5908
|
+
),
|
|
5909
|
+
children: [
|
|
5910
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5911
|
+
ReasoningEditableText,
|
|
5912
|
+
{
|
|
5913
|
+
ariaLabel: `Edit ${row.id ?? "row"} ${column.key}`,
|
|
5914
|
+
className: "block truncate text-inherit",
|
|
5915
|
+
editable,
|
|
5916
|
+
size: cellTextSize,
|
|
5917
|
+
value: row.cells[column.key] ?? null,
|
|
5918
|
+
weight: column.variant === "value" ? 600 : void 0,
|
|
5919
|
+
onCommit: (value) => {
|
|
5920
|
+
onCellEdit?.({
|
|
5921
|
+
columnKey: column.key,
|
|
5922
|
+
row,
|
|
5923
|
+
value,
|
|
5924
|
+
widgetId
|
|
5925
|
+
});
|
|
5926
|
+
}
|
|
5927
|
+
}
|
|
5928
|
+
),
|
|
5929
|
+
hasActions && isLastColumn ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5930
|
+
ReasoningWidgetActions,
|
|
5931
|
+
{
|
|
5932
|
+
actions: itemActions,
|
|
5933
|
+
className: "absolute right-2 top-1/2 -translate-y-1/2",
|
|
5934
|
+
onAction,
|
|
5935
|
+
reveal: "item-hover",
|
|
5936
|
+
target: row,
|
|
5937
|
+
widgetId
|
|
5938
|
+
}
|
|
5939
|
+
) : null
|
|
5940
|
+
]
|
|
5941
|
+
},
|
|
5942
|
+
column.key
|
|
5943
|
+
);
|
|
5944
|
+
})
|
|
5945
|
+
},
|
|
5946
|
+
row.id ?? `reasoning-widget-row-${rowIndex}`
|
|
5947
|
+
)) })
|
|
5948
|
+
] })
|
|
5949
|
+
}
|
|
5950
|
+
);
|
|
5951
|
+
});
|
|
5952
|
+
var ReasoningVitalsWidget = React32.forwardRef(function ReasoningVitalsWidget2({
|
|
5953
|
+
actions = [],
|
|
5954
|
+
editable = false,
|
|
5955
|
+
emptyLabel = "No vitals extracted.",
|
|
5956
|
+
frame = "bordered",
|
|
5957
|
+
icon = "activity-heartbeat",
|
|
5958
|
+
items,
|
|
5959
|
+
onAction,
|
|
5960
|
+
onItemEdit,
|
|
5961
|
+
title = "Vitals",
|
|
5962
|
+
widgetId,
|
|
5963
|
+
...props
|
|
5964
|
+
}, ref) {
|
|
5965
|
+
const itemActions = actions.filter(isItemAction);
|
|
5966
|
+
const hasActions = itemActions.length > 0;
|
|
5967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5968
|
+
ReasoningWidget,
|
|
5969
|
+
{
|
|
5970
|
+
ref,
|
|
5971
|
+
actions,
|
|
5972
|
+
empty: items.length === 0,
|
|
5973
|
+
emptyLabel,
|
|
5974
|
+
icon,
|
|
5975
|
+
onAction,
|
|
5976
|
+
title,
|
|
5977
|
+
widgetId,
|
|
5978
|
+
...props,
|
|
5979
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5980
|
+
"div",
|
|
5981
|
+
{
|
|
5982
|
+
"data-slot": "reasoning-vitals-list",
|
|
5983
|
+
"data-frame": frame,
|
|
5984
|
+
className: clinicalDataFrameClassName[frame],
|
|
5985
|
+
children: items.map((item, index) => {
|
|
5986
|
+
const tone = item.tone ?? "muted";
|
|
5987
|
+
const unit = item.unit ?? (typeof item.metadata?.unit === "string" ? item.metadata.unit : void 0);
|
|
5988
|
+
const hasValue = hasRenderableNode(item.value);
|
|
5989
|
+
const value = hasValue ? item.value : item.label;
|
|
5990
|
+
const label = hasValue ? item.label : void 0;
|
|
5991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
5992
|
+
"div",
|
|
5993
|
+
{
|
|
5994
|
+
"data-slot": "reasoning-vital",
|
|
5995
|
+
"data-tone": tone,
|
|
5996
|
+
className: cn(
|
|
5997
|
+
"group/item relative grid min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-stretch gap-0 border-t border-[color:var(--sofya-neutral-600)] transition-colors duration-sofya ease-sofya first:border-t-0 hover:bg-[color:var(--sofya-surface-hover)] focus-within:bg-[color:var(--sofya-surface-hover)]",
|
|
5998
|
+
clinicalToneSurfaceClassName[tone]
|
|
5999
|
+
),
|
|
6000
|
+
children: [
|
|
6001
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6002
|
+
"span",
|
|
6003
|
+
{
|
|
6004
|
+
"aria-hidden": "true",
|
|
6005
|
+
"data-slot": "reasoning-vital-marker",
|
|
6006
|
+
className: cn(
|
|
6007
|
+
"my-5 ml-0 mr-5 w-1 rounded-r-full",
|
|
6008
|
+
clinicalToneMarkerClassName[tone]
|
|
6009
|
+
)
|
|
6010
|
+
}
|
|
6011
|
+
),
|
|
6012
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "min-w-0 py-5", children: [
|
|
6013
|
+
hasRenderableNode(label) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6014
|
+
ReasoningEditableText,
|
|
6015
|
+
{
|
|
6016
|
+
as: "p",
|
|
6017
|
+
ariaLabel: `Edit ${getTargetLabel(item) ?? "vital"} label`,
|
|
6018
|
+
className: "text-[color:var(--sofya-neutral-900)]",
|
|
6019
|
+
editable,
|
|
6020
|
+
size: "title-sm",
|
|
6021
|
+
weight: 500,
|
|
6022
|
+
value: label,
|
|
6023
|
+
onCommit: (nextValue) => {
|
|
6024
|
+
onItemEdit?.({
|
|
6025
|
+
field: "label",
|
|
6026
|
+
item,
|
|
6027
|
+
value: nextValue,
|
|
6028
|
+
widgetId
|
|
6029
|
+
});
|
|
6030
|
+
}
|
|
6031
|
+
}
|
|
6032
|
+
) : null,
|
|
6033
|
+
hasRenderableNode(item.referenceRange) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6034
|
+
ReasoningEditableText,
|
|
6035
|
+
{
|
|
6036
|
+
as: "p",
|
|
6037
|
+
ariaLabel: `Edit ${getTargetLabel(item) ?? "vital"} reference range`,
|
|
6038
|
+
className: "mt-1 text-[color:var(--sofya-text-subtle)]",
|
|
6039
|
+
editable,
|
|
6040
|
+
size: "body-sm",
|
|
6041
|
+
value: item.referenceRange,
|
|
6042
|
+
onCommit: (nextValue) => {
|
|
6043
|
+
onItemEdit?.({
|
|
6044
|
+
field: "referenceRange",
|
|
6045
|
+
item,
|
|
6046
|
+
value: nextValue,
|
|
6047
|
+
widgetId
|
|
6048
|
+
});
|
|
6049
|
+
}
|
|
6050
|
+
}
|
|
6051
|
+
) : null,
|
|
6052
|
+
hasRenderableNode(item.evidence) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6053
|
+
ReasoningEditableText,
|
|
6054
|
+
{
|
|
6055
|
+
as: "p",
|
|
6056
|
+
ariaLabel: `Edit ${getTargetLabel(item) ?? "vital"} evidence`,
|
|
6057
|
+
className: "mt-1 text-[color:var(--sofya-text-subtle)]",
|
|
6058
|
+
editable,
|
|
6059
|
+
multiline: true,
|
|
6060
|
+
size: "body-sm",
|
|
6061
|
+
value: item.evidence,
|
|
6062
|
+
onCommit: (nextValue) => {
|
|
6063
|
+
onItemEdit?.({
|
|
6064
|
+
field: "evidence",
|
|
6065
|
+
item,
|
|
6066
|
+
value: nextValue,
|
|
6067
|
+
widgetId
|
|
6068
|
+
});
|
|
6069
|
+
}
|
|
6070
|
+
}
|
|
6071
|
+
) : null,
|
|
6072
|
+
hasRenderableNode(item.observedAt) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6073
|
+
ReasoningEditableText,
|
|
6074
|
+
{
|
|
6075
|
+
as: "p",
|
|
6076
|
+
ariaLabel: `Edit ${getTargetLabel(item) ?? "vital"} observed time`,
|
|
6077
|
+
className: "mt-1 text-[color:var(--sofya-text-subtle)]",
|
|
6078
|
+
editable,
|
|
6079
|
+
size: "body-sm",
|
|
6080
|
+
value: item.observedAt,
|
|
6081
|
+
onCommit: (nextValue) => {
|
|
6082
|
+
onItemEdit?.({
|
|
6083
|
+
field: "observedAt",
|
|
6084
|
+
item,
|
|
6085
|
+
value: nextValue,
|
|
6086
|
+
widgetId
|
|
6087
|
+
});
|
|
6088
|
+
}
|
|
6089
|
+
}
|
|
6090
|
+
) : null
|
|
6091
|
+
] }),
|
|
6092
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
6093
|
+
"div",
|
|
6094
|
+
{
|
|
6095
|
+
className: cn(
|
|
6096
|
+
"min-w-[7.5rem] py-4 pr-6 text-right",
|
|
6097
|
+
hasActions && "pr-24"
|
|
6098
|
+
),
|
|
6099
|
+
children: [
|
|
6100
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex min-w-0 items-baseline justify-end gap-1", children: [
|
|
6101
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6102
|
+
"span",
|
|
6103
|
+
{
|
|
6104
|
+
className: cn("min-w-0", clinicalToneValueClassName[tone]),
|
|
6105
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6106
|
+
ReasoningEditableText,
|
|
6107
|
+
{
|
|
6108
|
+
ariaLabel: `Edit ${getTargetLabel(item) ?? "vital"} value`,
|
|
6109
|
+
className: "block text-inherit",
|
|
6110
|
+
editable,
|
|
6111
|
+
size: "title-md",
|
|
6112
|
+
value,
|
|
6113
|
+
weight: 600,
|
|
6114
|
+
onCommit: (nextValue) => {
|
|
6115
|
+
onItemEdit?.({
|
|
6116
|
+
field: hasValue ? "value" : "label",
|
|
6117
|
+
item,
|
|
6118
|
+
value: nextValue,
|
|
6119
|
+
widgetId
|
|
6120
|
+
});
|
|
6121
|
+
}
|
|
6122
|
+
}
|
|
6123
|
+
)
|
|
6124
|
+
}
|
|
6125
|
+
),
|
|
6126
|
+
hasRenderableNode(unit) && hasValue ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6127
|
+
ReasoningEditableText,
|
|
6128
|
+
{
|
|
6129
|
+
ariaLabel: `Edit ${getTargetLabel(item) ?? "vital"} unit`,
|
|
6130
|
+
className: "text-[color:var(--sofya-text-subtle)]",
|
|
6131
|
+
editable,
|
|
6132
|
+
size: "body-sm",
|
|
6133
|
+
value: unit,
|
|
6134
|
+
onCommit: (nextValue) => {
|
|
6135
|
+
onItemEdit?.({
|
|
6136
|
+
field: "unit",
|
|
6137
|
+
item,
|
|
6138
|
+
value: nextValue,
|
|
6139
|
+
widgetId
|
|
6140
|
+
});
|
|
6141
|
+
}
|
|
6142
|
+
}
|
|
6143
|
+
) : null
|
|
6144
|
+
] }),
|
|
6145
|
+
hasRenderableNode(item.status) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6146
|
+
ReasoningEditableText,
|
|
6147
|
+
{
|
|
6148
|
+
as: "p",
|
|
6149
|
+
ariaLabel: `Edit ${getTargetLabel(item) ?? "vital"} status`,
|
|
6150
|
+
className: cn(
|
|
6151
|
+
"mt-1 text-right",
|
|
6152
|
+
clinicalToneStatusClassName[tone]
|
|
6153
|
+
),
|
|
6154
|
+
editable,
|
|
6155
|
+
size: "label-md",
|
|
6156
|
+
value: item.status,
|
|
6157
|
+
weight: 600,
|
|
6158
|
+
onCommit: (nextValue) => {
|
|
6159
|
+
onItemEdit?.({
|
|
6160
|
+
field: "status",
|
|
6161
|
+
item,
|
|
6162
|
+
value: nextValue,
|
|
6163
|
+
widgetId
|
|
6164
|
+
});
|
|
6165
|
+
}
|
|
6166
|
+
}
|
|
6167
|
+
) : null
|
|
6168
|
+
]
|
|
6169
|
+
}
|
|
6170
|
+
),
|
|
6171
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6172
|
+
ReasoningWidgetActions,
|
|
6173
|
+
{
|
|
6174
|
+
actions: itemActions,
|
|
6175
|
+
className: "absolute right-2 top-1/2 -translate-y-1/2",
|
|
6176
|
+
onAction,
|
|
6177
|
+
reveal: "item-hover",
|
|
6178
|
+
target: item,
|
|
6179
|
+
widgetId
|
|
6180
|
+
}
|
|
6181
|
+
)
|
|
6182
|
+
]
|
|
6183
|
+
},
|
|
6184
|
+
item.id ?? `reasoning-vital-${index}`
|
|
6185
|
+
);
|
|
6186
|
+
})
|
|
6187
|
+
}
|
|
6188
|
+
)
|
|
6189
|
+
}
|
|
6190
|
+
);
|
|
6191
|
+
});
|
|
6192
|
+
var ReasoningLabsWidget = React32.forwardRef(function ReasoningLabsWidget2({
|
|
6193
|
+
actions = [],
|
|
6194
|
+
columnLabels,
|
|
6195
|
+
editable = false,
|
|
6196
|
+
emptyLabel = "No labs extracted.",
|
|
6197
|
+
frame = "bordered",
|
|
6198
|
+
icon = "flask",
|
|
6199
|
+
items,
|
|
6200
|
+
onAction,
|
|
6201
|
+
onItemEdit,
|
|
6202
|
+
title = "Labs",
|
|
6203
|
+
widgetId,
|
|
6204
|
+
...props
|
|
6205
|
+
}, ref) {
|
|
6206
|
+
const itemActions = actions.filter(isItemAction);
|
|
6207
|
+
const labColumns = [
|
|
6208
|
+
{
|
|
6209
|
+
key: "test",
|
|
6210
|
+
label: columnLabels?.test ?? "Test",
|
|
6211
|
+
width: "260px"
|
|
6212
|
+
},
|
|
6213
|
+
{
|
|
6214
|
+
key: "result",
|
|
6215
|
+
label: columnLabels?.result ?? "Result",
|
|
6216
|
+
width: "150px"
|
|
6217
|
+
},
|
|
6218
|
+
{
|
|
6219
|
+
key: "reference",
|
|
6220
|
+
label: columnLabels?.reference ?? "Reference",
|
|
6221
|
+
width: "150px"
|
|
6222
|
+
},
|
|
6223
|
+
{
|
|
6224
|
+
key: "flag",
|
|
6225
|
+
label: columnLabels?.flag ?? "Flag",
|
|
6226
|
+
width: "160px"
|
|
6227
|
+
}
|
|
6228
|
+
];
|
|
6229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6230
|
+
ReasoningWidget,
|
|
6231
|
+
{
|
|
6232
|
+
ref,
|
|
6233
|
+
actions,
|
|
6234
|
+
empty: items.length === 0,
|
|
6235
|
+
emptyLabel,
|
|
6236
|
+
icon,
|
|
6237
|
+
onAction,
|
|
6238
|
+
title,
|
|
6239
|
+
widgetId,
|
|
6240
|
+
...props,
|
|
6241
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6242
|
+
"div",
|
|
6243
|
+
{
|
|
6244
|
+
"data-slot": "reasoning-labs-table",
|
|
6245
|
+
"data-frame": frame,
|
|
6246
|
+
className: clinicalLabsFrameClassName[frame],
|
|
6247
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("table", { className: "w-auto min-w-[720px] border-collapse table-fixed", children: [
|
|
6248
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("tr", { className: clinicalDataHeaderClassName[frame], children: [
|
|
6249
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("th", { className: "w-7 px-4 py-3", scope: "col", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "sr-only", children: columnLabels?.tone ?? "Tone" }) }),
|
|
6250
|
+
labColumns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6251
|
+
"th",
|
|
6252
|
+
{
|
|
6253
|
+
className: "px-4 py-3 text-left align-middle text-[color:var(--sofya-text-subtle)]",
|
|
6254
|
+
scope: "col",
|
|
6255
|
+
style: { width: column.width },
|
|
6256
|
+
children: renderTextContent(column.label, {
|
|
6257
|
+
as: "span",
|
|
6258
|
+
className: "block truncate text-inherit",
|
|
6259
|
+
size: "clinical-section-title"
|
|
6260
|
+
})
|
|
6261
|
+
},
|
|
6262
|
+
column.key
|
|
6263
|
+
))
|
|
6264
|
+
] }) }),
|
|
6265
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("tbody", { children: items.map((item, index) => {
|
|
6266
|
+
const tone = item.tone ?? "muted";
|
|
6267
|
+
const unit = item.unit ?? (typeof item.metadata?.unit === "string" ? item.metadata.unit : void 0);
|
|
6268
|
+
const interpretation = item.interpretation ?? item.status;
|
|
6269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
6270
|
+
"tr",
|
|
6271
|
+
{
|
|
6272
|
+
"data-slot": "reasoning-lab",
|
|
6273
|
+
"data-tone": tone,
|
|
6274
|
+
className: cn(
|
|
6275
|
+
"group/item border-t border-[color:var(--sofya-neutral-600)] transition-colors duration-sofya ease-sofya first:border-t-0 hover:bg-[color:var(--sofya-surface-hover)] focus-within:bg-[color:var(--sofya-surface-hover)]",
|
|
6276
|
+
clinicalToneSurfaceClassName[tone]
|
|
6277
|
+
),
|
|
6278
|
+
children: [
|
|
6279
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: "px-0 py-4 align-top", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6280
|
+
"span",
|
|
6281
|
+
{
|
|
6282
|
+
"aria-hidden": "true",
|
|
6283
|
+
"data-slot": "reasoning-lab-marker",
|
|
6284
|
+
className: cn(
|
|
6285
|
+
"mt-1 block h-12 w-1 rounded-r-full",
|
|
6286
|
+
clinicalToneMarkerClassName[tone]
|
|
6287
|
+
)
|
|
6288
|
+
}
|
|
6289
|
+
) }),
|
|
6290
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("td", { className: "min-w-0 px-4 py-4 align-top text-[color:var(--sofya-neutral-900)]", children: [
|
|
6291
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6292
|
+
ReasoningEditableText,
|
|
6293
|
+
{
|
|
6294
|
+
ariaLabel: `Edit ${getTargetLabel(item) ?? "lab"} label`,
|
|
6295
|
+
className: "block text-inherit",
|
|
6296
|
+
editable,
|
|
6297
|
+
size: "title-sm",
|
|
6298
|
+
value: item.label,
|
|
6299
|
+
weight: 500,
|
|
6300
|
+
onCommit: (nextValue) => {
|
|
6301
|
+
onItemEdit?.({
|
|
6302
|
+
field: "label",
|
|
6303
|
+
item,
|
|
6304
|
+
value: nextValue,
|
|
6305
|
+
widgetId
|
|
6306
|
+
});
|
|
6307
|
+
}
|
|
6308
|
+
}
|
|
6309
|
+
),
|
|
6310
|
+
hasRenderableNode(item.evidence) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6311
|
+
ReasoningEditableText,
|
|
6312
|
+
{
|
|
6313
|
+
as: "p",
|
|
6314
|
+
ariaLabel: `Edit ${getTargetLabel(item) ?? "lab"} evidence`,
|
|
6315
|
+
className: "mt-1 text-[color:var(--sofya-text-subtle)]",
|
|
6316
|
+
editable,
|
|
6317
|
+
multiline: true,
|
|
6318
|
+
size: "body-sm",
|
|
6319
|
+
value: item.evidence,
|
|
6320
|
+
onCommit: (nextValue) => {
|
|
6321
|
+
onItemEdit?.({
|
|
6322
|
+
field: "evidence",
|
|
6323
|
+
item,
|
|
6324
|
+
value: nextValue,
|
|
6325
|
+
widgetId
|
|
6326
|
+
});
|
|
6327
|
+
}
|
|
6328
|
+
}
|
|
6329
|
+
) : null
|
|
6330
|
+
] }),
|
|
6331
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: "min-w-0 px-4 py-4 align-top", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex min-w-0 flex-col items-start", children: [
|
|
6332
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6333
|
+
"span",
|
|
6334
|
+
{
|
|
6335
|
+
className: cn(
|
|
6336
|
+
"min-w-0",
|
|
6337
|
+
clinicalToneValueClassName[tone]
|
|
6338
|
+
),
|
|
6339
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6340
|
+
ReasoningEditableText,
|
|
6341
|
+
{
|
|
6342
|
+
ariaLabel: `Edit ${getTargetLabel(item) ?? "lab"} value`,
|
|
6343
|
+
className: "block text-inherit",
|
|
6344
|
+
editable,
|
|
6345
|
+
size: "title-sm",
|
|
6346
|
+
value: item.value ?? null,
|
|
6347
|
+
weight: 600,
|
|
6348
|
+
onCommit: (nextValue) => {
|
|
6349
|
+
onItemEdit?.({
|
|
6350
|
+
field: "value",
|
|
6351
|
+
item,
|
|
6352
|
+
value: nextValue,
|
|
6353
|
+
widgetId
|
|
6354
|
+
});
|
|
6355
|
+
}
|
|
6356
|
+
}
|
|
6357
|
+
)
|
|
6358
|
+
}
|
|
6359
|
+
),
|
|
6360
|
+
hasRenderableNode(unit) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6361
|
+
ReasoningEditableText,
|
|
6362
|
+
{
|
|
6363
|
+
ariaLabel: `Edit ${getTargetLabel(item) ?? "lab"} unit`,
|
|
6364
|
+
className: "text-[color:var(--sofya-text-subtle)]",
|
|
6365
|
+
editable,
|
|
6366
|
+
size: "body-sm",
|
|
6367
|
+
value: unit,
|
|
6368
|
+
onCommit: (nextValue) => {
|
|
6369
|
+
onItemEdit?.({
|
|
6370
|
+
field: "unit",
|
|
6371
|
+
item,
|
|
6372
|
+
value: nextValue,
|
|
6373
|
+
widgetId
|
|
6374
|
+
});
|
|
6375
|
+
}
|
|
6376
|
+
}
|
|
6377
|
+
) : null
|
|
6378
|
+
] }) }),
|
|
6379
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: "min-w-0 px-4 py-4 align-top text-[color:var(--sofya-text-soft)]", children: hasRenderableNode(item.referenceRange) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6380
|
+
ReasoningEditableText,
|
|
6381
|
+
{
|
|
6382
|
+
ariaLabel: `Edit ${getTargetLabel(item) ?? "lab"} reference range`,
|
|
6383
|
+
className: "block truncate text-inherit",
|
|
6384
|
+
editable,
|
|
6385
|
+
size: "body-sm",
|
|
6386
|
+
value: item.referenceRange,
|
|
6387
|
+
onCommit: (nextValue) => {
|
|
6388
|
+
onItemEdit?.({
|
|
6389
|
+
field: "referenceRange",
|
|
6390
|
+
item,
|
|
6391
|
+
value: nextValue,
|
|
6392
|
+
widgetId
|
|
6393
|
+
});
|
|
6394
|
+
}
|
|
6395
|
+
}
|
|
6396
|
+
) : null }),
|
|
6397
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("td", { className: "relative min-w-0 px-4 py-4 align-top", children: [
|
|
6398
|
+
hasRenderableNode(interpretation) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6399
|
+
ReasoningEditableText,
|
|
6400
|
+
{
|
|
6401
|
+
ariaLabel: `Edit ${getTargetLabel(item) ?? "lab"} interpretation`,
|
|
6402
|
+
className: cn(
|
|
6403
|
+
"inline-flex rounded-full px-3 py-1",
|
|
6404
|
+
clinicalToneBadgeClassName[tone]
|
|
6405
|
+
),
|
|
6406
|
+
editable,
|
|
6407
|
+
multiline: true,
|
|
6408
|
+
size: "label-md",
|
|
6409
|
+
value: interpretation,
|
|
6410
|
+
weight: tone === "muted" ? void 0 : 600,
|
|
6411
|
+
onCommit: (nextValue) => {
|
|
6412
|
+
onItemEdit?.({
|
|
6413
|
+
field: "status",
|
|
6414
|
+
item,
|
|
6415
|
+
value: nextValue,
|
|
6416
|
+
widgetId
|
|
6417
|
+
});
|
|
6418
|
+
}
|
|
6419
|
+
}
|
|
6420
|
+
) : null,
|
|
6421
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6422
|
+
ReasoningWidgetActions,
|
|
6423
|
+
{
|
|
6424
|
+
actions: itemActions,
|
|
6425
|
+
className: "absolute right-2 top-1/2 -translate-y-1/2",
|
|
6426
|
+
onAction,
|
|
6427
|
+
reveal: "item-hover",
|
|
6428
|
+
target: item,
|
|
6429
|
+
widgetId
|
|
6430
|
+
}
|
|
6431
|
+
)
|
|
6432
|
+
] })
|
|
6433
|
+
]
|
|
6434
|
+
},
|
|
6435
|
+
item.id ?? `reasoning-lab-${index}`
|
|
6436
|
+
);
|
|
6437
|
+
}) })
|
|
6438
|
+
] })
|
|
6439
|
+
}
|
|
6440
|
+
)
|
|
6441
|
+
}
|
|
6442
|
+
);
|
|
6443
|
+
});
|
|
6444
|
+
var ReasoningSummaryWidget = React32.forwardRef(function ReasoningSummaryWidget2({
|
|
6445
|
+
actions,
|
|
6446
|
+
clinicalImpression,
|
|
6447
|
+
description,
|
|
6448
|
+
editable = false,
|
|
6449
|
+
findings = [],
|
|
6450
|
+
eyebrow = "Summary",
|
|
6451
|
+
icon = "stethoscope",
|
|
6452
|
+
onAction,
|
|
6453
|
+
onItemEdit,
|
|
6454
|
+
onSummaryEdit,
|
|
6455
|
+
title,
|
|
6456
|
+
widgetId,
|
|
6457
|
+
...props
|
|
6458
|
+
}, ref) {
|
|
6459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
6460
|
+
ReasoningWidget,
|
|
6461
|
+
{
|
|
6462
|
+
ref,
|
|
6463
|
+
actions,
|
|
6464
|
+
description,
|
|
6465
|
+
eyebrow,
|
|
6466
|
+
icon,
|
|
6467
|
+
onAction,
|
|
6468
|
+
title,
|
|
6469
|
+
widgetId,
|
|
6470
|
+
...props,
|
|
6471
|
+
children: [
|
|
6472
|
+
hasRenderableNode(clinicalImpression) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6473
|
+
ReasoningEditableText,
|
|
6474
|
+
{
|
|
6475
|
+
as: "p",
|
|
6476
|
+
ariaLabel: "Edit clinical impression",
|
|
6477
|
+
className: "m-0 text-[color:var(--sofya-neutral-800)]",
|
|
6478
|
+
editable,
|
|
6479
|
+
multiline: true,
|
|
6480
|
+
size: "clinical-body",
|
|
6481
|
+
value: clinicalImpression,
|
|
6482
|
+
onCommit: (value) => {
|
|
6483
|
+
onSummaryEdit?.({
|
|
6484
|
+
field: "clinicalImpression",
|
|
6485
|
+
value,
|
|
6486
|
+
widgetId
|
|
6487
|
+
});
|
|
6488
|
+
}
|
|
6489
|
+
}
|
|
6490
|
+
) : null,
|
|
6491
|
+
findings.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6492
|
+
ReasoningWidgetList,
|
|
6493
|
+
{
|
|
6494
|
+
actions,
|
|
6495
|
+
className: hasRenderableNode(clinicalImpression) ? "mt-3" : void 0,
|
|
6496
|
+
editable,
|
|
6497
|
+
items: findings,
|
|
6498
|
+
onAction,
|
|
6499
|
+
onItemEdit,
|
|
6500
|
+
widgetId
|
|
6501
|
+
}
|
|
6502
|
+
) : null
|
|
6503
|
+
]
|
|
6504
|
+
}
|
|
6505
|
+
);
|
|
6506
|
+
});
|
|
6507
|
+
function ReasoningWidgetRenderer({
|
|
6508
|
+
editable = false,
|
|
6509
|
+
onAction,
|
|
6510
|
+
onCellEdit,
|
|
6511
|
+
onItemEdit,
|
|
6512
|
+
onSummaryEdit,
|
|
6513
|
+
widget,
|
|
6514
|
+
...props
|
|
6515
|
+
}) {
|
|
6516
|
+
const descriptorKind = getDescriptorKind(widget);
|
|
6517
|
+
const description = getDescriptionFromDescriptor(widget);
|
|
6518
|
+
const emptyLabel = getEmptyLabelFromDescriptor(widget);
|
|
6519
|
+
const frame = getFrameFromDescriptor(widget);
|
|
6520
|
+
const items = getItemsFromDescriptor(widget);
|
|
6521
|
+
const actions = widget.actions ?? [];
|
|
6522
|
+
const icon = getIconFromDescriptor(widget);
|
|
6523
|
+
if (descriptorKind.includes("summary") || hasRenderableNode(widget.data?.impression)) {
|
|
6524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6525
|
+
ReasoningSummaryWidget,
|
|
6526
|
+
{
|
|
6527
|
+
actions,
|
|
6528
|
+
clinicalImpression: widget.data?.impression,
|
|
6529
|
+
description,
|
|
6530
|
+
editable,
|
|
6531
|
+
findings: items,
|
|
6532
|
+
icon,
|
|
6533
|
+
onAction,
|
|
6534
|
+
onItemEdit,
|
|
6535
|
+
onSummaryEdit,
|
|
6536
|
+
sectionDivider: widget.sectionDivider,
|
|
6537
|
+
title: widget.title,
|
|
6538
|
+
widgetId: widget.id,
|
|
6539
|
+
...props
|
|
6540
|
+
}
|
|
6541
|
+
);
|
|
6542
|
+
}
|
|
6543
|
+
if (descriptorKind.includes("vitals")) {
|
|
6544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6545
|
+
ReasoningVitalsWidget,
|
|
6546
|
+
{
|
|
6547
|
+
actions,
|
|
6548
|
+
description,
|
|
6549
|
+
editable,
|
|
6550
|
+
emptyLabel,
|
|
6551
|
+
frame,
|
|
6552
|
+
icon,
|
|
6553
|
+
items,
|
|
6554
|
+
onAction,
|
|
6555
|
+
onItemEdit,
|
|
6556
|
+
sectionDivider: widget.sectionDivider,
|
|
6557
|
+
title: widget.title,
|
|
6558
|
+
widgetId: widget.id,
|
|
6559
|
+
...props
|
|
6560
|
+
}
|
|
6561
|
+
);
|
|
6562
|
+
}
|
|
6563
|
+
if (descriptorKind.includes("lab") && items.length > 0) {
|
|
6564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6565
|
+
ReasoningLabsWidget,
|
|
6566
|
+
{
|
|
6567
|
+
actions,
|
|
6568
|
+
columnLabels: widget.data?.labColumnLabels,
|
|
6569
|
+
description,
|
|
6570
|
+
editable,
|
|
6571
|
+
emptyLabel,
|
|
6572
|
+
frame,
|
|
6573
|
+
icon,
|
|
6574
|
+
items,
|
|
6575
|
+
onAction,
|
|
6576
|
+
onItemEdit,
|
|
6577
|
+
sectionDivider: widget.sectionDivider,
|
|
6578
|
+
title: widget.title,
|
|
6579
|
+
widgetId: widget.id,
|
|
6580
|
+
...props
|
|
6581
|
+
}
|
|
6582
|
+
);
|
|
6583
|
+
}
|
|
6584
|
+
if (widget.data?.tableColumns && widget.data.rows) {
|
|
6585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6586
|
+
ReasoningWidget,
|
|
6587
|
+
{
|
|
6588
|
+
actions,
|
|
6589
|
+
description,
|
|
6590
|
+
empty: widget.data.rows.length === 0,
|
|
6591
|
+
emptyLabel,
|
|
6592
|
+
icon,
|
|
6593
|
+
onAction,
|
|
6594
|
+
sectionDivider: widget.sectionDivider,
|
|
6595
|
+
title: widget.title,
|
|
6596
|
+
widgetId: widget.id,
|
|
6597
|
+
...props,
|
|
6598
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6599
|
+
ReasoningWidgetTable,
|
|
6600
|
+
{
|
|
6601
|
+
actions,
|
|
6602
|
+
columns: widget.data.tableColumns,
|
|
6603
|
+
editable,
|
|
6604
|
+
emptyLabel,
|
|
6605
|
+
onAction,
|
|
6606
|
+
onCellEdit,
|
|
6607
|
+
rows: widget.data.rows,
|
|
6608
|
+
widgetId: widget.id
|
|
6609
|
+
}
|
|
6610
|
+
)
|
|
6611
|
+
}
|
|
6612
|
+
);
|
|
6613
|
+
}
|
|
6614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6615
|
+
ReasoningWidget,
|
|
6616
|
+
{
|
|
6617
|
+
actions,
|
|
6618
|
+
description,
|
|
6619
|
+
empty: items.length === 0,
|
|
6620
|
+
emptyLabel,
|
|
6621
|
+
icon,
|
|
6622
|
+
onAction,
|
|
6623
|
+
sectionDivider: widget.sectionDivider,
|
|
6624
|
+
title: widget.title,
|
|
6625
|
+
widgetId: widget.id,
|
|
6626
|
+
...props,
|
|
6627
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6628
|
+
ReasoningWidgetList,
|
|
6629
|
+
{
|
|
6630
|
+
actions,
|
|
6631
|
+
editable,
|
|
6632
|
+
emptyLabel,
|
|
6633
|
+
items,
|
|
6634
|
+
onAction,
|
|
6635
|
+
onItemEdit,
|
|
6636
|
+
widgetId: widget.id
|
|
6637
|
+
}
|
|
6638
|
+
)
|
|
6639
|
+
}
|
|
6640
|
+
);
|
|
6641
|
+
}
|
|
6642
|
+
ReasoningWidgetActionButton.displayName = "ReasoningWidgetActionButton";
|
|
6643
|
+
ReasoningWidgetActions.displayName = "ReasoningWidgetActions";
|
|
6644
|
+
ReasoningWidget.displayName = "ReasoningWidget";
|
|
6645
|
+
ReasoningWidgetList.displayName = "ReasoningWidgetList";
|
|
6646
|
+
ReasoningWidgetTable.displayName = "ReasoningWidgetTable";
|
|
6647
|
+
ReasoningVitalsWidget.displayName = "ReasoningVitalsWidget";
|
|
6648
|
+
ReasoningLabsWidget.displayName = "ReasoningLabsWidget";
|
|
6649
|
+
ReasoningSummaryWidget.displayName = "ReasoningSummaryWidget";
|
|
6650
|
+
|
|
6651
|
+
// src/components/right-rail-action.tsx
|
|
6652
|
+
var React33 = __toESM(require("react"), 1);
|
|
6653
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
6654
|
+
var RightRailAction = React33.forwardRef(
|
|
6655
|
+
({ active = false, className, icon, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5192
6656
|
IconButton,
|
|
5193
6657
|
{
|
|
5194
6658
|
ref,
|
|
@@ -5207,12 +6671,12 @@ var RightRailAction = React32.forwardRef(
|
|
|
5207
6671
|
RightRailAction.displayName = "RightRailAction";
|
|
5208
6672
|
|
|
5209
6673
|
// src/components/scroll-area.tsx
|
|
5210
|
-
var
|
|
6674
|
+
var React34 = __toESM(require("react"), 1);
|
|
5211
6675
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
5212
|
-
var
|
|
6676
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5213
6677
|
var scrollAreaOrientationOptions = ["horizontal", "vertical"];
|
|
5214
|
-
var ScrollArea =
|
|
5215
|
-
return /* @__PURE__ */ (0,
|
|
6678
|
+
var ScrollArea = React34.forwardRef(function ScrollArea2({ className, ...props }, ref) {
|
|
6679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5216
6680
|
ScrollAreaPrimitive.Root,
|
|
5217
6681
|
{
|
|
5218
6682
|
ref,
|
|
@@ -5223,8 +6687,8 @@ var ScrollArea = React33.forwardRef(function ScrollArea2({ className, ...props }
|
|
|
5223
6687
|
);
|
|
5224
6688
|
});
|
|
5225
6689
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
5226
|
-
var ScrollAreaViewport =
|
|
5227
|
-
return /* @__PURE__ */ (0,
|
|
6690
|
+
var ScrollAreaViewport = React34.forwardRef(function ScrollAreaViewport2({ className, ...props }, ref) {
|
|
6691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5228
6692
|
ScrollAreaPrimitive.Viewport,
|
|
5229
6693
|
{
|
|
5230
6694
|
ref,
|
|
@@ -5238,8 +6702,8 @@ var ScrollAreaViewport = React33.forwardRef(function ScrollAreaViewport2({ class
|
|
|
5238
6702
|
);
|
|
5239
6703
|
});
|
|
5240
6704
|
ScrollAreaViewport.displayName = ScrollAreaPrimitive.Viewport.displayName;
|
|
5241
|
-
var ScrollAreaScrollbar =
|
|
5242
|
-
return /* @__PURE__ */ (0,
|
|
6705
|
+
var ScrollAreaScrollbar = React34.forwardRef(function ScrollAreaScrollbar2({ className, orientation = "vertical", thumbClassName, ...props }, ref) {
|
|
6706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5243
6707
|
ScrollAreaPrimitive.Scrollbar,
|
|
5244
6708
|
{
|
|
5245
6709
|
ref,
|
|
@@ -5250,7 +6714,7 @@ var ScrollAreaScrollbar = React33.forwardRef(function ScrollAreaScrollbar2({ cla
|
|
|
5250
6714
|
className
|
|
5251
6715
|
),
|
|
5252
6716
|
...props,
|
|
5253
|
-
children: /* @__PURE__ */ (0,
|
|
6717
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5254
6718
|
ScrollAreaPrimitive.Thumb,
|
|
5255
6719
|
{
|
|
5256
6720
|
"data-slot": "scroll-area-thumb",
|
|
@@ -5264,8 +6728,8 @@ var ScrollAreaScrollbar = React33.forwardRef(function ScrollAreaScrollbar2({ cla
|
|
|
5264
6728
|
);
|
|
5265
6729
|
});
|
|
5266
6730
|
ScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;
|
|
5267
|
-
var ScrollAreaCorner =
|
|
5268
|
-
return /* @__PURE__ */ (0,
|
|
6731
|
+
var ScrollAreaCorner = React34.forwardRef(function ScrollAreaCorner2({ className, ...props }, ref) {
|
|
6732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5269
6733
|
ScrollAreaPrimitive.Corner,
|
|
5270
6734
|
{
|
|
5271
6735
|
ref,
|
|
@@ -5278,19 +6742,19 @@ var ScrollAreaCorner = React33.forwardRef(function ScrollAreaCorner2({ className
|
|
|
5278
6742
|
ScrollAreaCorner.displayName = ScrollAreaPrimitive.Corner.displayName;
|
|
5279
6743
|
|
|
5280
6744
|
// src/components/select.tsx
|
|
5281
|
-
var
|
|
6745
|
+
var React35 = __toESM(require("react"), 1);
|
|
5282
6746
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
5283
6747
|
|
|
5284
6748
|
// src/lib/form-control-classes.ts
|
|
5285
6749
|
var formControlBaseClasses = "flex w-full items-center justify-between gap-4 rounded-[10px] border border-[color:var(--sofya-border-strong)] bg-card px-4 text-left [font-family:var(--sofya-text-body-font-family)] text-[length:var(--sofya-text-body-font-size)] [font-weight:var(--sofya-text-body-font-weight)] leading-[var(--sofya-text-body-line-height)] tracking-[var(--sofya-text-body-letter-spacing)] text-[color:var(--sofya-text-default)] shadow-none transition-[border-color,box-shadow,background-color,color] duration-sofya ease-sofya hover:border-[color:var(--sofya-border-hover)] focus:outline-none focus:ring-2 focus:ring-[color:var(--sofya-focus-ring-soft)] focus:ring-offset-0 active:border-transparent active:ring-2 active:ring-[color:var(--sofya-focus-ring-soft)] disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus:ring-destructive/20 data-[placeholder]:text-[color:var(--sofya-text-placeholder)]";
|
|
5286
6750
|
|
|
5287
6751
|
// src/components/select.tsx
|
|
5288
|
-
var
|
|
6752
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
5289
6753
|
var selectSizeOptions = ["default", "sm"];
|
|
5290
6754
|
var Select = SelectPrimitive.Root;
|
|
5291
6755
|
var SelectGroup = SelectPrimitive.Group;
|
|
5292
|
-
var SelectValue =
|
|
5293
|
-
return /* @__PURE__ */ (0,
|
|
6756
|
+
var SelectValue = React35.forwardRef(function SelectValue2({ className, ...props }, ref) {
|
|
6757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5294
6758
|
Text,
|
|
5295
6759
|
{
|
|
5296
6760
|
ref,
|
|
@@ -5299,13 +6763,13 @@ var SelectValue = React34.forwardRef(function SelectValue2({ className, ...props
|
|
|
5299
6763
|
className: cn("block truncate text-inherit", className),
|
|
5300
6764
|
size: "tiny",
|
|
5301
6765
|
style: inheritedTypographyStyle,
|
|
5302
|
-
children: /* @__PURE__ */ (0,
|
|
6766
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectPrimitive.Value, { className: "block truncate", ...props })
|
|
5303
6767
|
}
|
|
5304
6768
|
);
|
|
5305
6769
|
});
|
|
5306
6770
|
SelectValue.displayName = SelectPrimitive.Value.displayName;
|
|
5307
|
-
var SelectTrigger =
|
|
5308
|
-
return /* @__PURE__ */ (0,
|
|
6771
|
+
var SelectTrigger = React35.forwardRef(function SelectTrigger2({ className, children, size = "default", ...props }, ref) {
|
|
6772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
5309
6773
|
SelectPrimitive.Trigger,
|
|
5310
6774
|
{
|
|
5311
6775
|
ref,
|
|
@@ -5319,7 +6783,7 @@ var SelectTrigger = React34.forwardRef(function SelectTrigger2({ className, chil
|
|
|
5319
6783
|
...props,
|
|
5320
6784
|
children: [
|
|
5321
6785
|
children,
|
|
5322
|
-
/* @__PURE__ */ (0,
|
|
6786
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5323
6787
|
Icon,
|
|
5324
6788
|
{
|
|
5325
6789
|
name: "caret-down",
|
|
@@ -5332,8 +6796,8 @@ var SelectTrigger = React34.forwardRef(function SelectTrigger2({ className, chil
|
|
|
5332
6796
|
);
|
|
5333
6797
|
});
|
|
5334
6798
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
5335
|
-
var SelectScrollUpButton =
|
|
5336
|
-
return /* @__PURE__ */ (0,
|
|
6799
|
+
var SelectScrollUpButton = React35.forwardRef(function SelectScrollUpButton2({ className, ...props }, ref) {
|
|
6800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5337
6801
|
SelectPrimitive.ScrollUpButton,
|
|
5338
6802
|
{
|
|
5339
6803
|
ref,
|
|
@@ -5343,13 +6807,13 @@ var SelectScrollUpButton = React34.forwardRef(function SelectScrollUpButton2({ c
|
|
|
5343
6807
|
className
|
|
5344
6808
|
),
|
|
5345
6809
|
...props,
|
|
5346
|
-
children: /* @__PURE__ */ (0,
|
|
6810
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { name: "caret-up", size: 12 })
|
|
5347
6811
|
}
|
|
5348
6812
|
);
|
|
5349
6813
|
});
|
|
5350
6814
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
5351
|
-
var SelectScrollDownButton =
|
|
5352
|
-
return /* @__PURE__ */ (0,
|
|
6815
|
+
var SelectScrollDownButton = React35.forwardRef(function SelectScrollDownButton2({ className, ...props }, ref) {
|
|
6816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5353
6817
|
SelectPrimitive.ScrollDownButton,
|
|
5354
6818
|
{
|
|
5355
6819
|
ref,
|
|
@@ -5359,13 +6823,13 @@ var SelectScrollDownButton = React34.forwardRef(function SelectScrollDownButton2
|
|
|
5359
6823
|
className
|
|
5360
6824
|
),
|
|
5361
6825
|
...props,
|
|
5362
|
-
children: /* @__PURE__ */ (0,
|
|
6826
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { name: "caret-down", size: 12 })
|
|
5363
6827
|
}
|
|
5364
6828
|
);
|
|
5365
6829
|
});
|
|
5366
6830
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
5367
|
-
var SelectContent =
|
|
5368
|
-
return /* @__PURE__ */ (0,
|
|
6831
|
+
var SelectContent = React35.forwardRef(function SelectContent2({ className, children, position = "popper", ...props }, ref) {
|
|
6832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
5369
6833
|
SelectPrimitive.Content,
|
|
5370
6834
|
{
|
|
5371
6835
|
ref,
|
|
@@ -5378,8 +6842,8 @@ var SelectContent = React34.forwardRef(function SelectContent2({ className, chil
|
|
|
5378
6842
|
),
|
|
5379
6843
|
...props,
|
|
5380
6844
|
children: [
|
|
5381
|
-
/* @__PURE__ */ (0,
|
|
5382
|
-
/* @__PURE__ */ (0,
|
|
6845
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectScrollUpButton, {}),
|
|
6846
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5383
6847
|
SelectPrimitive.Viewport,
|
|
5384
6848
|
{
|
|
5385
6849
|
"data-slot": "select-viewport",
|
|
@@ -5387,14 +6851,14 @@ var SelectContent = React34.forwardRef(function SelectContent2({ className, chil
|
|
|
5387
6851
|
children
|
|
5388
6852
|
}
|
|
5389
6853
|
),
|
|
5390
|
-
/* @__PURE__ */ (0,
|
|
6854
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectScrollDownButton, {})
|
|
5391
6855
|
]
|
|
5392
6856
|
}
|
|
5393
6857
|
) });
|
|
5394
6858
|
});
|
|
5395
6859
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
5396
|
-
var SelectLabel =
|
|
5397
|
-
return /* @__PURE__ */ (0,
|
|
6860
|
+
var SelectLabel = React35.forwardRef(function SelectLabel2({ className, ...props }, ref) {
|
|
6861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5398
6862
|
SelectPrimitive.Label,
|
|
5399
6863
|
{
|
|
5400
6864
|
ref,
|
|
@@ -5416,8 +6880,8 @@ var SelectLabel = React34.forwardRef(function SelectLabel2({ className, ...props
|
|
|
5416
6880
|
);
|
|
5417
6881
|
});
|
|
5418
6882
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
5419
|
-
var SelectItem =
|
|
5420
|
-
return /* @__PURE__ */ (0,
|
|
6883
|
+
var SelectItem = React35.forwardRef(function SelectItem2({ className, children, ...props }, ref) {
|
|
6884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
5421
6885
|
SelectPrimitive.Item,
|
|
5422
6886
|
{
|
|
5423
6887
|
ref,
|
|
@@ -5428,20 +6892,20 @@ var SelectItem = React34.forwardRef(function SelectItem2({ className, children,
|
|
|
5428
6892
|
),
|
|
5429
6893
|
...props,
|
|
5430
6894
|
children: [
|
|
5431
|
-
/* @__PURE__ */ (0,
|
|
6895
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectPrimitive.ItemText, { className: "truncate", children: renderTextContent(children, {
|
|
5432
6896
|
as: "span",
|
|
5433
6897
|
className: "block truncate text-[color:var(--sofya-text-default)]",
|
|
5434
6898
|
size: "tiny",
|
|
5435
6899
|
style: inheritedTypographyStyle
|
|
5436
6900
|
}) }),
|
|
5437
|
-
/* @__PURE__ */ (0,
|
|
6901
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectPrimitive.ItemIndicator, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "absolute right-4 inline-flex h-4 w-4 items-center justify-center text-primary", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { name: "check", size: 14 }) }) })
|
|
5438
6902
|
]
|
|
5439
6903
|
}
|
|
5440
6904
|
);
|
|
5441
6905
|
});
|
|
5442
6906
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
5443
|
-
var SelectSeparator =
|
|
5444
|
-
return /* @__PURE__ */ (0,
|
|
6907
|
+
var SelectSeparator = React35.forwardRef(function SelectSeparator2({ className, ...props }, ref) {
|
|
6908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5445
6909
|
SelectPrimitive.Separator,
|
|
5446
6910
|
{
|
|
5447
6911
|
ref,
|
|
@@ -5454,11 +6918,11 @@ var SelectSeparator = React34.forwardRef(function SelectSeparator2({ className,
|
|
|
5454
6918
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
5455
6919
|
|
|
5456
6920
|
// src/components/separator.tsx
|
|
5457
|
-
var
|
|
6921
|
+
var React36 = __toESM(require("react"), 1);
|
|
5458
6922
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
5459
|
-
var
|
|
5460
|
-
var Separator2 =
|
|
5461
|
-
return /* @__PURE__ */ (0,
|
|
6923
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
6924
|
+
var Separator2 = React36.forwardRef(function Separator3({ className, decorative = true, orientation = "horizontal", ...props }, ref) {
|
|
6925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5462
6926
|
SeparatorPrimitive.Root,
|
|
5463
6927
|
{
|
|
5464
6928
|
ref,
|
|
@@ -5477,8 +6941,8 @@ var Separator2 = React35.forwardRef(function Separator3({ className, decorative
|
|
|
5477
6941
|
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
5478
6942
|
|
|
5479
6943
|
// src/components/sidebar-nav-item.tsx
|
|
5480
|
-
var
|
|
5481
|
-
var
|
|
6944
|
+
var React37 = __toESM(require("react"), 1);
|
|
6945
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
5482
6946
|
var sidebarNavItemAppearanceClassNames = {
|
|
5483
6947
|
settings: "rounded-[var(--sofya-radius-md)] py-[var(--sofya-space-2)] pl-[var(--sofya-space-3)] pr-[var(--sofya-space-3)] text-[color:var(--sofya-text-soft)] hover:bg-[color:var(--sofya-surface-hover)] hover:text-[color:var(--sofya-text-default)] data-[active=true]:bg-[color:var(--sofya-surface-selected)] data-[active=true]:text-[color:var(--sofya-text-default)] data-[active=true]:hover:bg-[color:var(--sofya-surface-selected-strong)] data-[disabled=true]:text-[color:var(--sofya-text-subtle)] data-[disabled=true]:hover:bg-transparent",
|
|
5484
6948
|
workspace: "rounded-[var(--sofya-radius-sm)] bg-transparent px-0 py-0 text-[color:var(--sofya-text-subtle)] hover:bg-transparent hover:text-[color:var(--sofya-text-default)] data-[active=true]:bg-transparent data-[active=true]:text-primary data-[active=true]:hover:bg-transparent data-[active=true]:hover:text-primary data-[disabled=true]:text-[color:var(--sofya-text-subtle)] data-[disabled=true]:hover:bg-transparent"
|
|
@@ -5491,10 +6955,10 @@ var sidebarNavItemTextSize = {
|
|
|
5491
6955
|
settings: "sidebar-title",
|
|
5492
6956
|
workspace: "sidebar-title-regular"
|
|
5493
6957
|
};
|
|
5494
|
-
var SidebarNav =
|
|
6958
|
+
var SidebarNav = React37.forwardRef(
|
|
5495
6959
|
({ as, className, ...props }, ref) => {
|
|
5496
6960
|
const Comp = as ?? "nav";
|
|
5497
|
-
return /* @__PURE__ */ (0,
|
|
6961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5498
6962
|
Comp,
|
|
5499
6963
|
{
|
|
5500
6964
|
ref,
|
|
@@ -5506,8 +6970,8 @@ var SidebarNav = React36.forwardRef(
|
|
|
5506
6970
|
}
|
|
5507
6971
|
);
|
|
5508
6972
|
SidebarNav.displayName = "SidebarNav";
|
|
5509
|
-
var SidebarNavSection =
|
|
5510
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
6973
|
+
var SidebarNavSection = React37.forwardRef(
|
|
6974
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5511
6975
|
"div",
|
|
5512
6976
|
{
|
|
5513
6977
|
ref,
|
|
@@ -5518,10 +6982,10 @@ var SidebarNavSection = React36.forwardRef(
|
|
|
5518
6982
|
)
|
|
5519
6983
|
);
|
|
5520
6984
|
SidebarNavSection.displayName = "SidebarNavSection";
|
|
5521
|
-
var SidebarNavSectionLabel =
|
|
6985
|
+
var SidebarNavSectionLabel = React37.forwardRef(
|
|
5522
6986
|
({ as, className, children, ...props }, ref) => {
|
|
5523
6987
|
const Comp = as ?? "h5";
|
|
5524
|
-
return /* @__PURE__ */ (0,
|
|
6988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5525
6989
|
Comp,
|
|
5526
6990
|
{
|
|
5527
6991
|
ref,
|
|
@@ -5538,8 +7002,8 @@ var SidebarNavSectionLabel = React36.forwardRef(
|
|
|
5538
7002
|
}
|
|
5539
7003
|
);
|
|
5540
7004
|
SidebarNavSectionLabel.displayName = "SidebarNavSectionLabel";
|
|
5541
|
-
var SidebarNavSectionItems =
|
|
5542
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
7005
|
+
var SidebarNavSectionItems = React37.forwardRef(
|
|
7006
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5543
7007
|
"div",
|
|
5544
7008
|
{
|
|
5545
7009
|
ref,
|
|
@@ -5550,7 +7014,7 @@ var SidebarNavSectionItems = React36.forwardRef(
|
|
|
5550
7014
|
)
|
|
5551
7015
|
);
|
|
5552
7016
|
SidebarNavSectionItems.displayName = "SidebarNavSectionItems";
|
|
5553
|
-
var SidebarNavItem =
|
|
7017
|
+
var SidebarNavItem = React37.forwardRef(
|
|
5554
7018
|
function SidebarNavItem2({
|
|
5555
7019
|
as,
|
|
5556
7020
|
active = false,
|
|
@@ -5563,7 +7027,7 @@ var SidebarNavItem = React36.forwardRef(
|
|
|
5563
7027
|
}, ref) {
|
|
5564
7028
|
const Comp = as ?? (props.href ? "a" : "button");
|
|
5565
7029
|
const isNativeButton = Comp === "button";
|
|
5566
|
-
return /* @__PURE__ */ (0,
|
|
7030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
5567
7031
|
Comp,
|
|
5568
7032
|
{
|
|
5569
7033
|
ref,
|
|
@@ -5584,7 +7048,7 @@ var SidebarNavItem = React36.forwardRef(
|
|
|
5584
7048
|
),
|
|
5585
7049
|
...props,
|
|
5586
7050
|
children: [
|
|
5587
|
-
appearance === "settings" ? /* @__PURE__ */ (0,
|
|
7051
|
+
appearance === "settings" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5588
7052
|
"span",
|
|
5589
7053
|
{
|
|
5590
7054
|
"aria-hidden": "true",
|
|
@@ -5595,7 +7059,7 @@ var SidebarNavItem = React36.forwardRef(
|
|
|
5595
7059
|
)
|
|
5596
7060
|
}
|
|
5597
7061
|
) : null,
|
|
5598
|
-
icon ? /* @__PURE__ */ (0,
|
|
7062
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5599
7063
|
"span",
|
|
5600
7064
|
{
|
|
5601
7065
|
"data-slot": "sidebar-nav-item-icon",
|
|
@@ -5603,7 +7067,7 @@ var SidebarNavItem = React36.forwardRef(
|
|
|
5603
7067
|
children: icon
|
|
5604
7068
|
}
|
|
5605
7069
|
) : null,
|
|
5606
|
-
/* @__PURE__ */ (0,
|
|
7070
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "min-w-0 flex-1 truncate", children: renderTextContent(children, {
|
|
5607
7071
|
as: "span",
|
|
5608
7072
|
className: "block min-w-0 truncate text-inherit",
|
|
5609
7073
|
size: sidebarNavItemTextSize[appearance]
|
|
@@ -5617,8 +7081,8 @@ SidebarNavItem.displayName = "SidebarNavItem";
|
|
|
5617
7081
|
var SettingsNavItem = SidebarNavItem;
|
|
5618
7082
|
|
|
5619
7083
|
// src/components/slider.tsx
|
|
5620
|
-
var
|
|
5621
|
-
var
|
|
7084
|
+
var React38 = __toESM(require("react"), 1);
|
|
7085
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
5622
7086
|
function clampSliderValue(value, min, max) {
|
|
5623
7087
|
if (Number.isNaN(value)) {
|
|
5624
7088
|
return min;
|
|
@@ -5643,7 +7107,7 @@ function resolveSliderMeasurement(value, fallback) {
|
|
|
5643
7107
|
function isTextValue(value) {
|
|
5644
7108
|
return typeof value === "string" || typeof value === "number";
|
|
5645
7109
|
}
|
|
5646
|
-
var Slider =
|
|
7110
|
+
var Slider = React38.forwardRef(function Slider2({
|
|
5647
7111
|
className,
|
|
5648
7112
|
defaultValue,
|
|
5649
7113
|
formatValue,
|
|
@@ -5666,7 +7130,7 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5666
7130
|
valueClassName,
|
|
5667
7131
|
...props
|
|
5668
7132
|
}, ref) {
|
|
5669
|
-
const resolvedId =
|
|
7133
|
+
const resolvedId = React38.useId();
|
|
5670
7134
|
const inputId = id ?? resolvedId;
|
|
5671
7135
|
const safeMin = min;
|
|
5672
7136
|
const safeMax = resolveSliderMax(safeMin, max);
|
|
@@ -5675,7 +7139,7 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5675
7139
|
onChange: onValueChange,
|
|
5676
7140
|
value
|
|
5677
7141
|
});
|
|
5678
|
-
|
|
7142
|
+
React38.useEffect(() => {
|
|
5679
7143
|
if (value !== void 0) {
|
|
5680
7144
|
return;
|
|
5681
7145
|
}
|
|
@@ -5722,14 +7186,14 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5722
7186
|
setControllableValue(nextValue);
|
|
5723
7187
|
onChange?.(event);
|
|
5724
7188
|
};
|
|
5725
|
-
return /* @__PURE__ */ (0,
|
|
7189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
5726
7190
|
"div",
|
|
5727
7191
|
{
|
|
5728
7192
|
"data-slot": "slider",
|
|
5729
7193
|
className: cn("grid w-full gap-2", className),
|
|
5730
7194
|
children: [
|
|
5731
|
-
label || showValue ? /* @__PURE__ */ (0,
|
|
5732
|
-
label ? /* @__PURE__ */ (0,
|
|
7195
|
+
label || showValue ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
7196
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5733
7197
|
FieldLabel,
|
|
5734
7198
|
{
|
|
5735
7199
|
htmlFor: inputId,
|
|
@@ -5740,8 +7204,8 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5740
7204
|
textClassName: "block min-w-0 text-[color:var(--sofya-text-default)]",
|
|
5741
7205
|
children: label
|
|
5742
7206
|
}
|
|
5743
|
-
) : /* @__PURE__ */ (0,
|
|
5744
|
-
showValue ? /* @__PURE__ */ (0,
|
|
7207
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", {}),
|
|
7208
|
+
showValue ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5745
7209
|
"div",
|
|
5746
7210
|
{
|
|
5747
7211
|
className: cn(
|
|
@@ -5759,7 +7223,7 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5759
7223
|
}
|
|
5760
7224
|
) : null
|
|
5761
7225
|
] }) : null,
|
|
5762
|
-
/* @__PURE__ */ (0,
|
|
7226
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
5763
7227
|
"div",
|
|
5764
7228
|
{
|
|
5765
7229
|
"data-slot": "slider-control",
|
|
@@ -5769,7 +7233,7 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5769
7233
|
),
|
|
5770
7234
|
style: controlStyle,
|
|
5771
7235
|
children: [
|
|
5772
|
-
/* @__PURE__ */ (0,
|
|
7236
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5773
7237
|
"input",
|
|
5774
7238
|
{
|
|
5775
7239
|
...props,
|
|
@@ -5786,7 +7250,7 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5786
7250
|
style: inputBoundsStyle
|
|
5787
7251
|
}
|
|
5788
7252
|
),
|
|
5789
|
-
/* @__PURE__ */ (0,
|
|
7253
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5790
7254
|
"div",
|
|
5791
7255
|
{
|
|
5792
7256
|
"data-slot": "slider-track",
|
|
@@ -5797,7 +7261,7 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5797
7261
|
style: trackBoundsStyle
|
|
5798
7262
|
}
|
|
5799
7263
|
),
|
|
5800
|
-
/* @__PURE__ */ (0,
|
|
7264
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5801
7265
|
"div",
|
|
5802
7266
|
{
|
|
5803
7267
|
"data-slot": "slider-range",
|
|
@@ -5808,7 +7272,7 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5808
7272
|
style: rangeStyle
|
|
5809
7273
|
}
|
|
5810
7274
|
),
|
|
5811
|
-
/* @__PURE__ */ (0,
|
|
7275
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5812
7276
|
"div",
|
|
5813
7277
|
{
|
|
5814
7278
|
"data-slot": "slider-thumb",
|
|
@@ -5829,10 +7293,10 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5829
7293
|
Slider.displayName = "Slider";
|
|
5830
7294
|
|
|
5831
7295
|
// src/components/skeleton.tsx
|
|
5832
|
-
var
|
|
5833
|
-
var
|
|
5834
|
-
var Skeleton =
|
|
5835
|
-
return /* @__PURE__ */ (0,
|
|
7296
|
+
var React39 = __toESM(require("react"), 1);
|
|
7297
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
7298
|
+
var Skeleton = React39.forwardRef(function Skeleton2({ className, ...props }, ref) {
|
|
7299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5836
7300
|
"div",
|
|
5837
7301
|
{
|
|
5838
7302
|
ref,
|
|
@@ -5847,15 +7311,15 @@ var Skeleton = React38.forwardRef(function Skeleton2({ className, ...props }, re
|
|
|
5847
7311
|
Skeleton.displayName = "Skeleton";
|
|
5848
7312
|
|
|
5849
7313
|
// src/components/sonner.tsx
|
|
5850
|
-
var
|
|
7314
|
+
var React40 = __toESM(require("react"), 1);
|
|
5851
7315
|
var import_sonner = require("sonner");
|
|
5852
|
-
var
|
|
7316
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5853
7317
|
var notificationVariantOptions = ["default", "success", "error", "warning"];
|
|
5854
7318
|
function ToastStatusIcon({
|
|
5855
7319
|
iconName,
|
|
5856
7320
|
className
|
|
5857
7321
|
}) {
|
|
5858
|
-
return /* @__PURE__ */ (0,
|
|
7322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5859
7323
|
"span",
|
|
5860
7324
|
{
|
|
5861
7325
|
"aria-hidden": "true",
|
|
@@ -5863,7 +7327,7 @@ function ToastStatusIcon({
|
|
|
5863
7327
|
"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full border shadow-none",
|
|
5864
7328
|
className
|
|
5865
7329
|
),
|
|
5866
|
-
children: /* @__PURE__ */ (0,
|
|
7330
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { name: iconName, size: 16 })
|
|
5867
7331
|
}
|
|
5868
7332
|
);
|
|
5869
7333
|
}
|
|
@@ -5887,35 +7351,35 @@ var defaultToastClassNames = {
|
|
|
5887
7351
|
loading: "border-border bg-card text-foreground"
|
|
5888
7352
|
};
|
|
5889
7353
|
var defaultToastIcons = {
|
|
5890
|
-
success: /* @__PURE__ */ (0,
|
|
7354
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5891
7355
|
ToastStatusIcon,
|
|
5892
7356
|
{
|
|
5893
7357
|
iconName: "check",
|
|
5894
7358
|
className: "border-success/15 bg-success/12 text-success"
|
|
5895
7359
|
}
|
|
5896
7360
|
),
|
|
5897
|
-
error: /* @__PURE__ */ (0,
|
|
7361
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5898
7362
|
ToastStatusIcon,
|
|
5899
7363
|
{
|
|
5900
7364
|
iconName: "x",
|
|
5901
7365
|
className: "border-destructive/15 bg-destructive/12 text-destructive"
|
|
5902
7366
|
}
|
|
5903
7367
|
),
|
|
5904
|
-
warning: /* @__PURE__ */ (0,
|
|
7368
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5905
7369
|
ToastStatusIcon,
|
|
5906
7370
|
{
|
|
5907
7371
|
iconName: "question",
|
|
5908
7372
|
className: "border-warning/20 bg-warning/15 text-foreground"
|
|
5909
7373
|
}
|
|
5910
7374
|
),
|
|
5911
|
-
info: /* @__PURE__ */ (0,
|
|
7375
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5912
7376
|
ToastStatusIcon,
|
|
5913
7377
|
{
|
|
5914
7378
|
iconName: "question",
|
|
5915
7379
|
className: "border-primary/15 bg-primary/10 text-primary"
|
|
5916
7380
|
}
|
|
5917
7381
|
),
|
|
5918
|
-
close: /* @__PURE__ */ (0,
|
|
7382
|
+
close: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { name: "x", size: 12 })
|
|
5919
7383
|
};
|
|
5920
7384
|
function mergeToastClassNames(overrides) {
|
|
5921
7385
|
return {
|
|
@@ -5923,7 +7387,7 @@ function mergeToastClassNames(overrides) {
|
|
|
5923
7387
|
...overrides
|
|
5924
7388
|
};
|
|
5925
7389
|
}
|
|
5926
|
-
var Toaster =
|
|
7390
|
+
var Toaster = React40.forwardRef(
|
|
5927
7391
|
function Toaster2({
|
|
5928
7392
|
className,
|
|
5929
7393
|
closeButton = true,
|
|
@@ -5935,7 +7399,7 @@ var Toaster = React39.forwardRef(
|
|
|
5935
7399
|
visibleToasts = 5,
|
|
5936
7400
|
...props
|
|
5937
7401
|
}, ref) {
|
|
5938
|
-
return /* @__PURE__ */ (0,
|
|
7402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5939
7403
|
import_sonner.Toaster,
|
|
5940
7404
|
{
|
|
5941
7405
|
ref,
|
|
@@ -5990,12 +7454,12 @@ notify.dismiss = import_sonner.toast.dismiss;
|
|
|
5990
7454
|
notify.promise = import_sonner.toast.promise;
|
|
5991
7455
|
|
|
5992
7456
|
// src/components/status-indicator.tsx
|
|
5993
|
-
var
|
|
7457
|
+
var React42 = __toESM(require("react"), 1);
|
|
5994
7458
|
|
|
5995
7459
|
// src/components/tooltip.tsx
|
|
5996
|
-
var
|
|
7460
|
+
var React41 = __toESM(require("react"), 1);
|
|
5997
7461
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
5998
|
-
var
|
|
7462
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5999
7463
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
6000
7464
|
var Tooltip = TooltipPrimitive.Root;
|
|
6001
7465
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
@@ -6013,8 +7477,8 @@ var tooltipToneClassNames = {
|
|
|
6013
7477
|
warning: "border-[color:var(--sofya-tone-warning-border)] bg-[color:var(--sofya-tone-warning-background)] text-[color:var(--sofya-tone-warning-foreground)]",
|
|
6014
7478
|
destructive: "border-[color:var(--sofya-tone-destructive-border)] bg-[color:var(--sofya-tone-destructive-background)] text-[color:var(--sofya-tone-destructive-foreground)]"
|
|
6015
7479
|
};
|
|
6016
|
-
var TooltipContent =
|
|
6017
|
-
return /* @__PURE__ */ (0,
|
|
7480
|
+
var TooltipContent = React41.forwardRef(function TooltipContent2({ className, sideOffset = 8, align = "center", tone = "default", ...props }, ref) {
|
|
7481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6018
7482
|
TooltipPrimitive.Content,
|
|
6019
7483
|
{
|
|
6020
7484
|
ref,
|
|
@@ -6040,7 +7504,7 @@ var TooltipContent = React40.forwardRef(function TooltipContent2({ className, si
|
|
|
6040
7504
|
) });
|
|
6041
7505
|
});
|
|
6042
7506
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
6043
|
-
var StatusTooltip =
|
|
7507
|
+
var StatusTooltip = React41.forwardRef(function StatusTooltip2({
|
|
6044
7508
|
children,
|
|
6045
7509
|
label,
|
|
6046
7510
|
status = "default",
|
|
@@ -6055,11 +7519,11 @@ var StatusTooltip = React40.forwardRef(function StatusTooltip2({
|
|
|
6055
7519
|
className
|
|
6056
7520
|
}, ref) {
|
|
6057
7521
|
if (disabled) {
|
|
6058
|
-
return /* @__PURE__ */ (0,
|
|
7522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children });
|
|
6059
7523
|
}
|
|
6060
|
-
return /* @__PURE__ */ (0,
|
|
6061
|
-
/* @__PURE__ */ (0,
|
|
6062
|
-
/* @__PURE__ */ (0,
|
|
7524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TooltipProvider, { delayDuration, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Tooltip, { open, defaultOpen, onOpenChange, children: [
|
|
7525
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TooltipTrigger, { asChild: true, children }),
|
|
7526
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6063
7527
|
TooltipContent,
|
|
6064
7528
|
{
|
|
6065
7529
|
ref,
|
|
@@ -6077,7 +7541,7 @@ var StatusTooltip = React40.forwardRef(function StatusTooltip2({
|
|
|
6077
7541
|
StatusTooltip.displayName = "StatusTooltip";
|
|
6078
7542
|
|
|
6079
7543
|
// src/components/status-indicator.tsx
|
|
6080
|
-
var
|
|
7544
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
6081
7545
|
var workflowStatusOptions = [
|
|
6082
7546
|
"draft",
|
|
6083
7547
|
"in_progress",
|
|
@@ -6158,7 +7622,7 @@ var toneTextClassName = {
|
|
|
6158
7622
|
warning: "text-[color:var(--sofya-tone-warning-foreground)]",
|
|
6159
7623
|
destructive: "text-[color:var(--sofya-tone-destructive-foreground)]"
|
|
6160
7624
|
};
|
|
6161
|
-
var StatusIndicator =
|
|
7625
|
+
var StatusIndicator = React42.forwardRef(
|
|
6162
7626
|
function StatusIndicator2({
|
|
6163
7627
|
className,
|
|
6164
7628
|
label,
|
|
@@ -6169,7 +7633,7 @@ var StatusIndicator = React41.forwardRef(
|
|
|
6169
7633
|
...props
|
|
6170
7634
|
}, ref) {
|
|
6171
7635
|
const resolved = resolveWorkflowStatus(status, { label });
|
|
6172
|
-
const indicator = /* @__PURE__ */ (0,
|
|
7636
|
+
const indicator = /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
6173
7637
|
"span",
|
|
6174
7638
|
{
|
|
6175
7639
|
ref,
|
|
@@ -6184,7 +7648,7 @@ var StatusIndicator = React41.forwardRef(
|
|
|
6184
7648
|
),
|
|
6185
7649
|
...props,
|
|
6186
7650
|
children: [
|
|
6187
|
-
/* @__PURE__ */ (0,
|
|
7651
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6188
7652
|
"span",
|
|
6189
7653
|
{
|
|
6190
7654
|
"aria-hidden": "true",
|
|
@@ -6205,15 +7669,15 @@ var StatusIndicator = React41.forwardRef(
|
|
|
6205
7669
|
if (!tooltip) {
|
|
6206
7670
|
return indicator;
|
|
6207
7671
|
}
|
|
6208
|
-
return /* @__PURE__ */ (0,
|
|
7672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(StatusTooltip, { status: resolved.tone, label: resolved.label, side, children: indicator });
|
|
6209
7673
|
}
|
|
6210
7674
|
);
|
|
6211
7675
|
StatusIndicator.displayName = "StatusIndicator";
|
|
6212
7676
|
|
|
6213
7677
|
// src/components/switch.tsx
|
|
6214
|
-
var
|
|
7678
|
+
var React43 = __toESM(require("react"), 1);
|
|
6215
7679
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
|
|
6216
|
-
var
|
|
7680
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6217
7681
|
var switchSizeOptions = ["default", "sm"];
|
|
6218
7682
|
var switchRootSizeClasses = {
|
|
6219
7683
|
default: "h-6 w-11",
|
|
@@ -6223,7 +7687,7 @@ var switchThumbSizeClasses = {
|
|
|
6223
7687
|
default: "h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
|
6224
7688
|
sm: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
6225
7689
|
};
|
|
6226
|
-
var Switch =
|
|
7690
|
+
var Switch = React43.forwardRef(
|
|
6227
7691
|
({
|
|
6228
7692
|
"aria-describedby": ariaDescribedBy,
|
|
6229
7693
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -6238,7 +7702,7 @@ var Switch = React42.forwardRef(
|
|
|
6238
7702
|
size,
|
|
6239
7703
|
...props
|
|
6240
7704
|
}, ref) => {
|
|
6241
|
-
const generatedId =
|
|
7705
|
+
const generatedId = React43.useId();
|
|
6242
7706
|
const resolvedId = id ?? generatedId;
|
|
6243
7707
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
6244
7708
|
const descriptionId = description ? `${resolvedId}-description` : void 0;
|
|
@@ -6247,7 +7711,7 @@ var Switch = React42.forwardRef(
|
|
|
6247
7711
|
const alignClassName2 = description ? "items-start" : "items-center";
|
|
6248
7712
|
const resolvedAriaDescribedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ") || void 0;
|
|
6249
7713
|
const resolvedAriaLabelledBy = ariaLabelledBy ?? labelId;
|
|
6250
|
-
const switchControl = /* @__PURE__ */ (0,
|
|
7714
|
+
const switchControl = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6251
7715
|
SwitchPrimitives.Root,
|
|
6252
7716
|
{
|
|
6253
7717
|
id: resolvedId,
|
|
@@ -6262,7 +7726,7 @@ var Switch = React42.forwardRef(
|
|
|
6262
7726
|
"data-size": resolvedSize,
|
|
6263
7727
|
...props,
|
|
6264
7728
|
ref,
|
|
6265
|
-
children: /* @__PURE__ */ (0,
|
|
7729
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6266
7730
|
SwitchPrimitives.Thumb,
|
|
6267
7731
|
{
|
|
6268
7732
|
className: cn(
|
|
@@ -6276,7 +7740,7 @@ var Switch = React42.forwardRef(
|
|
|
6276
7740
|
if (!hasTextContent) {
|
|
6277
7741
|
return switchControl;
|
|
6278
7742
|
}
|
|
6279
|
-
return /* @__PURE__ */ (0,
|
|
7743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
6280
7744
|
"div",
|
|
6281
7745
|
{
|
|
6282
7746
|
"data-slot": "switch-container",
|
|
@@ -6287,8 +7751,8 @@ var Switch = React42.forwardRef(
|
|
|
6287
7751
|
}),
|
|
6288
7752
|
children: [
|
|
6289
7753
|
switchControl,
|
|
6290
|
-
/* @__PURE__ */ (0,
|
|
6291
|
-
label ? /* @__PURE__ */ (0,
|
|
7754
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: selectionControlContentBaseClasses, children: [
|
|
7755
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("label", { htmlFor: resolvedId, className: selectionControlLabelTextBaseClasses, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6292
7756
|
"span",
|
|
6293
7757
|
{
|
|
6294
7758
|
id: labelId,
|
|
@@ -6303,7 +7767,7 @@ var Switch = React42.forwardRef(
|
|
|
6303
7767
|
})
|
|
6304
7768
|
}
|
|
6305
7769
|
) }) : null,
|
|
6306
|
-
description ? /* @__PURE__ */ (0,
|
|
7770
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6307
7771
|
"span",
|
|
6308
7772
|
{
|
|
6309
7773
|
id: descriptionId,
|
|
@@ -6328,8 +7792,8 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
|
6328
7792
|
|
|
6329
7793
|
// src/components/table.tsx
|
|
6330
7794
|
var import_class_variance_authority8 = require("class-variance-authority");
|
|
6331
|
-
var
|
|
6332
|
-
var
|
|
7795
|
+
var React44 = __toESM(require("react"), 1);
|
|
7796
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
6333
7797
|
var tableDensityOptions = ["default", "compact"];
|
|
6334
7798
|
var tableCellVariantOptions = ["default", "primary", "muted"];
|
|
6335
7799
|
var tableStatusToneOptions = [
|
|
@@ -6339,10 +7803,10 @@ var tableStatusToneOptions = [
|
|
|
6339
7803
|
"warning"
|
|
6340
7804
|
];
|
|
6341
7805
|
var tableActionToneOptions = ["primary", "neutral", "danger"];
|
|
6342
|
-
var TableDensityContext =
|
|
6343
|
-
var TableHeaderDensityContext =
|
|
7806
|
+
var TableDensityContext = React44.createContext("default");
|
|
7807
|
+
var TableHeaderDensityContext = React44.createContext("default");
|
|
6344
7808
|
function useTableDensity(density) {
|
|
6345
|
-
const inheritedDensity =
|
|
7809
|
+
const inheritedDensity = React44.useContext(TableDensityContext);
|
|
6346
7810
|
return density ?? inheritedDensity;
|
|
6347
7811
|
}
|
|
6348
7812
|
var tableCellVariants = (0, import_class_variance_authority8.cva)(
|
|
@@ -6398,13 +7862,13 @@ var tableActionButtonVariants = (0, import_class_variance_authority8.cva)(
|
|
|
6398
7862
|
}
|
|
6399
7863
|
}
|
|
6400
7864
|
);
|
|
6401
|
-
var Table =
|
|
6402
|
-
return /* @__PURE__ */ (0,
|
|
7865
|
+
var Table = React44.forwardRef(function Table2({ className, density = "default", ...props }, ref) {
|
|
7866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableDensityContext.Provider, { value: density, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6403
7867
|
"div",
|
|
6404
7868
|
{
|
|
6405
7869
|
"data-slot": "table-container",
|
|
6406
7870
|
className: "relative w-full overflow-x-auto",
|
|
6407
|
-
children: /* @__PURE__ */ (0,
|
|
7871
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6408
7872
|
"table",
|
|
6409
7873
|
{
|
|
6410
7874
|
"data-density": density,
|
|
@@ -6421,10 +7885,10 @@ var Table = React43.forwardRef(function Table2({ className, density = "default",
|
|
|
6421
7885
|
}
|
|
6422
7886
|
) });
|
|
6423
7887
|
});
|
|
6424
|
-
var TableHeader =
|
|
7888
|
+
var TableHeader = React44.forwardRef(function TableHeader2({ className, density, ...props }, ref) {
|
|
6425
7889
|
const tableDensity = useTableDensity();
|
|
6426
7890
|
const headerDensity = density ?? tableDensity;
|
|
6427
|
-
return /* @__PURE__ */ (0,
|
|
7891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableHeaderDensityContext.Provider, { value: headerDensity, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableDensityContext.Provider, { value: "default", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6428
7892
|
"thead",
|
|
6429
7893
|
{
|
|
6430
7894
|
"data-slot": "table-header",
|
|
@@ -6438,8 +7902,8 @@ var TableHeader = React43.forwardRef(function TableHeader2({ className, density,
|
|
|
6438
7902
|
}
|
|
6439
7903
|
) }) });
|
|
6440
7904
|
});
|
|
6441
|
-
var TableBody =
|
|
6442
|
-
return /* @__PURE__ */ (0,
|
|
7905
|
+
var TableBody = React44.forwardRef(function TableBody2({ className, ...props }, ref) {
|
|
7906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6443
7907
|
"tbody",
|
|
6444
7908
|
{
|
|
6445
7909
|
"data-slot": "table-body",
|
|
@@ -6449,8 +7913,8 @@ var TableBody = React43.forwardRef(function TableBody2({ className, ...props },
|
|
|
6449
7913
|
}
|
|
6450
7914
|
);
|
|
6451
7915
|
});
|
|
6452
|
-
var TableFooter =
|
|
6453
|
-
return /* @__PURE__ */ (0,
|
|
7916
|
+
var TableFooter = React44.forwardRef(function TableFooter2({ className, ...props }, ref) {
|
|
7917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6454
7918
|
"tfoot",
|
|
6455
7919
|
{
|
|
6456
7920
|
"data-slot": "table-footer",
|
|
@@ -6463,10 +7927,10 @@ var TableFooter = React43.forwardRef(function TableFooter2({ className, ...props
|
|
|
6463
7927
|
}
|
|
6464
7928
|
);
|
|
6465
7929
|
});
|
|
6466
|
-
var TableRow =
|
|
7930
|
+
var TableRow = React44.forwardRef(
|
|
6467
7931
|
function TableRow2({ className, density, ...props }, ref) {
|
|
6468
7932
|
const resolvedDensity = useTableDensity(density);
|
|
6469
|
-
return /* @__PURE__ */ (0,
|
|
7933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableDensityContext.Provider, { value: resolvedDensity, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6470
7934
|
"tr",
|
|
6471
7935
|
{
|
|
6472
7936
|
"data-density": resolvedDensity,
|
|
@@ -6482,9 +7946,9 @@ var TableRow = React43.forwardRef(
|
|
|
6482
7946
|
) });
|
|
6483
7947
|
}
|
|
6484
7948
|
);
|
|
6485
|
-
var TableHead =
|
|
6486
|
-
const headerDensity =
|
|
6487
|
-
return /* @__PURE__ */ (0,
|
|
7949
|
+
var TableHead = React44.forwardRef(function TableHead2({ className, children, ...props }, ref) {
|
|
7950
|
+
const headerDensity = React44.useContext(TableHeaderDensityContext);
|
|
7951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6488
7952
|
"th",
|
|
6489
7953
|
{
|
|
6490
7954
|
"data-slot": "table-head",
|
|
@@ -6505,10 +7969,10 @@ var TableHead = React43.forwardRef(function TableHead2({ className, children, ..
|
|
|
6505
7969
|
}
|
|
6506
7970
|
);
|
|
6507
7971
|
});
|
|
6508
|
-
var TableCell =
|
|
7972
|
+
var TableCell = React44.forwardRef(
|
|
6509
7973
|
function TableCell2({ className, density, variant, truncate, children, ...props }, ref) {
|
|
6510
7974
|
const resolvedDensity = useTableDensity(density);
|
|
6511
|
-
return /* @__PURE__ */ (0,
|
|
7975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6512
7976
|
"td",
|
|
6513
7977
|
{
|
|
6514
7978
|
"data-density": resolvedDensity,
|
|
@@ -6533,8 +7997,8 @@ var TableCell = React43.forwardRef(
|
|
|
6533
7997
|
);
|
|
6534
7998
|
}
|
|
6535
7999
|
);
|
|
6536
|
-
var TableCaption =
|
|
6537
|
-
return /* @__PURE__ */ (0,
|
|
8000
|
+
var TableCaption = React44.forwardRef(function TableCaption2({ className, children, ...props }, ref) {
|
|
8001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6538
8002
|
"caption",
|
|
6539
8003
|
{
|
|
6540
8004
|
"data-slot": "table-caption",
|
|
@@ -6553,12 +8017,12 @@ var TableCaption = React43.forwardRef(function TableCaption2({ className, childr
|
|
|
6553
8017
|
}
|
|
6554
8018
|
);
|
|
6555
8019
|
});
|
|
6556
|
-
var TableCellTitle =
|
|
8020
|
+
var TableCellTitle = React44.forwardRef(
|
|
6557
8021
|
function TableCellTitle2({ className, children, size, ...props }, ref) {
|
|
6558
8022
|
const density = useTableDensity();
|
|
6559
8023
|
const resolvedSize = size ?? (density === "compact" ? "compact" : "default");
|
|
6560
8024
|
const textSize = resolvedSize === "compact" ? "label-md" : "body";
|
|
6561
|
-
return /* @__PURE__ */ (0,
|
|
8025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6562
8026
|
"span",
|
|
6563
8027
|
{
|
|
6564
8028
|
"data-slot": "table-cell-title",
|
|
@@ -6578,11 +8042,11 @@ var TableCellTitle = React43.forwardRef(
|
|
|
6578
8042
|
);
|
|
6579
8043
|
}
|
|
6580
8044
|
);
|
|
6581
|
-
var TableCellDescription =
|
|
8045
|
+
var TableCellDescription = React44.forwardRef(function TableCellDescription2({ className, children, size, ...props }, ref) {
|
|
6582
8046
|
const density = useTableDensity();
|
|
6583
8047
|
const resolvedSize = size ?? (density === "compact" ? "compact" : "default");
|
|
6584
8048
|
const textSize = resolvedSize === "compact" ? "body-sm" : "tiny";
|
|
6585
|
-
return /* @__PURE__ */ (0,
|
|
8049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6586
8050
|
"span",
|
|
6587
8051
|
{
|
|
6588
8052
|
"data-slot": "table-cell-description",
|
|
@@ -6610,7 +8074,7 @@ function TableStatusBadge({
|
|
|
6610
8074
|
...props
|
|
6611
8075
|
}) {
|
|
6612
8076
|
const resolvedDensity = useTableDensity(density);
|
|
6613
|
-
return /* @__PURE__ */ (0,
|
|
8077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6614
8078
|
Badge,
|
|
6615
8079
|
{
|
|
6616
8080
|
"data-density": resolvedDensity,
|
|
@@ -6629,8 +8093,8 @@ function TableStatusBadge({
|
|
|
6629
8093
|
}
|
|
6630
8094
|
);
|
|
6631
8095
|
}
|
|
6632
|
-
var TableActionButton =
|
|
6633
|
-
return /* @__PURE__ */ (0,
|
|
8096
|
+
var TableActionButton = React44.forwardRef(function TableActionButton2({ className, tone, type = "button", children, ...props }, ref) {
|
|
8097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6634
8098
|
Button,
|
|
6635
8099
|
{
|
|
6636
8100
|
ref,
|
|
@@ -6648,8 +8112,8 @@ var TableActionButton = React43.forwardRef(function TableActionButton2({ classNa
|
|
|
6648
8112
|
}
|
|
6649
8113
|
);
|
|
6650
8114
|
});
|
|
6651
|
-
var TableActions =
|
|
6652
|
-
return /* @__PURE__ */ (0,
|
|
8115
|
+
var TableActions = React44.forwardRef(function TableActions2({ className, ...props }, ref) {
|
|
8116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6653
8117
|
"div",
|
|
6654
8118
|
{
|
|
6655
8119
|
ref,
|
|
@@ -6676,8 +8140,8 @@ TableActions.displayName = "TableActions";
|
|
|
6676
8140
|
|
|
6677
8141
|
// src/components/tag.tsx
|
|
6678
8142
|
var import_class_variance_authority9 = require("class-variance-authority");
|
|
6679
|
-
var
|
|
6680
|
-
var
|
|
8143
|
+
var React45 = __toESM(require("react"), 1);
|
|
8144
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
6681
8145
|
var tagVariantOptions = [
|
|
6682
8146
|
"neutral",
|
|
6683
8147
|
"organization",
|
|
@@ -6718,9 +8182,9 @@ var tagStatusToneClasses = {
|
|
|
6718
8182
|
warning: "border-[color:var(--sofya-tone-warning-border)] bg-[color:var(--sofya-tone-warning-background)] text-[color:var(--sofya-tone-warning-foreground)]",
|
|
6719
8183
|
destructive: "border-[color:var(--sofya-tone-destructive-border)] bg-[color:var(--sofya-tone-destructive-background)] text-[color:var(--sofya-tone-destructive-foreground)]"
|
|
6720
8184
|
};
|
|
6721
|
-
var Tag =
|
|
8185
|
+
var Tag = React45.forwardRef(function Tag2({ children, className, icon, tone = "info", truncate = false, variant, ...props }, ref) {
|
|
6722
8186
|
const resolvedVariant = variant ?? "neutral";
|
|
6723
|
-
return /* @__PURE__ */ (0,
|
|
8187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
6724
8188
|
"span",
|
|
6725
8189
|
{
|
|
6726
8190
|
ref,
|
|
@@ -6734,7 +8198,7 @@ var Tag = React44.forwardRef(function Tag2({ children, className, icon, tone = "
|
|
|
6734
8198
|
),
|
|
6735
8199
|
...props,
|
|
6736
8200
|
children: [
|
|
6737
|
-
icon ? /* @__PURE__ */ (0,
|
|
8201
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "inline-flex shrink-0 items-center justify-center", children: icon }) : null,
|
|
6738
8202
|
renderTextContent(children, {
|
|
6739
8203
|
as: "span",
|
|
6740
8204
|
className: cn("text-inherit", truncate && "min-w-0 truncate"),
|
|
@@ -6755,11 +8219,11 @@ var privacyDefaultLabels = {
|
|
|
6755
8219
|
organization: "Minha organiza\xE7\xE3o",
|
|
6756
8220
|
public: "P\xFAblico"
|
|
6757
8221
|
};
|
|
6758
|
-
var PrivacyLabel =
|
|
8222
|
+
var PrivacyLabel = React45.forwardRef(
|
|
6759
8223
|
function PrivacyLabel2({ appearance = "text", className, icon, label, privacy, ...props }, ref) {
|
|
6760
8224
|
const content = label ?? privacyDefaultLabels[privacy];
|
|
6761
8225
|
if (appearance === "tag") {
|
|
6762
|
-
return /* @__PURE__ */ (0,
|
|
8226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6763
8227
|
Tag,
|
|
6764
8228
|
{
|
|
6765
8229
|
ref,
|
|
@@ -6772,7 +8236,7 @@ var PrivacyLabel = React44.forwardRef(
|
|
|
6772
8236
|
}
|
|
6773
8237
|
);
|
|
6774
8238
|
}
|
|
6775
|
-
return /* @__PURE__ */ (0,
|
|
8239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
6776
8240
|
"span",
|
|
6777
8241
|
{
|
|
6778
8242
|
ref,
|
|
@@ -6784,7 +8248,7 @@ var PrivacyLabel = React44.forwardRef(
|
|
|
6784
8248
|
),
|
|
6785
8249
|
...props,
|
|
6786
8250
|
children: [
|
|
6787
|
-
icon ? /* @__PURE__ */ (0,
|
|
8251
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "inline-flex shrink-0 items-center justify-center", children: icon }) : null,
|
|
6788
8252
|
renderTextContent(content, {
|
|
6789
8253
|
as: "span",
|
|
6790
8254
|
className: "text-inherit",
|
|
@@ -6798,12 +8262,12 @@ var PrivacyLabel = React44.forwardRef(
|
|
|
6798
8262
|
PrivacyLabel.displayName = "PrivacyLabel";
|
|
6799
8263
|
|
|
6800
8264
|
// src/components/template-card.tsx
|
|
6801
|
-
var
|
|
6802
|
-
var
|
|
8265
|
+
var React46 = __toESM(require("react"), 1);
|
|
8266
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
6803
8267
|
var templateCardLayoutOptions = ["card", "list"];
|
|
6804
8268
|
var templateCardFavoriteDisplayOptions = ["action", "inline"];
|
|
6805
8269
|
var templateCardMetaPlacementOptions = ["block", "inline"];
|
|
6806
|
-
var TemplateCard =
|
|
8270
|
+
var TemplateCard = React46.forwardRef(
|
|
6807
8271
|
function TemplateCard2({
|
|
6808
8272
|
className,
|
|
6809
8273
|
description,
|
|
@@ -6830,14 +8294,14 @@ var TemplateCard = React45.forwardRef(
|
|
|
6830
8294
|
const showInlineMeta = metaPlacement === "inline" && Boolean(meta);
|
|
6831
8295
|
const showBlockMeta = metaPlacement !== "inline" && Boolean(meta);
|
|
6832
8296
|
const showFavoriteAction = favoriteDisplay !== "inline" && (onToggleFavorite !== void 0 || favorited !== void 0);
|
|
6833
|
-
const actions = showFavoriteAction || overflow ? /* @__PURE__ */ (0,
|
|
6834
|
-
showFavoriteAction ? /* @__PURE__ */ (0,
|
|
8297
|
+
const actions = showFavoriteAction || overflow ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex shrink-0 items-center gap-[var(--sofya-gap-tight)]", children: [
|
|
8298
|
+
showFavoriteAction ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6835
8299
|
IconButton,
|
|
6836
8300
|
{
|
|
6837
8301
|
"aria-label": favoriteLabel,
|
|
6838
8302
|
selected: Boolean(favorited),
|
|
6839
8303
|
onClick: onToggleFavorite,
|
|
6840
|
-
icon: /* @__PURE__ */ (0,
|
|
8304
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { name: "star", size: 18 })
|
|
6841
8305
|
}
|
|
6842
8306
|
) : null,
|
|
6843
8307
|
overflow
|
|
@@ -6852,10 +8316,10 @@ var TemplateCard = React45.forwardRef(
|
|
|
6852
8316
|
style: selectable ? { fontSize: "15px", lineHeight: "26px", fontWeight: 600 } : void 0
|
|
6853
8317
|
});
|
|
6854
8318
|
const hasInlineTitleExtras = showInlineStar || showInlineMeta;
|
|
6855
|
-
const titleRow = hasInlineTitleExtras ? /* @__PURE__ */ (0,
|
|
6856
|
-
showInlineStar ? /* @__PURE__ */ (0,
|
|
8319
|
+
const titleRow = hasInlineTitleExtras ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex min-w-0 items-center gap-[var(--sofya-gap-tight)]", children: [
|
|
8320
|
+
showInlineStar ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { name: "star-filled", size: 18, color: "primary" }) : null,
|
|
6857
8321
|
titleNode,
|
|
6858
|
-
showInlineMeta ? /* @__PURE__ */ (0,
|
|
8322
|
+
showInlineMeta ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6859
8323
|
"span",
|
|
6860
8324
|
{
|
|
6861
8325
|
"data-slot": "template-card-meta-inline",
|
|
@@ -6864,7 +8328,7 @@ var TemplateCard = React45.forwardRef(
|
|
|
6864
8328
|
}
|
|
6865
8329
|
) : null
|
|
6866
8330
|
] }) : titleNode;
|
|
6867
|
-
const heading = /* @__PURE__ */ (0,
|
|
8331
|
+
const heading = /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex min-w-0 flex-col gap-[var(--sofya-space-1)]", children: [
|
|
6868
8332
|
titleRow,
|
|
6869
8333
|
description ? renderTextContent(description, {
|
|
6870
8334
|
as: "span",
|
|
@@ -6882,7 +8346,7 @@ var TemplateCard = React45.forwardRef(
|
|
|
6882
8346
|
style: selectable ? { fontSize: "14px", lineHeight: "18px", fontWeight: 400 } : void 0
|
|
6883
8347
|
}) : null
|
|
6884
8348
|
] });
|
|
6885
|
-
const blockMeta = showBlockMeta ? /* @__PURE__ */ (0,
|
|
8349
|
+
const blockMeta = showBlockMeta ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6886
8350
|
"div",
|
|
6887
8351
|
{
|
|
6888
8352
|
"data-slot": "template-card-meta",
|
|
@@ -6906,7 +8370,7 @@ var TemplateCard = React45.forwardRef(
|
|
|
6906
8370
|
}
|
|
6907
8371
|
onKeyDown?.(event);
|
|
6908
8372
|
};
|
|
6909
|
-
return /* @__PURE__ */ (0,
|
|
8373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6910
8374
|
"div",
|
|
6911
8375
|
{
|
|
6912
8376
|
ref,
|
|
@@ -6932,13 +8396,13 @@ var TemplateCard = React45.forwardRef(
|
|
|
6932
8396
|
className
|
|
6933
8397
|
),
|
|
6934
8398
|
...props,
|
|
6935
|
-
children: selectable ? /* @__PURE__ */ (0,
|
|
6936
|
-
/* @__PURE__ */ (0,
|
|
8399
|
+
children: selectable ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
8400
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6937
8401
|
"span",
|
|
6938
8402
|
{
|
|
6939
8403
|
className: "shrink-0",
|
|
6940
8404
|
onClick: (event) => event.stopPropagation(),
|
|
6941
|
-
children: /* @__PURE__ */ (0,
|
|
8405
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6942
8406
|
Checkbox,
|
|
6943
8407
|
{
|
|
6944
8408
|
checked: selected,
|
|
@@ -6948,15 +8412,15 @@ var TemplateCard = React45.forwardRef(
|
|
|
6948
8412
|
)
|
|
6949
8413
|
}
|
|
6950
8414
|
),
|
|
6951
|
-
/* @__PURE__ */ (0,
|
|
8415
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "min-w-0 flex-1", children: heading }),
|
|
6952
8416
|
blockMeta,
|
|
6953
8417
|
actions
|
|
6954
|
-
] }) : isList ? /* @__PURE__ */ (0,
|
|
6955
|
-
/* @__PURE__ */ (0,
|
|
8418
|
+
] }) : isList ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
8419
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "min-w-0 flex-1", children: heading }),
|
|
6956
8420
|
blockMeta,
|
|
6957
8421
|
actions
|
|
6958
|
-
] }) : /* @__PURE__ */ (0,
|
|
6959
|
-
/* @__PURE__ */ (0,
|
|
8422
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
8423
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-start justify-between gap-[var(--sofya-gap-compact)]", children: [
|
|
6960
8424
|
heading,
|
|
6961
8425
|
actions
|
|
6962
8426
|
] }),
|
|
@@ -6967,16 +8431,16 @@ var TemplateCard = React45.forwardRef(
|
|
|
6967
8431
|
}
|
|
6968
8432
|
);
|
|
6969
8433
|
TemplateCard.displayName = "TemplateCard";
|
|
6970
|
-
var TemplateListItem =
|
|
6971
|
-
return /* @__PURE__ */ (0,
|
|
8434
|
+
var TemplateListItem = React46.forwardRef(function TemplateListItem2(props, ref) {
|
|
8435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TemplateCard, { ref, layout: "list", ...props });
|
|
6972
8436
|
});
|
|
6973
8437
|
TemplateListItem.displayName = "TemplateListItem";
|
|
6974
8438
|
|
|
6975
8439
|
// src/components/tabs.tsx
|
|
6976
|
-
var
|
|
8440
|
+
var React47 = __toESM(require("react"), 1);
|
|
6977
8441
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
6978
8442
|
var import_react3 = require("motion/react");
|
|
6979
|
-
var
|
|
8443
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
6980
8444
|
function resolveDefaultValue(items, defaultValue) {
|
|
6981
8445
|
if (defaultValue) {
|
|
6982
8446
|
return defaultValue;
|
|
@@ -7000,13 +8464,13 @@ function Tabs({
|
|
|
7000
8464
|
onChange: onValueChange,
|
|
7001
8465
|
value
|
|
7002
8466
|
});
|
|
7003
|
-
const indicatorLayoutId =
|
|
7004
|
-
|
|
8467
|
+
const indicatorLayoutId = React47.useId();
|
|
8468
|
+
React47.useEffect(() => {
|
|
7005
8469
|
if (value === void 0) {
|
|
7006
8470
|
setUncontrolledCurrentValue(resolvedDefaultValue);
|
|
7007
8471
|
}
|
|
7008
8472
|
}, [resolvedDefaultValue, setUncontrolledCurrentValue, value]);
|
|
7009
|
-
return /* @__PURE__ */ (0,
|
|
8473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
7010
8474
|
TabsPrimitive.Root,
|
|
7011
8475
|
{
|
|
7012
8476
|
className: cn("w-full", className),
|
|
@@ -7014,7 +8478,7 @@ function Tabs({
|
|
|
7014
8478
|
value: currentValue,
|
|
7015
8479
|
...props,
|
|
7016
8480
|
children: [
|
|
7017
|
-
/* @__PURE__ */ (0,
|
|
8481
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7018
8482
|
TabsPrimitive.List,
|
|
7019
8483
|
{
|
|
7020
8484
|
"aria-label": "Subtelas navegaveis",
|
|
@@ -7025,7 +8489,7 @@ function Tabs({
|
|
|
7025
8489
|
children: items.map((item) => {
|
|
7026
8490
|
const isUnavailable = item.disabled || item.loading;
|
|
7027
8491
|
const isActive = item.value === currentValue;
|
|
7028
|
-
return /* @__PURE__ */ (0,
|
|
8492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
7029
8493
|
TabsPrimitive.Trigger,
|
|
7030
8494
|
{
|
|
7031
8495
|
value: item.value,
|
|
@@ -7037,7 +8501,7 @@ function Tabs({
|
|
|
7037
8501
|
item.triggerClassName
|
|
7038
8502
|
),
|
|
7039
8503
|
children: [
|
|
7040
|
-
isActive ? /* @__PURE__ */ (0,
|
|
8504
|
+
isActive ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7041
8505
|
import_react3.motion.span,
|
|
7042
8506
|
{
|
|
7043
8507
|
"aria-hidden": "true",
|
|
@@ -7047,15 +8511,15 @@ function Tabs({
|
|
|
7047
8511
|
transition: { duration: 0.25, ease: "easeInOut" }
|
|
7048
8512
|
}
|
|
7049
8513
|
) : null,
|
|
7050
|
-
/* @__PURE__ */ (0,
|
|
7051
|
-
item.loading ? /* @__PURE__ */ (0,
|
|
8514
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "relative z-10 inline-flex items-center gap-2", children: [
|
|
8515
|
+
item.loading ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7052
8516
|
"span",
|
|
7053
8517
|
{
|
|
7054
8518
|
"aria-hidden": "true",
|
|
7055
8519
|
className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-r-transparent"
|
|
7056
8520
|
}
|
|
7057
8521
|
) : null,
|
|
7058
|
-
/* @__PURE__ */ (0,
|
|
8522
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: renderTextContent(item.label, {
|
|
7059
8523
|
as: "span",
|
|
7060
8524
|
className: "block text-inherit",
|
|
7061
8525
|
size: "body"
|
|
@@ -7069,7 +8533,7 @@ function Tabs({
|
|
|
7069
8533
|
}
|
|
7070
8534
|
),
|
|
7071
8535
|
items.map(
|
|
7072
|
-
(item) => item.content !== void 0 ? /* @__PURE__ */ (0,
|
|
8536
|
+
(item) => item.content !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7073
8537
|
TabsPrimitive.Content,
|
|
7074
8538
|
{
|
|
7075
8539
|
value: item.value,
|
|
@@ -7092,9 +8556,9 @@ function Tabs({
|
|
|
7092
8556
|
Tabs.displayName = "Tabs";
|
|
7093
8557
|
|
|
7094
8558
|
// src/components/textarea.tsx
|
|
7095
|
-
var
|
|
7096
|
-
var
|
|
7097
|
-
var Textarea =
|
|
8559
|
+
var React48 = __toESM(require("react"), 1);
|
|
8560
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
8561
|
+
var Textarea = React48.forwardRef(
|
|
7098
8562
|
({
|
|
7099
8563
|
className,
|
|
7100
8564
|
containerClassName,
|
|
@@ -7104,10 +8568,10 @@ var Textarea = React47.forwardRef(
|
|
|
7104
8568
|
rows = 5,
|
|
7105
8569
|
...props
|
|
7106
8570
|
}, ref) => {
|
|
7107
|
-
const generatedId =
|
|
8571
|
+
const generatedId = React48.useId();
|
|
7108
8572
|
const resolvedId = id ?? generatedId;
|
|
7109
8573
|
const ariaLabel = props["aria-label"] ?? (typeof label === "string" ? label : void 0);
|
|
7110
|
-
const control = /* @__PURE__ */ (0,
|
|
8574
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7111
8575
|
"textarea",
|
|
7112
8576
|
{
|
|
7113
8577
|
className: cn(
|
|
@@ -7121,7 +8585,7 @@ var Textarea = React47.forwardRef(
|
|
|
7121
8585
|
"aria-label": ariaLabel
|
|
7122
8586
|
}
|
|
7123
8587
|
);
|
|
7124
|
-
return /* @__PURE__ */ (0,
|
|
8588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7125
8589
|
FieldShell,
|
|
7126
8590
|
{
|
|
7127
8591
|
control,
|
|
@@ -7136,10 +8600,10 @@ var Textarea = React47.forwardRef(
|
|
|
7136
8600
|
Textarea.displayName = "Textarea";
|
|
7137
8601
|
|
|
7138
8602
|
// src/components/toggle.tsx
|
|
7139
|
-
var
|
|
8603
|
+
var React49 = __toESM(require("react"), 1);
|
|
7140
8604
|
var SwitchPrimitives2 = __toESM(require("@radix-ui/react-switch"), 1);
|
|
7141
|
-
var
|
|
7142
|
-
var Toggle =
|
|
8605
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
8606
|
+
var Toggle = React49.forwardRef(function Toggle2({
|
|
7143
8607
|
"aria-describedby": ariaDescribedBy,
|
|
7144
8608
|
"aria-labelledby": ariaLabelledBy,
|
|
7145
8609
|
className,
|
|
@@ -7152,7 +8616,7 @@ var Toggle = React48.forwardRef(function Toggle2({
|
|
|
7152
8616
|
labelClassName,
|
|
7153
8617
|
...props
|
|
7154
8618
|
}, ref) {
|
|
7155
|
-
const generatedId =
|
|
8619
|
+
const generatedId = React49.useId();
|
|
7156
8620
|
const resolvedId = id ?? generatedId;
|
|
7157
8621
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
7158
8622
|
const descriptionId = description ? `${resolvedId}-description` : void 0;
|
|
@@ -7160,7 +8624,7 @@ var Toggle = React48.forwardRef(function Toggle2({
|
|
|
7160
8624
|
const alignClassName2 = description ? "items-start" : "items-center";
|
|
7161
8625
|
const resolvedAriaDescribedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ") || void 0;
|
|
7162
8626
|
const resolvedAriaLabelledBy = ariaLabelledBy ?? labelId;
|
|
7163
|
-
const toggleControl = /* @__PURE__ */ (0,
|
|
8627
|
+
const toggleControl = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7164
8628
|
SwitchPrimitives2.Root,
|
|
7165
8629
|
{
|
|
7166
8630
|
id: resolvedId,
|
|
@@ -7174,7 +8638,7 @@ var Toggle = React48.forwardRef(function Toggle2({
|
|
|
7174
8638
|
className
|
|
7175
8639
|
),
|
|
7176
8640
|
...props,
|
|
7177
|
-
children: /* @__PURE__ */ (0,
|
|
8641
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7178
8642
|
SwitchPrimitives2.Thumb,
|
|
7179
8643
|
{
|
|
7180
8644
|
"data-slot": "toggle-thumb",
|
|
@@ -7186,7 +8650,7 @@ var Toggle = React48.forwardRef(function Toggle2({
|
|
|
7186
8650
|
if (!hasTextContent) {
|
|
7187
8651
|
return toggleControl;
|
|
7188
8652
|
}
|
|
7189
|
-
return /* @__PURE__ */ (0,
|
|
8653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
7190
8654
|
"div",
|
|
7191
8655
|
{
|
|
7192
8656
|
"data-slot": "toggle-container",
|
|
@@ -7197,8 +8661,8 @@ var Toggle = React48.forwardRef(function Toggle2({
|
|
|
7197
8661
|
}),
|
|
7198
8662
|
children: [
|
|
7199
8663
|
toggleControl,
|
|
7200
|
-
/* @__PURE__ */ (0,
|
|
7201
|
-
label ? /* @__PURE__ */ (0,
|
|
8664
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: selectionControlContentBaseClasses, children: [
|
|
8665
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("label", { htmlFor: resolvedId, className: selectionControlLabelTextBaseClasses, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7202
8666
|
"span",
|
|
7203
8667
|
{
|
|
7204
8668
|
id: labelId,
|
|
@@ -7210,7 +8674,7 @@ var Toggle = React48.forwardRef(function Toggle2({
|
|
|
7210
8674
|
})
|
|
7211
8675
|
}
|
|
7212
8676
|
) }) : null,
|
|
7213
|
-
description ? /* @__PURE__ */ (0,
|
|
8677
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7214
8678
|
"span",
|
|
7215
8679
|
{
|
|
7216
8680
|
id: descriptionId,
|
|
@@ -7233,9 +8697,9 @@ var Toggle = React48.forwardRef(function Toggle2({
|
|
|
7233
8697
|
Toggle.displayName = "Toggle";
|
|
7234
8698
|
|
|
7235
8699
|
// src/theme/provider.tsx
|
|
7236
|
-
var
|
|
8700
|
+
var React50 = __toESM(require("react"), 1);
|
|
7237
8701
|
var import_tokens3 = require("@sofya-ds/tokens");
|
|
7238
|
-
var
|
|
8702
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
7239
8703
|
var SOFYA_FONT_LINKS = [
|
|
7240
8704
|
{
|
|
7241
8705
|
id: "preconnect-googleapis",
|
|
@@ -7255,7 +8719,7 @@ var SOFYA_FONT_LINKS = [
|
|
|
7255
8719
|
}
|
|
7256
8720
|
];
|
|
7257
8721
|
function useSofyaFontLinks() {
|
|
7258
|
-
|
|
8722
|
+
React50.useEffect(() => {
|
|
7259
8723
|
if (typeof document === "undefined") {
|
|
7260
8724
|
return;
|
|
7261
8725
|
}
|
|
@@ -7288,7 +8752,7 @@ function SofyaProvider({
|
|
|
7288
8752
|
useSofyaFontLinks();
|
|
7289
8753
|
const theme = (0, import_tokens3.createWhitelabelTheme)(overrides ?? {}, preset);
|
|
7290
8754
|
const cssVariables = (0, import_tokens3.themeToCssVariables)(theme);
|
|
7291
|
-
return /* @__PURE__ */ (0,
|
|
8755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7292
8756
|
"div",
|
|
7293
8757
|
{
|
|
7294
8758
|
"data-sofya-theme": theme.name,
|
|
@@ -7387,6 +8851,15 @@ var import_tokens4 = require("@sofya-ds/tokens");
|
|
|
7387
8851
|
RadioGroupOptionDescription,
|
|
7388
8852
|
RadioGroupOptionIndicator,
|
|
7389
8853
|
RadioGroupOptionLabel,
|
|
8854
|
+
ReasoningLabsWidget,
|
|
8855
|
+
ReasoningSummaryWidget,
|
|
8856
|
+
ReasoningVitalsWidget,
|
|
8857
|
+
ReasoningWidget,
|
|
8858
|
+
ReasoningWidgetActionButton,
|
|
8859
|
+
ReasoningWidgetActions,
|
|
8860
|
+
ReasoningWidgetList,
|
|
8861
|
+
ReasoningWidgetRenderer,
|
|
8862
|
+
ReasoningWidgetTable,
|
|
7390
8863
|
RichTextToolbar,
|
|
7391
8864
|
RichTextToolbarButton,
|
|
7392
8865
|
RichTextToolbarGroup,
|
|
@@ -7491,6 +8964,14 @@ var import_tokens4 = require("@sofya-ds/tokens");
|
|
|
7491
8964
|
progressSizeOptions,
|
|
7492
8965
|
radioGroupOrientationOptions,
|
|
7493
8966
|
radioGroupVariantOptions,
|
|
8967
|
+
reasoningWidgetActionScopeOptions,
|
|
8968
|
+
reasoningWidgetActionToneOptions,
|
|
8969
|
+
reasoningWidgetDensityOptions,
|
|
8970
|
+
reasoningWidgetFrameOptions,
|
|
8971
|
+
reasoningWidgetTableAlignOptions,
|
|
8972
|
+
reasoningWidgetTableColumnVariantOptions,
|
|
8973
|
+
reasoningWidgetToneOptions,
|
|
8974
|
+
reasoningWidgetVariantOptions,
|
|
7494
8975
|
renderTextContent,
|
|
7495
8976
|
resolveSurfaceToken,
|
|
7496
8977
|
resolveTextStyle,
|