@sofya-ds/react 1.3.5 → 1.3.7
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 +956 -654
- package/dist/index.css +1 -1
- package/dist/index.d.cts +36 -3
- package/dist/index.d.ts +36 -3
- package/dist/index.js +955 -654
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1792,7 +1792,8 @@ import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
|
1792
1792
|
var dropdownVariantOptions = [
|
|
1793
1793
|
"card",
|
|
1794
1794
|
"language",
|
|
1795
|
-
"selected"
|
|
1795
|
+
"selected",
|
|
1796
|
+
"action"
|
|
1796
1797
|
];
|
|
1797
1798
|
var dropdownAppearanceOptions = ["card"];
|
|
1798
1799
|
var dropdownTriggerSizeOptions = ["default", "sm", "lg"];
|
|
@@ -1804,7 +1805,8 @@ var dropdownLanguageItems = [
|
|
|
1804
1805
|
var dropdownTriggerToneClasses = {
|
|
1805
1806
|
card: "text-primary",
|
|
1806
1807
|
language: "",
|
|
1807
|
-
selected: "w-full border-[color:var(--sofya-border-strong)] [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)]"
|
|
1808
|
+
selected: "w-full border-[color:var(--sofya-border-strong)] [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)]",
|
|
1809
|
+
action: ""
|
|
1808
1810
|
};
|
|
1809
1811
|
var dropdownTriggerSizeClasses = {
|
|
1810
1812
|
regular: {
|
|
@@ -1821,6 +1823,11 @@ var dropdownTriggerSizeClasses = {
|
|
|
1821
1823
|
default: "h-5 w-5 p-0",
|
|
1822
1824
|
sm: "h-[18px] w-[18px] p-0",
|
|
1823
1825
|
lg: "h-6 w-6 p-0"
|
|
1826
|
+
},
|
|
1827
|
+
action: {
|
|
1828
|
+
default: "h-10 w-10 p-0",
|
|
1829
|
+
sm: "h-8 w-8 p-0",
|
|
1830
|
+
lg: "h-12 w-12 p-0"
|
|
1824
1831
|
}
|
|
1825
1832
|
};
|
|
1826
1833
|
var dropdownAppearanceClasses = {
|
|
@@ -1832,12 +1839,14 @@ var dropdownAppearanceClasses = {
|
|
|
1832
1839
|
var dropdownContentBaseClasses = {
|
|
1833
1840
|
card: "border-[color:var(--sofya-border-strong)] text-foreground shadow-[var(--sofya-shadow-soft)]",
|
|
1834
1841
|
language: "w-[224px] min-w-[224px] border-[color:var(--sofya-border-strong)] text-foreground shadow-[var(--sofya-shadow-soft)]",
|
|
1835
|
-
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)]"
|
|
1842
|
+
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)]",
|
|
1843
|
+
action: "w-[224px] min-w-[224px] border-[color:var(--sofya-border-strong)] text-foreground shadow-[var(--sofya-shadow-soft)]"
|
|
1836
1844
|
};
|
|
1837
1845
|
var dropdownItemClasses = {
|
|
1838
1846
|
card: "text-foreground",
|
|
1839
1847
|
language: "text-foreground",
|
|
1840
|
-
selected: "text-foreground"
|
|
1848
|
+
selected: "text-foreground",
|
|
1849
|
+
action: "text-foreground"
|
|
1841
1850
|
};
|
|
1842
1851
|
function isButtonLanguageLocale(value) {
|
|
1843
1852
|
return buttonLanguageLocaleOptions.includes(value);
|
|
@@ -1863,6 +1872,9 @@ function resolveDropdownTriggerSizeFamily(variant) {
|
|
|
1863
1872
|
if (variant === "selected") {
|
|
1864
1873
|
return "selected";
|
|
1865
1874
|
}
|
|
1875
|
+
if (variant === "action") {
|
|
1876
|
+
return "action";
|
|
1877
|
+
}
|
|
1866
1878
|
return "regular";
|
|
1867
1879
|
}
|
|
1868
1880
|
function DefaultDropdownTriggerIcon({ variant }) {
|
|
@@ -1901,6 +1913,7 @@ function Dropdown({
|
|
|
1901
1913
|
defaultOpen,
|
|
1902
1914
|
defaultValue,
|
|
1903
1915
|
disabled = false,
|
|
1916
|
+
iconTrigger,
|
|
1904
1917
|
items,
|
|
1905
1918
|
itemClassName,
|
|
1906
1919
|
modal,
|
|
@@ -1917,9 +1930,10 @@ function Dropdown({
|
|
|
1917
1930
|
}) {
|
|
1918
1931
|
const isLanguageVariant = variant === "language";
|
|
1919
1932
|
const isSelectedVariant = variant === "selected";
|
|
1933
|
+
const isActionVariant = variant === "action";
|
|
1920
1934
|
const resolvedAppearance = resolveDropdownAppearance({ appearance, variant });
|
|
1921
1935
|
const triggerSizeFamily = resolveDropdownTriggerSizeFamily(variant);
|
|
1922
|
-
const usesDefaultListStyle = !isLanguageVariant;
|
|
1936
|
+
const usesDefaultListStyle = !isLanguageVariant && !isActionVariant;
|
|
1923
1937
|
const resolvedItems = React12.useMemo(
|
|
1924
1938
|
() => isLanguageVariant ? items && items.length > 0 ? items : dropdownLanguageItems : items ?? [],
|
|
1925
1939
|
[isLanguageVariant, items]
|
|
@@ -1930,6 +1944,7 @@ function Dropdown({
|
|
|
1930
1944
|
onChange: onValueChange,
|
|
1931
1945
|
value
|
|
1932
1946
|
});
|
|
1947
|
+
const [subValues, setSubValues] = React12.useState({});
|
|
1933
1948
|
const radioValue = selectedValue ?? "";
|
|
1934
1949
|
const selectedItem = resolvedItems.find(
|
|
1935
1950
|
(item) => item.value === selectedValue
|
|
@@ -1951,7 +1966,7 @@ function Dropdown({
|
|
|
1951
1966
|
setUncontrolledSelectedValue,
|
|
1952
1967
|
value
|
|
1953
1968
|
]);
|
|
1954
|
-
const resolvedTriggerIcon = isLanguageVariant ? void 0 : triggerIcon === void 0 ? /* @__PURE__ */ jsx12(DefaultDropdownTriggerIcon, { variant }) : triggerIcon;
|
|
1969
|
+
const resolvedTriggerIcon = isLanguageVariant || isActionVariant ? void 0 : triggerIcon === void 0 ? /* @__PURE__ */ jsx12(DefaultDropdownTriggerIcon, { variant }) : triggerIcon;
|
|
1955
1970
|
const triggerLabel = selectedItem?.triggerLabel ?? selectedItem?.label ?? placeholder;
|
|
1956
1971
|
const selectedTriggerToneClassName = isSelectedVariant ? hasSelectedItem ? "text-foreground" : "text-[color:var(--sofya-text-soft)]" : void 0;
|
|
1957
1972
|
return /* @__PURE__ */ jsxs5(
|
|
@@ -1966,7 +1981,7 @@ function Dropdown({
|
|
|
1966
1981
|
Button,
|
|
1967
1982
|
{
|
|
1968
1983
|
type: "button",
|
|
1969
|
-
variant: isLanguageVariant ? "language" : "dropdown",
|
|
1984
|
+
variant: isLanguageVariant ? "language" : isActionVariant ? "ghost" : "dropdown",
|
|
1970
1985
|
languageLocale: selectedLanguageLocale,
|
|
1971
1986
|
"data-appearance": resolvedAppearance,
|
|
1972
1987
|
"data-trigger-size": triggerSize,
|
|
@@ -1978,8 +1993,9 @@ function Dropdown({
|
|
|
1978
1993
|
selectedTriggerToneClassName,
|
|
1979
1994
|
triggerClassName
|
|
1980
1995
|
),
|
|
1996
|
+
leftIcon: isActionVariant ? iconTrigger : void 0,
|
|
1981
1997
|
rightIcon: resolvedTriggerIcon,
|
|
1982
|
-
children: isLanguageVariant ? null : /* @__PURE__ */ jsx12("span", { className: "min-w-0 truncate", children: renderTextContent(triggerLabel, {
|
|
1998
|
+
children: isLanguageVariant || isActionVariant ? null : /* @__PURE__ */ jsx12("span", { className: "min-w-0 truncate", children: renderTextContent(triggerLabel, {
|
|
1983
1999
|
as: "span",
|
|
1984
2000
|
className: "block min-w-0 truncate text-inherit",
|
|
1985
2001
|
size: "body"
|
|
@@ -2003,49 +2019,127 @@ function Dropdown({
|
|
|
2003
2019
|
{
|
|
2004
2020
|
value: radioValue,
|
|
2005
2021
|
onValueChange: setSelectedValue,
|
|
2006
|
-
className: "grid gap-
|
|
2022
|
+
className: "grid gap-1",
|
|
2007
2023
|
children: resolvedItems.map((item) => {
|
|
2008
2024
|
const isSelected = item.value === selectedValue;
|
|
2009
2025
|
const itemLanguageLocale = resolveItemLanguageLocale(item);
|
|
2010
2026
|
const indicator = item.indicator ?? /* @__PURE__ */ jsx12(DefaultDropdownItemIndicator, {});
|
|
2011
2027
|
const itemIcon = item.icon ?? (variant === "language" && itemLanguageLocale ? /* @__PURE__ */ jsx12(LanguageFlagIcon, { locale: itemLanguageLocale }) : null);
|
|
2028
|
+
if (isActionVariant && item.subItems && item.subItems.length > 0) {
|
|
2029
|
+
const currentSubValue = subValues[item.value];
|
|
2030
|
+
return /* @__PURE__ */ jsxs5(DropdownMenuPrimitive.Sub, { children: [
|
|
2031
|
+
/* @__PURE__ */ jsxs5(
|
|
2032
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
2033
|
+
{
|
|
2034
|
+
disabled: item.disabled,
|
|
2035
|
+
className: cn(
|
|
2036
|
+
"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",
|
|
2037
|
+
"data-[highlighted]:bg-muted data-[state=open]:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-40",
|
|
2038
|
+
dropdownItemClasses[variant],
|
|
2039
|
+
itemClassName
|
|
2040
|
+
),
|
|
2041
|
+
children: [
|
|
2042
|
+
itemIcon && /* @__PURE__ */ jsx12("span", { className: "flex shrink-0 items-center justify-center", children: itemIcon }),
|
|
2043
|
+
/* @__PURE__ */ jsx12("span", { className: "min-w-0 flex-1 truncate", children: renderTextContent(item.label, {
|
|
2044
|
+
as: "span",
|
|
2045
|
+
className: "block truncate text-inherit",
|
|
2046
|
+
size: "tiny"
|
|
2047
|
+
}) }),
|
|
2048
|
+
/* @__PURE__ */ jsx12("span", { className: "flex shrink-0 items-center justify-center text-[color:var(--sofya-text-subtle)]", children: /* @__PURE__ */ jsx12(Icon, { name: "caret-right", size: 12 }) })
|
|
2049
|
+
]
|
|
2050
|
+
}
|
|
2051
|
+
),
|
|
2052
|
+
/* @__PURE__ */ jsx12(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx12(
|
|
2053
|
+
DropdownMenuPrimitive.SubContent,
|
|
2054
|
+
{
|
|
2055
|
+
sideOffset: 4,
|
|
2056
|
+
className: cn(
|
|
2057
|
+
"sofya-dropdown-content z-50 w-[224px] min-w-[224px] overflow-hidden border bg-card p-2 outline-none",
|
|
2058
|
+
"rounded-[20px] border-[color:var(--sofya-border-strong)] text-foreground shadow-[var(--sofya-shadow-soft)]"
|
|
2059
|
+
),
|
|
2060
|
+
children: /* @__PURE__ */ jsx12(
|
|
2061
|
+
DropdownMenuPrimitive.RadioGroup,
|
|
2062
|
+
{
|
|
2063
|
+
value: currentSubValue ?? "",
|
|
2064
|
+
onValueChange: (subValue) => {
|
|
2065
|
+
setSubValues((prev) => ({
|
|
2066
|
+
...prev,
|
|
2067
|
+
[item.value]: subValue
|
|
2068
|
+
}));
|
|
2069
|
+
setSelectedValue(subValue);
|
|
2070
|
+
},
|
|
2071
|
+
className: "grid gap-1",
|
|
2072
|
+
children: item.subItems.map((subItem) => {
|
|
2073
|
+
const isSubSelected = subItem.value === currentSubValue;
|
|
2074
|
+
return /* @__PURE__ */ jsxs5(
|
|
2075
|
+
DropdownMenuPrimitive.RadioItem,
|
|
2076
|
+
{
|
|
2077
|
+
value: subItem.value,
|
|
2078
|
+
disabled: subItem.disabled,
|
|
2079
|
+
className: cn(
|
|
2080
|
+
"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",
|
|
2081
|
+
"data-[highlighted]:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-40"
|
|
2082
|
+
),
|
|
2083
|
+
children: [
|
|
2084
|
+
subItem.icon && /* @__PURE__ */ jsx12("span", { className: "flex shrink-0 items-center justify-center", children: subItem.icon }),
|
|
2085
|
+
/* @__PURE__ */ jsx12("span", { className: "min-w-0 flex-1 truncate", children: renderTextContent(subItem.label, {
|
|
2086
|
+
as: "span",
|
|
2087
|
+
className: "block truncate text-inherit",
|
|
2088
|
+
size: "tiny"
|
|
2089
|
+
}) }),
|
|
2090
|
+
/* @__PURE__ */ jsx12(
|
|
2091
|
+
"span",
|
|
2092
|
+
{
|
|
2093
|
+
"aria-hidden": "true",
|
|
2094
|
+
className: cn(
|
|
2095
|
+
"flex h-4 w-4 shrink-0 items-center justify-center text-primary transition-opacity duration-sofya ease-sofya",
|
|
2096
|
+
isSubSelected ? "opacity-100" : "opacity-0"
|
|
2097
|
+
),
|
|
2098
|
+
children: /* @__PURE__ */ jsx12(DefaultDropdownItemIndicator, {})
|
|
2099
|
+
}
|
|
2100
|
+
)
|
|
2101
|
+
]
|
|
2102
|
+
},
|
|
2103
|
+
subItem.value
|
|
2104
|
+
);
|
|
2105
|
+
})
|
|
2106
|
+
}
|
|
2107
|
+
)
|
|
2108
|
+
}
|
|
2109
|
+
) })
|
|
2110
|
+
] }, item.value);
|
|
2111
|
+
}
|
|
2012
2112
|
if (!usesDefaultListStyle) {
|
|
2013
|
-
return /* @__PURE__ */
|
|
2113
|
+
return /* @__PURE__ */ jsxs5(
|
|
2014
2114
|
DropdownMenuPrimitive.RadioItem,
|
|
2015
2115
|
{
|
|
2016
2116
|
value: item.value,
|
|
2017
2117
|
disabled: item.disabled,
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
"
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
children: indicator
|
|
2044
|
-
}
|
|
2045
|
-
)
|
|
2046
|
-
] })
|
|
2047
|
-
}
|
|
2048
|
-
)
|
|
2118
|
+
className: cn(
|
|
2119
|
+
"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",
|
|
2120
|
+
"data-[highlighted]:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-40",
|
|
2121
|
+
dropdownItemClasses[variant],
|
|
2122
|
+
itemClassName
|
|
2123
|
+
),
|
|
2124
|
+
children: [
|
|
2125
|
+
itemIcon && /* @__PURE__ */ jsx12("span", { className: "flex shrink-0 items-center justify-center", children: itemIcon }),
|
|
2126
|
+
/* @__PURE__ */ jsx12("span", { className: "min-w-0 flex-1 truncate", children: renderTextContent(item.label, {
|
|
2127
|
+
as: "span",
|
|
2128
|
+
className: "block truncate text-inherit",
|
|
2129
|
+
size: "tiny"
|
|
2130
|
+
}) }),
|
|
2131
|
+
/* @__PURE__ */ jsx12(
|
|
2132
|
+
"span",
|
|
2133
|
+
{
|
|
2134
|
+
"aria-hidden": "true",
|
|
2135
|
+
className: cn(
|
|
2136
|
+
"flex h-4 w-4 shrink-0 items-center justify-center text-primary transition-opacity duration-sofya ease-sofya",
|
|
2137
|
+
isSelected ? "opacity-100" : "opacity-0"
|
|
2138
|
+
),
|
|
2139
|
+
children: indicator
|
|
2140
|
+
}
|
|
2141
|
+
)
|
|
2142
|
+
]
|
|
2049
2143
|
},
|
|
2050
2144
|
item.value
|
|
2051
2145
|
);
|
|
@@ -2100,256 +2194,15 @@ function Dropdown({
|
|
|
2100
2194
|
);
|
|
2101
2195
|
}
|
|
2102
2196
|
|
|
2103
|
-
// src/components/
|
|
2104
|
-
import * as
|
|
2105
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2106
|
-
import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2107
|
-
var Dialog = DialogPrimitive.Root;
|
|
2108
|
-
var DialogTrigger = DialogPrimitive.Trigger;
|
|
2109
|
-
var DialogPortal = DialogPrimitive.Portal;
|
|
2110
|
-
var DialogClose = DialogPrimitive.Close;
|
|
2111
|
-
var DialogInternalContext = React13.createContext({
|
|
2112
|
-
showCloseButton: true
|
|
2113
|
-
});
|
|
2114
|
-
var DialogOverlay = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
2115
|
-
DialogPrimitive.Overlay,
|
|
2116
|
-
{
|
|
2117
|
-
ref,
|
|
2118
|
-
className: cn(
|
|
2119
|
-
"sofya-dialog-overlay fixed inset-0 z-50 bg-foreground/24 backdrop-blur-[6px]",
|
|
2120
|
-
className
|
|
2121
|
-
),
|
|
2122
|
-
...props
|
|
2123
|
-
}
|
|
2124
|
-
));
|
|
2125
|
-
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
2126
|
-
var DialogContent = React13.forwardRef(
|
|
2127
|
-
({
|
|
2128
|
-
className,
|
|
2129
|
-
children,
|
|
2130
|
-
cardClassName,
|
|
2131
|
-
overlayClassName,
|
|
2132
|
-
showCloseButton = true,
|
|
2133
|
-
variant = "card",
|
|
2134
|
-
...props
|
|
2135
|
-
}, ref) => {
|
|
2136
|
-
const dialogCardStyle = {
|
|
2137
|
-
"--sofya-surface-shadow-override": "var(--sofya-shadow-lg)"
|
|
2138
|
-
};
|
|
2139
|
-
return /* @__PURE__ */ jsx13(DialogInternalContext.Provider, { value: { showCloseButton }, children: /* @__PURE__ */ jsxs6(DialogPortal, { children: [
|
|
2140
|
-
/* @__PURE__ */ jsx13(DialogOverlay, { className: overlayClassName }),
|
|
2141
|
-
/* @__PURE__ */ jsx13("div", { className: "sofya-dialog-positioner fixed inset-0 z-50 flex items-center justify-center p-4", children: /* @__PURE__ */ jsx13(
|
|
2142
|
-
DialogPrimitive.Content,
|
|
2143
|
-
{
|
|
2144
|
-
ref,
|
|
2145
|
-
className: cn(
|
|
2146
|
-
"sofya-dialog-content relative flex w-full max-w-[680px] max-h-[calc(100vh-2rem)] outline-none",
|
|
2147
|
-
className
|
|
2148
|
-
),
|
|
2149
|
-
...props,
|
|
2150
|
-
children: /* @__PURE__ */ jsx13(
|
|
2151
|
-
Card,
|
|
2152
|
-
{
|
|
2153
|
-
variant,
|
|
2154
|
-
className: cn(
|
|
2155
|
-
"flex max-h-[inherit] min-h-0 w-full flex-col gap-6 overflow-y-auto overflow-x-hidden p-6",
|
|
2156
|
-
cardClassName
|
|
2157
|
-
),
|
|
2158
|
-
style: dialogCardStyle,
|
|
2159
|
-
children
|
|
2160
|
-
}
|
|
2161
|
-
)
|
|
2162
|
-
}
|
|
2163
|
-
) })
|
|
2164
|
-
] }) });
|
|
2165
|
-
}
|
|
2166
|
-
);
|
|
2167
|
-
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
2168
|
-
function DialogHeader({ className, children, ...props }) {
|
|
2169
|
-
const { showCloseButton } = React13.useContext(DialogInternalContext);
|
|
2170
|
-
return /* @__PURE__ */ jsxs6(
|
|
2171
|
-
"div",
|
|
2172
|
-
{
|
|
2173
|
-
className: cn("flex w-full items-start justify-between gap-4", className),
|
|
2174
|
-
...props,
|
|
2175
|
-
children: [
|
|
2176
|
-
/* @__PURE__ */ jsx13("div", { className: "flex min-w-0 flex-1 flex-col gap-2 text-left", children }),
|
|
2177
|
-
showCloseButton ? /* @__PURE__ */ jsx13(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx13(
|
|
2178
|
-
Button,
|
|
2179
|
-
{
|
|
2180
|
-
type: "button",
|
|
2181
|
-
variant: "ghost",
|
|
2182
|
-
size: "icon",
|
|
2183
|
-
"aria-label": "Close",
|
|
2184
|
-
leftIcon: /* @__PURE__ */ jsx13(Icon, { name: "x", size: 18 }),
|
|
2185
|
-
className: "shrink-0 text-muted-foreground hover:text-foreground"
|
|
2186
|
-
}
|
|
2187
|
-
) }) : null
|
|
2188
|
-
]
|
|
2189
|
-
}
|
|
2190
|
-
);
|
|
2191
|
-
}
|
|
2192
|
-
function DialogBody({ className, ...props }) {
|
|
2193
|
-
return /* @__PURE__ */ jsx13(
|
|
2194
|
-
"div",
|
|
2195
|
-
{
|
|
2196
|
-
className: cn("flex flex-col gap-4", className),
|
|
2197
|
-
...props
|
|
2198
|
-
}
|
|
2199
|
-
);
|
|
2200
|
-
}
|
|
2201
|
-
function DialogFooter({ className, ...props }) {
|
|
2202
|
-
return /* @__PURE__ */ jsx13(
|
|
2203
|
-
"div",
|
|
2204
|
-
{
|
|
2205
|
-
className: cn("flex items-center justify-end gap-2", className),
|
|
2206
|
-
...props
|
|
2207
|
-
}
|
|
2208
|
-
);
|
|
2209
|
-
}
|
|
2210
|
-
var DialogCancel = React13.forwardRef(
|
|
2211
|
-
({ type = "button", variant = "ghost", ...props }, ref) => /* @__PURE__ */ jsx13(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx13(Button, { ref, type, variant, ...props }) })
|
|
2212
|
-
);
|
|
2213
|
-
DialogCancel.displayName = "DialogCancel";
|
|
2214
|
-
var DialogTitle = React13.forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
2215
|
-
DialogPrimitive.Title,
|
|
2216
|
-
{
|
|
2217
|
-
ref,
|
|
2218
|
-
className: cn("text-card-foreground", className),
|
|
2219
|
-
...props,
|
|
2220
|
-
children: renderTextContent(children, {
|
|
2221
|
-
as: "span",
|
|
2222
|
-
className: "block text-card-foreground",
|
|
2223
|
-
size: "h3"
|
|
2224
|
-
})
|
|
2225
|
-
}
|
|
2226
|
-
));
|
|
2227
|
-
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
2228
|
-
var DialogDescription = React13.forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
2229
|
-
DialogPrimitive.Description,
|
|
2230
|
-
{
|
|
2231
|
-
ref,
|
|
2232
|
-
className: cn("text-muted-foreground", className),
|
|
2233
|
-
...props,
|
|
2234
|
-
children: renderTextContent(children, {
|
|
2235
|
-
as: "span",
|
|
2236
|
-
className: "block text-muted-foreground",
|
|
2237
|
-
size: "body"
|
|
2238
|
-
})
|
|
2239
|
-
}
|
|
2240
|
-
));
|
|
2241
|
-
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
2242
|
-
|
|
2243
|
-
// src/components/empty.tsx
|
|
2244
|
-
import * as React14 from "react";
|
|
2245
|
-
import { cva as cva5 } from "class-variance-authority";
|
|
2246
|
-
import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2247
|
-
var emptyMediaVariantOptions = ["default", "icon"];
|
|
2248
|
-
var emptyMediaVariants = cva5(
|
|
2249
|
-
"inline-flex shrink-0 items-center justify-center transition-[background-color,border-color,color,box-shadow] duration-sofya ease-sofya",
|
|
2250
|
-
{
|
|
2251
|
-
variants: {
|
|
2252
|
-
variant: {
|
|
2253
|
-
default: "[&_img]:max-w-full [&_svg]:shrink-0 [&_svg]:text-primary",
|
|
2254
|
-
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"
|
|
2255
|
-
}
|
|
2256
|
-
},
|
|
2257
|
-
defaultVariants: {
|
|
2258
|
-
variant: "default"
|
|
2259
|
-
}
|
|
2260
|
-
}
|
|
2261
|
-
);
|
|
2262
|
-
var EmptyMedia = React14.forwardRef(function EmptyMedia2({ className, variant, ...props }, ref) {
|
|
2263
|
-
return /* @__PURE__ */ jsx14("div", { ref, className: cn(emptyMediaVariants({ variant }), className), ...props });
|
|
2264
|
-
});
|
|
2265
|
-
function EmptyHeader({ className, ...props }) {
|
|
2266
|
-
return /* @__PURE__ */ jsx14(
|
|
2267
|
-
"div",
|
|
2268
|
-
{
|
|
2269
|
-
className: cn("flex max-w-[34rem] flex-col items-center gap-4 text-center", className),
|
|
2270
|
-
...props
|
|
2271
|
-
}
|
|
2272
|
-
);
|
|
2273
|
-
}
|
|
2274
|
-
function EmptyTitle({ children, className, ...props }) {
|
|
2275
|
-
return /* @__PURE__ */ jsx14(
|
|
2276
|
-
"h2",
|
|
2277
|
-
{
|
|
2278
|
-
className: cn("text-foreground", className),
|
|
2279
|
-
...props,
|
|
2280
|
-
children: renderTextContent(children, {
|
|
2281
|
-
as: "span",
|
|
2282
|
-
className: "block text-foreground",
|
|
2283
|
-
size: "h4"
|
|
2284
|
-
})
|
|
2285
|
-
}
|
|
2286
|
-
);
|
|
2287
|
-
}
|
|
2288
|
-
function EmptyDescription({
|
|
2289
|
-
children,
|
|
2290
|
-
className,
|
|
2291
|
-
...props
|
|
2292
|
-
}) {
|
|
2293
|
-
return /* @__PURE__ */ jsx14(
|
|
2294
|
-
"p",
|
|
2295
|
-
{
|
|
2296
|
-
className: cn("max-w-full text-muted-foreground whitespace-nowrap", className),
|
|
2297
|
-
...props,
|
|
2298
|
-
children: renderTextContent(children, {
|
|
2299
|
-
as: "span",
|
|
2300
|
-
className: "inline-block whitespace-nowrap text-muted-foreground",
|
|
2301
|
-
size: "body"
|
|
2302
|
-
})
|
|
2303
|
-
}
|
|
2304
|
-
);
|
|
2305
|
-
}
|
|
2306
|
-
function EmptyContent({ children, className, ...props }) {
|
|
2307
|
-
return /* @__PURE__ */ jsx14(
|
|
2308
|
-
"div",
|
|
2309
|
-
{
|
|
2310
|
-
className: cn("flex flex-wrap items-center justify-center gap-4 text-center", className),
|
|
2311
|
-
...props,
|
|
2312
|
-
children: renderTextContent(children, {
|
|
2313
|
-
as: "span"
|
|
2314
|
-
})
|
|
2315
|
-
}
|
|
2316
|
-
);
|
|
2317
|
-
}
|
|
2318
|
-
var Empty = React14.forwardRef(function Empty2({ children, className, content, description, media, title, ...props }, ref) {
|
|
2319
|
-
const hasCustomChildren = React14.Children.count(children) > 0;
|
|
2320
|
-
return /* @__PURE__ */ jsx14(
|
|
2321
|
-
"div",
|
|
2322
|
-
{
|
|
2323
|
-
ref,
|
|
2324
|
-
className: cn(
|
|
2325
|
-
"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",
|
|
2326
|
-
className
|
|
2327
|
-
),
|
|
2328
|
-
...props,
|
|
2329
|
-
children: hasCustomChildren ? children : /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
2330
|
-
/* @__PURE__ */ jsxs7(EmptyHeader, { children: [
|
|
2331
|
-
media ?? /* @__PURE__ */ jsx14(EmptyMedia, { variant: "icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx14(Icon, { name: "folders", size: 28 }) }),
|
|
2332
|
-
/* @__PURE__ */ jsx14(EmptyTitle, { children: title ?? "Nada por aqui" }),
|
|
2333
|
-
/* @__PURE__ */ jsx14(EmptyDescription, { children: description ?? "Quando houver conte\xFAdo dispon\xEDvel, ele aparecer\xE1 aqui." })
|
|
2334
|
-
] }),
|
|
2335
|
-
content !== void 0 && content !== null ? /* @__PURE__ */ jsx14(EmptyContent, { children: content }) : null
|
|
2336
|
-
] })
|
|
2337
|
-
}
|
|
2338
|
-
);
|
|
2339
|
-
});
|
|
2340
|
-
Empty.displayName = "Empty";
|
|
2341
|
-
EmptyMedia.displayName = "EmptyMedia";
|
|
2342
|
-
EmptyHeader.displayName = "EmptyHeader";
|
|
2343
|
-
EmptyTitle.displayName = "EmptyTitle";
|
|
2344
|
-
EmptyDescription.displayName = "EmptyDescription";
|
|
2345
|
-
EmptyContent.displayName = "EmptyContent";
|
|
2197
|
+
// src/components/dropdown-search.tsx
|
|
2198
|
+
import * as React18 from "react";
|
|
2346
2199
|
|
|
2347
2200
|
// src/components/input.tsx
|
|
2348
|
-
import * as
|
|
2201
|
+
import * as React15 from "react";
|
|
2349
2202
|
import { REGEXP_ONLY_DIGITS as REGEXP_ONLY_DIGITS2 } from "input-otp";
|
|
2350
2203
|
|
|
2351
2204
|
// src/lib/field-shell.tsx
|
|
2352
|
-
import { jsx as
|
|
2205
|
+
import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2353
2206
|
function FieldLabel({
|
|
2354
2207
|
children,
|
|
2355
2208
|
className,
|
|
@@ -2364,7 +2217,7 @@ function FieldLabel({
|
|
|
2364
2217
|
return null;
|
|
2365
2218
|
}
|
|
2366
2219
|
const Component = htmlFor ? "label" : "div";
|
|
2367
|
-
return /* @__PURE__ */
|
|
2220
|
+
return /* @__PURE__ */ jsx13(
|
|
2368
2221
|
Component,
|
|
2369
2222
|
{
|
|
2370
2223
|
className: cn("text-[color:var(--sofya-text-default)]", className),
|
|
@@ -2391,8 +2244,8 @@ function FieldShell({
|
|
|
2391
2244
|
if (!label && !containerClassName) {
|
|
2392
2245
|
return control;
|
|
2393
2246
|
}
|
|
2394
|
-
return /* @__PURE__ */
|
|
2395
|
-
label ? /* @__PURE__ */
|
|
2247
|
+
return /* @__PURE__ */ jsxs6("div", { className: cn("grid w-full gap-2", containerClassName), children: [
|
|
2248
|
+
label ? /* @__PURE__ */ jsx13(
|
|
2396
2249
|
FieldLabel,
|
|
2397
2250
|
{
|
|
2398
2251
|
className: labelClassName,
|
|
@@ -2408,7 +2261,7 @@ function FieldShell({
|
|
|
2408
2261
|
}
|
|
2409
2262
|
|
|
2410
2263
|
// src/components/input-upload.tsx
|
|
2411
|
-
import * as
|
|
2264
|
+
import * as React13 from "react";
|
|
2412
2265
|
import {
|
|
2413
2266
|
IconFileText,
|
|
2414
2267
|
IconPhoto,
|
|
@@ -2416,7 +2269,7 @@ import {
|
|
|
2416
2269
|
IconVideo
|
|
2417
2270
|
} from "@tabler/icons-react";
|
|
2418
2271
|
import { AnimatePresence, motion as motion2, useReducedMotion as useReducedMotion2 } from "motion/react";
|
|
2419
|
-
import { jsx as
|
|
2272
|
+
import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2420
2273
|
var uploadKindOptions = ["document", "image", "video"];
|
|
2421
2274
|
var uploadAcceptByKind = {
|
|
2422
2275
|
document: ".pdf,.doc,.docx,.txt,.rtf,.odt,.jpg,.jpeg,.png,.webp,.gif",
|
|
@@ -2510,7 +2363,7 @@ function resolveUploadFileVisualKind(file, fallbackKind) {
|
|
|
2510
2363
|
return "document";
|
|
2511
2364
|
}
|
|
2512
2365
|
function UploadGlyph({ className }) {
|
|
2513
|
-
return /* @__PURE__ */
|
|
2366
|
+
return /* @__PURE__ */ jsx14(
|
|
2514
2367
|
IconUpload,
|
|
2515
2368
|
{
|
|
2516
2369
|
"aria-hidden": "true",
|
|
@@ -2523,7 +2376,7 @@ function UploadFileTypeGlyph({
|
|
|
2523
2376
|
kind
|
|
2524
2377
|
}) {
|
|
2525
2378
|
if (kind === "image") {
|
|
2526
|
-
return /* @__PURE__ */
|
|
2379
|
+
return /* @__PURE__ */ jsx14(
|
|
2527
2380
|
IconPhoto,
|
|
2528
2381
|
{
|
|
2529
2382
|
"aria-hidden": "true",
|
|
@@ -2532,7 +2385,7 @@ function UploadFileTypeGlyph({
|
|
|
2532
2385
|
);
|
|
2533
2386
|
}
|
|
2534
2387
|
if (kind === "video") {
|
|
2535
|
-
return /* @__PURE__ */
|
|
2388
|
+
return /* @__PURE__ */ jsx14(
|
|
2536
2389
|
IconVideo,
|
|
2537
2390
|
{
|
|
2538
2391
|
"aria-hidden": "true",
|
|
@@ -2540,7 +2393,7 @@ function UploadFileTypeGlyph({
|
|
|
2540
2393
|
}
|
|
2541
2394
|
);
|
|
2542
2395
|
}
|
|
2543
|
-
return /* @__PURE__ */
|
|
2396
|
+
return /* @__PURE__ */ jsx14(
|
|
2544
2397
|
IconFileText,
|
|
2545
2398
|
{
|
|
2546
2399
|
"aria-hidden": "true",
|
|
@@ -2548,7 +2401,7 @@ function UploadFileTypeGlyph({
|
|
|
2548
2401
|
}
|
|
2549
2402
|
);
|
|
2550
2403
|
}
|
|
2551
|
-
var UploadInputControl =
|
|
2404
|
+
var UploadInputControl = React13.forwardRef(function UploadInputControl2({
|
|
2552
2405
|
accept,
|
|
2553
2406
|
"aria-label": ariaLabel,
|
|
2554
2407
|
className,
|
|
@@ -2562,17 +2415,17 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2562
2415
|
resolvedId,
|
|
2563
2416
|
...uploadProps
|
|
2564
2417
|
}, ref) {
|
|
2565
|
-
const inputRef =
|
|
2566
|
-
const [isDragActive, setIsDragActive] =
|
|
2567
|
-
const [selectedFiles, setSelectedFiles] =
|
|
2418
|
+
const inputRef = React13.useRef(null);
|
|
2419
|
+
const [isDragActive, setIsDragActive] = React13.useState(false);
|
|
2420
|
+
const [selectedFiles, setSelectedFiles] = React13.useState([]);
|
|
2568
2421
|
const resolvedMultiple = multiple ?? true;
|
|
2569
2422
|
const prefersReducedMotion = useReducedMotion2();
|
|
2570
|
-
|
|
2423
|
+
React13.useImperativeHandle(ref, () => inputRef.current);
|
|
2571
2424
|
const resolvedAccept = accept ?? uploadAcceptByKind[uploadKind];
|
|
2572
2425
|
const resolvedAriaLabel = ariaLabel ?? uploadAriaLabelByKind[uploadKind];
|
|
2573
2426
|
const resolvedTitle = uploadTitle ?? "Arraste arquivos aqui ou clique para selecionar";
|
|
2574
2427
|
const resolvedDescription = uploadDescription ?? uploadDescriptionByKind[uploadKind];
|
|
2575
|
-
const syncSelectedFiles =
|
|
2428
|
+
const syncSelectedFiles = React13.useCallback(
|
|
2576
2429
|
(files) => {
|
|
2577
2430
|
const normalizedFiles = resolvedMultiple ? files : files.slice(0, 1);
|
|
2578
2431
|
setSelectedFiles(normalizedFiles);
|
|
@@ -2580,7 +2433,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2580
2433
|
},
|
|
2581
2434
|
[onFilesChange, resolvedMultiple]
|
|
2582
2435
|
);
|
|
2583
|
-
const applyFilesToInput =
|
|
2436
|
+
const applyFilesToInput = React13.useCallback((files) => {
|
|
2584
2437
|
const inputElement = inputRef.current;
|
|
2585
2438
|
if (!inputElement || typeof DataTransfer === "undefined") {
|
|
2586
2439
|
return false;
|
|
@@ -2599,7 +2452,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2599
2452
|
return false;
|
|
2600
2453
|
}
|
|
2601
2454
|
}, []);
|
|
2602
|
-
const handleInputChange =
|
|
2455
|
+
const handleInputChange = React13.useCallback(
|
|
2603
2456
|
(event) => {
|
|
2604
2457
|
const nextFiles = mergeUploadFiles(
|
|
2605
2458
|
selectedFiles,
|
|
@@ -2618,12 +2471,12 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2618
2471
|
syncSelectedFiles
|
|
2619
2472
|
]
|
|
2620
2473
|
);
|
|
2621
|
-
const openPicker =
|
|
2474
|
+
const openPicker = React13.useCallback(() => {
|
|
2622
2475
|
if (!disabled) {
|
|
2623
2476
|
inputRef.current?.click();
|
|
2624
2477
|
}
|
|
2625
2478
|
}, [disabled]);
|
|
2626
|
-
const handleKeyDown =
|
|
2479
|
+
const handleKeyDown = React13.useCallback(
|
|
2627
2480
|
(event) => {
|
|
2628
2481
|
if (disabled) {
|
|
2629
2482
|
return;
|
|
@@ -2635,7 +2488,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2635
2488
|
},
|
|
2636
2489
|
[disabled, openPicker]
|
|
2637
2490
|
);
|
|
2638
|
-
const handleDragEnter =
|
|
2491
|
+
const handleDragEnter = React13.useCallback(
|
|
2639
2492
|
(event) => {
|
|
2640
2493
|
event.preventDefault();
|
|
2641
2494
|
if (!disabled) {
|
|
@@ -2644,7 +2497,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2644
2497
|
},
|
|
2645
2498
|
[disabled]
|
|
2646
2499
|
);
|
|
2647
|
-
const handleDragLeave =
|
|
2500
|
+
const handleDragLeave = React13.useCallback(
|
|
2648
2501
|
(event) => {
|
|
2649
2502
|
if (disabled) {
|
|
2650
2503
|
return;
|
|
@@ -2657,7 +2510,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2657
2510
|
},
|
|
2658
2511
|
[disabled]
|
|
2659
2512
|
);
|
|
2660
|
-
const handleDragOver =
|
|
2513
|
+
const handleDragOver = React13.useCallback(
|
|
2661
2514
|
(event) => {
|
|
2662
2515
|
event.preventDefault();
|
|
2663
2516
|
if (disabled) {
|
|
@@ -2668,7 +2521,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2668
2521
|
},
|
|
2669
2522
|
[disabled]
|
|
2670
2523
|
);
|
|
2671
|
-
const handleDrop =
|
|
2524
|
+
const handleDrop = React13.useCallback(
|
|
2672
2525
|
(event) => {
|
|
2673
2526
|
event.preventDefault();
|
|
2674
2527
|
if (disabled) {
|
|
@@ -2701,7 +2554,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2701
2554
|
syncSelectedFiles
|
|
2702
2555
|
]
|
|
2703
2556
|
);
|
|
2704
|
-
const handleRemoveFile =
|
|
2557
|
+
const handleRemoveFile = React13.useCallback(
|
|
2705
2558
|
(fileIndex) => {
|
|
2706
2559
|
if (disabled) {
|
|
2707
2560
|
return;
|
|
@@ -2712,8 +2565,8 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2712
2565
|
},
|
|
2713
2566
|
[applyFilesToInput, disabled, selectedFiles, syncSelectedFiles]
|
|
2714
2567
|
);
|
|
2715
|
-
return /* @__PURE__ */
|
|
2716
|
-
/* @__PURE__ */
|
|
2568
|
+
return /* @__PURE__ */ jsxs7("div", { className: "grid w-full gap-4", children: [
|
|
2569
|
+
/* @__PURE__ */ jsx14(
|
|
2717
2570
|
"input",
|
|
2718
2571
|
{
|
|
2719
2572
|
...uploadProps,
|
|
@@ -2728,7 +2581,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2728
2581
|
onChange: handleInputChange
|
|
2729
2582
|
}
|
|
2730
2583
|
),
|
|
2731
|
-
/* @__PURE__ */
|
|
2584
|
+
/* @__PURE__ */ jsxs7(
|
|
2732
2585
|
"label",
|
|
2733
2586
|
{
|
|
2734
2587
|
"aria-disabled": disabled || void 0,
|
|
@@ -2748,8 +2601,8 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2748
2601
|
onDrop: handleDrop,
|
|
2749
2602
|
onKeyDown: handleKeyDown,
|
|
2750
2603
|
children: [
|
|
2751
|
-
/* @__PURE__ */
|
|
2752
|
-
/* @__PURE__ */
|
|
2604
|
+
/* @__PURE__ */ jsx14("span", { className: "flex size-10 items-center justify-center rounded-[6px] p-2 text-[color:var(--sofya-text-default)]", children: /* @__PURE__ */ jsx14(UploadGlyph, { className: "size-[18px]" }) }),
|
|
2605
|
+
/* @__PURE__ */ jsx14("span", { className: "text-[color:var(--sofya-text-default)]", children: renderTextContent(resolvedTitle, {
|
|
2753
2606
|
as: "span",
|
|
2754
2607
|
className: "block text-[color:var(--sofya-text-default)]",
|
|
2755
2608
|
size: "body",
|
|
@@ -2757,7 +2610,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2757
2610
|
fontWeight: 500
|
|
2758
2611
|
}
|
|
2759
2612
|
}) }),
|
|
2760
|
-
resolvedDescription ? /* @__PURE__ */
|
|
2613
|
+
resolvedDescription ? /* @__PURE__ */ jsx14("span", { className: "text-[color:var(--sofya-text-subtle)]", children: renderTextContent(resolvedDescription, {
|
|
2761
2614
|
as: "span",
|
|
2762
2615
|
className: "block text-[color:var(--sofya-text-subtle)]",
|
|
2763
2616
|
size: "extra-tiny"
|
|
@@ -2765,9 +2618,9 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2765
2618
|
]
|
|
2766
2619
|
}
|
|
2767
2620
|
),
|
|
2768
|
-
/* @__PURE__ */
|
|
2621
|
+
/* @__PURE__ */ jsx14("div", { role: "list", className: "grid gap-4 overflow-hidden", children: /* @__PURE__ */ jsx14(AnimatePresence, { initial: false, children: selectedFiles.map((file, index) => {
|
|
2769
2622
|
const fileKey = resolveUploadFileSignature(file);
|
|
2770
|
-
return /* @__PURE__ */
|
|
2623
|
+
return /* @__PURE__ */ jsx14(
|
|
2771
2624
|
motion2.div,
|
|
2772
2625
|
{
|
|
2773
2626
|
role: "listitem",
|
|
@@ -2776,16 +2629,16 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2776
2629
|
animate: prefersReducedMotion ? { opacity: 1 } : { opacity: 1, y: 0 },
|
|
2777
2630
|
exit: prefersReducedMotion ? { opacity: 0 } : { opacity: 0, y: -6 },
|
|
2778
2631
|
transition: uploadListItemTransition,
|
|
2779
|
-
children: /* @__PURE__ */
|
|
2780
|
-
/* @__PURE__ */
|
|
2632
|
+
children: /* @__PURE__ */ jsxs7(Card, { variant: "card", className: "flex items-center gap-4 p-4", children: [
|
|
2633
|
+
/* @__PURE__ */ jsx14("span", { className: "flex size-11 shrink-0 items-center justify-center rounded-full bg-[color:var(--sofya-surface-hover)] text-primary", children: /* @__PURE__ */ jsx14(
|
|
2781
2634
|
UploadFileTypeGlyph,
|
|
2782
2635
|
{
|
|
2783
2636
|
className: "size-[18px]",
|
|
2784
2637
|
kind: resolveUploadFileVisualKind(file, uploadKind)
|
|
2785
2638
|
}
|
|
2786
2639
|
) }),
|
|
2787
|
-
/* @__PURE__ */
|
|
2788
|
-
/* @__PURE__ */
|
|
2640
|
+
/* @__PURE__ */ jsxs7("div", { className: "min-w-0 flex-1", children: [
|
|
2641
|
+
/* @__PURE__ */ jsx14("p", { className: "truncate text-[color:var(--sofya-text-default)]", children: renderTextContent(file.name, {
|
|
2789
2642
|
as: "span",
|
|
2790
2643
|
className: "block truncate text-[color:var(--sofya-text-default)]",
|
|
2791
2644
|
size: "body",
|
|
@@ -2793,7 +2646,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2793
2646
|
fontWeight: 500
|
|
2794
2647
|
}
|
|
2795
2648
|
}) }),
|
|
2796
|
-
/* @__PURE__ */
|
|
2649
|
+
/* @__PURE__ */ jsx14("p", { className: "mt-2 text-[color:var(--sofya-text-subtle)]", children: renderTextContent(
|
|
2797
2650
|
`${resolveUploadFileBadge(
|
|
2798
2651
|
file
|
|
2799
2652
|
)} \xB7 ${formatUploadFileSize(file.size)}`,
|
|
@@ -2804,7 +2657,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2804
2657
|
}
|
|
2805
2658
|
) })
|
|
2806
2659
|
] }),
|
|
2807
|
-
/* @__PURE__ */
|
|
2660
|
+
/* @__PURE__ */ jsx14(
|
|
2808
2661
|
"button",
|
|
2809
2662
|
{
|
|
2810
2663
|
"aria-label": `Remover ${file.name}`,
|
|
@@ -2816,7 +2669,7 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2816
2669
|
event.stopPropagation();
|
|
2817
2670
|
handleRemoveFile(index);
|
|
2818
2671
|
},
|
|
2819
|
-
children: /* @__PURE__ */
|
|
2672
|
+
children: /* @__PURE__ */ jsx14(
|
|
2820
2673
|
Icon,
|
|
2821
2674
|
{
|
|
2822
2675
|
"aria-hidden": "true",
|
|
@@ -2837,16 +2690,16 @@ var UploadInputControl = React15.forwardRef(function UploadInputControl2({
|
|
|
2837
2690
|
UploadInputControl.displayName = "UploadInputControl";
|
|
2838
2691
|
|
|
2839
2692
|
// src/components/input-otp.tsx
|
|
2840
|
-
import * as
|
|
2693
|
+
import * as React14 from "react";
|
|
2841
2694
|
import {
|
|
2842
2695
|
OTPInput,
|
|
2843
2696
|
OTPInputContext,
|
|
2844
2697
|
REGEXP_ONLY_DIGITS
|
|
2845
2698
|
} from "input-otp";
|
|
2846
|
-
import { jsx as
|
|
2847
|
-
var InputOTP =
|
|
2848
|
-
return /* @__PURE__ */
|
|
2849
|
-
OTPInput,
|
|
2699
|
+
import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2700
|
+
var InputOTP = React14.forwardRef(({ className, containerClassName, ...props }, ref) => {
|
|
2701
|
+
return /* @__PURE__ */ jsx15(
|
|
2702
|
+
OTPInput,
|
|
2850
2703
|
{
|
|
2851
2704
|
ref,
|
|
2852
2705
|
containerClassName: cn(
|
|
@@ -2859,8 +2712,8 @@ var InputOTP = React16.forwardRef(({ className, containerClassName, ...props },
|
|
|
2859
2712
|
);
|
|
2860
2713
|
});
|
|
2861
2714
|
InputOTP.displayName = "InputOTP";
|
|
2862
|
-
var InputOTPGroup =
|
|
2863
|
-
return /* @__PURE__ */
|
|
2715
|
+
var InputOTPGroup = React14.forwardRef(({ className, ...props }, ref) => {
|
|
2716
|
+
return /* @__PURE__ */ jsx15(
|
|
2864
2717
|
"div",
|
|
2865
2718
|
{
|
|
2866
2719
|
ref,
|
|
@@ -2873,12 +2726,12 @@ var InputOTPGroup = React16.forwardRef(({ className, ...props }, ref) => {
|
|
|
2873
2726
|
);
|
|
2874
2727
|
});
|
|
2875
2728
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
2876
|
-
var InputOTPSlot =
|
|
2729
|
+
var InputOTPSlot = React14.forwardRef(
|
|
2877
2730
|
({ className, index, ...props }, ref) => {
|
|
2878
|
-
const otpContext =
|
|
2731
|
+
const otpContext = React14.useContext(OTPInputContext);
|
|
2879
2732
|
const slot = otpContext.slots[index];
|
|
2880
2733
|
if (!slot) {
|
|
2881
|
-
return /* @__PURE__ */
|
|
2734
|
+
return /* @__PURE__ */ jsx15(
|
|
2882
2735
|
"div",
|
|
2883
2736
|
{
|
|
2884
2737
|
ref,
|
|
@@ -2890,7 +2743,7 @@ var InputOTPSlot = React16.forwardRef(
|
|
|
2890
2743
|
}
|
|
2891
2744
|
);
|
|
2892
2745
|
}
|
|
2893
|
-
return /* @__PURE__ */
|
|
2746
|
+
return /* @__PURE__ */ jsxs8(
|
|
2894
2747
|
"div",
|
|
2895
2748
|
{
|
|
2896
2749
|
ref,
|
|
@@ -2902,15 +2755,15 @@ var InputOTPSlot = React16.forwardRef(
|
|
|
2902
2755
|
...props,
|
|
2903
2756
|
children: [
|
|
2904
2757
|
slot.char ?? null,
|
|
2905
|
-
slot.hasFakeCaret ? /* @__PURE__ */
|
|
2758
|
+
slot.hasFakeCaret ? /* @__PURE__ */ jsx15("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx15("div", { className: "h-10 w-[2px] animate-pulse rounded-full bg-primary shadow-[var(--sofya-shadow-caret-glow)]" }) }) : null
|
|
2906
2759
|
]
|
|
2907
2760
|
}
|
|
2908
2761
|
);
|
|
2909
2762
|
}
|
|
2910
2763
|
);
|
|
2911
2764
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
2912
|
-
var InputOTPSeparator =
|
|
2913
|
-
return /* @__PURE__ */
|
|
2765
|
+
var InputOTPSeparator = React14.forwardRef(({ className, ...props }, ref) => {
|
|
2766
|
+
return /* @__PURE__ */ jsx15(
|
|
2914
2767
|
"div",
|
|
2915
2768
|
{
|
|
2916
2769
|
ref,
|
|
@@ -2920,22 +2773,22 @@ var InputOTPSeparator = React16.forwardRef(({ className, ...props }, ref) => {
|
|
|
2920
2773
|
className
|
|
2921
2774
|
),
|
|
2922
2775
|
...props,
|
|
2923
|
-
children: /* @__PURE__ */
|
|
2776
|
+
children: /* @__PURE__ */ jsx15("span", { "aria-hidden": "true", children: "." })
|
|
2924
2777
|
}
|
|
2925
2778
|
);
|
|
2926
2779
|
});
|
|
2927
2780
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
2928
2781
|
|
|
2929
2782
|
// src/components/input.tsx
|
|
2930
|
-
import { Fragment as
|
|
2783
|
+
import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2931
2784
|
var inputVariantOptions = [
|
|
2932
2785
|
"default",
|
|
2933
2786
|
"search",
|
|
2934
2787
|
"otp",
|
|
2935
2788
|
"upload"
|
|
2936
2789
|
];
|
|
2937
|
-
var Input =
|
|
2938
|
-
const generatedId =
|
|
2790
|
+
var Input = React15.forwardRef((props, ref) => {
|
|
2791
|
+
const generatedId = React15.useId();
|
|
2939
2792
|
const resolvedId = props.id ?? generatedId;
|
|
2940
2793
|
const variant = props.variant ?? "default";
|
|
2941
2794
|
if (variant === "otp") {
|
|
@@ -2963,7 +2816,7 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
2963
2816
|
);
|
|
2964
2817
|
const hasTrailingGroup = resolvedSplitIndex < resolvedLength;
|
|
2965
2818
|
const otpAriaLabel = otpProps["aria-label"] ?? "Verification code";
|
|
2966
|
-
const otpControl = /* @__PURE__ */
|
|
2819
|
+
const otpControl = /* @__PURE__ */ jsxs9(
|
|
2967
2820
|
InputOTP,
|
|
2968
2821
|
{
|
|
2969
2822
|
ref,
|
|
@@ -2976,7 +2829,7 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
2976
2829
|
containerClassName: className2,
|
|
2977
2830
|
...otpProps,
|
|
2978
2831
|
children: [
|
|
2979
|
-
/* @__PURE__ */
|
|
2832
|
+
/* @__PURE__ */ jsx16(InputOTPGroup, { className: otpGroupClassName, children: Array.from({ length: resolvedSplitIndex }, (_, index) => /* @__PURE__ */ jsx16(
|
|
2980
2833
|
InputOTPSlot,
|
|
2981
2834
|
{
|
|
2982
2835
|
className: otpSlotClassName,
|
|
@@ -2984,10 +2837,10 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
2984
2837
|
},
|
|
2985
2838
|
`otp-leading-${index}`
|
|
2986
2839
|
)) }),
|
|
2987
|
-
hasTrailingGroup ? otpSeparator ?? /* @__PURE__ */
|
|
2988
|
-
hasTrailingGroup ? /* @__PURE__ */
|
|
2840
|
+
hasTrailingGroup ? otpSeparator ?? /* @__PURE__ */ jsx16(InputOTPSeparator, { className: otpSeparatorClassName }) : null,
|
|
2841
|
+
hasTrailingGroup ? /* @__PURE__ */ jsx16(InputOTPGroup, { className: otpGroupClassName, children: Array.from(
|
|
2989
2842
|
{ length: resolvedLength - resolvedSplitIndex },
|
|
2990
|
-
(_, index) => /* @__PURE__ */
|
|
2843
|
+
(_, index) => /* @__PURE__ */ jsx16(
|
|
2991
2844
|
InputOTPSlot,
|
|
2992
2845
|
{
|
|
2993
2846
|
className: otpSlotClassName,
|
|
@@ -2999,7 +2852,7 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
2999
2852
|
]
|
|
3000
2853
|
}
|
|
3001
2854
|
);
|
|
3002
|
-
return /* @__PURE__ */
|
|
2855
|
+
return /* @__PURE__ */ jsx16(
|
|
3003
2856
|
FieldShell,
|
|
3004
2857
|
{
|
|
3005
2858
|
containerClassName: containerClassName2,
|
|
@@ -3018,7 +2871,7 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
3018
2871
|
variant: _variant2,
|
|
3019
2872
|
...uploadProps
|
|
3020
2873
|
} = props;
|
|
3021
|
-
const uploadControl = /* @__PURE__ */
|
|
2874
|
+
const uploadControl = /* @__PURE__ */ jsx16(
|
|
3022
2875
|
UploadInputControl,
|
|
3023
2876
|
{
|
|
3024
2877
|
...uploadProps,
|
|
@@ -3026,7 +2879,7 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
3026
2879
|
resolvedId
|
|
3027
2880
|
}
|
|
3028
2881
|
);
|
|
3029
|
-
const uploadLabel = label2 || uploadOptionalLabel ? /* @__PURE__ */
|
|
2882
|
+
const uploadLabel = label2 || uploadOptionalLabel ? /* @__PURE__ */ jsxs9(Fragment2, { children: [
|
|
3030
2883
|
renderTextContent(label2, {
|
|
3031
2884
|
as: "span",
|
|
3032
2885
|
className: "text-[color:var(--sofya-text-default)]",
|
|
@@ -3035,13 +2888,13 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
3035
2888
|
fontWeight: 700
|
|
3036
2889
|
}
|
|
3037
2890
|
}),
|
|
3038
|
-
uploadOptionalLabel ? /* @__PURE__ */
|
|
2891
|
+
uploadOptionalLabel ? /* @__PURE__ */ jsx16("span", { className: "ml-2 text-[color:var(--sofya-text-subtle)]", children: renderTextContent(uploadOptionalLabel, {
|
|
3039
2892
|
as: "span",
|
|
3040
2893
|
className: "text-[color:var(--sofya-text-subtle)]",
|
|
3041
2894
|
size: "tiny"
|
|
3042
2895
|
}) }) : null
|
|
3043
2896
|
] }) : void 0;
|
|
3044
|
-
return /* @__PURE__ */
|
|
2897
|
+
return /* @__PURE__ */ jsx16(
|
|
3045
2898
|
FieldShell,
|
|
3046
2899
|
{
|
|
3047
2900
|
containerClassName: containerClassName2,
|
|
@@ -3064,8 +2917,8 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
3064
2917
|
const isSearch = variant === "search";
|
|
3065
2918
|
const resolvedType = type ?? (isSearch ? "search" : void 0);
|
|
3066
2919
|
const ariaLabel = nativeProps["aria-label"] ?? (typeof label === "string" ? label : isSearch ? "Search" : void 0);
|
|
3067
|
-
const nativeControl = isSearch ? /* @__PURE__ */
|
|
3068
|
-
/* @__PURE__ */
|
|
2920
|
+
const nativeControl = isSearch ? /* @__PURE__ */ jsxs9("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: [
|
|
2921
|
+
/* @__PURE__ */ jsx16(
|
|
3069
2922
|
Icon,
|
|
3070
2923
|
{
|
|
3071
2924
|
"aria-hidden": "true",
|
|
@@ -3074,7 +2927,7 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
3074
2927
|
size: 32
|
|
3075
2928
|
}
|
|
3076
2929
|
),
|
|
3077
|
-
/* @__PURE__ */
|
|
2930
|
+
/* @__PURE__ */ jsx16(
|
|
3078
2931
|
"input",
|
|
3079
2932
|
{
|
|
3080
2933
|
id: resolvedId,
|
|
@@ -3090,39 +2943,587 @@ var Input = React17.forwardRef((props, ref) => {
|
|
|
3090
2943
|
placeholder: nativeProps.placeholder ?? "Search"
|
|
3091
2944
|
}
|
|
3092
2945
|
)
|
|
3093
|
-
] }) : /* @__PURE__ */
|
|
2946
|
+
] }) : /* @__PURE__ */ jsx16(
|
|
3094
2947
|
"input",
|
|
3095
2948
|
{
|
|
3096
|
-
id: resolvedId,
|
|
2949
|
+
id: resolvedId,
|
|
2950
|
+
ref,
|
|
2951
|
+
type: resolvedType,
|
|
2952
|
+
className: cn(
|
|
2953
|
+
"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-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 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",
|
|
2954
|
+
className
|
|
2955
|
+
),
|
|
2956
|
+
...nativeProps,
|
|
2957
|
+
"aria-label": ariaLabel
|
|
2958
|
+
}
|
|
2959
|
+
);
|
|
2960
|
+
return /* @__PURE__ */ jsx16(
|
|
2961
|
+
FieldShell,
|
|
2962
|
+
{
|
|
2963
|
+
containerClassName,
|
|
2964
|
+
control: nativeControl,
|
|
2965
|
+
label: isSearch ? void 0 : label,
|
|
2966
|
+
labelClassName: isSearch ? void 0 : labelClassName,
|
|
2967
|
+
labelHtmlFor: isSearch ? void 0 : resolvedId
|
|
2968
|
+
}
|
|
2969
|
+
);
|
|
2970
|
+
});
|
|
2971
|
+
Input.displayName = "Input";
|
|
2972
|
+
|
|
2973
|
+
// src/components/popover.tsx
|
|
2974
|
+
import * as React16 from "react";
|
|
2975
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
2976
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
2977
|
+
var Popover = PopoverPrimitive.Root;
|
|
2978
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
2979
|
+
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
2980
|
+
var PopoverPortal = PopoverPrimitive.Portal;
|
|
2981
|
+
var PopoverClose = PopoverPrimitive.Close;
|
|
2982
|
+
var PopoverContent = React16.forwardRef(function PopoverContent2({
|
|
2983
|
+
align = "center",
|
|
2984
|
+
className,
|
|
2985
|
+
collisionPadding = 8,
|
|
2986
|
+
sideOffset = 8,
|
|
2987
|
+
...props
|
|
2988
|
+
}, ref) {
|
|
2989
|
+
return /* @__PURE__ */ jsx17(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx17(
|
|
2990
|
+
PopoverPrimitive.Content,
|
|
2991
|
+
{
|
|
2992
|
+
ref,
|
|
2993
|
+
align,
|
|
2994
|
+
collisionPadding,
|
|
2995
|
+
sideOffset,
|
|
2996
|
+
"data-slot": "popover-content",
|
|
2997
|
+
className: cn(
|
|
2998
|
+
"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",
|
|
2999
|
+
className
|
|
3000
|
+
),
|
|
3001
|
+
...props
|
|
3002
|
+
}
|
|
3003
|
+
) });
|
|
3004
|
+
});
|
|
3005
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
3006
|
+
var PopoverTitle = React16.forwardRef(function PopoverTitle2({ children, className, ...props }, ref) {
|
|
3007
|
+
return /* @__PURE__ */ jsx17(
|
|
3008
|
+
"h4",
|
|
3009
|
+
{
|
|
3010
|
+
ref,
|
|
3011
|
+
"data-slot": "popover-title",
|
|
3012
|
+
className: cn("text-[hsl(var(--sofya-popover-foreground))]", className),
|
|
3013
|
+
...props,
|
|
3014
|
+
children: renderTextContent(children, {
|
|
3015
|
+
as: "span",
|
|
3016
|
+
className: "block text-[hsl(var(--sofya-popover-foreground))]",
|
|
3017
|
+
size: "h4"
|
|
3018
|
+
})
|
|
3019
|
+
}
|
|
3020
|
+
);
|
|
3021
|
+
});
|
|
3022
|
+
PopoverTitle.displayName = "PopoverTitle";
|
|
3023
|
+
var PopoverDescription = React16.forwardRef(function PopoverDescription2({ children, className, ...props }, ref) {
|
|
3024
|
+
return /* @__PURE__ */ jsx17(
|
|
3025
|
+
"p",
|
|
3026
|
+
{
|
|
3027
|
+
ref,
|
|
3028
|
+
"data-slot": "popover-description",
|
|
3029
|
+
className: cn("text-muted-foreground", className),
|
|
3030
|
+
...props,
|
|
3031
|
+
children: renderTextContent(children, {
|
|
3032
|
+
as: "span",
|
|
3033
|
+
className: "block text-muted-foreground",
|
|
3034
|
+
size: "body"
|
|
3035
|
+
})
|
|
3036
|
+
}
|
|
3037
|
+
);
|
|
3038
|
+
});
|
|
3039
|
+
PopoverDescription.displayName = "PopoverDescription";
|
|
3040
|
+
|
|
3041
|
+
// src/components/spinner.tsx
|
|
3042
|
+
import * as React17 from "react";
|
|
3043
|
+
import { IconLoader2 as IconLoader22 } from "@tabler/icons-react";
|
|
3044
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
3045
|
+
var spinnerSizeOptions = ["sm", "default", "lg"];
|
|
3046
|
+
var Spinner = React17.forwardRef(function Spinner2({
|
|
3047
|
+
"aria-label": ariaLabelProp,
|
|
3048
|
+
"aria-labelledby": ariaLabelledby,
|
|
3049
|
+
className,
|
|
3050
|
+
role = "status",
|
|
3051
|
+
size = "default",
|
|
3052
|
+
...props
|
|
3053
|
+
}, ref) {
|
|
3054
|
+
const ariaLabel = ariaLabelProp ?? (ariaLabelledby ? void 0 : "Loading");
|
|
3055
|
+
return /* @__PURE__ */ jsx18(
|
|
3056
|
+
IconLoader22,
|
|
3057
|
+
{
|
|
3058
|
+
ref,
|
|
3059
|
+
"data-size": size,
|
|
3060
|
+
"data-slot": "spinner",
|
|
3061
|
+
role,
|
|
3062
|
+
"aria-label": ariaLabel,
|
|
3063
|
+
"aria-labelledby": ariaLabelledby,
|
|
3064
|
+
className: cn(
|
|
3065
|
+
"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",
|
|
3066
|
+
className
|
|
3067
|
+
),
|
|
3068
|
+
...props
|
|
3069
|
+
}
|
|
3070
|
+
);
|
|
3071
|
+
});
|
|
3072
|
+
Spinner.displayName = "Spinner";
|
|
3073
|
+
|
|
3074
|
+
// src/components/dropdown-search.tsx
|
|
3075
|
+
import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3076
|
+
var DropdownSearch = React18.forwardRef(
|
|
3077
|
+
function DropdownSearch2({
|
|
3078
|
+
className,
|
|
3079
|
+
containerClassName,
|
|
3080
|
+
defaultQuery = "",
|
|
3081
|
+
defaultValue,
|
|
3082
|
+
disabled,
|
|
3083
|
+
emptyMessage = "No results found",
|
|
3084
|
+
label,
|
|
3085
|
+
labelClassName,
|
|
3086
|
+
loading,
|
|
3087
|
+
onChange,
|
|
3088
|
+
onQueryChange,
|
|
3089
|
+
options = [],
|
|
3090
|
+
placeholder = "Search...",
|
|
3091
|
+
query: queryProp,
|
|
3092
|
+
value: valueProp
|
|
3093
|
+
}, ref) {
|
|
3094
|
+
const listboxId = React18.useId();
|
|
3095
|
+
const [open, setOpen] = React18.useState(false);
|
|
3096
|
+
const [query, setQuery] = useControllableState({
|
|
3097
|
+
defaultValue: defaultQuery,
|
|
3098
|
+
onChange: onQueryChange,
|
|
3099
|
+
value: queryProp
|
|
3100
|
+
});
|
|
3101
|
+
const [value, setValue] = useControllableState({
|
|
3102
|
+
defaultValue,
|
|
3103
|
+
onChange,
|
|
3104
|
+
value: valueProp
|
|
3105
|
+
});
|
|
3106
|
+
const inputRef = React18.useRef(null);
|
|
3107
|
+
const listRef = React18.useRef(null);
|
|
3108
|
+
const setInputRef = React18.useCallback(
|
|
3109
|
+
(node) => {
|
|
3110
|
+
inputRef.current = node;
|
|
3111
|
+
if (typeof ref === "function") {
|
|
3112
|
+
ref(node);
|
|
3113
|
+
} else if (ref) {
|
|
3114
|
+
ref.current = node;
|
|
3115
|
+
}
|
|
3116
|
+
},
|
|
3117
|
+
[ref]
|
|
3118
|
+
);
|
|
3119
|
+
function handleInputChange(e) {
|
|
3120
|
+
setQuery(e.target.value);
|
|
3121
|
+
setOpen(true);
|
|
3122
|
+
}
|
|
3123
|
+
function handleInputFocus() {
|
|
3124
|
+
setOpen(true);
|
|
3125
|
+
}
|
|
3126
|
+
function handleInputKeyDown(e) {
|
|
3127
|
+
if (e.key === "ArrowDown") {
|
|
3128
|
+
e.preventDefault();
|
|
3129
|
+
listRef.current?.querySelector(
|
|
3130
|
+
"[data-dropdown-search-item]:not([disabled])"
|
|
3131
|
+
)?.focus();
|
|
3132
|
+
}
|
|
3133
|
+
if (e.key === "Escape") {
|
|
3134
|
+
setOpen(false);
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
function handleItemKeyDown(e, option) {
|
|
3138
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
3139
|
+
e.preventDefault();
|
|
3140
|
+
handleSelect(option);
|
|
3141
|
+
return;
|
|
3142
|
+
}
|
|
3143
|
+
if (e.key === "ArrowDown") {
|
|
3144
|
+
e.preventDefault();
|
|
3145
|
+
e.currentTarget.closest("li")?.nextElementSibling?.querySelector("[data-dropdown-search-item]")?.focus();
|
|
3146
|
+
return;
|
|
3147
|
+
}
|
|
3148
|
+
if (e.key === "ArrowUp") {
|
|
3149
|
+
e.preventDefault();
|
|
3150
|
+
const prevLi = e.currentTarget.closest("li")?.previousElementSibling;
|
|
3151
|
+
if (prevLi) {
|
|
3152
|
+
prevLi.querySelector("[data-dropdown-search-item]")?.focus();
|
|
3153
|
+
} else {
|
|
3154
|
+
inputRef.current?.focus();
|
|
3155
|
+
}
|
|
3156
|
+
return;
|
|
3157
|
+
}
|
|
3158
|
+
if (e.key === "Escape") {
|
|
3159
|
+
setOpen(false);
|
|
3160
|
+
inputRef.current?.focus();
|
|
3161
|
+
}
|
|
3162
|
+
}
|
|
3163
|
+
function handleSelect(option) {
|
|
3164
|
+
if (option.disabled) return;
|
|
3165
|
+
setValue(option.value);
|
|
3166
|
+
setQuery(option.label);
|
|
3167
|
+
setOpen(false);
|
|
3168
|
+
}
|
|
3169
|
+
return /* @__PURE__ */ jsxs10(Popover, { open, onOpenChange: setOpen, children: [
|
|
3170
|
+
/* @__PURE__ */ jsx19(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsx19("div", { className: cn("w-full", containerClassName), children: /* @__PURE__ */ jsx19(
|
|
3171
|
+
Input,
|
|
3172
|
+
{
|
|
3173
|
+
ref: setInputRef,
|
|
3174
|
+
"aria-autocomplete": "list",
|
|
3175
|
+
"aria-controls": open ? listboxId : void 0,
|
|
3176
|
+
"aria-expanded": open,
|
|
3177
|
+
"aria-haspopup": "listbox",
|
|
3178
|
+
autoComplete: "off",
|
|
3179
|
+
className,
|
|
3180
|
+
disabled,
|
|
3181
|
+
label,
|
|
3182
|
+
labelClassName,
|
|
3183
|
+
placeholder,
|
|
3184
|
+
role: "combobox",
|
|
3185
|
+
value: query ?? "",
|
|
3186
|
+
onChange: handleInputChange,
|
|
3187
|
+
onFocus: handleInputFocus,
|
|
3188
|
+
onKeyDown: handleInputKeyDown
|
|
3189
|
+
}
|
|
3190
|
+
) }) }),
|
|
3191
|
+
/* @__PURE__ */ jsx19(
|
|
3192
|
+
PopoverContent,
|
|
3193
|
+
{
|
|
3194
|
+
align: "start",
|
|
3195
|
+
className: "w-[var(--radix-popover-trigger-width)] p-1",
|
|
3196
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
3197
|
+
onInteractOutside: (e) => {
|
|
3198
|
+
if (inputRef.current?.closest("div")?.contains(e.target)) {
|
|
3199
|
+
e.preventDefault();
|
|
3200
|
+
}
|
|
3201
|
+
},
|
|
3202
|
+
children: loading ? /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx19(Spinner, { size: "sm" }) }) : options.length === 0 ? /* @__PURE__ */ jsx19("div", { className: "px-3 py-4 text-center", children: /* @__PURE__ */ jsx19(
|
|
3203
|
+
Text,
|
|
3204
|
+
{
|
|
3205
|
+
as: "span",
|
|
3206
|
+
size: "body",
|
|
3207
|
+
className: "text-[color:var(--sofya-text-subtle)]",
|
|
3208
|
+
children: emptyMessage
|
|
3209
|
+
}
|
|
3210
|
+
) }) : /* @__PURE__ */ jsx19(
|
|
3211
|
+
"ul",
|
|
3212
|
+
{
|
|
3213
|
+
ref: listRef,
|
|
3214
|
+
id: listboxId,
|
|
3215
|
+
role: "listbox",
|
|
3216
|
+
"aria-label": typeof label === "string" ? label : "Options",
|
|
3217
|
+
className: "flex flex-col gap-0.5",
|
|
3218
|
+
children: options.map((option) => /* @__PURE__ */ jsx19(
|
|
3219
|
+
"li",
|
|
3220
|
+
{
|
|
3221
|
+
role: "option",
|
|
3222
|
+
"aria-selected": value === option.value,
|
|
3223
|
+
"aria-disabled": option.disabled,
|
|
3224
|
+
children: /* @__PURE__ */ jsxs10(
|
|
3225
|
+
"button",
|
|
3226
|
+
{
|
|
3227
|
+
"data-dropdown-search-item": true,
|
|
3228
|
+
type: "button",
|
|
3229
|
+
disabled: option.disabled,
|
|
3230
|
+
className: cn(
|
|
3231
|
+
"flex w-full items-center gap-3 rounded-[8px] px-3 py-2 text-left",
|
|
3232
|
+
"[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)]",
|
|
3233
|
+
"transition-colors duration-sofya ease-sofya",
|
|
3234
|
+
"text-[color:var(--sofya-text-default)] hover:bg-muted focus-visible:bg-muted focus-visible:outline-none",
|
|
3235
|
+
"disabled:cursor-not-allowed disabled:opacity-40",
|
|
3236
|
+
value === option.value && "bg-muted"
|
|
3237
|
+
),
|
|
3238
|
+
onClick: () => handleSelect(option),
|
|
3239
|
+
onKeyDown: (e) => handleItemKeyDown(e, option),
|
|
3240
|
+
children: [
|
|
3241
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
3242
|
+
/* @__PURE__ */ jsx19(Text, { as: "span", size: "body", className: "truncate", children: option.label }),
|
|
3243
|
+
option.description ? /* @__PURE__ */ jsx19(
|
|
3244
|
+
Text,
|
|
3245
|
+
{
|
|
3246
|
+
as: "span",
|
|
3247
|
+
size: "tiny",
|
|
3248
|
+
className: "truncate text-[color:var(--sofya-text-subtle)]",
|
|
3249
|
+
children: option.description
|
|
3250
|
+
}
|
|
3251
|
+
) : null
|
|
3252
|
+
] }),
|
|
3253
|
+
value === option.value ? /* @__PURE__ */ jsx19(
|
|
3254
|
+
Icon,
|
|
3255
|
+
{
|
|
3256
|
+
"aria-hidden": "true",
|
|
3257
|
+
className: "shrink-0 text-primary",
|
|
3258
|
+
name: "check",
|
|
3259
|
+
size: 16
|
|
3260
|
+
}
|
|
3261
|
+
) : null
|
|
3262
|
+
]
|
|
3263
|
+
}
|
|
3264
|
+
)
|
|
3265
|
+
},
|
|
3266
|
+
option.value
|
|
3267
|
+
))
|
|
3268
|
+
}
|
|
3269
|
+
)
|
|
3270
|
+
}
|
|
3271
|
+
)
|
|
3272
|
+
] });
|
|
3273
|
+
}
|
|
3274
|
+
);
|
|
3275
|
+
DropdownSearch.displayName = "DropdownSearch";
|
|
3276
|
+
|
|
3277
|
+
// src/components/dialog.tsx
|
|
3278
|
+
import * as React19 from "react";
|
|
3279
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3280
|
+
import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3281
|
+
var Dialog = DialogPrimitive.Root;
|
|
3282
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
3283
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
3284
|
+
var DialogClose = DialogPrimitive.Close;
|
|
3285
|
+
var DialogInternalContext = React19.createContext({
|
|
3286
|
+
showCloseButton: true
|
|
3287
|
+
});
|
|
3288
|
+
var DialogOverlay = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
3289
|
+
DialogPrimitive.Overlay,
|
|
3290
|
+
{
|
|
3291
|
+
ref,
|
|
3292
|
+
className: cn(
|
|
3293
|
+
"sofya-dialog-overlay fixed inset-0 z-50 bg-foreground/24 backdrop-blur-[6px]",
|
|
3294
|
+
className
|
|
3295
|
+
),
|
|
3296
|
+
...props
|
|
3297
|
+
}
|
|
3298
|
+
));
|
|
3299
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
3300
|
+
var DialogContent = React19.forwardRef(
|
|
3301
|
+
({
|
|
3302
|
+
className,
|
|
3303
|
+
children,
|
|
3304
|
+
cardClassName,
|
|
3305
|
+
overlayClassName,
|
|
3306
|
+
showCloseButton = true,
|
|
3307
|
+
variant = "card",
|
|
3308
|
+
...props
|
|
3309
|
+
}, ref) => {
|
|
3310
|
+
const dialogCardStyle = {
|
|
3311
|
+
"--sofya-surface-shadow-override": "var(--sofya-shadow-lg)"
|
|
3312
|
+
};
|
|
3313
|
+
return /* @__PURE__ */ jsx20(DialogInternalContext.Provider, { value: { showCloseButton }, children: /* @__PURE__ */ jsxs11(DialogPortal, { children: [
|
|
3314
|
+
/* @__PURE__ */ jsx20(DialogOverlay, { className: overlayClassName }),
|
|
3315
|
+
/* @__PURE__ */ jsx20("div", { className: "sofya-dialog-positioner fixed inset-0 z-50 flex items-center justify-center p-4", children: /* @__PURE__ */ jsx20(
|
|
3316
|
+
DialogPrimitive.Content,
|
|
3317
|
+
{
|
|
3318
|
+
ref,
|
|
3319
|
+
className: cn(
|
|
3320
|
+
"sofya-dialog-content relative flex w-full max-w-[680px] max-h-[calc(100vh-2rem)] outline-none",
|
|
3321
|
+
className
|
|
3322
|
+
),
|
|
3323
|
+
...props,
|
|
3324
|
+
children: /* @__PURE__ */ jsx20(
|
|
3325
|
+
Card,
|
|
3326
|
+
{
|
|
3327
|
+
variant,
|
|
3328
|
+
className: cn(
|
|
3329
|
+
"flex max-h-[inherit] min-h-0 w-full flex-col gap-6 overflow-y-auto overflow-x-hidden p-6",
|
|
3330
|
+
cardClassName
|
|
3331
|
+
),
|
|
3332
|
+
style: dialogCardStyle,
|
|
3333
|
+
children
|
|
3334
|
+
}
|
|
3335
|
+
)
|
|
3336
|
+
}
|
|
3337
|
+
) })
|
|
3338
|
+
] }) });
|
|
3339
|
+
}
|
|
3340
|
+
);
|
|
3341
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
3342
|
+
function DialogHeader({ className, children, ...props }) {
|
|
3343
|
+
const { showCloseButton } = React19.useContext(DialogInternalContext);
|
|
3344
|
+
return /* @__PURE__ */ jsxs11(
|
|
3345
|
+
"div",
|
|
3346
|
+
{
|
|
3347
|
+
className: cn("flex w-full items-start justify-between gap-4", className),
|
|
3348
|
+
...props,
|
|
3349
|
+
children: [
|
|
3350
|
+
/* @__PURE__ */ jsx20("div", { className: "flex min-w-0 flex-1 flex-col gap-2 text-left", children }),
|
|
3351
|
+
showCloseButton ? /* @__PURE__ */ jsx20(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx20(
|
|
3352
|
+
Button,
|
|
3353
|
+
{
|
|
3354
|
+
type: "button",
|
|
3355
|
+
variant: "ghost",
|
|
3356
|
+
size: "icon",
|
|
3357
|
+
"aria-label": "Close",
|
|
3358
|
+
leftIcon: /* @__PURE__ */ jsx20(Icon, { name: "x", size: 18 }),
|
|
3359
|
+
className: "shrink-0 text-muted-foreground hover:text-foreground"
|
|
3360
|
+
}
|
|
3361
|
+
) }) : null
|
|
3362
|
+
]
|
|
3363
|
+
}
|
|
3364
|
+
);
|
|
3365
|
+
}
|
|
3366
|
+
function DialogBody({ className, ...props }) {
|
|
3367
|
+
return /* @__PURE__ */ jsx20(
|
|
3368
|
+
"div",
|
|
3369
|
+
{
|
|
3370
|
+
className: cn("flex flex-col gap-4", className),
|
|
3371
|
+
...props
|
|
3372
|
+
}
|
|
3373
|
+
);
|
|
3374
|
+
}
|
|
3375
|
+
function DialogFooter({ className, ...props }) {
|
|
3376
|
+
return /* @__PURE__ */ jsx20(
|
|
3377
|
+
"div",
|
|
3378
|
+
{
|
|
3379
|
+
className: cn("flex items-center justify-end gap-2", className),
|
|
3380
|
+
...props
|
|
3381
|
+
}
|
|
3382
|
+
);
|
|
3383
|
+
}
|
|
3384
|
+
var DialogCancel = React19.forwardRef(
|
|
3385
|
+
({ type = "button", variant = "ghost", ...props }, ref) => /* @__PURE__ */ jsx20(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx20(Button, { ref, type, variant, ...props }) })
|
|
3386
|
+
);
|
|
3387
|
+
DialogCancel.displayName = "DialogCancel";
|
|
3388
|
+
var DialogTitle = React19.forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
3389
|
+
DialogPrimitive.Title,
|
|
3390
|
+
{
|
|
3391
|
+
ref,
|
|
3392
|
+
className: cn("text-card-foreground", className),
|
|
3393
|
+
...props,
|
|
3394
|
+
children: renderTextContent(children, {
|
|
3395
|
+
as: "span",
|
|
3396
|
+
className: "block text-card-foreground",
|
|
3397
|
+
size: "h3"
|
|
3398
|
+
})
|
|
3399
|
+
}
|
|
3400
|
+
));
|
|
3401
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
3402
|
+
var DialogDescription = React19.forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
3403
|
+
DialogPrimitive.Description,
|
|
3404
|
+
{
|
|
3405
|
+
ref,
|
|
3406
|
+
className: cn("text-muted-foreground", className),
|
|
3407
|
+
...props,
|
|
3408
|
+
children: renderTextContent(children, {
|
|
3409
|
+
as: "span",
|
|
3410
|
+
className: "block text-muted-foreground",
|
|
3411
|
+
size: "body"
|
|
3412
|
+
})
|
|
3413
|
+
}
|
|
3414
|
+
));
|
|
3415
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
3416
|
+
|
|
3417
|
+
// src/components/empty.tsx
|
|
3418
|
+
import * as React20 from "react";
|
|
3419
|
+
import { cva as cva5 } from "class-variance-authority";
|
|
3420
|
+
import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3421
|
+
var emptyMediaVariantOptions = ["default", "icon"];
|
|
3422
|
+
var emptyMediaVariants = cva5(
|
|
3423
|
+
"inline-flex shrink-0 items-center justify-center transition-[background-color,border-color,color,box-shadow] duration-sofya ease-sofya",
|
|
3424
|
+
{
|
|
3425
|
+
variants: {
|
|
3426
|
+
variant: {
|
|
3427
|
+
default: "[&_img]:max-w-full [&_svg]:shrink-0 [&_svg]:text-primary",
|
|
3428
|
+
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"
|
|
3429
|
+
}
|
|
3430
|
+
},
|
|
3431
|
+
defaultVariants: {
|
|
3432
|
+
variant: "default"
|
|
3433
|
+
}
|
|
3434
|
+
}
|
|
3435
|
+
);
|
|
3436
|
+
var EmptyMedia = React20.forwardRef(function EmptyMedia2({ className, variant, ...props }, ref) {
|
|
3437
|
+
return /* @__PURE__ */ jsx21("div", { ref, className: cn(emptyMediaVariants({ variant }), className), ...props });
|
|
3438
|
+
});
|
|
3439
|
+
function EmptyHeader({ className, ...props }) {
|
|
3440
|
+
return /* @__PURE__ */ jsx21(
|
|
3441
|
+
"div",
|
|
3442
|
+
{
|
|
3443
|
+
className: cn("flex max-w-[34rem] flex-col items-center gap-4 text-center", className),
|
|
3444
|
+
...props
|
|
3445
|
+
}
|
|
3446
|
+
);
|
|
3447
|
+
}
|
|
3448
|
+
function EmptyTitle({ children, className, ...props }) {
|
|
3449
|
+
return /* @__PURE__ */ jsx21(
|
|
3450
|
+
"h2",
|
|
3451
|
+
{
|
|
3452
|
+
className: cn("text-foreground", className),
|
|
3453
|
+
...props,
|
|
3454
|
+
children: renderTextContent(children, {
|
|
3455
|
+
as: "span",
|
|
3456
|
+
className: "block text-foreground",
|
|
3457
|
+
size: "h4"
|
|
3458
|
+
})
|
|
3459
|
+
}
|
|
3460
|
+
);
|
|
3461
|
+
}
|
|
3462
|
+
function EmptyDescription({
|
|
3463
|
+
children,
|
|
3464
|
+
className,
|
|
3465
|
+
...props
|
|
3466
|
+
}) {
|
|
3467
|
+
return /* @__PURE__ */ jsx21(
|
|
3468
|
+
"p",
|
|
3469
|
+
{
|
|
3470
|
+
className: cn("max-w-full text-muted-foreground whitespace-nowrap", className),
|
|
3471
|
+
...props,
|
|
3472
|
+
children: renderTextContent(children, {
|
|
3473
|
+
as: "span",
|
|
3474
|
+
className: "inline-block whitespace-nowrap text-muted-foreground",
|
|
3475
|
+
size: "body"
|
|
3476
|
+
})
|
|
3477
|
+
}
|
|
3478
|
+
);
|
|
3479
|
+
}
|
|
3480
|
+
function EmptyContent({ children, className, ...props }) {
|
|
3481
|
+
return /* @__PURE__ */ jsx21(
|
|
3482
|
+
"div",
|
|
3483
|
+
{
|
|
3484
|
+
className: cn("flex flex-wrap items-center justify-center gap-4 text-center", className),
|
|
3485
|
+
...props,
|
|
3486
|
+
children: renderTextContent(children, {
|
|
3487
|
+
as: "span"
|
|
3488
|
+
})
|
|
3489
|
+
}
|
|
3490
|
+
);
|
|
3491
|
+
}
|
|
3492
|
+
var Empty = React20.forwardRef(function Empty2({ children, className, content, description, media, title, ...props }, ref) {
|
|
3493
|
+
const hasCustomChildren = React20.Children.count(children) > 0;
|
|
3494
|
+
return /* @__PURE__ */ jsx21(
|
|
3495
|
+
"div",
|
|
3496
|
+
{
|
|
3097
3497
|
ref,
|
|
3098
|
-
type: resolvedType,
|
|
3099
3498
|
className: cn(
|
|
3100
|
-
"flex h-
|
|
3499
|
+
"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",
|
|
3101
3500
|
className
|
|
3102
3501
|
),
|
|
3103
|
-
...
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
label: isSearch ? void 0 : label,
|
|
3113
|
-
labelClassName: isSearch ? void 0 : labelClassName,
|
|
3114
|
-
labelHtmlFor: isSearch ? void 0 : resolvedId
|
|
3502
|
+
...props,
|
|
3503
|
+
children: hasCustomChildren ? children : /* @__PURE__ */ jsxs12(Fragment3, { children: [
|
|
3504
|
+
/* @__PURE__ */ jsxs12(EmptyHeader, { children: [
|
|
3505
|
+
media ?? /* @__PURE__ */ jsx21(EmptyMedia, { variant: "icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx21(Icon, { name: "folders", size: 28 }) }),
|
|
3506
|
+
/* @__PURE__ */ jsx21(EmptyTitle, { children: title ?? "Nada por aqui" }),
|
|
3507
|
+
/* @__PURE__ */ jsx21(EmptyDescription, { children: description ?? "Quando houver conte\xFAdo dispon\xEDvel, ele aparecer\xE1 aqui." })
|
|
3508
|
+
] }),
|
|
3509
|
+
content !== void 0 && content !== null ? /* @__PURE__ */ jsx21(EmptyContent, { children: content }) : null
|
|
3510
|
+
] })
|
|
3115
3511
|
}
|
|
3116
3512
|
);
|
|
3117
3513
|
});
|
|
3118
|
-
|
|
3514
|
+
Empty.displayName = "Empty";
|
|
3515
|
+
EmptyMedia.displayName = "EmptyMedia";
|
|
3516
|
+
EmptyHeader.displayName = "EmptyHeader";
|
|
3517
|
+
EmptyTitle.displayName = "EmptyTitle";
|
|
3518
|
+
EmptyDescription.displayName = "EmptyDescription";
|
|
3519
|
+
EmptyContent.displayName = "EmptyContent";
|
|
3119
3520
|
|
|
3120
3521
|
// src/components/label.tsx
|
|
3121
|
-
import * as
|
|
3122
|
-
import { jsx as
|
|
3123
|
-
var Label =
|
|
3522
|
+
import * as React21 from "react";
|
|
3523
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
3524
|
+
var Label = React21.forwardRef(
|
|
3124
3525
|
({ children, className, ...props }, ref) => {
|
|
3125
|
-
return /* @__PURE__ */
|
|
3526
|
+
return /* @__PURE__ */ jsx22(
|
|
3126
3527
|
"label",
|
|
3127
3528
|
{
|
|
3128
3529
|
ref,
|
|
@@ -3146,10 +3547,10 @@ var Label = React18.forwardRef(
|
|
|
3146
3547
|
Label.displayName = "Label";
|
|
3147
3548
|
|
|
3148
3549
|
// src/components/link.tsx
|
|
3149
|
-
import * as
|
|
3550
|
+
import * as React22 from "react";
|
|
3150
3551
|
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
3151
3552
|
import { cva as cva6 } from "class-variance-authority";
|
|
3152
|
-
import { jsx as
|
|
3553
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
3153
3554
|
var linkVariants = cva6(
|
|
3154
3555
|
"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",
|
|
3155
3556
|
{
|
|
@@ -3164,9 +3565,9 @@ var linkVariants = cva6(
|
|
|
3164
3565
|
}
|
|
3165
3566
|
}
|
|
3166
3567
|
);
|
|
3167
|
-
var Link =
|
|
3568
|
+
var Link = React22.forwardRef(function Link2({ asChild = false, children, className, variant = "default", ...props }, ref) {
|
|
3168
3569
|
const Component = asChild ? Slot3 : "a";
|
|
3169
|
-
return /* @__PURE__ */
|
|
3570
|
+
return /* @__PURE__ */ jsx23(
|
|
3170
3571
|
Component,
|
|
3171
3572
|
{
|
|
3172
3573
|
ref,
|
|
@@ -3184,7 +3585,7 @@ var Link = React19.forwardRef(function Link2({ asChild = false, children, classN
|
|
|
3184
3585
|
Link.displayName = "Link";
|
|
3185
3586
|
|
|
3186
3587
|
// src/components/logo.tsx
|
|
3187
|
-
import * as
|
|
3588
|
+
import * as React23 from "react";
|
|
3188
3589
|
|
|
3189
3590
|
// src/components/logo-data.ts
|
|
3190
3591
|
var logoAssets = {
|
|
@@ -3281,7 +3682,7 @@ var logoAssets = {
|
|
|
3281
3682
|
};
|
|
3282
3683
|
|
|
3283
3684
|
// src/components/logo.tsx
|
|
3284
|
-
import { jsx as
|
|
3685
|
+
import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3285
3686
|
var logoVariants = ["mono", "default", "text", "full"];
|
|
3286
3687
|
var logoSizeOptions = ["sm", "md", "lg", "xl", "2xl"];
|
|
3287
3688
|
var logoSizeScale = {
|
|
@@ -3317,7 +3718,7 @@ function resolveLogoDimensions(variant, size, width, height) {
|
|
|
3317
3718
|
height: resolvedHeight
|
|
3318
3719
|
};
|
|
3319
3720
|
}
|
|
3320
|
-
var Logo =
|
|
3721
|
+
var Logo = React23.forwardRef(function Logo2({
|
|
3321
3722
|
variant = "full",
|
|
3322
3723
|
size = "lg",
|
|
3323
3724
|
width,
|
|
@@ -3328,10 +3729,10 @@ var Logo = React20.forwardRef(function Logo2({
|
|
|
3328
3729
|
...props
|
|
3329
3730
|
}, ref) {
|
|
3330
3731
|
const asset = logoAssets[variant];
|
|
3331
|
-
const titleId =
|
|
3732
|
+
const titleId = React23.useId();
|
|
3332
3733
|
const dimensions = resolveLogoDimensions(variant, size, width, height);
|
|
3333
3734
|
const monoFill = variant === "mono" ? monoColor ?? "currentColor" : void 0;
|
|
3334
|
-
return /* @__PURE__ */
|
|
3735
|
+
return /* @__PURE__ */ jsxs13(
|
|
3335
3736
|
"svg",
|
|
3336
3737
|
{
|
|
3337
3738
|
ref,
|
|
@@ -3346,8 +3747,8 @@ var Logo = React20.forwardRef(function Logo2({
|
|
|
3346
3747
|
focusable: "false",
|
|
3347
3748
|
...props,
|
|
3348
3749
|
children: [
|
|
3349
|
-
title ? /* @__PURE__ */
|
|
3350
|
-
asset.paths.map((path, index) => /* @__PURE__ */
|
|
3750
|
+
title ? /* @__PURE__ */ jsx24("title", { id: titleId, children: title }) : null,
|
|
3751
|
+
asset.paths.map((path, index) => /* @__PURE__ */ jsx24(
|
|
3351
3752
|
"path",
|
|
3352
3753
|
{
|
|
3353
3754
|
d: path.d,
|
|
@@ -3379,7 +3780,7 @@ var inheritedTypographyStyle = {
|
|
|
3379
3780
|
};
|
|
3380
3781
|
|
|
3381
3782
|
// src/components/pagination.tsx
|
|
3382
|
-
import { jsx as
|
|
3783
|
+
import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3383
3784
|
var paginationLinkVariants = cva7(
|
|
3384
3785
|
"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",
|
|
3385
3786
|
{
|
|
@@ -3400,7 +3801,7 @@ var paginationLinkVariants = cva7(
|
|
|
3400
3801
|
}
|
|
3401
3802
|
);
|
|
3402
3803
|
function Pagination({ className, ...props }) {
|
|
3403
|
-
return /* @__PURE__ */
|
|
3804
|
+
return /* @__PURE__ */ jsx25(
|
|
3404
3805
|
"nav",
|
|
3405
3806
|
{
|
|
3406
3807
|
"aria-label": "Pagination",
|
|
@@ -3413,7 +3814,7 @@ function PaginationContent({
|
|
|
3413
3814
|
className,
|
|
3414
3815
|
...props
|
|
3415
3816
|
}) {
|
|
3416
|
-
return /* @__PURE__ */
|
|
3817
|
+
return /* @__PURE__ */ jsx25(
|
|
3417
3818
|
"ul",
|
|
3418
3819
|
{
|
|
3419
3820
|
className: cn(
|
|
@@ -3425,7 +3826,7 @@ function PaginationContent({
|
|
|
3425
3826
|
);
|
|
3426
3827
|
}
|
|
3427
3828
|
function PaginationItem({ className, ...props }) {
|
|
3428
|
-
return /* @__PURE__ */
|
|
3829
|
+
return /* @__PURE__ */ jsx25("li", { className: cn("list-none", className), ...props });
|
|
3429
3830
|
}
|
|
3430
3831
|
function PaginationLink({
|
|
3431
3832
|
asChild = false,
|
|
@@ -3435,7 +3836,7 @@ function PaginationLink({
|
|
|
3435
3836
|
...props
|
|
3436
3837
|
}) {
|
|
3437
3838
|
const Component = asChild ? Slot4 : "a";
|
|
3438
|
-
return /* @__PURE__ */
|
|
3839
|
+
return /* @__PURE__ */ jsx25(
|
|
3439
3840
|
Component,
|
|
3440
3841
|
{
|
|
3441
3842
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -3445,25 +3846,25 @@ function PaginationLink({
|
|
|
3445
3846
|
);
|
|
3446
3847
|
}
|
|
3447
3848
|
function PaginationChevronLeft() {
|
|
3448
|
-
return /* @__PURE__ */
|
|
3849
|
+
return /* @__PURE__ */ jsx25(IconChevronLeft2, { "aria-hidden": "true", className: "h-4 w-4", stroke: 1.75 });
|
|
3449
3850
|
}
|
|
3450
3851
|
function PaginationChevronRight() {
|
|
3451
|
-
return /* @__PURE__ */
|
|
3852
|
+
return /* @__PURE__ */ jsx25(IconChevronRight2, { "aria-hidden": "true", className: "h-4 w-4", stroke: 1.75 });
|
|
3452
3853
|
}
|
|
3453
3854
|
function PaginationPrevious({
|
|
3454
3855
|
className,
|
|
3455
3856
|
text = "Previous",
|
|
3456
3857
|
...props
|
|
3457
3858
|
}) {
|
|
3458
|
-
return /* @__PURE__ */
|
|
3859
|
+
return /* @__PURE__ */ jsxs14(
|
|
3459
3860
|
PaginationLink,
|
|
3460
3861
|
{
|
|
3461
3862
|
"aria-label": "Go to previous page",
|
|
3462
3863
|
className: cn("gap-2 px-4", className),
|
|
3463
3864
|
...props,
|
|
3464
3865
|
children: [
|
|
3465
|
-
/* @__PURE__ */
|
|
3466
|
-
/* @__PURE__ */
|
|
3866
|
+
/* @__PURE__ */ jsx25(PaginationChevronLeft, {}),
|
|
3867
|
+
/* @__PURE__ */ jsx25("span", { className: "hidden sm:block", children: renderTextContent(text, {
|
|
3467
3868
|
as: "span",
|
|
3468
3869
|
className: "block text-inherit",
|
|
3469
3870
|
size: "body",
|
|
@@ -3478,20 +3879,20 @@ function PaginationNext({
|
|
|
3478
3879
|
text = "Next",
|
|
3479
3880
|
...props
|
|
3480
3881
|
}) {
|
|
3481
|
-
return /* @__PURE__ */
|
|
3882
|
+
return /* @__PURE__ */ jsxs14(
|
|
3482
3883
|
PaginationLink,
|
|
3483
3884
|
{
|
|
3484
3885
|
"aria-label": "Go to next page",
|
|
3485
3886
|
className: cn("gap-2 px-4", className),
|
|
3486
3887
|
...props,
|
|
3487
3888
|
children: [
|
|
3488
|
-
/* @__PURE__ */
|
|
3889
|
+
/* @__PURE__ */ jsx25("span", { className: "hidden sm:block", children: renderTextContent(text, {
|
|
3489
3890
|
as: "span",
|
|
3490
3891
|
className: "block text-inherit",
|
|
3491
3892
|
size: "body",
|
|
3492
3893
|
style: inheritedTypographyStyle
|
|
3493
3894
|
}) }),
|
|
3494
|
-
/* @__PURE__ */
|
|
3895
|
+
/* @__PURE__ */ jsx25(PaginationChevronRight, {})
|
|
3495
3896
|
]
|
|
3496
3897
|
}
|
|
3497
3898
|
);
|
|
@@ -3500,7 +3901,7 @@ function PaginationEllipsis({
|
|
|
3500
3901
|
className,
|
|
3501
3902
|
...props
|
|
3502
3903
|
}) {
|
|
3503
|
-
return /* @__PURE__ */
|
|
3904
|
+
return /* @__PURE__ */ jsxs14(
|
|
3504
3905
|
"span",
|
|
3505
3906
|
{
|
|
3506
3907
|
"aria-hidden": "true",
|
|
@@ -3510,90 +3911,22 @@ function PaginationEllipsis({
|
|
|
3510
3911
|
),
|
|
3511
3912
|
...props,
|
|
3512
3913
|
children: [
|
|
3513
|
-
/* @__PURE__ */
|
|
3914
|
+
/* @__PURE__ */ jsx25("span", { children: renderTextContent("...", {
|
|
3514
3915
|
as: "span",
|
|
3515
3916
|
className: "block text-inherit",
|
|
3516
3917
|
size: "h5",
|
|
3517
3918
|
style: inheritedTypographyStyle
|
|
3518
3919
|
}) }),
|
|
3519
|
-
/* @__PURE__ */
|
|
3920
|
+
/* @__PURE__ */ jsx25("span", { className: "sr-only", children: "More pages" })
|
|
3520
3921
|
]
|
|
3521
3922
|
}
|
|
3522
3923
|
);
|
|
3523
3924
|
}
|
|
3524
3925
|
|
|
3525
|
-
// src/components/popover.tsx
|
|
3526
|
-
import * as React21 from "react";
|
|
3527
|
-
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3528
|
-
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
3529
|
-
var Popover = PopoverPrimitive.Root;
|
|
3530
|
-
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
3531
|
-
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
3532
|
-
var PopoverPortal = PopoverPrimitive.Portal;
|
|
3533
|
-
var PopoverClose = PopoverPrimitive.Close;
|
|
3534
|
-
var PopoverContent = React21.forwardRef(function PopoverContent2({
|
|
3535
|
-
align = "center",
|
|
3536
|
-
className,
|
|
3537
|
-
collisionPadding = 8,
|
|
3538
|
-
sideOffset = 8,
|
|
3539
|
-
...props
|
|
3540
|
-
}, ref) {
|
|
3541
|
-
return /* @__PURE__ */ jsx23(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx23(
|
|
3542
|
-
PopoverPrimitive.Content,
|
|
3543
|
-
{
|
|
3544
|
-
ref,
|
|
3545
|
-
align,
|
|
3546
|
-
collisionPadding,
|
|
3547
|
-
sideOffset,
|
|
3548
|
-
"data-slot": "popover-content",
|
|
3549
|
-
className: cn(
|
|
3550
|
-
"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",
|
|
3551
|
-
className
|
|
3552
|
-
),
|
|
3553
|
-
...props
|
|
3554
|
-
}
|
|
3555
|
-
) });
|
|
3556
|
-
});
|
|
3557
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
3558
|
-
var PopoverTitle = React21.forwardRef(function PopoverTitle2({ children, className, ...props }, ref) {
|
|
3559
|
-
return /* @__PURE__ */ jsx23(
|
|
3560
|
-
"h4",
|
|
3561
|
-
{
|
|
3562
|
-
ref,
|
|
3563
|
-
"data-slot": "popover-title",
|
|
3564
|
-
className: cn("text-[hsl(var(--sofya-popover-foreground))]", className),
|
|
3565
|
-
...props,
|
|
3566
|
-
children: renderTextContent(children, {
|
|
3567
|
-
as: "span",
|
|
3568
|
-
className: "block text-[hsl(var(--sofya-popover-foreground))]",
|
|
3569
|
-
size: "h4"
|
|
3570
|
-
})
|
|
3571
|
-
}
|
|
3572
|
-
);
|
|
3573
|
-
});
|
|
3574
|
-
PopoverTitle.displayName = "PopoverTitle";
|
|
3575
|
-
var PopoverDescription = React21.forwardRef(function PopoverDescription2({ children, className, ...props }, ref) {
|
|
3576
|
-
return /* @__PURE__ */ jsx23(
|
|
3577
|
-
"p",
|
|
3578
|
-
{
|
|
3579
|
-
ref,
|
|
3580
|
-
"data-slot": "popover-description",
|
|
3581
|
-
className: cn("text-muted-foreground", className),
|
|
3582
|
-
...props,
|
|
3583
|
-
children: renderTextContent(children, {
|
|
3584
|
-
as: "span",
|
|
3585
|
-
className: "block text-muted-foreground",
|
|
3586
|
-
size: "body"
|
|
3587
|
-
})
|
|
3588
|
-
}
|
|
3589
|
-
);
|
|
3590
|
-
});
|
|
3591
|
-
PopoverDescription.displayName = "PopoverDescription";
|
|
3592
|
-
|
|
3593
3926
|
// src/components/progress.tsx
|
|
3594
|
-
import * as
|
|
3927
|
+
import * as React24 from "react";
|
|
3595
3928
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
3596
|
-
import { jsx as
|
|
3929
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
3597
3930
|
var progressSizeOptions = ["sm", "default", "lg"];
|
|
3598
3931
|
function clampProgressValue(value, max) {
|
|
3599
3932
|
if (Number.isNaN(value)) {
|
|
@@ -3601,7 +3934,7 @@ function clampProgressValue(value, max) {
|
|
|
3601
3934
|
}
|
|
3602
3935
|
return Math.min(Math.max(value, 0), max);
|
|
3603
3936
|
}
|
|
3604
|
-
var Progress =
|
|
3937
|
+
var Progress = React24.forwardRef(function Progress2({
|
|
3605
3938
|
className,
|
|
3606
3939
|
indicatorClassName,
|
|
3607
3940
|
max = 100,
|
|
@@ -3612,7 +3945,7 @@ var Progress = React22.forwardRef(function Progress2({
|
|
|
3612
3945
|
const safeMax = max > 0 ? max : 100;
|
|
3613
3946
|
const resolvedValue = typeof value === "number" ? clampProgressValue(value, safeMax) : null;
|
|
3614
3947
|
const progressScale = resolvedValue === null ? void 0 : Number((resolvedValue / safeMax).toFixed(4));
|
|
3615
|
-
return /* @__PURE__ */
|
|
3948
|
+
return /* @__PURE__ */ jsx26(
|
|
3616
3949
|
ProgressPrimitive.Root,
|
|
3617
3950
|
{
|
|
3618
3951
|
ref,
|
|
@@ -3625,7 +3958,7 @@ var Progress = React22.forwardRef(function Progress2({
|
|
|
3625
3958
|
className
|
|
3626
3959
|
),
|
|
3627
3960
|
...props,
|
|
3628
|
-
children: /* @__PURE__ */
|
|
3961
|
+
children: /* @__PURE__ */ jsx26(
|
|
3629
3962
|
ProgressPrimitive.Indicator,
|
|
3630
3963
|
{
|
|
3631
3964
|
"data-slot": "progress-indicator",
|
|
@@ -3642,12 +3975,12 @@ var Progress = React22.forwardRef(function Progress2({
|
|
|
3642
3975
|
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
3643
3976
|
|
|
3644
3977
|
// src/components/radio-group.tsx
|
|
3645
|
-
import * as
|
|
3978
|
+
import * as React25 from "react";
|
|
3646
3979
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
3647
|
-
import { jsx as
|
|
3980
|
+
import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3648
3981
|
var radioGroupOrientationOptions = ["horizontal", "vertical"];
|
|
3649
|
-
var RadioGroup2 =
|
|
3650
|
-
return /* @__PURE__ */
|
|
3982
|
+
var RadioGroup2 = React25.forwardRef(function RadioGroup3({ className, ...props }, ref) {
|
|
3983
|
+
return /* @__PURE__ */ jsx27(
|
|
3651
3984
|
RadioGroupPrimitive.Root,
|
|
3652
3985
|
{
|
|
3653
3986
|
ref,
|
|
@@ -3661,7 +3994,7 @@ var RadioGroup2 = React23.forwardRef(function RadioGroup3({ className, ...props
|
|
|
3661
3994
|
);
|
|
3662
3995
|
});
|
|
3663
3996
|
RadioGroup2.displayName = RadioGroupPrimitive.Root.displayName;
|
|
3664
|
-
var RadioGroupItem =
|
|
3997
|
+
var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
3665
3998
|
className,
|
|
3666
3999
|
controlClassName,
|
|
3667
4000
|
description,
|
|
@@ -3673,12 +4006,12 @@ var RadioGroupItem = React23.forwardRef(function RadioGroupItem2({
|
|
|
3673
4006
|
labelClassName,
|
|
3674
4007
|
...props
|
|
3675
4008
|
}, ref) {
|
|
3676
|
-
const generatedId =
|
|
4009
|
+
const generatedId = React25.useId();
|
|
3677
4010
|
const resolvedId = id ?? generatedId;
|
|
3678
4011
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
3679
4012
|
const descriptionId = description ? `${resolvedId}-description` : void 0;
|
|
3680
4013
|
const alignClassName = description ? "items-start" : "items-center";
|
|
3681
|
-
return /* @__PURE__ */
|
|
4014
|
+
return /* @__PURE__ */ jsxs15(
|
|
3682
4015
|
"label",
|
|
3683
4016
|
{
|
|
3684
4017
|
className: selectionControlContainerClasses({
|
|
@@ -3687,7 +4020,7 @@ var RadioGroupItem = React23.forwardRef(function RadioGroupItem2({
|
|
|
3687
4020
|
disabled
|
|
3688
4021
|
}),
|
|
3689
4022
|
children: [
|
|
3690
|
-
/* @__PURE__ */
|
|
4023
|
+
/* @__PURE__ */ jsx27(
|
|
3691
4024
|
RadioGroupPrimitive.Item,
|
|
3692
4025
|
{
|
|
3693
4026
|
ref,
|
|
@@ -3703,7 +4036,7 @@ var RadioGroupItem = React23.forwardRef(function RadioGroupItem2({
|
|
|
3703
4036
|
controlClassName
|
|
3704
4037
|
),
|
|
3705
4038
|
...props,
|
|
3706
|
-
children: /* @__PURE__ */
|
|
4039
|
+
children: /* @__PURE__ */ jsx27(RadioGroupPrimitive.Indicator, { asChild: true, children: /* @__PURE__ */ jsx27(
|
|
3707
4040
|
"span",
|
|
3708
4041
|
{
|
|
3709
4042
|
"data-slot": "radio-group-indicator",
|
|
@@ -3715,8 +4048,8 @@ var RadioGroupItem = React23.forwardRef(function RadioGroupItem2({
|
|
|
3715
4048
|
) })
|
|
3716
4049
|
}
|
|
3717
4050
|
),
|
|
3718
|
-
label || description ? /* @__PURE__ */
|
|
3719
|
-
label ? /* @__PURE__ */
|
|
4051
|
+
label || description ? /* @__PURE__ */ jsxs15("span", { className: selectionControlContentBaseClasses, children: [
|
|
4052
|
+
label ? /* @__PURE__ */ jsx27(
|
|
3720
4053
|
"span",
|
|
3721
4054
|
{
|
|
3722
4055
|
id: labelId,
|
|
@@ -3731,7 +4064,7 @@ var RadioGroupItem = React23.forwardRef(function RadioGroupItem2({
|
|
|
3731
4064
|
})
|
|
3732
4065
|
}
|
|
3733
4066
|
) : null,
|
|
3734
|
-
description ? /* @__PURE__ */
|
|
4067
|
+
description ? /* @__PURE__ */ jsx27(
|
|
3735
4068
|
"span",
|
|
3736
4069
|
{
|
|
3737
4070
|
id: descriptionId,
|
|
@@ -3754,12 +4087,12 @@ var RadioGroupItem = React23.forwardRef(function RadioGroupItem2({
|
|
|
3754
4087
|
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
3755
4088
|
|
|
3756
4089
|
// src/components/scroll-area.tsx
|
|
3757
|
-
import * as
|
|
4090
|
+
import * as React26 from "react";
|
|
3758
4091
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
3759
|
-
import { jsx as
|
|
4092
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
3760
4093
|
var scrollAreaOrientationOptions = ["horizontal", "vertical"];
|
|
3761
|
-
var ScrollArea =
|
|
3762
|
-
return /* @__PURE__ */
|
|
4094
|
+
var ScrollArea = React26.forwardRef(function ScrollArea2({ className, ...props }, ref) {
|
|
4095
|
+
return /* @__PURE__ */ jsx28(
|
|
3763
4096
|
ScrollAreaPrimitive.Root,
|
|
3764
4097
|
{
|
|
3765
4098
|
ref,
|
|
@@ -3770,8 +4103,8 @@ var ScrollArea = React24.forwardRef(function ScrollArea2({ className, ...props }
|
|
|
3770
4103
|
);
|
|
3771
4104
|
});
|
|
3772
4105
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
3773
|
-
var ScrollAreaViewport =
|
|
3774
|
-
return /* @__PURE__ */
|
|
4106
|
+
var ScrollAreaViewport = React26.forwardRef(function ScrollAreaViewport2({ className, ...props }, ref) {
|
|
4107
|
+
return /* @__PURE__ */ jsx28(
|
|
3775
4108
|
ScrollAreaPrimitive.Viewport,
|
|
3776
4109
|
{
|
|
3777
4110
|
ref,
|
|
@@ -3785,8 +4118,8 @@ var ScrollAreaViewport = React24.forwardRef(function ScrollAreaViewport2({ class
|
|
|
3785
4118
|
);
|
|
3786
4119
|
});
|
|
3787
4120
|
ScrollAreaViewport.displayName = ScrollAreaPrimitive.Viewport.displayName;
|
|
3788
|
-
var ScrollAreaScrollbar =
|
|
3789
|
-
return /* @__PURE__ */
|
|
4121
|
+
var ScrollAreaScrollbar = React26.forwardRef(function ScrollAreaScrollbar2({ className, orientation = "vertical", thumbClassName, ...props }, ref) {
|
|
4122
|
+
return /* @__PURE__ */ jsx28(
|
|
3790
4123
|
ScrollAreaPrimitive.Scrollbar,
|
|
3791
4124
|
{
|
|
3792
4125
|
ref,
|
|
@@ -3797,7 +4130,7 @@ var ScrollAreaScrollbar = React24.forwardRef(function ScrollAreaScrollbar2({ cla
|
|
|
3797
4130
|
className
|
|
3798
4131
|
),
|
|
3799
4132
|
...props,
|
|
3800
|
-
children: /* @__PURE__ */
|
|
4133
|
+
children: /* @__PURE__ */ jsx28(
|
|
3801
4134
|
ScrollAreaPrimitive.Thumb,
|
|
3802
4135
|
{
|
|
3803
4136
|
"data-slot": "scroll-area-thumb",
|
|
@@ -3811,8 +4144,8 @@ var ScrollAreaScrollbar = React24.forwardRef(function ScrollAreaScrollbar2({ cla
|
|
|
3811
4144
|
);
|
|
3812
4145
|
});
|
|
3813
4146
|
ScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;
|
|
3814
|
-
var ScrollAreaCorner =
|
|
3815
|
-
return /* @__PURE__ */
|
|
4147
|
+
var ScrollAreaCorner = React26.forwardRef(function ScrollAreaCorner2({ className, ...props }, ref) {
|
|
4148
|
+
return /* @__PURE__ */ jsx28(
|
|
3816
4149
|
ScrollAreaPrimitive.Corner,
|
|
3817
4150
|
{
|
|
3818
4151
|
ref,
|
|
@@ -3825,19 +4158,19 @@ var ScrollAreaCorner = React24.forwardRef(function ScrollAreaCorner2({ className
|
|
|
3825
4158
|
ScrollAreaCorner.displayName = ScrollAreaPrimitive.Corner.displayName;
|
|
3826
4159
|
|
|
3827
4160
|
// src/components/select.tsx
|
|
3828
|
-
import * as
|
|
4161
|
+
import * as React27 from "react";
|
|
3829
4162
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3830
4163
|
|
|
3831
4164
|
// src/lib/form-control-classes.ts
|
|
3832
4165
|
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)]";
|
|
3833
4166
|
|
|
3834
4167
|
// src/components/select.tsx
|
|
3835
|
-
import { jsx as
|
|
4168
|
+
import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3836
4169
|
var selectSizeOptions = ["default", "sm"];
|
|
3837
4170
|
var Select = SelectPrimitive.Root;
|
|
3838
4171
|
var SelectGroup = SelectPrimitive.Group;
|
|
3839
|
-
var SelectValue =
|
|
3840
|
-
return /* @__PURE__ */
|
|
4172
|
+
var SelectValue = React27.forwardRef(function SelectValue2({ className, ...props }, ref) {
|
|
4173
|
+
return /* @__PURE__ */ jsx29(
|
|
3841
4174
|
Text,
|
|
3842
4175
|
{
|
|
3843
4176
|
ref,
|
|
@@ -3846,13 +4179,13 @@ var SelectValue = React25.forwardRef(function SelectValue2({ className, ...props
|
|
|
3846
4179
|
className: cn("block truncate text-inherit", className),
|
|
3847
4180
|
size: "body",
|
|
3848
4181
|
style: inheritedTypographyStyle,
|
|
3849
|
-
children: /* @__PURE__ */
|
|
4182
|
+
children: /* @__PURE__ */ jsx29(SelectPrimitive.Value, { className: "block truncate", ...props })
|
|
3850
4183
|
}
|
|
3851
4184
|
);
|
|
3852
4185
|
});
|
|
3853
4186
|
SelectValue.displayName = SelectPrimitive.Value.displayName;
|
|
3854
|
-
var SelectTrigger =
|
|
3855
|
-
return /* @__PURE__ */
|
|
4187
|
+
var SelectTrigger = React27.forwardRef(function SelectTrigger2({ className, children, size = "default", ...props }, ref) {
|
|
4188
|
+
return /* @__PURE__ */ jsxs16(
|
|
3856
4189
|
SelectPrimitive.Trigger,
|
|
3857
4190
|
{
|
|
3858
4191
|
ref,
|
|
@@ -3866,7 +4199,7 @@ var SelectTrigger = React25.forwardRef(function SelectTrigger2({ className, chil
|
|
|
3866
4199
|
...props,
|
|
3867
4200
|
children: [
|
|
3868
4201
|
children,
|
|
3869
|
-
/* @__PURE__ */
|
|
4202
|
+
/* @__PURE__ */ jsx29(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx29(
|
|
3870
4203
|
Icon,
|
|
3871
4204
|
{
|
|
3872
4205
|
name: "caret-down",
|
|
@@ -3879,8 +4212,8 @@ var SelectTrigger = React25.forwardRef(function SelectTrigger2({ className, chil
|
|
|
3879
4212
|
);
|
|
3880
4213
|
});
|
|
3881
4214
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
3882
|
-
var SelectScrollUpButton =
|
|
3883
|
-
return /* @__PURE__ */
|
|
4215
|
+
var SelectScrollUpButton = React27.forwardRef(function SelectScrollUpButton2({ className, ...props }, ref) {
|
|
4216
|
+
return /* @__PURE__ */ jsx29(
|
|
3884
4217
|
SelectPrimitive.ScrollUpButton,
|
|
3885
4218
|
{
|
|
3886
4219
|
ref,
|
|
@@ -3890,13 +4223,13 @@ var SelectScrollUpButton = React25.forwardRef(function SelectScrollUpButton2({ c
|
|
|
3890
4223
|
className
|
|
3891
4224
|
),
|
|
3892
4225
|
...props,
|
|
3893
|
-
children: /* @__PURE__ */
|
|
4226
|
+
children: /* @__PURE__ */ jsx29(Icon, { name: "caret-up", size: 12 })
|
|
3894
4227
|
}
|
|
3895
4228
|
);
|
|
3896
4229
|
});
|
|
3897
4230
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
3898
|
-
var SelectScrollDownButton =
|
|
3899
|
-
return /* @__PURE__ */
|
|
4231
|
+
var SelectScrollDownButton = React27.forwardRef(function SelectScrollDownButton2({ className, ...props }, ref) {
|
|
4232
|
+
return /* @__PURE__ */ jsx29(
|
|
3900
4233
|
SelectPrimitive.ScrollDownButton,
|
|
3901
4234
|
{
|
|
3902
4235
|
ref,
|
|
@@ -3906,13 +4239,13 @@ var SelectScrollDownButton = React25.forwardRef(function SelectScrollDownButton2
|
|
|
3906
4239
|
className
|
|
3907
4240
|
),
|
|
3908
4241
|
...props,
|
|
3909
|
-
children: /* @__PURE__ */
|
|
4242
|
+
children: /* @__PURE__ */ jsx29(Icon, { name: "caret-down", size: 12 })
|
|
3910
4243
|
}
|
|
3911
4244
|
);
|
|
3912
4245
|
});
|
|
3913
4246
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
3914
|
-
var SelectContent =
|
|
3915
|
-
return /* @__PURE__ */
|
|
4247
|
+
var SelectContent = React27.forwardRef(function SelectContent2({ className, children, position = "popper", ...props }, ref) {
|
|
4248
|
+
return /* @__PURE__ */ jsx29(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs16(
|
|
3916
4249
|
SelectPrimitive.Content,
|
|
3917
4250
|
{
|
|
3918
4251
|
ref,
|
|
@@ -3925,8 +4258,8 @@ var SelectContent = React25.forwardRef(function SelectContent2({ className, chil
|
|
|
3925
4258
|
),
|
|
3926
4259
|
...props,
|
|
3927
4260
|
children: [
|
|
3928
|
-
/* @__PURE__ */
|
|
3929
|
-
/* @__PURE__ */
|
|
4261
|
+
/* @__PURE__ */ jsx29(SelectScrollUpButton, {}),
|
|
4262
|
+
/* @__PURE__ */ jsx29(
|
|
3930
4263
|
SelectPrimitive.Viewport,
|
|
3931
4264
|
{
|
|
3932
4265
|
"data-slot": "select-viewport",
|
|
@@ -3934,14 +4267,14 @@ var SelectContent = React25.forwardRef(function SelectContent2({ className, chil
|
|
|
3934
4267
|
children
|
|
3935
4268
|
}
|
|
3936
4269
|
),
|
|
3937
|
-
/* @__PURE__ */
|
|
4270
|
+
/* @__PURE__ */ jsx29(SelectScrollDownButton, {})
|
|
3938
4271
|
]
|
|
3939
4272
|
}
|
|
3940
4273
|
) });
|
|
3941
4274
|
});
|
|
3942
4275
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
3943
|
-
var SelectLabel =
|
|
3944
|
-
return /* @__PURE__ */
|
|
4276
|
+
var SelectLabel = React27.forwardRef(function SelectLabel2({ className, ...props }, ref) {
|
|
4277
|
+
return /* @__PURE__ */ jsx29(
|
|
3945
4278
|
SelectPrimitive.Label,
|
|
3946
4279
|
{
|
|
3947
4280
|
ref,
|
|
@@ -3963,8 +4296,8 @@ var SelectLabel = React25.forwardRef(function SelectLabel2({ className, ...props
|
|
|
3963
4296
|
);
|
|
3964
4297
|
});
|
|
3965
4298
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
3966
|
-
var SelectItem =
|
|
3967
|
-
return /* @__PURE__ */
|
|
4299
|
+
var SelectItem = React27.forwardRef(function SelectItem2({ className, children, ...props }, ref) {
|
|
4300
|
+
return /* @__PURE__ */ jsxs16(
|
|
3968
4301
|
SelectPrimitive.Item,
|
|
3969
4302
|
{
|
|
3970
4303
|
ref,
|
|
@@ -3975,20 +4308,20 @@ var SelectItem = React25.forwardRef(function SelectItem2({ className, children,
|
|
|
3975
4308
|
),
|
|
3976
4309
|
...props,
|
|
3977
4310
|
children: [
|
|
3978
|
-
/* @__PURE__ */
|
|
4311
|
+
/* @__PURE__ */ jsx29(SelectPrimitive.ItemText, { className: "truncate", children: renderTextContent(children, {
|
|
3979
4312
|
as: "span",
|
|
3980
4313
|
className: "block truncate text-[color:var(--sofya-text-default)]",
|
|
3981
4314
|
size: "body",
|
|
3982
4315
|
style: inheritedTypographyStyle
|
|
3983
4316
|
}) }),
|
|
3984
|
-
/* @__PURE__ */
|
|
4317
|
+
/* @__PURE__ */ jsx29(SelectPrimitive.ItemIndicator, { asChild: true, children: /* @__PURE__ */ jsx29("span", { className: "absolute right-4 inline-flex h-4 w-4 items-center justify-center text-primary", children: /* @__PURE__ */ jsx29(Icon, { name: "check", size: 14 }) }) })
|
|
3985
4318
|
]
|
|
3986
4319
|
}
|
|
3987
4320
|
);
|
|
3988
4321
|
});
|
|
3989
4322
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
3990
|
-
var SelectSeparator =
|
|
3991
|
-
return /* @__PURE__ */
|
|
4323
|
+
var SelectSeparator = React27.forwardRef(function SelectSeparator2({ className, ...props }, ref) {
|
|
4324
|
+
return /* @__PURE__ */ jsx29(
|
|
3992
4325
|
SelectPrimitive.Separator,
|
|
3993
4326
|
{
|
|
3994
4327
|
ref,
|
|
@@ -4001,11 +4334,11 @@ var SelectSeparator = React25.forwardRef(function SelectSeparator2({ className,
|
|
|
4001
4334
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
4002
4335
|
|
|
4003
4336
|
// src/components/separator.tsx
|
|
4004
|
-
import * as
|
|
4337
|
+
import * as React28 from "react";
|
|
4005
4338
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
4006
|
-
import { jsx as
|
|
4007
|
-
var Separator2 =
|
|
4008
|
-
return /* @__PURE__ */
|
|
4339
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4340
|
+
var Separator2 = React28.forwardRef(function Separator3({ className, decorative = true, orientation = "horizontal", ...props }, ref) {
|
|
4341
|
+
return /* @__PURE__ */ jsx30(
|
|
4009
4342
|
SeparatorPrimitive.Root,
|
|
4010
4343
|
{
|
|
4011
4344
|
ref,
|
|
@@ -4024,8 +4357,8 @@ var Separator2 = React26.forwardRef(function Separator3({ className, decorative
|
|
|
4024
4357
|
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
4025
4358
|
|
|
4026
4359
|
// src/components/slider.tsx
|
|
4027
|
-
import * as
|
|
4028
|
-
import { jsx as
|
|
4360
|
+
import * as React29 from "react";
|
|
4361
|
+
import { jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4029
4362
|
function clampSliderValue(value, min, max) {
|
|
4030
4363
|
if (Number.isNaN(value)) {
|
|
4031
4364
|
return min;
|
|
@@ -4050,7 +4383,7 @@ function resolveSliderMeasurement(value, fallback) {
|
|
|
4050
4383
|
function isTextValue(value) {
|
|
4051
4384
|
return typeof value === "string" || typeof value === "number";
|
|
4052
4385
|
}
|
|
4053
|
-
var Slider =
|
|
4386
|
+
var Slider = React29.forwardRef(function Slider2({
|
|
4054
4387
|
className,
|
|
4055
4388
|
defaultValue,
|
|
4056
4389
|
formatValue,
|
|
@@ -4073,7 +4406,7 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4073
4406
|
valueClassName,
|
|
4074
4407
|
...props
|
|
4075
4408
|
}, ref) {
|
|
4076
|
-
const resolvedId =
|
|
4409
|
+
const resolvedId = React29.useId();
|
|
4077
4410
|
const inputId = id ?? resolvedId;
|
|
4078
4411
|
const safeMin = min;
|
|
4079
4412
|
const safeMax = resolveSliderMax(safeMin, max);
|
|
@@ -4082,7 +4415,7 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4082
4415
|
onChange: onValueChange,
|
|
4083
4416
|
value
|
|
4084
4417
|
});
|
|
4085
|
-
|
|
4418
|
+
React29.useEffect(() => {
|
|
4086
4419
|
if (value !== void 0) {
|
|
4087
4420
|
return;
|
|
4088
4421
|
}
|
|
@@ -4129,14 +4462,14 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4129
4462
|
setControllableValue(nextValue);
|
|
4130
4463
|
onChange?.(event);
|
|
4131
4464
|
};
|
|
4132
|
-
return /* @__PURE__ */
|
|
4465
|
+
return /* @__PURE__ */ jsxs17(
|
|
4133
4466
|
"div",
|
|
4134
4467
|
{
|
|
4135
4468
|
"data-slot": "slider",
|
|
4136
4469
|
className: cn("grid w-full gap-2", className),
|
|
4137
4470
|
children: [
|
|
4138
|
-
label || showValue ? /* @__PURE__ */
|
|
4139
|
-
label ? /* @__PURE__ */
|
|
4471
|
+
label || showValue ? /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between gap-4", children: [
|
|
4472
|
+
label ? /* @__PURE__ */ jsx31(
|
|
4140
4473
|
FieldLabel,
|
|
4141
4474
|
{
|
|
4142
4475
|
htmlFor: inputId,
|
|
@@ -4147,8 +4480,8 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4147
4480
|
textClassName: "block min-w-0 text-[color:var(--sofya-text-default)]",
|
|
4148
4481
|
children: label
|
|
4149
4482
|
}
|
|
4150
|
-
) : /* @__PURE__ */
|
|
4151
|
-
showValue ? /* @__PURE__ */
|
|
4483
|
+
) : /* @__PURE__ */ jsx31("span", {}),
|
|
4484
|
+
showValue ? /* @__PURE__ */ jsx31(
|
|
4152
4485
|
"div",
|
|
4153
4486
|
{
|
|
4154
4487
|
className: cn(
|
|
@@ -4166,7 +4499,7 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4166
4499
|
}
|
|
4167
4500
|
) : null
|
|
4168
4501
|
] }) : null,
|
|
4169
|
-
/* @__PURE__ */
|
|
4502
|
+
/* @__PURE__ */ jsxs17(
|
|
4170
4503
|
"div",
|
|
4171
4504
|
{
|
|
4172
4505
|
"data-slot": "slider-control",
|
|
@@ -4176,7 +4509,7 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4176
4509
|
),
|
|
4177
4510
|
style: controlStyle,
|
|
4178
4511
|
children: [
|
|
4179
|
-
/* @__PURE__ */
|
|
4512
|
+
/* @__PURE__ */ jsx31(
|
|
4180
4513
|
"input",
|
|
4181
4514
|
{
|
|
4182
4515
|
...props,
|
|
@@ -4193,7 +4526,7 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4193
4526
|
style: inputBoundsStyle
|
|
4194
4527
|
}
|
|
4195
4528
|
),
|
|
4196
|
-
/* @__PURE__ */
|
|
4529
|
+
/* @__PURE__ */ jsx31(
|
|
4197
4530
|
"div",
|
|
4198
4531
|
{
|
|
4199
4532
|
"data-slot": "slider-track",
|
|
@@ -4204,7 +4537,7 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4204
4537
|
style: trackBoundsStyle
|
|
4205
4538
|
}
|
|
4206
4539
|
),
|
|
4207
|
-
/* @__PURE__ */
|
|
4540
|
+
/* @__PURE__ */ jsx31(
|
|
4208
4541
|
"div",
|
|
4209
4542
|
{
|
|
4210
4543
|
"data-slot": "slider-range",
|
|
@@ -4215,7 +4548,7 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4215
4548
|
style: rangeStyle
|
|
4216
4549
|
}
|
|
4217
4550
|
),
|
|
4218
|
-
/* @__PURE__ */
|
|
4551
|
+
/* @__PURE__ */ jsx31(
|
|
4219
4552
|
"div",
|
|
4220
4553
|
{
|
|
4221
4554
|
"data-slot": "slider-thumb",
|
|
@@ -4236,10 +4569,10 @@ var Slider = React27.forwardRef(function Slider2({
|
|
|
4236
4569
|
Slider.displayName = "Slider";
|
|
4237
4570
|
|
|
4238
4571
|
// src/components/skeleton.tsx
|
|
4239
|
-
import * as
|
|
4240
|
-
import { jsx as
|
|
4241
|
-
var Skeleton =
|
|
4242
|
-
return /* @__PURE__ */
|
|
4572
|
+
import * as React30 from "react";
|
|
4573
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
4574
|
+
var Skeleton = React30.forwardRef(function Skeleton2({ className, ...props }, ref) {
|
|
4575
|
+
return /* @__PURE__ */ jsx32(
|
|
4243
4576
|
"div",
|
|
4244
4577
|
{
|
|
4245
4578
|
ref,
|
|
@@ -4254,18 +4587,18 @@ var Skeleton = React28.forwardRef(function Skeleton2({ className, ...props }, re
|
|
|
4254
4587
|
Skeleton.displayName = "Skeleton";
|
|
4255
4588
|
|
|
4256
4589
|
// src/components/sonner.tsx
|
|
4257
|
-
import * as
|
|
4590
|
+
import * as React31 from "react";
|
|
4258
4591
|
import {
|
|
4259
4592
|
Toaster as SonnerToaster,
|
|
4260
4593
|
toast
|
|
4261
4594
|
} from "sonner";
|
|
4262
|
-
import { jsx as
|
|
4595
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
4263
4596
|
var notificationVariantOptions = ["default", "success", "error", "warning"];
|
|
4264
4597
|
function ToastStatusIcon({
|
|
4265
4598
|
iconName,
|
|
4266
4599
|
className
|
|
4267
4600
|
}) {
|
|
4268
|
-
return /* @__PURE__ */
|
|
4601
|
+
return /* @__PURE__ */ jsx33(
|
|
4269
4602
|
"span",
|
|
4270
4603
|
{
|
|
4271
4604
|
"aria-hidden": "true",
|
|
@@ -4273,7 +4606,7 @@ function ToastStatusIcon({
|
|
|
4273
4606
|
"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full border shadow-sofya-sm",
|
|
4274
4607
|
className
|
|
4275
4608
|
),
|
|
4276
|
-
children: /* @__PURE__ */
|
|
4609
|
+
children: /* @__PURE__ */ jsx33(Icon, { name: iconName, size: 16 })
|
|
4277
4610
|
}
|
|
4278
4611
|
);
|
|
4279
4612
|
}
|
|
@@ -4294,35 +4627,35 @@ var defaultToastClassNames = {
|
|
|
4294
4627
|
loading: "border-border bg-card text-foreground"
|
|
4295
4628
|
};
|
|
4296
4629
|
var defaultToastIcons = {
|
|
4297
|
-
success: /* @__PURE__ */
|
|
4630
|
+
success: /* @__PURE__ */ jsx33(
|
|
4298
4631
|
ToastStatusIcon,
|
|
4299
4632
|
{
|
|
4300
4633
|
iconName: "check",
|
|
4301
4634
|
className: "border-success/15 bg-success/12 text-success"
|
|
4302
4635
|
}
|
|
4303
4636
|
),
|
|
4304
|
-
error: /* @__PURE__ */
|
|
4637
|
+
error: /* @__PURE__ */ jsx33(
|
|
4305
4638
|
ToastStatusIcon,
|
|
4306
4639
|
{
|
|
4307
4640
|
iconName: "x",
|
|
4308
4641
|
className: "border-destructive/15 bg-destructive/12 text-destructive"
|
|
4309
4642
|
}
|
|
4310
4643
|
),
|
|
4311
|
-
warning: /* @__PURE__ */
|
|
4644
|
+
warning: /* @__PURE__ */ jsx33(
|
|
4312
4645
|
ToastStatusIcon,
|
|
4313
4646
|
{
|
|
4314
4647
|
iconName: "question",
|
|
4315
4648
|
className: "border-warning/20 bg-warning/15 text-foreground"
|
|
4316
4649
|
}
|
|
4317
4650
|
),
|
|
4318
|
-
info: /* @__PURE__ */
|
|
4651
|
+
info: /* @__PURE__ */ jsx33(
|
|
4319
4652
|
ToastStatusIcon,
|
|
4320
4653
|
{
|
|
4321
4654
|
iconName: "question",
|
|
4322
4655
|
className: "border-primary/15 bg-primary/10 text-primary"
|
|
4323
4656
|
}
|
|
4324
4657
|
),
|
|
4325
|
-
close: /* @__PURE__ */
|
|
4658
|
+
close: /* @__PURE__ */ jsx33(Icon, { name: "x", size: 12 })
|
|
4326
4659
|
};
|
|
4327
4660
|
function mergeToastClassNames(overrides) {
|
|
4328
4661
|
return {
|
|
@@ -4330,7 +4663,7 @@ function mergeToastClassNames(overrides) {
|
|
|
4330
4663
|
...overrides
|
|
4331
4664
|
};
|
|
4332
4665
|
}
|
|
4333
|
-
var Toaster =
|
|
4666
|
+
var Toaster = React31.forwardRef(
|
|
4334
4667
|
function Toaster2({
|
|
4335
4668
|
className,
|
|
4336
4669
|
closeButton = true,
|
|
@@ -4342,7 +4675,7 @@ var Toaster = React29.forwardRef(
|
|
|
4342
4675
|
visibleToasts = 5,
|
|
4343
4676
|
...props
|
|
4344
4677
|
}, ref) {
|
|
4345
|
-
return /* @__PURE__ */
|
|
4678
|
+
return /* @__PURE__ */ jsx33(
|
|
4346
4679
|
SonnerToaster,
|
|
4347
4680
|
{
|
|
4348
4681
|
ref,
|
|
@@ -4371,43 +4704,10 @@ var Toaster = React29.forwardRef(
|
|
|
4371
4704
|
);
|
|
4372
4705
|
Toaster.displayName = "Toaster";
|
|
4373
4706
|
|
|
4374
|
-
// src/components/spinner.tsx
|
|
4375
|
-
import * as React30 from "react";
|
|
4376
|
-
import { IconLoader2 as IconLoader22 } from "@tabler/icons-react";
|
|
4377
|
-
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
4378
|
-
var spinnerSizeOptions = ["sm", "default", "lg"];
|
|
4379
|
-
var Spinner = React30.forwardRef(function Spinner2({
|
|
4380
|
-
"aria-label": ariaLabelProp,
|
|
4381
|
-
"aria-labelledby": ariaLabelledby,
|
|
4382
|
-
className,
|
|
4383
|
-
role = "status",
|
|
4384
|
-
size = "default",
|
|
4385
|
-
...props
|
|
4386
|
-
}, ref) {
|
|
4387
|
-
const ariaLabel = ariaLabelProp ?? (ariaLabelledby ? void 0 : "Loading");
|
|
4388
|
-
return /* @__PURE__ */ jsx32(
|
|
4389
|
-
IconLoader22,
|
|
4390
|
-
{
|
|
4391
|
-
ref,
|
|
4392
|
-
"data-size": size,
|
|
4393
|
-
"data-slot": "spinner",
|
|
4394
|
-
role,
|
|
4395
|
-
"aria-label": ariaLabel,
|
|
4396
|
-
"aria-labelledby": ariaLabelledby,
|
|
4397
|
-
className: cn(
|
|
4398
|
-
"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",
|
|
4399
|
-
className
|
|
4400
|
-
),
|
|
4401
|
-
...props
|
|
4402
|
-
}
|
|
4403
|
-
);
|
|
4404
|
-
});
|
|
4405
|
-
Spinner.displayName = "Spinner";
|
|
4406
|
-
|
|
4407
4707
|
// src/components/switch.tsx
|
|
4408
|
-
import * as
|
|
4708
|
+
import * as React32 from "react";
|
|
4409
4709
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
4410
|
-
import { jsx as
|
|
4710
|
+
import { jsx as jsx34, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4411
4711
|
var switchSizeOptions = ["default", "sm"];
|
|
4412
4712
|
var switchRootSizeClasses = {
|
|
4413
4713
|
default: "h-6 w-11",
|
|
@@ -4417,7 +4717,7 @@ var switchThumbSizeClasses = {
|
|
|
4417
4717
|
default: "h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
|
4418
4718
|
sm: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
4419
4719
|
};
|
|
4420
|
-
var Switch =
|
|
4720
|
+
var Switch = React32.forwardRef(
|
|
4421
4721
|
({
|
|
4422
4722
|
"aria-describedby": ariaDescribedBy,
|
|
4423
4723
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -4432,7 +4732,7 @@ var Switch = React31.forwardRef(
|
|
|
4432
4732
|
size,
|
|
4433
4733
|
...props
|
|
4434
4734
|
}, ref) => {
|
|
4435
|
-
const generatedId =
|
|
4735
|
+
const generatedId = React32.useId();
|
|
4436
4736
|
const resolvedId = id ?? generatedId;
|
|
4437
4737
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
4438
4738
|
const descriptionId = description ? `${resolvedId}-description` : void 0;
|
|
@@ -4441,7 +4741,7 @@ var Switch = React31.forwardRef(
|
|
|
4441
4741
|
const alignClassName = description ? "items-start" : "items-center";
|
|
4442
4742
|
const resolvedAriaDescribedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ") || void 0;
|
|
4443
4743
|
const resolvedAriaLabelledBy = ariaLabelledBy ?? labelId;
|
|
4444
|
-
const switchControl = /* @__PURE__ */
|
|
4744
|
+
const switchControl = /* @__PURE__ */ jsx34(
|
|
4445
4745
|
SwitchPrimitives.Root,
|
|
4446
4746
|
{
|
|
4447
4747
|
id: resolvedId,
|
|
@@ -4456,7 +4756,7 @@ var Switch = React31.forwardRef(
|
|
|
4456
4756
|
"data-size": resolvedSize,
|
|
4457
4757
|
...props,
|
|
4458
4758
|
ref,
|
|
4459
|
-
children: /* @__PURE__ */
|
|
4759
|
+
children: /* @__PURE__ */ jsx34(
|
|
4460
4760
|
SwitchPrimitives.Thumb,
|
|
4461
4761
|
{
|
|
4462
4762
|
className: cn(
|
|
@@ -4470,7 +4770,7 @@ var Switch = React31.forwardRef(
|
|
|
4470
4770
|
if (!hasTextContent) {
|
|
4471
4771
|
return switchControl;
|
|
4472
4772
|
}
|
|
4473
|
-
return /* @__PURE__ */
|
|
4773
|
+
return /* @__PURE__ */ jsxs18(
|
|
4474
4774
|
"div",
|
|
4475
4775
|
{
|
|
4476
4776
|
"data-slot": "switch-container",
|
|
@@ -4481,8 +4781,8 @@ var Switch = React31.forwardRef(
|
|
|
4481
4781
|
}),
|
|
4482
4782
|
children: [
|
|
4483
4783
|
switchControl,
|
|
4484
|
-
/* @__PURE__ */
|
|
4485
|
-
label ? /* @__PURE__ */
|
|
4784
|
+
/* @__PURE__ */ jsxs18("span", { className: selectionControlContentBaseClasses, children: [
|
|
4785
|
+
label ? /* @__PURE__ */ jsx34("label", { htmlFor: resolvedId, className: selectionControlLabelTextBaseClasses, children: /* @__PURE__ */ jsx34(
|
|
4486
4786
|
"span",
|
|
4487
4787
|
{
|
|
4488
4788
|
id: labelId,
|
|
@@ -4497,7 +4797,7 @@ var Switch = React31.forwardRef(
|
|
|
4497
4797
|
})
|
|
4498
4798
|
}
|
|
4499
4799
|
) }) : null,
|
|
4500
|
-
description ? /* @__PURE__ */
|
|
4800
|
+
description ? /* @__PURE__ */ jsx34(
|
|
4501
4801
|
"span",
|
|
4502
4802
|
{
|
|
4503
4803
|
id: descriptionId,
|
|
@@ -4522,8 +4822,8 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
|
4522
4822
|
|
|
4523
4823
|
// src/components/table.tsx
|
|
4524
4824
|
import { cva as cva8 } from "class-variance-authority";
|
|
4525
|
-
import * as
|
|
4526
|
-
import { jsx as
|
|
4825
|
+
import * as React33 from "react";
|
|
4826
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
4527
4827
|
var tableCellVariantOptions = ["default", "primary", "muted"];
|
|
4528
4828
|
var tableStatusToneOptions = [
|
|
4529
4829
|
"active",
|
|
@@ -4573,13 +4873,13 @@ var tableActionButtonVariants = cva8(
|
|
|
4573
4873
|
}
|
|
4574
4874
|
}
|
|
4575
4875
|
);
|
|
4576
|
-
var Table =
|
|
4577
|
-
return /* @__PURE__ */
|
|
4876
|
+
var Table = React33.forwardRef(function Table2({ className, ...props }, ref) {
|
|
4877
|
+
return /* @__PURE__ */ jsx35(
|
|
4578
4878
|
"div",
|
|
4579
4879
|
{
|
|
4580
4880
|
"data-slot": "table-container",
|
|
4581
4881
|
className: "relative w-full overflow-x-auto",
|
|
4582
|
-
children: /* @__PURE__ */
|
|
4882
|
+
children: /* @__PURE__ */ jsx35(
|
|
4583
4883
|
"table",
|
|
4584
4884
|
{
|
|
4585
4885
|
"data-slot": "table",
|
|
@@ -4594,8 +4894,8 @@ var Table = React32.forwardRef(function Table2({ className, ...props }, ref) {
|
|
|
4594
4894
|
}
|
|
4595
4895
|
);
|
|
4596
4896
|
});
|
|
4597
|
-
var TableHeader =
|
|
4598
|
-
return /* @__PURE__ */
|
|
4897
|
+
var TableHeader = React33.forwardRef(function TableHeader2({ className, ...props }, ref) {
|
|
4898
|
+
return /* @__PURE__ */ jsx35(
|
|
4599
4899
|
"thead",
|
|
4600
4900
|
{
|
|
4601
4901
|
"data-slot": "table-header",
|
|
@@ -4608,8 +4908,8 @@ var TableHeader = React32.forwardRef(function TableHeader2({ className, ...props
|
|
|
4608
4908
|
}
|
|
4609
4909
|
);
|
|
4610
4910
|
});
|
|
4611
|
-
var TableBody =
|
|
4612
|
-
return /* @__PURE__ */
|
|
4911
|
+
var TableBody = React33.forwardRef(function TableBody2({ className, ...props }, ref) {
|
|
4912
|
+
return /* @__PURE__ */ jsx35(
|
|
4613
4913
|
"tbody",
|
|
4614
4914
|
{
|
|
4615
4915
|
"data-slot": "table-body",
|
|
@@ -4619,8 +4919,8 @@ var TableBody = React32.forwardRef(function TableBody2({ className, ...props },
|
|
|
4619
4919
|
}
|
|
4620
4920
|
);
|
|
4621
4921
|
});
|
|
4622
|
-
var TableFooter =
|
|
4623
|
-
return /* @__PURE__ */
|
|
4922
|
+
var TableFooter = React33.forwardRef(function TableFooter2({ className, ...props }, ref) {
|
|
4923
|
+
return /* @__PURE__ */ jsx35(
|
|
4624
4924
|
"tfoot",
|
|
4625
4925
|
{
|
|
4626
4926
|
"data-slot": "table-footer",
|
|
@@ -4633,8 +4933,8 @@ var TableFooter = React32.forwardRef(function TableFooter2({ className, ...props
|
|
|
4633
4933
|
}
|
|
4634
4934
|
);
|
|
4635
4935
|
});
|
|
4636
|
-
var TableRow =
|
|
4637
|
-
return /* @__PURE__ */
|
|
4936
|
+
var TableRow = React33.forwardRef(function TableRow2({ className, ...props }, ref) {
|
|
4937
|
+
return /* @__PURE__ */ jsx35(
|
|
4638
4938
|
"tr",
|
|
4639
4939
|
{
|
|
4640
4940
|
"data-slot": "table-row",
|
|
@@ -4647,8 +4947,8 @@ var TableRow = React32.forwardRef(function TableRow2({ className, ...props }, re
|
|
|
4647
4947
|
}
|
|
4648
4948
|
);
|
|
4649
4949
|
});
|
|
4650
|
-
var TableHead =
|
|
4651
|
-
return /* @__PURE__ */
|
|
4950
|
+
var TableHead = React33.forwardRef(function TableHead2({ className, children, ...props }, ref) {
|
|
4951
|
+
return /* @__PURE__ */ jsx35(
|
|
4652
4952
|
"th",
|
|
4653
4953
|
{
|
|
4654
4954
|
"data-slot": "table-head",
|
|
@@ -4667,9 +4967,9 @@ var TableHead = React32.forwardRef(function TableHead2({ className, children, ..
|
|
|
4667
4967
|
}
|
|
4668
4968
|
);
|
|
4669
4969
|
});
|
|
4670
|
-
var TableCell =
|
|
4970
|
+
var TableCell = React33.forwardRef(
|
|
4671
4971
|
function TableCell2({ className, variant, children, ...props }, ref) {
|
|
4672
|
-
return /* @__PURE__ */
|
|
4972
|
+
return /* @__PURE__ */ jsx35(
|
|
4673
4973
|
"td",
|
|
4674
4974
|
{
|
|
4675
4975
|
"data-slot": "table-cell",
|
|
@@ -4686,8 +4986,8 @@ var TableCell = React32.forwardRef(
|
|
|
4686
4986
|
);
|
|
4687
4987
|
}
|
|
4688
4988
|
);
|
|
4689
|
-
var TableCaption =
|
|
4690
|
-
return /* @__PURE__ */
|
|
4989
|
+
var TableCaption = React33.forwardRef(function TableCaption2({ className, children, ...props }, ref) {
|
|
4990
|
+
return /* @__PURE__ */ jsx35(
|
|
4691
4991
|
"caption",
|
|
4692
4992
|
{
|
|
4693
4993
|
"data-slot": "table-caption",
|
|
@@ -4712,7 +5012,7 @@ function TableStatusBadge({
|
|
|
4712
5012
|
children,
|
|
4713
5013
|
...props
|
|
4714
5014
|
}) {
|
|
4715
|
-
return /* @__PURE__ */
|
|
5015
|
+
return /* @__PURE__ */ jsx35(
|
|
4716
5016
|
Badge,
|
|
4717
5017
|
{
|
|
4718
5018
|
variant: "pill",
|
|
@@ -4727,8 +5027,8 @@ function TableStatusBadge({
|
|
|
4727
5027
|
}
|
|
4728
5028
|
);
|
|
4729
5029
|
}
|
|
4730
|
-
var TableActionButton =
|
|
4731
|
-
return /* @__PURE__ */
|
|
5030
|
+
var TableActionButton = React33.forwardRef(function TableActionButton2({ className, tone, type = "button", children, ...props }, ref) {
|
|
5031
|
+
return /* @__PURE__ */ jsx35(
|
|
4732
5032
|
Button,
|
|
4733
5033
|
{
|
|
4734
5034
|
ref,
|
|
@@ -4746,8 +5046,8 @@ var TableActionButton = React32.forwardRef(function TableActionButton2({ classNa
|
|
|
4746
5046
|
}
|
|
4747
5047
|
);
|
|
4748
5048
|
});
|
|
4749
|
-
var TableActions =
|
|
4750
|
-
return /* @__PURE__ */
|
|
5049
|
+
var TableActions = React33.forwardRef(function TableActions2({ className, ...props }, ref) {
|
|
5050
|
+
return /* @__PURE__ */ jsx35(
|
|
4751
5051
|
"div",
|
|
4752
5052
|
{
|
|
4753
5053
|
ref,
|
|
@@ -4768,10 +5068,10 @@ TableActionButton.displayName = "TableActionButton";
|
|
|
4768
5068
|
TableActions.displayName = "TableActions";
|
|
4769
5069
|
|
|
4770
5070
|
// src/components/tabs.tsx
|
|
4771
|
-
import * as
|
|
5071
|
+
import * as React34 from "react";
|
|
4772
5072
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
4773
5073
|
import { motion as motion3 } from "motion/react";
|
|
4774
|
-
import { jsx as
|
|
5074
|
+
import { jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4775
5075
|
function resolveDefaultValue(items, defaultValue) {
|
|
4776
5076
|
if (defaultValue) {
|
|
4777
5077
|
return defaultValue;
|
|
@@ -4795,13 +5095,13 @@ function Tabs({
|
|
|
4795
5095
|
onChange: onValueChange,
|
|
4796
5096
|
value
|
|
4797
5097
|
});
|
|
4798
|
-
const indicatorLayoutId =
|
|
4799
|
-
|
|
5098
|
+
const indicatorLayoutId = React34.useId();
|
|
5099
|
+
React34.useEffect(() => {
|
|
4800
5100
|
if (value === void 0) {
|
|
4801
5101
|
setUncontrolledCurrentValue(resolvedDefaultValue);
|
|
4802
5102
|
}
|
|
4803
5103
|
}, [resolvedDefaultValue, setUncontrolledCurrentValue, value]);
|
|
4804
|
-
return /* @__PURE__ */
|
|
5104
|
+
return /* @__PURE__ */ jsxs19(
|
|
4805
5105
|
TabsPrimitive.Root,
|
|
4806
5106
|
{
|
|
4807
5107
|
className: cn("w-full", className),
|
|
@@ -4809,7 +5109,7 @@ function Tabs({
|
|
|
4809
5109
|
value: currentValue,
|
|
4810
5110
|
...props,
|
|
4811
5111
|
children: [
|
|
4812
|
-
/* @__PURE__ */
|
|
5112
|
+
/* @__PURE__ */ jsx36(
|
|
4813
5113
|
TabsPrimitive.List,
|
|
4814
5114
|
{
|
|
4815
5115
|
"aria-label": "Subtelas navegaveis",
|
|
@@ -4820,7 +5120,7 @@ function Tabs({
|
|
|
4820
5120
|
children: items.map((item) => {
|
|
4821
5121
|
const isUnavailable = item.disabled || item.loading;
|
|
4822
5122
|
const isActive = item.value === currentValue;
|
|
4823
|
-
return /* @__PURE__ */
|
|
5123
|
+
return /* @__PURE__ */ jsxs19(
|
|
4824
5124
|
TabsPrimitive.Trigger,
|
|
4825
5125
|
{
|
|
4826
5126
|
value: item.value,
|
|
@@ -4832,7 +5132,7 @@ function Tabs({
|
|
|
4832
5132
|
item.triggerClassName
|
|
4833
5133
|
),
|
|
4834
5134
|
children: [
|
|
4835
|
-
isActive ? /* @__PURE__ */
|
|
5135
|
+
isActive ? /* @__PURE__ */ jsx36(
|
|
4836
5136
|
motion3.span,
|
|
4837
5137
|
{
|
|
4838
5138
|
"aria-hidden": "true",
|
|
@@ -4842,15 +5142,15 @@ function Tabs({
|
|
|
4842
5142
|
transition: { duration: 0.25, ease: "easeInOut" }
|
|
4843
5143
|
}
|
|
4844
5144
|
) : null,
|
|
4845
|
-
/* @__PURE__ */
|
|
4846
|
-
item.loading ? /* @__PURE__ */
|
|
5145
|
+
/* @__PURE__ */ jsxs19("span", { className: "relative z-10 inline-flex items-center gap-2", children: [
|
|
5146
|
+
item.loading ? /* @__PURE__ */ jsx36(
|
|
4847
5147
|
"span",
|
|
4848
5148
|
{
|
|
4849
5149
|
"aria-hidden": "true",
|
|
4850
5150
|
className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-r-transparent"
|
|
4851
5151
|
}
|
|
4852
5152
|
) : null,
|
|
4853
|
-
/* @__PURE__ */
|
|
5153
|
+
/* @__PURE__ */ jsx36("span", { children: renderTextContent(item.label, {
|
|
4854
5154
|
as: "span",
|
|
4855
5155
|
className: "block text-inherit",
|
|
4856
5156
|
size: "h5"
|
|
@@ -4864,7 +5164,7 @@ function Tabs({
|
|
|
4864
5164
|
}
|
|
4865
5165
|
),
|
|
4866
5166
|
items.map(
|
|
4867
|
-
(item) => item.content !== void 0 ? /* @__PURE__ */
|
|
5167
|
+
(item) => item.content !== void 0 ? /* @__PURE__ */ jsx36(
|
|
4868
5168
|
TabsPrimitive.Content,
|
|
4869
5169
|
{
|
|
4870
5170
|
value: item.value,
|
|
@@ -4887,9 +5187,9 @@ function Tabs({
|
|
|
4887
5187
|
Tabs.displayName = "Tabs";
|
|
4888
5188
|
|
|
4889
5189
|
// src/components/textarea.tsx
|
|
4890
|
-
import * as
|
|
4891
|
-
import { jsx as
|
|
4892
|
-
var Textarea =
|
|
5190
|
+
import * as React35 from "react";
|
|
5191
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
5192
|
+
var Textarea = React35.forwardRef(
|
|
4893
5193
|
({
|
|
4894
5194
|
className,
|
|
4895
5195
|
containerClassName,
|
|
@@ -4899,10 +5199,10 @@ var Textarea = React34.forwardRef(
|
|
|
4899
5199
|
rows = 5,
|
|
4900
5200
|
...props
|
|
4901
5201
|
}, ref) => {
|
|
4902
|
-
const generatedId =
|
|
5202
|
+
const generatedId = React35.useId();
|
|
4903
5203
|
const resolvedId = id ?? generatedId;
|
|
4904
5204
|
const ariaLabel = props["aria-label"] ?? (typeof label === "string" ? label : void 0);
|
|
4905
|
-
const control = /* @__PURE__ */
|
|
5205
|
+
const control = /* @__PURE__ */ jsx37(
|
|
4906
5206
|
"textarea",
|
|
4907
5207
|
{
|
|
4908
5208
|
className: cn(
|
|
@@ -4916,7 +5216,7 @@ var Textarea = React34.forwardRef(
|
|
|
4916
5216
|
"aria-label": ariaLabel
|
|
4917
5217
|
}
|
|
4918
5218
|
);
|
|
4919
|
-
return /* @__PURE__ */
|
|
5219
|
+
return /* @__PURE__ */ jsx37(
|
|
4920
5220
|
FieldShell,
|
|
4921
5221
|
{
|
|
4922
5222
|
control,
|
|
@@ -4931,14 +5231,14 @@ var Textarea = React34.forwardRef(
|
|
|
4931
5231
|
Textarea.displayName = "Textarea";
|
|
4932
5232
|
|
|
4933
5233
|
// src/components/tooltip.tsx
|
|
4934
|
-
import * as
|
|
5234
|
+
import * as React36 from "react";
|
|
4935
5235
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4936
|
-
import { jsx as
|
|
5236
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
4937
5237
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
4938
5238
|
var Tooltip = TooltipPrimitive.Root;
|
|
4939
5239
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
4940
|
-
var TooltipContent =
|
|
4941
|
-
return /* @__PURE__ */
|
|
5240
|
+
var TooltipContent = React36.forwardRef(function TooltipContent2({ className, sideOffset = 8, ...props }, ref) {
|
|
5241
|
+
return /* @__PURE__ */ jsx38(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx38(
|
|
4942
5242
|
TooltipPrimitive.Content,
|
|
4943
5243
|
{
|
|
4944
5244
|
ref,
|
|
@@ -4962,13 +5262,13 @@ var TooltipContent = React35.forwardRef(function TooltipContent2({ className, si
|
|
|
4962
5262
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
4963
5263
|
|
|
4964
5264
|
// src/theme/provider.tsx
|
|
4965
|
-
import * as
|
|
5265
|
+
import * as React37 from "react";
|
|
4966
5266
|
import {
|
|
4967
5267
|
createWhitelabelTheme,
|
|
4968
5268
|
defaultTheme,
|
|
4969
5269
|
themeToCssVariables
|
|
4970
5270
|
} from "@sofya-ds/tokens";
|
|
4971
|
-
import { jsx as
|
|
5271
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
4972
5272
|
var SOFYA_FONT_LINKS = [
|
|
4973
5273
|
{
|
|
4974
5274
|
id: "preconnect-googleapis",
|
|
@@ -4988,7 +5288,7 @@ var SOFYA_FONT_LINKS = [
|
|
|
4988
5288
|
}
|
|
4989
5289
|
];
|
|
4990
5290
|
function useSofyaFontLinks() {
|
|
4991
|
-
|
|
5291
|
+
React37.useEffect(() => {
|
|
4992
5292
|
if (typeof document === "undefined") {
|
|
4993
5293
|
return;
|
|
4994
5294
|
}
|
|
@@ -5021,7 +5321,7 @@ function SofyaProvider({
|
|
|
5021
5321
|
useSofyaFontLinks();
|
|
5022
5322
|
const theme = createWhitelabelTheme(overrides ?? {}, preset);
|
|
5023
5323
|
const cssVariables = themeToCssVariables(theme);
|
|
5024
|
-
return /* @__PURE__ */
|
|
5324
|
+
return /* @__PURE__ */ jsx39(
|
|
5025
5325
|
"div",
|
|
5026
5326
|
{
|
|
5027
5327
|
"data-sofya-theme": theme.name,
|
|
@@ -5084,6 +5384,7 @@ export {
|
|
|
5084
5384
|
DialogTitle,
|
|
5085
5385
|
DialogTrigger,
|
|
5086
5386
|
Dropdown,
|
|
5387
|
+
DropdownSearch,
|
|
5087
5388
|
Empty,
|
|
5088
5389
|
EmptyContent,
|
|
5089
5390
|
EmptyDescription,
|