@sofya-ds/react 1.3.6 → 1.3.8
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 +984 -681
- package/dist/index.css +1 -1
- package/dist/index.d.cts +36 -3
- package/dist/index.d.ts +36 -3
- package/dist/index.js +982 -680
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -60,6 +60,7 @@ __export(index_exports, {
|
|
|
60
60
|
DialogTitle: () => DialogTitle,
|
|
61
61
|
DialogTrigger: () => DialogTrigger,
|
|
62
62
|
Dropdown: () => Dropdown,
|
|
63
|
+
DropdownSearch: () => DropdownSearch,
|
|
63
64
|
Empty: () => Empty,
|
|
64
65
|
EmptyContent: () => EmptyContent,
|
|
65
66
|
EmptyDescription: () => EmptyDescription,
|
|
@@ -773,7 +774,7 @@ var accordionItemClasses = {
|
|
|
773
774
|
card: "group/accordion-item bg-transparent text-foreground"
|
|
774
775
|
};
|
|
775
776
|
var accordionTriggerClasses = {
|
|
776
|
-
default: "sofya-accordion-trigger flex flex-1 items-center justify-between gap-4 py-4 text-left [font-family:var(--sofya-text-
|
|
777
|
+
default: "sofya-accordion-trigger flex flex-1 items-center justify-between gap-4 py-4 text-left [font-family:var(--sofya-text-tiny-font-family)] text-[length:var(--sofya-text-tiny-font-size)] font-medium leading-[var(--sofya-text-tiny-line-height)] tracking-[var(--sofya-text-tiny-letter-spacing)] text-foreground transition-colors duration-sofya ease-sofya 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",
|
|
777
778
|
card: "sofya-accordion-trigger flex w-full items-center justify-between gap-4 rounded-[16px] border border-secondary bg-[color:var(--sofya-background)] px-6 py-4 text-left text-foreground transition-[background-color,border-color,box-shadow,color] duration-sofya ease-sofya hover:border-secondary 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:opacity-50"
|
|
778
779
|
};
|
|
779
780
|
var accordionContentClasses = {
|
|
@@ -851,7 +852,7 @@ var AccordionTrigger = React4.forwardRef(
|
|
|
851
852
|
renderTextContent(children, {
|
|
852
853
|
as: "span",
|
|
853
854
|
className: "block min-w-0 text-foreground",
|
|
854
|
-
size: appearance === "card" ? "
|
|
855
|
+
size: appearance === "card" ? "body" : "tiny",
|
|
855
856
|
style: appearance === "card" ? void 0 : {
|
|
856
857
|
color: "inherit",
|
|
857
858
|
fontFamily: "inherit",
|
|
@@ -864,7 +865,7 @@ var AccordionTrigger = React4.forwardRef(
|
|
|
864
865
|
hasDescription ? renderTextContent(description, {
|
|
865
866
|
as: "span",
|
|
866
867
|
className: "block min-w-0 text-muted-foreground",
|
|
867
|
-
size: "
|
|
868
|
+
size: "tiny"
|
|
868
869
|
}) : null
|
|
869
870
|
]
|
|
870
871
|
}
|
|
@@ -907,7 +908,8 @@ var AccordionContent = React4.forwardRef(({ className, children, contentClassNam
|
|
|
907
908
|
contentClassName
|
|
908
909
|
),
|
|
909
910
|
children: renderTextContent(children, {
|
|
910
|
-
className: appearance === "card" ? "text-foreground" : "text-muted-foreground"
|
|
911
|
+
className: appearance === "card" ? "text-foreground" : "text-muted-foreground",
|
|
912
|
+
size: "tiny"
|
|
911
913
|
})
|
|
912
914
|
}
|
|
913
915
|
)
|
|
@@ -1023,7 +1025,7 @@ var AlertDescription = React5.forwardRef(function AlertDescription2({ children,
|
|
|
1023
1025
|
children: renderTextContent(children, {
|
|
1024
1026
|
as: "span",
|
|
1025
1027
|
className: "block text-current/80",
|
|
1026
|
-
size: "
|
|
1028
|
+
size: "tiny"
|
|
1027
1029
|
})
|
|
1028
1030
|
}
|
|
1029
1031
|
);
|
|
@@ -1047,7 +1049,7 @@ var badgeVariantOptions = [
|
|
|
1047
1049
|
var badgeAlertOptions = ["default", "medium", "high"];
|
|
1048
1050
|
var badgePillToneOptions = ["neutral", "danger"];
|
|
1049
1051
|
var badgeVariants = (0, import_class_variance_authority3.cva)(
|
|
1050
|
-
"inline-flex min-h-[34px] items-center justify-center whitespace-nowrap rounded-[5px] px-4 py-2 text-[
|
|
1052
|
+
"inline-flex min-h-[34px] items-center justify-center whitespace-nowrap rounded-[5px] px-4 py-2 [font-family:var(--sofya-text-tiny-font-family)] text-[length:var(--sofya-text-tiny-font-size)] font-semibold uppercase leading-none tracking-[0.08em] transition-colors duration-sofya ease-sofya",
|
|
1051
1053
|
{
|
|
1052
1054
|
variants: {
|
|
1053
1055
|
variant: {
|
|
@@ -1066,7 +1068,7 @@ var badgeVariants = (0, import_class_variance_authority3.cva)(
|
|
|
1066
1068
|
}
|
|
1067
1069
|
);
|
|
1068
1070
|
var badgeAlertVariants = (0, import_class_variance_authority3.cva)(
|
|
1069
|
-
"inline-flex min-h-[34px] items-center justify-center whitespace-nowrap rounded-[5px] px-4 py-2 text-[
|
|
1071
|
+
"inline-flex min-h-[34px] items-center justify-center whitespace-nowrap rounded-[5px] px-4 py-2 [font-family:var(--sofya-text-tiny-font-family)] text-[length:var(--sofya-text-tiny-font-size)] font-semibold uppercase leading-none tracking-[0.08em] transition-colors duration-sofya ease-sofya",
|
|
1070
1072
|
{
|
|
1071
1073
|
variants: {
|
|
1072
1074
|
alert: {
|
|
@@ -1081,7 +1083,7 @@ var badgeAlertVariants = (0, import_class_variance_authority3.cva)(
|
|
|
1081
1083
|
}
|
|
1082
1084
|
);
|
|
1083
1085
|
var badgePillVariants = (0, import_class_variance_authority3.cva)(
|
|
1084
|
-
"inline-flex h-[30px] items-center justify-center whitespace-nowrap rounded-full border px-4 py-2 text-[
|
|
1086
|
+
"inline-flex h-[30px] items-center justify-center whitespace-nowrap rounded-full border px-4 py-2 [font-family:var(--sofya-text-extra-tiny-font-family)] text-[length:var(--sofya-text-extra-tiny-font-size)] font-semibold leading-none tracking-normal transition-colors duration-sofya ease-sofya",
|
|
1085
1087
|
{
|
|
1086
1088
|
variants: {
|
|
1087
1089
|
tone: {
|
|
@@ -1895,7 +1897,7 @@ var Checkbox = React10.forwardRef(
|
|
|
1895
1897
|
children: renderTextContent(label, {
|
|
1896
1898
|
as: "span",
|
|
1897
1899
|
className: "text-[color:var(--sofya-text-default)]",
|
|
1898
|
-
size: "
|
|
1900
|
+
size: "tiny"
|
|
1899
1901
|
})
|
|
1900
1902
|
}
|
|
1901
1903
|
) : null,
|
|
@@ -1910,7 +1912,7 @@ var Checkbox = React10.forwardRef(
|
|
|
1910
1912
|
children: renderTextContent(description, {
|
|
1911
1913
|
as: "span",
|
|
1912
1914
|
className: "text-muted-foreground",
|
|
1913
|
-
size: "
|
|
1915
|
+
size: "tiny"
|
|
1914
1916
|
})
|
|
1915
1917
|
}
|
|
1916
1918
|
) : null
|
|
@@ -1953,7 +1955,8 @@ var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
|
1953
1955
|
var dropdownVariantOptions = [
|
|
1954
1956
|
"card",
|
|
1955
1957
|
"language",
|
|
1956
|
-
"selected"
|
|
1958
|
+
"selected",
|
|
1959
|
+
"action"
|
|
1957
1960
|
];
|
|
1958
1961
|
var dropdownAppearanceOptions = ["card"];
|
|
1959
1962
|
var dropdownTriggerSizeOptions = ["default", "sm", "lg"];
|
|
@@ -1965,7 +1968,8 @@ var dropdownLanguageItems = [
|
|
|
1965
1968
|
var dropdownTriggerToneClasses = {
|
|
1966
1969
|
card: "text-primary",
|
|
1967
1970
|
language: "",
|
|
1968
|
-
selected: "w-full border-[color:var(--sofya-border-strong)] [font-family:var(--sofya-text-
|
|
1971
|
+
selected: "w-full border-[color:var(--sofya-border-strong)] [font-family:var(--sofya-text-tiny-font-family)] text-[length:var(--sofya-text-tiny-font-size)] [font-weight:var(--sofya-text-tiny-font-weight)] leading-[var(--sofya-text-tiny-line-height)] tracking-[var(--sofya-text-tiny-letter-spacing)]",
|
|
1972
|
+
action: ""
|
|
1969
1973
|
};
|
|
1970
1974
|
var dropdownTriggerSizeClasses = {
|
|
1971
1975
|
regular: {
|
|
@@ -1982,6 +1986,11 @@ var dropdownTriggerSizeClasses = {
|
|
|
1982
1986
|
default: "h-5 w-5 p-0",
|
|
1983
1987
|
sm: "h-[18px] w-[18px] p-0",
|
|
1984
1988
|
lg: "h-6 w-6 p-0"
|
|
1989
|
+
},
|
|
1990
|
+
action: {
|
|
1991
|
+
default: "h-10 w-10 p-0",
|
|
1992
|
+
sm: "h-8 w-8 p-0",
|
|
1993
|
+
lg: "h-12 w-12 p-0"
|
|
1985
1994
|
}
|
|
1986
1995
|
};
|
|
1987
1996
|
var dropdownAppearanceClasses = {
|
|
@@ -1993,12 +2002,14 @@ var dropdownAppearanceClasses = {
|
|
|
1993
2002
|
var dropdownContentBaseClasses = {
|
|
1994
2003
|
card: "border-[color:var(--sofya-border-strong)] text-foreground shadow-[var(--sofya-shadow-soft)]",
|
|
1995
2004
|
language: "w-[224px] min-w-[224px] border-[color:var(--sofya-border-strong)] text-foreground shadow-[var(--sofya-shadow-soft)]",
|
|
1996
|
-
selected: "w-[var(--radix-dropdown-menu-trigger-width)] min-w-[var(--radix-dropdown-menu-trigger-width)] border-[color:var(--sofya-border-strong)] text-foreground shadow-[var(--sofya-shadow-soft)]"
|
|
2005
|
+
selected: "w-[var(--radix-dropdown-menu-trigger-width)] min-w-[var(--radix-dropdown-menu-trigger-width)] border-[color:var(--sofya-border-strong)] text-foreground shadow-[var(--sofya-shadow-soft)]",
|
|
2006
|
+
action: "w-[224px] min-w-[224px] border-[color:var(--sofya-border-strong)] text-foreground shadow-[var(--sofya-shadow-soft)]"
|
|
1997
2007
|
};
|
|
1998
2008
|
var dropdownItemClasses = {
|
|
1999
2009
|
card: "text-foreground",
|
|
2000
2010
|
language: "text-foreground",
|
|
2001
|
-
selected: "text-foreground"
|
|
2011
|
+
selected: "text-foreground",
|
|
2012
|
+
action: "text-foreground"
|
|
2002
2013
|
};
|
|
2003
2014
|
function isButtonLanguageLocale(value) {
|
|
2004
2015
|
return buttonLanguageLocaleOptions.includes(value);
|
|
@@ -2024,6 +2035,9 @@ function resolveDropdownTriggerSizeFamily(variant) {
|
|
|
2024
2035
|
if (variant === "selected") {
|
|
2025
2036
|
return "selected";
|
|
2026
2037
|
}
|
|
2038
|
+
if (variant === "action") {
|
|
2039
|
+
return "action";
|
|
2040
|
+
}
|
|
2027
2041
|
return "regular";
|
|
2028
2042
|
}
|
|
2029
2043
|
function DefaultDropdownTriggerIcon({ variant }) {
|
|
@@ -2062,6 +2076,7 @@ function Dropdown({
|
|
|
2062
2076
|
defaultOpen,
|
|
2063
2077
|
defaultValue,
|
|
2064
2078
|
disabled = false,
|
|
2079
|
+
iconTrigger,
|
|
2065
2080
|
items,
|
|
2066
2081
|
itemClassName,
|
|
2067
2082
|
modal,
|
|
@@ -2078,9 +2093,10 @@ function Dropdown({
|
|
|
2078
2093
|
}) {
|
|
2079
2094
|
const isLanguageVariant = variant === "language";
|
|
2080
2095
|
const isSelectedVariant = variant === "selected";
|
|
2096
|
+
const isActionVariant = variant === "action";
|
|
2081
2097
|
const resolvedAppearance = resolveDropdownAppearance({ appearance, variant });
|
|
2082
2098
|
const triggerSizeFamily = resolveDropdownTriggerSizeFamily(variant);
|
|
2083
|
-
const usesDefaultListStyle = !isLanguageVariant;
|
|
2099
|
+
const usesDefaultListStyle = !isLanguageVariant && !isActionVariant;
|
|
2084
2100
|
const resolvedItems = React12.useMemo(
|
|
2085
2101
|
() => isLanguageVariant ? items && items.length > 0 ? items : dropdownLanguageItems : items ?? [],
|
|
2086
2102
|
[isLanguageVariant, items]
|
|
@@ -2091,6 +2107,7 @@ function Dropdown({
|
|
|
2091
2107
|
onChange: onValueChange,
|
|
2092
2108
|
value
|
|
2093
2109
|
});
|
|
2110
|
+
const [subValues, setSubValues] = React12.useState({});
|
|
2094
2111
|
const radioValue = selectedValue ?? "";
|
|
2095
2112
|
const selectedItem = resolvedItems.find(
|
|
2096
2113
|
(item) => item.value === selectedValue
|
|
@@ -2112,7 +2129,7 @@ function Dropdown({
|
|
|
2112
2129
|
setUncontrolledSelectedValue,
|
|
2113
2130
|
value
|
|
2114
2131
|
]);
|
|
2115
|
-
const resolvedTriggerIcon = isLanguageVariant ? void 0 : triggerIcon === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DefaultDropdownTriggerIcon, { variant }) : triggerIcon;
|
|
2132
|
+
const resolvedTriggerIcon = isLanguageVariant || isActionVariant ? void 0 : triggerIcon === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DefaultDropdownTriggerIcon, { variant }) : triggerIcon;
|
|
2116
2133
|
const triggerLabel = selectedItem?.triggerLabel ?? selectedItem?.label ?? placeholder;
|
|
2117
2134
|
const selectedTriggerToneClassName = isSelectedVariant ? hasSelectedItem ? "text-foreground" : "text-[color:var(--sofya-text-soft)]" : void 0;
|
|
2118
2135
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
@@ -2127,7 +2144,7 @@ function Dropdown({
|
|
|
2127
2144
|
Button,
|
|
2128
2145
|
{
|
|
2129
2146
|
type: "button",
|
|
2130
|
-
variant: isLanguageVariant ? "language" : "dropdown",
|
|
2147
|
+
variant: isLanguageVariant ? "language" : isActionVariant ? "ghost" : "dropdown",
|
|
2131
2148
|
languageLocale: selectedLanguageLocale,
|
|
2132
2149
|
"data-appearance": resolvedAppearance,
|
|
2133
2150
|
"data-trigger-size": triggerSize,
|
|
@@ -2139,11 +2156,12 @@ function Dropdown({
|
|
|
2139
2156
|
selectedTriggerToneClassName,
|
|
2140
2157
|
triggerClassName
|
|
2141
2158
|
),
|
|
2159
|
+
leftIcon: isActionVariant ? iconTrigger : void 0,
|
|
2142
2160
|
rightIcon: resolvedTriggerIcon,
|
|
2143
|
-
children: isLanguageVariant ? null : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "min-w-0 truncate", children: renderTextContent(triggerLabel, {
|
|
2161
|
+
children: isLanguageVariant || isActionVariant ? null : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "min-w-0 truncate", children: renderTextContent(triggerLabel, {
|
|
2144
2162
|
as: "span",
|
|
2145
2163
|
className: "block min-w-0 truncate text-inherit",
|
|
2146
|
-
size: "
|
|
2164
|
+
size: "tiny"
|
|
2147
2165
|
}) })
|
|
2148
2166
|
}
|
|
2149
2167
|
) }),
|
|
@@ -2170,43 +2188,121 @@ function Dropdown({
|
|
|
2170
2188
|
const itemLanguageLocale = resolveItemLanguageLocale(item);
|
|
2171
2189
|
const indicator = item.indicator ?? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DefaultDropdownItemIndicator, {});
|
|
2172
2190
|
const itemIcon = item.icon ?? (variant === "language" && itemLanguageLocale ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(LanguageFlagIcon, { locale: itemLanguageLocale }) : null);
|
|
2191
|
+
if (isActionVariant && item.subItems && item.subItems.length > 0) {
|
|
2192
|
+
const currentSubValue = subValues[item.value];
|
|
2193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DropdownMenuPrimitive.Sub, { children: [
|
|
2194
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2195
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
2196
|
+
{
|
|
2197
|
+
disabled: item.disabled,
|
|
2198
|
+
className: cn(
|
|
2199
|
+
"flex w-full min-w-0 overflow-hidden cursor-pointer items-center gap-2.5 rounded-full px-1.5 py-1 outline-none transition-colors duration-sofya ease-sofya",
|
|
2200
|
+
"data-[highlighted]:bg-muted data-[state=open]:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-40",
|
|
2201
|
+
dropdownItemClasses[variant],
|
|
2202
|
+
itemClassName
|
|
2203
|
+
),
|
|
2204
|
+
children: [
|
|
2205
|
+
itemIcon && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "flex shrink-0 items-center justify-center", children: itemIcon }),
|
|
2206
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "min-w-0 flex-1 truncate", children: renderTextContent(item.label, {
|
|
2207
|
+
as: "span",
|
|
2208
|
+
className: "block truncate text-inherit",
|
|
2209
|
+
size: "tiny"
|
|
2210
|
+
}) }),
|
|
2211
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "flex shrink-0 items-center justify-center text-[color:var(--sofya-text-subtle)]", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Icon, { name: "caret-right", size: 12 }) })
|
|
2212
|
+
]
|
|
2213
|
+
}
|
|
2214
|
+
),
|
|
2215
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2216
|
+
DropdownMenuPrimitive.SubContent,
|
|
2217
|
+
{
|
|
2218
|
+
sideOffset: 4,
|
|
2219
|
+
className: cn(
|
|
2220
|
+
"sofya-dropdown-content z-50 w-[224px] min-w-[224px] overflow-hidden border bg-card p-2 outline-none",
|
|
2221
|
+
"rounded-[20px] border-[color:var(--sofya-border-strong)] text-foreground shadow-[var(--sofya-shadow-soft)]"
|
|
2222
|
+
),
|
|
2223
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2224
|
+
DropdownMenuPrimitive.RadioGroup,
|
|
2225
|
+
{
|
|
2226
|
+
value: currentSubValue ?? "",
|
|
2227
|
+
onValueChange: (subValue) => {
|
|
2228
|
+
setSubValues((prev) => ({
|
|
2229
|
+
...prev,
|
|
2230
|
+
[item.value]: subValue
|
|
2231
|
+
}));
|
|
2232
|
+
setSelectedValue(subValue);
|
|
2233
|
+
},
|
|
2234
|
+
className: "grid gap-1",
|
|
2235
|
+
children: item.subItems.map((subItem) => {
|
|
2236
|
+
const isSubSelected = subItem.value === currentSubValue;
|
|
2237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2238
|
+
DropdownMenuPrimitive.RadioItem,
|
|
2239
|
+
{
|
|
2240
|
+
value: subItem.value,
|
|
2241
|
+
disabled: subItem.disabled,
|
|
2242
|
+
className: cn(
|
|
2243
|
+
"flex w-full min-w-0 overflow-hidden cursor-pointer items-center gap-2.5 rounded-full px-1.5 py-1 text-foreground outline-none transition-colors duration-sofya ease-sofya",
|
|
2244
|
+
"data-[highlighted]:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-40"
|
|
2245
|
+
),
|
|
2246
|
+
children: [
|
|
2247
|
+
subItem.icon && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "flex shrink-0 items-center justify-center", children: subItem.icon }),
|
|
2248
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "min-w-0 flex-1 truncate", children: renderTextContent(subItem.label, {
|
|
2249
|
+
as: "span",
|
|
2250
|
+
className: "block truncate text-inherit",
|
|
2251
|
+
size: "tiny"
|
|
2252
|
+
}) }),
|
|
2253
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2254
|
+
"span",
|
|
2255
|
+
{
|
|
2256
|
+
"aria-hidden": "true",
|
|
2257
|
+
className: cn(
|
|
2258
|
+
"flex h-4 w-4 shrink-0 items-center justify-center text-primary transition-opacity duration-sofya ease-sofya",
|
|
2259
|
+
isSubSelected ? "opacity-100" : "opacity-0"
|
|
2260
|
+
),
|
|
2261
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DefaultDropdownItemIndicator, {})
|
|
2262
|
+
}
|
|
2263
|
+
)
|
|
2264
|
+
]
|
|
2265
|
+
},
|
|
2266
|
+
subItem.value
|
|
2267
|
+
);
|
|
2268
|
+
})
|
|
2269
|
+
}
|
|
2270
|
+
)
|
|
2271
|
+
}
|
|
2272
|
+
) })
|
|
2273
|
+
] }, item.value);
|
|
2274
|
+
}
|
|
2173
2275
|
if (!usesDefaultListStyle) {
|
|
2174
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.
|
|
2276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2175
2277
|
DropdownMenuPrimitive.RadioItem,
|
|
2176
2278
|
{
|
|
2177
2279
|
value: item.value,
|
|
2178
2280
|
disabled: item.disabled,
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
"
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
children: indicator
|
|
2205
|
-
}
|
|
2206
|
-
)
|
|
2207
|
-
] })
|
|
2208
|
-
}
|
|
2209
|
-
)
|
|
2281
|
+
className: cn(
|
|
2282
|
+
"flex w-full min-w-0 overflow-hidden cursor-pointer items-center gap-2.5 rounded-full px-1.5 py-1 outline-none transition-colors duration-sofya ease-sofya",
|
|
2283
|
+
"data-[highlighted]:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-40",
|
|
2284
|
+
dropdownItemClasses[variant],
|
|
2285
|
+
itemClassName
|
|
2286
|
+
),
|
|
2287
|
+
children: [
|
|
2288
|
+
itemIcon && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "flex shrink-0 items-center justify-center", children: itemIcon }),
|
|
2289
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "min-w-0 flex-1 truncate", children: renderTextContent(item.label, {
|
|
2290
|
+
as: "span",
|
|
2291
|
+
className: "block truncate text-inherit",
|
|
2292
|
+
size: "tiny"
|
|
2293
|
+
}) }),
|
|
2294
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2295
|
+
"span",
|
|
2296
|
+
{
|
|
2297
|
+
"aria-hidden": "true",
|
|
2298
|
+
className: cn(
|
|
2299
|
+
"flex h-4 w-4 shrink-0 items-center justify-center text-primary transition-opacity duration-sofya ease-sofya",
|
|
2300
|
+
isSelected ? "opacity-100" : "opacity-0"
|
|
2301
|
+
),
|
|
2302
|
+
children: indicator
|
|
2303
|
+
}
|
|
2304
|
+
)
|
|
2305
|
+
]
|
|
2210
2306
|
},
|
|
2211
2307
|
item.value
|
|
2212
2308
|
);
|
|
@@ -2217,7 +2313,7 @@ function Dropdown({
|
|
|
2217
2313
|
value: item.value,
|
|
2218
2314
|
disabled: item.disabled,
|
|
2219
2315
|
className: cn(
|
|
2220
|
-
"flex w-full cursor-pointer items-center rounded-[4px] [font-family:var(--sofya-text-
|
|
2316
|
+
"flex w-full cursor-pointer items-center rounded-[4px] [font-family:var(--sofya-text-tiny-font-family)] text-[length:var(--sofya-text-tiny-font-size)] [font-weight:var(--sofya-text-tiny-font-weight)] leading-[22px] tracking-[var(--sofya-text-tiny-letter-spacing)] outline-none transition-colors duration-sofya ease-sofya data-[disabled]:pointer-events-none data-[disabled]:opacity-40",
|
|
2221
2317
|
"px-0 py-0 data-[highlighted]:bg-transparent [&[data-highlighted]_span[data-dropdown-item-body]]:bg-[color:var(--sofya-surface-selected)]",
|
|
2222
2318
|
dropdownItemClasses[variant],
|
|
2223
2319
|
itemClassName
|
|
@@ -2261,262 +2357,21 @@ function Dropdown({
|
|
|
2261
2357
|
);
|
|
2262
2358
|
}
|
|
2263
2359
|
|
|
2264
|
-
// src/components/
|
|
2265
|
-
var
|
|
2266
|
-
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
2267
|
-
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2268
|
-
var Dialog = DialogPrimitive.Root;
|
|
2269
|
-
var DialogTrigger = DialogPrimitive.Trigger;
|
|
2270
|
-
var DialogPortal = DialogPrimitive.Portal;
|
|
2271
|
-
var DialogClose = DialogPrimitive.Close;
|
|
2272
|
-
var DialogInternalContext = React13.createContext({
|
|
2273
|
-
showCloseButton: true
|
|
2274
|
-
});
|
|
2275
|
-
var DialogOverlay = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2276
|
-
DialogPrimitive.Overlay,
|
|
2277
|
-
{
|
|
2278
|
-
ref,
|
|
2279
|
-
className: cn(
|
|
2280
|
-
"sofya-dialog-overlay fixed inset-0 z-50 bg-foreground/24 backdrop-blur-[6px]",
|
|
2281
|
-
className
|
|
2282
|
-
),
|
|
2283
|
-
...props
|
|
2284
|
-
}
|
|
2285
|
-
));
|
|
2286
|
-
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
2287
|
-
var DialogContent = React13.forwardRef(
|
|
2288
|
-
({
|
|
2289
|
-
className,
|
|
2290
|
-
children,
|
|
2291
|
-
cardClassName,
|
|
2292
|
-
overlayClassName,
|
|
2293
|
-
showCloseButton = true,
|
|
2294
|
-
variant = "card",
|
|
2295
|
-
...props
|
|
2296
|
-
}, ref) => {
|
|
2297
|
-
const dialogCardStyle = {
|
|
2298
|
-
"--sofya-surface-shadow-override": "var(--sofya-shadow-lg)"
|
|
2299
|
-
};
|
|
2300
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogInternalContext.Provider, { value: { showCloseButton }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(DialogPortal, { children: [
|
|
2301
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogOverlay, { className: overlayClassName }),
|
|
2302
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "sofya-dialog-positioner fixed inset-0 z-50 flex items-center justify-center p-4", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2303
|
-
DialogPrimitive.Content,
|
|
2304
|
-
{
|
|
2305
|
-
ref,
|
|
2306
|
-
className: cn(
|
|
2307
|
-
"sofya-dialog-content relative flex w-full max-w-[680px] max-h-[calc(100vh-2rem)] outline-none",
|
|
2308
|
-
className
|
|
2309
|
-
),
|
|
2310
|
-
...props,
|
|
2311
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2312
|
-
Card,
|
|
2313
|
-
{
|
|
2314
|
-
variant,
|
|
2315
|
-
className: cn(
|
|
2316
|
-
"flex max-h-[inherit] min-h-0 w-full flex-col gap-6 overflow-y-auto overflow-x-hidden p-6",
|
|
2317
|
-
cardClassName
|
|
2318
|
-
),
|
|
2319
|
-
style: dialogCardStyle,
|
|
2320
|
-
children
|
|
2321
|
-
}
|
|
2322
|
-
)
|
|
2323
|
-
}
|
|
2324
|
-
) })
|
|
2325
|
-
] }) });
|
|
2326
|
-
}
|
|
2327
|
-
);
|
|
2328
|
-
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
2329
|
-
function DialogHeader({ className, children, ...props }) {
|
|
2330
|
-
const { showCloseButton } = React13.useContext(DialogInternalContext);
|
|
2331
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2332
|
-
"div",
|
|
2333
|
-
{
|
|
2334
|
-
className: cn("flex w-full items-start justify-between gap-4", className),
|
|
2335
|
-
...props,
|
|
2336
|
-
children: [
|
|
2337
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex min-w-0 flex-1 flex-col gap-2 text-left", children }),
|
|
2338
|
-
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2339
|
-
Button,
|
|
2340
|
-
{
|
|
2341
|
-
type: "button",
|
|
2342
|
-
variant: "ghost",
|
|
2343
|
-
size: "icon",
|
|
2344
|
-
"aria-label": "Close",
|
|
2345
|
-
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { name: "x", size: 18 }),
|
|
2346
|
-
className: "shrink-0 text-muted-foreground hover:text-foreground"
|
|
2347
|
-
}
|
|
2348
|
-
) }) : null
|
|
2349
|
-
]
|
|
2350
|
-
}
|
|
2351
|
-
);
|
|
2352
|
-
}
|
|
2353
|
-
function DialogBody({ className, ...props }) {
|
|
2354
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2355
|
-
"div",
|
|
2356
|
-
{
|
|
2357
|
-
className: cn("flex flex-col gap-4", className),
|
|
2358
|
-
...props
|
|
2359
|
-
}
|
|
2360
|
-
);
|
|
2361
|
-
}
|
|
2362
|
-
function DialogFooter({ className, ...props }) {
|
|
2363
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2364
|
-
"div",
|
|
2365
|
-
{
|
|
2366
|
-
className: cn("flex items-center justify-end gap-2", className),
|
|
2367
|
-
...props
|
|
2368
|
-
}
|
|
2369
|
-
);
|
|
2370
|
-
}
|
|
2371
|
-
var DialogCancel = React13.forwardRef(
|
|
2372
|
-
({ type = "button", variant = "ghost", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Button, { ref, type, variant, ...props }) })
|
|
2373
|
-
);
|
|
2374
|
-
DialogCancel.displayName = "DialogCancel";
|
|
2375
|
-
var DialogTitle = React13.forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2376
|
-
DialogPrimitive.Title,
|
|
2377
|
-
{
|
|
2378
|
-
ref,
|
|
2379
|
-
className: cn("text-card-foreground", className),
|
|
2380
|
-
...props,
|
|
2381
|
-
children: renderTextContent(children, {
|
|
2382
|
-
as: "span",
|
|
2383
|
-
className: "block text-card-foreground",
|
|
2384
|
-
size: "h3"
|
|
2385
|
-
})
|
|
2386
|
-
}
|
|
2387
|
-
));
|
|
2388
|
-
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
2389
|
-
var DialogDescription = React13.forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2390
|
-
DialogPrimitive.Description,
|
|
2391
|
-
{
|
|
2392
|
-
ref,
|
|
2393
|
-
className: cn("text-muted-foreground", className),
|
|
2394
|
-
...props,
|
|
2395
|
-
children: renderTextContent(children, {
|
|
2396
|
-
as: "span",
|
|
2397
|
-
className: "block text-muted-foreground",
|
|
2398
|
-
size: "body"
|
|
2399
|
-
})
|
|
2400
|
-
}
|
|
2401
|
-
));
|
|
2402
|
-
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
2403
|
-
|
|
2404
|
-
// src/components/empty.tsx
|
|
2405
|
-
var React14 = __toESM(require("react"), 1);
|
|
2406
|
-
var import_class_variance_authority5 = require("class-variance-authority");
|
|
2407
|
-
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2408
|
-
var emptyMediaVariantOptions = ["default", "icon"];
|
|
2409
|
-
var emptyMediaVariants = (0, import_class_variance_authority5.cva)(
|
|
2410
|
-
"inline-flex shrink-0 items-center justify-center transition-[background-color,border-color,color,box-shadow] duration-sofya ease-sofya",
|
|
2411
|
-
{
|
|
2412
|
-
variants: {
|
|
2413
|
-
variant: {
|
|
2414
|
-
default: "[&_img]:max-w-full [&_svg]:shrink-0 [&_svg]:text-primary",
|
|
2415
|
-
icon: "h-16 w-16 rounded-full border border-primary/10 bg-primary/10 text-primary [&_svg]:h-7 [&_svg]:w-7 [&_svg]:shrink-0"
|
|
2416
|
-
}
|
|
2417
|
-
},
|
|
2418
|
-
defaultVariants: {
|
|
2419
|
-
variant: "default"
|
|
2420
|
-
}
|
|
2421
|
-
}
|
|
2422
|
-
);
|
|
2423
|
-
var EmptyMedia = React14.forwardRef(function EmptyMedia2({ className, variant, ...props }, ref) {
|
|
2424
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { ref, className: cn(emptyMediaVariants({ variant }), className), ...props });
|
|
2425
|
-
});
|
|
2426
|
-
function EmptyHeader({ className, ...props }) {
|
|
2427
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2428
|
-
"div",
|
|
2429
|
-
{
|
|
2430
|
-
className: cn("flex max-w-[34rem] flex-col items-center gap-4 text-center", className),
|
|
2431
|
-
...props
|
|
2432
|
-
}
|
|
2433
|
-
);
|
|
2434
|
-
}
|
|
2435
|
-
function EmptyTitle({ children, className, ...props }) {
|
|
2436
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2437
|
-
"h2",
|
|
2438
|
-
{
|
|
2439
|
-
className: cn("text-foreground", className),
|
|
2440
|
-
...props,
|
|
2441
|
-
children: renderTextContent(children, {
|
|
2442
|
-
as: "span",
|
|
2443
|
-
className: "block text-foreground",
|
|
2444
|
-
size: "h4"
|
|
2445
|
-
})
|
|
2446
|
-
}
|
|
2447
|
-
);
|
|
2448
|
-
}
|
|
2449
|
-
function EmptyDescription({
|
|
2450
|
-
children,
|
|
2451
|
-
className,
|
|
2452
|
-
...props
|
|
2453
|
-
}) {
|
|
2454
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2455
|
-
"p",
|
|
2456
|
-
{
|
|
2457
|
-
className: cn("max-w-full text-muted-foreground whitespace-nowrap", className),
|
|
2458
|
-
...props,
|
|
2459
|
-
children: renderTextContent(children, {
|
|
2460
|
-
as: "span",
|
|
2461
|
-
className: "inline-block whitespace-nowrap text-muted-foreground",
|
|
2462
|
-
size: "body"
|
|
2463
|
-
})
|
|
2464
|
-
}
|
|
2465
|
-
);
|
|
2466
|
-
}
|
|
2467
|
-
function EmptyContent({ children, className, ...props }) {
|
|
2468
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2469
|
-
"div",
|
|
2470
|
-
{
|
|
2471
|
-
className: cn("flex flex-wrap items-center justify-center gap-4 text-center", className),
|
|
2472
|
-
...props,
|
|
2473
|
-
children: renderTextContent(children, {
|
|
2474
|
-
as: "span"
|
|
2475
|
-
})
|
|
2476
|
-
}
|
|
2477
|
-
);
|
|
2478
|
-
}
|
|
2479
|
-
var Empty = React14.forwardRef(function Empty2({ children, className, content, description, media, title, ...props }, ref) {
|
|
2480
|
-
const hasCustomChildren = React14.Children.count(children) > 0;
|
|
2481
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2482
|
-
"div",
|
|
2483
|
-
{
|
|
2484
|
-
ref,
|
|
2485
|
-
className: cn(
|
|
2486
|
-
"flex min-h-[280px] w-full flex-col items-center justify-center gap-6 rounded-[28px] bg-gradient-to-b from-card via-card to-muted/45 px-6 py-10 text-center",
|
|
2487
|
-
className
|
|
2488
|
-
),
|
|
2489
|
-
...props,
|
|
2490
|
-
children: hasCustomChildren ? children : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
2491
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(EmptyHeader, { children: [
|
|
2492
|
-
media ?? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(EmptyMedia, { variant: "icon", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { name: "folders", size: 28 }) }),
|
|
2493
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(EmptyTitle, { children: title ?? "Nada por aqui" }),
|
|
2494
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(EmptyDescription, { children: description ?? "Quando houver conte\xFAdo dispon\xEDvel, ele aparecer\xE1 aqui." })
|
|
2495
|
-
] }),
|
|
2496
|
-
content !== void 0 && content !== null ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(EmptyContent, { children: content }) : null
|
|
2497
|
-
] })
|
|
2498
|
-
}
|
|
2499
|
-
);
|
|
2500
|
-
});
|
|
2501
|
-
Empty.displayName = "Empty";
|
|
2502
|
-
EmptyMedia.displayName = "EmptyMedia";
|
|
2503
|
-
EmptyHeader.displayName = "EmptyHeader";
|
|
2504
|
-
EmptyTitle.displayName = "EmptyTitle";
|
|
2505
|
-
EmptyDescription.displayName = "EmptyDescription";
|
|
2506
|
-
EmptyContent.displayName = "EmptyContent";
|
|
2360
|
+
// src/components/dropdown-search.tsx
|
|
2361
|
+
var React18 = __toESM(require("react"), 1);
|
|
2507
2362
|
|
|
2508
2363
|
// src/components/input.tsx
|
|
2509
|
-
var
|
|
2364
|
+
var React15 = __toESM(require("react"), 1);
|
|
2510
2365
|
var import_input_otp2 = require("input-otp");
|
|
2511
2366
|
|
|
2512
2367
|
// src/lib/field-shell.tsx
|
|
2513
|
-
var
|
|
2368
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2514
2369
|
function FieldLabel({
|
|
2515
2370
|
children,
|
|
2516
2371
|
className,
|
|
2517
2372
|
htmlFor,
|
|
2518
2373
|
textClassName = "block text-[color:var(--sofya-text-default)]",
|
|
2519
|
-
textSize = "
|
|
2374
|
+
textSize = "tiny",
|
|
2520
2375
|
textStyle = {
|
|
2521
2376
|
fontWeight: 500
|
|
2522
2377
|
}
|
|
@@ -2525,7 +2380,7 @@ function FieldLabel({
|
|
|
2525
2380
|
return null;
|
|
2526
2381
|
}
|
|
2527
2382
|
const Component = htmlFor ? "label" : "div";
|
|
2528
|
-
return /* @__PURE__ */ (0,
|
|
2383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2529
2384
|
Component,
|
|
2530
2385
|
{
|
|
2531
2386
|
className: cn("text-[color:var(--sofya-text-default)]", className),
|
|
@@ -2552,8 +2407,8 @@ function FieldShell({
|
|
|
2552
2407
|
if (!label && !containerClassName) {
|
|
2553
2408
|
return control;
|
|
2554
2409
|
}
|
|
2555
|
-
return /* @__PURE__ */ (0,
|
|
2556
|
-
label ? /* @__PURE__ */ (0,
|
|
2410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: cn("grid w-full gap-2", containerClassName), children: [
|
|
2411
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2557
2412
|
FieldLabel,
|
|
2558
2413
|
{
|
|
2559
2414
|
className: labelClassName,
|
|
@@ -2569,10 +2424,10 @@ function FieldShell({
|
|
|
2569
2424
|
}
|
|
2570
2425
|
|
|
2571
2426
|
// src/components/input-upload.tsx
|
|
2572
|
-
var
|
|
2427
|
+
var React13 = __toESM(require("react"), 1);
|
|
2573
2428
|
var import_icons_react4 = require("@tabler/icons-react");
|
|
2574
2429
|
var import_react2 = require("motion/react");
|
|
2575
|
-
var
|
|
2430
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2576
2431
|
var uploadKindOptions = ["document", "image", "video"];
|
|
2577
2432
|
var uploadAcceptByKind = {
|
|
2578
2433
|
document: ".pdf,.doc,.docx,.txt,.rtf,.odt,.jpg,.jpeg,.png,.webp,.gif",
|
|
@@ -2666,7 +2521,7 @@ function resolveUploadFileVisualKind(file, fallbackKind) {
|
|
|
2666
2521
|
return "document";
|
|
2667
2522
|
}
|
|
2668
2523
|
function UploadGlyph({ className }) {
|
|
2669
|
-
return /* @__PURE__ */ (0,
|
|
2524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2670
2525
|
import_icons_react4.IconUpload,
|
|
2671
2526
|
{
|
|
2672
2527
|
"aria-hidden": "true",
|
|
@@ -2679,7 +2534,7 @@ function UploadFileTypeGlyph({
|
|
|
2679
2534
|
kind
|
|
2680
2535
|
}) {
|
|
2681
2536
|
if (kind === "image") {
|
|
2682
|
-
return /* @__PURE__ */ (0,
|
|
2537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2683
2538
|
import_icons_react4.IconPhoto,
|
|
2684
2539
|
{
|
|
2685
2540
|
"aria-hidden": "true",
|
|
@@ -2688,7 +2543,7 @@ function UploadFileTypeGlyph({
|
|
|
2688
2543
|
);
|
|
2689
2544
|
}
|
|
2690
2545
|
if (kind === "video") {
|
|
2691
|
-
return /* @__PURE__ */ (0,
|
|
2546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2692
2547
|
import_icons_react4.IconVideo,
|
|
2693
2548
|
{
|
|
2694
2549
|
"aria-hidden": "true",
|
|
@@ -2696,7 +2551,7 @@ function UploadFileTypeGlyph({
|
|
|
2696
2551
|
}
|
|
2697
2552
|
);
|
|
2698
2553
|
}
|
|
2699
|
-
return /* @__PURE__ */ (0,
|
|
2554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2700
2555
|
import_icons_react4.IconFileText,
|
|
2701
2556
|
{
|
|
2702
2557
|
"aria-hidden": "true",
|
|
@@ -2704,7 +2559,7 @@ function UploadFileTypeGlyph({
|
|
|
2704
2559
|
}
|
|
2705
2560
|
);
|
|
2706
2561
|
}
|
|
2707
|
-
var UploadInputControl =
|
|
2562
|
+
var UploadInputControl = React13.forwardRef(function UploadInputControl2({
|
|
2708
2563
|
accept,
|
|
2709
2564
|
"aria-label": ariaLabel,
|
|
2710
2565
|
className,
|
|
@@ -2718,17 +2573,17 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2718
2573
|
resolvedId,
|
|
2719
2574
|
...uploadProps
|
|
2720
2575
|
}, ref) {
|
|
2721
|
-
const inputRef =
|
|
2722
|
-
const [isDragActive, setIsDragActive] =
|
|
2723
|
-
const [selectedFiles, setSelectedFiles] =
|
|
2576
|
+
const inputRef = React13.useRef(null);
|
|
2577
|
+
const [isDragActive, setIsDragActive] = React13.useState(false);
|
|
2578
|
+
const [selectedFiles, setSelectedFiles] = React13.useState([]);
|
|
2724
2579
|
const resolvedMultiple = multiple ?? true;
|
|
2725
2580
|
const prefersReducedMotion = (0, import_react2.useReducedMotion)();
|
|
2726
|
-
|
|
2581
|
+
React13.useImperativeHandle(ref, () => inputRef.current);
|
|
2727
2582
|
const resolvedAccept = accept ?? uploadAcceptByKind[uploadKind];
|
|
2728
2583
|
const resolvedAriaLabel = ariaLabel ?? uploadAriaLabelByKind[uploadKind];
|
|
2729
2584
|
const resolvedTitle = uploadTitle ?? "Arraste arquivos aqui ou clique para selecionar";
|
|
2730
2585
|
const resolvedDescription = uploadDescription ?? uploadDescriptionByKind[uploadKind];
|
|
2731
|
-
const syncSelectedFiles =
|
|
2586
|
+
const syncSelectedFiles = React13.useCallback(
|
|
2732
2587
|
(files) => {
|
|
2733
2588
|
const normalizedFiles = resolvedMultiple ? files : files.slice(0, 1);
|
|
2734
2589
|
setSelectedFiles(normalizedFiles);
|
|
@@ -2736,7 +2591,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2736
2591
|
},
|
|
2737
2592
|
[onFilesChange, resolvedMultiple]
|
|
2738
2593
|
);
|
|
2739
|
-
const applyFilesToInput =
|
|
2594
|
+
const applyFilesToInput = React13.useCallback((files) => {
|
|
2740
2595
|
const inputElement = inputRef.current;
|
|
2741
2596
|
if (!inputElement || typeof DataTransfer === "undefined") {
|
|
2742
2597
|
return false;
|
|
@@ -2755,7 +2610,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2755
2610
|
return false;
|
|
2756
2611
|
}
|
|
2757
2612
|
}, []);
|
|
2758
|
-
const handleInputChange =
|
|
2613
|
+
const handleInputChange = React13.useCallback(
|
|
2759
2614
|
(event) => {
|
|
2760
2615
|
const nextFiles = mergeUploadFiles(
|
|
2761
2616
|
selectedFiles,
|
|
@@ -2774,12 +2629,12 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2774
2629
|
syncSelectedFiles
|
|
2775
2630
|
]
|
|
2776
2631
|
);
|
|
2777
|
-
const openPicker =
|
|
2632
|
+
const openPicker = React13.useCallback(() => {
|
|
2778
2633
|
if (!disabled) {
|
|
2779
2634
|
inputRef.current?.click();
|
|
2780
2635
|
}
|
|
2781
2636
|
}, [disabled]);
|
|
2782
|
-
const handleKeyDown =
|
|
2637
|
+
const handleKeyDown = React13.useCallback(
|
|
2783
2638
|
(event) => {
|
|
2784
2639
|
if (disabled) {
|
|
2785
2640
|
return;
|
|
@@ -2791,7 +2646,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2791
2646
|
},
|
|
2792
2647
|
[disabled, openPicker]
|
|
2793
2648
|
);
|
|
2794
|
-
const handleDragEnter =
|
|
2649
|
+
const handleDragEnter = React13.useCallback(
|
|
2795
2650
|
(event) => {
|
|
2796
2651
|
event.preventDefault();
|
|
2797
2652
|
if (!disabled) {
|
|
@@ -2800,7 +2655,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2800
2655
|
},
|
|
2801
2656
|
[disabled]
|
|
2802
2657
|
);
|
|
2803
|
-
const handleDragLeave =
|
|
2658
|
+
const handleDragLeave = React13.useCallback(
|
|
2804
2659
|
(event) => {
|
|
2805
2660
|
if (disabled) {
|
|
2806
2661
|
return;
|
|
@@ -2813,7 +2668,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2813
2668
|
},
|
|
2814
2669
|
[disabled]
|
|
2815
2670
|
);
|
|
2816
|
-
const handleDragOver =
|
|
2671
|
+
const handleDragOver = React13.useCallback(
|
|
2817
2672
|
(event) => {
|
|
2818
2673
|
event.preventDefault();
|
|
2819
2674
|
if (disabled) {
|
|
@@ -2824,7 +2679,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2824
2679
|
},
|
|
2825
2680
|
[disabled]
|
|
2826
2681
|
);
|
|
2827
|
-
const handleDrop =
|
|
2682
|
+
const handleDrop = React13.useCallback(
|
|
2828
2683
|
(event) => {
|
|
2829
2684
|
event.preventDefault();
|
|
2830
2685
|
if (disabled) {
|
|
@@ -2857,7 +2712,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2857
2712
|
syncSelectedFiles
|
|
2858
2713
|
]
|
|
2859
2714
|
);
|
|
2860
|
-
const handleRemoveFile =
|
|
2715
|
+
const handleRemoveFile = React13.useCallback(
|
|
2861
2716
|
(fileIndex) => {
|
|
2862
2717
|
if (disabled) {
|
|
2863
2718
|
return;
|
|
@@ -2868,8 +2723,8 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2868
2723
|
},
|
|
2869
2724
|
[applyFilesToInput, disabled, selectedFiles, syncSelectedFiles]
|
|
2870
2725
|
);
|
|
2871
|
-
return /* @__PURE__ */ (0,
|
|
2872
|
-
/* @__PURE__ */ (0,
|
|
2726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "grid w-full gap-4", children: [
|
|
2727
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2873
2728
|
"input",
|
|
2874
2729
|
{
|
|
2875
2730
|
...uploadProps,
|
|
@@ -2884,7 +2739,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2884
2739
|
onChange: handleInputChange
|
|
2885
2740
|
}
|
|
2886
2741
|
),
|
|
2887
|
-
/* @__PURE__ */ (0,
|
|
2742
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2888
2743
|
"label",
|
|
2889
2744
|
{
|
|
2890
2745
|
"aria-disabled": disabled || void 0,
|
|
@@ -2904,16 +2759,16 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2904
2759
|
onDrop: handleDrop,
|
|
2905
2760
|
onKeyDown: handleKeyDown,
|
|
2906
2761
|
children: [
|
|
2907
|
-
/* @__PURE__ */ (0,
|
|
2908
|
-
/* @__PURE__ */ (0,
|
|
2762
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.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_runtime14.jsx)(UploadGlyph, { className: "size-[18px]" }) }),
|
|
2763
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-[color:var(--sofya-text-default)]", children: renderTextContent(resolvedTitle, {
|
|
2909
2764
|
as: "span",
|
|
2910
2765
|
className: "block text-[color:var(--sofya-text-default)]",
|
|
2911
|
-
size: "
|
|
2766
|
+
size: "tiny",
|
|
2912
2767
|
style: {
|
|
2913
2768
|
fontWeight: 500
|
|
2914
2769
|
}
|
|
2915
2770
|
}) }),
|
|
2916
|
-
resolvedDescription ? /* @__PURE__ */ (0,
|
|
2771
|
+
resolvedDescription ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-[color:var(--sofya-text-subtle)]", children: renderTextContent(resolvedDescription, {
|
|
2917
2772
|
as: "span",
|
|
2918
2773
|
className: "block text-[color:var(--sofya-text-subtle)]",
|
|
2919
2774
|
size: "extra-tiny"
|
|
@@ -2921,9 +2776,9 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2921
2776
|
]
|
|
2922
2777
|
}
|
|
2923
2778
|
),
|
|
2924
|
-
/* @__PURE__ */ (0,
|
|
2779
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { role: "list", className: "grid gap-4 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react2.AnimatePresence, { initial: false, children: selectedFiles.map((file, index) => {
|
|
2925
2780
|
const fileKey = resolveUploadFileSignature(file);
|
|
2926
|
-
return /* @__PURE__ */ (0,
|
|
2781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2927
2782
|
import_react2.motion.div,
|
|
2928
2783
|
{
|
|
2929
2784
|
role: "listitem",
|
|
@@ -2932,24 +2787,24 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2932
2787
|
animate: prefersReducedMotion ? { opacity: 1 } : { opacity: 1, y: 0 },
|
|
2933
2788
|
exit: prefersReducedMotion ? { opacity: 0 } : { opacity: 0, y: -6 },
|
|
2934
2789
|
transition: uploadListItemTransition,
|
|
2935
|
-
children: /* @__PURE__ */ (0,
|
|
2936
|
-
/* @__PURE__ */ (0,
|
|
2790
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Card, { variant: "card", className: "flex items-center gap-4 p-4", children: [
|
|
2791
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.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_runtime14.jsx)(
|
|
2937
2792
|
UploadFileTypeGlyph,
|
|
2938
2793
|
{
|
|
2939
2794
|
className: "size-[18px]",
|
|
2940
2795
|
kind: resolveUploadFileVisualKind(file, uploadKind)
|
|
2941
2796
|
}
|
|
2942
2797
|
) }),
|
|
2943
|
-
/* @__PURE__ */ (0,
|
|
2944
|
-
/* @__PURE__ */ (0,
|
|
2798
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
2799
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "truncate text-[color:var(--sofya-text-default)]", children: renderTextContent(file.name, {
|
|
2945
2800
|
as: "span",
|
|
2946
2801
|
className: "block truncate text-[color:var(--sofya-text-default)]",
|
|
2947
|
-
size: "
|
|
2802
|
+
size: "tiny",
|
|
2948
2803
|
style: {
|
|
2949
2804
|
fontWeight: 500
|
|
2950
2805
|
}
|
|
2951
2806
|
}) }),
|
|
2952
|
-
/* @__PURE__ */ (0,
|
|
2807
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "mt-2 text-[color:var(--sofya-text-subtle)]", children: renderTextContent(
|
|
2953
2808
|
`${resolveUploadFileBadge(
|
|
2954
2809
|
file
|
|
2955
2810
|
)} \xB7 ${formatUploadFileSize(file.size)}`,
|
|
@@ -2960,7 +2815,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2960
2815
|
}
|
|
2961
2816
|
) })
|
|
2962
2817
|
] }),
|
|
2963
|
-
/* @__PURE__ */ (0,
|
|
2818
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2964
2819
|
"button",
|
|
2965
2820
|
{
|
|
2966
2821
|
"aria-label": `Remover ${file.name}`,
|
|
@@ -2972,7 +2827,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2972
2827
|
event.stopPropagation();
|
|
2973
2828
|
handleRemoveFile(index);
|
|
2974
2829
|
},
|
|
2975
|
-
children: /* @__PURE__ */ (0,
|
|
2830
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2976
2831
|
Icon,
|
|
2977
2832
|
{
|
|
2978
2833
|
"aria-hidden": "true",
|
|
@@ -2993,11 +2848,11 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2993
2848
|
UploadInputControl.displayName = "UploadInputControl";
|
|
2994
2849
|
|
|
2995
2850
|
// src/components/input-otp.tsx
|
|
2996
|
-
var
|
|
2851
|
+
var React14 = __toESM(require("react"), 1);
|
|
2997
2852
|
var import_input_otp = require("input-otp");
|
|
2998
|
-
var
|
|
2999
|
-
var InputOTP =
|
|
3000
|
-
return /* @__PURE__ */ (0,
|
|
2853
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2854
|
+
var InputOTP = React14.forwardRef(({ className, containerClassName, ...props }, ref) => {
|
|
2855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3001
2856
|
import_input_otp.OTPInput,
|
|
3002
2857
|
{
|
|
3003
2858
|
ref,
|
|
@@ -3011,8 +2866,8 @@ var InputOTP = React16.forwardRef(({ className, containerClassName, ...props },
|
|
|
3011
2866
|
);
|
|
3012
2867
|
});
|
|
3013
2868
|
InputOTP.displayName = "InputOTP";
|
|
3014
|
-
var InputOTPGroup =
|
|
3015
|
-
return /* @__PURE__ */ (0,
|
|
2869
|
+
var InputOTPGroup = React14.forwardRef(({ className, ...props }, ref) => {
|
|
2870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3016
2871
|
"div",
|
|
3017
2872
|
{
|
|
3018
2873
|
ref,
|
|
@@ -3025,12 +2880,12 @@ var InputOTPGroup = React16.forwardRef(({ className, ...props }, ref) => {
|
|
|
3025
2880
|
);
|
|
3026
2881
|
});
|
|
3027
2882
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
3028
|
-
var InputOTPSlot =
|
|
2883
|
+
var InputOTPSlot = React14.forwardRef(
|
|
3029
2884
|
({ className, index, ...props }, ref) => {
|
|
3030
|
-
const otpContext =
|
|
2885
|
+
const otpContext = React14.useContext(import_input_otp.OTPInputContext);
|
|
3031
2886
|
const slot = otpContext.slots[index];
|
|
3032
2887
|
if (!slot) {
|
|
3033
|
-
return /* @__PURE__ */ (0,
|
|
2888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3034
2889
|
"div",
|
|
3035
2890
|
{
|
|
3036
2891
|
ref,
|
|
@@ -3042,7 +2897,7 @@ var InputOTPSlot = React16.forwardRef(
|
|
|
3042
2897
|
}
|
|
3043
2898
|
);
|
|
3044
2899
|
}
|
|
3045
|
-
return /* @__PURE__ */ (0,
|
|
2900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3046
2901
|
"div",
|
|
3047
2902
|
{
|
|
3048
2903
|
ref,
|
|
@@ -3054,15 +2909,15 @@ var InputOTPSlot = React16.forwardRef(
|
|
|
3054
2909
|
...props,
|
|
3055
2910
|
children: [
|
|
3056
2911
|
slot.char ?? null,
|
|
3057
|
-
slot.hasFakeCaret ? /* @__PURE__ */ (0,
|
|
2912
|
+
slot.hasFakeCaret ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "h-10 w-[2px] animate-pulse rounded-full bg-primary shadow-[var(--sofya-shadow-caret-glow)]" }) }) : null
|
|
3058
2913
|
]
|
|
3059
2914
|
}
|
|
3060
2915
|
);
|
|
3061
2916
|
}
|
|
3062
2917
|
);
|
|
3063
2918
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
3064
|
-
var InputOTPSeparator =
|
|
3065
|
-
return /* @__PURE__ */ (0,
|
|
2919
|
+
var InputOTPSeparator = React14.forwardRef(({ className, ...props }, ref) => {
|
|
2920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3066
2921
|
"div",
|
|
3067
2922
|
{
|
|
3068
2923
|
ref,
|
|
@@ -3072,22 +2927,22 @@ var InputOTPSeparator = React16.forwardRef(({ className, ...props }, ref) => {
|
|
|
3072
2927
|
className
|
|
3073
2928
|
),
|
|
3074
2929
|
...props,
|
|
3075
|
-
children: /* @__PURE__ */ (0,
|
|
2930
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { "aria-hidden": "true", children: "." })
|
|
3076
2931
|
}
|
|
3077
2932
|
);
|
|
3078
2933
|
});
|
|
3079
2934
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
3080
2935
|
|
|
3081
2936
|
// src/components/input.tsx
|
|
3082
|
-
var
|
|
2937
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
3083
2938
|
var inputVariantOptions = [
|
|
3084
2939
|
"default",
|
|
3085
2940
|
"search",
|
|
3086
2941
|
"otp",
|
|
3087
2942
|
"upload"
|
|
3088
2943
|
];
|
|
3089
|
-
var Input =
|
|
3090
|
-
const generatedId =
|
|
2944
|
+
var Input = React15.forwardRef((props, ref) => {
|
|
2945
|
+
const generatedId = React15.useId();
|
|
3091
2946
|
const resolvedId = props.id ?? generatedId;
|
|
3092
2947
|
const variant = props.variant ?? "default";
|
|
3093
2948
|
if (variant === "otp") {
|
|
@@ -3115,7 +2970,7 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
3115
2970
|
);
|
|
3116
2971
|
const hasTrailingGroup = resolvedSplitIndex < resolvedLength;
|
|
3117
2972
|
const otpAriaLabel = otpProps["aria-label"] ?? "Verification code";
|
|
3118
|
-
const otpControl = /* @__PURE__ */ (0,
|
|
2973
|
+
const otpControl = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3119
2974
|
InputOTP,
|
|
3120
2975
|
{
|
|
3121
2976
|
ref,
|
|
@@ -3128,7 +2983,7 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
3128
2983
|
containerClassName: className2,
|
|
3129
2984
|
...otpProps,
|
|
3130
2985
|
children: [
|
|
3131
|
-
/* @__PURE__ */ (0,
|
|
2986
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(InputOTPGroup, { className: otpGroupClassName, children: Array.from({ length: resolvedSplitIndex }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3132
2987
|
InputOTPSlot,
|
|
3133
2988
|
{
|
|
3134
2989
|
className: otpSlotClassName,
|
|
@@ -3136,10 +2991,10 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
3136
2991
|
},
|
|
3137
2992
|
`otp-leading-${index}`
|
|
3138
2993
|
)) }),
|
|
3139
|
-
hasTrailingGroup ? otpSeparator ?? /* @__PURE__ */ (0,
|
|
3140
|
-
hasTrailingGroup ? /* @__PURE__ */ (0,
|
|
2994
|
+
hasTrailingGroup ? otpSeparator ?? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(InputOTPSeparator, { className: otpSeparatorClassName }) : null,
|
|
2995
|
+
hasTrailingGroup ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(InputOTPGroup, { className: otpGroupClassName, children: Array.from(
|
|
3141
2996
|
{ length: resolvedLength - resolvedSplitIndex },
|
|
3142
|
-
(_, index) => /* @__PURE__ */ (0,
|
|
2997
|
+
(_, index) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3143
2998
|
InputOTPSlot,
|
|
3144
2999
|
{
|
|
3145
3000
|
className: otpSlotClassName,
|
|
@@ -3151,7 +3006,7 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
3151
3006
|
]
|
|
3152
3007
|
}
|
|
3153
3008
|
);
|
|
3154
|
-
return /* @__PURE__ */ (0,
|
|
3009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3155
3010
|
FieldShell,
|
|
3156
3011
|
{
|
|
3157
3012
|
containerClassName: containerClassName2,
|
|
@@ -3170,7 +3025,7 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
3170
3025
|
variant: _variant2,
|
|
3171
3026
|
...uploadProps
|
|
3172
3027
|
} = props;
|
|
3173
|
-
const uploadControl = /* @__PURE__ */ (0,
|
|
3028
|
+
const uploadControl = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3174
3029
|
UploadInputControl,
|
|
3175
3030
|
{
|
|
3176
3031
|
...uploadProps,
|
|
@@ -3178,22 +3033,22 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
3178
3033
|
resolvedId
|
|
3179
3034
|
}
|
|
3180
3035
|
);
|
|
3181
|
-
const uploadLabel = label2 || uploadOptionalLabel ? /* @__PURE__ */ (0,
|
|
3036
|
+
const uploadLabel = label2 || uploadOptionalLabel ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
3182
3037
|
renderTextContent(label2, {
|
|
3183
3038
|
as: "span",
|
|
3184
3039
|
className: "text-[color:var(--sofya-text-default)]",
|
|
3185
|
-
size: "
|
|
3040
|
+
size: "tiny",
|
|
3186
3041
|
style: {
|
|
3187
3042
|
fontWeight: 700
|
|
3188
3043
|
}
|
|
3189
3044
|
}),
|
|
3190
|
-
uploadOptionalLabel ? /* @__PURE__ */ (0,
|
|
3045
|
+
uploadOptionalLabel ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "ml-2 text-[color:var(--sofya-text-subtle)]", children: renderTextContent(uploadOptionalLabel, {
|
|
3191
3046
|
as: "span",
|
|
3192
3047
|
className: "text-[color:var(--sofya-text-subtle)]",
|
|
3193
3048
|
size: "tiny"
|
|
3194
3049
|
}) }) : null
|
|
3195
3050
|
] }) : void 0;
|
|
3196
|
-
return /* @__PURE__ */ (0,
|
|
3051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3197
3052
|
FieldShell,
|
|
3198
3053
|
{
|
|
3199
3054
|
containerClassName: containerClassName2,
|
|
@@ -3216,8 +3071,8 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
3216
3071
|
const isSearch = variant === "search";
|
|
3217
3072
|
const resolvedType = type ?? (isSearch ? "search" : void 0);
|
|
3218
3073
|
const ariaLabel = nativeProps["aria-label"] ?? (typeof label === "string" ? label : isSearch ? "Search" : void 0);
|
|
3219
|
-
const nativeControl = isSearch ? /* @__PURE__ */ (0,
|
|
3220
|
-
/* @__PURE__ */ (0,
|
|
3074
|
+
const nativeControl = isSearch ? /* @__PURE__ */ (0, import_jsx_runtime16.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: [
|
|
3075
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3221
3076
|
Icon,
|
|
3222
3077
|
{
|
|
3223
3078
|
"aria-hidden": "true",
|
|
@@ -3226,7 +3081,7 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
3226
3081
|
size: 32
|
|
3227
3082
|
}
|
|
3228
3083
|
),
|
|
3229
|
-
/* @__PURE__ */ (0,
|
|
3084
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3230
3085
|
"input",
|
|
3231
3086
|
{
|
|
3232
3087
|
id: resolvedId,
|
|
@@ -3242,39 +3097,587 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
3242
3097
|
placeholder: nativeProps.placeholder ?? "Search"
|
|
3243
3098
|
}
|
|
3244
3099
|
)
|
|
3245
|
-
] }) : /* @__PURE__ */ (0,
|
|
3100
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3246
3101
|
"input",
|
|
3247
3102
|
{
|
|
3248
|
-
id: resolvedId,
|
|
3103
|
+
id: resolvedId,
|
|
3104
|
+
ref,
|
|
3105
|
+
type: resolvedType,
|
|
3106
|
+
className: cn(
|
|
3107
|
+
"flex h-10 w-full rounded-[10px] border border-[color:var(--sofya-border-strong)] bg-card px-4 py-2 [font-family:var(--sofya-text-tiny-font-family)] text-[length:var(--sofya-text-tiny-font-size)] [font-weight:var(--sofya-text-tiny-font-weight)] leading-[var(--sofya-text-tiny-line-height)] tracking-[var(--sofya-text-tiny-letter-spacing)] 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",
|
|
3108
|
+
className
|
|
3109
|
+
),
|
|
3110
|
+
...nativeProps,
|
|
3111
|
+
"aria-label": ariaLabel
|
|
3112
|
+
}
|
|
3113
|
+
);
|
|
3114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3115
|
+
FieldShell,
|
|
3116
|
+
{
|
|
3117
|
+
containerClassName,
|
|
3118
|
+
control: nativeControl,
|
|
3119
|
+
label: isSearch ? void 0 : label,
|
|
3120
|
+
labelClassName: isSearch ? void 0 : labelClassName,
|
|
3121
|
+
labelHtmlFor: isSearch ? void 0 : resolvedId
|
|
3122
|
+
}
|
|
3123
|
+
);
|
|
3124
|
+
});
|
|
3125
|
+
Input.displayName = "Input";
|
|
3126
|
+
|
|
3127
|
+
// src/components/popover.tsx
|
|
3128
|
+
var React16 = __toESM(require("react"), 1);
|
|
3129
|
+
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
3130
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3131
|
+
var Popover = PopoverPrimitive.Root;
|
|
3132
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
3133
|
+
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
3134
|
+
var PopoverPortal = PopoverPrimitive.Portal;
|
|
3135
|
+
var PopoverClose = PopoverPrimitive.Close;
|
|
3136
|
+
var PopoverContent = React16.forwardRef(function PopoverContent2({
|
|
3137
|
+
align = "center",
|
|
3138
|
+
className,
|
|
3139
|
+
collisionPadding = 8,
|
|
3140
|
+
sideOffset = 8,
|
|
3141
|
+
...props
|
|
3142
|
+
}, ref) {
|
|
3143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3144
|
+
PopoverPrimitive.Content,
|
|
3145
|
+
{
|
|
3146
|
+
ref,
|
|
3147
|
+
align,
|
|
3148
|
+
collisionPadding,
|
|
3149
|
+
sideOffset,
|
|
3150
|
+
"data-slot": "popover-content",
|
|
3151
|
+
className: cn(
|
|
3152
|
+
"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",
|
|
3153
|
+
className
|
|
3154
|
+
),
|
|
3155
|
+
...props
|
|
3156
|
+
}
|
|
3157
|
+
) });
|
|
3158
|
+
});
|
|
3159
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
3160
|
+
var PopoverTitle = React16.forwardRef(function PopoverTitle2({ children, className, ...props }, ref) {
|
|
3161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3162
|
+
"h4",
|
|
3163
|
+
{
|
|
3164
|
+
ref,
|
|
3165
|
+
"data-slot": "popover-title",
|
|
3166
|
+
className: cn("text-[hsl(var(--sofya-popover-foreground))]", className),
|
|
3167
|
+
...props,
|
|
3168
|
+
children: renderTextContent(children, {
|
|
3169
|
+
as: "span",
|
|
3170
|
+
className: "block text-[hsl(var(--sofya-popover-foreground))]",
|
|
3171
|
+
size: "h4"
|
|
3172
|
+
})
|
|
3173
|
+
}
|
|
3174
|
+
);
|
|
3175
|
+
});
|
|
3176
|
+
PopoverTitle.displayName = "PopoverTitle";
|
|
3177
|
+
var PopoverDescription = React16.forwardRef(function PopoverDescription2({ children, className, ...props }, ref) {
|
|
3178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3179
|
+
"p",
|
|
3180
|
+
{
|
|
3181
|
+
ref,
|
|
3182
|
+
"data-slot": "popover-description",
|
|
3183
|
+
className: cn("text-muted-foreground", className),
|
|
3184
|
+
...props,
|
|
3185
|
+
children: renderTextContent(children, {
|
|
3186
|
+
as: "span",
|
|
3187
|
+
className: "block text-muted-foreground",
|
|
3188
|
+
size: "body"
|
|
3189
|
+
})
|
|
3190
|
+
}
|
|
3191
|
+
);
|
|
3192
|
+
});
|
|
3193
|
+
PopoverDescription.displayName = "PopoverDescription";
|
|
3194
|
+
|
|
3195
|
+
// src/components/spinner.tsx
|
|
3196
|
+
var React17 = __toESM(require("react"), 1);
|
|
3197
|
+
var import_icons_react5 = require("@tabler/icons-react");
|
|
3198
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3199
|
+
var spinnerSizeOptions = ["sm", "default", "lg"];
|
|
3200
|
+
var Spinner = React17.forwardRef(function Spinner2({
|
|
3201
|
+
"aria-label": ariaLabelProp,
|
|
3202
|
+
"aria-labelledby": ariaLabelledby,
|
|
3203
|
+
className,
|
|
3204
|
+
role = "status",
|
|
3205
|
+
size = "default",
|
|
3206
|
+
...props
|
|
3207
|
+
}, ref) {
|
|
3208
|
+
const ariaLabel = ariaLabelProp ?? (ariaLabelledby ? void 0 : "Loading");
|
|
3209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3210
|
+
import_icons_react5.IconLoader2,
|
|
3211
|
+
{
|
|
3212
|
+
ref,
|
|
3213
|
+
"data-size": size,
|
|
3214
|
+
"data-slot": "spinner",
|
|
3215
|
+
role,
|
|
3216
|
+
"aria-label": ariaLabel,
|
|
3217
|
+
"aria-labelledby": ariaLabelledby,
|
|
3218
|
+
className: cn(
|
|
3219
|
+
"shrink-0 animate-spin text-primary data-[size=sm]:h-3.5 data-[size=sm]:w-3.5 data-[size=default]:h-4 data-[size=default]:w-4 data-[size=lg]:h-6 data-[size=lg]:w-6",
|
|
3220
|
+
className
|
|
3221
|
+
),
|
|
3222
|
+
...props
|
|
3223
|
+
}
|
|
3224
|
+
);
|
|
3225
|
+
});
|
|
3226
|
+
Spinner.displayName = "Spinner";
|
|
3227
|
+
|
|
3228
|
+
// src/components/dropdown-search.tsx
|
|
3229
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3230
|
+
var DropdownSearch = React18.forwardRef(
|
|
3231
|
+
function DropdownSearch2({
|
|
3232
|
+
className,
|
|
3233
|
+
containerClassName,
|
|
3234
|
+
defaultQuery = "",
|
|
3235
|
+
defaultValue,
|
|
3236
|
+
disabled,
|
|
3237
|
+
emptyMessage = "No results found",
|
|
3238
|
+
label,
|
|
3239
|
+
labelClassName,
|
|
3240
|
+
loading,
|
|
3241
|
+
onChange,
|
|
3242
|
+
onQueryChange,
|
|
3243
|
+
options = [],
|
|
3244
|
+
placeholder = "Search...",
|
|
3245
|
+
query: queryProp,
|
|
3246
|
+
value: valueProp
|
|
3247
|
+
}, ref) {
|
|
3248
|
+
const listboxId = React18.useId();
|
|
3249
|
+
const [open, setOpen] = React18.useState(false);
|
|
3250
|
+
const [query, setQuery] = useControllableState({
|
|
3251
|
+
defaultValue: defaultQuery,
|
|
3252
|
+
onChange: onQueryChange,
|
|
3253
|
+
value: queryProp
|
|
3254
|
+
});
|
|
3255
|
+
const [value, setValue] = useControllableState({
|
|
3256
|
+
defaultValue,
|
|
3257
|
+
onChange,
|
|
3258
|
+
value: valueProp
|
|
3259
|
+
});
|
|
3260
|
+
const inputRef = React18.useRef(null);
|
|
3261
|
+
const listRef = React18.useRef(null);
|
|
3262
|
+
const setInputRef = React18.useCallback(
|
|
3263
|
+
(node) => {
|
|
3264
|
+
inputRef.current = node;
|
|
3265
|
+
if (typeof ref === "function") {
|
|
3266
|
+
ref(node);
|
|
3267
|
+
} else if (ref) {
|
|
3268
|
+
ref.current = node;
|
|
3269
|
+
}
|
|
3270
|
+
},
|
|
3271
|
+
[ref]
|
|
3272
|
+
);
|
|
3273
|
+
function handleInputChange(e) {
|
|
3274
|
+
setQuery(e.target.value);
|
|
3275
|
+
setOpen(true);
|
|
3276
|
+
}
|
|
3277
|
+
function handleInputFocus() {
|
|
3278
|
+
setOpen(true);
|
|
3279
|
+
}
|
|
3280
|
+
function handleInputKeyDown(e) {
|
|
3281
|
+
if (e.key === "ArrowDown") {
|
|
3282
|
+
e.preventDefault();
|
|
3283
|
+
listRef.current?.querySelector(
|
|
3284
|
+
"[data-dropdown-search-item]:not([disabled])"
|
|
3285
|
+
)?.focus();
|
|
3286
|
+
}
|
|
3287
|
+
if (e.key === "Escape") {
|
|
3288
|
+
setOpen(false);
|
|
3289
|
+
}
|
|
3290
|
+
}
|
|
3291
|
+
function handleItemKeyDown(e, option) {
|
|
3292
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
3293
|
+
e.preventDefault();
|
|
3294
|
+
handleSelect(option);
|
|
3295
|
+
return;
|
|
3296
|
+
}
|
|
3297
|
+
if (e.key === "ArrowDown") {
|
|
3298
|
+
e.preventDefault();
|
|
3299
|
+
e.currentTarget.closest("li")?.nextElementSibling?.querySelector("[data-dropdown-search-item]")?.focus();
|
|
3300
|
+
return;
|
|
3301
|
+
}
|
|
3302
|
+
if (e.key === "ArrowUp") {
|
|
3303
|
+
e.preventDefault();
|
|
3304
|
+
const prevLi = e.currentTarget.closest("li")?.previousElementSibling;
|
|
3305
|
+
if (prevLi) {
|
|
3306
|
+
prevLi.querySelector("[data-dropdown-search-item]")?.focus();
|
|
3307
|
+
} else {
|
|
3308
|
+
inputRef.current?.focus();
|
|
3309
|
+
}
|
|
3310
|
+
return;
|
|
3311
|
+
}
|
|
3312
|
+
if (e.key === "Escape") {
|
|
3313
|
+
setOpen(false);
|
|
3314
|
+
inputRef.current?.focus();
|
|
3315
|
+
}
|
|
3316
|
+
}
|
|
3317
|
+
function handleSelect(option) {
|
|
3318
|
+
if (option.disabled) return;
|
|
3319
|
+
setValue(option.value);
|
|
3320
|
+
setQuery(option.label);
|
|
3321
|
+
setOpen(false);
|
|
3322
|
+
}
|
|
3323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
3324
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: cn("w-full", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3325
|
+
Input,
|
|
3326
|
+
{
|
|
3327
|
+
ref: setInputRef,
|
|
3328
|
+
"aria-autocomplete": "list",
|
|
3329
|
+
"aria-controls": open ? listboxId : void 0,
|
|
3330
|
+
"aria-expanded": open,
|
|
3331
|
+
"aria-haspopup": "listbox",
|
|
3332
|
+
autoComplete: "off",
|
|
3333
|
+
className,
|
|
3334
|
+
disabled,
|
|
3335
|
+
label,
|
|
3336
|
+
labelClassName,
|
|
3337
|
+
placeholder,
|
|
3338
|
+
role: "combobox",
|
|
3339
|
+
value: query ?? "",
|
|
3340
|
+
onChange: handleInputChange,
|
|
3341
|
+
onFocus: handleInputFocus,
|
|
3342
|
+
onKeyDown: handleInputKeyDown
|
|
3343
|
+
}
|
|
3344
|
+
) }) }),
|
|
3345
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3346
|
+
PopoverContent,
|
|
3347
|
+
{
|
|
3348
|
+
align: "start",
|
|
3349
|
+
className: "w-[var(--radix-popover-trigger-width)] p-1",
|
|
3350
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
3351
|
+
onInteractOutside: (e) => {
|
|
3352
|
+
if (inputRef.current?.closest("div")?.contains(e.target)) {
|
|
3353
|
+
e.preventDefault();
|
|
3354
|
+
}
|
|
3355
|
+
},
|
|
3356
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Spinner, { size: "sm" }) }) : options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "px-3 py-4 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3357
|
+
Text,
|
|
3358
|
+
{
|
|
3359
|
+
as: "span",
|
|
3360
|
+
size: "tiny",
|
|
3361
|
+
className: "text-[color:var(--sofya-text-subtle)]",
|
|
3362
|
+
children: emptyMessage
|
|
3363
|
+
}
|
|
3364
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3365
|
+
"ul",
|
|
3366
|
+
{
|
|
3367
|
+
ref: listRef,
|
|
3368
|
+
id: listboxId,
|
|
3369
|
+
role: "listbox",
|
|
3370
|
+
"aria-label": typeof label === "string" ? label : "Options",
|
|
3371
|
+
className: "flex flex-col gap-0.5",
|
|
3372
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3373
|
+
"li",
|
|
3374
|
+
{
|
|
3375
|
+
role: "option",
|
|
3376
|
+
"aria-selected": value === option.value,
|
|
3377
|
+
"aria-disabled": option.disabled,
|
|
3378
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3379
|
+
"button",
|
|
3380
|
+
{
|
|
3381
|
+
"data-dropdown-search-item": true,
|
|
3382
|
+
type: "button",
|
|
3383
|
+
disabled: option.disabled,
|
|
3384
|
+
className: cn(
|
|
3385
|
+
"flex w-full items-center gap-3 rounded-[8px] px-3 py-2 text-left",
|
|
3386
|
+
"[font-family:var(--sofya-text-tiny-font-family)] text-[length:var(--sofya-text-tiny-font-size)] [font-weight:var(--sofya-text-tiny-font-weight)] leading-[var(--sofya-text-tiny-line-height)]",
|
|
3387
|
+
"transition-colors duration-sofya ease-sofya",
|
|
3388
|
+
"text-[color:var(--sofya-text-default)] hover:bg-muted focus-visible:bg-muted focus-visible:outline-none",
|
|
3389
|
+
"disabled:cursor-not-allowed disabled:opacity-40",
|
|
3390
|
+
value === option.value && "bg-muted"
|
|
3391
|
+
),
|
|
3392
|
+
onClick: () => handleSelect(option),
|
|
3393
|
+
onKeyDown: (e) => handleItemKeyDown(e, option),
|
|
3394
|
+
children: [
|
|
3395
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
3396
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { as: "span", size: "tiny", className: "truncate", children: option.label }),
|
|
3397
|
+
option.description ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3398
|
+
Text,
|
|
3399
|
+
{
|
|
3400
|
+
as: "span",
|
|
3401
|
+
size: "tiny",
|
|
3402
|
+
className: "truncate text-[color:var(--sofya-text-subtle)]",
|
|
3403
|
+
children: option.description
|
|
3404
|
+
}
|
|
3405
|
+
) : null
|
|
3406
|
+
] }),
|
|
3407
|
+
value === option.value ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3408
|
+
Icon,
|
|
3409
|
+
{
|
|
3410
|
+
"aria-hidden": "true",
|
|
3411
|
+
className: "shrink-0 text-primary",
|
|
3412
|
+
name: "check",
|
|
3413
|
+
size: 16
|
|
3414
|
+
}
|
|
3415
|
+
) : null
|
|
3416
|
+
]
|
|
3417
|
+
}
|
|
3418
|
+
)
|
|
3419
|
+
},
|
|
3420
|
+
option.value
|
|
3421
|
+
))
|
|
3422
|
+
}
|
|
3423
|
+
)
|
|
3424
|
+
}
|
|
3425
|
+
)
|
|
3426
|
+
] });
|
|
3427
|
+
}
|
|
3428
|
+
);
|
|
3429
|
+
DropdownSearch.displayName = "DropdownSearch";
|
|
3430
|
+
|
|
3431
|
+
// src/components/dialog.tsx
|
|
3432
|
+
var React19 = __toESM(require("react"), 1);
|
|
3433
|
+
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
3434
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
3435
|
+
var Dialog = DialogPrimitive.Root;
|
|
3436
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
3437
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
3438
|
+
var DialogClose = DialogPrimitive.Close;
|
|
3439
|
+
var DialogInternalContext = React19.createContext({
|
|
3440
|
+
showCloseButton: true
|
|
3441
|
+
});
|
|
3442
|
+
var DialogOverlay = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3443
|
+
DialogPrimitive.Overlay,
|
|
3444
|
+
{
|
|
3445
|
+
ref,
|
|
3446
|
+
className: cn(
|
|
3447
|
+
"sofya-dialog-overlay fixed inset-0 z-50 bg-foreground/24 backdrop-blur-[6px]",
|
|
3448
|
+
className
|
|
3449
|
+
),
|
|
3450
|
+
...props
|
|
3451
|
+
}
|
|
3452
|
+
));
|
|
3453
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
3454
|
+
var DialogContent = React19.forwardRef(
|
|
3455
|
+
({
|
|
3456
|
+
className,
|
|
3457
|
+
children,
|
|
3458
|
+
cardClassName,
|
|
3459
|
+
overlayClassName,
|
|
3460
|
+
showCloseButton = true,
|
|
3461
|
+
variant = "card",
|
|
3462
|
+
...props
|
|
3463
|
+
}, ref) => {
|
|
3464
|
+
const dialogCardStyle = {
|
|
3465
|
+
"--sofya-surface-shadow-override": "var(--sofya-shadow-lg)"
|
|
3466
|
+
};
|
|
3467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DialogInternalContext.Provider, { value: { showCloseButton }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(DialogPortal, { children: [
|
|
3468
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DialogOverlay, { className: overlayClassName }),
|
|
3469
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "sofya-dialog-positioner fixed inset-0 z-50 flex items-center justify-center p-4", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3470
|
+
DialogPrimitive.Content,
|
|
3471
|
+
{
|
|
3472
|
+
ref,
|
|
3473
|
+
className: cn(
|
|
3474
|
+
"sofya-dialog-content relative flex w-full max-w-[680px] max-h-[calc(100vh-2rem)] outline-none",
|
|
3475
|
+
className
|
|
3476
|
+
),
|
|
3477
|
+
...props,
|
|
3478
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3479
|
+
Card,
|
|
3480
|
+
{
|
|
3481
|
+
variant,
|
|
3482
|
+
className: cn(
|
|
3483
|
+
"flex max-h-[inherit] min-h-0 w-full flex-col gap-6 overflow-y-auto overflow-x-hidden p-6",
|
|
3484
|
+
cardClassName
|
|
3485
|
+
),
|
|
3486
|
+
style: dialogCardStyle,
|
|
3487
|
+
children
|
|
3488
|
+
}
|
|
3489
|
+
)
|
|
3490
|
+
}
|
|
3491
|
+
) })
|
|
3492
|
+
] }) });
|
|
3493
|
+
}
|
|
3494
|
+
);
|
|
3495
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
3496
|
+
function DialogHeader({ className, children, ...props }) {
|
|
3497
|
+
const { showCloseButton } = React19.useContext(DialogInternalContext);
|
|
3498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3499
|
+
"div",
|
|
3500
|
+
{
|
|
3501
|
+
className: cn("flex w-full items-start justify-between gap-4", className),
|
|
3502
|
+
...props,
|
|
3503
|
+
children: [
|
|
3504
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex min-w-0 flex-1 flex-col gap-2 text-left", children }),
|
|
3505
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3506
|
+
Button,
|
|
3507
|
+
{
|
|
3508
|
+
type: "button",
|
|
3509
|
+
variant: "ghost",
|
|
3510
|
+
size: "icon",
|
|
3511
|
+
"aria-label": "Close",
|
|
3512
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: "x", size: 18 }),
|
|
3513
|
+
className: "shrink-0 text-muted-foreground hover:text-foreground"
|
|
3514
|
+
}
|
|
3515
|
+
) }) : null
|
|
3516
|
+
]
|
|
3517
|
+
}
|
|
3518
|
+
);
|
|
3519
|
+
}
|
|
3520
|
+
function DialogBody({ className, ...props }) {
|
|
3521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3522
|
+
"div",
|
|
3523
|
+
{
|
|
3524
|
+
className: cn("flex flex-col gap-4", className),
|
|
3525
|
+
...props
|
|
3526
|
+
}
|
|
3527
|
+
);
|
|
3528
|
+
}
|
|
3529
|
+
function DialogFooter({ className, ...props }) {
|
|
3530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3531
|
+
"div",
|
|
3532
|
+
{
|
|
3533
|
+
className: cn("flex items-center justify-end gap-2", className),
|
|
3534
|
+
...props
|
|
3535
|
+
}
|
|
3536
|
+
);
|
|
3537
|
+
}
|
|
3538
|
+
var DialogCancel = React19.forwardRef(
|
|
3539
|
+
({ type = "button", variant = "ghost", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { ref, type, variant, ...props }) })
|
|
3540
|
+
);
|
|
3541
|
+
DialogCancel.displayName = "DialogCancel";
|
|
3542
|
+
var DialogTitle = React19.forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3543
|
+
DialogPrimitive.Title,
|
|
3544
|
+
{
|
|
3545
|
+
ref,
|
|
3546
|
+
className: cn("text-card-foreground", className),
|
|
3547
|
+
...props,
|
|
3548
|
+
children: renderTextContent(children, {
|
|
3549
|
+
as: "span",
|
|
3550
|
+
className: "block text-card-foreground",
|
|
3551
|
+
size: "h3"
|
|
3552
|
+
})
|
|
3553
|
+
}
|
|
3554
|
+
));
|
|
3555
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
3556
|
+
var DialogDescription = React19.forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3557
|
+
DialogPrimitive.Description,
|
|
3558
|
+
{
|
|
3559
|
+
ref,
|
|
3560
|
+
className: cn("text-muted-foreground", className),
|
|
3561
|
+
...props,
|
|
3562
|
+
children: renderTextContent(children, {
|
|
3563
|
+
as: "span",
|
|
3564
|
+
className: "block text-muted-foreground",
|
|
3565
|
+
size: "body"
|
|
3566
|
+
})
|
|
3567
|
+
}
|
|
3568
|
+
));
|
|
3569
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
3570
|
+
|
|
3571
|
+
// src/components/empty.tsx
|
|
3572
|
+
var React20 = __toESM(require("react"), 1);
|
|
3573
|
+
var import_class_variance_authority5 = require("class-variance-authority");
|
|
3574
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3575
|
+
var emptyMediaVariantOptions = ["default", "icon"];
|
|
3576
|
+
var emptyMediaVariants = (0, import_class_variance_authority5.cva)(
|
|
3577
|
+
"inline-flex shrink-0 items-center justify-center transition-[background-color,border-color,color,box-shadow] duration-sofya ease-sofya",
|
|
3578
|
+
{
|
|
3579
|
+
variants: {
|
|
3580
|
+
variant: {
|
|
3581
|
+
default: "[&_img]:max-w-full [&_svg]:shrink-0 [&_svg]:text-primary",
|
|
3582
|
+
icon: "h-16 w-16 rounded-full border border-primary/10 bg-primary/10 text-primary [&_svg]:h-7 [&_svg]:w-7 [&_svg]:shrink-0"
|
|
3583
|
+
}
|
|
3584
|
+
},
|
|
3585
|
+
defaultVariants: {
|
|
3586
|
+
variant: "default"
|
|
3587
|
+
}
|
|
3588
|
+
}
|
|
3589
|
+
);
|
|
3590
|
+
var EmptyMedia = React20.forwardRef(function EmptyMedia2({ className, variant, ...props }, ref) {
|
|
3591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { ref, className: cn(emptyMediaVariants({ variant }), className), ...props });
|
|
3592
|
+
});
|
|
3593
|
+
function EmptyHeader({ className, ...props }) {
|
|
3594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3595
|
+
"div",
|
|
3596
|
+
{
|
|
3597
|
+
className: cn("flex max-w-[34rem] flex-col items-center gap-4 text-center", className),
|
|
3598
|
+
...props
|
|
3599
|
+
}
|
|
3600
|
+
);
|
|
3601
|
+
}
|
|
3602
|
+
function EmptyTitle({ children, className, ...props }) {
|
|
3603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3604
|
+
"h2",
|
|
3605
|
+
{
|
|
3606
|
+
className: cn("text-foreground", className),
|
|
3607
|
+
...props,
|
|
3608
|
+
children: renderTextContent(children, {
|
|
3609
|
+
as: "span",
|
|
3610
|
+
className: "block text-foreground",
|
|
3611
|
+
size: "h4"
|
|
3612
|
+
})
|
|
3613
|
+
}
|
|
3614
|
+
);
|
|
3615
|
+
}
|
|
3616
|
+
function EmptyDescription({
|
|
3617
|
+
children,
|
|
3618
|
+
className,
|
|
3619
|
+
...props
|
|
3620
|
+
}) {
|
|
3621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3622
|
+
"p",
|
|
3623
|
+
{
|
|
3624
|
+
className: cn("max-w-full text-muted-foreground whitespace-nowrap", className),
|
|
3625
|
+
...props,
|
|
3626
|
+
children: renderTextContent(children, {
|
|
3627
|
+
as: "span",
|
|
3628
|
+
className: "inline-block whitespace-nowrap text-muted-foreground",
|
|
3629
|
+
size: "body"
|
|
3630
|
+
})
|
|
3631
|
+
}
|
|
3632
|
+
);
|
|
3633
|
+
}
|
|
3634
|
+
function EmptyContent({ children, className, ...props }) {
|
|
3635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3636
|
+
"div",
|
|
3637
|
+
{
|
|
3638
|
+
className: cn("flex flex-wrap items-center justify-center gap-4 text-center", className),
|
|
3639
|
+
...props,
|
|
3640
|
+
children: renderTextContent(children, {
|
|
3641
|
+
as: "span"
|
|
3642
|
+
})
|
|
3643
|
+
}
|
|
3644
|
+
);
|
|
3645
|
+
}
|
|
3646
|
+
var Empty = React20.forwardRef(function Empty2({ children, className, content, description, media, title, ...props }, ref) {
|
|
3647
|
+
const hasCustomChildren = React20.Children.count(children) > 0;
|
|
3648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3649
|
+
"div",
|
|
3650
|
+
{
|
|
3249
3651
|
ref,
|
|
3250
|
-
type: resolvedType,
|
|
3251
3652
|
className: cn(
|
|
3252
|
-
"flex h-
|
|
3653
|
+
"flex min-h-[280px] w-full flex-col items-center justify-center gap-6 rounded-[28px] bg-gradient-to-b from-card via-card to-muted/45 px-6 py-10 text-center",
|
|
3253
3654
|
className
|
|
3254
3655
|
),
|
|
3255
|
-
...
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
label: isSearch ? void 0 : label,
|
|
3265
|
-
labelClassName: isSearch ? void 0 : labelClassName,
|
|
3266
|
-
labelHtmlFor: isSearch ? void 0 : resolvedId
|
|
3656
|
+
...props,
|
|
3657
|
+
children: hasCustomChildren ? children : /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
3658
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(EmptyHeader, { children: [
|
|
3659
|
+
media ?? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(EmptyMedia, { variant: "icon", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon, { name: "folders", size: 28 }) }),
|
|
3660
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(EmptyTitle, { children: title ?? "Nada por aqui" }),
|
|
3661
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(EmptyDescription, { children: description ?? "Quando houver conte\xFAdo dispon\xEDvel, ele aparecer\xE1 aqui." })
|
|
3662
|
+
] }),
|
|
3663
|
+
content !== void 0 && content !== null ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(EmptyContent, { children: content }) : null
|
|
3664
|
+
] })
|
|
3267
3665
|
}
|
|
3268
3666
|
);
|
|
3269
3667
|
});
|
|
3270
|
-
|
|
3668
|
+
Empty.displayName = "Empty";
|
|
3669
|
+
EmptyMedia.displayName = "EmptyMedia";
|
|
3670
|
+
EmptyHeader.displayName = "EmptyHeader";
|
|
3671
|
+
EmptyTitle.displayName = "EmptyTitle";
|
|
3672
|
+
EmptyDescription.displayName = "EmptyDescription";
|
|
3673
|
+
EmptyContent.displayName = "EmptyContent";
|
|
3271
3674
|
|
|
3272
3675
|
// src/components/label.tsx
|
|
3273
|
-
var
|
|
3274
|
-
var
|
|
3275
|
-
var Label =
|
|
3676
|
+
var React21 = __toESM(require("react"), 1);
|
|
3677
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
3678
|
+
var Label = React21.forwardRef(
|
|
3276
3679
|
({ children, className, ...props }, ref) => {
|
|
3277
|
-
return /* @__PURE__ */ (0,
|
|
3680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3278
3681
|
"label",
|
|
3279
3682
|
{
|
|
3280
3683
|
ref,
|
|
@@ -3286,7 +3689,7 @@ var Label = React18.forwardRef(
|
|
|
3286
3689
|
children: renderTextContent(children, {
|
|
3287
3690
|
as: "span",
|
|
3288
3691
|
className: "block text-foreground",
|
|
3289
|
-
size: "
|
|
3692
|
+
size: "tiny",
|
|
3290
3693
|
style: {
|
|
3291
3694
|
fontWeight: 500
|
|
3292
3695
|
}
|
|
@@ -3298,10 +3701,10 @@ var Label = React18.forwardRef(
|
|
|
3298
3701
|
Label.displayName = "Label";
|
|
3299
3702
|
|
|
3300
3703
|
// src/components/link.tsx
|
|
3301
|
-
var
|
|
3704
|
+
var React22 = __toESM(require("react"), 1);
|
|
3302
3705
|
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
3303
3706
|
var import_class_variance_authority6 = require("class-variance-authority");
|
|
3304
|
-
var
|
|
3707
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3305
3708
|
var linkVariants = (0, import_class_variance_authority6.cva)(
|
|
3306
3709
|
"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",
|
|
3307
3710
|
{
|
|
@@ -3316,9 +3719,9 @@ var linkVariants = (0, import_class_variance_authority6.cva)(
|
|
|
3316
3719
|
}
|
|
3317
3720
|
}
|
|
3318
3721
|
);
|
|
3319
|
-
var Link =
|
|
3722
|
+
var Link = React22.forwardRef(function Link2({ asChild = false, children, className, variant = "default", ...props }, ref) {
|
|
3320
3723
|
const Component = asChild ? import_react_slot3.Slot : "a";
|
|
3321
|
-
return /* @__PURE__ */ (0,
|
|
3724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3322
3725
|
Component,
|
|
3323
3726
|
{
|
|
3324
3727
|
ref,
|
|
@@ -3328,7 +3731,7 @@ var Link = React19.forwardRef(function Link2({ asChild = false, children, classN
|
|
|
3328
3731
|
children: renderTextContent(children, {
|
|
3329
3732
|
as: "span",
|
|
3330
3733
|
className: "text-current",
|
|
3331
|
-
size: "
|
|
3734
|
+
size: "tiny"
|
|
3332
3735
|
})
|
|
3333
3736
|
}
|
|
3334
3737
|
);
|
|
@@ -3336,7 +3739,7 @@ var Link = React19.forwardRef(function Link2({ asChild = false, children, classN
|
|
|
3336
3739
|
Link.displayName = "Link";
|
|
3337
3740
|
|
|
3338
3741
|
// src/components/logo.tsx
|
|
3339
|
-
var
|
|
3742
|
+
var React23 = __toESM(require("react"), 1);
|
|
3340
3743
|
|
|
3341
3744
|
// src/components/logo-data.ts
|
|
3342
3745
|
var logoAssets = {
|
|
@@ -3433,7 +3836,7 @@ var logoAssets = {
|
|
|
3433
3836
|
};
|
|
3434
3837
|
|
|
3435
3838
|
// src/components/logo.tsx
|
|
3436
|
-
var
|
|
3839
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3437
3840
|
var logoVariants = ["mono", "default", "text", "full"];
|
|
3438
3841
|
var logoSizeOptions = ["sm", "md", "lg", "xl", "2xl"];
|
|
3439
3842
|
var logoSizeScale = {
|
|
@@ -3469,7 +3872,7 @@ function resolveLogoDimensions(variant, size, width, height) {
|
|
|
3469
3872
|
height: resolvedHeight
|
|
3470
3873
|
};
|
|
3471
3874
|
}
|
|
3472
|
-
var Logo =
|
|
3875
|
+
var Logo = React23.forwardRef(function Logo2({
|
|
3473
3876
|
variant = "full",
|
|
3474
3877
|
size = "lg",
|
|
3475
3878
|
width,
|
|
@@ -3480,10 +3883,10 @@ var Logo = React20.forwardRef(function Logo2({
|
|
|
3480
3883
|
...props
|
|
3481
3884
|
}, ref) {
|
|
3482
3885
|
const asset = logoAssets[variant];
|
|
3483
|
-
const titleId =
|
|
3886
|
+
const titleId = React23.useId();
|
|
3484
3887
|
const dimensions = resolveLogoDimensions(variant, size, width, height);
|
|
3485
3888
|
const monoFill = variant === "mono" ? monoColor ?? "currentColor" : void 0;
|
|
3486
|
-
return /* @__PURE__ */ (0,
|
|
3889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3487
3890
|
"svg",
|
|
3488
3891
|
{
|
|
3489
3892
|
ref,
|
|
@@ -3498,8 +3901,8 @@ var Logo = React20.forwardRef(function Logo2({
|
|
|
3498
3901
|
focusable: "false",
|
|
3499
3902
|
...props,
|
|
3500
3903
|
children: [
|
|
3501
|
-
title ? /* @__PURE__ */ (0,
|
|
3502
|
-
asset.paths.map((path, index) => /* @__PURE__ */ (0,
|
|
3904
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("title", { id: titleId, children: title }) : null,
|
|
3905
|
+
asset.paths.map((path, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3503
3906
|
"path",
|
|
3504
3907
|
{
|
|
3505
3908
|
d: path.d,
|
|
@@ -3516,7 +3919,7 @@ var Logo = React20.forwardRef(function Logo2({
|
|
|
3516
3919
|
Logo.displayName = "Logo";
|
|
3517
3920
|
|
|
3518
3921
|
// src/components/pagination.tsx
|
|
3519
|
-
var
|
|
3922
|
+
var import_icons_react6 = require("@tabler/icons-react");
|
|
3520
3923
|
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
3521
3924
|
var import_class_variance_authority7 = require("class-variance-authority");
|
|
3522
3925
|
|
|
@@ -3531,7 +3934,7 @@ var inheritedTypographyStyle = {
|
|
|
3531
3934
|
};
|
|
3532
3935
|
|
|
3533
3936
|
// src/components/pagination.tsx
|
|
3534
|
-
var
|
|
3937
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3535
3938
|
var paginationLinkVariants = (0, import_class_variance_authority7.cva)(
|
|
3536
3939
|
"inline-flex h-10 min-w-10 items-center justify-center rounded-full border border-transparent px-4 [font-family:var(--sofya-text-body-font-family)] text-[length:var(--sofya-text-body-font-size)] font-medium leading-[var(--sofya-text-body-line-height)] tracking-[var(--sofya-text-body-letter-spacing)] 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",
|
|
3537
3940
|
{
|
|
@@ -3552,7 +3955,7 @@ var paginationLinkVariants = (0, import_class_variance_authority7.cva)(
|
|
|
3552
3955
|
}
|
|
3553
3956
|
);
|
|
3554
3957
|
function Pagination({ className, ...props }) {
|
|
3555
|
-
return /* @__PURE__ */ (0,
|
|
3958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3556
3959
|
"nav",
|
|
3557
3960
|
{
|
|
3558
3961
|
"aria-label": "Pagination",
|
|
@@ -3565,7 +3968,7 @@ function PaginationContent({
|
|
|
3565
3968
|
className,
|
|
3566
3969
|
...props
|
|
3567
3970
|
}) {
|
|
3568
|
-
return /* @__PURE__ */ (0,
|
|
3971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3569
3972
|
"ul",
|
|
3570
3973
|
{
|
|
3571
3974
|
className: cn(
|
|
@@ -3577,7 +3980,7 @@ function PaginationContent({
|
|
|
3577
3980
|
);
|
|
3578
3981
|
}
|
|
3579
3982
|
function PaginationItem({ className, ...props }) {
|
|
3580
|
-
return /* @__PURE__ */ (0,
|
|
3983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("li", { className: cn("list-none", className), ...props });
|
|
3581
3984
|
}
|
|
3582
3985
|
function PaginationLink({
|
|
3583
3986
|
asChild = false,
|
|
@@ -3587,7 +3990,7 @@ function PaginationLink({
|
|
|
3587
3990
|
...props
|
|
3588
3991
|
}) {
|
|
3589
3992
|
const Component = asChild ? import_react_slot4.Slot : "a";
|
|
3590
|
-
return /* @__PURE__ */ (0,
|
|
3993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3591
3994
|
Component,
|
|
3592
3995
|
{
|
|
3593
3996
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -3597,25 +4000,25 @@ function PaginationLink({
|
|
|
3597
4000
|
);
|
|
3598
4001
|
}
|
|
3599
4002
|
function PaginationChevronLeft() {
|
|
3600
|
-
return /* @__PURE__ */ (0,
|
|
4003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_icons_react6.IconChevronLeft, { "aria-hidden": "true", className: "h-4 w-4", stroke: 1.75 });
|
|
3601
4004
|
}
|
|
3602
4005
|
function PaginationChevronRight() {
|
|
3603
|
-
return /* @__PURE__ */ (0,
|
|
4006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_icons_react6.IconChevronRight, { "aria-hidden": "true", className: "h-4 w-4", stroke: 1.75 });
|
|
3604
4007
|
}
|
|
3605
4008
|
function PaginationPrevious({
|
|
3606
4009
|
className,
|
|
3607
4010
|
text = "Previous",
|
|
3608
4011
|
...props
|
|
3609
4012
|
}) {
|
|
3610
|
-
return /* @__PURE__ */ (0,
|
|
4013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3611
4014
|
PaginationLink,
|
|
3612
4015
|
{
|
|
3613
4016
|
"aria-label": "Go to previous page",
|
|
3614
4017
|
className: cn("gap-2 px-4", className),
|
|
3615
4018
|
...props,
|
|
3616
4019
|
children: [
|
|
3617
|
-
/* @__PURE__ */ (0,
|
|
3618
|
-
/* @__PURE__ */ (0,
|
|
4020
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(PaginationChevronLeft, {}),
|
|
4021
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "hidden sm:block", children: renderTextContent(text, {
|
|
3619
4022
|
as: "span",
|
|
3620
4023
|
className: "block text-inherit",
|
|
3621
4024
|
size: "body",
|
|
@@ -3630,20 +4033,20 @@ function PaginationNext({
|
|
|
3630
4033
|
text = "Next",
|
|
3631
4034
|
...props
|
|
3632
4035
|
}) {
|
|
3633
|
-
return /* @__PURE__ */ (0,
|
|
4036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3634
4037
|
PaginationLink,
|
|
3635
4038
|
{
|
|
3636
4039
|
"aria-label": "Go to next page",
|
|
3637
4040
|
className: cn("gap-2 px-4", className),
|
|
3638
4041
|
...props,
|
|
3639
4042
|
children: [
|
|
3640
|
-
/* @__PURE__ */ (0,
|
|
4043
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "hidden sm:block", children: renderTextContent(text, {
|
|
3641
4044
|
as: "span",
|
|
3642
4045
|
className: "block text-inherit",
|
|
3643
4046
|
size: "body",
|
|
3644
4047
|
style: inheritedTypographyStyle
|
|
3645
4048
|
}) }),
|
|
3646
|
-
/* @__PURE__ */ (0,
|
|
4049
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(PaginationChevronRight, {})
|
|
3647
4050
|
]
|
|
3648
4051
|
}
|
|
3649
4052
|
);
|
|
@@ -3652,7 +4055,7 @@ function PaginationEllipsis({
|
|
|
3652
4055
|
className,
|
|
3653
4056
|
...props
|
|
3654
4057
|
}) {
|
|
3655
|
-
return /* @__PURE__ */ (0,
|
|
4058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3656
4059
|
"span",
|
|
3657
4060
|
{
|
|
3658
4061
|
"aria-hidden": "true",
|
|
@@ -3662,90 +4065,22 @@ function PaginationEllipsis({
|
|
|
3662
4065
|
),
|
|
3663
4066
|
...props,
|
|
3664
4067
|
children: [
|
|
3665
|
-
/* @__PURE__ */ (0,
|
|
4068
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: renderTextContent("...", {
|
|
3666
4069
|
as: "span",
|
|
3667
4070
|
className: "block text-inherit",
|
|
3668
4071
|
size: "h5",
|
|
3669
4072
|
style: inheritedTypographyStyle
|
|
3670
4073
|
}) }),
|
|
3671
|
-
/* @__PURE__ */ (0,
|
|
4074
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
3672
4075
|
]
|
|
3673
4076
|
}
|
|
3674
4077
|
);
|
|
3675
4078
|
}
|
|
3676
4079
|
|
|
3677
|
-
// src/components/popover.tsx
|
|
3678
|
-
var React21 = __toESM(require("react"), 1);
|
|
3679
|
-
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
3680
|
-
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3681
|
-
var Popover = PopoverPrimitive.Root;
|
|
3682
|
-
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
3683
|
-
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
3684
|
-
var PopoverPortal = PopoverPrimitive.Portal;
|
|
3685
|
-
var PopoverClose = PopoverPrimitive.Close;
|
|
3686
|
-
var PopoverContent = React21.forwardRef(function PopoverContent2({
|
|
3687
|
-
align = "center",
|
|
3688
|
-
className,
|
|
3689
|
-
collisionPadding = 8,
|
|
3690
|
-
sideOffset = 8,
|
|
3691
|
-
...props
|
|
3692
|
-
}, ref) {
|
|
3693
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3694
|
-
PopoverPrimitive.Content,
|
|
3695
|
-
{
|
|
3696
|
-
ref,
|
|
3697
|
-
align,
|
|
3698
|
-
collisionPadding,
|
|
3699
|
-
sideOffset,
|
|
3700
|
-
"data-slot": "popover-content",
|
|
3701
|
-
className: cn(
|
|
3702
|
-
"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",
|
|
3703
|
-
className
|
|
3704
|
-
),
|
|
3705
|
-
...props
|
|
3706
|
-
}
|
|
3707
|
-
) });
|
|
3708
|
-
});
|
|
3709
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
3710
|
-
var PopoverTitle = React21.forwardRef(function PopoverTitle2({ children, className, ...props }, ref) {
|
|
3711
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3712
|
-
"h4",
|
|
3713
|
-
{
|
|
3714
|
-
ref,
|
|
3715
|
-
"data-slot": "popover-title",
|
|
3716
|
-
className: cn("text-[hsl(var(--sofya-popover-foreground))]", className),
|
|
3717
|
-
...props,
|
|
3718
|
-
children: renderTextContent(children, {
|
|
3719
|
-
as: "span",
|
|
3720
|
-
className: "block text-[hsl(var(--sofya-popover-foreground))]",
|
|
3721
|
-
size: "h4"
|
|
3722
|
-
})
|
|
3723
|
-
}
|
|
3724
|
-
);
|
|
3725
|
-
});
|
|
3726
|
-
PopoverTitle.displayName = "PopoverTitle";
|
|
3727
|
-
var PopoverDescription = React21.forwardRef(function PopoverDescription2({ children, className, ...props }, ref) {
|
|
3728
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3729
|
-
"p",
|
|
3730
|
-
{
|
|
3731
|
-
ref,
|
|
3732
|
-
"data-slot": "popover-description",
|
|
3733
|
-
className: cn("text-muted-foreground", className),
|
|
3734
|
-
...props,
|
|
3735
|
-
children: renderTextContent(children, {
|
|
3736
|
-
as: "span",
|
|
3737
|
-
className: "block text-muted-foreground",
|
|
3738
|
-
size: "body"
|
|
3739
|
-
})
|
|
3740
|
-
}
|
|
3741
|
-
);
|
|
3742
|
-
});
|
|
3743
|
-
PopoverDescription.displayName = "PopoverDescription";
|
|
3744
|
-
|
|
3745
4080
|
// src/components/progress.tsx
|
|
3746
|
-
var
|
|
4081
|
+
var React24 = __toESM(require("react"), 1);
|
|
3747
4082
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
|
|
3748
|
-
var
|
|
4083
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3749
4084
|
var progressSizeOptions = ["sm", "default", "lg"];
|
|
3750
4085
|
function clampProgressValue(value, max) {
|
|
3751
4086
|
if (Number.isNaN(value)) {
|
|
@@ -3753,7 +4088,7 @@ function clampProgressValue(value, max) {
|
|
|
3753
4088
|
}
|
|
3754
4089
|
return Math.min(Math.max(value, 0), max);
|
|
3755
4090
|
}
|
|
3756
|
-
var Progress =
|
|
4091
|
+
var Progress = React24.forwardRef(function Progress2({
|
|
3757
4092
|
className,
|
|
3758
4093
|
indicatorClassName,
|
|
3759
4094
|
max = 100,
|
|
@@ -3764,7 +4099,7 @@ var Progress = React22.forwardRef(function Progress2({
|
|
|
3764
4099
|
const safeMax = max > 0 ? max : 100;
|
|
3765
4100
|
const resolvedValue = typeof value === "number" ? clampProgressValue(value, safeMax) : null;
|
|
3766
4101
|
const progressScale = resolvedValue === null ? void 0 : Number((resolvedValue / safeMax).toFixed(4));
|
|
3767
|
-
return /* @__PURE__ */ (0,
|
|
4102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3768
4103
|
ProgressPrimitive.Root,
|
|
3769
4104
|
{
|
|
3770
4105
|
ref,
|
|
@@ -3777,7 +4112,7 @@ var Progress = React22.forwardRef(function Progress2({
|
|
|
3777
4112
|
className
|
|
3778
4113
|
),
|
|
3779
4114
|
...props,
|
|
3780
|
-
children: /* @__PURE__ */ (0,
|
|
4115
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3781
4116
|
ProgressPrimitive.Indicator,
|
|
3782
4117
|
{
|
|
3783
4118
|
"data-slot": "progress-indicator",
|
|
@@ -3794,12 +4129,12 @@ var Progress = React22.forwardRef(function Progress2({
|
|
|
3794
4129
|
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
3795
4130
|
|
|
3796
4131
|
// src/components/radio-group.tsx
|
|
3797
|
-
var
|
|
4132
|
+
var React25 = __toESM(require("react"), 1);
|
|
3798
4133
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
3799
|
-
var
|
|
4134
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3800
4135
|
var radioGroupOrientationOptions = ["horizontal", "vertical"];
|
|
3801
|
-
var RadioGroup2 =
|
|
3802
|
-
return /* @__PURE__ */ (0,
|
|
4136
|
+
var RadioGroup2 = React25.forwardRef(function RadioGroup3({ className, ...props }, ref) {
|
|
4137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3803
4138
|
RadioGroupPrimitive.Root,
|
|
3804
4139
|
{
|
|
3805
4140
|
ref,
|
|
@@ -3813,7 +4148,7 @@ var RadioGroup2 = React23.forwardRef(function RadioGroup3({ className, ...props
|
|
|
3813
4148
|
);
|
|
3814
4149
|
});
|
|
3815
4150
|
RadioGroup2.displayName = RadioGroupPrimitive.Root.displayName;
|
|
3816
|
-
var RadioGroupItem =
|
|
4151
|
+
var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
3817
4152
|
className,
|
|
3818
4153
|
controlClassName,
|
|
3819
4154
|
description,
|
|
@@ -3825,12 +4160,12 @@ var RadioGroupItem = React23.forwardRef(function RadioGroupItem2({
|
|
|
3825
4160
|
labelClassName,
|
|
3826
4161
|
...props
|
|
3827
4162
|
}, ref) {
|
|
3828
|
-
const generatedId =
|
|
4163
|
+
const generatedId = React25.useId();
|
|
3829
4164
|
const resolvedId = id ?? generatedId;
|
|
3830
4165
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
3831
4166
|
const descriptionId = description ? `${resolvedId}-description` : void 0;
|
|
3832
4167
|
const alignClassName = description ? "items-start" : "items-center";
|
|
3833
|
-
return /* @__PURE__ */ (0,
|
|
4168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
3834
4169
|
"label",
|
|
3835
4170
|
{
|
|
3836
4171
|
className: selectionControlContainerClasses({
|
|
@@ -3839,7 +4174,7 @@ var RadioGroupItem = React23.forwardRef(function RadioGroupItem2({
|
|
|
3839
4174
|
disabled
|
|
3840
4175
|
}),
|
|
3841
4176
|
children: [
|
|
3842
|
-
/* @__PURE__ */ (0,
|
|
4177
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3843
4178
|
RadioGroupPrimitive.Item,
|
|
3844
4179
|
{
|
|
3845
4180
|
ref,
|
|
@@ -3855,7 +4190,7 @@ var RadioGroupItem = React23.forwardRef(function RadioGroupItem2({
|
|
|
3855
4190
|
controlClassName
|
|
3856
4191
|
),
|
|
3857
4192
|
...props,
|
|
3858
|
-
children: /* @__PURE__ */ (0,
|
|
4193
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(RadioGroupPrimitive.Indicator, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3859
4194
|
"span",
|
|
3860
4195
|
{
|
|
3861
4196
|
"data-slot": "radio-group-indicator",
|
|
@@ -3867,8 +4202,8 @@ var RadioGroupItem = React23.forwardRef(function RadioGroupItem2({
|
|
|
3867
4202
|
) })
|
|
3868
4203
|
}
|
|
3869
4204
|
),
|
|
3870
|
-
label || description ? /* @__PURE__ */ (0,
|
|
3871
|
-
label ? /* @__PURE__ */ (0,
|
|
4205
|
+
label || description ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: selectionControlContentBaseClasses, children: [
|
|
4206
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3872
4207
|
"span",
|
|
3873
4208
|
{
|
|
3874
4209
|
id: labelId,
|
|
@@ -3879,11 +4214,11 @@ var RadioGroupItem = React23.forwardRef(function RadioGroupItem2({
|
|
|
3879
4214
|
children: renderTextContent(label, {
|
|
3880
4215
|
as: "span",
|
|
3881
4216
|
className: "text-[color:var(--sofya-text-default)]",
|
|
3882
|
-
size: "
|
|
4217
|
+
size: "tiny"
|
|
3883
4218
|
})
|
|
3884
4219
|
}
|
|
3885
4220
|
) : null,
|
|
3886
|
-
description ? /* @__PURE__ */ (0,
|
|
4221
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3887
4222
|
"span",
|
|
3888
4223
|
{
|
|
3889
4224
|
id: descriptionId,
|
|
@@ -3894,7 +4229,7 @@ var RadioGroupItem = React23.forwardRef(function RadioGroupItem2({
|
|
|
3894
4229
|
children: renderTextContent(description, {
|
|
3895
4230
|
as: "span",
|
|
3896
4231
|
className: "text-muted-foreground",
|
|
3897
|
-
size: "
|
|
4232
|
+
size: "tiny"
|
|
3898
4233
|
})
|
|
3899
4234
|
}
|
|
3900
4235
|
) : null
|
|
@@ -3906,12 +4241,12 @@ var RadioGroupItem = React23.forwardRef(function RadioGroupItem2({
|
|
|
3906
4241
|
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
3907
4242
|
|
|
3908
4243
|
// src/components/scroll-area.tsx
|
|
3909
|
-
var
|
|
4244
|
+
var React26 = __toESM(require("react"), 1);
|
|
3910
4245
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
3911
|
-
var
|
|
4246
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3912
4247
|
var scrollAreaOrientationOptions = ["horizontal", "vertical"];
|
|
3913
|
-
var ScrollArea =
|
|
3914
|
-
return /* @__PURE__ */ (0,
|
|
4248
|
+
var ScrollArea = React26.forwardRef(function ScrollArea2({ className, ...props }, ref) {
|
|
4249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3915
4250
|
ScrollAreaPrimitive.Root,
|
|
3916
4251
|
{
|
|
3917
4252
|
ref,
|
|
@@ -3922,8 +4257,8 @@ var ScrollArea = React24.forwardRef(function ScrollArea2({ className, ...props }
|
|
|
3922
4257
|
);
|
|
3923
4258
|
});
|
|
3924
4259
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
3925
|
-
var ScrollAreaViewport =
|
|
3926
|
-
return /* @__PURE__ */ (0,
|
|
4260
|
+
var ScrollAreaViewport = React26.forwardRef(function ScrollAreaViewport2({ className, ...props }, ref) {
|
|
4261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3927
4262
|
ScrollAreaPrimitive.Viewport,
|
|
3928
4263
|
{
|
|
3929
4264
|
ref,
|
|
@@ -3937,8 +4272,8 @@ var ScrollAreaViewport = React24.forwardRef(function ScrollAreaViewport2({ class
|
|
|
3937
4272
|
);
|
|
3938
4273
|
});
|
|
3939
4274
|
ScrollAreaViewport.displayName = ScrollAreaPrimitive.Viewport.displayName;
|
|
3940
|
-
var ScrollAreaScrollbar =
|
|
3941
|
-
return /* @__PURE__ */ (0,
|
|
4275
|
+
var ScrollAreaScrollbar = React26.forwardRef(function ScrollAreaScrollbar2({ className, orientation = "vertical", thumbClassName, ...props }, ref) {
|
|
4276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3942
4277
|
ScrollAreaPrimitive.Scrollbar,
|
|
3943
4278
|
{
|
|
3944
4279
|
ref,
|
|
@@ -3949,7 +4284,7 @@ var ScrollAreaScrollbar = React24.forwardRef(function ScrollAreaScrollbar2({ cla
|
|
|
3949
4284
|
className
|
|
3950
4285
|
),
|
|
3951
4286
|
...props,
|
|
3952
|
-
children: /* @__PURE__ */ (0,
|
|
4287
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3953
4288
|
ScrollAreaPrimitive.Thumb,
|
|
3954
4289
|
{
|
|
3955
4290
|
"data-slot": "scroll-area-thumb",
|
|
@@ -3963,8 +4298,8 @@ var ScrollAreaScrollbar = React24.forwardRef(function ScrollAreaScrollbar2({ cla
|
|
|
3963
4298
|
);
|
|
3964
4299
|
});
|
|
3965
4300
|
ScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;
|
|
3966
|
-
var ScrollAreaCorner =
|
|
3967
|
-
return /* @__PURE__ */ (0,
|
|
4301
|
+
var ScrollAreaCorner = React26.forwardRef(function ScrollAreaCorner2({ className, ...props }, ref) {
|
|
4302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3968
4303
|
ScrollAreaPrimitive.Corner,
|
|
3969
4304
|
{
|
|
3970
4305
|
ref,
|
|
@@ -3977,34 +4312,34 @@ var ScrollAreaCorner = React24.forwardRef(function ScrollAreaCorner2({ className
|
|
|
3977
4312
|
ScrollAreaCorner.displayName = ScrollAreaPrimitive.Corner.displayName;
|
|
3978
4313
|
|
|
3979
4314
|
// src/components/select.tsx
|
|
3980
|
-
var
|
|
4315
|
+
var React27 = __toESM(require("react"), 1);
|
|
3981
4316
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
3982
4317
|
|
|
3983
4318
|
// src/lib/form-control-classes.ts
|
|
3984
4319
|
var formControlBaseClasses = "flex w-full items-center justify-between gap-4 rounded-[10px] border border-[color:var(--sofya-border-strong)] bg-card px-4 text-left [font-family:var(--sofya-text-body-font-family)] text-[length:var(--sofya-text-body-font-size)] [font-weight:var(--sofya-text-body-font-weight)] leading-[var(--sofya-text-body-line-height)] tracking-[var(--sofya-text-body-letter-spacing)] text-[color:var(--sofya-text-default)] shadow-none transition-[border-color,box-shadow,background-color,color] duration-sofya ease-sofya hover:border-[color:var(--sofya-border-hover)] focus:outline-none focus:ring-2 focus:ring-[color:var(--sofya-focus-ring-soft)] focus:ring-offset-0 active:border-transparent active:ring-2 active:ring-[color:var(--sofya-focus-ring-soft)] disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus:ring-destructive/20 data-[placeholder]:text-[color:var(--sofya-text-placeholder)]";
|
|
3985
4320
|
|
|
3986
4321
|
// src/components/select.tsx
|
|
3987
|
-
var
|
|
4322
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3988
4323
|
var selectSizeOptions = ["default", "sm"];
|
|
3989
4324
|
var Select = SelectPrimitive.Root;
|
|
3990
4325
|
var SelectGroup = SelectPrimitive.Group;
|
|
3991
|
-
var SelectValue =
|
|
3992
|
-
return /* @__PURE__ */ (0,
|
|
4326
|
+
var SelectValue = React27.forwardRef(function SelectValue2({ className, ...props }, ref) {
|
|
4327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3993
4328
|
Text,
|
|
3994
4329
|
{
|
|
3995
4330
|
ref,
|
|
3996
4331
|
as: "span",
|
|
3997
4332
|
"data-slot": "select-value",
|
|
3998
4333
|
className: cn("block truncate text-inherit", className),
|
|
3999
|
-
size: "
|
|
4334
|
+
size: "tiny",
|
|
4000
4335
|
style: inheritedTypographyStyle,
|
|
4001
|
-
children: /* @__PURE__ */ (0,
|
|
4336
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectPrimitive.Value, { className: "block truncate", ...props })
|
|
4002
4337
|
}
|
|
4003
4338
|
);
|
|
4004
4339
|
});
|
|
4005
4340
|
SelectValue.displayName = SelectPrimitive.Value.displayName;
|
|
4006
|
-
var SelectTrigger =
|
|
4007
|
-
return /* @__PURE__ */ (0,
|
|
4341
|
+
var SelectTrigger = React27.forwardRef(function SelectTrigger2({ className, children, size = "default", ...props }, ref) {
|
|
4342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
4008
4343
|
SelectPrimitive.Trigger,
|
|
4009
4344
|
{
|
|
4010
4345
|
ref,
|
|
@@ -4018,7 +4353,7 @@ var SelectTrigger = React25.forwardRef(function SelectTrigger2({ className, chil
|
|
|
4018
4353
|
...props,
|
|
4019
4354
|
children: [
|
|
4020
4355
|
children,
|
|
4021
|
-
/* @__PURE__ */ (0,
|
|
4356
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4022
4357
|
Icon,
|
|
4023
4358
|
{
|
|
4024
4359
|
name: "caret-down",
|
|
@@ -4031,8 +4366,8 @@ var SelectTrigger = React25.forwardRef(function SelectTrigger2({ className, chil
|
|
|
4031
4366
|
);
|
|
4032
4367
|
});
|
|
4033
4368
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
4034
|
-
var SelectScrollUpButton =
|
|
4035
|
-
return /* @__PURE__ */ (0,
|
|
4369
|
+
var SelectScrollUpButton = React27.forwardRef(function SelectScrollUpButton2({ className, ...props }, ref) {
|
|
4370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4036
4371
|
SelectPrimitive.ScrollUpButton,
|
|
4037
4372
|
{
|
|
4038
4373
|
ref,
|
|
@@ -4042,13 +4377,13 @@ var SelectScrollUpButton = React25.forwardRef(function SelectScrollUpButton2({ c
|
|
|
4042
4377
|
className
|
|
4043
4378
|
),
|
|
4044
4379
|
...props,
|
|
4045
|
-
children: /* @__PURE__ */ (0,
|
|
4380
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "caret-up", size: 12 })
|
|
4046
4381
|
}
|
|
4047
4382
|
);
|
|
4048
4383
|
});
|
|
4049
4384
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
4050
|
-
var SelectScrollDownButton =
|
|
4051
|
-
return /* @__PURE__ */ (0,
|
|
4385
|
+
var SelectScrollDownButton = React27.forwardRef(function SelectScrollDownButton2({ className, ...props }, ref) {
|
|
4386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4052
4387
|
SelectPrimitive.ScrollDownButton,
|
|
4053
4388
|
{
|
|
4054
4389
|
ref,
|
|
@@ -4058,13 +4393,13 @@ var SelectScrollDownButton = React25.forwardRef(function SelectScrollDownButton2
|
|
|
4058
4393
|
className
|
|
4059
4394
|
),
|
|
4060
4395
|
...props,
|
|
4061
|
-
children: /* @__PURE__ */ (0,
|
|
4396
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "caret-down", size: 12 })
|
|
4062
4397
|
}
|
|
4063
4398
|
);
|
|
4064
4399
|
});
|
|
4065
4400
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
4066
|
-
var SelectContent =
|
|
4067
|
-
return /* @__PURE__ */ (0,
|
|
4401
|
+
var SelectContent = React27.forwardRef(function SelectContent2({ className, children, position = "popper", ...props }, ref) {
|
|
4402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
4068
4403
|
SelectPrimitive.Content,
|
|
4069
4404
|
{
|
|
4070
4405
|
ref,
|
|
@@ -4077,8 +4412,8 @@ var SelectContent = React25.forwardRef(function SelectContent2({ className, chil
|
|
|
4077
4412
|
),
|
|
4078
4413
|
...props,
|
|
4079
4414
|
children: [
|
|
4080
|
-
/* @__PURE__ */ (0,
|
|
4081
|
-
/* @__PURE__ */ (0,
|
|
4415
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectScrollUpButton, {}),
|
|
4416
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4082
4417
|
SelectPrimitive.Viewport,
|
|
4083
4418
|
{
|
|
4084
4419
|
"data-slot": "select-viewport",
|
|
@@ -4086,14 +4421,14 @@ var SelectContent = React25.forwardRef(function SelectContent2({ className, chil
|
|
|
4086
4421
|
children
|
|
4087
4422
|
}
|
|
4088
4423
|
),
|
|
4089
|
-
/* @__PURE__ */ (0,
|
|
4424
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectScrollDownButton, {})
|
|
4090
4425
|
]
|
|
4091
4426
|
}
|
|
4092
4427
|
) });
|
|
4093
4428
|
});
|
|
4094
4429
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
4095
|
-
var SelectLabel =
|
|
4096
|
-
return /* @__PURE__ */ (0,
|
|
4430
|
+
var SelectLabel = React27.forwardRef(function SelectLabel2({ className, ...props }, ref) {
|
|
4431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4097
4432
|
SelectPrimitive.Label,
|
|
4098
4433
|
{
|
|
4099
4434
|
ref,
|
|
@@ -4115,32 +4450,32 @@ var SelectLabel = React25.forwardRef(function SelectLabel2({ className, ...props
|
|
|
4115
4450
|
);
|
|
4116
4451
|
});
|
|
4117
4452
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
4118
|
-
var SelectItem =
|
|
4119
|
-
return /* @__PURE__ */ (0,
|
|
4453
|
+
var SelectItem = React27.forwardRef(function SelectItem2({ className, children, ...props }, ref) {
|
|
4454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
4120
4455
|
SelectPrimitive.Item,
|
|
4121
4456
|
{
|
|
4122
4457
|
ref,
|
|
4123
4458
|
"data-slot": "select-item",
|
|
4124
4459
|
className: cn(
|
|
4125
|
-
"relative flex min-w-0 cursor-pointer select-none items-center self-stretch rounded-[8px] px-4 py-2 pr-8 [font-family:var(--sofya-text-
|
|
4460
|
+
"relative flex min-w-0 cursor-pointer select-none items-center self-stretch rounded-[8px] px-4 py-2 pr-8 [font-family:var(--sofya-text-tiny-font-family)] text-[length:var(--sofya-text-tiny-font-size)] [font-weight:var(--sofya-text-tiny-font-weight)] leading-[var(--sofya-text-tiny-line-height)] tracking-[var(--sofya-text-tiny-letter-spacing)] 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)]",
|
|
4126
4461
|
className
|
|
4127
4462
|
),
|
|
4128
4463
|
...props,
|
|
4129
4464
|
children: [
|
|
4130
|
-
/* @__PURE__ */ (0,
|
|
4465
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectPrimitive.ItemText, { className: "truncate", children: renderTextContent(children, {
|
|
4131
4466
|
as: "span",
|
|
4132
4467
|
className: "block truncate text-[color:var(--sofya-text-default)]",
|
|
4133
|
-
size: "
|
|
4468
|
+
size: "tiny",
|
|
4134
4469
|
style: inheritedTypographyStyle
|
|
4135
4470
|
}) }),
|
|
4136
|
-
/* @__PURE__ */ (0,
|
|
4471
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectPrimitive.ItemIndicator, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "absolute right-4 inline-flex h-4 w-4 items-center justify-center text-primary", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "check", size: 14 }) }) })
|
|
4137
4472
|
]
|
|
4138
4473
|
}
|
|
4139
4474
|
);
|
|
4140
4475
|
});
|
|
4141
4476
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
4142
|
-
var SelectSeparator =
|
|
4143
|
-
return /* @__PURE__ */ (0,
|
|
4477
|
+
var SelectSeparator = React27.forwardRef(function SelectSeparator2({ className, ...props }, ref) {
|
|
4478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4144
4479
|
SelectPrimitive.Separator,
|
|
4145
4480
|
{
|
|
4146
4481
|
ref,
|
|
@@ -4153,11 +4488,11 @@ var SelectSeparator = React25.forwardRef(function SelectSeparator2({ className,
|
|
|
4153
4488
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
4154
4489
|
|
|
4155
4490
|
// src/components/separator.tsx
|
|
4156
|
-
var
|
|
4491
|
+
var React28 = __toESM(require("react"), 1);
|
|
4157
4492
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
4158
|
-
var
|
|
4159
|
-
var Separator2 =
|
|
4160
|
-
return /* @__PURE__ */ (0,
|
|
4493
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4494
|
+
var Separator2 = React28.forwardRef(function Separator3({ className, decorative = true, orientation = "horizontal", ...props }, ref) {
|
|
4495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4161
4496
|
SeparatorPrimitive.Root,
|
|
4162
4497
|
{
|
|
4163
4498
|
ref,
|
|
@@ -4176,8 +4511,8 @@ var Separator2 = React26.forwardRef(function Separator3({ className, decorative
|
|
|
4176
4511
|
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
4177
4512
|
|
|
4178
4513
|
// src/components/slider.tsx
|
|
4179
|
-
var
|
|
4180
|
-
var
|
|
4514
|
+
var React29 = __toESM(require("react"), 1);
|
|
4515
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
4181
4516
|
function clampSliderValue(value, min, max) {
|
|
4182
4517
|
if (Number.isNaN(value)) {
|
|
4183
4518
|
return min;
|
|
@@ -4202,7 +4537,7 @@ function resolveSliderMeasurement(value, fallback) {
|
|
|
4202
4537
|
function isTextValue(value) {
|
|
4203
4538
|
return typeof value === "string" || typeof value === "number";
|
|
4204
4539
|
}
|
|
4205
|
-
var Slider =
|
|
4540
|
+
var Slider = React29.forwardRef(function Slider2({
|
|
4206
4541
|
className,
|
|
4207
4542
|
defaultValue,
|
|
4208
4543
|
formatValue,
|
|
@@ -4225,7 +4560,7 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4225
4560
|
valueClassName,
|
|
4226
4561
|
...props
|
|
4227
4562
|
}, ref) {
|
|
4228
|
-
const resolvedId =
|
|
4563
|
+
const resolvedId = React29.useId();
|
|
4229
4564
|
const inputId = id ?? resolvedId;
|
|
4230
4565
|
const safeMin = min;
|
|
4231
4566
|
const safeMax = resolveSliderMax(safeMin, max);
|
|
@@ -4234,7 +4569,7 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4234
4569
|
onChange: onValueChange,
|
|
4235
4570
|
value
|
|
4236
4571
|
});
|
|
4237
|
-
|
|
4572
|
+
React29.useEffect(() => {
|
|
4238
4573
|
if (value !== void 0) {
|
|
4239
4574
|
return;
|
|
4240
4575
|
}
|
|
@@ -4281,14 +4616,14 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4281
4616
|
setControllableValue(nextValue);
|
|
4282
4617
|
onChange?.(event);
|
|
4283
4618
|
};
|
|
4284
|
-
return /* @__PURE__ */ (0,
|
|
4619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
4285
4620
|
"div",
|
|
4286
4621
|
{
|
|
4287
4622
|
"data-slot": "slider",
|
|
4288
4623
|
className: cn("grid w-full gap-2", className),
|
|
4289
4624
|
children: [
|
|
4290
|
-
label || showValue ? /* @__PURE__ */ (0,
|
|
4291
|
-
label ? /* @__PURE__ */ (0,
|
|
4625
|
+
label || showValue ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
4626
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4292
4627
|
FieldLabel,
|
|
4293
4628
|
{
|
|
4294
4629
|
htmlFor: inputId,
|
|
@@ -4299,8 +4634,8 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4299
4634
|
textClassName: "block min-w-0 text-[color:var(--sofya-text-default)]",
|
|
4300
4635
|
children: label
|
|
4301
4636
|
}
|
|
4302
|
-
) : /* @__PURE__ */ (0,
|
|
4303
|
-
showValue ? /* @__PURE__ */ (0,
|
|
4637
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", {}),
|
|
4638
|
+
showValue ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4304
4639
|
"div",
|
|
4305
4640
|
{
|
|
4306
4641
|
className: cn(
|
|
@@ -4318,7 +4653,7 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4318
4653
|
}
|
|
4319
4654
|
) : null
|
|
4320
4655
|
] }) : null,
|
|
4321
|
-
/* @__PURE__ */ (0,
|
|
4656
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
4322
4657
|
"div",
|
|
4323
4658
|
{
|
|
4324
4659
|
"data-slot": "slider-control",
|
|
@@ -4328,7 +4663,7 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4328
4663
|
),
|
|
4329
4664
|
style: controlStyle,
|
|
4330
4665
|
children: [
|
|
4331
|
-
/* @__PURE__ */ (0,
|
|
4666
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4332
4667
|
"input",
|
|
4333
4668
|
{
|
|
4334
4669
|
...props,
|
|
@@ -4345,7 +4680,7 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4345
4680
|
style: inputBoundsStyle
|
|
4346
4681
|
}
|
|
4347
4682
|
),
|
|
4348
|
-
/* @__PURE__ */ (0,
|
|
4683
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4349
4684
|
"div",
|
|
4350
4685
|
{
|
|
4351
4686
|
"data-slot": "slider-track",
|
|
@@ -4356,7 +4691,7 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4356
4691
|
style: trackBoundsStyle
|
|
4357
4692
|
}
|
|
4358
4693
|
),
|
|
4359
|
-
/* @__PURE__ */ (0,
|
|
4694
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4360
4695
|
"div",
|
|
4361
4696
|
{
|
|
4362
4697
|
"data-slot": "slider-range",
|
|
@@ -4367,7 +4702,7 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4367
4702
|
style: rangeStyle
|
|
4368
4703
|
}
|
|
4369
4704
|
),
|
|
4370
|
-
/* @__PURE__ */ (0,
|
|
4705
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4371
4706
|
"div",
|
|
4372
4707
|
{
|
|
4373
4708
|
"data-slot": "slider-thumb",
|
|
@@ -4388,10 +4723,10 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4388
4723
|
Slider.displayName = "Slider";
|
|
4389
4724
|
|
|
4390
4725
|
// src/components/skeleton.tsx
|
|
4391
|
-
var
|
|
4392
|
-
var
|
|
4393
|
-
var Skeleton =
|
|
4394
|
-
return /* @__PURE__ */ (0,
|
|
4726
|
+
var React30 = __toESM(require("react"), 1);
|
|
4727
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4728
|
+
var Skeleton = React30.forwardRef(function Skeleton2({ className, ...props }, ref) {
|
|
4729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4395
4730
|
"div",
|
|
4396
4731
|
{
|
|
4397
4732
|
ref,
|
|
@@ -4406,15 +4741,15 @@ var Skeleton = React28.forwardRef(function Skeleton2({ className, ...props }, re
|
|
|
4406
4741
|
Skeleton.displayName = "Skeleton";
|
|
4407
4742
|
|
|
4408
4743
|
// src/components/sonner.tsx
|
|
4409
|
-
var
|
|
4744
|
+
var React31 = __toESM(require("react"), 1);
|
|
4410
4745
|
var import_sonner = require("sonner");
|
|
4411
|
-
var
|
|
4746
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
4412
4747
|
var notificationVariantOptions = ["default", "success", "error", "warning"];
|
|
4413
4748
|
function ToastStatusIcon({
|
|
4414
4749
|
iconName,
|
|
4415
4750
|
className
|
|
4416
4751
|
}) {
|
|
4417
|
-
return /* @__PURE__ */ (0,
|
|
4752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4418
4753
|
"span",
|
|
4419
4754
|
{
|
|
4420
4755
|
"aria-hidden": "true",
|
|
@@ -4422,7 +4757,7 @@ function ToastStatusIcon({
|
|
|
4422
4757
|
"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full border shadow-sofya-sm",
|
|
4423
4758
|
className
|
|
4424
4759
|
),
|
|
4425
|
-
children: /* @__PURE__ */ (0,
|
|
4760
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { name: iconName, size: 16 })
|
|
4426
4761
|
}
|
|
4427
4762
|
);
|
|
4428
4763
|
}
|
|
@@ -4443,35 +4778,35 @@ var defaultToastClassNames = {
|
|
|
4443
4778
|
loading: "border-border bg-card text-foreground"
|
|
4444
4779
|
};
|
|
4445
4780
|
var defaultToastIcons = {
|
|
4446
|
-
success: /* @__PURE__ */ (0,
|
|
4781
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4447
4782
|
ToastStatusIcon,
|
|
4448
4783
|
{
|
|
4449
4784
|
iconName: "check",
|
|
4450
4785
|
className: "border-success/15 bg-success/12 text-success"
|
|
4451
4786
|
}
|
|
4452
4787
|
),
|
|
4453
|
-
error: /* @__PURE__ */ (0,
|
|
4788
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4454
4789
|
ToastStatusIcon,
|
|
4455
4790
|
{
|
|
4456
4791
|
iconName: "x",
|
|
4457
4792
|
className: "border-destructive/15 bg-destructive/12 text-destructive"
|
|
4458
4793
|
}
|
|
4459
4794
|
),
|
|
4460
|
-
warning: /* @__PURE__ */ (0,
|
|
4795
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4461
4796
|
ToastStatusIcon,
|
|
4462
4797
|
{
|
|
4463
4798
|
iconName: "question",
|
|
4464
4799
|
className: "border-warning/20 bg-warning/15 text-foreground"
|
|
4465
4800
|
}
|
|
4466
4801
|
),
|
|
4467
|
-
info: /* @__PURE__ */ (0,
|
|
4802
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4468
4803
|
ToastStatusIcon,
|
|
4469
4804
|
{
|
|
4470
4805
|
iconName: "question",
|
|
4471
4806
|
className: "border-primary/15 bg-primary/10 text-primary"
|
|
4472
4807
|
}
|
|
4473
4808
|
),
|
|
4474
|
-
close: /* @__PURE__ */ (0,
|
|
4809
|
+
close: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { name: "x", size: 12 })
|
|
4475
4810
|
};
|
|
4476
4811
|
function mergeToastClassNames(overrides) {
|
|
4477
4812
|
return {
|
|
@@ -4479,7 +4814,7 @@ function mergeToastClassNames(overrides) {
|
|
|
4479
4814
|
...overrides
|
|
4480
4815
|
};
|
|
4481
4816
|
}
|
|
4482
|
-
var Toaster =
|
|
4817
|
+
var Toaster = React31.forwardRef(
|
|
4483
4818
|
function Toaster2({
|
|
4484
4819
|
className,
|
|
4485
4820
|
closeButton = true,
|
|
@@ -4491,7 +4826,7 @@ var Toaster = React29.forwardRef(
|
|
|
4491
4826
|
visibleToasts = 5,
|
|
4492
4827
|
...props
|
|
4493
4828
|
}, ref) {
|
|
4494
|
-
return /* @__PURE__ */ (0,
|
|
4829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4495
4830
|
import_sonner.Toaster,
|
|
4496
4831
|
{
|
|
4497
4832
|
ref,
|
|
@@ -4520,43 +4855,10 @@ var Toaster = React29.forwardRef(
|
|
|
4520
4855
|
);
|
|
4521
4856
|
Toaster.displayName = "Toaster";
|
|
4522
4857
|
|
|
4523
|
-
// src/components/spinner.tsx
|
|
4524
|
-
var React30 = __toESM(require("react"), 1);
|
|
4525
|
-
var import_icons_react6 = require("@tabler/icons-react");
|
|
4526
|
-
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4527
|
-
var spinnerSizeOptions = ["sm", "default", "lg"];
|
|
4528
|
-
var Spinner = React30.forwardRef(function Spinner2({
|
|
4529
|
-
"aria-label": ariaLabelProp,
|
|
4530
|
-
"aria-labelledby": ariaLabelledby,
|
|
4531
|
-
className,
|
|
4532
|
-
role = "status",
|
|
4533
|
-
size = "default",
|
|
4534
|
-
...props
|
|
4535
|
-
}, ref) {
|
|
4536
|
-
const ariaLabel = ariaLabelProp ?? (ariaLabelledby ? void 0 : "Loading");
|
|
4537
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4538
|
-
import_icons_react6.IconLoader2,
|
|
4539
|
-
{
|
|
4540
|
-
ref,
|
|
4541
|
-
"data-size": size,
|
|
4542
|
-
"data-slot": "spinner",
|
|
4543
|
-
role,
|
|
4544
|
-
"aria-label": ariaLabel,
|
|
4545
|
-
"aria-labelledby": ariaLabelledby,
|
|
4546
|
-
className: cn(
|
|
4547
|
-
"shrink-0 animate-spin text-primary data-[size=sm]:h-3.5 data-[size=sm]:w-3.5 data-[size=default]:h-4 data-[size=default]:w-4 data-[size=lg]:h-6 data-[size=lg]:w-6",
|
|
4548
|
-
className
|
|
4549
|
-
),
|
|
4550
|
-
...props
|
|
4551
|
-
}
|
|
4552
|
-
);
|
|
4553
|
-
});
|
|
4554
|
-
Spinner.displayName = "Spinner";
|
|
4555
|
-
|
|
4556
4858
|
// src/components/switch.tsx
|
|
4557
|
-
var
|
|
4859
|
+
var React32 = __toESM(require("react"), 1);
|
|
4558
4860
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
|
|
4559
|
-
var
|
|
4861
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
4560
4862
|
var switchSizeOptions = ["default", "sm"];
|
|
4561
4863
|
var switchRootSizeClasses = {
|
|
4562
4864
|
default: "h-6 w-11",
|
|
@@ -4566,7 +4868,7 @@ var switchThumbSizeClasses = {
|
|
|
4566
4868
|
default: "h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
|
4567
4869
|
sm: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
4568
4870
|
};
|
|
4569
|
-
var Switch =
|
|
4871
|
+
var Switch = React32.forwardRef(
|
|
4570
4872
|
({
|
|
4571
4873
|
"aria-describedby": ariaDescribedBy,
|
|
4572
4874
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -4581,7 +4883,7 @@ var Switch = React31.forwardRef(
|
|
|
4581
4883
|
size,
|
|
4582
4884
|
...props
|
|
4583
4885
|
}, ref) => {
|
|
4584
|
-
const generatedId =
|
|
4886
|
+
const generatedId = React32.useId();
|
|
4585
4887
|
const resolvedId = id ?? generatedId;
|
|
4586
4888
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
4587
4889
|
const descriptionId = description ? `${resolvedId}-description` : void 0;
|
|
@@ -4590,7 +4892,7 @@ var Switch = React31.forwardRef(
|
|
|
4590
4892
|
const alignClassName = description ? "items-start" : "items-center";
|
|
4591
4893
|
const resolvedAriaDescribedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ") || void 0;
|
|
4592
4894
|
const resolvedAriaLabelledBy = ariaLabelledBy ?? labelId;
|
|
4593
|
-
const switchControl = /* @__PURE__ */ (0,
|
|
4895
|
+
const switchControl = /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4594
4896
|
SwitchPrimitives.Root,
|
|
4595
4897
|
{
|
|
4596
4898
|
id: resolvedId,
|
|
@@ -4605,7 +4907,7 @@ var Switch = React31.forwardRef(
|
|
|
4605
4907
|
"data-size": resolvedSize,
|
|
4606
4908
|
...props,
|
|
4607
4909
|
ref,
|
|
4608
|
-
children: /* @__PURE__ */ (0,
|
|
4910
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4609
4911
|
SwitchPrimitives.Thumb,
|
|
4610
4912
|
{
|
|
4611
4913
|
className: cn(
|
|
@@ -4619,7 +4921,7 @@ var Switch = React31.forwardRef(
|
|
|
4619
4921
|
if (!hasTextContent) {
|
|
4620
4922
|
return switchControl;
|
|
4621
4923
|
}
|
|
4622
|
-
return /* @__PURE__ */ (0,
|
|
4924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
4623
4925
|
"div",
|
|
4624
4926
|
{
|
|
4625
4927
|
"data-slot": "switch-container",
|
|
@@ -4630,8 +4932,8 @@ var Switch = React31.forwardRef(
|
|
|
4630
4932
|
}),
|
|
4631
4933
|
children: [
|
|
4632
4934
|
switchControl,
|
|
4633
|
-
/* @__PURE__ */ (0,
|
|
4634
|
-
label ? /* @__PURE__ */ (0,
|
|
4935
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: selectionControlContentBaseClasses, children: [
|
|
4936
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { htmlFor: resolvedId, className: selectionControlLabelTextBaseClasses, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4635
4937
|
"span",
|
|
4636
4938
|
{
|
|
4637
4939
|
id: labelId,
|
|
@@ -4642,11 +4944,11 @@ var Switch = React31.forwardRef(
|
|
|
4642
4944
|
children: renderTextContent(label, {
|
|
4643
4945
|
as: "span",
|
|
4644
4946
|
className: "text-[color:var(--sofya-text-default)]",
|
|
4645
|
-
size: "
|
|
4947
|
+
size: "tiny"
|
|
4646
4948
|
})
|
|
4647
4949
|
}
|
|
4648
4950
|
) }) : null,
|
|
4649
|
-
description ? /* @__PURE__ */ (0,
|
|
4951
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4650
4952
|
"span",
|
|
4651
4953
|
{
|
|
4652
4954
|
id: descriptionId,
|
|
@@ -4657,7 +4959,7 @@ var Switch = React31.forwardRef(
|
|
|
4657
4959
|
children: renderTextContent(description, {
|
|
4658
4960
|
as: "span",
|
|
4659
4961
|
className: "text-muted-foreground",
|
|
4660
|
-
size: "
|
|
4962
|
+
size: "tiny"
|
|
4661
4963
|
})
|
|
4662
4964
|
}
|
|
4663
4965
|
) : null
|
|
@@ -4671,8 +4973,8 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
|
4671
4973
|
|
|
4672
4974
|
// src/components/table.tsx
|
|
4673
4975
|
var import_class_variance_authority8 = require("class-variance-authority");
|
|
4674
|
-
var
|
|
4675
|
-
var
|
|
4976
|
+
var React33 = __toESM(require("react"), 1);
|
|
4977
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
4676
4978
|
var tableCellVariantOptions = ["default", "primary", "muted"];
|
|
4677
4979
|
var tableStatusToneOptions = [
|
|
4678
4980
|
"active",
|
|
@@ -4722,13 +5024,13 @@ var tableActionButtonVariants = (0, import_class_variance_authority8.cva)(
|
|
|
4722
5024
|
}
|
|
4723
5025
|
}
|
|
4724
5026
|
);
|
|
4725
|
-
var Table =
|
|
4726
|
-
return /* @__PURE__ */ (0,
|
|
5027
|
+
var Table = React33.forwardRef(function Table2({ className, ...props }, ref) {
|
|
5028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4727
5029
|
"div",
|
|
4728
5030
|
{
|
|
4729
5031
|
"data-slot": "table-container",
|
|
4730
5032
|
className: "relative w-full overflow-x-auto",
|
|
4731
|
-
children: /* @__PURE__ */ (0,
|
|
5033
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4732
5034
|
"table",
|
|
4733
5035
|
{
|
|
4734
5036
|
"data-slot": "table",
|
|
@@ -4743,8 +5045,8 @@ var Table = React32.forwardRef(function Table2({ className, ...props }, ref) {
|
|
|
4743
5045
|
}
|
|
4744
5046
|
);
|
|
4745
5047
|
});
|
|
4746
|
-
var TableHeader =
|
|
4747
|
-
return /* @__PURE__ */ (0,
|
|
5048
|
+
var TableHeader = React33.forwardRef(function TableHeader2({ className, ...props }, ref) {
|
|
5049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4748
5050
|
"thead",
|
|
4749
5051
|
{
|
|
4750
5052
|
"data-slot": "table-header",
|
|
@@ -4757,8 +5059,8 @@ var TableHeader = React32.forwardRef(function TableHeader2({ className, ...props
|
|
|
4757
5059
|
}
|
|
4758
5060
|
);
|
|
4759
5061
|
});
|
|
4760
|
-
var TableBody =
|
|
4761
|
-
return /* @__PURE__ */ (0,
|
|
5062
|
+
var TableBody = React33.forwardRef(function TableBody2({ className, ...props }, ref) {
|
|
5063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4762
5064
|
"tbody",
|
|
4763
5065
|
{
|
|
4764
5066
|
"data-slot": "table-body",
|
|
@@ -4768,8 +5070,8 @@ var TableBody = React32.forwardRef(function TableBody2({ className, ...props },
|
|
|
4768
5070
|
}
|
|
4769
5071
|
);
|
|
4770
5072
|
});
|
|
4771
|
-
var TableFooter =
|
|
4772
|
-
return /* @__PURE__ */ (0,
|
|
5073
|
+
var TableFooter = React33.forwardRef(function TableFooter2({ className, ...props }, ref) {
|
|
5074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4773
5075
|
"tfoot",
|
|
4774
5076
|
{
|
|
4775
5077
|
"data-slot": "table-footer",
|
|
@@ -4782,8 +5084,8 @@ var TableFooter = React32.forwardRef(function TableFooter2({ className, ...props
|
|
|
4782
5084
|
}
|
|
4783
5085
|
);
|
|
4784
5086
|
});
|
|
4785
|
-
var TableRow =
|
|
4786
|
-
return /* @__PURE__ */ (0,
|
|
5087
|
+
var TableRow = React33.forwardRef(function TableRow2({ className, ...props }, ref) {
|
|
5088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4787
5089
|
"tr",
|
|
4788
5090
|
{
|
|
4789
5091
|
"data-slot": "table-row",
|
|
@@ -4796,8 +5098,8 @@ var TableRow = React32.forwardRef(function TableRow2({ className, ...props }, re
|
|
|
4796
5098
|
}
|
|
4797
5099
|
);
|
|
4798
5100
|
});
|
|
4799
|
-
var TableHead =
|
|
4800
|
-
return /* @__PURE__ */ (0,
|
|
5101
|
+
var TableHead = React33.forwardRef(function TableHead2({ className, children, ...props }, ref) {
|
|
5102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4801
5103
|
"th",
|
|
4802
5104
|
{
|
|
4803
5105
|
"data-slot": "table-head",
|
|
@@ -4816,9 +5118,9 @@ var TableHead = React32.forwardRef(function TableHead2({ className, children, ..
|
|
|
4816
5118
|
}
|
|
4817
5119
|
);
|
|
4818
5120
|
});
|
|
4819
|
-
var TableCell =
|
|
5121
|
+
var TableCell = React33.forwardRef(
|
|
4820
5122
|
function TableCell2({ className, variant, children, ...props }, ref) {
|
|
4821
|
-
return /* @__PURE__ */ (0,
|
|
5123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4822
5124
|
"td",
|
|
4823
5125
|
{
|
|
4824
5126
|
"data-slot": "table-cell",
|
|
@@ -4835,8 +5137,8 @@ var TableCell = React32.forwardRef(
|
|
|
4835
5137
|
);
|
|
4836
5138
|
}
|
|
4837
5139
|
);
|
|
4838
|
-
var TableCaption =
|
|
4839
|
-
return /* @__PURE__ */ (0,
|
|
5140
|
+
var TableCaption = React33.forwardRef(function TableCaption2({ className, children, ...props }, ref) {
|
|
5141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4840
5142
|
"caption",
|
|
4841
5143
|
{
|
|
4842
5144
|
"data-slot": "table-caption",
|
|
@@ -4861,7 +5163,7 @@ function TableStatusBadge({
|
|
|
4861
5163
|
children,
|
|
4862
5164
|
...props
|
|
4863
5165
|
}) {
|
|
4864
|
-
return /* @__PURE__ */ (0,
|
|
5166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4865
5167
|
Badge,
|
|
4866
5168
|
{
|
|
4867
5169
|
variant: "pill",
|
|
@@ -4876,8 +5178,8 @@ function TableStatusBadge({
|
|
|
4876
5178
|
}
|
|
4877
5179
|
);
|
|
4878
5180
|
}
|
|
4879
|
-
var TableActionButton =
|
|
4880
|
-
return /* @__PURE__ */ (0,
|
|
5181
|
+
var TableActionButton = React33.forwardRef(function TableActionButton2({ className, tone, type = "button", children, ...props }, ref) {
|
|
5182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4881
5183
|
Button,
|
|
4882
5184
|
{
|
|
4883
5185
|
ref,
|
|
@@ -4895,8 +5197,8 @@ var TableActionButton = React32.forwardRef(function TableActionButton2({ classNa
|
|
|
4895
5197
|
}
|
|
4896
5198
|
);
|
|
4897
5199
|
});
|
|
4898
|
-
var TableActions =
|
|
4899
|
-
return /* @__PURE__ */ (0,
|
|
5200
|
+
var TableActions = React33.forwardRef(function TableActions2({ className, ...props }, ref) {
|
|
5201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4900
5202
|
"div",
|
|
4901
5203
|
{
|
|
4902
5204
|
ref,
|
|
@@ -4917,10 +5219,10 @@ TableActionButton.displayName = "TableActionButton";
|
|
|
4917
5219
|
TableActions.displayName = "TableActions";
|
|
4918
5220
|
|
|
4919
5221
|
// src/components/tabs.tsx
|
|
4920
|
-
var
|
|
5222
|
+
var React34 = __toESM(require("react"), 1);
|
|
4921
5223
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
4922
5224
|
var import_react3 = require("motion/react");
|
|
4923
|
-
var
|
|
5225
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
4924
5226
|
function resolveDefaultValue(items, defaultValue) {
|
|
4925
5227
|
if (defaultValue) {
|
|
4926
5228
|
return defaultValue;
|
|
@@ -4944,13 +5246,13 @@ function Tabs({
|
|
|
4944
5246
|
onChange: onValueChange,
|
|
4945
5247
|
value
|
|
4946
5248
|
});
|
|
4947
|
-
const indicatorLayoutId =
|
|
4948
|
-
|
|
5249
|
+
const indicatorLayoutId = React34.useId();
|
|
5250
|
+
React34.useEffect(() => {
|
|
4949
5251
|
if (value === void 0) {
|
|
4950
5252
|
setUncontrolledCurrentValue(resolvedDefaultValue);
|
|
4951
5253
|
}
|
|
4952
5254
|
}, [resolvedDefaultValue, setUncontrolledCurrentValue, value]);
|
|
4953
|
-
return /* @__PURE__ */ (0,
|
|
5255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4954
5256
|
TabsPrimitive.Root,
|
|
4955
5257
|
{
|
|
4956
5258
|
className: cn("w-full", className),
|
|
@@ -4958,7 +5260,7 @@ function Tabs({
|
|
|
4958
5260
|
value: currentValue,
|
|
4959
5261
|
...props,
|
|
4960
5262
|
children: [
|
|
4961
|
-
/* @__PURE__ */ (0,
|
|
5263
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4962
5264
|
TabsPrimitive.List,
|
|
4963
5265
|
{
|
|
4964
5266
|
"aria-label": "Subtelas navegaveis",
|
|
@@ -4969,19 +5271,19 @@ function Tabs({
|
|
|
4969
5271
|
children: items.map((item) => {
|
|
4970
5272
|
const isUnavailable = item.disabled || item.loading;
|
|
4971
5273
|
const isActive = item.value === currentValue;
|
|
4972
|
-
return /* @__PURE__ */ (0,
|
|
5274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4973
5275
|
TabsPrimitive.Trigger,
|
|
4974
5276
|
{
|
|
4975
5277
|
value: item.value,
|
|
4976
5278
|
disabled: isUnavailable,
|
|
4977
5279
|
className: cn(
|
|
4978
|
-
"relative inline-flex min-h-[76px] shrink-0 items-center justify-center px-8 pb-4 pt-6 [font-family:var(--sofya-text-
|
|
5280
|
+
"relative inline-flex min-h-[76px] shrink-0 items-center justify-center px-8 pb-4 pt-6 [font-family:var(--sofya-text-body-font-family)] text-[length:var(--sofya-text-body-font-size)] [font-weight:var(--sofya-text-body-font-weight)] leading-[var(--sofya-text-body-line-height)] tracking-[var(--sofya-text-body-letter-spacing)] text-[color:var(--sofya-text-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",
|
|
4979
5281
|
item.loading && "disabled:text-[color:var(--sofya-text-soft)]",
|
|
4980
5282
|
triggerClassName,
|
|
4981
5283
|
item.triggerClassName
|
|
4982
5284
|
),
|
|
4983
5285
|
children: [
|
|
4984
|
-
isActive ? /* @__PURE__ */ (0,
|
|
5286
|
+
isActive ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4985
5287
|
import_react3.motion.span,
|
|
4986
5288
|
{
|
|
4987
5289
|
"aria-hidden": "true",
|
|
@@ -4991,18 +5293,18 @@ function Tabs({
|
|
|
4991
5293
|
transition: { duration: 0.25, ease: "easeInOut" }
|
|
4992
5294
|
}
|
|
4993
5295
|
) : null,
|
|
4994
|
-
/* @__PURE__ */ (0,
|
|
4995
|
-
item.loading ? /* @__PURE__ */ (0,
|
|
5296
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "relative z-10 inline-flex items-center gap-2", children: [
|
|
5297
|
+
item.loading ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4996
5298
|
"span",
|
|
4997
5299
|
{
|
|
4998
5300
|
"aria-hidden": "true",
|
|
4999
5301
|
className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-r-transparent"
|
|
5000
5302
|
}
|
|
5001
5303
|
) : null,
|
|
5002
|
-
/* @__PURE__ */ (0,
|
|
5304
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: renderTextContent(item.label, {
|
|
5003
5305
|
as: "span",
|
|
5004
5306
|
className: "block text-inherit",
|
|
5005
|
-
size: "
|
|
5307
|
+
size: "body"
|
|
5006
5308
|
}) })
|
|
5007
5309
|
] })
|
|
5008
5310
|
]
|
|
@@ -5013,7 +5315,7 @@ function Tabs({
|
|
|
5013
5315
|
}
|
|
5014
5316
|
),
|
|
5015
5317
|
items.map(
|
|
5016
|
-
(item) => item.content !== void 0 ? /* @__PURE__ */ (0,
|
|
5318
|
+
(item) => item.content !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5017
5319
|
TabsPrimitive.Content,
|
|
5018
5320
|
{
|
|
5019
5321
|
value: item.value,
|
|
@@ -5036,9 +5338,9 @@ function Tabs({
|
|
|
5036
5338
|
Tabs.displayName = "Tabs";
|
|
5037
5339
|
|
|
5038
5340
|
// src/components/textarea.tsx
|
|
5039
|
-
var
|
|
5040
|
-
var
|
|
5041
|
-
var Textarea =
|
|
5341
|
+
var React35 = __toESM(require("react"), 1);
|
|
5342
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
5343
|
+
var Textarea = React35.forwardRef(
|
|
5042
5344
|
({
|
|
5043
5345
|
className,
|
|
5044
5346
|
containerClassName,
|
|
@@ -5048,14 +5350,14 @@ var Textarea = React34.forwardRef(
|
|
|
5048
5350
|
rows = 5,
|
|
5049
5351
|
...props
|
|
5050
5352
|
}, ref) => {
|
|
5051
|
-
const generatedId =
|
|
5353
|
+
const generatedId = React35.useId();
|
|
5052
5354
|
const resolvedId = id ?? generatedId;
|
|
5053
5355
|
const ariaLabel = props["aria-label"] ?? (typeof label === "string" ? label : void 0);
|
|
5054
|
-
const control = /* @__PURE__ */ (0,
|
|
5356
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5055
5357
|
"textarea",
|
|
5056
5358
|
{
|
|
5057
5359
|
className: cn(
|
|
5058
|
-
"flex min-h-[120px] w-full resize-y rounded-[10px] border border-[color:var(--sofya-border-strong)] bg-card px-4 py-2 [font-family:var(--sofya-text-
|
|
5360
|
+
"flex min-h-[120px] w-full resize-y rounded-[10px] border border-[color:var(--sofya-border-strong)] bg-card px-4 py-2 [font-family:var(--sofya-text-tiny-font-family)] text-[length:var(--sofya-text-tiny-font-size)] [font-weight:var(--sofya-text-tiny-font-weight)] leading-[var(--sofya-text-tiny-line-height)] tracking-[var(--sofya-text-tiny-letter-spacing)] 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",
|
|
5059
5361
|
className
|
|
5060
5362
|
),
|
|
5061
5363
|
id: resolvedId,
|
|
@@ -5065,7 +5367,7 @@ var Textarea = React34.forwardRef(
|
|
|
5065
5367
|
"aria-label": ariaLabel
|
|
5066
5368
|
}
|
|
5067
5369
|
);
|
|
5068
|
-
return /* @__PURE__ */ (0,
|
|
5370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5069
5371
|
FieldShell,
|
|
5070
5372
|
{
|
|
5071
5373
|
control,
|
|
@@ -5080,14 +5382,14 @@ var Textarea = React34.forwardRef(
|
|
|
5080
5382
|
Textarea.displayName = "Textarea";
|
|
5081
5383
|
|
|
5082
5384
|
// src/components/tooltip.tsx
|
|
5083
|
-
var
|
|
5385
|
+
var React36 = __toESM(require("react"), 1);
|
|
5084
5386
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
5085
|
-
var
|
|
5387
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5086
5388
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
5087
5389
|
var Tooltip = TooltipPrimitive.Root;
|
|
5088
5390
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
5089
|
-
var TooltipContent =
|
|
5090
|
-
return /* @__PURE__ */ (0,
|
|
5391
|
+
var TooltipContent = React36.forwardRef(function TooltipContent2({ className, sideOffset = 8, ...props }, ref) {
|
|
5392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5091
5393
|
TooltipPrimitive.Content,
|
|
5092
5394
|
{
|
|
5093
5395
|
ref,
|
|
@@ -5111,9 +5413,9 @@ var TooltipContent = React35.forwardRef(function TooltipContent2({ className, si
|
|
|
5111
5413
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
5112
5414
|
|
|
5113
5415
|
// src/theme/provider.tsx
|
|
5114
|
-
var
|
|
5416
|
+
var React37 = __toESM(require("react"), 1);
|
|
5115
5417
|
var import_tokens = require("@sofya-ds/tokens");
|
|
5116
|
-
var
|
|
5418
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
5117
5419
|
var SOFYA_FONT_LINKS = [
|
|
5118
5420
|
{
|
|
5119
5421
|
id: "preconnect-googleapis",
|
|
@@ -5133,7 +5435,7 @@ var SOFYA_FONT_LINKS = [
|
|
|
5133
5435
|
}
|
|
5134
5436
|
];
|
|
5135
5437
|
function useSofyaFontLinks() {
|
|
5136
|
-
|
|
5438
|
+
React37.useEffect(() => {
|
|
5137
5439
|
if (typeof document === "undefined") {
|
|
5138
5440
|
return;
|
|
5139
5441
|
}
|
|
@@ -5166,7 +5468,7 @@ function SofyaProvider({
|
|
|
5166
5468
|
useSofyaFontLinks();
|
|
5167
5469
|
const theme = (0, import_tokens.createWhitelabelTheme)(overrides ?? {}, preset);
|
|
5168
5470
|
const cssVariables = (0, import_tokens.themeToCssVariables)(theme);
|
|
5169
|
-
return /* @__PURE__ */ (0,
|
|
5471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5170
5472
|
"div",
|
|
5171
5473
|
{
|
|
5172
5474
|
"data-sofya-theme": theme.name,
|
|
@@ -5212,6 +5514,7 @@ var import_tokens2 = require("@sofya-ds/tokens");
|
|
|
5212
5514
|
DialogTitle,
|
|
5213
5515
|
DialogTrigger,
|
|
5214
5516
|
Dropdown,
|
|
5517
|
+
DropdownSearch,
|
|
5215
5518
|
Empty,
|
|
5216
5519
|
EmptyContent,
|
|
5217
5520
|
EmptyDescription,
|