@sofya-ds/react 1.13.0 → 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 +1898 -301
- package/dist/index.css +1 -1
- package/dist/index.d.cts +250 -9
- package/dist/index.d.ts +250 -9
- package/dist/index.js +1893 -301
- 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,
|
|
@@ -134,7 +143,11 @@ __export(index_exports, {
|
|
|
134
143
|
SelectValue: () => SelectValue,
|
|
135
144
|
Separator: () => Separator2,
|
|
136
145
|
SettingsNavItem: () => SettingsNavItem,
|
|
146
|
+
SidebarNav: () => SidebarNav,
|
|
137
147
|
SidebarNavItem: () => SidebarNavItem,
|
|
148
|
+
SidebarNavSection: () => SidebarNavSection,
|
|
149
|
+
SidebarNavSectionItems: () => SidebarNavSectionItems,
|
|
150
|
+
SidebarNavSectionLabel: () => SidebarNavSectionLabel,
|
|
138
151
|
Skeleton: () => Skeleton,
|
|
139
152
|
Slider: () => Slider,
|
|
140
153
|
SofyaProvider: () => SofyaProvider,
|
|
@@ -213,6 +226,14 @@ __export(index_exports, {
|
|
|
213
226
|
progressSizeOptions: () => progressSizeOptions,
|
|
214
227
|
radioGroupOrientationOptions: () => radioGroupOrientationOptions,
|
|
215
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,
|
|
216
237
|
renderTextContent: () => renderTextContent,
|
|
217
238
|
resolveSurfaceToken: () => import_tokens4.resolveSurfaceToken,
|
|
218
239
|
resolveTextStyle: () => import_tokens4.resolveTextStyle,
|
|
@@ -365,26 +386,42 @@ var React2 = __toESM(require("react"), 1);
|
|
|
365
386
|
var import_icons_react = require("@tabler/icons-react");
|
|
366
387
|
var tablerIconRegistry = {
|
|
367
388
|
IconAdjustmentsHorizontalFilled: import_icons_react.IconAdjustmentsHorizontalFilled,
|
|
389
|
+
IconActivity: import_icons_react.IconActivity,
|
|
390
|
+
IconActivityHeartbeat: import_icons_react.IconActivityHeartbeat,
|
|
368
391
|
IconAlignCenter: import_icons_react.IconAlignCenter,
|
|
369
392
|
IconAlignJustified: import_icons_react.IconAlignJustified,
|
|
370
393
|
IconAlignLeft: import_icons_react.IconAlignLeft,
|
|
371
394
|
IconAlignRight: import_icons_react.IconAlignRight,
|
|
395
|
+
IconAlertCircle: import_icons_react.IconAlertCircle,
|
|
372
396
|
IconArrowUp: import_icons_react.IconArrowUp,
|
|
373
397
|
IconArchive: import_icons_react.IconArchive,
|
|
374
398
|
IconBold: import_icons_react.IconBold,
|
|
399
|
+
IconBrain: import_icons_react.IconBrain,
|
|
375
400
|
IconBuildingHospital: import_icons_react.IconBuildingHospital,
|
|
376
401
|
IconBooks: import_icons_react.IconBooks,
|
|
377
402
|
IconBulb: import_icons_react.IconBulb,
|
|
378
403
|
IconChartBar: import_icons_react.IconChartBar,
|
|
379
404
|
IconCheck: import_icons_react.IconCheck,
|
|
380
405
|
IconChecklist: import_icons_react.IconChecklist,
|
|
406
|
+
IconClipboardList: import_icons_react.IconClipboardList,
|
|
407
|
+
IconClipboardText: import_icons_react.IconClipboardText,
|
|
381
408
|
IconCode: import_icons_react.IconCode,
|
|
409
|
+
IconFileText: import_icons_react.IconFileText,
|
|
410
|
+
IconFlask: import_icons_react.IconFlask,
|
|
411
|
+
IconHeartbeat: import_icons_react.IconHeartbeat,
|
|
382
412
|
IconItalic: import_icons_react.IconItalic,
|
|
383
413
|
IconLink: import_icons_react.IconLink,
|
|
384
414
|
IconList: import_icons_react.IconList,
|
|
415
|
+
IconListCheck: import_icons_react.IconListCheck,
|
|
385
416
|
IconListNumbers: import_icons_react.IconListNumbers,
|
|
417
|
+
IconNotes: import_icons_react.IconNotes,
|
|
418
|
+
IconPill: import_icons_react.IconPill,
|
|
386
419
|
IconQuote: import_icons_react.IconQuote,
|
|
420
|
+
IconReportMedical: import_icons_react.IconReportMedical,
|
|
387
421
|
IconStrikethrough: import_icons_react.IconStrikethrough,
|
|
422
|
+
IconStethoscope: import_icons_react.IconStethoscope,
|
|
423
|
+
IconTable: import_icons_react.IconTable,
|
|
424
|
+
IconTemperature: import_icons_react.IconTemperature,
|
|
388
425
|
IconUnderline: import_icons_react.IconUnderline,
|
|
389
426
|
IconChevronLeft: import_icons_react.IconChevronLeft,
|
|
390
427
|
IconChevronDown: import_icons_react.IconChevronDown,
|
|
@@ -452,6 +489,7 @@ var legacyIconToTablerNameMap = {
|
|
|
452
489
|
"lightbulb": "IconBulb",
|
|
453
490
|
"chats": "IconMessages",
|
|
454
491
|
"file": "IconFile",
|
|
492
|
+
"file-text": "IconFileText",
|
|
455
493
|
"folders": "IconFolders",
|
|
456
494
|
"sparkle": "IconSparkles",
|
|
457
495
|
"x": "IconX",
|
|
@@ -459,6 +497,21 @@ var legacyIconToTablerNameMap = {
|
|
|
459
497
|
"search": "IconSearch",
|
|
460
498
|
"arrow-up": "IconArrowUp",
|
|
461
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",
|
|
462
515
|
"user-filled": "IconUserFilled",
|
|
463
516
|
"caret-up": "IconChevronUp",
|
|
464
517
|
"caret-left": "IconChevronLeft",
|
|
@@ -657,6 +710,9 @@ var defaultElements = {
|
|
|
657
710
|
"heading-xl": "h1",
|
|
658
711
|
"heading-lg": "h2",
|
|
659
712
|
"heading-md": "h3",
|
|
713
|
+
"settings-page-title": "h1",
|
|
714
|
+
"home-inline-encounter-title": "h1",
|
|
715
|
+
"home-inline-encounter-action": "span",
|
|
660
716
|
h1: "h1",
|
|
661
717
|
h2: "h2",
|
|
662
718
|
h3: "h3",
|
|
@@ -669,7 +725,10 @@ var defaultElements = {
|
|
|
669
725
|
"body-md": "p",
|
|
670
726
|
"body-sm": "p",
|
|
671
727
|
body: "p",
|
|
728
|
+
"clinical-body": "p",
|
|
672
729
|
"label-md": "span",
|
|
730
|
+
"settings-section-title": "span",
|
|
731
|
+
"clinical-section-title": "span",
|
|
673
732
|
"section-label": "span",
|
|
674
733
|
"eyebrow-md": "span",
|
|
675
734
|
"overline-md": "span",
|
|
@@ -696,7 +755,8 @@ var textSizeStyles = Object.fromEntries(
|
|
|
696
755
|
fontSize: `var(--sofya-text-${size}-font-size)`,
|
|
697
756
|
fontWeight: `var(--sofya-text-${size}-font-weight)`,
|
|
698
757
|
lineHeight: `var(--sofya-text-${size}-line-height)`,
|
|
699
|
-
letterSpacing: `var(--sofya-text-${size}-letter-spacing)
|
|
758
|
+
letterSpacing: `var(--sofya-text-${size}-letter-spacing)`,
|
|
759
|
+
...size === "settings-section-title" || size === "clinical-section-title" ? { textTransform: "uppercase" } : {}
|
|
700
760
|
}
|
|
701
761
|
])
|
|
702
762
|
);
|
|
@@ -1190,6 +1250,7 @@ var buttonRippleVariantClasses = {
|
|
|
1190
1250
|
icon: "bg-[hsl(var(--sofya-primary)/0.34)]",
|
|
1191
1251
|
language: "bg-[hsl(var(--sofya-background)/0.76)] mix-blend-screen",
|
|
1192
1252
|
secondary: "bg-[hsl(var(--sofya-primary)/0.30)]",
|
|
1253
|
+
"auth-outline": "bg-[hsl(var(--sofya-primary)/0.24)]",
|
|
1193
1254
|
outline: "bg-[hsl(var(--sofya-primary)/0.32)]",
|
|
1194
1255
|
ghost: "bg-[hsl(var(--sofya-primary)/0.28)]",
|
|
1195
1256
|
destructive: "bg-[hsl(var(--sofya-destructive-foreground)/0.78)] mix-blend-screen"
|
|
@@ -1198,6 +1259,8 @@ var buttonRippleBaseSize = {
|
|
|
1198
1259
|
default: 20,
|
|
1199
1260
|
sm: 18,
|
|
1200
1261
|
lg: 22,
|
|
1262
|
+
toolbar: 20,
|
|
1263
|
+
auth: 22,
|
|
1201
1264
|
icon: 18
|
|
1202
1265
|
};
|
|
1203
1266
|
function useButtonRippleState({
|
|
@@ -1450,11 +1513,12 @@ var buttonVariantOptions = [
|
|
|
1450
1513
|
"icon",
|
|
1451
1514
|
"language",
|
|
1452
1515
|
"secondary",
|
|
1516
|
+
"auth-outline",
|
|
1453
1517
|
"outline",
|
|
1454
1518
|
"ghost",
|
|
1455
1519
|
"destructive"
|
|
1456
1520
|
];
|
|
1457
|
-
var buttonSizeOptions = ["default", "sm", "lg", "icon"];
|
|
1521
|
+
var buttonSizeOptions = ["default", "sm", "lg", "toolbar", "auth", "icon"];
|
|
1458
1522
|
var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
1459
1523
|
"relative isolate inline-flex items-center justify-center gap-2 overflow-hidden whitespace-nowrap rounded-full font-medium tracking-[0.025em] transform-gpu transition-[width,transform,filter,background-color,border-color,color,box-shadow] duration-sofya ease-sofya motion-safe:active:scale-[0.985] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none data-[disabled=true]:cursor-not-allowed",
|
|
1460
1524
|
{
|
|
@@ -1468,6 +1532,7 @@ var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
|
1468
1532
|
icon: "border-0 bg-transparent text-[color:var(--sofya-text-soft)] shadow-none hover:bg-[color:var(--sofya-surface-hover)] hover:text-[color:var(--sofya-text-default)] data-[disabled=true]:bg-transparent data-[disabled=true]:text-[color:var(--sofya-text-subtle)] data-[disabled=true]:shadow-none",
|
|
1469
1533
|
language: "border-0 bg-muted bg-cover bg-center bg-no-repeat text-primary-foreground shadow-none hover:brightness-[1.03]",
|
|
1470
1534
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 data-[disabled=true]:bg-muted data-[disabled=true]:text-[color:var(--sofya-text-subtle)]",
|
|
1535
|
+
"auth-outline": "rounded-[10px] border border-[color:var(--sofya-border-strong)] bg-card text-[color:var(--sofya-text-default)] shadow-none hover:border-[color:var(--sofya-border-strong)] hover:bg-card active:bg-card data-[disabled=true]:border-[color:var(--sofya-border-soft)] data-[disabled=true]:text-[color:var(--sofya-text-subtle)]",
|
|
1471
1536
|
outline: "border border-primary/15 bg-background text-foreground hover:border-primary/30 hover:bg-background active:bg-background data-[disabled=true]:border-[color:var(--sofya-border-soft)] data-[disabled=true]:text-[color:var(--sofya-text-subtle)]",
|
|
1472
1537
|
ghost: "bg-transparent text-foreground hover:bg-muted data-[disabled=true]:text-[color:var(--sofya-text-subtle)]",
|
|
1473
1538
|
destructive: "bg-destructive text-destructive-foreground hover:brightness-[1.04] data-[disabled=true]:bg-muted data-[disabled=true]:text-[color:var(--sofya-text-subtle)]"
|
|
@@ -1476,6 +1541,8 @@ var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
|
1476
1541
|
default: "h-11 px-10",
|
|
1477
1542
|
sm: "h-10 px-6",
|
|
1478
1543
|
lg: "h-12 px-12",
|
|
1544
|
+
toolbar: "h-[42px] px-7",
|
|
1545
|
+
auth: "h-[46px] px-6",
|
|
1479
1546
|
icon: "h-11 w-11"
|
|
1480
1547
|
}
|
|
1481
1548
|
},
|
|
@@ -1489,12 +1556,16 @@ var loadingSpinnerSizeClasses = {
|
|
|
1489
1556
|
default: "h-4 w-4",
|
|
1490
1557
|
sm: "h-3.5 w-3.5",
|
|
1491
1558
|
lg: "h-[18px] w-[18px]",
|
|
1559
|
+
toolbar: "h-4 w-4",
|
|
1560
|
+
auth: "h-4 w-4",
|
|
1492
1561
|
icon: "h-4 w-4"
|
|
1493
1562
|
};
|
|
1494
1563
|
var languageButtonSizeClasses = {
|
|
1495
1564
|
default: "h-11 w-11 rounded-full p-0",
|
|
1496
1565
|
sm: "h-10 w-10 rounded-full p-0",
|
|
1497
1566
|
lg: "h-12 w-12 rounded-full p-0",
|
|
1567
|
+
toolbar: "h-[42px] w-[42px] rounded-full p-0",
|
|
1568
|
+
auth: "h-[46px] w-[46px] rounded-full p-0",
|
|
1498
1569
|
icon: "h-11 w-11 rounded-full p-0"
|
|
1499
1570
|
};
|
|
1500
1571
|
function ButtonSpinner({
|
|
@@ -1538,6 +1609,7 @@ var Button = React7.forwardRef(
|
|
|
1538
1609
|
const resolvedSize = size ?? (isIconOnly ? "icon" : "default");
|
|
1539
1610
|
const resolvedVariant = variant ?? "default";
|
|
1540
1611
|
const isLanguageButton = variant === "language";
|
|
1612
|
+
const textSize = resolvedVariant === "auth-outline" ? "body-md" : "tiny";
|
|
1541
1613
|
const resolvedLanguageLocale = isLanguageButton ? languageLocale ?? "en-US" : void 0;
|
|
1542
1614
|
const resolvedLanguageFlagSrc = resolvedLanguageLocale ? buttonLanguageFlagSrc[resolvedLanguageLocale] : void 0;
|
|
1543
1615
|
const resolvedLanguageLabel = resolvedLanguageLocale ? buttonLanguageLabels[resolvedLanguageLocale] : void 0;
|
|
@@ -1596,7 +1668,7 @@ var Button = React7.forwardRef(
|
|
|
1596
1668
|
hasChildren ? renderTextContent(children, {
|
|
1597
1669
|
as: "span",
|
|
1598
1670
|
className: "inline-flex items-center text-current",
|
|
1599
|
-
size:
|
|
1671
|
+
size: textSize,
|
|
1600
1672
|
style: {
|
|
1601
1673
|
fontWeight: "inherit",
|
|
1602
1674
|
letterSpacing: "inherit"
|
|
@@ -3264,6 +3336,7 @@ InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
|
3264
3336
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3265
3337
|
var inputVariantOptions = [
|
|
3266
3338
|
"default",
|
|
3339
|
+
"auth-login",
|
|
3267
3340
|
"search",
|
|
3268
3341
|
"otp",
|
|
3269
3342
|
"upload"
|
|
@@ -3396,6 +3469,7 @@ var Input = React16.forwardRef((props, ref) => {
|
|
|
3396
3469
|
...nativeProps
|
|
3397
3470
|
} = props;
|
|
3398
3471
|
const isSearch = variant === "search";
|
|
3472
|
+
const isAuthLogin = variant === "auth-login";
|
|
3399
3473
|
const resolvedType = type ?? (isSearch ? "search" : void 0);
|
|
3400
3474
|
const ariaLabel = nativeProps["aria-label"] ?? (typeof label === "string" ? label : isSearch ? "Search" : void 0);
|
|
3401
3475
|
const nativeControl = isSearch ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex h-[88px] w-full items-center gap-6 rounded-full border border-[color:var(--sofya-border-strong)] bg-card px-8 shadow-none transition-[border-color,box-shadow,background-color] duration-sofya ease-sofya hover:border-[color:var(--sofya-border-hover)] hover:ring-2 hover:ring-[color:var(--sofya-focus-ring-soft)] focus-within:border-transparent focus-within:ring-2 focus-within:ring-[color:var(--sofya-focus-ring-soft)] has-[:active]:border-transparent has-[:active]:ring-2 has-[:active]:ring-[color:var(--sofya-focus-ring-soft)]", children: [
|
|
@@ -3431,7 +3505,8 @@ var Input = React16.forwardRef((props, ref) => {
|
|
|
3431
3505
|
ref,
|
|
3432
3506
|
type: resolvedType,
|
|
3433
3507
|
className: cn(
|
|
3434
|
-
"flex
|
|
3508
|
+
"flex w-full rounded-[10px] border border-[color:var(--sofya-border-strong)] bg-card text-[color:var(--sofya-text-default)] shadow-none transition-[border-color,box-shadow,background-color,color] duration-sofya ease-sofya placeholder:text-[color:var(--sofya-text-placeholder)] hover:border-[color:var(--sofya-border-hover)] focus:border-transparent 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",
|
|
3509
|
+
isAuthLogin ? "h-[46px] px-6 py-3 [font-family:var(--sofya-text-tiny-font-family)] text-[14px] [font-weight:500] leading-[24px] tracking-[var(--sofya-text-tiny-letter-spacing)] placeholder:font-medium" : "h-10 px-4 py-2 [font-family:var(--sofya-text-tiny-font-family)] text-[length:var(--sofya-text-tiny-font-size)] [font-weight:var(--sofya-text-tiny-font-weight)] leading-[var(--sofya-text-tiny-line-height)] tracking-[var(--sofya-text-tiny-letter-spacing)]",
|
|
3435
3510
|
className
|
|
3436
3511
|
),
|
|
3437
3512
|
...nativeProps,
|
|
@@ -3441,10 +3516,12 @@ var Input = React16.forwardRef((props, ref) => {
|
|
|
3441
3516
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3442
3517
|
FieldShell,
|
|
3443
3518
|
{
|
|
3444
|
-
containerClassName,
|
|
3519
|
+
containerClassName: cn(isAuthLogin ? "gap-2.5" : void 0, containerClassName),
|
|
3445
3520
|
control: nativeControl,
|
|
3446
3521
|
label: isSearch ? void 0 : label,
|
|
3447
3522
|
labelClassName: isSearch ? void 0 : labelClassName,
|
|
3523
|
+
labelTextSize: isAuthLogin ? "body-md" : void 0,
|
|
3524
|
+
labelTextStyle: isAuthLogin ? { fontWeight: 500 } : void 0,
|
|
3448
3525
|
labelHtmlFor: isSearch ? void 0 : resolvedId
|
|
3449
3526
|
}
|
|
3450
3527
|
);
|
|
@@ -5158,156 +5235,1569 @@ var RichTextToolbarButton = React31.forwardRef(function RichTextToolbarButton2({
|
|
|
5158
5235
|
});
|
|
5159
5236
|
RichTextToolbarButton.displayName = "RichTextToolbarButton";
|
|
5160
5237
|
|
|
5161
|
-
// src/components/
|
|
5238
|
+
// src/components/reasoning-widget.tsx
|
|
5162
5239
|
var React32 = __toESM(require("react"), 1);
|
|
5163
5240
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5164
|
-
var
|
|
5165
|
-
|
|
5166
|
-
|
|
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,
|
|
5167
5462
|
{
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
variant: "ghost",
|
|
5171
|
-
selected: active,
|
|
5172
|
-
"data-slot": "right-rail-action",
|
|
5463
|
+
as,
|
|
5464
|
+
"aria-label": ariaLabel,
|
|
5173
5465
|
className: cn(
|
|
5174
|
-
"
|
|
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",
|
|
5175
5469
|
className
|
|
5176
5470
|
),
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
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
|
|
5196
5492
|
}
|
|
5197
5493
|
);
|
|
5198
|
-
}
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
return /* @__PURE__ */ (0,
|
|
5202
|
-
|
|
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,
|
|
5203
5499
|
{
|
|
5204
5500
|
ref,
|
|
5205
|
-
"
|
|
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],
|
|
5206
5511
|
className: cn(
|
|
5207
|
-
"
|
|
5512
|
+
"rounded-[var(--sofya-radius-sm)] text-[color:var(--sofya-text-soft)]",
|
|
5513
|
+
tone === "primary" && "text-primary",
|
|
5208
5514
|
className
|
|
5209
5515
|
),
|
|
5516
|
+
onClick: () => {
|
|
5517
|
+
onAction?.({
|
|
5518
|
+
action,
|
|
5519
|
+
target,
|
|
5520
|
+
widgetId
|
|
5521
|
+
});
|
|
5522
|
+
},
|
|
5210
5523
|
...props
|
|
5211
5524
|
}
|
|
5212
5525
|
);
|
|
5213
5526
|
});
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
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",
|
|
5218
5541
|
{
|
|
5219
5542
|
ref,
|
|
5220
|
-
"data-slot": "
|
|
5221
|
-
|
|
5543
|
+
"data-slot": "reasoning-widget-actions",
|
|
5544
|
+
"data-reveal": reveal,
|
|
5222
5545
|
className: cn(
|
|
5223
|
-
"flex
|
|
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",
|
|
5224
5549
|
className
|
|
5225
5550
|
),
|
|
5226
5551
|
...props,
|
|
5227
|
-
children: /* @__PURE__ */ (0,
|
|
5228
|
-
|
|
5552
|
+
children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5553
|
+
ReasoningWidgetActionButton,
|
|
5229
5554
|
{
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
)
|
|
5555
|
+
action,
|
|
5556
|
+
onAction,
|
|
5557
|
+
target,
|
|
5558
|
+
widgetId
|
|
5559
|
+
},
|
|
5560
|
+
action.id
|
|
5561
|
+
))
|
|
5237
5562
|
}
|
|
5238
5563
|
);
|
|
5239
5564
|
});
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
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",
|
|
5244
5717
|
{
|
|
5245
5718
|
ref,
|
|
5246
|
-
"data-slot": "
|
|
5247
|
-
className: cn("
|
|
5248
|
-
...props
|
|
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
|
+
))
|
|
5249
5830
|
}
|
|
5250
5831
|
);
|
|
5251
5832
|
});
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
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, {
|
|
5271
5853
|
as: "span",
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
);
|
|
5279
|
-
});
|
|
5280
|
-
SelectValue.displayName = SelectPrimitive.Value.displayName;
|
|
5281
|
-
var SelectTrigger = React34.forwardRef(function SelectTrigger2({ className, children, size = "default", ...props }, ref) {
|
|
5282
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
5283
|
-
SelectPrimitive.Trigger,
|
|
5854
|
+
className: "block text-inherit",
|
|
5855
|
+
size: "body-md"
|
|
5856
|
+
}) });
|
|
5857
|
+
}
|
|
5858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5859
|
+
"div",
|
|
5284
5860
|
{
|
|
5285
5861
|
ref,
|
|
5286
|
-
"data-slot": "
|
|
5287
|
-
"data-size": size,
|
|
5862
|
+
"data-slot": "reasoning-widget-table",
|
|
5288
5863
|
className: cn(
|
|
5289
|
-
|
|
5290
|
-
"data-[size=default]:h-10 data-[size=default]:py-2 data-[size=sm]:h-9 data-[size=sm]:px-2 data-[size=sm]:text-[14px] data-[size=sm]:leading-5 [&>span]:line-clamp-1 [&>span]:flex-1",
|
|
5864
|
+
"overflow-hidden rounded-[10px] border border-[color:var(--sofya-neutral-600)] bg-[color:var(--sofya-neutral-50)]",
|
|
5291
5865
|
className
|
|
5292
5866
|
),
|
|
5293
5867
|
...props,
|
|
5294
|
-
children: [
|
|
5295
|
-
children,
|
|
5296
|
-
|
|
5297
|
-
Icon,
|
|
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",
|
|
5298
5871
|
{
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
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
|
+
}
|
|
5306
5950
|
);
|
|
5307
5951
|
});
|
|
5308
|
-
|
|
5309
|
-
|
|
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)(
|
|
6656
|
+
IconButton,
|
|
6657
|
+
{
|
|
6658
|
+
ref,
|
|
6659
|
+
icon,
|
|
6660
|
+
variant: "ghost",
|
|
6661
|
+
selected: active,
|
|
6662
|
+
"data-slot": "right-rail-action",
|
|
6663
|
+
className: cn(
|
|
6664
|
+
"size-[var(--sofya-icon-button-size-md)] rounded-[var(--sofya-radius-md)] shadow-none",
|
|
6665
|
+
className
|
|
6666
|
+
),
|
|
6667
|
+
...props
|
|
6668
|
+
}
|
|
6669
|
+
)
|
|
6670
|
+
);
|
|
6671
|
+
RightRailAction.displayName = "RightRailAction";
|
|
6672
|
+
|
|
6673
|
+
// src/components/scroll-area.tsx
|
|
6674
|
+
var React34 = __toESM(require("react"), 1);
|
|
6675
|
+
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
6676
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
6677
|
+
var scrollAreaOrientationOptions = ["horizontal", "vertical"];
|
|
6678
|
+
var ScrollArea = React34.forwardRef(function ScrollArea2({ className, ...props }, ref) {
|
|
6679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6680
|
+
ScrollAreaPrimitive.Root,
|
|
6681
|
+
{
|
|
6682
|
+
ref,
|
|
6683
|
+
"data-slot": "scroll-area",
|
|
6684
|
+
className: cn("relative overflow-hidden", className),
|
|
6685
|
+
...props
|
|
6686
|
+
}
|
|
6687
|
+
);
|
|
6688
|
+
});
|
|
6689
|
+
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
6690
|
+
var ScrollAreaViewport = React34.forwardRef(function ScrollAreaViewport2({ className, ...props }, ref) {
|
|
5310
6691
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6692
|
+
ScrollAreaPrimitive.Viewport,
|
|
6693
|
+
{
|
|
6694
|
+
ref,
|
|
6695
|
+
"data-slot": "scroll-area-viewport",
|
|
6696
|
+
className: cn(
|
|
6697
|
+
"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--sofya-focus-ring-soft)] focus-visible:ring-offset-0",
|
|
6698
|
+
className
|
|
6699
|
+
),
|
|
6700
|
+
...props
|
|
6701
|
+
}
|
|
6702
|
+
);
|
|
6703
|
+
});
|
|
6704
|
+
ScrollAreaViewport.displayName = ScrollAreaPrimitive.Viewport.displayName;
|
|
6705
|
+
var ScrollAreaScrollbar = React34.forwardRef(function ScrollAreaScrollbar2({ className, orientation = "vertical", thumbClassName, ...props }, ref) {
|
|
6706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6707
|
+
ScrollAreaPrimitive.Scrollbar,
|
|
6708
|
+
{
|
|
6709
|
+
ref,
|
|
6710
|
+
"data-slot": "scroll-area-scrollbar",
|
|
6711
|
+
orientation,
|
|
6712
|
+
className: cn(
|
|
6713
|
+
"flex touch-none select-none p-0 transition-colors duration-sofya ease-sofya data-[orientation=horizontal]:h-2.5 data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:border-t data-[orientation=horizontal]:border-t-transparent data-[orientation=vertical]:h-full data-[orientation=vertical]:w-2.5 data-[orientation=vertical]:border-l data-[orientation=vertical]:border-l-transparent",
|
|
6714
|
+
className
|
|
6715
|
+
),
|
|
6716
|
+
...props,
|
|
6717
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6718
|
+
ScrollAreaPrimitive.Thumb,
|
|
6719
|
+
{
|
|
6720
|
+
"data-slot": "scroll-area-thumb",
|
|
6721
|
+
className: cn(
|
|
6722
|
+
"relative flex-1 rounded-full bg-[color:var(--sofya-border-strong)]",
|
|
6723
|
+
thumbClassName
|
|
6724
|
+
)
|
|
6725
|
+
}
|
|
6726
|
+
)
|
|
6727
|
+
}
|
|
6728
|
+
);
|
|
6729
|
+
});
|
|
6730
|
+
ScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;
|
|
6731
|
+
var ScrollAreaCorner = React34.forwardRef(function ScrollAreaCorner2({ className, ...props }, ref) {
|
|
6732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6733
|
+
ScrollAreaPrimitive.Corner,
|
|
6734
|
+
{
|
|
6735
|
+
ref,
|
|
6736
|
+
"data-slot": "scroll-area-corner",
|
|
6737
|
+
className: cn("bg-transparent", className),
|
|
6738
|
+
...props
|
|
6739
|
+
}
|
|
6740
|
+
);
|
|
6741
|
+
});
|
|
6742
|
+
ScrollAreaCorner.displayName = ScrollAreaPrimitive.Corner.displayName;
|
|
6743
|
+
|
|
6744
|
+
// src/components/select.tsx
|
|
6745
|
+
var React35 = __toESM(require("react"), 1);
|
|
6746
|
+
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
6747
|
+
|
|
6748
|
+
// src/lib/form-control-classes.ts
|
|
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)]";
|
|
6750
|
+
|
|
6751
|
+
// src/components/select.tsx
|
|
6752
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
6753
|
+
var selectSizeOptions = ["default", "sm"];
|
|
6754
|
+
var Select = SelectPrimitive.Root;
|
|
6755
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
6756
|
+
var SelectValue = React35.forwardRef(function SelectValue2({ className, ...props }, ref) {
|
|
6757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6758
|
+
Text,
|
|
6759
|
+
{
|
|
6760
|
+
ref,
|
|
6761
|
+
as: "span",
|
|
6762
|
+
"data-slot": "select-value",
|
|
6763
|
+
className: cn("block truncate text-inherit", className),
|
|
6764
|
+
size: "tiny",
|
|
6765
|
+
style: inheritedTypographyStyle,
|
|
6766
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectPrimitive.Value, { className: "block truncate", ...props })
|
|
6767
|
+
}
|
|
6768
|
+
);
|
|
6769
|
+
});
|
|
6770
|
+
SelectValue.displayName = SelectPrimitive.Value.displayName;
|
|
6771
|
+
var SelectTrigger = React35.forwardRef(function SelectTrigger2({ className, children, size = "default", ...props }, ref) {
|
|
6772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
6773
|
+
SelectPrimitive.Trigger,
|
|
6774
|
+
{
|
|
6775
|
+
ref,
|
|
6776
|
+
"data-slot": "select-trigger",
|
|
6777
|
+
"data-size": size,
|
|
6778
|
+
className: cn(
|
|
6779
|
+
formControlBaseClasses,
|
|
6780
|
+
"data-[size=default]:h-10 data-[size=default]:py-2 data-[size=sm]:h-9 data-[size=sm]:px-2 data-[size=sm]:text-[14px] data-[size=sm]:leading-5 [&>span]:line-clamp-1 [&>span]:flex-1",
|
|
6781
|
+
className
|
|
6782
|
+
),
|
|
6783
|
+
...props,
|
|
6784
|
+
children: [
|
|
6785
|
+
children,
|
|
6786
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6787
|
+
Icon,
|
|
6788
|
+
{
|
|
6789
|
+
name: "caret-down",
|
|
6790
|
+
size: size === "sm" ? 12 : 14,
|
|
6791
|
+
className: "shrink-0 text-[color:var(--sofya-text-subtle)]"
|
|
6792
|
+
}
|
|
6793
|
+
) })
|
|
6794
|
+
]
|
|
6795
|
+
}
|
|
6796
|
+
);
|
|
6797
|
+
});
|
|
6798
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
6799
|
+
var SelectScrollUpButton = React35.forwardRef(function SelectScrollUpButton2({ className, ...props }, ref) {
|
|
6800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5311
6801
|
SelectPrimitive.ScrollUpButton,
|
|
5312
6802
|
{
|
|
5313
6803
|
ref,
|
|
@@ -5317,13 +6807,13 @@ var SelectScrollUpButton = React34.forwardRef(function SelectScrollUpButton2({ c
|
|
|
5317
6807
|
className
|
|
5318
6808
|
),
|
|
5319
6809
|
...props,
|
|
5320
|
-
children: /* @__PURE__ */ (0,
|
|
6810
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { name: "caret-up", size: 12 })
|
|
5321
6811
|
}
|
|
5322
6812
|
);
|
|
5323
6813
|
});
|
|
5324
6814
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
5325
|
-
var SelectScrollDownButton =
|
|
5326
|
-
return /* @__PURE__ */ (0,
|
|
6815
|
+
var SelectScrollDownButton = React35.forwardRef(function SelectScrollDownButton2({ className, ...props }, ref) {
|
|
6816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5327
6817
|
SelectPrimitive.ScrollDownButton,
|
|
5328
6818
|
{
|
|
5329
6819
|
ref,
|
|
@@ -5333,13 +6823,13 @@ var SelectScrollDownButton = React34.forwardRef(function SelectScrollDownButton2
|
|
|
5333
6823
|
className
|
|
5334
6824
|
),
|
|
5335
6825
|
...props,
|
|
5336
|
-
children: /* @__PURE__ */ (0,
|
|
6826
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { name: "caret-down", size: 12 })
|
|
5337
6827
|
}
|
|
5338
6828
|
);
|
|
5339
6829
|
});
|
|
5340
6830
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
5341
|
-
var SelectContent =
|
|
5342
|
-
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)(
|
|
5343
6833
|
SelectPrimitive.Content,
|
|
5344
6834
|
{
|
|
5345
6835
|
ref,
|
|
@@ -5352,8 +6842,8 @@ var SelectContent = React34.forwardRef(function SelectContent2({ className, chil
|
|
|
5352
6842
|
),
|
|
5353
6843
|
...props,
|
|
5354
6844
|
children: [
|
|
5355
|
-
/* @__PURE__ */ (0,
|
|
5356
|
-
/* @__PURE__ */ (0,
|
|
6845
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectScrollUpButton, {}),
|
|
6846
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5357
6847
|
SelectPrimitive.Viewport,
|
|
5358
6848
|
{
|
|
5359
6849
|
"data-slot": "select-viewport",
|
|
@@ -5361,14 +6851,14 @@ var SelectContent = React34.forwardRef(function SelectContent2({ className, chil
|
|
|
5361
6851
|
children
|
|
5362
6852
|
}
|
|
5363
6853
|
),
|
|
5364
|
-
/* @__PURE__ */ (0,
|
|
6854
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectScrollDownButton, {})
|
|
5365
6855
|
]
|
|
5366
6856
|
}
|
|
5367
6857
|
) });
|
|
5368
6858
|
});
|
|
5369
6859
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
5370
|
-
var SelectLabel =
|
|
5371
|
-
return /* @__PURE__ */ (0,
|
|
6860
|
+
var SelectLabel = React35.forwardRef(function SelectLabel2({ className, ...props }, ref) {
|
|
6861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5372
6862
|
SelectPrimitive.Label,
|
|
5373
6863
|
{
|
|
5374
6864
|
ref,
|
|
@@ -5390,8 +6880,8 @@ var SelectLabel = React34.forwardRef(function SelectLabel2({ className, ...props
|
|
|
5390
6880
|
);
|
|
5391
6881
|
});
|
|
5392
6882
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
5393
|
-
var SelectItem =
|
|
5394
|
-
return /* @__PURE__ */ (0,
|
|
6883
|
+
var SelectItem = React35.forwardRef(function SelectItem2({ className, children, ...props }, ref) {
|
|
6884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
5395
6885
|
SelectPrimitive.Item,
|
|
5396
6886
|
{
|
|
5397
6887
|
ref,
|
|
@@ -5402,20 +6892,20 @@ var SelectItem = React34.forwardRef(function SelectItem2({ className, children,
|
|
|
5402
6892
|
),
|
|
5403
6893
|
...props,
|
|
5404
6894
|
children: [
|
|
5405
|
-
/* @__PURE__ */ (0,
|
|
6895
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectPrimitive.ItemText, { className: "truncate", children: renderTextContent(children, {
|
|
5406
6896
|
as: "span",
|
|
5407
6897
|
className: "block truncate text-[color:var(--sofya-text-default)]",
|
|
5408
6898
|
size: "tiny",
|
|
5409
6899
|
style: inheritedTypographyStyle
|
|
5410
6900
|
}) }),
|
|
5411
|
-
/* @__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 }) }) })
|
|
5412
6902
|
]
|
|
5413
6903
|
}
|
|
5414
6904
|
);
|
|
5415
6905
|
});
|
|
5416
6906
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
5417
|
-
var SelectSeparator =
|
|
5418
|
-
return /* @__PURE__ */ (0,
|
|
6907
|
+
var SelectSeparator = React35.forwardRef(function SelectSeparator2({ className, ...props }, ref) {
|
|
6908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5419
6909
|
SelectPrimitive.Separator,
|
|
5420
6910
|
{
|
|
5421
6911
|
ref,
|
|
@@ -5428,11 +6918,11 @@ var SelectSeparator = React34.forwardRef(function SelectSeparator2({ className,
|
|
|
5428
6918
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
5429
6919
|
|
|
5430
6920
|
// src/components/separator.tsx
|
|
5431
|
-
var
|
|
6921
|
+
var React36 = __toESM(require("react"), 1);
|
|
5432
6922
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
5433
|
-
var
|
|
5434
|
-
var Separator2 =
|
|
5435
|
-
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)(
|
|
5436
6926
|
SeparatorPrimitive.Root,
|
|
5437
6927
|
{
|
|
5438
6928
|
ref,
|
|
@@ -5451,13 +6941,93 @@ var Separator2 = React35.forwardRef(function Separator3({ className, decorative
|
|
|
5451
6941
|
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
5452
6942
|
|
|
5453
6943
|
// src/components/sidebar-nav-item.tsx
|
|
5454
|
-
var
|
|
5455
|
-
var
|
|
5456
|
-
var
|
|
5457
|
-
|
|
6944
|
+
var React37 = __toESM(require("react"), 1);
|
|
6945
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6946
|
+
var sidebarNavItemAppearanceClassNames = {
|
|
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",
|
|
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"
|
|
6949
|
+
};
|
|
6950
|
+
var sidebarNavItemIconClassNames = {
|
|
6951
|
+
settings: "flex h-5 w-5 shrink-0 items-center justify-center [&_svg]:h-[1em] [&_svg]:w-[1em] [&_svg]:shrink-0",
|
|
6952
|
+
workspace: "flex h-[var(--sofya-text-sidebar-title-font-size)] w-[var(--sofya-text-sidebar-title-font-size)] shrink-0 items-center justify-center [&_svg]:h-[1em] [&_svg]:w-[1em] [&_svg]:shrink-0"
|
|
6953
|
+
};
|
|
6954
|
+
var sidebarNavItemTextSize = {
|
|
6955
|
+
settings: "sidebar-title",
|
|
6956
|
+
workspace: "sidebar-title-regular"
|
|
6957
|
+
};
|
|
6958
|
+
var SidebarNav = React37.forwardRef(
|
|
6959
|
+
({ as, className, ...props }, ref) => {
|
|
6960
|
+
const Comp = as ?? "nav";
|
|
6961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6962
|
+
Comp,
|
|
6963
|
+
{
|
|
6964
|
+
ref,
|
|
6965
|
+
"data-slot": "sidebar-nav",
|
|
6966
|
+
className: cn("flex w-full min-w-0 flex-col gap-[var(--sofya-rhythm-group)]", className),
|
|
6967
|
+
...props
|
|
6968
|
+
}
|
|
6969
|
+
);
|
|
6970
|
+
}
|
|
6971
|
+
);
|
|
6972
|
+
SidebarNav.displayName = "SidebarNav";
|
|
6973
|
+
var SidebarNavSection = React37.forwardRef(
|
|
6974
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6975
|
+
"div",
|
|
6976
|
+
{
|
|
6977
|
+
ref,
|
|
6978
|
+
"data-slot": "sidebar-nav-section",
|
|
6979
|
+
className: cn("flex min-w-0 flex-col gap-[var(--sofya-rhythm-group)]", className),
|
|
6980
|
+
...props
|
|
6981
|
+
}
|
|
6982
|
+
)
|
|
6983
|
+
);
|
|
6984
|
+
SidebarNavSection.displayName = "SidebarNavSection";
|
|
6985
|
+
var SidebarNavSectionLabel = React37.forwardRef(
|
|
6986
|
+
({ as, className, children, ...props }, ref) => {
|
|
6987
|
+
const Comp = as ?? "h5";
|
|
6988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6989
|
+
Comp,
|
|
6990
|
+
{
|
|
6991
|
+
ref,
|
|
6992
|
+
"data-slot": "sidebar-nav-section-label",
|
|
6993
|
+
className: cn("m-0 min-w-0 text-muted-foreground uppercase", className),
|
|
6994
|
+
...props,
|
|
6995
|
+
children: renderTextContent(children, {
|
|
6996
|
+
as: "span",
|
|
6997
|
+
className: "block min-w-0 truncate text-inherit",
|
|
6998
|
+
size: "sidebar-title"
|
|
6999
|
+
})
|
|
7000
|
+
}
|
|
7001
|
+
);
|
|
7002
|
+
}
|
|
7003
|
+
);
|
|
7004
|
+
SidebarNavSectionLabel.displayName = "SidebarNavSectionLabel";
|
|
7005
|
+
var SidebarNavSectionItems = React37.forwardRef(
|
|
7006
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
7007
|
+
"div",
|
|
7008
|
+
{
|
|
7009
|
+
ref,
|
|
7010
|
+
"data-slot": "sidebar-nav-section-items",
|
|
7011
|
+
className: cn("flex min-w-0 flex-col gap-[var(--sofya-gap-comfortable)]", className),
|
|
7012
|
+
...props
|
|
7013
|
+
}
|
|
7014
|
+
)
|
|
7015
|
+
);
|
|
7016
|
+
SidebarNavSectionItems.displayName = "SidebarNavSectionItems";
|
|
7017
|
+
var SidebarNavItem = React37.forwardRef(
|
|
7018
|
+
function SidebarNavItem2({
|
|
7019
|
+
as,
|
|
7020
|
+
active = false,
|
|
7021
|
+
appearance = "settings",
|
|
7022
|
+
disabled = false,
|
|
7023
|
+
icon,
|
|
7024
|
+
className,
|
|
7025
|
+
children,
|
|
7026
|
+
...props
|
|
7027
|
+
}, ref) {
|
|
5458
7028
|
const Comp = as ?? (props.href ? "a" : "button");
|
|
5459
7029
|
const isNativeButton = Comp === "button";
|
|
5460
|
-
return /* @__PURE__ */ (0,
|
|
7030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
5461
7031
|
Comp,
|
|
5462
7032
|
{
|
|
5463
7033
|
ref,
|
|
@@ -5468,19 +7038,17 @@ var SidebarNavItem = React36.forwardRef(
|
|
|
5468
7038
|
"aria-disabled": disabled || void 0,
|
|
5469
7039
|
...isNativeButton ? { type: "button", disabled } : {},
|
|
5470
7040
|
className: cn(
|
|
5471
|
-
"group relative flex w-full items-center gap-[var(--sofya-gap-compact)]
|
|
7041
|
+
"group relative flex w-full items-center gap-[var(--sofya-gap-compact)] text-left no-underline outline-none",
|
|
5472
7042
|
"[font-family:var(--sofya-text-sidebar-title-font-family)] text-[length:var(--sofya-text-sidebar-title-font-size)] [font-weight:var(--sofya-text-sidebar-title-font-weight)] leading-[var(--sofya-text-sidebar-title-line-height)] tracking-[var(--sofya-text-sidebar-title-letter-spacing)]",
|
|
5473
|
-
"
|
|
5474
|
-
"hover:bg-[color:var(--sofya-surface-hover)] hover:text-[color:var(--sofya-text-default)]",
|
|
7043
|
+
"transition-colors duration-sofya ease-sofya",
|
|
5475
7044
|
"focus-visible:ring-2 focus-visible:ring-[color:var(--sofya-focus-ring-soft)] focus-visible:ring-offset-0",
|
|
5476
|
-
"data-[
|
|
5477
|
-
|
|
5478
|
-
"data-[disabled=true]:pointer-events-none data-[disabled=true]:cursor-not-allowed data-[disabled=true]:text-[color:var(--sofya-text-subtle)] data-[disabled=true]:hover:bg-transparent",
|
|
7045
|
+
"data-[disabled=true]:pointer-events-none data-[disabled=true]:cursor-not-allowed",
|
|
7046
|
+
sidebarNavItemAppearanceClassNames[appearance],
|
|
5479
7047
|
className
|
|
5480
7048
|
),
|
|
5481
7049
|
...props,
|
|
5482
7050
|
children: [
|
|
5483
|
-
/* @__PURE__ */ (0,
|
|
7051
|
+
appearance === "settings" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5484
7052
|
"span",
|
|
5485
7053
|
{
|
|
5486
7054
|
"aria-hidden": "true",
|
|
@@ -5490,12 +7058,19 @@ var SidebarNavItem = React36.forwardRef(
|
|
|
5490
7058
|
active ? "opacity-100" : "opacity-0"
|
|
5491
7059
|
)
|
|
5492
7060
|
}
|
|
5493
|
-
),
|
|
5494
|
-
icon ? /* @__PURE__ */ (0,
|
|
5495
|
-
|
|
7061
|
+
) : null,
|
|
7062
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
7063
|
+
"span",
|
|
7064
|
+
{
|
|
7065
|
+
"data-slot": "sidebar-nav-item-icon",
|
|
7066
|
+
className: sidebarNavItemIconClassNames[appearance],
|
|
7067
|
+
children: icon
|
|
7068
|
+
}
|
|
7069
|
+
) : null,
|
|
7070
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "min-w-0 flex-1 truncate", children: renderTextContent(children, {
|
|
5496
7071
|
as: "span",
|
|
5497
7072
|
className: "block min-w-0 truncate text-inherit",
|
|
5498
|
-
size:
|
|
7073
|
+
size: sidebarNavItemTextSize[appearance]
|
|
5499
7074
|
}) })
|
|
5500
7075
|
]
|
|
5501
7076
|
}
|
|
@@ -5506,8 +7081,8 @@ SidebarNavItem.displayName = "SidebarNavItem";
|
|
|
5506
7081
|
var SettingsNavItem = SidebarNavItem;
|
|
5507
7082
|
|
|
5508
7083
|
// src/components/slider.tsx
|
|
5509
|
-
var
|
|
5510
|
-
var
|
|
7084
|
+
var React38 = __toESM(require("react"), 1);
|
|
7085
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
5511
7086
|
function clampSliderValue(value, min, max) {
|
|
5512
7087
|
if (Number.isNaN(value)) {
|
|
5513
7088
|
return min;
|
|
@@ -5532,7 +7107,7 @@ function resolveSliderMeasurement(value, fallback) {
|
|
|
5532
7107
|
function isTextValue(value) {
|
|
5533
7108
|
return typeof value === "string" || typeof value === "number";
|
|
5534
7109
|
}
|
|
5535
|
-
var Slider =
|
|
7110
|
+
var Slider = React38.forwardRef(function Slider2({
|
|
5536
7111
|
className,
|
|
5537
7112
|
defaultValue,
|
|
5538
7113
|
formatValue,
|
|
@@ -5555,7 +7130,7 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5555
7130
|
valueClassName,
|
|
5556
7131
|
...props
|
|
5557
7132
|
}, ref) {
|
|
5558
|
-
const resolvedId =
|
|
7133
|
+
const resolvedId = React38.useId();
|
|
5559
7134
|
const inputId = id ?? resolvedId;
|
|
5560
7135
|
const safeMin = min;
|
|
5561
7136
|
const safeMax = resolveSliderMax(safeMin, max);
|
|
@@ -5564,7 +7139,7 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5564
7139
|
onChange: onValueChange,
|
|
5565
7140
|
value
|
|
5566
7141
|
});
|
|
5567
|
-
|
|
7142
|
+
React38.useEffect(() => {
|
|
5568
7143
|
if (value !== void 0) {
|
|
5569
7144
|
return;
|
|
5570
7145
|
}
|
|
@@ -5611,14 +7186,14 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5611
7186
|
setControllableValue(nextValue);
|
|
5612
7187
|
onChange?.(event);
|
|
5613
7188
|
};
|
|
5614
|
-
return /* @__PURE__ */ (0,
|
|
7189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
5615
7190
|
"div",
|
|
5616
7191
|
{
|
|
5617
7192
|
"data-slot": "slider",
|
|
5618
7193
|
className: cn("grid w-full gap-2", className),
|
|
5619
7194
|
children: [
|
|
5620
|
-
label || showValue ? /* @__PURE__ */ (0,
|
|
5621
|
-
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)(
|
|
5622
7197
|
FieldLabel,
|
|
5623
7198
|
{
|
|
5624
7199
|
htmlFor: inputId,
|
|
@@ -5629,8 +7204,8 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5629
7204
|
textClassName: "block min-w-0 text-[color:var(--sofya-text-default)]",
|
|
5630
7205
|
children: label
|
|
5631
7206
|
}
|
|
5632
|
-
) : /* @__PURE__ */ (0,
|
|
5633
|
-
showValue ? /* @__PURE__ */ (0,
|
|
7207
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", {}),
|
|
7208
|
+
showValue ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5634
7209
|
"div",
|
|
5635
7210
|
{
|
|
5636
7211
|
className: cn(
|
|
@@ -5648,7 +7223,7 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5648
7223
|
}
|
|
5649
7224
|
) : null
|
|
5650
7225
|
] }) : null,
|
|
5651
|
-
/* @__PURE__ */ (0,
|
|
7226
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
5652
7227
|
"div",
|
|
5653
7228
|
{
|
|
5654
7229
|
"data-slot": "slider-control",
|
|
@@ -5658,7 +7233,7 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5658
7233
|
),
|
|
5659
7234
|
style: controlStyle,
|
|
5660
7235
|
children: [
|
|
5661
|
-
/* @__PURE__ */ (0,
|
|
7236
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5662
7237
|
"input",
|
|
5663
7238
|
{
|
|
5664
7239
|
...props,
|
|
@@ -5675,7 +7250,7 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5675
7250
|
style: inputBoundsStyle
|
|
5676
7251
|
}
|
|
5677
7252
|
),
|
|
5678
|
-
/* @__PURE__ */ (0,
|
|
7253
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5679
7254
|
"div",
|
|
5680
7255
|
{
|
|
5681
7256
|
"data-slot": "slider-track",
|
|
@@ -5686,7 +7261,7 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5686
7261
|
style: trackBoundsStyle
|
|
5687
7262
|
}
|
|
5688
7263
|
),
|
|
5689
|
-
/* @__PURE__ */ (0,
|
|
7264
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5690
7265
|
"div",
|
|
5691
7266
|
{
|
|
5692
7267
|
"data-slot": "slider-range",
|
|
@@ -5697,7 +7272,7 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5697
7272
|
style: rangeStyle
|
|
5698
7273
|
}
|
|
5699
7274
|
),
|
|
5700
|
-
/* @__PURE__ */ (0,
|
|
7275
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5701
7276
|
"div",
|
|
5702
7277
|
{
|
|
5703
7278
|
"data-slot": "slider-thumb",
|
|
@@ -5718,10 +7293,10 @@ var Slider = React37.forwardRef(function Slider2({
|
|
|
5718
7293
|
Slider.displayName = "Slider";
|
|
5719
7294
|
|
|
5720
7295
|
// src/components/skeleton.tsx
|
|
5721
|
-
var
|
|
5722
|
-
var
|
|
5723
|
-
var Skeleton =
|
|
5724
|
-
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)(
|
|
5725
7300
|
"div",
|
|
5726
7301
|
{
|
|
5727
7302
|
ref,
|
|
@@ -5736,15 +7311,15 @@ var Skeleton = React38.forwardRef(function Skeleton2({ className, ...props }, re
|
|
|
5736
7311
|
Skeleton.displayName = "Skeleton";
|
|
5737
7312
|
|
|
5738
7313
|
// src/components/sonner.tsx
|
|
5739
|
-
var
|
|
7314
|
+
var React40 = __toESM(require("react"), 1);
|
|
5740
7315
|
var import_sonner = require("sonner");
|
|
5741
|
-
var
|
|
7316
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5742
7317
|
var notificationVariantOptions = ["default", "success", "error", "warning"];
|
|
5743
7318
|
function ToastStatusIcon({
|
|
5744
7319
|
iconName,
|
|
5745
7320
|
className
|
|
5746
7321
|
}) {
|
|
5747
|
-
return /* @__PURE__ */ (0,
|
|
7322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5748
7323
|
"span",
|
|
5749
7324
|
{
|
|
5750
7325
|
"aria-hidden": "true",
|
|
@@ -5752,7 +7327,7 @@ function ToastStatusIcon({
|
|
|
5752
7327
|
"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full border shadow-none",
|
|
5753
7328
|
className
|
|
5754
7329
|
),
|
|
5755
|
-
children: /* @__PURE__ */ (0,
|
|
7330
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { name: iconName, size: 16 })
|
|
5756
7331
|
}
|
|
5757
7332
|
);
|
|
5758
7333
|
}
|
|
@@ -5776,35 +7351,35 @@ var defaultToastClassNames = {
|
|
|
5776
7351
|
loading: "border-border bg-card text-foreground"
|
|
5777
7352
|
};
|
|
5778
7353
|
var defaultToastIcons = {
|
|
5779
|
-
success: /* @__PURE__ */ (0,
|
|
7354
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5780
7355
|
ToastStatusIcon,
|
|
5781
7356
|
{
|
|
5782
7357
|
iconName: "check",
|
|
5783
7358
|
className: "border-success/15 bg-success/12 text-success"
|
|
5784
7359
|
}
|
|
5785
7360
|
),
|
|
5786
|
-
error: /* @__PURE__ */ (0,
|
|
7361
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5787
7362
|
ToastStatusIcon,
|
|
5788
7363
|
{
|
|
5789
7364
|
iconName: "x",
|
|
5790
7365
|
className: "border-destructive/15 bg-destructive/12 text-destructive"
|
|
5791
7366
|
}
|
|
5792
7367
|
),
|
|
5793
|
-
warning: /* @__PURE__ */ (0,
|
|
7368
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5794
7369
|
ToastStatusIcon,
|
|
5795
7370
|
{
|
|
5796
7371
|
iconName: "question",
|
|
5797
7372
|
className: "border-warning/20 bg-warning/15 text-foreground"
|
|
5798
7373
|
}
|
|
5799
7374
|
),
|
|
5800
|
-
info: /* @__PURE__ */ (0,
|
|
7375
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5801
7376
|
ToastStatusIcon,
|
|
5802
7377
|
{
|
|
5803
7378
|
iconName: "question",
|
|
5804
7379
|
className: "border-primary/15 bg-primary/10 text-primary"
|
|
5805
7380
|
}
|
|
5806
7381
|
),
|
|
5807
|
-
close: /* @__PURE__ */ (0,
|
|
7382
|
+
close: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { name: "x", size: 12 })
|
|
5808
7383
|
};
|
|
5809
7384
|
function mergeToastClassNames(overrides) {
|
|
5810
7385
|
return {
|
|
@@ -5812,7 +7387,7 @@ function mergeToastClassNames(overrides) {
|
|
|
5812
7387
|
...overrides
|
|
5813
7388
|
};
|
|
5814
7389
|
}
|
|
5815
|
-
var Toaster =
|
|
7390
|
+
var Toaster = React40.forwardRef(
|
|
5816
7391
|
function Toaster2({
|
|
5817
7392
|
className,
|
|
5818
7393
|
closeButton = true,
|
|
@@ -5824,7 +7399,7 @@ var Toaster = React39.forwardRef(
|
|
|
5824
7399
|
visibleToasts = 5,
|
|
5825
7400
|
...props
|
|
5826
7401
|
}, ref) {
|
|
5827
|
-
return /* @__PURE__ */ (0,
|
|
7402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5828
7403
|
import_sonner.Toaster,
|
|
5829
7404
|
{
|
|
5830
7405
|
ref,
|
|
@@ -5879,12 +7454,12 @@ notify.dismiss = import_sonner.toast.dismiss;
|
|
|
5879
7454
|
notify.promise = import_sonner.toast.promise;
|
|
5880
7455
|
|
|
5881
7456
|
// src/components/status-indicator.tsx
|
|
5882
|
-
var
|
|
7457
|
+
var React42 = __toESM(require("react"), 1);
|
|
5883
7458
|
|
|
5884
7459
|
// src/components/tooltip.tsx
|
|
5885
|
-
var
|
|
7460
|
+
var React41 = __toESM(require("react"), 1);
|
|
5886
7461
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
5887
|
-
var
|
|
7462
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5888
7463
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
5889
7464
|
var Tooltip = TooltipPrimitive.Root;
|
|
5890
7465
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
@@ -5902,8 +7477,8 @@ var tooltipToneClassNames = {
|
|
|
5902
7477
|
warning: "border-[color:var(--sofya-tone-warning-border)] bg-[color:var(--sofya-tone-warning-background)] text-[color:var(--sofya-tone-warning-foreground)]",
|
|
5903
7478
|
destructive: "border-[color:var(--sofya-tone-destructive-border)] bg-[color:var(--sofya-tone-destructive-background)] text-[color:var(--sofya-tone-destructive-foreground)]"
|
|
5904
7479
|
};
|
|
5905
|
-
var TooltipContent =
|
|
5906
|
-
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)(
|
|
5907
7482
|
TooltipPrimitive.Content,
|
|
5908
7483
|
{
|
|
5909
7484
|
ref,
|
|
@@ -5929,7 +7504,7 @@ var TooltipContent = React40.forwardRef(function TooltipContent2({ className, si
|
|
|
5929
7504
|
) });
|
|
5930
7505
|
});
|
|
5931
7506
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
5932
|
-
var StatusTooltip =
|
|
7507
|
+
var StatusTooltip = React41.forwardRef(function StatusTooltip2({
|
|
5933
7508
|
children,
|
|
5934
7509
|
label,
|
|
5935
7510
|
status = "default",
|
|
@@ -5944,11 +7519,11 @@ var StatusTooltip = React40.forwardRef(function StatusTooltip2({
|
|
|
5944
7519
|
className
|
|
5945
7520
|
}, ref) {
|
|
5946
7521
|
if (disabled) {
|
|
5947
|
-
return /* @__PURE__ */ (0,
|
|
7522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children });
|
|
5948
7523
|
}
|
|
5949
|
-
return /* @__PURE__ */ (0,
|
|
5950
|
-
/* @__PURE__ */ (0,
|
|
5951
|
-
/* @__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)(
|
|
5952
7527
|
TooltipContent,
|
|
5953
7528
|
{
|
|
5954
7529
|
ref,
|
|
@@ -5966,7 +7541,7 @@ var StatusTooltip = React40.forwardRef(function StatusTooltip2({
|
|
|
5966
7541
|
StatusTooltip.displayName = "StatusTooltip";
|
|
5967
7542
|
|
|
5968
7543
|
// src/components/status-indicator.tsx
|
|
5969
|
-
var
|
|
7544
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
5970
7545
|
var workflowStatusOptions = [
|
|
5971
7546
|
"draft",
|
|
5972
7547
|
"in_progress",
|
|
@@ -6047,7 +7622,7 @@ var toneTextClassName = {
|
|
|
6047
7622
|
warning: "text-[color:var(--sofya-tone-warning-foreground)]",
|
|
6048
7623
|
destructive: "text-[color:var(--sofya-tone-destructive-foreground)]"
|
|
6049
7624
|
};
|
|
6050
|
-
var StatusIndicator =
|
|
7625
|
+
var StatusIndicator = React42.forwardRef(
|
|
6051
7626
|
function StatusIndicator2({
|
|
6052
7627
|
className,
|
|
6053
7628
|
label,
|
|
@@ -6058,7 +7633,7 @@ var StatusIndicator = React41.forwardRef(
|
|
|
6058
7633
|
...props
|
|
6059
7634
|
}, ref) {
|
|
6060
7635
|
const resolved = resolveWorkflowStatus(status, { label });
|
|
6061
|
-
const indicator = /* @__PURE__ */ (0,
|
|
7636
|
+
const indicator = /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
6062
7637
|
"span",
|
|
6063
7638
|
{
|
|
6064
7639
|
ref,
|
|
@@ -6073,7 +7648,7 @@ var StatusIndicator = React41.forwardRef(
|
|
|
6073
7648
|
),
|
|
6074
7649
|
...props,
|
|
6075
7650
|
children: [
|
|
6076
|
-
/* @__PURE__ */ (0,
|
|
7651
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6077
7652
|
"span",
|
|
6078
7653
|
{
|
|
6079
7654
|
"aria-hidden": "true",
|
|
@@ -6094,15 +7669,15 @@ var StatusIndicator = React41.forwardRef(
|
|
|
6094
7669
|
if (!tooltip) {
|
|
6095
7670
|
return indicator;
|
|
6096
7671
|
}
|
|
6097
|
-
return /* @__PURE__ */ (0,
|
|
7672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(StatusTooltip, { status: resolved.tone, label: resolved.label, side, children: indicator });
|
|
6098
7673
|
}
|
|
6099
7674
|
);
|
|
6100
7675
|
StatusIndicator.displayName = "StatusIndicator";
|
|
6101
7676
|
|
|
6102
7677
|
// src/components/switch.tsx
|
|
6103
|
-
var
|
|
7678
|
+
var React43 = __toESM(require("react"), 1);
|
|
6104
7679
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
|
|
6105
|
-
var
|
|
7680
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6106
7681
|
var switchSizeOptions = ["default", "sm"];
|
|
6107
7682
|
var switchRootSizeClasses = {
|
|
6108
7683
|
default: "h-6 w-11",
|
|
@@ -6112,7 +7687,7 @@ var switchThumbSizeClasses = {
|
|
|
6112
7687
|
default: "h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
|
6113
7688
|
sm: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
6114
7689
|
};
|
|
6115
|
-
var Switch =
|
|
7690
|
+
var Switch = React43.forwardRef(
|
|
6116
7691
|
({
|
|
6117
7692
|
"aria-describedby": ariaDescribedBy,
|
|
6118
7693
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -6127,7 +7702,7 @@ var Switch = React42.forwardRef(
|
|
|
6127
7702
|
size,
|
|
6128
7703
|
...props
|
|
6129
7704
|
}, ref) => {
|
|
6130
|
-
const generatedId =
|
|
7705
|
+
const generatedId = React43.useId();
|
|
6131
7706
|
const resolvedId = id ?? generatedId;
|
|
6132
7707
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
6133
7708
|
const descriptionId = description ? `${resolvedId}-description` : void 0;
|
|
@@ -6136,7 +7711,7 @@ var Switch = React42.forwardRef(
|
|
|
6136
7711
|
const alignClassName2 = description ? "items-start" : "items-center";
|
|
6137
7712
|
const resolvedAriaDescribedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ") || void 0;
|
|
6138
7713
|
const resolvedAriaLabelledBy = ariaLabelledBy ?? labelId;
|
|
6139
|
-
const switchControl = /* @__PURE__ */ (0,
|
|
7714
|
+
const switchControl = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6140
7715
|
SwitchPrimitives.Root,
|
|
6141
7716
|
{
|
|
6142
7717
|
id: resolvedId,
|
|
@@ -6151,7 +7726,7 @@ var Switch = React42.forwardRef(
|
|
|
6151
7726
|
"data-size": resolvedSize,
|
|
6152
7727
|
...props,
|
|
6153
7728
|
ref,
|
|
6154
|
-
children: /* @__PURE__ */ (0,
|
|
7729
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6155
7730
|
SwitchPrimitives.Thumb,
|
|
6156
7731
|
{
|
|
6157
7732
|
className: cn(
|
|
@@ -6165,7 +7740,7 @@ var Switch = React42.forwardRef(
|
|
|
6165
7740
|
if (!hasTextContent) {
|
|
6166
7741
|
return switchControl;
|
|
6167
7742
|
}
|
|
6168
|
-
return /* @__PURE__ */ (0,
|
|
7743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
6169
7744
|
"div",
|
|
6170
7745
|
{
|
|
6171
7746
|
"data-slot": "switch-container",
|
|
@@ -6176,8 +7751,8 @@ var Switch = React42.forwardRef(
|
|
|
6176
7751
|
}),
|
|
6177
7752
|
children: [
|
|
6178
7753
|
switchControl,
|
|
6179
|
-
/* @__PURE__ */ (0,
|
|
6180
|
-
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)(
|
|
6181
7756
|
"span",
|
|
6182
7757
|
{
|
|
6183
7758
|
id: labelId,
|
|
@@ -6192,7 +7767,7 @@ var Switch = React42.forwardRef(
|
|
|
6192
7767
|
})
|
|
6193
7768
|
}
|
|
6194
7769
|
) }) : null,
|
|
6195
|
-
description ? /* @__PURE__ */ (0,
|
|
7770
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6196
7771
|
"span",
|
|
6197
7772
|
{
|
|
6198
7773
|
id: descriptionId,
|
|
@@ -6217,8 +7792,8 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
|
6217
7792
|
|
|
6218
7793
|
// src/components/table.tsx
|
|
6219
7794
|
var import_class_variance_authority8 = require("class-variance-authority");
|
|
6220
|
-
var
|
|
6221
|
-
var
|
|
7795
|
+
var React44 = __toESM(require("react"), 1);
|
|
7796
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
6222
7797
|
var tableDensityOptions = ["default", "compact"];
|
|
6223
7798
|
var tableCellVariantOptions = ["default", "primary", "muted"];
|
|
6224
7799
|
var tableStatusToneOptions = [
|
|
@@ -6228,10 +7803,10 @@ var tableStatusToneOptions = [
|
|
|
6228
7803
|
"warning"
|
|
6229
7804
|
];
|
|
6230
7805
|
var tableActionToneOptions = ["primary", "neutral", "danger"];
|
|
6231
|
-
var TableDensityContext =
|
|
6232
|
-
var TableHeaderDensityContext =
|
|
7806
|
+
var TableDensityContext = React44.createContext("default");
|
|
7807
|
+
var TableHeaderDensityContext = React44.createContext("default");
|
|
6233
7808
|
function useTableDensity(density) {
|
|
6234
|
-
const inheritedDensity =
|
|
7809
|
+
const inheritedDensity = React44.useContext(TableDensityContext);
|
|
6235
7810
|
return density ?? inheritedDensity;
|
|
6236
7811
|
}
|
|
6237
7812
|
var tableCellVariants = (0, import_class_variance_authority8.cva)(
|
|
@@ -6287,20 +7862,21 @@ var tableActionButtonVariants = (0, import_class_variance_authority8.cva)(
|
|
|
6287
7862
|
}
|
|
6288
7863
|
}
|
|
6289
7864
|
);
|
|
6290
|
-
var Table =
|
|
6291
|
-
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)(
|
|
6292
7867
|
"div",
|
|
6293
7868
|
{
|
|
6294
7869
|
"data-slot": "table-container",
|
|
6295
7870
|
className: "relative w-full overflow-x-auto",
|
|
6296
|
-
children: /* @__PURE__ */ (0,
|
|
7871
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6297
7872
|
"table",
|
|
6298
7873
|
{
|
|
6299
7874
|
"data-density": density,
|
|
6300
7875
|
"data-slot": "table",
|
|
6301
7876
|
ref,
|
|
6302
7877
|
className: cn(
|
|
6303
|
-
"w-full min-w-[1040px] caption-bottom border-separate border-spacing-0 bg-card",
|
|
7878
|
+
"w-full min-w-[1040px] caption-bottom border-separate border-spacing-x-0 bg-card",
|
|
7879
|
+
density === "compact" ? "border-spacing-y-2" : "border-spacing-y-0",
|
|
6304
7880
|
className
|
|
6305
7881
|
),
|
|
6306
7882
|
...props
|
|
@@ -6309,10 +7885,10 @@ var Table = React43.forwardRef(function Table2({ className, density = "default",
|
|
|
6309
7885
|
}
|
|
6310
7886
|
) });
|
|
6311
7887
|
});
|
|
6312
|
-
var TableHeader =
|
|
7888
|
+
var TableHeader = React44.forwardRef(function TableHeader2({ className, density, ...props }, ref) {
|
|
6313
7889
|
const tableDensity = useTableDensity();
|
|
6314
7890
|
const headerDensity = density ?? tableDensity;
|
|
6315
|
-
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)(
|
|
6316
7892
|
"thead",
|
|
6317
7893
|
{
|
|
6318
7894
|
"data-slot": "table-header",
|
|
@@ -6326,8 +7902,8 @@ var TableHeader = React43.forwardRef(function TableHeader2({ className, density,
|
|
|
6326
7902
|
}
|
|
6327
7903
|
) }) });
|
|
6328
7904
|
});
|
|
6329
|
-
var TableBody =
|
|
6330
|
-
return /* @__PURE__ */ (0,
|
|
7905
|
+
var TableBody = React44.forwardRef(function TableBody2({ className, ...props }, ref) {
|
|
7906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6331
7907
|
"tbody",
|
|
6332
7908
|
{
|
|
6333
7909
|
"data-slot": "table-body",
|
|
@@ -6337,8 +7913,8 @@ var TableBody = React43.forwardRef(function TableBody2({ className, ...props },
|
|
|
6337
7913
|
}
|
|
6338
7914
|
);
|
|
6339
7915
|
});
|
|
6340
|
-
var TableFooter =
|
|
6341
|
-
return /* @__PURE__ */ (0,
|
|
7916
|
+
var TableFooter = React44.forwardRef(function TableFooter2({ className, ...props }, ref) {
|
|
7917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6342
7918
|
"tfoot",
|
|
6343
7919
|
{
|
|
6344
7920
|
"data-slot": "table-footer",
|
|
@@ -6351,10 +7927,10 @@ var TableFooter = React43.forwardRef(function TableFooter2({ className, ...props
|
|
|
6351
7927
|
}
|
|
6352
7928
|
);
|
|
6353
7929
|
});
|
|
6354
|
-
var TableRow =
|
|
7930
|
+
var TableRow = React44.forwardRef(
|
|
6355
7931
|
function TableRow2({ className, density, ...props }, ref) {
|
|
6356
7932
|
const resolvedDensity = useTableDensity(density);
|
|
6357
|
-
return /* @__PURE__ */ (0,
|
|
7933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TableDensityContext.Provider, { value: resolvedDensity, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6358
7934
|
"tr",
|
|
6359
7935
|
{
|
|
6360
7936
|
"data-density": resolvedDensity,
|
|
@@ -6370,9 +7946,9 @@ var TableRow = React43.forwardRef(
|
|
|
6370
7946
|
) });
|
|
6371
7947
|
}
|
|
6372
7948
|
);
|
|
6373
|
-
var TableHead =
|
|
6374
|
-
const headerDensity =
|
|
6375
|
-
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)(
|
|
6376
7952
|
"th",
|
|
6377
7953
|
{
|
|
6378
7954
|
"data-slot": "table-head",
|
|
@@ -6380,7 +7956,7 @@ var TableHead = React43.forwardRef(function TableHead2({ className, children, ..
|
|
|
6380
7956
|
ref,
|
|
6381
7957
|
className: cn(
|
|
6382
7958
|
"whitespace-nowrap px-4 text-left align-middle [font-family:var(--sofya-text-tiny-font-family)] text-[length:var(--sofya-text-tiny-font-size)] font-medium uppercase leading-4 tracking-[0.08em] text-[color:var(--sofya-text-default)] [&_svg]:h-[1em] [&_svg]:w-[1em] [&_svg]:shrink-0",
|
|
6383
|
-
headerDensity === "compact" ? "py-
|
|
7959
|
+
headerDensity === "compact" ? "h-[45px] py-0" : "py-4",
|
|
6384
7960
|
className
|
|
6385
7961
|
),
|
|
6386
7962
|
...props,
|
|
@@ -6393,10 +7969,10 @@ var TableHead = React43.forwardRef(function TableHead2({ className, children, ..
|
|
|
6393
7969
|
}
|
|
6394
7970
|
);
|
|
6395
7971
|
});
|
|
6396
|
-
var TableCell =
|
|
7972
|
+
var TableCell = React44.forwardRef(
|
|
6397
7973
|
function TableCell2({ className, density, variant, truncate, children, ...props }, ref) {
|
|
6398
7974
|
const resolvedDensity = useTableDensity(density);
|
|
6399
|
-
return /* @__PURE__ */ (0,
|
|
7975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6400
7976
|
"td",
|
|
6401
7977
|
{
|
|
6402
7978
|
"data-density": resolvedDensity,
|
|
@@ -6421,8 +7997,8 @@ var TableCell = React43.forwardRef(
|
|
|
6421
7997
|
);
|
|
6422
7998
|
}
|
|
6423
7999
|
);
|
|
6424
|
-
var TableCaption =
|
|
6425
|
-
return /* @__PURE__ */ (0,
|
|
8000
|
+
var TableCaption = React44.forwardRef(function TableCaption2({ className, children, ...props }, ref) {
|
|
8001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6426
8002
|
"caption",
|
|
6427
8003
|
{
|
|
6428
8004
|
"data-slot": "table-caption",
|
|
@@ -6441,12 +8017,12 @@ var TableCaption = React43.forwardRef(function TableCaption2({ className, childr
|
|
|
6441
8017
|
}
|
|
6442
8018
|
);
|
|
6443
8019
|
});
|
|
6444
|
-
var TableCellTitle =
|
|
8020
|
+
var TableCellTitle = React44.forwardRef(
|
|
6445
8021
|
function TableCellTitle2({ className, children, size, ...props }, ref) {
|
|
6446
8022
|
const density = useTableDensity();
|
|
6447
8023
|
const resolvedSize = size ?? (density === "compact" ? "compact" : "default");
|
|
6448
8024
|
const textSize = resolvedSize === "compact" ? "label-md" : "body";
|
|
6449
|
-
return /* @__PURE__ */ (0,
|
|
8025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6450
8026
|
"span",
|
|
6451
8027
|
{
|
|
6452
8028
|
"data-slot": "table-cell-title",
|
|
@@ -6466,11 +8042,11 @@ var TableCellTitle = React43.forwardRef(
|
|
|
6466
8042
|
);
|
|
6467
8043
|
}
|
|
6468
8044
|
);
|
|
6469
|
-
var TableCellDescription =
|
|
8045
|
+
var TableCellDescription = React44.forwardRef(function TableCellDescription2({ className, children, size, ...props }, ref) {
|
|
6470
8046
|
const density = useTableDensity();
|
|
6471
8047
|
const resolvedSize = size ?? (density === "compact" ? "compact" : "default");
|
|
6472
8048
|
const textSize = resolvedSize === "compact" ? "body-sm" : "tiny";
|
|
6473
|
-
return /* @__PURE__ */ (0,
|
|
8049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6474
8050
|
"span",
|
|
6475
8051
|
{
|
|
6476
8052
|
"data-slot": "table-cell-description",
|
|
@@ -6498,7 +8074,7 @@ function TableStatusBadge({
|
|
|
6498
8074
|
...props
|
|
6499
8075
|
}) {
|
|
6500
8076
|
const resolvedDensity = useTableDensity(density);
|
|
6501
|
-
return /* @__PURE__ */ (0,
|
|
8077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6502
8078
|
Badge,
|
|
6503
8079
|
{
|
|
6504
8080
|
"data-density": resolvedDensity,
|
|
@@ -6517,8 +8093,8 @@ function TableStatusBadge({
|
|
|
6517
8093
|
}
|
|
6518
8094
|
);
|
|
6519
8095
|
}
|
|
6520
|
-
var TableActionButton =
|
|
6521
|
-
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)(
|
|
6522
8098
|
Button,
|
|
6523
8099
|
{
|
|
6524
8100
|
ref,
|
|
@@ -6536,8 +8112,8 @@ var TableActionButton = React43.forwardRef(function TableActionButton2({ classNa
|
|
|
6536
8112
|
}
|
|
6537
8113
|
);
|
|
6538
8114
|
});
|
|
6539
|
-
var TableActions =
|
|
6540
|
-
return /* @__PURE__ */ (0,
|
|
8115
|
+
var TableActions = React44.forwardRef(function TableActions2({ className, ...props }, ref) {
|
|
8116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6541
8117
|
"div",
|
|
6542
8118
|
{
|
|
6543
8119
|
ref,
|
|
@@ -6564,8 +8140,8 @@ TableActions.displayName = "TableActions";
|
|
|
6564
8140
|
|
|
6565
8141
|
// src/components/tag.tsx
|
|
6566
8142
|
var import_class_variance_authority9 = require("class-variance-authority");
|
|
6567
|
-
var
|
|
6568
|
-
var
|
|
8143
|
+
var React45 = __toESM(require("react"), 1);
|
|
8144
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
6569
8145
|
var tagVariantOptions = [
|
|
6570
8146
|
"neutral",
|
|
6571
8147
|
"organization",
|
|
@@ -6606,9 +8182,9 @@ var tagStatusToneClasses = {
|
|
|
6606
8182
|
warning: "border-[color:var(--sofya-tone-warning-border)] bg-[color:var(--sofya-tone-warning-background)] text-[color:var(--sofya-tone-warning-foreground)]",
|
|
6607
8183
|
destructive: "border-[color:var(--sofya-tone-destructive-border)] bg-[color:var(--sofya-tone-destructive-background)] text-[color:var(--sofya-tone-destructive-foreground)]"
|
|
6608
8184
|
};
|
|
6609
|
-
var Tag =
|
|
8185
|
+
var Tag = React45.forwardRef(function Tag2({ children, className, icon, tone = "info", truncate = false, variant, ...props }, ref) {
|
|
6610
8186
|
const resolvedVariant = variant ?? "neutral";
|
|
6611
|
-
return /* @__PURE__ */ (0,
|
|
8187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
6612
8188
|
"span",
|
|
6613
8189
|
{
|
|
6614
8190
|
ref,
|
|
@@ -6622,7 +8198,7 @@ var Tag = React44.forwardRef(function Tag2({ children, className, icon, tone = "
|
|
|
6622
8198
|
),
|
|
6623
8199
|
...props,
|
|
6624
8200
|
children: [
|
|
6625
|
-
icon ? /* @__PURE__ */ (0,
|
|
8201
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "inline-flex shrink-0 items-center justify-center", children: icon }) : null,
|
|
6626
8202
|
renderTextContent(children, {
|
|
6627
8203
|
as: "span",
|
|
6628
8204
|
className: cn("text-inherit", truncate && "min-w-0 truncate"),
|
|
@@ -6643,11 +8219,11 @@ var privacyDefaultLabels = {
|
|
|
6643
8219
|
organization: "Minha organiza\xE7\xE3o",
|
|
6644
8220
|
public: "P\xFAblico"
|
|
6645
8221
|
};
|
|
6646
|
-
var PrivacyLabel =
|
|
8222
|
+
var PrivacyLabel = React45.forwardRef(
|
|
6647
8223
|
function PrivacyLabel2({ appearance = "text", className, icon, label, privacy, ...props }, ref) {
|
|
6648
8224
|
const content = label ?? privacyDefaultLabels[privacy];
|
|
6649
8225
|
if (appearance === "tag") {
|
|
6650
|
-
return /* @__PURE__ */ (0,
|
|
8226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6651
8227
|
Tag,
|
|
6652
8228
|
{
|
|
6653
8229
|
ref,
|
|
@@ -6660,7 +8236,7 @@ var PrivacyLabel = React44.forwardRef(
|
|
|
6660
8236
|
}
|
|
6661
8237
|
);
|
|
6662
8238
|
}
|
|
6663
|
-
return /* @__PURE__ */ (0,
|
|
8239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
6664
8240
|
"span",
|
|
6665
8241
|
{
|
|
6666
8242
|
ref,
|
|
@@ -6672,7 +8248,7 @@ var PrivacyLabel = React44.forwardRef(
|
|
|
6672
8248
|
),
|
|
6673
8249
|
...props,
|
|
6674
8250
|
children: [
|
|
6675
|
-
icon ? /* @__PURE__ */ (0,
|
|
8251
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "inline-flex shrink-0 items-center justify-center", children: icon }) : null,
|
|
6676
8252
|
renderTextContent(content, {
|
|
6677
8253
|
as: "span",
|
|
6678
8254
|
className: "text-inherit",
|
|
@@ -6686,12 +8262,12 @@ var PrivacyLabel = React44.forwardRef(
|
|
|
6686
8262
|
PrivacyLabel.displayName = "PrivacyLabel";
|
|
6687
8263
|
|
|
6688
8264
|
// src/components/template-card.tsx
|
|
6689
|
-
var
|
|
6690
|
-
var
|
|
8265
|
+
var React46 = __toESM(require("react"), 1);
|
|
8266
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
6691
8267
|
var templateCardLayoutOptions = ["card", "list"];
|
|
6692
8268
|
var templateCardFavoriteDisplayOptions = ["action", "inline"];
|
|
6693
8269
|
var templateCardMetaPlacementOptions = ["block", "inline"];
|
|
6694
|
-
var TemplateCard =
|
|
8270
|
+
var TemplateCard = React46.forwardRef(
|
|
6695
8271
|
function TemplateCard2({
|
|
6696
8272
|
className,
|
|
6697
8273
|
description,
|
|
@@ -6718,14 +8294,14 @@ var TemplateCard = React45.forwardRef(
|
|
|
6718
8294
|
const showInlineMeta = metaPlacement === "inline" && Boolean(meta);
|
|
6719
8295
|
const showBlockMeta = metaPlacement !== "inline" && Boolean(meta);
|
|
6720
8296
|
const showFavoriteAction = favoriteDisplay !== "inline" && (onToggleFavorite !== void 0 || favorited !== void 0);
|
|
6721
|
-
const actions = showFavoriteAction || overflow ? /* @__PURE__ */ (0,
|
|
6722
|
-
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)(
|
|
6723
8299
|
IconButton,
|
|
6724
8300
|
{
|
|
6725
8301
|
"aria-label": favoriteLabel,
|
|
6726
8302
|
selected: Boolean(favorited),
|
|
6727
8303
|
onClick: onToggleFavorite,
|
|
6728
|
-
icon: /* @__PURE__ */ (0,
|
|
8304
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { name: "star", size: 18 })
|
|
6729
8305
|
}
|
|
6730
8306
|
) : null,
|
|
6731
8307
|
overflow
|
|
@@ -6740,10 +8316,10 @@ var TemplateCard = React45.forwardRef(
|
|
|
6740
8316
|
style: selectable ? { fontSize: "15px", lineHeight: "26px", fontWeight: 600 } : void 0
|
|
6741
8317
|
});
|
|
6742
8318
|
const hasInlineTitleExtras = showInlineStar || showInlineMeta;
|
|
6743
|
-
const titleRow = hasInlineTitleExtras ? /* @__PURE__ */ (0,
|
|
6744
|
-
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,
|
|
6745
8321
|
titleNode,
|
|
6746
|
-
showInlineMeta ? /* @__PURE__ */ (0,
|
|
8322
|
+
showInlineMeta ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6747
8323
|
"span",
|
|
6748
8324
|
{
|
|
6749
8325
|
"data-slot": "template-card-meta-inline",
|
|
@@ -6752,7 +8328,7 @@ var TemplateCard = React45.forwardRef(
|
|
|
6752
8328
|
}
|
|
6753
8329
|
) : null
|
|
6754
8330
|
] }) : titleNode;
|
|
6755
|
-
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: [
|
|
6756
8332
|
titleRow,
|
|
6757
8333
|
description ? renderTextContent(description, {
|
|
6758
8334
|
as: "span",
|
|
@@ -6770,7 +8346,7 @@ var TemplateCard = React45.forwardRef(
|
|
|
6770
8346
|
style: selectable ? { fontSize: "14px", lineHeight: "18px", fontWeight: 400 } : void 0
|
|
6771
8347
|
}) : null
|
|
6772
8348
|
] });
|
|
6773
|
-
const blockMeta = showBlockMeta ? /* @__PURE__ */ (0,
|
|
8349
|
+
const blockMeta = showBlockMeta ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6774
8350
|
"div",
|
|
6775
8351
|
{
|
|
6776
8352
|
"data-slot": "template-card-meta",
|
|
@@ -6794,7 +8370,7 @@ var TemplateCard = React45.forwardRef(
|
|
|
6794
8370
|
}
|
|
6795
8371
|
onKeyDown?.(event);
|
|
6796
8372
|
};
|
|
6797
|
-
return /* @__PURE__ */ (0,
|
|
8373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6798
8374
|
"div",
|
|
6799
8375
|
{
|
|
6800
8376
|
ref,
|
|
@@ -6820,13 +8396,13 @@ var TemplateCard = React45.forwardRef(
|
|
|
6820
8396
|
className
|
|
6821
8397
|
),
|
|
6822
8398
|
...props,
|
|
6823
|
-
children: selectable ? /* @__PURE__ */ (0,
|
|
6824
|
-
/* @__PURE__ */ (0,
|
|
8399
|
+
children: selectable ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
8400
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6825
8401
|
"span",
|
|
6826
8402
|
{
|
|
6827
8403
|
className: "shrink-0",
|
|
6828
8404
|
onClick: (event) => event.stopPropagation(),
|
|
6829
|
-
children: /* @__PURE__ */ (0,
|
|
8405
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6830
8406
|
Checkbox,
|
|
6831
8407
|
{
|
|
6832
8408
|
checked: selected,
|
|
@@ -6836,15 +8412,15 @@ var TemplateCard = React45.forwardRef(
|
|
|
6836
8412
|
)
|
|
6837
8413
|
}
|
|
6838
8414
|
),
|
|
6839
|
-
/* @__PURE__ */ (0,
|
|
8415
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "min-w-0 flex-1", children: heading }),
|
|
6840
8416
|
blockMeta,
|
|
6841
8417
|
actions
|
|
6842
|
-
] }) : isList ? /* @__PURE__ */ (0,
|
|
6843
|
-
/* @__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 }),
|
|
6844
8420
|
blockMeta,
|
|
6845
8421
|
actions
|
|
6846
|
-
] }) : /* @__PURE__ */ (0,
|
|
6847
|
-
/* @__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: [
|
|
6848
8424
|
heading,
|
|
6849
8425
|
actions
|
|
6850
8426
|
] }),
|
|
@@ -6855,16 +8431,16 @@ var TemplateCard = React45.forwardRef(
|
|
|
6855
8431
|
}
|
|
6856
8432
|
);
|
|
6857
8433
|
TemplateCard.displayName = "TemplateCard";
|
|
6858
|
-
var TemplateListItem =
|
|
6859
|
-
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 });
|
|
6860
8436
|
});
|
|
6861
8437
|
TemplateListItem.displayName = "TemplateListItem";
|
|
6862
8438
|
|
|
6863
8439
|
// src/components/tabs.tsx
|
|
6864
|
-
var
|
|
8440
|
+
var React47 = __toESM(require("react"), 1);
|
|
6865
8441
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
6866
8442
|
var import_react3 = require("motion/react");
|
|
6867
|
-
var
|
|
8443
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
6868
8444
|
function resolveDefaultValue(items, defaultValue) {
|
|
6869
8445
|
if (defaultValue) {
|
|
6870
8446
|
return defaultValue;
|
|
@@ -6888,13 +8464,13 @@ function Tabs({
|
|
|
6888
8464
|
onChange: onValueChange,
|
|
6889
8465
|
value
|
|
6890
8466
|
});
|
|
6891
|
-
const indicatorLayoutId =
|
|
6892
|
-
|
|
8467
|
+
const indicatorLayoutId = React47.useId();
|
|
8468
|
+
React47.useEffect(() => {
|
|
6893
8469
|
if (value === void 0) {
|
|
6894
8470
|
setUncontrolledCurrentValue(resolvedDefaultValue);
|
|
6895
8471
|
}
|
|
6896
8472
|
}, [resolvedDefaultValue, setUncontrolledCurrentValue, value]);
|
|
6897
|
-
return /* @__PURE__ */ (0,
|
|
8473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
6898
8474
|
TabsPrimitive.Root,
|
|
6899
8475
|
{
|
|
6900
8476
|
className: cn("w-full", className),
|
|
@@ -6902,7 +8478,7 @@ function Tabs({
|
|
|
6902
8478
|
value: currentValue,
|
|
6903
8479
|
...props,
|
|
6904
8480
|
children: [
|
|
6905
|
-
/* @__PURE__ */ (0,
|
|
8481
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6906
8482
|
TabsPrimitive.List,
|
|
6907
8483
|
{
|
|
6908
8484
|
"aria-label": "Subtelas navegaveis",
|
|
@@ -6913,7 +8489,7 @@ function Tabs({
|
|
|
6913
8489
|
children: items.map((item) => {
|
|
6914
8490
|
const isUnavailable = item.disabled || item.loading;
|
|
6915
8491
|
const isActive = item.value === currentValue;
|
|
6916
|
-
return /* @__PURE__ */ (0,
|
|
8492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
6917
8493
|
TabsPrimitive.Trigger,
|
|
6918
8494
|
{
|
|
6919
8495
|
value: item.value,
|
|
@@ -6925,7 +8501,7 @@ function Tabs({
|
|
|
6925
8501
|
item.triggerClassName
|
|
6926
8502
|
),
|
|
6927
8503
|
children: [
|
|
6928
|
-
isActive ? /* @__PURE__ */ (0,
|
|
8504
|
+
isActive ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6929
8505
|
import_react3.motion.span,
|
|
6930
8506
|
{
|
|
6931
8507
|
"aria-hidden": "true",
|
|
@@ -6935,15 +8511,15 @@ function Tabs({
|
|
|
6935
8511
|
transition: { duration: 0.25, ease: "easeInOut" }
|
|
6936
8512
|
}
|
|
6937
8513
|
) : null,
|
|
6938
|
-
/* @__PURE__ */ (0,
|
|
6939
|
-
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)(
|
|
6940
8516
|
"span",
|
|
6941
8517
|
{
|
|
6942
8518
|
"aria-hidden": "true",
|
|
6943
8519
|
className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-r-transparent"
|
|
6944
8520
|
}
|
|
6945
8521
|
) : null,
|
|
6946
|
-
/* @__PURE__ */ (0,
|
|
8522
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: renderTextContent(item.label, {
|
|
6947
8523
|
as: "span",
|
|
6948
8524
|
className: "block text-inherit",
|
|
6949
8525
|
size: "body"
|
|
@@ -6957,7 +8533,7 @@ function Tabs({
|
|
|
6957
8533
|
}
|
|
6958
8534
|
),
|
|
6959
8535
|
items.map(
|
|
6960
|
-
(item) => item.content !== void 0 ? /* @__PURE__ */ (0,
|
|
8536
|
+
(item) => item.content !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6961
8537
|
TabsPrimitive.Content,
|
|
6962
8538
|
{
|
|
6963
8539
|
value: item.value,
|
|
@@ -6980,9 +8556,9 @@ function Tabs({
|
|
|
6980
8556
|
Tabs.displayName = "Tabs";
|
|
6981
8557
|
|
|
6982
8558
|
// src/components/textarea.tsx
|
|
6983
|
-
var
|
|
6984
|
-
var
|
|
6985
|
-
var Textarea =
|
|
8559
|
+
var React48 = __toESM(require("react"), 1);
|
|
8560
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
8561
|
+
var Textarea = React48.forwardRef(
|
|
6986
8562
|
({
|
|
6987
8563
|
className,
|
|
6988
8564
|
containerClassName,
|
|
@@ -6992,10 +8568,10 @@ var Textarea = React47.forwardRef(
|
|
|
6992
8568
|
rows = 5,
|
|
6993
8569
|
...props
|
|
6994
8570
|
}, ref) => {
|
|
6995
|
-
const generatedId =
|
|
8571
|
+
const generatedId = React48.useId();
|
|
6996
8572
|
const resolvedId = id ?? generatedId;
|
|
6997
8573
|
const ariaLabel = props["aria-label"] ?? (typeof label === "string" ? label : void 0);
|
|
6998
|
-
const control = /* @__PURE__ */ (0,
|
|
8574
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6999
8575
|
"textarea",
|
|
7000
8576
|
{
|
|
7001
8577
|
className: cn(
|
|
@@ -7009,7 +8585,7 @@ var Textarea = React47.forwardRef(
|
|
|
7009
8585
|
"aria-label": ariaLabel
|
|
7010
8586
|
}
|
|
7011
8587
|
);
|
|
7012
|
-
return /* @__PURE__ */ (0,
|
|
8588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7013
8589
|
FieldShell,
|
|
7014
8590
|
{
|
|
7015
8591
|
control,
|
|
@@ -7024,10 +8600,10 @@ var Textarea = React47.forwardRef(
|
|
|
7024
8600
|
Textarea.displayName = "Textarea";
|
|
7025
8601
|
|
|
7026
8602
|
// src/components/toggle.tsx
|
|
7027
|
-
var
|
|
8603
|
+
var React49 = __toESM(require("react"), 1);
|
|
7028
8604
|
var SwitchPrimitives2 = __toESM(require("@radix-ui/react-switch"), 1);
|
|
7029
|
-
var
|
|
7030
|
-
var Toggle =
|
|
8605
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
8606
|
+
var Toggle = React49.forwardRef(function Toggle2({
|
|
7031
8607
|
"aria-describedby": ariaDescribedBy,
|
|
7032
8608
|
"aria-labelledby": ariaLabelledBy,
|
|
7033
8609
|
className,
|
|
@@ -7040,7 +8616,7 @@ var Toggle = React48.forwardRef(function Toggle2({
|
|
|
7040
8616
|
labelClassName,
|
|
7041
8617
|
...props
|
|
7042
8618
|
}, ref) {
|
|
7043
|
-
const generatedId =
|
|
8619
|
+
const generatedId = React49.useId();
|
|
7044
8620
|
const resolvedId = id ?? generatedId;
|
|
7045
8621
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
7046
8622
|
const descriptionId = description ? `${resolvedId}-description` : void 0;
|
|
@@ -7048,7 +8624,7 @@ var Toggle = React48.forwardRef(function Toggle2({
|
|
|
7048
8624
|
const alignClassName2 = description ? "items-start" : "items-center";
|
|
7049
8625
|
const resolvedAriaDescribedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ") || void 0;
|
|
7050
8626
|
const resolvedAriaLabelledBy = ariaLabelledBy ?? labelId;
|
|
7051
|
-
const toggleControl = /* @__PURE__ */ (0,
|
|
8627
|
+
const toggleControl = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7052
8628
|
SwitchPrimitives2.Root,
|
|
7053
8629
|
{
|
|
7054
8630
|
id: resolvedId,
|
|
@@ -7062,7 +8638,7 @@ var Toggle = React48.forwardRef(function Toggle2({
|
|
|
7062
8638
|
className
|
|
7063
8639
|
),
|
|
7064
8640
|
...props,
|
|
7065
|
-
children: /* @__PURE__ */ (0,
|
|
8641
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7066
8642
|
SwitchPrimitives2.Thumb,
|
|
7067
8643
|
{
|
|
7068
8644
|
"data-slot": "toggle-thumb",
|
|
@@ -7074,7 +8650,7 @@ var Toggle = React48.forwardRef(function Toggle2({
|
|
|
7074
8650
|
if (!hasTextContent) {
|
|
7075
8651
|
return toggleControl;
|
|
7076
8652
|
}
|
|
7077
|
-
return /* @__PURE__ */ (0,
|
|
8653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
7078
8654
|
"div",
|
|
7079
8655
|
{
|
|
7080
8656
|
"data-slot": "toggle-container",
|
|
@@ -7085,8 +8661,8 @@ var Toggle = React48.forwardRef(function Toggle2({
|
|
|
7085
8661
|
}),
|
|
7086
8662
|
children: [
|
|
7087
8663
|
toggleControl,
|
|
7088
|
-
/* @__PURE__ */ (0,
|
|
7089
|
-
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)(
|
|
7090
8666
|
"span",
|
|
7091
8667
|
{
|
|
7092
8668
|
id: labelId,
|
|
@@ -7098,7 +8674,7 @@ var Toggle = React48.forwardRef(function Toggle2({
|
|
|
7098
8674
|
})
|
|
7099
8675
|
}
|
|
7100
8676
|
) }) : null,
|
|
7101
|
-
description ? /* @__PURE__ */ (0,
|
|
8677
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7102
8678
|
"span",
|
|
7103
8679
|
{
|
|
7104
8680
|
id: descriptionId,
|
|
@@ -7121,9 +8697,9 @@ var Toggle = React48.forwardRef(function Toggle2({
|
|
|
7121
8697
|
Toggle.displayName = "Toggle";
|
|
7122
8698
|
|
|
7123
8699
|
// src/theme/provider.tsx
|
|
7124
|
-
var
|
|
8700
|
+
var React50 = __toESM(require("react"), 1);
|
|
7125
8701
|
var import_tokens3 = require("@sofya-ds/tokens");
|
|
7126
|
-
var
|
|
8702
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
7127
8703
|
var SOFYA_FONT_LINKS = [
|
|
7128
8704
|
{
|
|
7129
8705
|
id: "preconnect-googleapis",
|
|
@@ -7143,7 +8719,7 @@ var SOFYA_FONT_LINKS = [
|
|
|
7143
8719
|
}
|
|
7144
8720
|
];
|
|
7145
8721
|
function useSofyaFontLinks() {
|
|
7146
|
-
|
|
8722
|
+
React50.useEffect(() => {
|
|
7147
8723
|
if (typeof document === "undefined") {
|
|
7148
8724
|
return;
|
|
7149
8725
|
}
|
|
@@ -7176,7 +8752,7 @@ function SofyaProvider({
|
|
|
7176
8752
|
useSofyaFontLinks();
|
|
7177
8753
|
const theme = (0, import_tokens3.createWhitelabelTheme)(overrides ?? {}, preset);
|
|
7178
8754
|
const cssVariables = (0, import_tokens3.themeToCssVariables)(theme);
|
|
7179
|
-
return /* @__PURE__ */ (0,
|
|
8755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7180
8756
|
"div",
|
|
7181
8757
|
{
|
|
7182
8758
|
"data-sofya-theme": theme.name,
|
|
@@ -7275,6 +8851,15 @@ var import_tokens4 = require("@sofya-ds/tokens");
|
|
|
7275
8851
|
RadioGroupOptionDescription,
|
|
7276
8852
|
RadioGroupOptionIndicator,
|
|
7277
8853
|
RadioGroupOptionLabel,
|
|
8854
|
+
ReasoningLabsWidget,
|
|
8855
|
+
ReasoningSummaryWidget,
|
|
8856
|
+
ReasoningVitalsWidget,
|
|
8857
|
+
ReasoningWidget,
|
|
8858
|
+
ReasoningWidgetActionButton,
|
|
8859
|
+
ReasoningWidgetActions,
|
|
8860
|
+
ReasoningWidgetList,
|
|
8861
|
+
ReasoningWidgetRenderer,
|
|
8862
|
+
ReasoningWidgetTable,
|
|
7278
8863
|
RichTextToolbar,
|
|
7279
8864
|
RichTextToolbarButton,
|
|
7280
8865
|
RichTextToolbarGroup,
|
|
@@ -7296,7 +8881,11 @@ var import_tokens4 = require("@sofya-ds/tokens");
|
|
|
7296
8881
|
SelectValue,
|
|
7297
8882
|
Separator,
|
|
7298
8883
|
SettingsNavItem,
|
|
8884
|
+
SidebarNav,
|
|
7299
8885
|
SidebarNavItem,
|
|
8886
|
+
SidebarNavSection,
|
|
8887
|
+
SidebarNavSectionItems,
|
|
8888
|
+
SidebarNavSectionLabel,
|
|
7300
8889
|
Skeleton,
|
|
7301
8890
|
Slider,
|
|
7302
8891
|
SofyaProvider,
|
|
@@ -7375,6 +8964,14 @@ var import_tokens4 = require("@sofya-ds/tokens");
|
|
|
7375
8964
|
progressSizeOptions,
|
|
7376
8965
|
radioGroupOrientationOptions,
|
|
7377
8966
|
radioGroupVariantOptions,
|
|
8967
|
+
reasoningWidgetActionScopeOptions,
|
|
8968
|
+
reasoningWidgetActionToneOptions,
|
|
8969
|
+
reasoningWidgetDensityOptions,
|
|
8970
|
+
reasoningWidgetFrameOptions,
|
|
8971
|
+
reasoningWidgetTableAlignOptions,
|
|
8972
|
+
reasoningWidgetTableColumnVariantOptions,
|
|
8973
|
+
reasoningWidgetToneOptions,
|
|
8974
|
+
reasoningWidgetVariantOptions,
|
|
7378
8975
|
renderTextContent,
|
|
7379
8976
|
resolveSurfaceToken,
|
|
7380
8977
|
resolveTextStyle,
|