@sofya-ds/react 0.1.0 → 1.1.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 +842 -673
- package/dist/index.css +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +842 -673
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -839,11 +839,11 @@ var alertVariants = (0, import_class_variance_authority2.cva)("flex w-full items
|
|
|
839
839
|
lg: "gap-4 rounded-[18px] px-6 py-4"
|
|
840
840
|
},
|
|
841
841
|
tone: {
|
|
842
|
-
default: "border-[
|
|
843
|
-
info: "border-[
|
|
844
|
-
success: "border-[
|
|
845
|
-
warning: "border-[
|
|
846
|
-
destructive: "border-[
|
|
842
|
+
default: "border-[color:var(--sofya-tone-default-border)] bg-[color:var(--sofya-tone-default-background)] text-[color:var(--sofya-tone-default-foreground)]",
|
|
843
|
+
info: "border-[color:var(--sofya-tone-info-border)] bg-[color:var(--sofya-tone-info-background)] text-[color:var(--sofya-tone-info-foreground)]",
|
|
844
|
+
success: "border-[color:var(--sofya-tone-success-border)] bg-[color:var(--sofya-tone-success-background)] text-[color:var(--sofya-tone-success-foreground)]",
|
|
845
|
+
warning: "border-[color:var(--sofya-tone-warning-border)] bg-[color:var(--sofya-tone-warning-background)] text-[color:var(--sofya-tone-warning-foreground)]",
|
|
846
|
+
destructive: "border-[color:var(--sofya-tone-destructive-border)] bg-[color:var(--sofya-tone-destructive-background)] text-[color:var(--sofya-tone-destructive-foreground)]"
|
|
847
847
|
}
|
|
848
848
|
},
|
|
849
849
|
defaultVariants: {
|
|
@@ -880,7 +880,10 @@ var Alert = React5.forwardRef(function Alert2({
|
|
|
880
880
|
"data-slot": "alert",
|
|
881
881
|
"data-tone": resolvedTone,
|
|
882
882
|
role: resolvedRole,
|
|
883
|
-
className: cn(
|
|
883
|
+
className: cn(
|
|
884
|
+
alertVariants({ size: resolvedSize, tone: resolvedTone }),
|
|
885
|
+
className
|
|
886
|
+
),
|
|
884
887
|
...props,
|
|
885
888
|
children: [
|
|
886
889
|
resolvedIcon ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
@@ -896,29 +899,27 @@ var Alert = React5.forwardRef(function Alert2({
|
|
|
896
899
|
}
|
|
897
900
|
);
|
|
898
901
|
});
|
|
899
|
-
var AlertTitle = React5.forwardRef(
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
}
|
|
921
|
-
);
|
|
902
|
+
var AlertTitle = React5.forwardRef(function AlertTitle2({ children, className, ...props }, ref) {
|
|
903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
904
|
+
"div",
|
|
905
|
+
{
|
|
906
|
+
ref,
|
|
907
|
+
"data-slot": "alert-title",
|
|
908
|
+
className: cn("text-current", className),
|
|
909
|
+
...props,
|
|
910
|
+
children: renderTextContent(children, {
|
|
911
|
+
as: "span",
|
|
912
|
+
className: "block text-current",
|
|
913
|
+
size: "h4",
|
|
914
|
+
style: {
|
|
915
|
+
fontWeight: 500,
|
|
916
|
+
lineHeight: "22px",
|
|
917
|
+
letterSpacing: "-0.02em"
|
|
918
|
+
}
|
|
919
|
+
})
|
|
920
|
+
}
|
|
921
|
+
);
|
|
922
|
+
});
|
|
922
923
|
var AlertDescription = React5.forwardRef(function AlertDescription2({ children, className, ...props }, ref) {
|
|
923
924
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
924
925
|
"div",
|
|
@@ -961,7 +962,7 @@ var badgeVariants = (0, import_class_variance_authority3.cva)(
|
|
|
961
962
|
{
|
|
962
963
|
variants: {
|
|
963
964
|
variant: {
|
|
964
|
-
default: "border-transparent bg-
|
|
965
|
+
default: "border-transparent bg-accent/10 text-accent",
|
|
965
966
|
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
966
967
|
outline: "border border-border bg-background text-foreground",
|
|
967
968
|
success: "border-transparent bg-success/10 text-success",
|
|
@@ -980,9 +981,9 @@ var badgeAlertVariants = (0, import_class_variance_authority3.cva)(
|
|
|
980
981
|
{
|
|
981
982
|
variants: {
|
|
982
983
|
alert: {
|
|
983
|
-
default: "border-transparent bg-
|
|
984
|
-
medium: "border-transparent bg-[
|
|
985
|
-
high: "border-transparent bg-[
|
|
984
|
+
default: "border-transparent bg-accent/10 text-accent",
|
|
985
|
+
medium: "border-transparent bg-[color:var(--sofya-tone-warning-background)] text-warning",
|
|
986
|
+
high: "border-transparent bg-[color:var(--sofya-tone-destructive-background)] text-destructive"
|
|
986
987
|
}
|
|
987
988
|
},
|
|
988
989
|
defaultVariants: {
|
|
@@ -995,8 +996,8 @@ var badgePillVariants = (0, import_class_variance_authority3.cva)(
|
|
|
995
996
|
{
|
|
996
997
|
variants: {
|
|
997
998
|
tone: {
|
|
998
|
-
neutral: "border-[
|
|
999
|
-
danger: "border-[
|
|
999
|
+
neutral: "border-[color:var(--sofya-tone-default-border)] bg-[color:var(--sofya-tone-default-background)] text-[color:var(--sofya-tone-default-foreground)]",
|
|
1000
|
+
danger: "border-[color:var(--sofya-tone-destructive-border)] bg-[color:var(--sofya-tone-destructive-background)] text-[color:var(--sofya-tone-destructive-foreground)]"
|
|
1000
1001
|
}
|
|
1001
1002
|
},
|
|
1002
1003
|
defaultVariants: {
|
|
@@ -1152,15 +1153,15 @@ var buttonVariantOptions = [
|
|
|
1152
1153
|
];
|
|
1153
1154
|
var buttonSizeOptions = ["default", "sm", "lg", "icon"];
|
|
1154
1155
|
var buttonRippleVariantClasses = {
|
|
1155
|
-
default: "bg-
|
|
1156
|
-
gradient: "bg-
|
|
1157
|
-
dropdown: "bg-[
|
|
1158
|
-
icon: "bg-primary/34",
|
|
1159
|
-
language: "bg-
|
|
1160
|
-
secondary: "bg-primary/30",
|
|
1161
|
-
outline: "bg-primary/32",
|
|
1162
|
-
ghost: "bg-primary/28",
|
|
1163
|
-
destructive: "bg-
|
|
1156
|
+
default: "bg-[hsl(var(--sofya-primary-foreground)/0.82)] mix-blend-screen",
|
|
1157
|
+
gradient: "bg-[hsl(var(--sofya-primary-foreground)/0.8)] mix-blend-screen",
|
|
1158
|
+
dropdown: "bg-[hsl(var(--sofya-primary)/0.36)]",
|
|
1159
|
+
icon: "bg-[hsl(var(--sofya-primary)/0.34)]",
|
|
1160
|
+
language: "bg-[hsl(var(--sofya-background)/0.76)] mix-blend-screen",
|
|
1161
|
+
secondary: "bg-[hsl(var(--sofya-primary)/0.30)]",
|
|
1162
|
+
outline: "bg-[hsl(var(--sofya-primary)/0.32)]",
|
|
1163
|
+
ghost: "bg-[hsl(var(--sofya-primary)/0.28)]",
|
|
1164
|
+
destructive: "bg-[hsl(var(--sofya-destructive-foreground)/0.78)] mix-blend-screen"
|
|
1164
1165
|
};
|
|
1165
1166
|
var buttonVariants = (0, import_class_variance_authority4.cva)(
|
|
1166
1167
|
"relative isolate inline-flex items-center justify-center gap-2 overflow-hidden whitespace-nowrap rounded-full text-[14px] font-medium leading-5 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 disabled:opacity-50",
|
|
@@ -1169,7 +1170,7 @@ var buttonVariants = (0, import_class_variance_authority4.cva)(
|
|
|
1169
1170
|
variant: {
|
|
1170
1171
|
default: "bg-primary text-primary-foreground hover:brightness-[1.04]",
|
|
1171
1172
|
gradient: "sofya-gradient-motion [--sofya-gradient-motion-duration:4s] bg-[linear-gradient(90deg,hsl(var(--sofya-button-gradient-from))_0%,hsl(var(--sofya-button-gradient-to))_100%)] text-primary-foreground hover:brightness-[1.05]",
|
|
1172
|
-
dropdown: "justify-between border border-[
|
|
1173
|
+
dropdown: "justify-between border border-[color:var(--sofya-border-strong)] bg-card font-normal tracking-normal text-primary shadow-none hover:bg-card hover:border-[color:var(--sofya-border-strong)]",
|
|
1173
1174
|
icon: "border-0 bg-primary/10 text-primary shadow-sofya-sm hover:bg-primary/15",
|
|
1174
1175
|
language: "border-0 bg-muted bg-cover bg-center bg-no-repeat text-primary-foreground shadow-none hover:brightness-[1.03]",
|
|
1175
1176
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85",
|
|
@@ -1209,12 +1210,17 @@ var buttonRippleBaseSize = {
|
|
|
1209
1210
|
lg: 22,
|
|
1210
1211
|
icon: 18
|
|
1211
1212
|
};
|
|
1212
|
-
function ButtonSpinner({
|
|
1213
|
+
function ButtonSpinner({
|
|
1214
|
+
size
|
|
1215
|
+
}) {
|
|
1213
1216
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1214
1217
|
"svg",
|
|
1215
1218
|
{
|
|
1216
1219
|
"aria-hidden": "true",
|
|
1217
|
-
className: cn(
|
|
1220
|
+
className: cn(
|
|
1221
|
+
"animate-spin text-current",
|
|
1222
|
+
loadingSpinnerSizeClasses[size]
|
|
1223
|
+
),
|
|
1218
1224
|
viewBox: "0 0 24 24",
|
|
1219
1225
|
fill: "none",
|
|
1220
1226
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1292,11 +1298,11 @@ var Button = React6.forwardRef(
|
|
|
1292
1298
|
const hideContent = loadingPhase === "hiding-content" || loadingPhase === "collapsing" || loadingPhase === "loading" || loadingPhase === "hiding-spinner" || loadingPhase === "expanding";
|
|
1293
1299
|
const showSpinner = loadingPhase === "loading";
|
|
1294
1300
|
const iconOnlyActionClassName = isIconOnlyAction ? cn(
|
|
1295
|
-
"h-10 w-10 rounded-[10px] border-0 p-2 text-
|
|
1296
|
-
active ? "bg-[
|
|
1301
|
+
"h-10 w-10 rounded-[10px] border-0 p-2 text-primary shadow-none",
|
|
1302
|
+
active ? "bg-[color:var(--sofya-surface-selected)] hover:bg-[color:var(--sofya-surface-selected)]" : "bg-transparent hover:bg-transparent"
|
|
1297
1303
|
) : void 0;
|
|
1298
1304
|
const languageButtonClassName = isLanguageButton ? cn(
|
|
1299
|
-
"min-w-0 overflow-hidden border-0 text-
|
|
1305
|
+
"min-w-0 overflow-hidden border-0 text-primary-foreground shadow-none",
|
|
1300
1306
|
languageButtonSizeClasses[resolvedSize]
|
|
1301
1307
|
) : void 0;
|
|
1302
1308
|
const resolvedButtonStyle = {
|
|
@@ -1327,7 +1333,10 @@ var Button = React6.forwardRef(
|
|
|
1327
1333
|
Math.hypot(rect.width - x, rect.height - y)
|
|
1328
1334
|
);
|
|
1329
1335
|
const baseSize = buttonRippleBaseSize[resolvedSize];
|
|
1330
|
-
const finalDiameter = Math.max(
|
|
1336
|
+
const finalDiameter = Math.max(
|
|
1337
|
+
radius * 2 + 24,
|
|
1338
|
+
Math.max(rect.width, rect.height) + 18
|
|
1339
|
+
);
|
|
1331
1340
|
setRipples((currentRipples) => [
|
|
1332
1341
|
...currentRipples,
|
|
1333
1342
|
{
|
|
@@ -1348,7 +1357,11 @@ var Button = React6.forwardRef(
|
|
|
1348
1357
|
return;
|
|
1349
1358
|
}
|
|
1350
1359
|
if (event.button === 0) {
|
|
1351
|
-
createRipple(
|
|
1360
|
+
createRipple(
|
|
1361
|
+
event.currentTarget,
|
|
1362
|
+
event.clientX,
|
|
1363
|
+
event.clientY
|
|
1364
|
+
);
|
|
1352
1365
|
}
|
|
1353
1366
|
},
|
|
1354
1367
|
[createRipple, isDisabled, onPointerDown]
|
|
@@ -1372,7 +1385,10 @@ var Button = React6.forwardRef(
|
|
|
1372
1385
|
frameRef.current = null;
|
|
1373
1386
|
}
|
|
1374
1387
|
}, []);
|
|
1375
|
-
React6.useImperativeHandle(
|
|
1388
|
+
React6.useImperativeHandle(
|
|
1389
|
+
ref,
|
|
1390
|
+
() => buttonRef.current
|
|
1391
|
+
);
|
|
1376
1392
|
React6.useLayoutEffect(() => {
|
|
1377
1393
|
const element = buttonRef.current;
|
|
1378
1394
|
if (element && loadingPhase === "idle" && !loading) {
|
|
@@ -1483,7 +1499,11 @@ var Button = React6.forwardRef(
|
|
|
1483
1499
|
),
|
|
1484
1500
|
initial: prefersReducedMotion ? { opacity: 0.32, scale: 0.72 } : { opacity: 0.56, scale: 0 },
|
|
1485
1501
|
animate: prefersReducedMotion ? { opacity: 0, scale: 1.02 } : { opacity: [0.56, 0.26, 0], scale: ripple.scale },
|
|
1486
|
-
transition: prefersReducedMotion ? { duration: 0.2, ease: "linear" } : {
|
|
1502
|
+
transition: prefersReducedMotion ? { duration: 0.2, ease: "linear" } : {
|
|
1503
|
+
duration: 0.62,
|
|
1504
|
+
times: [0, 0.35, 1],
|
|
1505
|
+
ease: [0.16, 1, 0.3, 1]
|
|
1506
|
+
},
|
|
1487
1507
|
style: {
|
|
1488
1508
|
height: ripple.size,
|
|
1489
1509
|
left: ripple.x,
|
|
@@ -1646,143 +1666,147 @@ function CardFooter({ children, className, ...props }) {
|
|
|
1646
1666
|
// src/components/checkbox.tsx
|
|
1647
1667
|
var React8 = __toESM(require("react"), 1);
|
|
1648
1668
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1649
|
-
var Checkbox = React8.forwardRef(
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
children: [
|
|
1677
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1678
|
-
"input",
|
|
1679
|
-
{
|
|
1680
|
-
ref,
|
|
1681
|
-
id: resolvedId,
|
|
1682
|
-
type: "checkbox",
|
|
1683
|
-
className: "peer sr-only",
|
|
1684
|
-
checked,
|
|
1685
|
-
defaultChecked,
|
|
1686
|
-
disabled,
|
|
1687
|
-
"aria-describedby": descriptionId,
|
|
1688
|
-
...props
|
|
1689
|
-
}
|
|
1690
|
-
),
|
|
1691
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1692
|
-
"span",
|
|
1693
|
-
{
|
|
1694
|
-
"aria-hidden": "true",
|
|
1695
|
-
className: cn(
|
|
1696
|
-
"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-[8px] border border-[#D9E2FA] bg-card text-transparent transition-[background-color,border-color,box-shadow,color] duration-sofya ease-sofya peer-checked:border-primary peer-checked:bg-primary peer-checked:text-primary-foreground peer-focus-visible:ring-2 peer-focus-visible:ring-[#D9E2FA]/60 peer-focus-visible:ring-offset-0",
|
|
1697
|
-
indicatorOffsetClassName
|
|
1698
|
-
),
|
|
1699
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1700
|
-
"svg",
|
|
1701
|
-
{
|
|
1702
|
-
viewBox: "0 0 16 16",
|
|
1703
|
-
fill: "none",
|
|
1704
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1705
|
-
className: "h-4 w-4 shrink-0",
|
|
1706
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1707
|
-
"path",
|
|
1708
|
-
{
|
|
1709
|
-
d: "M2.75 8.25L6.4 11.9L13.35 4.95",
|
|
1710
|
-
stroke: "currentColor",
|
|
1711
|
-
strokeWidth: "2.4",
|
|
1712
|
-
strokeLinecap: "round",
|
|
1713
|
-
strokeLinejoin: "round"
|
|
1714
|
-
}
|
|
1715
|
-
)
|
|
1716
|
-
}
|
|
1717
|
-
)
|
|
1718
|
-
}
|
|
1669
|
+
var Checkbox = React8.forwardRef(
|
|
1670
|
+
function Checkbox2({
|
|
1671
|
+
checked,
|
|
1672
|
+
className,
|
|
1673
|
+
defaultChecked,
|
|
1674
|
+
description,
|
|
1675
|
+
descriptionClassName,
|
|
1676
|
+
disabled,
|
|
1677
|
+
id,
|
|
1678
|
+
label,
|
|
1679
|
+
labelClassName,
|
|
1680
|
+
...props
|
|
1681
|
+
}, ref) {
|
|
1682
|
+
const generatedId = React8.useId();
|
|
1683
|
+
const resolvedId = id ?? generatedId;
|
|
1684
|
+
const descriptionId = description ? `${resolvedId}-description` : void 0;
|
|
1685
|
+
const alignClassName = description ? "items-start" : "items-center";
|
|
1686
|
+
const indicatorOffsetClassName = "";
|
|
1687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1688
|
+
"label",
|
|
1689
|
+
{
|
|
1690
|
+
htmlFor: resolvedId,
|
|
1691
|
+
className: cn(
|
|
1692
|
+
"flex w-fit gap-4",
|
|
1693
|
+
alignClassName,
|
|
1694
|
+
disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
1695
|
+
className
|
|
1719
1696
|
),
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
"
|
|
1697
|
+
children: [
|
|
1698
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1699
|
+
"input",
|
|
1723
1700
|
{
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
fontWeight: 400,
|
|
1734
|
-
lineHeight: "22px",
|
|
1735
|
-
letterSpacing: "-0.02em"
|
|
1736
|
-
}
|
|
1737
|
-
})
|
|
1701
|
+
ref,
|
|
1702
|
+
id: resolvedId,
|
|
1703
|
+
type: "checkbox",
|
|
1704
|
+
className: "peer sr-only",
|
|
1705
|
+
checked,
|
|
1706
|
+
defaultChecked,
|
|
1707
|
+
disabled,
|
|
1708
|
+
"aria-describedby": descriptionId,
|
|
1709
|
+
...props
|
|
1738
1710
|
}
|
|
1739
|
-
)
|
|
1740
|
-
|
|
1711
|
+
),
|
|
1712
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1741
1713
|
"span",
|
|
1742
1714
|
{
|
|
1743
|
-
|
|
1715
|
+
"aria-hidden": "true",
|
|
1744
1716
|
className: cn(
|
|
1745
|
-
"text-
|
|
1746
|
-
|
|
1717
|
+
"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-[8px] border border-[color:var(--sofya-border-strong)] bg-card text-transparent transition-[background-color,border-color,box-shadow,color] duration-sofya ease-sofya peer-checked:border-primary peer-checked:bg-primary peer-checked:text-primary-foreground peer-focus-visible:ring-2 peer-focus-visible:ring-[color:var(--sofya-focus-ring-soft)] peer-focus-visible:ring-offset-0",
|
|
1718
|
+
indicatorOffsetClassName
|
|
1747
1719
|
),
|
|
1748
|
-
children:
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1720
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1721
|
+
"svg",
|
|
1722
|
+
{
|
|
1723
|
+
viewBox: "0 0 16 16",
|
|
1724
|
+
fill: "none",
|
|
1725
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1726
|
+
className: "h-4 w-4 shrink-0",
|
|
1727
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1728
|
+
"path",
|
|
1729
|
+
{
|
|
1730
|
+
d: "M2.75 8.25L6.4 11.9L13.35 4.95",
|
|
1731
|
+
stroke: "currentColor",
|
|
1732
|
+
strokeWidth: "2.4",
|
|
1733
|
+
strokeLinecap: "round",
|
|
1734
|
+
strokeLinejoin: "round"
|
|
1735
|
+
}
|
|
1736
|
+
)
|
|
1754
1737
|
}
|
|
1755
|
-
|
|
1738
|
+
)
|
|
1756
1739
|
}
|
|
1757
|
-
)
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1740
|
+
),
|
|
1741
|
+
label || description ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "grid gap-2", children: [
|
|
1742
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1743
|
+
"span",
|
|
1744
|
+
{
|
|
1745
|
+
className: cn(
|
|
1746
|
+
"text-[color:var(--sofya-text-default)] [&_a]:text-primary [&_a]:underline [&_a]:underline-offset-[3px]",
|
|
1747
|
+
labelClassName
|
|
1748
|
+
),
|
|
1749
|
+
children: renderTextContent(label, {
|
|
1750
|
+
as: "span",
|
|
1751
|
+
className: "text-[color:var(--sofya-text-default)]",
|
|
1752
|
+
size: "h4",
|
|
1753
|
+
style: {
|
|
1754
|
+
fontWeight: 400,
|
|
1755
|
+
lineHeight: "22px",
|
|
1756
|
+
letterSpacing: "-0.02em"
|
|
1757
|
+
}
|
|
1758
|
+
})
|
|
1759
|
+
}
|
|
1760
|
+
) : null,
|
|
1761
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1762
|
+
"span",
|
|
1763
|
+
{
|
|
1764
|
+
id: descriptionId,
|
|
1765
|
+
className: cn("text-muted-foreground", descriptionClassName),
|
|
1766
|
+
children: renderTextContent(description, {
|
|
1767
|
+
as: "span",
|
|
1768
|
+
className: "text-muted-foreground",
|
|
1769
|
+
size: "body",
|
|
1770
|
+
style: {
|
|
1771
|
+
lineHeight: "20px"
|
|
1772
|
+
}
|
|
1773
|
+
})
|
|
1774
|
+
}
|
|
1775
|
+
) : null
|
|
1776
|
+
] }) : null
|
|
1777
|
+
]
|
|
1778
|
+
}
|
|
1779
|
+
);
|
|
1780
|
+
}
|
|
1781
|
+
);
|
|
1763
1782
|
Checkbox.displayName = "Checkbox";
|
|
1764
1783
|
|
|
1765
1784
|
// src/components/dropdown.tsx
|
|
1766
1785
|
var React9 = __toESM(require("react"), 1);
|
|
1767
1786
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
1768
1787
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1769
|
-
var dropdownVariantOptions = [
|
|
1788
|
+
var dropdownVariantOptions = [
|
|
1789
|
+
"card",
|
|
1790
|
+
"panel",
|
|
1791
|
+
"language",
|
|
1792
|
+
"selected"
|
|
1793
|
+
];
|
|
1770
1794
|
var dropdownLanguageItems = [
|
|
1771
1795
|
{ value: "en-US", label: "English", languageLocale: "en-US" },
|
|
1772
1796
|
{ value: "pt-BR", label: "Portuguese", languageLocale: "pt-BR" },
|
|
1773
1797
|
{ value: "es-ES", label: "Spanish", languageLocale: "es-ES" }
|
|
1774
1798
|
];
|
|
1775
1799
|
var dropdownTriggerClasses = {
|
|
1776
|
-
card: "h-12 rounded-[20px] px-6 py-2 text-
|
|
1800
|
+
card: "h-12 rounded-[20px] px-6 py-2 text-primary",
|
|
1777
1801
|
panel: "h-12 rounded-[10px] px-6 py-2 text-foreground",
|
|
1778
1802
|
language: "",
|
|
1779
|
-
selected: "h-10 w-full rounded-[10px] border-[
|
|
1803
|
+
selected: "h-10 w-full rounded-[10px] border-[color:var(--sofya-border-strong)] px-4 py-2 text-[14px] font-normal leading-[22px] tracking-[-0.02em]"
|
|
1780
1804
|
};
|
|
1781
1805
|
var dropdownContentClasses = {
|
|
1782
|
-
card: "rounded-[20px] border-[
|
|
1783
|
-
panel: "rounded-[10px] border-[
|
|
1784
|
-
language: "w-[224px] min-w-[224px] rounded-[10px] border-[
|
|
1785
|
-
selected: "w-[var(--radix-dropdown-menu-trigger-width)] min-w-[var(--radix-dropdown-menu-trigger-width)] rounded-[10px] border-[
|
|
1806
|
+
card: "rounded-[20px] border-[color:var(--sofya-border-strong)] text-foreground shadow-[var(--sofya-shadow-soft)]",
|
|
1807
|
+
panel: "rounded-[10px] border-[color:var(--sofya-border-strong)] text-foreground shadow-[var(--sofya-shadow-soft)]",
|
|
1808
|
+
language: "w-[224px] min-w-[224px] rounded-[10px] border-[color:var(--sofya-border-strong)] text-foreground shadow-[var(--sofya-shadow-soft)]",
|
|
1809
|
+
selected: "w-[var(--radix-dropdown-menu-trigger-width)] min-w-[var(--radix-dropdown-menu-trigger-width)] rounded-[10px] border-[color:var(--sofya-border-strong)] text-foreground shadow-[var(--sofya-shadow-soft)]"
|
|
1786
1810
|
};
|
|
1787
1811
|
var dropdownItemClasses = {
|
|
1788
1812
|
card: "text-foreground",
|
|
@@ -1804,7 +1828,13 @@ function resolveItemLanguageLocale(item) {
|
|
|
1804
1828
|
}
|
|
1805
1829
|
function DefaultDropdownTriggerIcon({ variant }) {
|
|
1806
1830
|
if (variant === "selected") {
|
|
1807
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1832
|
+
Icon,
|
|
1833
|
+
{
|
|
1834
|
+
name: "caret-down",
|
|
1835
|
+
className: "h-[6px] w-[11px] text-[color:var(--sofya-text-subtle)]"
|
|
1836
|
+
}
|
|
1837
|
+
);
|
|
1808
1838
|
}
|
|
1809
1839
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "flex h-8 w-8 items-center justify-center rounded-[6px]", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { name: "caret-down", className: "!h-4 !w-4" }) });
|
|
1810
1840
|
}
|
|
@@ -1852,10 +1882,14 @@ function Dropdown({
|
|
|
1852
1882
|
[isLanguageVariant, items]
|
|
1853
1883
|
);
|
|
1854
1884
|
const defaultUncontrolledValue = defaultValue ?? (isLanguageVariant ? resolvedItems[0]?.value : void 0);
|
|
1855
|
-
const [internalValue, setInternalValue] = React9.useState(
|
|
1885
|
+
const [internalValue, setInternalValue] = React9.useState(
|
|
1886
|
+
defaultUncontrolledValue
|
|
1887
|
+
);
|
|
1856
1888
|
const selectedValue = value ?? internalValue;
|
|
1857
1889
|
const radioValue = selectedValue ?? "";
|
|
1858
|
-
const selectedItem = resolvedItems.find(
|
|
1890
|
+
const selectedItem = resolvedItems.find(
|
|
1891
|
+
(item) => item.value === selectedValue
|
|
1892
|
+
);
|
|
1859
1893
|
const hasSelectedItem = selectedItem !== void 0;
|
|
1860
1894
|
const selectedLanguageLocale = resolveItemLanguageLocale(selectedItem);
|
|
1861
1895
|
React9.useEffect(() => {
|
|
@@ -1869,7 +1903,7 @@ function Dropdown({
|
|
|
1869
1903
|
}, [defaultUncontrolledValue, internalValue, resolvedItems, value]);
|
|
1870
1904
|
const resolvedTriggerIcon = isLanguageVariant ? void 0 : triggerIcon === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DefaultDropdownTriggerIcon, { variant }) : triggerIcon;
|
|
1871
1905
|
const triggerLabel = selectedItem?.triggerLabel ?? selectedItem?.label ?? placeholder;
|
|
1872
|
-
const selectedTriggerToneClassName = isSelectedVariant ? hasSelectedItem ? "text-foreground" : "text-[
|
|
1906
|
+
const selectedTriggerToneClassName = isSelectedVariant ? hasSelectedItem ? "text-foreground" : "text-[color:var(--sofya-text-soft)]" : void 0;
|
|
1873
1907
|
function handleValueChange(nextValue) {
|
|
1874
1908
|
if (value === void 0) {
|
|
1875
1909
|
setInternalValue(nextValue);
|
|
@@ -1915,7 +1949,7 @@ function Dropdown({
|
|
|
1915
1949
|
align,
|
|
1916
1950
|
sideOffset,
|
|
1917
1951
|
className: cn(
|
|
1918
|
-
"sofya-dropdown-content z-50 w-auto min-w-[var(--radix-dropdown-menu-trigger-width)] border bg-
|
|
1952
|
+
"sofya-dropdown-content z-50 w-auto min-w-[var(--radix-dropdown-menu-trigger-width)] border bg-card p-2 outline-none",
|
|
1919
1953
|
dropdownContentClasses[variant],
|
|
1920
1954
|
contentClassName
|
|
1921
1955
|
),
|
|
@@ -1937,7 +1971,7 @@ function Dropdown({
|
|
|
1937
1971
|
disabled: item.disabled,
|
|
1938
1972
|
className: cn(
|
|
1939
1973
|
"flex w-full cursor-pointer items-center rounded-[4px] text-[14px] font-normal leading-[normal] outline-none transition-colors duration-sofya ease-sofya data-[disabled]:pointer-events-none data-[disabled]:opacity-40",
|
|
1940
|
-
usesDefaultListStyle ? "px-0 py-0 data-[highlighted]:bg-transparent [&[data-highlighted]_span[data-dropdown-item-body]]:bg-[
|
|
1974
|
+
usesDefaultListStyle ? "px-0 py-0 data-[highlighted]:bg-transparent [&[data-highlighted]_span[data-dropdown-item-body]]:bg-[color:var(--sofya-surface-selected)]" : "px-2 py-2 data-[highlighted]:bg-[color:var(--sofya-surface-hover)]",
|
|
1941
1975
|
dropdownItemClasses[variant],
|
|
1942
1976
|
itemClassName
|
|
1943
1977
|
),
|
|
@@ -1947,7 +1981,7 @@ function Dropdown({
|
|
|
1947
1981
|
"data-dropdown-item-body": true,
|
|
1948
1982
|
className: cn(
|
|
1949
1983
|
"inline-flex min-w-0 items-center gap-2 rounded-full px-4 py-2 transition-colors duration-sofya ease-sofya",
|
|
1950
|
-
isSelected ? "bg-[
|
|
1984
|
+
isSelected ? "bg-[color:var(--sofya-surface-selected)]" : "bg-transparent"
|
|
1951
1985
|
),
|
|
1952
1986
|
children: [
|
|
1953
1987
|
itemIcon ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "flex shrink-0 items-center justify-center", children: itemIcon }) : null,
|
|
@@ -1989,7 +2023,7 @@ function Dropdown({
|
|
|
1989
2023
|
"aria-hidden": "true",
|
|
1990
2024
|
className: cn(
|
|
1991
2025
|
"flex h-4 w-4 shrink-0 items-center justify-center transition-opacity duration-sofya ease-sofya",
|
|
1992
|
-
variant === "language" && "text-
|
|
2026
|
+
variant === "language" && "text-primary",
|
|
1993
2027
|
isSelected ? "opacity-100" : "opacity-0"
|
|
1994
2028
|
),
|
|
1995
2029
|
children: indicator
|
|
@@ -2260,25 +2294,29 @@ var InputOTP = React12.forwardRef(({ className, containerClassName, ...props },
|
|
|
2260
2294
|
import_input_otp.OTPInput,
|
|
2261
2295
|
{
|
|
2262
2296
|
ref,
|
|
2263
|
-
containerClassName: cn(
|
|
2297
|
+
containerClassName: cn(
|
|
2298
|
+
"flex items-center gap-4 has-[:disabled]:opacity-50",
|
|
2299
|
+
containerClassName
|
|
2300
|
+
),
|
|
2264
2301
|
className: cn("disabled:cursor-not-allowed", className),
|
|
2265
2302
|
...props
|
|
2266
2303
|
}
|
|
2267
2304
|
);
|
|
2268
2305
|
});
|
|
2269
2306
|
InputOTP.displayName = "InputOTP";
|
|
2270
|
-
var InputOTPGroup = React12.forwardRef(
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
);
|
|
2307
|
+
var InputOTPGroup = React12.forwardRef(({ className, ...props }, ref) => {
|
|
2308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2309
|
+
"div",
|
|
2310
|
+
{
|
|
2311
|
+
ref,
|
|
2312
|
+
className: cn(
|
|
2313
|
+
"flex overflow-hidden rounded-[12px] border border-[color:var(--sofya-border-hover)] bg-card",
|
|
2314
|
+
className
|
|
2315
|
+
),
|
|
2316
|
+
...props
|
|
2317
|
+
}
|
|
2318
|
+
);
|
|
2319
|
+
});
|
|
2282
2320
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
2283
2321
|
var InputOTPSlot = React12.forwardRef(
|
|
2284
2322
|
({ className, index, ...props }, ref) => {
|
|
@@ -2290,7 +2328,7 @@ var InputOTPSlot = React12.forwardRef(
|
|
|
2290
2328
|
{
|
|
2291
2329
|
ref,
|
|
2292
2330
|
className: cn(
|
|
2293
|
-
"relative flex h-[92px] w-[96px] items-center justify-center border-r border-[
|
|
2331
|
+
"relative flex h-[92px] w-[96px] items-center justify-center border-r border-[color:var(--sofya-border-strong)] bg-card last:border-r-0",
|
|
2294
2332
|
className
|
|
2295
2333
|
),
|
|
2296
2334
|
...props
|
|
@@ -2302,39 +2340,45 @@ var InputOTPSlot = React12.forwardRef(
|
|
|
2302
2340
|
{
|
|
2303
2341
|
ref,
|
|
2304
2342
|
className: cn(
|
|
2305
|
-
"relative flex h-[92px] w-[96px] items-center justify-center border-r border-[
|
|
2306
|
-
slot.isActive && "z-10 border-transparent bg-[
|
|
2343
|
+
"relative flex h-[92px] w-[96px] items-center justify-center border-r border-[color:var(--sofya-border-strong)] bg-card text-[40px] font-medium leading-none tracking-[-0.04em] text-[color:var(--sofya-text-default)] transition-[background-color,box-shadow,border-color,color] duration-sofya ease-sofya last:border-r-0",
|
|
2344
|
+
slot.isActive && "z-10 border-transparent bg-[color:var(--sofya-surface-hover)] text-primary shadow-[var(--sofya-shadow-otp-focus)] ring-2 ring-inset ring-[color:var(--sofya-focus-ring-strong)]",
|
|
2307
2345
|
className
|
|
2308
2346
|
),
|
|
2309
2347
|
...props,
|
|
2310
2348
|
children: [
|
|
2311
2349
|
slot.char ?? null,
|
|
2312
|
-
slot.hasFakeCaret ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "h-10 w-[2px] animate-pulse rounded-full bg-
|
|
2350
|
+
slot.hasFakeCaret ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "h-10 w-[2px] animate-pulse rounded-full bg-primary shadow-[var(--sofya-shadow-caret-glow)]" }) }) : null
|
|
2313
2351
|
]
|
|
2314
2352
|
}
|
|
2315
2353
|
);
|
|
2316
2354
|
}
|
|
2317
2355
|
);
|
|
2318
2356
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
2319
|
-
var InputOTPSeparator = React12.forwardRef(
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
);
|
|
2357
|
+
var InputOTPSeparator = React12.forwardRef(({ className, ...props }, ref) => {
|
|
2358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2359
|
+
"div",
|
|
2360
|
+
{
|
|
2361
|
+
ref,
|
|
2362
|
+
role: "separator",
|
|
2363
|
+
className: cn(
|
|
2364
|
+
"flex items-center justify-center px-2 text-[28px] leading-none text-[color:var(--sofya-text-soft)]",
|
|
2365
|
+
className
|
|
2366
|
+
),
|
|
2367
|
+
...props,
|
|
2368
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { "aria-hidden": "true", children: "." })
|
|
2369
|
+
}
|
|
2370
|
+
);
|
|
2371
|
+
});
|
|
2333
2372
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
2334
2373
|
|
|
2335
2374
|
// src/components/input.tsx
|
|
2336
2375
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2337
|
-
var inputVariantOptions = [
|
|
2376
|
+
var inputVariantOptions = [
|
|
2377
|
+
"default",
|
|
2378
|
+
"search",
|
|
2379
|
+
"otp",
|
|
2380
|
+
"upload"
|
|
2381
|
+
];
|
|
2338
2382
|
var uploadKindOptions = ["document", "image", "video"];
|
|
2339
2383
|
var uploadAcceptByKind = {
|
|
2340
2384
|
document: ".pdf,.doc,.docx,.txt,.rtf,.odt,.jpg,.jpeg,.png,.webp,.gif",
|
|
@@ -2351,7 +2395,14 @@ var uploadAriaLabelByKind = {
|
|
|
2351
2395
|
image: "Upload de imagem",
|
|
2352
2396
|
video: "Upload de video"
|
|
2353
2397
|
};
|
|
2354
|
-
var uploadDocumentExtensions = /* @__PURE__ */ new Set([
|
|
2398
|
+
var uploadDocumentExtensions = /* @__PURE__ */ new Set([
|
|
2399
|
+
"pdf",
|
|
2400
|
+
"doc",
|
|
2401
|
+
"docx",
|
|
2402
|
+
"txt",
|
|
2403
|
+
"rtf",
|
|
2404
|
+
"odt"
|
|
2405
|
+
]);
|
|
2355
2406
|
var uploadImageExtensions = /* @__PURE__ */ new Set(["jpg", "jpeg", "png", "webp", "gif"]);
|
|
2356
2407
|
var uploadVideoExtensions = /* @__PURE__ */ new Set(["mp4", "mov", "avi", "webm", "m4v"]);
|
|
2357
2408
|
function resolveUploadFileExtension(file) {
|
|
@@ -2434,11 +2485,14 @@ function InputShell({
|
|
|
2434
2485
|
label ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2435
2486
|
"label",
|
|
2436
2487
|
{
|
|
2437
|
-
className: cn(
|
|
2488
|
+
className: cn(
|
|
2489
|
+
"text-[color:var(--sofya-text-default)]",
|
|
2490
|
+
labelClassName
|
|
2491
|
+
),
|
|
2438
2492
|
htmlFor: resolvedId,
|
|
2439
2493
|
children: renderTextContent(label, {
|
|
2440
2494
|
as: "span",
|
|
2441
|
-
className: "block text-[var(--sofya-
|
|
2495
|
+
className: "block text-[color:var(--sofya-text-default)]",
|
|
2442
2496
|
size: "h4",
|
|
2443
2497
|
style: {
|
|
2444
2498
|
fontWeight: 500,
|
|
@@ -2465,11 +2519,14 @@ function UploadInputShell({
|
|
|
2465
2519
|
label || optionalLabel ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2466
2520
|
"div",
|
|
2467
2521
|
{
|
|
2468
|
-
className: cn(
|
|
2522
|
+
className: cn(
|
|
2523
|
+
"text-[color:var(--sofya-text-default)]",
|
|
2524
|
+
labelClassName
|
|
2525
|
+
),
|
|
2469
2526
|
children: [
|
|
2470
2527
|
renderTextContent(label, {
|
|
2471
2528
|
as: "span",
|
|
2472
|
-
className: "text-[
|
|
2529
|
+
className: "text-[color:var(--sofya-text-default)]",
|
|
2473
2530
|
size: "body",
|
|
2474
2531
|
style: {
|
|
2475
2532
|
fontWeight: 700,
|
|
@@ -2477,9 +2534,9 @@ function UploadInputShell({
|
|
|
2477
2534
|
letterSpacing: "-0.02em"
|
|
2478
2535
|
}
|
|
2479
2536
|
}),
|
|
2480
|
-
optionalLabel ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "ml-2 text-[
|
|
2537
|
+
optionalLabel ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "ml-2 text-[color:var(--sofya-text-subtle)]", children: renderTextContent(optionalLabel, {
|
|
2481
2538
|
as: "span",
|
|
2482
|
-
className: "text-[
|
|
2539
|
+
className: "text-[color:var(--sofya-text-subtle)]",
|
|
2483
2540
|
size: "tiny",
|
|
2484
2541
|
style: {
|
|
2485
2542
|
fontWeight: 400,
|
|
@@ -2530,7 +2587,18 @@ function UploadFileTypeGlyph({
|
|
|
2530
2587
|
viewBox: "0 0 18 18",
|
|
2531
2588
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2532
2589
|
children: [
|
|
2533
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2590
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2591
|
+
"rect",
|
|
2592
|
+
{
|
|
2593
|
+
x: "2.5",
|
|
2594
|
+
y: "3",
|
|
2595
|
+
width: "13",
|
|
2596
|
+
height: "12",
|
|
2597
|
+
rx: "2.5",
|
|
2598
|
+
stroke: "currentColor",
|
|
2599
|
+
strokeWidth: "1.5"
|
|
2600
|
+
}
|
|
2601
|
+
),
|
|
2534
2602
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("circle", { cx: "6.75", cy: "7.25", r: "1.25", fill: "currentColor" }),
|
|
2535
2603
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2536
2604
|
"path",
|
|
@@ -2557,7 +2625,18 @@ function UploadFileTypeGlyph({
|
|
|
2557
2625
|
viewBox: "0 0 18 18",
|
|
2558
2626
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2559
2627
|
children: [
|
|
2560
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2628
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2629
|
+
"rect",
|
|
2630
|
+
{
|
|
2631
|
+
x: "2.5",
|
|
2632
|
+
y: "4",
|
|
2633
|
+
width: "13",
|
|
2634
|
+
height: "10",
|
|
2635
|
+
rx: "2.5",
|
|
2636
|
+
stroke: "currentColor",
|
|
2637
|
+
strokeWidth: "1.5"
|
|
2638
|
+
}
|
|
2639
|
+
),
|
|
2561
2640
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2562
2641
|
"path",
|
|
2563
2642
|
{
|
|
@@ -2611,295 +2690,307 @@ function UploadFileTypeGlyph({
|
|
|
2611
2690
|
}
|
|
2612
2691
|
);
|
|
2613
2692
|
}
|
|
2614
|
-
var UploadInputControl = React13.forwardRef(
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
const
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2693
|
+
var UploadInputControl = React13.forwardRef(function UploadInputControl2({
|
|
2694
|
+
accept,
|
|
2695
|
+
"aria-label": ariaLabel,
|
|
2696
|
+
className,
|
|
2697
|
+
disabled,
|
|
2698
|
+
multiple,
|
|
2699
|
+
onChange,
|
|
2700
|
+
onFilesChange,
|
|
2701
|
+
uploadDescription,
|
|
2702
|
+
uploadKind = "document",
|
|
2703
|
+
uploadTitle,
|
|
2704
|
+
resolvedId,
|
|
2705
|
+
...uploadProps
|
|
2706
|
+
}, ref) {
|
|
2707
|
+
const inputRef = React13.useRef(null);
|
|
2708
|
+
const [isDragActive, setIsDragActive] = React13.useState(false);
|
|
2709
|
+
const [selectedFiles, setSelectedFiles] = React13.useState([]);
|
|
2710
|
+
const resolvedMultiple = multiple ?? true;
|
|
2711
|
+
const prefersReducedMotion = (0, import_react2.useReducedMotion)();
|
|
2712
|
+
React13.useImperativeHandle(ref, () => inputRef.current);
|
|
2713
|
+
const resolvedAccept = accept ?? uploadAcceptByKind[uploadKind];
|
|
2714
|
+
const resolvedAriaLabel = ariaLabel ?? uploadAriaLabelByKind[uploadKind];
|
|
2715
|
+
const resolvedTitle = uploadTitle ?? "Arraste arquivos aqui ou clique para selecionar";
|
|
2716
|
+
const resolvedDescription = uploadDescription ?? uploadDescriptionByKind[uploadKind];
|
|
2717
|
+
const syncSelectedFiles = React13.useCallback(
|
|
2718
|
+
(files) => {
|
|
2719
|
+
const normalizedFiles = resolvedMultiple ? files : files.slice(0, 1);
|
|
2720
|
+
setSelectedFiles(normalizedFiles);
|
|
2721
|
+
onFilesChange?.(normalizedFiles);
|
|
2722
|
+
},
|
|
2723
|
+
[onFilesChange, resolvedMultiple]
|
|
2724
|
+
);
|
|
2725
|
+
const applyFilesToInput = React13.useCallback((files) => {
|
|
2726
|
+
const inputElement = inputRef.current;
|
|
2727
|
+
if (!inputElement || typeof DataTransfer === "undefined") {
|
|
2728
|
+
return false;
|
|
2729
|
+
}
|
|
2730
|
+
try {
|
|
2731
|
+
const transfer = new DataTransfer();
|
|
2732
|
+
files.forEach((file) => {
|
|
2733
|
+
transfer.items.add(file);
|
|
2734
|
+
});
|
|
2735
|
+
inputElement.files = transfer.files;
|
|
2736
|
+
if (!files.length) {
|
|
2737
|
+
inputElement.value = "";
|
|
2651
2738
|
}
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2739
|
+
return true;
|
|
2740
|
+
} catch {
|
|
2741
|
+
return false;
|
|
2742
|
+
}
|
|
2743
|
+
}, []);
|
|
2744
|
+
const handleInputChange = React13.useCallback(
|
|
2745
|
+
(event) => {
|
|
2746
|
+
const nextFiles = mergeUploadFiles(
|
|
2747
|
+
selectedFiles,
|
|
2748
|
+
Array.from(event.currentTarget.files ?? []),
|
|
2749
|
+
resolvedMultiple
|
|
2750
|
+
);
|
|
2751
|
+
applyFilesToInput(nextFiles);
|
|
2752
|
+
onChange?.(event);
|
|
2753
|
+
syncSelectedFiles(nextFiles);
|
|
2754
|
+
},
|
|
2755
|
+
[
|
|
2756
|
+
applyFilesToInput,
|
|
2757
|
+
onChange,
|
|
2758
|
+
resolvedMultiple,
|
|
2759
|
+
selectedFiles,
|
|
2760
|
+
syncSelectedFiles
|
|
2761
|
+
]
|
|
2762
|
+
);
|
|
2763
|
+
const openPicker = React13.useCallback(() => {
|
|
2764
|
+
if (!disabled) {
|
|
2765
|
+
inputRef.current?.click();
|
|
2766
|
+
}
|
|
2767
|
+
}, [disabled]);
|
|
2768
|
+
const handleKeyDown = React13.useCallback(
|
|
2769
|
+
(event) => {
|
|
2770
|
+
if (disabled) {
|
|
2771
|
+
return;
|
|
2664
2772
|
}
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
syncSelectedFiles(nextFiles);
|
|
2676
|
-
},
|
|
2677
|
-
[applyFilesToInput, onChange, resolvedMultiple, selectedFiles, syncSelectedFiles]
|
|
2678
|
-
);
|
|
2679
|
-
const openPicker = React13.useCallback(() => {
|
|
2773
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
2774
|
+
event.preventDefault();
|
|
2775
|
+
openPicker();
|
|
2776
|
+
}
|
|
2777
|
+
},
|
|
2778
|
+
[disabled, openPicker]
|
|
2779
|
+
);
|
|
2780
|
+
const handleDragEnter = React13.useCallback(
|
|
2781
|
+
(event) => {
|
|
2782
|
+
event.preventDefault();
|
|
2680
2783
|
if (!disabled) {
|
|
2681
|
-
|
|
2784
|
+
setIsDragActive(true);
|
|
2682
2785
|
}
|
|
2683
|
-
},
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
(
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
}
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
if (disabled) {
|
|
2733
|
-
return;
|
|
2734
|
-
}
|
|
2735
|
-
setIsDragActive(false);
|
|
2736
|
-
const droppedFiles = event.dataTransfer.files;
|
|
2737
|
-
if (!droppedFiles?.length) {
|
|
2738
|
-
return;
|
|
2739
|
-
}
|
|
2740
|
-
const nextFiles = mergeUploadFiles(
|
|
2741
|
-
selectedFiles,
|
|
2742
|
-
Array.from(droppedFiles),
|
|
2743
|
-
resolvedMultiple
|
|
2744
|
-
);
|
|
2745
|
-
let dispatchedChangeEvent = false;
|
|
2746
|
-
if (applyFilesToInput(nextFiles)) {
|
|
2747
|
-
inputRef.current?.dispatchEvent(new Event("change", { bubbles: true }));
|
|
2748
|
-
dispatchedChangeEvent = true;
|
|
2749
|
-
}
|
|
2750
|
-
if (!dispatchedChangeEvent) {
|
|
2751
|
-
syncSelectedFiles(nextFiles);
|
|
2752
|
-
}
|
|
2753
|
-
},
|
|
2754
|
-
[applyFilesToInput, disabled, resolvedMultiple, selectedFiles, syncSelectedFiles]
|
|
2755
|
-
);
|
|
2756
|
-
const handleRemoveFile = React13.useCallback(
|
|
2757
|
-
(fileIndex) => {
|
|
2758
|
-
if (disabled) {
|
|
2759
|
-
return;
|
|
2760
|
-
}
|
|
2761
|
-
const nextFiles = selectedFiles.filter((_, index) => index !== fileIndex);
|
|
2762
|
-
applyFilesToInput(nextFiles);
|
|
2786
|
+
},
|
|
2787
|
+
[disabled]
|
|
2788
|
+
);
|
|
2789
|
+
const handleDragLeave = React13.useCallback(
|
|
2790
|
+
(event) => {
|
|
2791
|
+
if (disabled) {
|
|
2792
|
+
return;
|
|
2793
|
+
}
|
|
2794
|
+
const relatedTarget = event.relatedTarget;
|
|
2795
|
+
if (relatedTarget instanceof Node && event.currentTarget.contains(relatedTarget)) {
|
|
2796
|
+
return;
|
|
2797
|
+
}
|
|
2798
|
+
setIsDragActive(false);
|
|
2799
|
+
},
|
|
2800
|
+
[disabled]
|
|
2801
|
+
);
|
|
2802
|
+
const handleDragOver = React13.useCallback(
|
|
2803
|
+
(event) => {
|
|
2804
|
+
event.preventDefault();
|
|
2805
|
+
if (disabled) {
|
|
2806
|
+
return;
|
|
2807
|
+
}
|
|
2808
|
+
event.dataTransfer.dropEffect = "copy";
|
|
2809
|
+
setIsDragActive(true);
|
|
2810
|
+
},
|
|
2811
|
+
[disabled]
|
|
2812
|
+
);
|
|
2813
|
+
const handleDrop = React13.useCallback(
|
|
2814
|
+
(event) => {
|
|
2815
|
+
event.preventDefault();
|
|
2816
|
+
if (disabled) {
|
|
2817
|
+
return;
|
|
2818
|
+
}
|
|
2819
|
+
setIsDragActive(false);
|
|
2820
|
+
const droppedFiles = event.dataTransfer.files;
|
|
2821
|
+
if (!droppedFiles?.length) {
|
|
2822
|
+
return;
|
|
2823
|
+
}
|
|
2824
|
+
const nextFiles = mergeUploadFiles(
|
|
2825
|
+
selectedFiles,
|
|
2826
|
+
Array.from(droppedFiles),
|
|
2827
|
+
resolvedMultiple
|
|
2828
|
+
);
|
|
2829
|
+
let dispatchedChangeEvent = false;
|
|
2830
|
+
if (applyFilesToInput(nextFiles)) {
|
|
2831
|
+
inputRef.current?.dispatchEvent(new Event("change", { bubbles: true }));
|
|
2832
|
+
dispatchedChangeEvent = true;
|
|
2833
|
+
}
|
|
2834
|
+
if (!dispatchedChangeEvent) {
|
|
2763
2835
|
syncSelectedFiles(nextFiles);
|
|
2764
|
-
}
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2836
|
+
}
|
|
2837
|
+
},
|
|
2838
|
+
[
|
|
2839
|
+
applyFilesToInput,
|
|
2840
|
+
disabled,
|
|
2841
|
+
resolvedMultiple,
|
|
2842
|
+
selectedFiles,
|
|
2843
|
+
syncSelectedFiles
|
|
2844
|
+
]
|
|
2845
|
+
);
|
|
2846
|
+
const handleRemoveFile = React13.useCallback(
|
|
2847
|
+
(fileIndex) => {
|
|
2848
|
+
if (disabled) {
|
|
2849
|
+
return;
|
|
2850
|
+
}
|
|
2851
|
+
const nextFiles = selectedFiles.filter((_, index) => index !== fileIndex);
|
|
2852
|
+
applyFilesToInput(nextFiles);
|
|
2853
|
+
syncSelectedFiles(nextFiles);
|
|
2854
|
+
},
|
|
2855
|
+
[applyFilesToInput, disabled, selectedFiles, syncSelectedFiles]
|
|
2856
|
+
);
|
|
2857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "grid w-full gap-4", children: [
|
|
2858
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2859
|
+
"input",
|
|
2860
|
+
{
|
|
2861
|
+
...uploadProps,
|
|
2862
|
+
accept: resolvedAccept,
|
|
2863
|
+
"aria-label": resolvedAriaLabel,
|
|
2864
|
+
className: "sr-only",
|
|
2865
|
+
disabled,
|
|
2866
|
+
id: resolvedId,
|
|
2867
|
+
multiple: resolvedMultiple,
|
|
2868
|
+
ref: inputRef,
|
|
2869
|
+
type: "file",
|
|
2870
|
+
onChange: handleInputChange
|
|
2871
|
+
}
|
|
2872
|
+
),
|
|
2873
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2874
|
+
"label",
|
|
2875
|
+
{
|
|
2876
|
+
"aria-disabled": disabled || void 0,
|
|
2877
|
+
className: cn(
|
|
2878
|
+
"flex w-full flex-col items-center justify-center gap-2 overflow-clip rounded-[20px] border-2 border-dashed border-[color:var(--sofya-border-soft)] bg-[color:var(--sofya-tone-default-background)] px-4 py-4 text-center transition-[border-color,background-color,box-shadow,color] duration-sofya ease-sofya",
|
|
2879
|
+
!disabled && "cursor-pointer hover:border-[color:var(--sofya-border-hover)] hover:bg-[color:var(--sofya-surface-hover)] focus-visible:border-transparent focus-visible:ring-2 focus-visible:ring-[color:var(--sofya-focus-ring-soft)] focus-within:border-transparent focus-within:ring-2 focus-within:ring-[color:var(--sofya-focus-ring-soft)] active:border-transparent active:ring-2 active:ring-[color:var(--sofya-focus-ring-soft)]",
|
|
2880
|
+
isDragActive && "border-[color:var(--sofya-border-hover)] bg-[color:var(--sofya-surface-selected)] shadow-[var(--sofya-shadow-dropzone-focus)]",
|
|
2881
|
+
disabled && "cursor-not-allowed opacity-60",
|
|
2882
|
+
className
|
|
2883
|
+
),
|
|
2884
|
+
htmlFor: resolvedId,
|
|
2885
|
+
role: "button",
|
|
2886
|
+
tabIndex: disabled ? -1 : 0,
|
|
2887
|
+
onDragEnter: handleDragEnter,
|
|
2888
|
+
onDragLeave: handleDragLeave,
|
|
2889
|
+
onDragOver: handleDragOver,
|
|
2890
|
+
onDrop: handleDrop,
|
|
2891
|
+
onKeyDown: handleKeyDown,
|
|
2892
|
+
children: [
|
|
2893
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "flex size-10 items-center justify-center rounded-[6px] p-2 text-[color:var(--sofya-text-default)]", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(UploadGlyph, { className: "size-[18px]" }) }),
|
|
2894
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-[color:var(--sofya-text-default)]", children: renderTextContent(resolvedTitle, {
|
|
2895
|
+
as: "span",
|
|
2896
|
+
className: "block text-[color:var(--sofya-text-default)]",
|
|
2897
|
+
size: "body",
|
|
2898
|
+
style: {
|
|
2899
|
+
fontWeight: 500,
|
|
2900
|
+
lineHeight: "normal",
|
|
2901
|
+
letterSpacing: "-0.02em"
|
|
2902
|
+
}
|
|
2903
|
+
}) }),
|
|
2904
|
+
resolvedDescription ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-[color:var(--sofya-text-subtle)]", children: renderTextContent(resolvedDescription, {
|
|
2905
|
+
as: "span",
|
|
2906
|
+
className: "block text-[color:var(--sofya-text-subtle)]",
|
|
2907
|
+
size: "tiny",
|
|
2908
|
+
style: {
|
|
2909
|
+
fontWeight: 500,
|
|
2910
|
+
lineHeight: "normal",
|
|
2911
|
+
letterSpacing: "-0.02em"
|
|
2912
|
+
}
|
|
2913
|
+
}) }) : null
|
|
2914
|
+
]
|
|
2915
|
+
}
|
|
2916
|
+
),
|
|
2917
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react2.motion.div, { layout: true, role: "list", className: "grid gap-4 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react2.AnimatePresence, { initial: false, children: selectedFiles.map((file, index) => {
|
|
2918
|
+
const fileKey = resolveUploadFileSignature(file);
|
|
2919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2920
|
+
import_react2.motion.div,
|
|
2785
2921
|
{
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
),
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
onDragOver: handleDragOver,
|
|
2800
|
-
onDrop: handleDrop,
|
|
2801
|
-
onKeyDown: handleKeyDown,
|
|
2802
|
-
children: [
|
|
2803
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "flex size-10 items-center justify-center rounded-[6px] p-2 text-black", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(UploadGlyph, { className: "size-[18px]" }) }),
|
|
2804
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-black", children: renderTextContent(resolvedTitle, {
|
|
2805
|
-
as: "span",
|
|
2806
|
-
className: "block text-black",
|
|
2807
|
-
size: "body",
|
|
2808
|
-
style: {
|
|
2809
|
-
fontWeight: 500,
|
|
2810
|
-
lineHeight: "normal",
|
|
2811
|
-
letterSpacing: "-0.02em"
|
|
2812
|
-
}
|
|
2813
|
-
}) }),
|
|
2814
|
-
resolvedDescription ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-[#8C99B7]", children: renderTextContent(resolvedDescription, {
|
|
2815
|
-
as: "span",
|
|
2816
|
-
className: "block text-[#8C99B7]",
|
|
2817
|
-
size: "tiny",
|
|
2818
|
-
style: {
|
|
2819
|
-
fontWeight: 500,
|
|
2820
|
-
lineHeight: "normal",
|
|
2821
|
-
letterSpacing: "-0.02em"
|
|
2922
|
+
layout: true,
|
|
2923
|
+
role: "listitem",
|
|
2924
|
+
className: "overflow-hidden",
|
|
2925
|
+
initial: prefersReducedMotion ? { opacity: 0 } : { opacity: 0, y: 10, scale: 0.98, height: 0 },
|
|
2926
|
+
animate: prefersReducedMotion ? { opacity: 1 } : { opacity: 1, y: 0, scale: 1, height: "auto" },
|
|
2927
|
+
exit: prefersReducedMotion ? { opacity: 0 } : { opacity: 0, scale: 0.98, height: 0 },
|
|
2928
|
+
transition: uploadListItemTransition,
|
|
2929
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Card, { variant: "panel", className: "flex items-center gap-4 p-4", children: [
|
|
2930
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "flex size-11 shrink-0 items-center justify-center rounded-full bg-[color:var(--sofya-surface-hover)] text-primary", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2931
|
+
UploadFileTypeGlyph,
|
|
2932
|
+
{
|
|
2933
|
+
className: "size-[18px]",
|
|
2934
|
+
kind: resolveUploadFileVisualKind(file, uploadKind)
|
|
2822
2935
|
}
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
role: "listitem",
|
|
2834
|
-
className: "overflow-hidden",
|
|
2835
|
-
initial: prefersReducedMotion ? { opacity: 0 } : { opacity: 0, y: 10, scale: 0.98, height: 0 },
|
|
2836
|
-
animate: prefersReducedMotion ? { opacity: 1 } : { opacity: 1, y: 0, scale: 1, height: "auto" },
|
|
2837
|
-
exit: prefersReducedMotion ? { opacity: 0 } : { opacity: 0, scale: 0.98, height: 0 },
|
|
2838
|
-
transition: uploadListItemTransition,
|
|
2839
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Card, { variant: "panel", className: "flex items-center gap-4 p-4", children: [
|
|
2840
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "flex size-11 shrink-0 items-center justify-center rounded-full bg-[#F4F7FF] text-[#6B86D6]", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2841
|
-
UploadFileTypeGlyph,
|
|
2842
|
-
{
|
|
2843
|
-
className: "size-[18px]",
|
|
2844
|
-
kind: resolveUploadFileVisualKind(file, uploadKind)
|
|
2936
|
+
) }),
|
|
2937
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
2938
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "truncate text-[color:var(--sofya-text-default)]", children: renderTextContent(file.name, {
|
|
2939
|
+
as: "span",
|
|
2940
|
+
className: "block truncate text-[color:var(--sofya-text-default)]",
|
|
2941
|
+
size: "body",
|
|
2942
|
+
style: {
|
|
2943
|
+
fontWeight: 500,
|
|
2944
|
+
lineHeight: "normal",
|
|
2945
|
+
letterSpacing: "-0.02em"
|
|
2845
2946
|
}
|
|
2846
|
-
) }),
|
|
2847
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.
|
|
2848
|
-
|
|
2947
|
+
}) }),
|
|
2948
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "mt-2 text-[color:var(--sofya-text-subtle)]", children: renderTextContent(
|
|
2949
|
+
`${resolveUploadFileBadge(
|
|
2950
|
+
file
|
|
2951
|
+
)} \xB7 ${formatUploadFileSize(file.size)}`,
|
|
2952
|
+
{
|
|
2849
2953
|
as: "span",
|
|
2850
|
-
className: "block
|
|
2851
|
-
size: "
|
|
2954
|
+
className: "block text-[color:var(--sofya-text-subtle)]",
|
|
2955
|
+
size: "tiny",
|
|
2852
2956
|
style: {
|
|
2853
2957
|
fontWeight: 500,
|
|
2854
2958
|
lineHeight: "normal",
|
|
2855
2959
|
letterSpacing: "-0.02em"
|
|
2856
2960
|
}
|
|
2857
|
-
}
|
|
2858
|
-
|
|
2859
|
-
|
|
2961
|
+
}
|
|
2962
|
+
) })
|
|
2963
|
+
] }),
|
|
2964
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2965
|
+
"button",
|
|
2966
|
+
{
|
|
2967
|
+
"aria-label": `Remover ${file.name}`,
|
|
2968
|
+
className: "inline-flex size-9 shrink-0 items-center justify-center rounded-full text-[color:var(--sofya-text-subtle)] transition-colors duration-sofya ease-sofya hover:bg-[color:var(--sofya-surface-hover)] hover:text-[color:var(--sofya-text-default)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--sofya-focus-ring-soft)]",
|
|
2969
|
+
disabled,
|
|
2970
|
+
type: "button",
|
|
2971
|
+
onClick: (event) => {
|
|
2972
|
+
event.preventDefault();
|
|
2973
|
+
event.stopPropagation();
|
|
2974
|
+
handleRemoveFile(index);
|
|
2975
|
+
},
|
|
2976
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2977
|
+
Icon,
|
|
2860
2978
|
{
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
fontWeight: 500,
|
|
2866
|
-
lineHeight: "normal",
|
|
2867
|
-
letterSpacing: "-0.02em"
|
|
2868
|
-
}
|
|
2979
|
+
"aria-hidden": "true",
|
|
2980
|
+
color: "current",
|
|
2981
|
+
name: "x",
|
|
2982
|
+
size: 14
|
|
2869
2983
|
}
|
|
2870
|
-
)
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
event.preventDefault();
|
|
2881
|
-
event.stopPropagation();
|
|
2882
|
-
handleRemoveFile(index);
|
|
2883
|
-
},
|
|
2884
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2885
|
-
Icon,
|
|
2886
|
-
{
|
|
2887
|
-
"aria-hidden": "true",
|
|
2888
|
-
color: "current",
|
|
2889
|
-
name: "x",
|
|
2890
|
-
size: 14
|
|
2891
|
-
}
|
|
2892
|
-
)
|
|
2893
|
-
}
|
|
2894
|
-
)
|
|
2895
|
-
] })
|
|
2896
|
-
},
|
|
2897
|
-
fileKey
|
|
2898
|
-
);
|
|
2899
|
-
}) }) })
|
|
2900
|
-
] });
|
|
2901
|
-
}
|
|
2902
|
-
);
|
|
2984
|
+
)
|
|
2985
|
+
}
|
|
2986
|
+
)
|
|
2987
|
+
] })
|
|
2988
|
+
},
|
|
2989
|
+
fileKey
|
|
2990
|
+
);
|
|
2991
|
+
}) }) })
|
|
2992
|
+
] });
|
|
2993
|
+
});
|
|
2903
2994
|
UploadInputControl.displayName = "UploadInputControl";
|
|
2904
2995
|
var Input = React13.forwardRef((props, ref) => {
|
|
2905
2996
|
const generatedId = React13.useId();
|
|
@@ -2952,14 +3043,17 @@ var Input = React13.forwardRef((props, ref) => {
|
|
|
2952
3043
|
`otp-leading-${index}`
|
|
2953
3044
|
)) }),
|
|
2954
3045
|
hasTrailingGroup ? otpSeparator ?? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(InputOTPSeparator, { className: otpSeparatorClassName }) : null,
|
|
2955
|
-
hasTrailingGroup ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(InputOTPGroup, { className: otpGroupClassName, children: Array.from(
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
3046
|
+
hasTrailingGroup ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(InputOTPGroup, { className: otpGroupClassName, children: Array.from(
|
|
3047
|
+
{ length: resolvedLength - resolvedSplitIndex },
|
|
3048
|
+
(_, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3049
|
+
InputOTPSlot,
|
|
3050
|
+
{
|
|
3051
|
+
className: otpSlotClassName,
|
|
3052
|
+
index: index + resolvedSplitIndex
|
|
3053
|
+
},
|
|
3054
|
+
`otp-trailing-${index}`
|
|
3055
|
+
)
|
|
3056
|
+
) }) : null
|
|
2963
3057
|
]
|
|
2964
3058
|
}
|
|
2965
3059
|
);
|
|
@@ -3014,12 +3108,12 @@ var Input = React13.forwardRef((props, ref) => {
|
|
|
3014
3108
|
const isSearch = variant === "search";
|
|
3015
3109
|
const resolvedType = type ?? (isSearch ? "search" : void 0);
|
|
3016
3110
|
const ariaLabel = nativeProps["aria-label"] ?? (typeof label === "string" ? label : isSearch ? "Search" : void 0);
|
|
3017
|
-
const nativeControl = isSearch ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex h-[88px] w-full items-center gap-6 rounded-full border border-[
|
|
3111
|
+
const nativeControl = isSearch ? /* @__PURE__ */ (0, import_jsx_runtime15.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: [
|
|
3018
3112
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3019
3113
|
Icon,
|
|
3020
3114
|
{
|
|
3021
3115
|
"aria-hidden": "true",
|
|
3022
|
-
className: "shrink-0 text-[
|
|
3116
|
+
className: "shrink-0 text-[color:var(--sofya-text-subtle)]",
|
|
3023
3117
|
name: "search",
|
|
3024
3118
|
size: 32
|
|
3025
3119
|
}
|
|
@@ -3031,7 +3125,7 @@ var Input = React13.forwardRef((props, ref) => {
|
|
|
3031
3125
|
ref,
|
|
3032
3126
|
type: resolvedType,
|
|
3033
3127
|
className: cn(
|
|
3034
|
-
"h-full w-full appearance-none border-0 bg-transparent p-0 text-[23px] font-semibold leading-none tracking-[-0.03em] text-[
|
|
3128
|
+
"h-full w-full appearance-none border-0 bg-transparent p-0 text-[23px] font-semibold leading-none tracking-[-0.03em] text-[color:var(--sofya-text-default)] shadow-none outline-none transition-colors duration-sofya ease-sofya placeholder:font-semibold placeholder:text-[color:var(--sofya-text-subtle)] placeholder:opacity-100 disabled:cursor-not-allowed disabled:opacity-50",
|
|
3035
3129
|
"[&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden",
|
|
3036
3130
|
className
|
|
3037
3131
|
),
|
|
@@ -3047,7 +3141,7 @@ var Input = React13.forwardRef((props, ref) => {
|
|
|
3047
3141
|
ref,
|
|
3048
3142
|
type: resolvedType,
|
|
3049
3143
|
className: cn(
|
|
3050
|
-
"flex h-10 w-full rounded-[10px] border border-[
|
|
3144
|
+
"flex h-10 w-full rounded-[10px] border border-[color:var(--sofya-border-strong)] bg-card px-4 py-2 text-[16px] font-normal leading-[22px] tracking-[-0.02em] 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",
|
|
3051
3145
|
className
|
|
3052
3146
|
),
|
|
3053
3147
|
...nativeProps,
|
|
@@ -3100,17 +3194,30 @@ Label.displayName = "Label";
|
|
|
3100
3194
|
// src/components/link.tsx
|
|
3101
3195
|
var React15 = __toESM(require("react"), 1);
|
|
3102
3196
|
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
3197
|
+
var import_class_variance_authority6 = require("class-variance-authority");
|
|
3103
3198
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3104
|
-
var
|
|
3199
|
+
var linkVariants = (0, import_class_variance_authority6.cva)(
|
|
3200
|
+
"inline bg-[linear-gradient(currentColor,currentColor)] bg-[position:0_100%] bg-no-repeat pb-0 text-primary no-underline transition-[color,background-size,box-shadow] duration-sofya ease-sofya hover:text-[color:var(--sofya-link-hover)] focus-visible:rounded-[4px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--sofya-focus-ring-soft)] focus-visible:ring-offset-0",
|
|
3201
|
+
{
|
|
3202
|
+
variants: {
|
|
3203
|
+
variant: {
|
|
3204
|
+
default: "bg-[length:0%_1.5px] hover:bg-[length:100%_1.5px]",
|
|
3205
|
+
underlined: "bg-[length:100%_1.5px] hover:bg-[length:100%_1.5px]"
|
|
3206
|
+
}
|
|
3207
|
+
},
|
|
3208
|
+
defaultVariants: {
|
|
3209
|
+
variant: "default"
|
|
3210
|
+
}
|
|
3211
|
+
}
|
|
3212
|
+
);
|
|
3213
|
+
var Link = React15.forwardRef(function Link2({ asChild = false, className, variant = "default", ...props }, ref) {
|
|
3105
3214
|
const Component = asChild ? import_react_slot3.Slot : "a";
|
|
3106
3215
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3107
3216
|
Component,
|
|
3108
3217
|
{
|
|
3109
3218
|
ref,
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
className
|
|
3113
|
-
),
|
|
3219
|
+
"data-link-variant": variant,
|
|
3220
|
+
className: cn(linkVariants({ variant }), className),
|
|
3114
3221
|
...props
|
|
3115
3222
|
}
|
|
3116
3223
|
);
|
|
@@ -3122,93 +3229,93 @@ var React16 = __toESM(require("react"), 1);
|
|
|
3122
3229
|
|
|
3123
3230
|
// src/components/logo-data.ts
|
|
3124
3231
|
var logoAssets = {
|
|
3125
|
-
|
|
3232
|
+
mono: {
|
|
3126
3233
|
width: 16,
|
|
3127
3234
|
height: 23,
|
|
3128
3235
|
viewBox: "0 0 16 23",
|
|
3129
3236
|
paths: [
|
|
3130
3237
|
{
|
|
3131
3238
|
d: "M8.07721 0.0486377C9.76297 -0.255788 11.3766 0.900674 11.6739 2.62676C11.9711 4.35326 10.8412 6.00592 9.15533 6.31036C7.49248 6.61085 6.28577 8.0157 6.12701 9.65801C7.52712 10.4447 9.32387 10.2329 10.5088 9.01934C11.7191 7.7799 13.6883 7.7799 14.8985 9.01934C15.596 9.73391 15.8888 10.7063 15.7823 11.6395C15.7775 11.6847 15.7694 11.7294 15.7628 11.7742C15.7546 11.8265 15.7461 11.8786 15.7354 11.9305C15.7226 11.9944 15.707 12.0573 15.6905 12.1199C15.6838 12.1446 15.6782 12.1696 15.671 12.1941C15.6698 12.198 15.6692 12.202 15.668 12.2059C15.6667 12.2102 15.6645 12.2143 15.6631 12.2186C15.3329 13.3273 14.4244 14.2138 13.2354 14.4285C11.2336 14.7902 9.89219 16.7523 10.2452 18.8025C10.5423 20.5287 9.41297 22.1807 7.7276 22.4852C6.04189 22.7896 4.42828 21.633 4.13092 19.907C3.83372 18.1808 4.96365 16.5289 6.64947 16.2244C8.31218 15.9242 9.51766 14.519 9.67682 12.8768C8.27658 12.0893 6.47907 12.3017 5.29401 13.5154C4.08377 14.7545 2.11445 14.7548 0.904357 13.5154C0.194345 12.7883 -0.0954398 11.7937 0.0274038 10.8455C0.028594 10.8357 0.0300316 10.826 0.0313101 10.8162C0.0427579 10.7337 0.0565126 10.6517 0.0742788 10.5701C0.0818187 10.5344 0.0909471 10.4991 0.0996694 10.4637C0.113772 10.408 0.128483 10.3526 0.145568 10.2977C0.165244 10.2329 0.187408 10.1693 0.210998 10.1063C0.219654 10.0836 0.227204 10.0604 0.236388 10.0379C0.62699 9.06106 1.48137 8.30278 2.5694 8.10625C4.57137 7.74472 5.91263 5.78194 5.55963 3.73125C5.26246 2.00522 6.39199 0.353249 8.07721 0.0486377Z",
|
|
3132
|
-
fill: "
|
|
3239
|
+
fill: "var(--sofya-logo-soft)",
|
|
3133
3240
|
fillRule: "evenodd",
|
|
3134
3241
|
clipRule: "evenodd"
|
|
3135
3242
|
}
|
|
3136
3243
|
]
|
|
3137
3244
|
},
|
|
3138
|
-
|
|
3245
|
+
default: {
|
|
3139
3246
|
width: 73,
|
|
3140
3247
|
height: 87,
|
|
3141
3248
|
viewBox: "0 0 73 87",
|
|
3142
3249
|
paths: [
|
|
3143
3250
|
{
|
|
3144
3251
|
d: "M20.0784 54.8299C18.5629 55.0977 17.0094 55.0642 15.5068 54.7316C14.0041 54.399 12.5817 53.7736 11.3208 52.8913C10.0598 52.0089 8.98496 50.8869 8.15764 49.5891C7.33032 48.2914 6.76671 46.8434 6.49899 45.3278C6.23127 43.8123 6.26468 42.2588 6.59731 40.7562C6.92994 39.2536 7.55529 37.8312 8.43764 36.5702C9.31999 35.3092 10.4421 34.2344 11.7398 33.4071C13.0375 32.5798 14.4855 32.0161 16.0011 31.7484C19.635 31.1022 22.8643 29.0408 24.9802 26.0165C27.0961 22.9922 27.9258 19.252 27.2874 15.6166C26.8846 13.334 27.1677 10.9831 28.1009 8.86134C29.0341 6.73956 30.5755 4.94215 32.5303 3.6964C34.485 2.45065 36.7652 1.81251 39.0826 1.86267C41.4 1.91283 43.6505 2.64904 45.5495 3.97821C47.4485 5.30737 48.9107 7.1698 49.7512 9.32997C50.5918 11.4902 50.7729 13.8511 50.2716 16.1142C49.7704 18.3773 48.6094 20.4409 46.9353 22.0442C45.2613 23.6474 43.1494 24.7183 40.8668 25.1213C37.2334 25.7674 34.0047 27.8284 31.8889 30.852C29.7731 33.8757 28.9431 37.6151 29.5809 41.2499C30.118 44.3104 29.4192 47.459 27.6378 50.0049C25.8563 52.5508 23.1377 54.286 20.0784 54.8299Z",
|
|
3145
|
-
fill: "
|
|
3252
|
+
fill: "var(--sofya-logo-primary)"
|
|
3146
3253
|
},
|
|
3147
3254
|
{
|
|
3148
3255
|
d: "M9.71176 51.685C8.62379 50.597 7.76075 49.3054 7.17195 47.8839C6.58314 46.4624 6.28008 44.9388 6.28008 43.4002C6.28008 41.8616 6.58314 40.338 7.17195 38.9165C7.76076 37.495 8.62379 36.2034 9.71176 35.1154C10.7997 34.0274 12.0914 33.1644 13.5129 32.5756C14.9344 31.9868 16.4579 31.6837 17.9966 31.6837C19.5352 31.6837 21.0588 31.9868 22.4803 32.5756C23.9018 33.1644 25.1934 34.0274 26.2814 35.1154C28.8937 37.7213 32.4331 39.1847 36.123 39.1843C39.8129 39.1839 43.3519 37.7198 45.9637 35.1133C47.6026 33.4749 49.6905 32.3594 51.9634 31.9076C54.2363 31.4559 56.5922 31.6883 58.733 32.5754C60.8738 33.4626 62.7035 34.9646 63.9907 36.8916C65.2779 38.8186 65.9648 41.084 65.9645 43.4013C65.9642 45.7187 65.2767 47.9839 63.989 49.9106C62.7014 51.8373 60.8713 53.3388 58.7302 54.2254C56.5892 55.112 54.2333 55.3438 51.9605 54.8915C49.6877 54.4392 47.6001 53.3231 45.9616 51.6843C43.3498 49.0785 39.8109 47.615 36.1215 47.615C32.432 47.615 28.8932 49.0785 26.2814 51.6843C24.0825 53.8784 21.103 55.1106 17.9967 55.1108C14.8904 55.1109 11.9109 53.8789 9.71176 51.685Z",
|
|
3149
|
-
fill: "
|
|
3256
|
+
fill: "var(--sofya-logo-highlight)"
|
|
3150
3257
|
},
|
|
3151
3258
|
{
|
|
3152
3259
|
d: "M35.4804 84.7533C33.9649 85.021 32.4114 84.9876 30.9088 84.6549C29.4061 84.3223 27.9837 83.697 26.7228 82.8146C25.4618 81.9323 24.387 80.8102 23.5596 79.5125C22.7323 78.2147 22.1687 76.7667 21.901 75.2512C21.6333 73.7356 21.6667 72.1822 21.9993 70.6795C22.3319 69.1769 22.9573 67.7545 23.8396 66.4935C24.722 65.2326 25.8441 64.1577 27.1418 63.3304C28.4395 62.5031 29.8875 61.9395 31.4031 61.6718C35.037 61.0255 38.2663 58.9641 40.3822 55.9398C42.4981 52.9155 43.3278 49.1753 42.6894 45.54C42.2866 43.2573 42.5697 40.9065 43.5029 38.7847C44.4361 36.6629 45.9775 34.8655 47.9323 33.6197C49.887 32.374 52.1672 31.7358 54.4846 31.786C56.802 31.8362 59.0525 32.5724 60.9515 33.9015C62.8505 35.2307 64.3127 37.0931 65.1532 39.2533C65.9938 41.4135 66.1749 43.7744 65.6737 46.0375C65.1724 48.3006 64.0114 50.3643 62.3373 51.9675C60.6633 53.5707 58.5514 54.6416 56.2688 55.0446C52.6354 55.6908 49.4067 57.7517 47.2909 60.7754C45.1751 63.799 44.3451 67.5384 44.9829 71.1733C45.52 74.2338 44.8212 77.3823 43.0398 79.9282C41.2583 82.4741 38.5397 84.2093 35.4804 84.7533Z",
|
|
3153
|
-
fill: "
|
|
3260
|
+
fill: "var(--sofya-logo-accent)"
|
|
3154
3261
|
}
|
|
3155
3262
|
]
|
|
3156
3263
|
},
|
|
3157
|
-
|
|
3264
|
+
text: {
|
|
3158
3265
|
width: 143,
|
|
3159
3266
|
height: 47,
|
|
3160
3267
|
viewBox: "0 0 143 47",
|
|
3161
3268
|
paths: [
|
|
3162
3269
|
{
|
|
3163
3270
|
d: "M15.093 36.7303C10.101 36.7303 6.33667 35.6353 3.80001 33.4453C1.26334 31.2553 -0.00332677 28.1886 6.56168e-06 24.2453H7.47001C7.39794 25.1747 7.55775 26.1075 7.9351 26.9599C8.31244 27.8124 8.89552 28.5578 9.63201 29.1293C11.3436 30.2547 13.3692 30.8053 15.415 30.7013C17.1692 30.8096 18.9188 30.4262 20.467 29.5943C21.0345 29.2318 21.4945 28.7238 21.7991 28.1232C22.1037 27.5226 22.2418 26.8514 22.199 26.1793C22.2397 25.276 21.9532 24.3883 21.392 23.6793C20.7394 22.9613 19.9224 22.4123 19.011 22.0793C17.5132 21.5107 15.9808 21.0378 14.423 20.6633C14.0897 20.5913 13.6943 20.4966 13.237 20.3793C10.9588 19.8608 8.73206 19.1375 6.58401 18.2183C5.01143 17.5343 3.65165 16.4401 2.64701 15.0503C1.6259 13.4711 1.12512 11.6117 1.21501 9.73329C1.13943 8.30544 1.44001 6.88276 2.08668 5.6075C2.73335 4.33223 3.70345 3.24906 4.90001 2.46629C7.35534 0.828956 10.5937 0.0102922 14.615 0.0102922C17.2654 -0.0769963 19.9047 0.39173 22.363 1.38629C24.2275 2.14967 25.8078 3.47511 26.884 5.17829C27.8735 6.86944 28.3761 8.80132 28.336 10.7603H21.056C21.0796 10.0753 20.9329 9.39523 20.6291 8.78091C20.3252 8.16659 19.8737 7.63724 19.315 7.24029C17.8412 6.29435 16.1039 5.84347 14.356 5.95329C12.9203 5.88122 11.4902 6.17834 10.202 6.81629C9.70718 7.09854 9.30244 7.51519 9.03467 8.018C8.76689 8.5208 8.64705 9.08918 8.68901 9.65729C8.6508 10.4918 8.92256 11.311 9.45201 11.9573C10.0677 12.6165 10.8364 13.1138 11.69 13.4053C13.0793 13.9054 14.4951 14.3284 15.931 14.6723H16.011C16.2374 14.7071 16.461 14.7582 16.68 14.8253C19.1301 15.388 21.5363 16.127 23.88 17.0363C25.5247 17.682 26.9723 18.7457 28.08 20.1223C29.1995 21.687 29.7535 23.586 29.651 25.5073C29.7141 27.077 29.4043 28.6393 28.7471 30.0662C28.0899 31.4931 27.1039 32.744 25.87 33.7163C23.35 35.7256 19.7577 36.7303 15.093 36.7303ZM46.693 36.6633C44.0926 36.7407 41.5152 36.1557 39.203 34.9633C37.2011 33.8919 35.5677 32.2431 34.515 30.2313C33.4165 28.0642 32.8671 25.6604 32.915 23.2313C32.8688 20.8266 33.4184 18.4479 34.515 16.3073C35.5697 14.307 37.2008 12.6696 39.197 11.6073C41.5117 10.4231 44.0882 9.84318 46.687 9.92129C49.294 9.84535 51.8783 10.4251 54.203 11.6073C56.2102 12.6636 57.8512 14.3019 58.911 16.3073C60.0076 18.4479 60.5573 20.8266 60.511 23.2313C60.5589 25.6604 60.0095 28.0642 58.911 30.2313C57.8559 32.2482 56.2154 33.8988 54.205 34.9663C51.8825 36.1556 49.2972 36.7393 46.689 36.6633H46.693ZM46.671 30.7963C47.5924 30.8531 48.515 30.7061 49.3732 30.3657C50.2313 30.0254 51.0039 29.5001 51.636 28.8273C52.8904 27.2408 53.5119 25.2455 53.38 23.2273C53.4174 21.8449 53.1473 20.4715 52.589 19.2063C52.1029 18.1379 51.2999 17.2448 50.289 16.6483C49.1838 16.0323 47.9327 15.7265 46.668 15.7633C45.7575 15.706 44.8457 15.8516 43.9984 16.1895C43.151 16.5274 42.3892 17.0492 41.768 17.7173C40.5429 19.2827 39.9354 21.2435 40.061 23.2273C40.0213 24.6352 40.2824 26.0354 40.827 27.3343C41.2902 28.4048 42.0761 29.304 43.075 29.9063C44.1688 30.5248 45.4109 30.8325 46.667 30.7963H46.671ZM68.511 29.9963V11.3733C68.4266 9.21075 68.7934 7.05433 69.588 5.04129C70.2229 3.53621 71.3779 2.3096 72.842 1.58529C74.5953 0.813695 76.5007 0.449569 78.415 0.52029H82.567V6.15129H79.501C78.6675 6.10729 77.8362 6.27265 77.083 6.63229C76.5183 6.94591 76.0905 7.45853 75.883 8.07029C75.6274 8.88943 75.5111 9.74566 75.539 10.6033V36.2203H68.507L68.511 29.9963ZM62.901 11.4583H82.964V17.5713H62.897L62.901 11.4583ZM91.215 40.8793H96.525C98.4213 41.0066 100.296 40.4122 101.772 39.2153C102.991 38.106 103.601 36.2376 103.601 33.6103V29.9923L104.395 31.0123C103.666 32.4581 102.529 33.6586 101.125 34.4653C99.6198 35.2812 97.9266 35.6874 96.215 35.6433C92.9257 35.6433 90.5313 34.6716 89.032 32.7283C87.5327 30.785 86.7833 27.8776 86.784 24.0063V10.3653H93.815V23.3773C93.6797 25.087 94.09 26.7955 94.987 28.2573C95.4182 28.7856 95.9708 29.2017 96.5977 29.4702C97.2246 29.7388 97.9071 29.8516 98.587 29.7993C99.3047 29.8602 100.026 29.7459 100.69 29.4663C101.354 29.1868 101.94 28.7503 102.398 28.1943C103.302 26.7418 103.723 25.0398 103.598 23.3333V10.3653H110.607V31.6123C110.754 34.6867 110.121 37.7483 108.767 40.5123C107.693 42.562 105.953 44.1845 103.833 45.1123C101.501 46.0357 99.008 46.4805 96.501 46.4203H91.215V40.8793ZM126.663 36.6633C124.47 36.7225 122.307 36.1415 120.438 34.9913C118.678 33.8538 117.302 32.2125 116.489 30.2813C115.556 28.0499 115.101 25.6482 115.151 23.2303C115.103 20.8443 115.559 18.4752 116.489 16.2773C117.308 14.3564 118.683 12.7248 120.438 11.5933C122.307 10.4431 124.47 9.86205 126.663 9.92129C128.689 9.86752 130.688 10.3935 132.425 11.4373C134.097 12.5171 135.393 14.0894 136.134 15.9373C137.053 18.2552 137.491 20.7358 137.422 23.2283C137.422 23.9576 137.398 24.6396 137.349 25.2743C137.243 27.4422 136.68 29.5631 135.697 31.4983C134.865 33.1031 133.596 34.4392 132.035 35.3513C130.392 36.2557 128.538 36.7084 126.663 36.6633ZM128.604 30.8203C129.486 30.8692 130.368 30.7162 131.183 30.3731C131.997 30.0301 132.723 29.5058 133.304 28.8403C134.513 27.2303 135.106 25.2414 134.978 23.2323C135.103 21.2538 134.508 19.2969 133.304 17.7223C132.718 17.0636 131.992 16.5457 131.178 16.2073C130.364 15.869 129.484 15.7189 128.604 15.7683C127.73 15.7199 126.856 15.8706 126.049 16.2091C125.242 16.5476 124.522 17.065 123.944 17.7223C122.749 19.301 122.16 21.2562 122.285 23.2323C122.247 24.6418 122.499 26.0441 123.028 27.3513C123.466 28.4146 124.222 29.3167 125.192 29.9343C126.222 30.5473 127.406 30.8545 128.604 30.8203ZM134.974 30.4563V15.9963L135.968 10.3673H142.005V30.6323L142.771 36.2203H136.147L134.974 30.4563Z",
|
|
3164
|
-
fill: "
|
|
3271
|
+
fill: "var(--sofya-logo-ink)"
|
|
3165
3272
|
}
|
|
3166
3273
|
]
|
|
3167
3274
|
},
|
|
3168
|
-
|
|
3275
|
+
full: {
|
|
3169
3276
|
width: 902,
|
|
3170
3277
|
height: 333,
|
|
3171
3278
|
viewBox: "0 0 902 333",
|
|
3172
3279
|
paths: [
|
|
3173
3280
|
{
|
|
3174
3281
|
d: "M126.1,325.2c-24.4,4.3-47.8-12.1-52.1-36.5-4.3-24.4,12.1-47.8,36.5-52.1,29-5.1,48.4-32.9,43.3-61.9-4.3-24.4,12.1-47.8,36.5-52.1,24.4-4.3,47.8,12.1,52.1,36.5,4.3,24.4-12.1,47.8-36.5,52.1-29,5.1-48.4,32.9-43.3,61.9,4.3,24.4-12.1,47.8-36.5,52.1",
|
|
3175
|
-
fill: "
|
|
3282
|
+
fill: "var(--sofya-logo-accent)"
|
|
3176
3283
|
},
|
|
3177
3284
|
{
|
|
3178
3285
|
d: "M27.3,198.3c-17.5-17.5-17.5-46.1,0-63.6,17.5-17.5,46.1-17.5,63.6,0,20.8,20.8,54.7,20.8,75.5,0,17.5-17.5,46.1-17.5,63.6,0,17.5,17.5,17.5,46.1,0,63.6-17.5,17.5-46.1,17.5-63.6,0-20.8-20.8-54.7-20.8-75.5,0-17.5,17.5-46.1,17.5-63.6,0",
|
|
3179
|
-
fill: "
|
|
3286
|
+
fill: "var(--sofya-logo-highlight)"
|
|
3180
3287
|
},
|
|
3181
3288
|
{
|
|
3182
3289
|
d: "M67,210.3c-24.4,4.3-47.8-12.1-52.1-36.5-4.3-24.4,12.1-47.8,36.5-52.1,29-5.1,48.4-32.9,43.3-61.9-4.3-24.4,12.1-47.8,36.5-52.1,24.4-4.3,47.8,12.1,52.1,36.5,4.3,24.4-12.1,47.8-36.5,52.1-29,5.1-48.4,32.9-43.3,61.9,4.3,24.4-12.1,47.8-36.5,52.1",
|
|
3183
|
-
fill: "
|
|
3290
|
+
fill: "var(--sofya-logo-primary)"
|
|
3184
3291
|
},
|
|
3185
3292
|
{
|
|
3186
3293
|
d: "M14.9,173.9c-1.1-6-.9-11.9.4-17.5,1.8-8,5.8-15.5,12-21.7,17.5-17.5,46.1-17.5,63.6,0,3.7,3.7,7.7,6.7,12,9-.5,4.7-.3,9.6.6,14.5,4.3,24.4-12.1,47.8-36.5,52.1-2.6.5-5.2.7-7.8.7-21.4,0-40.4-15.4-44.3-37.2Z",
|
|
3187
|
-
fill: "
|
|
3294
|
+
fill: "var(--sofya-logo-primary)"
|
|
3188
3295
|
},
|
|
3189
3296
|
{
|
|
3190
3297
|
d: "M166.4,198.3c-3.7-3.7-7.7-6.7-12-9,.5-4.7.3-9.6-.6-14.5-4.3-24.4,12.1-47.8,36.5-52.1,24.4-4.3,47.8,12.1,52.1,36.5,1,5.8.9,11.6-.3,17-1.8,8.1-5.8,15.8-12.1,22.1-8.8,8.8-20.3,13.2-31.8,13.2s-23-4.4-31.8-13.2Z",
|
|
3191
|
-
fill: "
|
|
3298
|
+
fill: "var(--sofya-logo-primary)"
|
|
3192
3299
|
},
|
|
3193
3300
|
{
|
|
3194
3301
|
d: "M422.5,151.7c-6.9-2.9-16.4-5.8-28.4-8.7-.8-.3-1.7-.5-2.6-.6h-.4c-7.2-1.7-12.8-3.4-16.7-4.9-3.9-1.5-6.8-3.4-8.8-5.7-2-2.3-3-5.3-3-9s2-8.9,6-11.1c4-2.2,9.5-3.3,16.5-3.3s14.9,1.7,19.5,5c4.5,3.3,6.8,8,6.8,13.9h28.7c0-8.3-1.9-15.6-5.7-22-3.8-6.4-9.8-11.3-17.9-15-8.1-3.6-18.2-5.4-30.4-5.4s-28.7,3.2-38.3,9.6c-9.6,6.4-14.5,16-14.5,28.7s1.9,15.5,5.6,20.9c3.7,5.4,8.9,9.5,15.5,12.4,6.6,2.9,15.3,5.8,26.3,8.4,1.7.5,3.3.9,4.6,1.2,7.9,2,13.9,3.8,18.1,5.5,4.1,1.7,7.3,3.8,9.3,6.3,2.1,2.5,3.1,5.8,3.1,9.8,0,6-2.3,10.5-6.8,13.5-4.6,2.9-11.2,4.4-19.9,4.4s-17.1-2.1-22.7-6.2c-5.6-4.1-8.4-10.6-8.4-19.3h-29.5c0,15.5,5,27.6,15,36.2,10,8.6,24.8,12.9,44.5,12.9s32.5-3.9,42.4-11.8c9.9-7.9,14.9-18.7,14.9-32.3s-2-16.1-6.1-21.3c-4.1-5.2-9.6-9.3-16.5-12.1Z",
|
|
3195
|
-
fill: "
|
|
3302
|
+
fill: "var(--sofya-logo-ink)"
|
|
3196
3303
|
},
|
|
3197
3304
|
{
|
|
3198
3305
|
d: "M541.9,130.3c-8.2-4.4-18-6.6-29.5-6.6s-21.5,2.2-29.6,6.6c-8.1,4.4-14.2,10.6-18.4,18.6-4.2,8-6.2,17-6.2,27.2s2.1,19.6,6.2,27.6c4.1,8,10.3,14.2,18.4,18.7,8.1,4.5,18,6.7,29.6,6.7s21.3-2.2,29.5-6.7c8.2-4.5,14.4-10.7,18.6-18.7,4.2-8,6.3-17.2,6.3-27.6s-2.1-19.2-6.3-27.2c-4.2-8-10.4-14.2-18.6-18.6ZM531.8,198.1c-4.6,5.2-11.1,7.8-19.7,7.8s-10.2-1.2-14.1-3.5c-3.9-2.3-6.8-5.7-8.8-10.1-2-4.4-3-9.8-3-16.3,0-9.2,2.2-16.4,6.7-21.6,4.5-5.2,10.9-7.7,19.2-7.7s10.4,1.2,14.4,3.5c3.9,2.3,7,5.7,9,10,2.1,4.4,3.1,9.6,3.1,15.8,0,9.5-2.3,16.9-6.8,22.1Z",
|
|
3199
|
-
fill: "
|
|
3306
|
+
fill: "var(--sofya-logo-ink)"
|
|
3200
3307
|
},
|
|
3201
3308
|
{
|
|
3202
3309
|
d: "M625.8,126.5c0-4.1.5-7.5,1.4-10,.9-2.5,2.5-4.4,4.8-5.7,2.3-1.3,5.4-1.9,9.4-1.9h12v-22.1h-16.3c-9,0-16.3,1.4-22,4.2-5.7,2.8-9.9,7.4-12.7,13.7-2.8,6.3-4.2,14.6-4.2,24.9v.2h-22.1v24.1h22.1v73.5h27.5v-73.5h29.3v-24.1h-29.3v-3.2Z",
|
|
3203
|
-
fill: "
|
|
3310
|
+
fill: "var(--sofya-logo-ink)"
|
|
3204
3311
|
},
|
|
3205
3312
|
{
|
|
3206
3313
|
d: "M736.2,176.5c0,8.6-1.6,15-4.7,19.2-3.1,4.2-8.1,6.3-15,6.3s-11.1-2-14.2-6c-3-4-4.5-10.4-4.5-19.3v-51.2h-27.7v53.8c0,15.1,2.9,26.5,8.8,34.2,5.9,7.7,15.3,11.5,28.3,11.5s13.8-1.5,19.2-4.6c3.8-2.2,7-5,9.7-8.6v5.2c0,10.3-2.4,17.6-7.1,22-4.8,4.3-11.6,6.5-20.6,6.5h-21.1v21.9h20.9c11.1,0,20.7-1.7,28.9-5.1,8.2-3.4,14.7-9.4,19.5-18.1s7.2-20.3,7.2-35v-83.7h-27.7v51Z",
|
|
3207
|
-
fill: "
|
|
3314
|
+
fill: "var(--sofya-logo-ink)"
|
|
3208
3315
|
},
|
|
3209
3316
|
{
|
|
3210
3317
|
d: "M890.4,227.2l-3-22.1v-79.7h-23.7l-2.7,15.6c-3-4.7-6.8-8.6-11.3-11.4-6.4-4-13.9-6-22.6-6s-17.7,2.2-24.6,6.6c-6.9,4.4-12.1,10.6-15.6,18.5-3.5,7.9-5.2,17-5.2,27.3s1.7,19.8,5.2,27.8c3.5,8,8.7,14.2,15.6,18.6,6.9,4.4,15.1,6.6,24.6,6.6s15.1-1.7,21.1-5.2c5.2-3,9.6-7.3,13-12.7l3.3,16.1h25.9ZM853.2,198.1c-4.4,5.2-10.6,7.8-18.5,7.8s-9.7-1.2-13.5-3.5c-3.7-2.3-6.6-5.7-8.5-10.1-1.9-4.4-2.9-9.8-2.9-16.3,0-9.2,2.2-16.4,6.5-21.6,4.3-5.2,10.5-7.7,18.4-7.7s14.1,2.6,18.5,7.7c4.4,5.2,6.6,12.3,6.6,21.6s-2.2,16.9-6.6,22.1Z",
|
|
3211
|
-
fill: "
|
|
3318
|
+
fill: "var(--sofya-logo-ink)"
|
|
3212
3319
|
}
|
|
3213
3320
|
]
|
|
3214
3321
|
}
|
|
@@ -3299,15 +3406,15 @@ Logo.displayName = "Logo";
|
|
|
3299
3406
|
|
|
3300
3407
|
// src/components/pagination.tsx
|
|
3301
3408
|
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
3302
|
-
var
|
|
3409
|
+
var import_class_variance_authority7 = require("class-variance-authority");
|
|
3303
3410
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3304
|
-
var paginationLinkVariants = (0,
|
|
3305
|
-
"inline-flex h-10 min-w-10 items-center justify-center rounded-full border border-transparent px-4 text-[14px] font-medium leading-none tracking-[0.01em] text-[
|
|
3411
|
+
var paginationLinkVariants = (0, import_class_variance_authority7.cva)(
|
|
3412
|
+
"inline-flex h-10 min-w-10 items-center justify-center rounded-full border border-transparent px-4 text-[14px] font-medium leading-none tracking-[0.01em] text-[color:var(--sofya-text-soft)] no-underline transition-[transform,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-[color:var(--sofya-focus-ring-soft)] focus-visible:ring-offset-0",
|
|
3306
3413
|
{
|
|
3307
3414
|
variants: {
|
|
3308
3415
|
isActive: {
|
|
3309
|
-
true: "border-[
|
|
3310
|
-
false: "hover:border-[
|
|
3416
|
+
true: "border-[color:var(--sofya-border-strong)] bg-card text-primary shadow-sofya-sm",
|
|
3417
|
+
false: "hover:border-[color:var(--sofya-border-soft)] hover:bg-card hover:text-primary"
|
|
3311
3418
|
},
|
|
3312
3419
|
size: {
|
|
3313
3420
|
default: "px-4",
|
|
@@ -3320,10 +3427,7 @@ var paginationLinkVariants = (0, import_class_variance_authority6.cva)(
|
|
|
3320
3427
|
}
|
|
3321
3428
|
}
|
|
3322
3429
|
);
|
|
3323
|
-
function Pagination({
|
|
3324
|
-
className,
|
|
3325
|
-
...props
|
|
3326
|
-
}) {
|
|
3430
|
+
function Pagination({ className, ...props }) {
|
|
3327
3431
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3328
3432
|
"nav",
|
|
3329
3433
|
{
|
|
@@ -3340,15 +3444,15 @@ function PaginationContent({
|
|
|
3340
3444
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3341
3445
|
"ul",
|
|
3342
3446
|
{
|
|
3343
|
-
className: cn(
|
|
3447
|
+
className: cn(
|
|
3448
|
+
"flex flex-wrap items-center justify-center gap-2",
|
|
3449
|
+
className
|
|
3450
|
+
),
|
|
3344
3451
|
...props
|
|
3345
3452
|
}
|
|
3346
3453
|
);
|
|
3347
3454
|
}
|
|
3348
|
-
function PaginationItem({
|
|
3349
|
-
className,
|
|
3350
|
-
...props
|
|
3351
|
-
}) {
|
|
3455
|
+
function PaginationItem({ className, ...props }) {
|
|
3352
3456
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("li", { className: cn("list-none", className), ...props });
|
|
3353
3457
|
}
|
|
3354
3458
|
function PaginationLink({
|
|
@@ -3475,7 +3579,7 @@ function PaginationEllipsis({
|
|
|
3475
3579
|
{
|
|
3476
3580
|
"aria-hidden": "true",
|
|
3477
3581
|
className: cn(
|
|
3478
|
-
"flex h-10 w-10 items-center justify-center rounded-full text-[18px] leading-none text-[
|
|
3582
|
+
"flex h-10 w-10 items-center justify-center rounded-full text-[18px] leading-none text-[color:var(--sofya-text-subtle)]",
|
|
3479
3583
|
className
|
|
3480
3584
|
),
|
|
3481
3585
|
...props,
|
|
@@ -3505,7 +3609,13 @@ var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
|
3505
3609
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
3506
3610
|
var PopoverPortal = PopoverPrimitive.Portal;
|
|
3507
3611
|
var PopoverClose = PopoverPrimitive.Close;
|
|
3508
|
-
var PopoverContent = React17.forwardRef(function PopoverContent2({
|
|
3612
|
+
var PopoverContent = React17.forwardRef(function PopoverContent2({
|
|
3613
|
+
align = "center",
|
|
3614
|
+
className,
|
|
3615
|
+
collisionPadding = 8,
|
|
3616
|
+
sideOffset = 8,
|
|
3617
|
+
...props
|
|
3618
|
+
}, ref) {
|
|
3509
3619
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3510
3620
|
PopoverPrimitive.Content,
|
|
3511
3621
|
{
|
|
@@ -3515,7 +3625,7 @@ var PopoverContent = React17.forwardRef(function PopoverContent2({ align = "cent
|
|
|
3515
3625
|
sideOffset,
|
|
3516
3626
|
"data-slot": "popover-content",
|
|
3517
3627
|
className: cn(
|
|
3518
|
-
"sofya-dropdown-content z-50 w-72 max-w-[min(24rem,calc(100vw-1rem))] rounded-[14px] border border-[
|
|
3628
|
+
"sofya-dropdown-content z-50 w-72 max-w-[min(24rem,calc(100vw-1rem))] rounded-[14px] border border-[color:var(--sofya-border-strong)] bg-[hsl(var(--sofya-popover))] p-4 text-[hsl(var(--sofya-popover-foreground))] shadow-[var(--sofya-shadow-soft)] outline-none",
|
|
3519
3629
|
className
|
|
3520
3630
|
),
|
|
3521
3631
|
...props
|
|
@@ -3577,7 +3687,14 @@ function clampProgressValue(value, max) {
|
|
|
3577
3687
|
}
|
|
3578
3688
|
return Math.min(Math.max(value, 0), max);
|
|
3579
3689
|
}
|
|
3580
|
-
var Progress = React18.forwardRef(function Progress2({
|
|
3690
|
+
var Progress = React18.forwardRef(function Progress2({
|
|
3691
|
+
className,
|
|
3692
|
+
indicatorClassName,
|
|
3693
|
+
max = 100,
|
|
3694
|
+
size = "default",
|
|
3695
|
+
value,
|
|
3696
|
+
...props
|
|
3697
|
+
}, ref) {
|
|
3581
3698
|
const safeMax = max > 0 ? max : 100;
|
|
3582
3699
|
const resolvedValue = typeof value === "number" ? clampProgressValue(value, safeMax) : null;
|
|
3583
3700
|
const progressScale = resolvedValue === null ? void 0 : Number((resolvedValue / safeMax).toFixed(4));
|
|
@@ -3590,7 +3707,7 @@ var Progress = React18.forwardRef(function Progress2({ className, indicatorClass
|
|
|
3590
3707
|
max: safeMax,
|
|
3591
3708
|
value: resolvedValue,
|
|
3592
3709
|
className: cn(
|
|
3593
|
-
"relative h-2 w-full overflow-hidden rounded-full bg-[
|
|
3710
|
+
"relative h-2 w-full overflow-hidden rounded-full bg-[color:var(--sofya-tone-default-background)] data-[size=sm]:h-1.5 data-[size=default]:h-2 data-[size=lg]:h-3",
|
|
3594
3711
|
className
|
|
3595
3712
|
),
|
|
3596
3713
|
...props,
|
|
@@ -3599,7 +3716,7 @@ var Progress = React18.forwardRef(function Progress2({ className, indicatorClass
|
|
|
3599
3716
|
{
|
|
3600
3717
|
"data-slot": "progress-indicator",
|
|
3601
3718
|
className: cn(
|
|
3602
|
-
"h-full w-full origin-left rounded-full bg-[
|
|
3719
|
+
"h-full w-full origin-left rounded-full bg-[image:var(--sofya-gradient-brand)] transition-[transform,opacity] duration-sofya ease-sofya data-[state=indeterminate]:w-1/2 data-[state=indeterminate]:animate-pulse",
|
|
3603
3720
|
indicatorClassName
|
|
3604
3721
|
),
|
|
3605
3722
|
style: progressScale === void 0 ? void 0 : { transform: `scaleX(${progressScale})` }
|
|
@@ -3667,7 +3784,7 @@ var RadioGroupItem = React19.forwardRef(function RadioGroupItem2({
|
|
|
3667
3784
|
"aria-describedby": descriptionId,
|
|
3668
3785
|
"data-slot": "radio-group-item",
|
|
3669
3786
|
className: cn(
|
|
3670
|
-
"peer mt-0 inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full border border-[
|
|
3787
|
+
"peer mt-0 inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full border border-[color:var(--sofya-border-strong)] bg-card text-primary-foreground outline-none transition-[background-color,border-color,box-shadow] duration-sofya ease-sofya focus-visible:ring-2 focus-visible:ring-[color:var(--sofya-focus-ring-soft)] focus-visible:ring-offset-0 data-[state=checked]:border-primary data-[state=checked]:bg-primary aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/20 disabled:cursor-not-allowed disabled:opacity-50",
|
|
3671
3788
|
controlClassName
|
|
3672
3789
|
),
|
|
3673
3790
|
...props,
|
|
@@ -3675,7 +3792,10 @@ var RadioGroupItem = React19.forwardRef(function RadioGroupItem2({
|
|
|
3675
3792
|
"span",
|
|
3676
3793
|
{
|
|
3677
3794
|
"data-slot": "radio-group-indicator",
|
|
3678
|
-
className: cn(
|
|
3795
|
+
className: cn(
|
|
3796
|
+
"h-2.5 w-2.5 rounded-full bg-card",
|
|
3797
|
+
indicatorClassName
|
|
3798
|
+
)
|
|
3679
3799
|
}
|
|
3680
3800
|
) })
|
|
3681
3801
|
}
|
|
@@ -3686,12 +3806,12 @@ var RadioGroupItem = React19.forwardRef(function RadioGroupItem2({
|
|
|
3686
3806
|
{
|
|
3687
3807
|
id: labelId,
|
|
3688
3808
|
className: cn(
|
|
3689
|
-
"text-[var(--sofya-
|
|
3809
|
+
"text-[color:var(--sofya-text-default)]",
|
|
3690
3810
|
labelClassName
|
|
3691
3811
|
),
|
|
3692
3812
|
children: renderTextContent(label, {
|
|
3693
3813
|
as: "span",
|
|
3694
|
-
className: "text-[var(--sofya-
|
|
3814
|
+
className: "text-[color:var(--sofya-text-default)]",
|
|
3695
3815
|
size: "h4",
|
|
3696
3816
|
style: {
|
|
3697
3817
|
fontWeight: 400,
|
|
@@ -3705,10 +3825,7 @@ var RadioGroupItem = React19.forwardRef(function RadioGroupItem2({
|
|
|
3705
3825
|
"span",
|
|
3706
3826
|
{
|
|
3707
3827
|
id: descriptionId,
|
|
3708
|
-
className: cn(
|
|
3709
|
-
"text-muted-foreground",
|
|
3710
|
-
descriptionClassName
|
|
3711
|
-
),
|
|
3828
|
+
className: cn("text-muted-foreground", descriptionClassName),
|
|
3712
3829
|
children: renderTextContent(description, {
|
|
3713
3830
|
as: "span",
|
|
3714
3831
|
className: "text-muted-foreground",
|
|
@@ -3750,7 +3867,7 @@ var ScrollAreaViewport = React20.forwardRef(function ScrollAreaViewport2({ class
|
|
|
3750
3867
|
ref,
|
|
3751
3868
|
"data-slot": "scroll-area-viewport",
|
|
3752
3869
|
className: cn(
|
|
3753
|
-
"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-2 focus-visible:ring-[
|
|
3870
|
+
"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",
|
|
3754
3871
|
className
|
|
3755
3872
|
),
|
|
3756
3873
|
...props
|
|
@@ -3774,7 +3891,10 @@ var ScrollAreaScrollbar = React20.forwardRef(function ScrollAreaScrollbar2({ cla
|
|
|
3774
3891
|
ScrollAreaPrimitive.Thumb,
|
|
3775
3892
|
{
|
|
3776
3893
|
"data-slot": "scroll-area-thumb",
|
|
3777
|
-
className: cn(
|
|
3894
|
+
className: cn(
|
|
3895
|
+
"relative flex-1 rounded-full bg-[color:var(--sofya-border-strong)]",
|
|
3896
|
+
thumbClassName
|
|
3897
|
+
)
|
|
3778
3898
|
}
|
|
3779
3899
|
)
|
|
3780
3900
|
}
|
|
@@ -3831,7 +3951,7 @@ var SelectTrigger = React21.forwardRef(function SelectTrigger2({ className, chil
|
|
|
3831
3951
|
"data-slot": "select-trigger",
|
|
3832
3952
|
"data-size": size,
|
|
3833
3953
|
className: cn(
|
|
3834
|
-
"flex w-full items-center justify-between gap-4 rounded-[10px] border border-[
|
|
3954
|
+
"flex w-full items-center justify-between gap-4 rounded-[10px] border border-[color:var(--sofya-border-strong)] bg-card px-4 text-left text-[16px] font-normal leading-[22px] tracking-[-0.02em] 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)] 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",
|
|
3835
3955
|
className
|
|
3836
3956
|
),
|
|
3837
3957
|
...props,
|
|
@@ -3842,7 +3962,7 @@ var SelectTrigger = React21.forwardRef(function SelectTrigger2({ className, chil
|
|
|
3842
3962
|
{
|
|
3843
3963
|
name: "caret-down",
|
|
3844
3964
|
size: size === "sm" ? 12 : 14,
|
|
3845
|
-
className: "shrink-0 text-[
|
|
3965
|
+
className: "shrink-0 text-[color:var(--sofya-text-subtle)]"
|
|
3846
3966
|
}
|
|
3847
3967
|
) })
|
|
3848
3968
|
]
|
|
@@ -3890,7 +4010,7 @@ var SelectContent = React21.forwardRef(function SelectContent2({ className, chil
|
|
|
3890
4010
|
"data-slot": "select-content",
|
|
3891
4011
|
position,
|
|
3892
4012
|
className: cn(
|
|
3893
|
-
"sofya-dropdown-content sofya-select-content z-50 max-h-80 min-w-[8rem] overflow-hidden rounded-[14px] border border-[
|
|
4013
|
+
"sofya-dropdown-content sofya-select-content z-50 max-h-80 min-w-[8rem] overflow-hidden rounded-[14px] border border-[color:var(--sofya-border-strong)] bg-card p-2 text-foreground shadow-[var(--sofya-shadow-soft)] outline-none",
|
|
3894
4014
|
position === "popper" && "w-[var(--radix-select-trigger-width)] data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
3895
4015
|
className
|
|
3896
4016
|
),
|
|
@@ -3941,14 +4061,14 @@ var SelectItem = React21.forwardRef(function SelectItem2({ className, children,
|
|
|
3941
4061
|
ref,
|
|
3942
4062
|
"data-slot": "select-item",
|
|
3943
4063
|
className: cn(
|
|
3944
|
-
"relative flex min-w-0 cursor-pointer select-none items-center self-stretch rounded-[8px] px-4 py-2 pr-8 text-[14px] font-normal leading-5 text-[var(--sofya-
|
|
4064
|
+
"relative flex min-w-0 cursor-pointer select-none items-center self-stretch rounded-[8px] px-4 py-2 pr-8 text-[14px] font-normal leading-5 text-[color:var(--sofya-text-default)] outline-none transition-colors duration-sofya ease-sofya data-[disabled]:pointer-events-none data-[disabled]:opacity-40 data-[highlighted]:bg-[color:var(--sofya-surface-hover)] data-[highlighted]:text-[color:var(--sofya-text-default)] data-[state=checked]:bg-[color:var(--sofya-surface-selected)]",
|
|
3945
4065
|
className
|
|
3946
4066
|
),
|
|
3947
4067
|
...props,
|
|
3948
4068
|
children: [
|
|
3949
4069
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SelectPrimitive.ItemText, { className: "truncate", children: renderTextContent(children, {
|
|
3950
4070
|
as: "span",
|
|
3951
|
-
className: "block truncate text-[var(--sofya-
|
|
4071
|
+
className: "block truncate text-[color:var(--sofya-text-default)]",
|
|
3952
4072
|
size: "body",
|
|
3953
4073
|
style: {
|
|
3954
4074
|
lineHeight: "20px"
|
|
@@ -3966,7 +4086,7 @@ var SelectSeparator = React21.forwardRef(function SelectSeparator2({ className,
|
|
|
3966
4086
|
{
|
|
3967
4087
|
ref,
|
|
3968
4088
|
"data-slot": "select-separator",
|
|
3969
|
-
className: cn("my-2 h-px bg-[
|
|
4089
|
+
className: cn("my-2 h-px bg-[color:var(--sofya-border-soft)]", className),
|
|
3970
4090
|
...props
|
|
3971
4091
|
}
|
|
3972
4092
|
);
|
|
@@ -4202,20 +4322,24 @@ var Switch = React26.forwardRef(({ className, ...props }, ref) => {
|
|
|
4202
4322
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
4203
4323
|
|
|
4204
4324
|
// src/components/table.tsx
|
|
4205
|
-
var
|
|
4325
|
+
var import_class_variance_authority8 = require("class-variance-authority");
|
|
4206
4326
|
var React27 = __toESM(require("react"), 1);
|
|
4207
4327
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4208
4328
|
var tableCellVariantOptions = ["default", "primary", "muted"];
|
|
4209
|
-
var tableStatusToneOptions = [
|
|
4329
|
+
var tableStatusToneOptions = [
|
|
4330
|
+
"active",
|
|
4331
|
+
"inactive",
|
|
4332
|
+
"warning"
|
|
4333
|
+
];
|
|
4210
4334
|
var tableActionToneOptions = ["primary", "neutral", "danger"];
|
|
4211
|
-
var tableCellVariants = (0,
|
|
4335
|
+
var tableCellVariants = (0, import_class_variance_authority8.cva)(
|
|
4212
4336
|
"px-8 py-6 align-middle [font-family:var(--sofya-text-body-font-family)] text-[length:var(--sofya-text-body-font-size)] font-normal leading-[var(--sofya-text-body-line-height)] tracking-[var(--sofya-text-body-letter-spacing)]",
|
|
4213
4337
|
{
|
|
4214
4338
|
variants: {
|
|
4215
4339
|
variant: {
|
|
4216
|
-
default: "text-[
|
|
4217
|
-
primary: "font-medium text-[var(--sofya-
|
|
4218
|
-
muted: "text-[
|
|
4340
|
+
default: "text-[color:var(--sofya-text-soft)]",
|
|
4341
|
+
primary: "font-medium text-[color:var(--sofya-text-default)]",
|
|
4342
|
+
muted: "text-[color:var(--sofya-text-subtle)]"
|
|
4219
4343
|
}
|
|
4220
4344
|
},
|
|
4221
4345
|
defaultVariants: {
|
|
@@ -4223,29 +4347,26 @@ var tableCellVariants = (0, import_class_variance_authority7.cva)(
|
|
|
4223
4347
|
}
|
|
4224
4348
|
}
|
|
4225
4349
|
);
|
|
4226
|
-
var tableStatusBadgeVariants = (0,
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
tone:
|
|
4231
|
-
|
|
4232
|
-
inactive: "border-[#D9E2FA] bg-[#FBFCFF] text-[#7D87A8]",
|
|
4233
|
-
warning: "border-[#F7D7A4] bg-[#FFF8EC] text-[#9A5B00]"
|
|
4234
|
-
}
|
|
4235
|
-
},
|
|
4236
|
-
defaultVariants: {
|
|
4237
|
-
tone: "active"
|
|
4350
|
+
var tableStatusBadgeVariants = (0, import_class_variance_authority8.cva)("normal-case", {
|
|
4351
|
+
variants: {
|
|
4352
|
+
tone: {
|
|
4353
|
+
active: "border-[color:var(--sofya-tone-success-border)] bg-[color:var(--sofya-tone-success-background)] text-[color:var(--sofya-tone-success-foreground)]",
|
|
4354
|
+
inactive: "border-[color:var(--sofya-tone-default-border)] bg-[color:var(--sofya-tone-default-background)] text-[color:var(--sofya-text-subtle)]",
|
|
4355
|
+
warning: "border-[color:var(--sofya-tone-warning-border)] bg-[color:var(--sofya-tone-warning-background)] text-[color:var(--sofya-tone-warning-foreground)]"
|
|
4238
4356
|
}
|
|
4357
|
+
},
|
|
4358
|
+
defaultVariants: {
|
|
4359
|
+
tone: "active"
|
|
4239
4360
|
}
|
|
4240
|
-
);
|
|
4241
|
-
var tableActionButtonVariants = (0,
|
|
4242
|
-
"text-[length:var(--sofya-text-body-font-size)] leading-[var(--sofya-text-body-line-height)] shadow-none motion-safe:active:scale-[0.97] focus-visible:ring-[
|
|
4361
|
+
});
|
|
4362
|
+
var tableActionButtonVariants = (0, import_class_variance_authority8.cva)(
|
|
4363
|
+
"text-[length:var(--sofya-text-body-font-size)] leading-[var(--sofya-text-body-line-height)] shadow-none motion-safe:active:scale-[0.97] focus-visible:ring-[color:var(--sofya-focus-ring-soft)] focus-visible:ring-offset-0 disabled:opacity-40 [&_svg]:h-[1em] [&_svg]:w-[1em] [&_svg]:shrink-0",
|
|
4243
4364
|
{
|
|
4244
4365
|
variants: {
|
|
4245
4366
|
tone: {
|
|
4246
|
-
primary: "!bg-transparent text-
|
|
4247
|
-
neutral: "!bg-transparent text-[
|
|
4248
|
-
danger: "!bg-transparent text-[
|
|
4367
|
+
primary: "!bg-transparent text-primary hover:!bg-[color:var(--sofya-surface-hover)]",
|
|
4368
|
+
neutral: "!bg-transparent text-[color:var(--sofya-text-soft)] hover:!bg-[color:var(--sofya-surface-hover)]",
|
|
4369
|
+
danger: "!bg-transparent text-[color:var(--sofya-text-soft)] hover:!bg-[color:var(--sofya-surface-destructive)] hover:text-destructive"
|
|
4249
4370
|
}
|
|
4250
4371
|
},
|
|
4251
4372
|
defaultVariants: {
|
|
@@ -4261,26 +4382,37 @@ var inheritedTextStyle = {
|
|
|
4261
4382
|
letterSpacing: "inherit",
|
|
4262
4383
|
color: "inherit"
|
|
4263
4384
|
};
|
|
4264
|
-
var Table = React27.forwardRef(
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4385
|
+
var Table = React27.forwardRef(function Table2({ className, ...props }, ref) {
|
|
4386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4387
|
+
"div",
|
|
4388
|
+
{
|
|
4389
|
+
"data-slot": "table-container",
|
|
4390
|
+
className: "relative w-full overflow-x-auto",
|
|
4391
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4392
|
+
"table",
|
|
4393
|
+
{
|
|
4394
|
+
"data-slot": "table",
|
|
4395
|
+
ref,
|
|
4396
|
+
className: cn(
|
|
4397
|
+
"w-full min-w-[1040px] caption-bottom border-collapse bg-card",
|
|
4398
|
+
className
|
|
4399
|
+
),
|
|
4400
|
+
...props
|
|
4401
|
+
}
|
|
4402
|
+
)
|
|
4403
|
+
}
|
|
4404
|
+
);
|
|
4405
|
+
});
|
|
4277
4406
|
var TableHeader = React27.forwardRef(function TableHeader2({ className, ...props }, ref) {
|
|
4278
4407
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4279
4408
|
"thead",
|
|
4280
4409
|
{
|
|
4281
4410
|
"data-slot": "table-header",
|
|
4282
4411
|
ref,
|
|
4283
|
-
className: cn(
|
|
4412
|
+
className: cn(
|
|
4413
|
+
"[&_tr]:border-b [&_tr]:border-[color:var(--sofya-border-strong)] [&_tr:hover]:bg-transparent",
|
|
4414
|
+
className
|
|
4415
|
+
),
|
|
4284
4416
|
...props
|
|
4285
4417
|
}
|
|
4286
4418
|
);
|
|
@@ -4302,27 +4434,28 @@ var TableFooter = React27.forwardRef(function TableFooter2({ className, ...props
|
|
|
4302
4434
|
{
|
|
4303
4435
|
"data-slot": "table-footer",
|
|
4304
4436
|
ref,
|
|
4305
|
-
className: cn(
|
|
4437
|
+
className: cn(
|
|
4438
|
+
"border-t border-[color:var(--sofya-border-strong)] bg-[color:var(--sofya-tone-default-background)] font-medium [&>tr:last-child]:border-0",
|
|
4439
|
+
className
|
|
4440
|
+
),
|
|
4441
|
+
...props
|
|
4442
|
+
}
|
|
4443
|
+
);
|
|
4444
|
+
});
|
|
4445
|
+
var TableRow = React27.forwardRef(function TableRow2({ className, ...props }, ref) {
|
|
4446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4447
|
+
"tr",
|
|
4448
|
+
{
|
|
4449
|
+
"data-slot": "table-row",
|
|
4450
|
+
ref,
|
|
4451
|
+
className: cn(
|
|
4452
|
+
"border-b border-[color:var(--sofya-border-soft)] transition-colors duration-sofya ease-sofya hover:bg-[color:var(--sofya-tone-default-background)] data-[state=selected]:bg-[color:var(--sofya-tone-default-background)]",
|
|
4453
|
+
className
|
|
4454
|
+
),
|
|
4306
4455
|
...props
|
|
4307
4456
|
}
|
|
4308
4457
|
);
|
|
4309
4458
|
});
|
|
4310
|
-
var TableRow = React27.forwardRef(
|
|
4311
|
-
function TableRow2({ className, ...props }, ref) {
|
|
4312
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4313
|
-
"tr",
|
|
4314
|
-
{
|
|
4315
|
-
"data-slot": "table-row",
|
|
4316
|
-
ref,
|
|
4317
|
-
className: cn(
|
|
4318
|
-
"border-b border-[#EEF2FF] transition-colors duration-sofya ease-sofya hover:bg-[#FBFCFF] data-[state=selected]:bg-[#FBFCFF]",
|
|
4319
|
-
className
|
|
4320
|
-
),
|
|
4321
|
-
...props
|
|
4322
|
-
}
|
|
4323
|
-
);
|
|
4324
|
-
}
|
|
4325
|
-
);
|
|
4326
4459
|
var TableHead = React27.forwardRef(function TableHead2({ className, children, ...props }, ref) {
|
|
4327
4460
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4328
4461
|
"th",
|
|
@@ -4330,7 +4463,7 @@ var TableHead = React27.forwardRef(function TableHead2({ className, children, ..
|
|
|
4330
4463
|
"data-slot": "table-head",
|
|
4331
4464
|
ref,
|
|
4332
4465
|
className: cn(
|
|
4333
|
-
"whitespace-nowrap px-8 py-8 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.12em] text-
|
|
4466
|
+
"whitespace-nowrap px-8 py-8 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.12em] text-[color:var(--sofya-text-default)] [&_svg]:h-[1em] [&_svg]:w-[1em] [&_svg]:shrink-0",
|
|
4334
4467
|
className
|
|
4335
4468
|
),
|
|
4336
4469
|
...props,
|
|
@@ -4343,77 +4476,95 @@ var TableHead = React27.forwardRef(function TableHead2({ className, children, ..
|
|
|
4343
4476
|
}
|
|
4344
4477
|
);
|
|
4345
4478
|
});
|
|
4346
|
-
var TableCell = React27.forwardRef(
|
|
4479
|
+
var TableCell = React27.forwardRef(
|
|
4480
|
+
function TableCell2({ className, variant, children, ...props }, ref) {
|
|
4481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4482
|
+
"td",
|
|
4483
|
+
{
|
|
4484
|
+
"data-slot": "table-cell",
|
|
4485
|
+
ref,
|
|
4486
|
+
className: cn(tableCellVariants({ variant }), className),
|
|
4487
|
+
...props,
|
|
4488
|
+
children: renderTextContent(children, {
|
|
4489
|
+
as: "span",
|
|
4490
|
+
className: "block text-inherit [&_svg]:h-[1em] [&_svg]:w-[1em] [&_svg]:shrink-0",
|
|
4491
|
+
size: "body",
|
|
4492
|
+
style: inheritedTextStyle
|
|
4493
|
+
})
|
|
4494
|
+
}
|
|
4495
|
+
);
|
|
4496
|
+
}
|
|
4497
|
+
);
|
|
4498
|
+
var TableCaption = React27.forwardRef(function TableCaption2({ className, children, ...props }, ref) {
|
|
4347
4499
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4348
|
-
"
|
|
4500
|
+
"caption",
|
|
4349
4501
|
{
|
|
4350
|
-
"data-slot": "table-
|
|
4502
|
+
"data-slot": "table-caption",
|
|
4351
4503
|
ref,
|
|
4352
|
-
className: cn(
|
|
4504
|
+
className: cn(
|
|
4505
|
+
"mt-4 text-left [font-family:var(--sofya-text-body-font-family)] text-[length:var(--sofya-text-body-font-size)] leading-[var(--sofya-text-body-line-height)] tracking-[var(--sofya-text-body-letter-spacing)] text-[color:var(--sofya-text-subtle)]",
|
|
4506
|
+
className
|
|
4507
|
+
),
|
|
4353
4508
|
...props,
|
|
4354
4509
|
children: renderTextContent(children, {
|
|
4355
4510
|
as: "span",
|
|
4356
|
-
className: "block text-inherit
|
|
4511
|
+
className: "block text-inherit",
|
|
4357
4512
|
size: "body",
|
|
4358
4513
|
style: inheritedTextStyle
|
|
4359
4514
|
})
|
|
4360
4515
|
}
|
|
4361
4516
|
);
|
|
4362
4517
|
});
|
|
4363
|
-
|
|
4518
|
+
function TableStatusBadge({
|
|
4519
|
+
className,
|
|
4520
|
+
tone,
|
|
4521
|
+
children,
|
|
4522
|
+
...props
|
|
4523
|
+
}) {
|
|
4364
4524
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4365
|
-
|
|
4525
|
+
Badge,
|
|
4526
|
+
{
|
|
4527
|
+
variant: "pill",
|
|
4528
|
+
className: cn(tableStatusBadgeVariants({ tone }), className),
|
|
4529
|
+
...props,
|
|
4530
|
+
children: renderTextContent(children, {
|
|
4531
|
+
as: "span",
|
|
4532
|
+
className: "inline-flex items-center gap-2 text-inherit [&_svg]:h-[1em] [&_svg]:w-[1em] [&_svg]:shrink-0",
|
|
4533
|
+
size: "tiny",
|
|
4534
|
+
style: inheritedTextStyle
|
|
4535
|
+
})
|
|
4536
|
+
}
|
|
4537
|
+
);
|
|
4538
|
+
}
|
|
4539
|
+
var TableActionButton = React27.forwardRef(function TableActionButton2({ className, tone, type = "button", children, ...props }, ref) {
|
|
4540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4541
|
+
Button,
|
|
4366
4542
|
{
|
|
4367
|
-
"data-slot": "table-caption",
|
|
4368
4543
|
ref,
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
),
|
|
4544
|
+
type,
|
|
4545
|
+
variant: "ghost",
|
|
4546
|
+
size: "icon",
|
|
4547
|
+
className: cn(tableActionButtonVariants({ tone }), className),
|
|
4373
4548
|
...props,
|
|
4374
4549
|
children: renderTextContent(children, {
|
|
4375
4550
|
as: "span",
|
|
4376
|
-
className: "
|
|
4551
|
+
className: "inline-flex items-center justify-center text-inherit [&_svg]:h-[1em] [&_svg]:w-[1em] [&_svg]:shrink-0",
|
|
4377
4552
|
size: "body",
|
|
4378
4553
|
style: inheritedTextStyle
|
|
4379
4554
|
})
|
|
4380
4555
|
}
|
|
4381
4556
|
);
|
|
4382
4557
|
});
|
|
4383
|
-
function
|
|
4384
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
}
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4394
|
-
Button,
|
|
4395
|
-
{
|
|
4396
|
-
ref,
|
|
4397
|
-
type,
|
|
4398
|
-
variant: "ghost",
|
|
4399
|
-
size: "icon",
|
|
4400
|
-
className: cn(tableActionButtonVariants({ tone }), className),
|
|
4401
|
-
...props,
|
|
4402
|
-
children: renderTextContent(children, {
|
|
4403
|
-
as: "span",
|
|
4404
|
-
className: "inline-flex items-center justify-center text-inherit [&_svg]:h-[1em] [&_svg]:w-[1em] [&_svg]:shrink-0",
|
|
4405
|
-
size: "body",
|
|
4406
|
-
style: inheritedTextStyle
|
|
4407
|
-
})
|
|
4408
|
-
}
|
|
4409
|
-
);
|
|
4410
|
-
}
|
|
4411
|
-
);
|
|
4412
|
-
var TableActions = React27.forwardRef(
|
|
4413
|
-
function TableActions2({ className, ...props }, ref) {
|
|
4414
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { ref, className: cn("flex items-center gap-6", className), ...props });
|
|
4415
|
-
}
|
|
4416
|
-
);
|
|
4558
|
+
var TableActions = React27.forwardRef(function TableActions2({ className, ...props }, ref) {
|
|
4559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4560
|
+
"div",
|
|
4561
|
+
{
|
|
4562
|
+
ref,
|
|
4563
|
+
className: cn("flex items-center gap-6", className),
|
|
4564
|
+
...props
|
|
4565
|
+
}
|
|
4566
|
+
);
|
|
4567
|
+
});
|
|
4417
4568
|
Table.displayName = "Table";
|
|
4418
4569
|
TableHeader.displayName = "TableHeader";
|
|
4419
4570
|
TableBody.displayName = "TableBody";
|
|
@@ -4478,7 +4629,10 @@ function Tabs({
|
|
|
4478
4629
|
TabsPrimitive.List,
|
|
4479
4630
|
{
|
|
4480
4631
|
"aria-label": "Subtelas navegaveis",
|
|
4481
|
-
className: cn(
|
|
4632
|
+
className: cn(
|
|
4633
|
+
"flex w-full items-center border-b border-[color:var(--sofya-border-strong)]",
|
|
4634
|
+
listClassName
|
|
4635
|
+
),
|
|
4482
4636
|
children: items.map((item) => {
|
|
4483
4637
|
const isUnavailable = item.disabled || item.loading;
|
|
4484
4638
|
const isActive = item.value === currentValue;
|
|
@@ -4488,8 +4642,8 @@ function Tabs({
|
|
|
4488
4642
|
value: item.value,
|
|
4489
4643
|
disabled: isUnavailable,
|
|
4490
4644
|
className: cn(
|
|
4491
|
-
"relative inline-flex min-h-[76px] shrink-0 items-center justify-center px-8 pb-4 pt-6 text-[18px] font-semibold leading-none tracking-[-0.01em] text-[
|
|
4492
|
-
item.loading && "disabled:text-[
|
|
4645
|
+
"relative inline-flex min-h-[76px] shrink-0 items-center justify-center px-8 pb-4 pt-6 text-[18px] font-semibold leading-none tracking-[-0.01em] text-[color:var(--sofya-text-subtle)] transition-[color,opacity] duration-sofya ease-sofya focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--sofya-focus-ring-soft)] focus-visible:ring-offset-0 disabled:pointer-events-none disabled:text-[color:var(--sofya-text-placeholder)] data-[state=active]:text-primary",
|
|
4646
|
+
item.loading && "disabled:text-[color:var(--sofya-text-soft)]",
|
|
4493
4647
|
triggerClassName,
|
|
4494
4648
|
item.triggerClassName
|
|
4495
4649
|
),
|
|
@@ -4536,7 +4690,11 @@ function Tabs({
|
|
|
4536
4690
|
TabsPrimitive.Content,
|
|
4537
4691
|
{
|
|
4538
4692
|
value: item.value,
|
|
4539
|
-
className: cn(
|
|
4693
|
+
className: cn(
|
|
4694
|
+
"pt-6 focus:outline-none",
|
|
4695
|
+
contentClassName,
|
|
4696
|
+
item.contentClassName
|
|
4697
|
+
),
|
|
4540
4698
|
children: renderTextContent(item.content, {
|
|
4541
4699
|
as: "span"
|
|
4542
4700
|
})
|
|
@@ -4554,7 +4712,15 @@ Tabs.displayName = "Tabs";
|
|
|
4554
4712
|
var React29 = __toESM(require("react"), 1);
|
|
4555
4713
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4556
4714
|
var Textarea = React29.forwardRef(
|
|
4557
|
-
({
|
|
4715
|
+
({
|
|
4716
|
+
className,
|
|
4717
|
+
containerClassName,
|
|
4718
|
+
id,
|
|
4719
|
+
label,
|
|
4720
|
+
labelClassName,
|
|
4721
|
+
rows = 5,
|
|
4722
|
+
...props
|
|
4723
|
+
}, ref) => {
|
|
4558
4724
|
const generatedId = React29.useId();
|
|
4559
4725
|
const resolvedId = id ?? generatedId;
|
|
4560
4726
|
const ariaLabel = props["aria-label"] ?? (typeof label === "string" ? label : void 0);
|
|
@@ -4562,7 +4728,7 @@ var Textarea = React29.forwardRef(
|
|
|
4562
4728
|
"textarea",
|
|
4563
4729
|
{
|
|
4564
4730
|
className: cn(
|
|
4565
|
-
"flex min-h-[120px] w-full resize-y rounded-[10px] border border-[
|
|
4731
|
+
"flex min-h-[120px] w-full resize-y rounded-[10px] border border-[color:var(--sofya-border-strong)] bg-card px-4 py-2 text-[16px] font-normal leading-[22px] tracking-[-0.02em] 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-[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-[color:var(--sofya-border-hover)] disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-50",
|
|
4566
4732
|
className
|
|
4567
4733
|
),
|
|
4568
4734
|
id: resolvedId,
|
|
@@ -4579,11 +4745,14 @@ var Textarea = React29.forwardRef(
|
|
|
4579
4745
|
label ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4580
4746
|
"label",
|
|
4581
4747
|
{
|
|
4582
|
-
className: cn(
|
|
4748
|
+
className: cn(
|
|
4749
|
+
"text-[color:var(--sofya-text-default)]",
|
|
4750
|
+
labelClassName
|
|
4751
|
+
),
|
|
4583
4752
|
htmlFor: resolvedId,
|
|
4584
4753
|
children: renderTextContent(label, {
|
|
4585
4754
|
as: "span",
|
|
4586
|
-
className: "block text-[var(--sofya-
|
|
4755
|
+
className: "block text-[color:var(--sofya-text-default)]",
|
|
4587
4756
|
size: "h4",
|
|
4588
4757
|
style: {
|
|
4589
4758
|
fontWeight: 500,
|
|
@@ -4613,13 +4782,13 @@ var TooltipContent = React30.forwardRef(function TooltipContent2({ className, si
|
|
|
4613
4782
|
ref,
|
|
4614
4783
|
sideOffset,
|
|
4615
4784
|
className: cn(
|
|
4616
|
-
"sofya-tooltip-content z-50 max-w-[260px] overflow-hidden rounded-[12px] border border-[
|
|
4785
|
+
"sofya-tooltip-content z-50 max-w-[260px] overflow-hidden rounded-[12px] border border-[color:var(--sofya-tone-default-border)] bg-[color:var(--sofya-tooltip-background)] px-4 py-2 text-[color:var(--sofya-tooltip-foreground)] shadow-[var(--sofya-shadow-tooltip)]",
|
|
4617
4786
|
className
|
|
4618
4787
|
),
|
|
4619
4788
|
...props,
|
|
4620
4789
|
children: renderTextContent(props.children, {
|
|
4621
4790
|
as: "span",
|
|
4622
|
-
className: "block text-
|
|
4791
|
+
className: "block text-[color:var(--sofya-tooltip-foreground)]",
|
|
4623
4792
|
size: "tiny",
|
|
4624
4793
|
style: {
|
|
4625
4794
|
fontWeight: 500,
|