@sofya-ds/react 1.6.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -2
- package/dist/index.cjs +774 -270
- package/dist/index.css +1 -1
- package/dist/index.d.cts +97 -10
- package/dist/index.d.ts +97 -10
- package/dist/index.js +743 -252
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -47,6 +47,8 @@ __export(index_exports, {
|
|
|
47
47
|
CardHeader: () => CardHeader,
|
|
48
48
|
CardTitle: () => CardTitle,
|
|
49
49
|
Checkbox: () => Checkbox,
|
|
50
|
+
Cluster: () => Cluster,
|
|
51
|
+
Container: () => Container,
|
|
50
52
|
Dialog: () => Dialog,
|
|
51
53
|
DialogBody: () => DialogBody,
|
|
52
54
|
DialogCancel: () => DialogCancel,
|
|
@@ -59,6 +61,7 @@ __export(index_exports, {
|
|
|
59
61
|
DialogPortal: () => DialogPortal,
|
|
60
62
|
DialogTitle: () => DialogTitle,
|
|
61
63
|
DialogTrigger: () => DialogTrigger,
|
|
64
|
+
DocumentCard: () => DocumentCard,
|
|
62
65
|
Dropdown: () => Dropdown,
|
|
63
66
|
DropdownSearch: () => DropdownSearch,
|
|
64
67
|
Empty: () => Empty,
|
|
@@ -68,6 +71,7 @@ __export(index_exports, {
|
|
|
68
71
|
EmptyMedia: () => EmptyMedia,
|
|
69
72
|
EmptyTitle: () => EmptyTitle,
|
|
70
73
|
Icon: () => Icon,
|
|
74
|
+
Inline: () => Inline,
|
|
71
75
|
Input: () => Input,
|
|
72
76
|
InputOTP: () => InputOTP,
|
|
73
77
|
InputOTPGroup: () => InputOTPGroup,
|
|
@@ -92,9 +96,20 @@ __export(index_exports, {
|
|
|
92
96
|
PopoverTitle: () => PopoverTitle,
|
|
93
97
|
PopoverTrigger: () => PopoverTrigger,
|
|
94
98
|
Progress: () => Progress,
|
|
99
|
+
ProseDialogBody: () => ProseDialogBody,
|
|
100
|
+
ProseDialogContent: () => ProseDialogContent,
|
|
101
|
+
ProseDialogDescription: () => ProseDialogDescription,
|
|
102
|
+
ProseDialogHeader: () => ProseDialogHeader,
|
|
103
|
+
ProseDialogTitle: () => ProseDialogTitle,
|
|
95
104
|
REGEXP_ONLY_DIGITS: () => import_input_otp.REGEXP_ONLY_DIGITS,
|
|
96
|
-
RadioGroup: () =>
|
|
105
|
+
RadioGroup: () => RadioGroup3,
|
|
97
106
|
RadioGroupItem: () => RadioGroupItem,
|
|
107
|
+
RadioGroupOption: () => RadioGroupOption,
|
|
108
|
+
RadioGroupOptionAvatar: () => RadioGroupOptionAvatar,
|
|
109
|
+
RadioGroupOptionDescription: () => RadioGroupOptionDescription,
|
|
110
|
+
RadioGroupOptionIndicator: () => RadioGroupOptionIndicator,
|
|
111
|
+
RadioGroupOptionLabel: () => RadioGroupOptionLabel,
|
|
112
|
+
RightRailAction: () => RightRailAction,
|
|
98
113
|
ScrollArea: () => ScrollArea,
|
|
99
114
|
ScrollAreaCorner: () => ScrollAreaCorner,
|
|
100
115
|
ScrollAreaScrollbar: () => ScrollAreaScrollbar,
|
|
@@ -114,6 +129,7 @@ __export(index_exports, {
|
|
|
114
129
|
Slider: () => Slider,
|
|
115
130
|
SofyaProvider: () => SofyaProvider,
|
|
116
131
|
Spinner: () => Spinner,
|
|
132
|
+
Stack: () => Stack,
|
|
117
133
|
Surface: () => Surface,
|
|
118
134
|
Switch: () => Switch,
|
|
119
135
|
Table: () => Table,
|
|
@@ -147,21 +163,21 @@ __export(index_exports, {
|
|
|
147
163
|
badgePillVariants: () => badgePillVariants,
|
|
148
164
|
badgeVariantOptions: () => badgeVariantOptions,
|
|
149
165
|
badgeVariants: () => badgeVariants,
|
|
150
|
-
brandPaletteToCssVariables: () =>
|
|
166
|
+
brandPaletteToCssVariables: () => import_tokens4.brandPaletteToCssVariables,
|
|
151
167
|
buttonLanguageLocaleOptions: () => buttonLanguageLocaleOptions,
|
|
152
168
|
buttonSizeOptions: () => buttonSizeOptions,
|
|
153
169
|
buttonVariantOptions: () => buttonVariantOptions,
|
|
154
170
|
buttonVariants: () => buttonVariants,
|
|
155
171
|
cardVariants: () => cardVariants,
|
|
156
|
-
createWhitelabelTheme: () =>
|
|
157
|
-
defaultTheme: () =>
|
|
172
|
+
createWhitelabelTheme: () => import_tokens4.createWhitelabelTheme,
|
|
173
|
+
defaultTheme: () => import_tokens4.defaultTheme,
|
|
158
174
|
dropdownAppearanceOptions: () => dropdownAppearanceOptions,
|
|
159
175
|
dropdownLanguageItems: () => dropdownLanguageItems,
|
|
160
176
|
dropdownTriggerSizeOptions: () => dropdownTriggerSizeOptions,
|
|
161
177
|
dropdownVariantOptions: () => dropdownVariantOptions,
|
|
162
178
|
emptyMediaVariantOptions: () => emptyMediaVariantOptions,
|
|
163
|
-
gradientToCss: () =>
|
|
164
|
-
hexToHslChannels: () =>
|
|
179
|
+
gradientToCss: () => import_tokens4.gradientToCss,
|
|
180
|
+
hexToHslChannels: () => import_tokens4.hexToHslChannels,
|
|
165
181
|
iconColorOptions: () => iconColorOptions,
|
|
166
182
|
iconNames: () => iconNames,
|
|
167
183
|
iconSizeMap: () => iconSizeMap,
|
|
@@ -170,24 +186,29 @@ __export(index_exports, {
|
|
|
170
186
|
isTextContent: () => isTextContent,
|
|
171
187
|
logoSizeOptions: () => logoSizeOptions,
|
|
172
188
|
logoVariants: () => logoVariants,
|
|
173
|
-
mergeTheme: () =>
|
|
189
|
+
mergeTheme: () => import_tokens4.mergeTheme,
|
|
174
190
|
notificationVariantOptions: () => notificationVariantOptions,
|
|
175
191
|
paginationLinkVariants: () => paginationLinkVariants,
|
|
176
192
|
progressSizeOptions: () => progressSizeOptions,
|
|
177
193
|
radioGroupOrientationOptions: () => radioGroupOrientationOptions,
|
|
178
194
|
radioGroupVariantOptions: () => radioGroupVariantOptions,
|
|
179
195
|
renderTextContent: () => renderTextContent,
|
|
180
|
-
resolveSurfaceToken: () =>
|
|
181
|
-
resolveTextStyle: () =>
|
|
182
|
-
resolveTheme: () =>
|
|
196
|
+
resolveSurfaceToken: () => import_tokens4.resolveSurfaceToken,
|
|
197
|
+
resolveTextStyle: () => import_tokens4.resolveTextStyle,
|
|
198
|
+
resolveTheme: () => import_tokens4.resolveTheme,
|
|
183
199
|
scrollAreaOrientationOptions: () => scrollAreaOrientationOptions,
|
|
184
200
|
selectSizeOptions: () => selectSizeOptions,
|
|
185
|
-
sofyaBrandPalette: () =>
|
|
186
|
-
sofyaColorPalette: () =>
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
201
|
+
sofyaBrandPalette: () => import_tokens4.sofyaBrandPalette,
|
|
202
|
+
sofyaColorPalette: () => import_tokens4.sofyaColorPalette,
|
|
203
|
+
sofyaGapNames: () => import_tokens4.sofyaGapNames,
|
|
204
|
+
sofyaMeasureNames: () => import_tokens4.sofyaMeasureNames,
|
|
205
|
+
sofyaRhythmNames: () => import_tokens4.sofyaRhythmNames,
|
|
206
|
+
sofyaSemanticColorHex: () => import_tokens4.sofyaSemanticColorHex,
|
|
207
|
+
sofyaSpaceNames: () => import_tokens4.sofyaSpaceNames,
|
|
208
|
+
sofyaSurfaceNames: () => import_tokens4.sofyaSurfaceNames,
|
|
209
|
+
sofyaTextStyleNames: () => import_tokens4.sofyaTextStyleNames,
|
|
190
210
|
spinnerSizeOptions: () => spinnerSizeOptions,
|
|
211
|
+
surfaceVariantOptions: () => surfaceVariantOptions,
|
|
191
212
|
switchSizeOptions: () => switchSizeOptions,
|
|
192
213
|
tableActionToneOptions: () => tableActionToneOptions,
|
|
193
214
|
tableCellVariantOptions: () => tableCellVariantOptions,
|
|
@@ -195,9 +216,9 @@ __export(index_exports, {
|
|
|
195
216
|
textSizeOptions: () => textSizeOptions,
|
|
196
217
|
textSplitTypeOptions: () => textSplitTypeOptions,
|
|
197
218
|
textVariantOptions: () => textVariantOptions,
|
|
198
|
-
themePresetNames: () =>
|
|
199
|
-
themePresets: () =>
|
|
200
|
-
themeToCssVariables: () =>
|
|
219
|
+
themePresetNames: () => import_tokens4.themePresetNames,
|
|
220
|
+
themePresets: () => import_tokens4.themePresets,
|
|
221
|
+
themeToCssVariables: () => import_tokens4.themeToCssVariables,
|
|
201
222
|
toast: () => import_sonner.toast,
|
|
202
223
|
uploadKindOptions: () => uploadKindOptions
|
|
203
224
|
});
|
|
@@ -556,19 +577,47 @@ Icon.displayName = "Icon";
|
|
|
556
577
|
|
|
557
578
|
// src/components/text.tsx
|
|
558
579
|
var React3 = __toESM(require("react"), 1);
|
|
580
|
+
var import_tokens = require("@sofya-ds/tokens");
|
|
559
581
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
560
|
-
var textSizeOptions =
|
|
582
|
+
var textSizeOptions = import_tokens.sofyaTextStyleNames;
|
|
561
583
|
var textVariantOptions = ["default", "gradient", "shiny", "split"];
|
|
562
584
|
var textSplitTypeOptions = ["chars", "words", "words, chars"];
|
|
563
585
|
var defaultElements = {
|
|
586
|
+
"display-xl": "h1",
|
|
587
|
+
"display-lg": "h1",
|
|
588
|
+
"heading-xl": "h1",
|
|
589
|
+
"heading-lg": "h2",
|
|
590
|
+
"heading-md": "h3",
|
|
564
591
|
h1: "h1",
|
|
565
592
|
h2: "h2",
|
|
566
593
|
h3: "h3",
|
|
567
594
|
h4: "h4",
|
|
568
595
|
h5: "h5",
|
|
596
|
+
"encounter-title": "h1",
|
|
597
|
+
"title-md": "h3",
|
|
598
|
+
"title-sm": "h4",
|
|
599
|
+
"body-lg": "p",
|
|
600
|
+
"body-md": "p",
|
|
601
|
+
"body-sm": "p",
|
|
569
602
|
body: "p",
|
|
603
|
+
"label-md": "span",
|
|
604
|
+
"section-label": "span",
|
|
605
|
+
"eyebrow-md": "span",
|
|
606
|
+
"overline-md": "span",
|
|
607
|
+
"sidebar-title": "span",
|
|
608
|
+
"sidebar-title-regular": "span",
|
|
609
|
+
"sidebar-title-strong": "span",
|
|
610
|
+
"sidebar-label": "span",
|
|
611
|
+
"sidebar-label-strong": "span",
|
|
612
|
+
"sidebar-body": "span",
|
|
613
|
+
"sidebar-tag": "span",
|
|
614
|
+
"encounter-chip": "span",
|
|
615
|
+
"encounter-history": "span",
|
|
616
|
+
caption: "span",
|
|
617
|
+
eyebrow: "span",
|
|
570
618
|
tiny: "span",
|
|
571
|
-
"extra-tiny": "span"
|
|
619
|
+
"extra-tiny": "span",
|
|
620
|
+
"code-sm": "code"
|
|
572
621
|
};
|
|
573
622
|
var textSizeStyles = Object.fromEntries(
|
|
574
623
|
textSizeOptions.map((size) => [
|
|
@@ -1718,27 +1767,24 @@ Button.displayName = "Button";
|
|
|
1718
1767
|
// src/components/surface.tsx
|
|
1719
1768
|
var React9 = __toESM(require("react"), 1);
|
|
1720
1769
|
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
1770
|
+
var import_tokens2 = require("@sofya-ds/tokens");
|
|
1721
1771
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1722
|
-
var
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
focus: {
|
|
1733
|
-
backgroundColor: "hsl(var(--sofya-surface-focus-background))",
|
|
1734
|
-
borderColor: "hsl(var(--sofya-surface-focus-border-color))",
|
|
1735
|
-
borderWidth: "var(--sofya-surface-focus-border-width)",
|
|
1772
|
+
var surfaceVariantOptions = import_tokens2.sofyaSurfaceNames;
|
|
1773
|
+
function toCssTokenName(name) {
|
|
1774
|
+
return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1775
|
+
}
|
|
1776
|
+
function getSurfaceStyle(variant) {
|
|
1777
|
+
const cssName = toCssTokenName(variant);
|
|
1778
|
+
return {
|
|
1779
|
+
backgroundColor: `hsl(var(--sofya-surface-${cssName}-background))`,
|
|
1780
|
+
borderColor: `hsl(var(--sofya-surface-${cssName}-border-color))`,
|
|
1781
|
+
borderWidth: `var(--sofya-surface-${cssName}-border-width)`,
|
|
1736
1782
|
borderStyle: "solid",
|
|
1737
|
-
borderRadius:
|
|
1738
|
-
"--sofya-surface-shadow-base":
|
|
1783
|
+
borderRadius: `var(--sofya-surface-${cssName}-radius)`,
|
|
1784
|
+
"--sofya-surface-shadow-base": `var(--sofya-surface-${cssName}-shadow)`,
|
|
1739
1785
|
boxShadow: "var(--sofya-surface-shadow-override, var(--sofya-surface-shadow-base))"
|
|
1740
|
-
}
|
|
1741
|
-
}
|
|
1786
|
+
};
|
|
1787
|
+
}
|
|
1742
1788
|
function SurfaceComponent({ as, asChild = false, variant = "card", className, style, ...props }, ref) {
|
|
1743
1789
|
const Component = asChild ? import_react_slot2.Slot : as ?? "div";
|
|
1744
1790
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
@@ -1747,7 +1793,7 @@ function SurfaceComponent({ as, asChild = false, variant = "card", className, st
|
|
|
1747
1793
|
ref,
|
|
1748
1794
|
"data-surface-variant": variant,
|
|
1749
1795
|
className: cn("relative text-foreground", className),
|
|
1750
|
-
style: { ...
|
|
1796
|
+
style: { ...getSurfaceStyle(variant), ...style },
|
|
1751
1797
|
...props
|
|
1752
1798
|
}
|
|
1753
1799
|
);
|
|
@@ -1824,13 +1870,13 @@ var selectionControlLabelTextBaseClasses = "text-[color:var(--sofya-text-default
|
|
|
1824
1870
|
var selectionControlDescriptionTextBaseClasses = "text-muted-foreground";
|
|
1825
1871
|
var selectionControlControlBaseClasses = "border border-[color:var(--sofya-border-strong)] bg-card transition-[background-color,border-color,box-shadow,color] duration-sofya ease-sofya disabled:cursor-not-allowed disabled:opacity-50";
|
|
1826
1872
|
function selectionControlContainerClasses({
|
|
1827
|
-
alignClassName,
|
|
1873
|
+
alignClassName: alignClassName2,
|
|
1828
1874
|
className,
|
|
1829
1875
|
disabled
|
|
1830
1876
|
}) {
|
|
1831
1877
|
return cn(
|
|
1832
1878
|
selectionControlContainerBaseClasses,
|
|
1833
|
-
|
|
1879
|
+
alignClassName2,
|
|
1834
1880
|
disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
1835
1881
|
className
|
|
1836
1882
|
);
|
|
@@ -1854,13 +1900,13 @@ var Checkbox = React10.forwardRef(
|
|
|
1854
1900
|
const generatedId = React10.useId();
|
|
1855
1901
|
const resolvedId = id ?? generatedId;
|
|
1856
1902
|
const descriptionId = description ? `${resolvedId}-description` : void 0;
|
|
1857
|
-
const
|
|
1903
|
+
const alignClassName2 = description ? "items-start" : "items-center";
|
|
1858
1904
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1859
1905
|
"label",
|
|
1860
1906
|
{
|
|
1861
1907
|
htmlFor: resolvedId,
|
|
1862
1908
|
className: selectionControlContainerClasses({
|
|
1863
|
-
alignClassName,
|
|
1909
|
+
alignClassName: alignClassName2,
|
|
1864
1910
|
className,
|
|
1865
1911
|
disabled
|
|
1866
1912
|
}),
|
|
@@ -3580,13 +3626,16 @@ var DialogContent = React19.forwardRef(
|
|
|
3580
3626
|
className,
|
|
3581
3627
|
children,
|
|
3582
3628
|
cardClassName,
|
|
3629
|
+
cardStyle,
|
|
3583
3630
|
overlayClassName,
|
|
3584
3631
|
showCloseButton = true,
|
|
3632
|
+
surfaceShadow = "var(--sofya-shadow-lg)",
|
|
3585
3633
|
variant = "card",
|
|
3586
3634
|
...props
|
|
3587
3635
|
}, ref) => {
|
|
3588
3636
|
const dialogCardStyle = {
|
|
3589
|
-
"--sofya-surface-shadow-override":
|
|
3637
|
+
"--sofya-surface-shadow-override": surfaceShadow,
|
|
3638
|
+
...cardStyle
|
|
3590
3639
|
};
|
|
3591
3640
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DialogInternalContext.Provider, { value: { showCloseButton }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(DialogPortal, { children: [
|
|
3592
3641
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DialogOverlay, { className: overlayClassName }),
|
|
@@ -3692,10 +3741,73 @@ var DialogDescription = React19.forwardRef(({ children, className, ...props }, r
|
|
|
3692
3741
|
));
|
|
3693
3742
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
3694
3743
|
|
|
3695
|
-
// src/components/
|
|
3744
|
+
// src/components/document-card.tsx
|
|
3696
3745
|
var React20 = __toESM(require("react"), 1);
|
|
3697
|
-
var import_class_variance_authority5 = require("class-variance-authority");
|
|
3698
3746
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3747
|
+
var DocumentCard = React20.forwardRef(
|
|
3748
|
+
({
|
|
3749
|
+
actions,
|
|
3750
|
+
className,
|
|
3751
|
+
description,
|
|
3752
|
+
leading,
|
|
3753
|
+
meta,
|
|
3754
|
+
selected = false,
|
|
3755
|
+
title,
|
|
3756
|
+
...props
|
|
3757
|
+
}, ref) => {
|
|
3758
|
+
const gridTemplateClassName = cn(
|
|
3759
|
+
leading && actions && "grid-cols-[auto_minmax(0,1fr)_auto]",
|
|
3760
|
+
leading && !actions && "grid-cols-[auto_minmax(0,1fr)]",
|
|
3761
|
+
!leading && actions && "grid-cols-[minmax(0,1fr)_auto]",
|
|
3762
|
+
!leading && !actions && "grid-cols-[minmax(0,1fr)]"
|
|
3763
|
+
);
|
|
3764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3765
|
+
Surface,
|
|
3766
|
+
{
|
|
3767
|
+
ref,
|
|
3768
|
+
"aria-selected": selected,
|
|
3769
|
+
"data-slot": "document-card",
|
|
3770
|
+
"data-state": selected ? "selected" : "idle",
|
|
3771
|
+
variant: selected ? "documentCardSelected" : "documentCard",
|
|
3772
|
+
className: cn(
|
|
3773
|
+
"grid min-h-[var(--sofya-control-height-lg)] items-center gap-[var(--sofya-gap-default)] px-[var(--sofya-space-4)] py-[var(--sofya-space-3)]",
|
|
3774
|
+
gridTemplateClassName,
|
|
3775
|
+
className
|
|
3776
|
+
),
|
|
3777
|
+
...props,
|
|
3778
|
+
children: [
|
|
3779
|
+
leading ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3780
|
+
"span",
|
|
3781
|
+
{
|
|
3782
|
+
"data-slot": "document-card-leading",
|
|
3783
|
+
className: "flex size-[var(--sofya-icon-button-size-sm)] shrink-0 items-center justify-center text-primary",
|
|
3784
|
+
children: leading
|
|
3785
|
+
}
|
|
3786
|
+
) : null,
|
|
3787
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { "data-slot": "document-card-content", className: "min-w-0", children: [
|
|
3788
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { as: "span", size: "label-md", className: "block truncate text-foreground", children: title }),
|
|
3789
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { as: "span", size: "caption", className: "block truncate text-muted-foreground", children: description }) : null,
|
|
3790
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { as: "span", size: "caption", className: "block truncate text-muted-foreground", children: meta }) : null
|
|
3791
|
+
] }),
|
|
3792
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3793
|
+
"span",
|
|
3794
|
+
{
|
|
3795
|
+
"data-slot": "document-card-actions",
|
|
3796
|
+
className: "flex shrink-0 items-center gap-[var(--sofya-gap-compact)]",
|
|
3797
|
+
children: actions
|
|
3798
|
+
}
|
|
3799
|
+
) : null
|
|
3800
|
+
]
|
|
3801
|
+
}
|
|
3802
|
+
);
|
|
3803
|
+
}
|
|
3804
|
+
);
|
|
3805
|
+
DocumentCard.displayName = "DocumentCard";
|
|
3806
|
+
|
|
3807
|
+
// src/components/empty.tsx
|
|
3808
|
+
var React21 = __toESM(require("react"), 1);
|
|
3809
|
+
var import_class_variance_authority5 = require("class-variance-authority");
|
|
3810
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
3699
3811
|
var emptyMediaVariantOptions = ["default", "icon"];
|
|
3700
3812
|
var emptyMediaVariants = (0, import_class_variance_authority5.cva)(
|
|
3701
3813
|
"inline-flex shrink-0 items-center justify-center transition-[background-color,border-color,color,box-shadow] duration-sofya ease-sofya",
|
|
@@ -3711,11 +3823,11 @@ var emptyMediaVariants = (0, import_class_variance_authority5.cva)(
|
|
|
3711
3823
|
}
|
|
3712
3824
|
}
|
|
3713
3825
|
);
|
|
3714
|
-
var EmptyMedia =
|
|
3715
|
-
return /* @__PURE__ */ (0,
|
|
3826
|
+
var EmptyMedia = React21.forwardRef(function EmptyMedia2({ className, variant, ...props }, ref) {
|
|
3827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { ref, className: cn(emptyMediaVariants({ variant }), className), ...props });
|
|
3716
3828
|
});
|
|
3717
3829
|
function EmptyHeader({ className, ...props }) {
|
|
3718
|
-
return /* @__PURE__ */ (0,
|
|
3830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3719
3831
|
"div",
|
|
3720
3832
|
{
|
|
3721
3833
|
className: cn("flex max-w-[34rem] flex-col items-center gap-4 text-center", className),
|
|
@@ -3724,7 +3836,7 @@ function EmptyHeader({ className, ...props }) {
|
|
|
3724
3836
|
);
|
|
3725
3837
|
}
|
|
3726
3838
|
function EmptyTitle({ children, className, ...props }) {
|
|
3727
|
-
return /* @__PURE__ */ (0,
|
|
3839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3728
3840
|
"h2",
|
|
3729
3841
|
{
|
|
3730
3842
|
className: cn("text-foreground", className),
|
|
@@ -3742,7 +3854,7 @@ function EmptyDescription({
|
|
|
3742
3854
|
className,
|
|
3743
3855
|
...props
|
|
3744
3856
|
}) {
|
|
3745
|
-
return /* @__PURE__ */ (0,
|
|
3857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3746
3858
|
"p",
|
|
3747
3859
|
{
|
|
3748
3860
|
className: cn("max-w-full text-muted-foreground whitespace-nowrap", className),
|
|
@@ -3756,7 +3868,7 @@ function EmptyDescription({
|
|
|
3756
3868
|
);
|
|
3757
3869
|
}
|
|
3758
3870
|
function EmptyContent({ children, className, ...props }) {
|
|
3759
|
-
return /* @__PURE__ */ (0,
|
|
3871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3760
3872
|
"div",
|
|
3761
3873
|
{
|
|
3762
3874
|
className: cn("flex flex-wrap items-center justify-center gap-4 text-center", className),
|
|
@@ -3767,9 +3879,9 @@ function EmptyContent({ children, className, ...props }) {
|
|
|
3767
3879
|
}
|
|
3768
3880
|
);
|
|
3769
3881
|
}
|
|
3770
|
-
var Empty =
|
|
3771
|
-
const hasCustomChildren =
|
|
3772
|
-
return /* @__PURE__ */ (0,
|
|
3882
|
+
var Empty = React21.forwardRef(function Empty2({ children, className, content, description, media, title, ...props }, ref) {
|
|
3883
|
+
const hasCustomChildren = React21.Children.count(children) > 0;
|
|
3884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3773
3885
|
"div",
|
|
3774
3886
|
{
|
|
3775
3887
|
ref,
|
|
@@ -3778,13 +3890,13 @@ var Empty = React20.forwardRef(function Empty2({ children, className, content, d
|
|
|
3778
3890
|
className
|
|
3779
3891
|
),
|
|
3780
3892
|
...props,
|
|
3781
|
-
children: hasCustomChildren ? children : /* @__PURE__ */ (0,
|
|
3782
|
-
/* @__PURE__ */ (0,
|
|
3783
|
-
media ?? /* @__PURE__ */ (0,
|
|
3784
|
-
/* @__PURE__ */ (0,
|
|
3785
|
-
/* @__PURE__ */ (0,
|
|
3893
|
+
children: hasCustomChildren ? children : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
3894
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(EmptyHeader, { children: [
|
|
3895
|
+
media ?? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(EmptyMedia, { variant: "icon", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: "folders", size: 28 }) }),
|
|
3896
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(EmptyTitle, { children: title ?? "Nada por aqui" }),
|
|
3897
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(EmptyDescription, { children: description ?? "Quando houver conte\xFAdo dispon\xEDvel, ele aparecer\xE1 aqui." })
|
|
3786
3898
|
] }),
|
|
3787
|
-
content !== void 0 && content !== null ? /* @__PURE__ */ (0,
|
|
3899
|
+
content !== void 0 && content !== null ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(EmptyContent, { children: content }) : null
|
|
3788
3900
|
] })
|
|
3789
3901
|
}
|
|
3790
3902
|
);
|
|
@@ -3797,11 +3909,11 @@ EmptyDescription.displayName = "EmptyDescription";
|
|
|
3797
3909
|
EmptyContent.displayName = "EmptyContent";
|
|
3798
3910
|
|
|
3799
3911
|
// src/components/label.tsx
|
|
3800
|
-
var
|
|
3801
|
-
var
|
|
3802
|
-
var Label =
|
|
3912
|
+
var React22 = __toESM(require("react"), 1);
|
|
3913
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3914
|
+
var Label = React22.forwardRef(
|
|
3803
3915
|
({ children, className, ...props }, ref) => {
|
|
3804
|
-
return /* @__PURE__ */ (0,
|
|
3916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3805
3917
|
"label",
|
|
3806
3918
|
{
|
|
3807
3919
|
ref,
|
|
@@ -3824,11 +3936,109 @@ var Label = React21.forwardRef(
|
|
|
3824
3936
|
);
|
|
3825
3937
|
Label.displayName = "Label";
|
|
3826
3938
|
|
|
3939
|
+
// src/components/layout.tsx
|
|
3940
|
+
var React23 = __toESM(require("react"), 1);
|
|
3941
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3942
|
+
var alignClassName = {
|
|
3943
|
+
start: "items-start",
|
|
3944
|
+
center: "items-center",
|
|
3945
|
+
end: "items-end",
|
|
3946
|
+
stretch: "items-stretch"
|
|
3947
|
+
};
|
|
3948
|
+
var justifyClassName = {
|
|
3949
|
+
start: "justify-start",
|
|
3950
|
+
center: "justify-center",
|
|
3951
|
+
between: "justify-between",
|
|
3952
|
+
end: "justify-end"
|
|
3953
|
+
};
|
|
3954
|
+
function getGapStyle(gap) {
|
|
3955
|
+
return {
|
|
3956
|
+
"--sofya-layout-gap": `var(--sofya-gap-${gap})`
|
|
3957
|
+
};
|
|
3958
|
+
}
|
|
3959
|
+
var Stack = React23.forwardRef(
|
|
3960
|
+
({ className, gap = "default", style, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3961
|
+
"div",
|
|
3962
|
+
{
|
|
3963
|
+
ref,
|
|
3964
|
+
"data-slot": "stack",
|
|
3965
|
+
className: cn("flex min-w-0 flex-col gap-[var(--sofya-layout-gap)]", className),
|
|
3966
|
+
style: { ...getGapStyle(gap), ...style },
|
|
3967
|
+
...props
|
|
3968
|
+
}
|
|
3969
|
+
)
|
|
3970
|
+
);
|
|
3971
|
+
Stack.displayName = "Stack";
|
|
3972
|
+
var Cluster = React23.forwardRef(
|
|
3973
|
+
({
|
|
3974
|
+
align = "center",
|
|
3975
|
+
className,
|
|
3976
|
+
gap = "default",
|
|
3977
|
+
justify = "start",
|
|
3978
|
+
style,
|
|
3979
|
+
...props
|
|
3980
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3981
|
+
"div",
|
|
3982
|
+
{
|
|
3983
|
+
ref,
|
|
3984
|
+
"data-slot": "cluster",
|
|
3985
|
+
className: cn(
|
|
3986
|
+
"flex min-w-0 flex-wrap gap-[var(--sofya-layout-gap)]",
|
|
3987
|
+
alignClassName[align],
|
|
3988
|
+
justifyClassName[justify],
|
|
3989
|
+
className
|
|
3990
|
+
),
|
|
3991
|
+
style: { ...getGapStyle(gap), ...style },
|
|
3992
|
+
...props
|
|
3993
|
+
}
|
|
3994
|
+
)
|
|
3995
|
+
);
|
|
3996
|
+
Cluster.displayName = "Cluster";
|
|
3997
|
+
var Inline = React23.forwardRef(
|
|
3998
|
+
({ align = "center", className, gap = "compact", style, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3999
|
+
"div",
|
|
4000
|
+
{
|
|
4001
|
+
ref,
|
|
4002
|
+
"data-slot": "inline",
|
|
4003
|
+
className: cn(
|
|
4004
|
+
"inline-flex min-w-0 gap-[var(--sofya-layout-gap)]",
|
|
4005
|
+
alignClassName[align],
|
|
4006
|
+
className
|
|
4007
|
+
),
|
|
4008
|
+
style: { ...getGapStyle(gap), ...style },
|
|
4009
|
+
...props
|
|
4010
|
+
}
|
|
4011
|
+
)
|
|
4012
|
+
);
|
|
4013
|
+
Inline.displayName = "Inline";
|
|
4014
|
+
var Container = React23.forwardRef(
|
|
4015
|
+
({ className, measure = "reading", style, ...props }, ref) => {
|
|
4016
|
+
const measureStyle = measure === "none" ? void 0 : {
|
|
4017
|
+
"--sofya-layout-measure": `var(--sofya-measure-${measure})`
|
|
4018
|
+
};
|
|
4019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4020
|
+
"div",
|
|
4021
|
+
{
|
|
4022
|
+
ref,
|
|
4023
|
+
"data-slot": "container",
|
|
4024
|
+
className: cn(
|
|
4025
|
+
"mx-auto w-full min-w-0",
|
|
4026
|
+
measure !== "none" && "max-w-[var(--sofya-layout-measure)]",
|
|
4027
|
+
className
|
|
4028
|
+
),
|
|
4029
|
+
style: { ...measureStyle, ...style },
|
|
4030
|
+
...props
|
|
4031
|
+
}
|
|
4032
|
+
);
|
|
4033
|
+
}
|
|
4034
|
+
);
|
|
4035
|
+
Container.displayName = "Container";
|
|
4036
|
+
|
|
3827
4037
|
// src/components/link.tsx
|
|
3828
|
-
var
|
|
4038
|
+
var React24 = __toESM(require("react"), 1);
|
|
3829
4039
|
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
3830
4040
|
var import_class_variance_authority6 = require("class-variance-authority");
|
|
3831
|
-
var
|
|
4041
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3832
4042
|
var linkVariants = (0, import_class_variance_authority6.cva)(
|
|
3833
4043
|
"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",
|
|
3834
4044
|
{
|
|
@@ -3843,9 +4053,9 @@ var linkVariants = (0, import_class_variance_authority6.cva)(
|
|
|
3843
4053
|
}
|
|
3844
4054
|
}
|
|
3845
4055
|
);
|
|
3846
|
-
var Link =
|
|
4056
|
+
var Link = React24.forwardRef(function Link2({ asChild = false, children, className, variant = "default", ...props }, ref) {
|
|
3847
4057
|
const Component = asChild ? import_react_slot3.Slot : "a";
|
|
3848
|
-
return /* @__PURE__ */ (0,
|
|
4058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3849
4059
|
Component,
|
|
3850
4060
|
{
|
|
3851
4061
|
ref,
|
|
@@ -3863,7 +4073,7 @@ var Link = React22.forwardRef(function Link2({ asChild = false, children, classN
|
|
|
3863
4073
|
Link.displayName = "Link";
|
|
3864
4074
|
|
|
3865
4075
|
// src/components/logo.tsx
|
|
3866
|
-
var
|
|
4076
|
+
var React25 = __toESM(require("react"), 1);
|
|
3867
4077
|
|
|
3868
4078
|
// src/components/logo-data.ts
|
|
3869
4079
|
var logoAssets = {
|
|
@@ -3960,7 +4170,7 @@ var logoAssets = {
|
|
|
3960
4170
|
};
|
|
3961
4171
|
|
|
3962
4172
|
// src/components/logo.tsx
|
|
3963
|
-
var
|
|
4173
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3964
4174
|
var logoVariants = ["mono", "default", "text", "full"];
|
|
3965
4175
|
var logoSizeOptions = ["sm", "md", "lg", "xl", "2xl"];
|
|
3966
4176
|
var logoSizeScale = {
|
|
@@ -3996,7 +4206,7 @@ function resolveLogoDimensions(variant, size, width, height) {
|
|
|
3996
4206
|
height: resolvedHeight
|
|
3997
4207
|
};
|
|
3998
4208
|
}
|
|
3999
|
-
var Logo =
|
|
4209
|
+
var Logo = React25.forwardRef(function Logo2({
|
|
4000
4210
|
variant = "full",
|
|
4001
4211
|
size = "lg",
|
|
4002
4212
|
width,
|
|
@@ -4007,10 +4217,10 @@ var Logo = React23.forwardRef(function Logo2({
|
|
|
4007
4217
|
...props
|
|
4008
4218
|
}, ref) {
|
|
4009
4219
|
const asset = logoAssets[variant];
|
|
4010
|
-
const titleId =
|
|
4220
|
+
const titleId = React25.useId();
|
|
4011
4221
|
const dimensions = resolveLogoDimensions(variant, size, width, height);
|
|
4012
4222
|
const monoFill = variant === "mono" ? monoColor ?? "currentColor" : void 0;
|
|
4013
|
-
return /* @__PURE__ */ (0,
|
|
4223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4014
4224
|
"svg",
|
|
4015
4225
|
{
|
|
4016
4226
|
ref,
|
|
@@ -4025,8 +4235,8 @@ var Logo = React23.forwardRef(function Logo2({
|
|
|
4025
4235
|
focusable: "false",
|
|
4026
4236
|
...props,
|
|
4027
4237
|
children: [
|
|
4028
|
-
title ? /* @__PURE__ */ (0,
|
|
4029
|
-
asset.paths.map((path, index) => /* @__PURE__ */ (0,
|
|
4238
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("title", { id: titleId, children: title }) : null,
|
|
4239
|
+
asset.paths.map((path, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4030
4240
|
"path",
|
|
4031
4241
|
{
|
|
4032
4242
|
d: path.d,
|
|
@@ -4058,7 +4268,7 @@ var inheritedTypographyStyle = {
|
|
|
4058
4268
|
};
|
|
4059
4269
|
|
|
4060
4270
|
// src/components/pagination.tsx
|
|
4061
|
-
var
|
|
4271
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
4062
4272
|
var paginationLinkVariants = (0, import_class_variance_authority7.cva)(
|
|
4063
4273
|
"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",
|
|
4064
4274
|
{
|
|
@@ -4079,7 +4289,7 @@ var paginationLinkVariants = (0, import_class_variance_authority7.cva)(
|
|
|
4079
4289
|
}
|
|
4080
4290
|
);
|
|
4081
4291
|
function Pagination({ className, ...props }) {
|
|
4082
|
-
return /* @__PURE__ */ (0,
|
|
4292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4083
4293
|
"nav",
|
|
4084
4294
|
{
|
|
4085
4295
|
"aria-label": "Pagination",
|
|
@@ -4092,7 +4302,7 @@ function PaginationContent({
|
|
|
4092
4302
|
className,
|
|
4093
4303
|
...props
|
|
4094
4304
|
}) {
|
|
4095
|
-
return /* @__PURE__ */ (0,
|
|
4305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4096
4306
|
"ul",
|
|
4097
4307
|
{
|
|
4098
4308
|
className: cn(
|
|
@@ -4104,7 +4314,7 @@ function PaginationContent({
|
|
|
4104
4314
|
);
|
|
4105
4315
|
}
|
|
4106
4316
|
function PaginationItem({ className, ...props }) {
|
|
4107
|
-
return /* @__PURE__ */ (0,
|
|
4317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("li", { className: cn("list-none", className), ...props });
|
|
4108
4318
|
}
|
|
4109
4319
|
function PaginationLink({
|
|
4110
4320
|
asChild = false,
|
|
@@ -4114,7 +4324,7 @@ function PaginationLink({
|
|
|
4114
4324
|
...props
|
|
4115
4325
|
}) {
|
|
4116
4326
|
const Component = asChild ? import_react_slot4.Slot : "a";
|
|
4117
|
-
return /* @__PURE__ */ (0,
|
|
4327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4118
4328
|
Component,
|
|
4119
4329
|
{
|
|
4120
4330
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -4124,25 +4334,25 @@ function PaginationLink({
|
|
|
4124
4334
|
);
|
|
4125
4335
|
}
|
|
4126
4336
|
function PaginationChevronLeft() {
|
|
4127
|
-
return /* @__PURE__ */ (0,
|
|
4337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_icons_react6.IconChevronLeft, { "aria-hidden": "true", className: "h-4 w-4", stroke: 1.75 });
|
|
4128
4338
|
}
|
|
4129
4339
|
function PaginationChevronRight() {
|
|
4130
|
-
return /* @__PURE__ */ (0,
|
|
4340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_icons_react6.IconChevronRight, { "aria-hidden": "true", className: "h-4 w-4", stroke: 1.75 });
|
|
4131
4341
|
}
|
|
4132
4342
|
function PaginationPrevious({
|
|
4133
4343
|
className,
|
|
4134
4344
|
text = "Previous",
|
|
4135
4345
|
...props
|
|
4136
4346
|
}) {
|
|
4137
|
-
return /* @__PURE__ */ (0,
|
|
4347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
4138
4348
|
PaginationLink,
|
|
4139
4349
|
{
|
|
4140
4350
|
"aria-label": "Go to previous page",
|
|
4141
4351
|
className: cn("gap-2 px-4", className),
|
|
4142
4352
|
...props,
|
|
4143
4353
|
children: [
|
|
4144
|
-
/* @__PURE__ */ (0,
|
|
4145
|
-
/* @__PURE__ */ (0,
|
|
4354
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PaginationChevronLeft, {}),
|
|
4355
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "hidden sm:block", children: renderTextContent(text, {
|
|
4146
4356
|
as: "span",
|
|
4147
4357
|
className: "block text-inherit",
|
|
4148
4358
|
size: "body",
|
|
@@ -4157,20 +4367,20 @@ function PaginationNext({
|
|
|
4157
4367
|
text = "Next",
|
|
4158
4368
|
...props
|
|
4159
4369
|
}) {
|
|
4160
|
-
return /* @__PURE__ */ (0,
|
|
4370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
4161
4371
|
PaginationLink,
|
|
4162
4372
|
{
|
|
4163
4373
|
"aria-label": "Go to next page",
|
|
4164
4374
|
className: cn("gap-2 px-4", className),
|
|
4165
4375
|
...props,
|
|
4166
4376
|
children: [
|
|
4167
|
-
/* @__PURE__ */ (0,
|
|
4377
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "hidden sm:block", children: renderTextContent(text, {
|
|
4168
4378
|
as: "span",
|
|
4169
4379
|
className: "block text-inherit",
|
|
4170
4380
|
size: "body",
|
|
4171
4381
|
style: inheritedTypographyStyle
|
|
4172
4382
|
}) }),
|
|
4173
|
-
/* @__PURE__ */ (0,
|
|
4383
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PaginationChevronRight, {})
|
|
4174
4384
|
]
|
|
4175
4385
|
}
|
|
4176
4386
|
);
|
|
@@ -4179,7 +4389,7 @@ function PaginationEllipsis({
|
|
|
4179
4389
|
className,
|
|
4180
4390
|
...props
|
|
4181
4391
|
}) {
|
|
4182
|
-
return /* @__PURE__ */ (0,
|
|
4392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
4183
4393
|
"span",
|
|
4184
4394
|
{
|
|
4185
4395
|
"aria-hidden": "true",
|
|
@@ -4189,22 +4399,90 @@ function PaginationEllipsis({
|
|
|
4189
4399
|
),
|
|
4190
4400
|
...props,
|
|
4191
4401
|
children: [
|
|
4192
|
-
/* @__PURE__ */ (0,
|
|
4402
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: renderTextContent("...", {
|
|
4193
4403
|
as: "span",
|
|
4194
4404
|
className: "block text-inherit",
|
|
4195
4405
|
size: "h5",
|
|
4196
4406
|
style: inheritedTypographyStyle
|
|
4197
4407
|
}) }),
|
|
4198
|
-
/* @__PURE__ */ (0,
|
|
4408
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
4199
4409
|
]
|
|
4200
4410
|
}
|
|
4201
4411
|
);
|
|
4202
4412
|
}
|
|
4203
4413
|
|
|
4414
|
+
// src/components/prose-dialog.tsx
|
|
4415
|
+
var React26 = __toESM(require("react"), 1);
|
|
4416
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
4417
|
+
var proseDialogMaxWidth = "min(var(--sofya-layout-prose-dialog-width), calc(100vw - var(--sofya-space-8)))";
|
|
4418
|
+
var ProseDialogContent = React26.forwardRef(
|
|
4419
|
+
({
|
|
4420
|
+
cardClassName,
|
|
4421
|
+
cardStyle: incomingCardStyle,
|
|
4422
|
+
className,
|
|
4423
|
+
style,
|
|
4424
|
+
surfaceShadow = "none",
|
|
4425
|
+
variant = "proseDialog",
|
|
4426
|
+
...props
|
|
4427
|
+
}, ref) => {
|
|
4428
|
+
const dialogStyle = {
|
|
4429
|
+
...style,
|
|
4430
|
+
maxWidth: proseDialogMaxWidth
|
|
4431
|
+
};
|
|
4432
|
+
const cardStyle = {
|
|
4433
|
+
...incomingCardStyle,
|
|
4434
|
+
maxWidth: proseDialogMaxWidth
|
|
4435
|
+
};
|
|
4436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4437
|
+
DialogContent,
|
|
4438
|
+
{
|
|
4439
|
+
ref,
|
|
4440
|
+
className,
|
|
4441
|
+
cardClassName: [
|
|
4442
|
+
"gap-[var(--sofya-rhythm-section-content)] p-[var(--sofya-space-6)] sm:p-[var(--sofya-space-12)]",
|
|
4443
|
+
cardClassName
|
|
4444
|
+
].filter(Boolean).join(" "),
|
|
4445
|
+
cardStyle,
|
|
4446
|
+
"data-slot": "prose-dialog-content",
|
|
4447
|
+
style: dialogStyle,
|
|
4448
|
+
surfaceShadow,
|
|
4449
|
+
variant,
|
|
4450
|
+
...props
|
|
4451
|
+
}
|
|
4452
|
+
);
|
|
4453
|
+
}
|
|
4454
|
+
);
|
|
4455
|
+
ProseDialogContent.displayName = "ProseDialogContent";
|
|
4456
|
+
function ProseDialogHeader(props) {
|
|
4457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DialogHeader, { "data-slot": "prose-dialog-header", ...props });
|
|
4458
|
+
}
|
|
4459
|
+
ProseDialogHeader.displayName = "ProseDialogHeader";
|
|
4460
|
+
var ProseDialogTitle = React26.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DialogTitle, { ref, "data-slot": "prose-dialog-title", ...props }));
|
|
4461
|
+
ProseDialogTitle.displayName = "ProseDialogTitle";
|
|
4462
|
+
var ProseDialogDescription = React26.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DialogDescription, { ref, "data-slot": "prose-dialog-description", ...props }));
|
|
4463
|
+
ProseDialogDescription.displayName = "ProseDialogDescription";
|
|
4464
|
+
var ProseDialogBody = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4465
|
+
"div",
|
|
4466
|
+
{
|
|
4467
|
+
ref,
|
|
4468
|
+
"data-slot": "prose-dialog-body",
|
|
4469
|
+
className: [
|
|
4470
|
+
"flex flex-col",
|
|
4471
|
+
"max-w-[var(--sofya-measure-wide)] gap-[var(--sofya-rhythm-paragraph-flow)]",
|
|
4472
|
+
"[&_p]:m-0 [&_p]:text-[length:var(--sofya-text-body-md-font-size)]",
|
|
4473
|
+
"[&_p]:font-[var(--sofya-text-body-md-font-weight)] [&_p]:leading-[var(--sofya-text-body-md-line-height)]",
|
|
4474
|
+
"[&_section]:flex [&_section]:flex-col [&_section]:gap-[var(--sofya-rhythm-title-to-body)]",
|
|
4475
|
+
className
|
|
4476
|
+
].filter(Boolean).join(" "),
|
|
4477
|
+
...props
|
|
4478
|
+
}
|
|
4479
|
+
));
|
|
4480
|
+
ProseDialogBody.displayName = "ProseDialogBody";
|
|
4481
|
+
|
|
4204
4482
|
// src/components/progress.tsx
|
|
4205
|
-
var
|
|
4483
|
+
var React27 = __toESM(require("react"), 1);
|
|
4206
4484
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
|
|
4207
|
-
var
|
|
4485
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
4208
4486
|
var progressSizeOptions = ["sm", "default", "lg"];
|
|
4209
4487
|
function clampProgressValue(value, max) {
|
|
4210
4488
|
if (Number.isNaN(value)) {
|
|
@@ -4212,7 +4490,7 @@ function clampProgressValue(value, max) {
|
|
|
4212
4490
|
}
|
|
4213
4491
|
return Math.min(Math.max(value, 0), max);
|
|
4214
4492
|
}
|
|
4215
|
-
var Progress =
|
|
4493
|
+
var Progress = React27.forwardRef(function Progress2({
|
|
4216
4494
|
className,
|
|
4217
4495
|
indicatorClassName,
|
|
4218
4496
|
max = 100,
|
|
@@ -4223,7 +4501,7 @@ var Progress = React24.forwardRef(function Progress2({
|
|
|
4223
4501
|
const safeMax = max > 0 ? max : 100;
|
|
4224
4502
|
const resolvedValue = typeof value === "number" ? clampProgressValue(value, safeMax) : null;
|
|
4225
4503
|
const progressScale = resolvedValue === null ? void 0 : Number((resolvedValue / safeMax).toFixed(4));
|
|
4226
|
-
return /* @__PURE__ */ (0,
|
|
4504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4227
4505
|
ProgressPrimitive.Root,
|
|
4228
4506
|
{
|
|
4229
4507
|
ref,
|
|
@@ -4236,7 +4514,7 @@ var Progress = React24.forwardRef(function Progress2({
|
|
|
4236
4514
|
className
|
|
4237
4515
|
),
|
|
4238
4516
|
...props,
|
|
4239
|
-
children: /* @__PURE__ */ (0,
|
|
4517
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4240
4518
|
ProgressPrimitive.Indicator,
|
|
4241
4519
|
{
|
|
4242
4520
|
"data-slot": "progress-indicator",
|
|
@@ -4253,16 +4531,19 @@ var Progress = React24.forwardRef(function Progress2({
|
|
|
4253
4531
|
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
4254
4532
|
|
|
4255
4533
|
// src/components/radio-group.tsx
|
|
4256
|
-
var
|
|
4534
|
+
var React28 = __toESM(require("react"), 1);
|
|
4257
4535
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
4258
|
-
var
|
|
4536
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4259
4537
|
var radioGroupOrientationOptions = ["horizontal", "vertical"];
|
|
4260
|
-
var radioGroupVariantOptions = ["default", "pill"];
|
|
4261
|
-
var RadioGroupContext =
|
|
4538
|
+
var radioGroupVariantOptions = ["default", "pill", "option"];
|
|
4539
|
+
var RadioGroupContext = React28.createContext({
|
|
4262
4540
|
variant: "default"
|
|
4263
4541
|
});
|
|
4264
|
-
var
|
|
4265
|
-
|
|
4542
|
+
var RadioGroupOptionContext = React28.createContext(
|
|
4543
|
+
{}
|
|
4544
|
+
);
|
|
4545
|
+
var RadioGroupRoot = React28.forwardRef(function RadioGroup2({ className, variant = "default", ...props }, ref) {
|
|
4546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(RadioGroupContext.Provider, { value: { variant }, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4266
4547
|
RadioGroupPrimitive.Root,
|
|
4267
4548
|
{
|
|
4268
4549
|
ref,
|
|
@@ -4277,8 +4558,8 @@ var RadioGroup2 = React25.forwardRef(function RadioGroup3({ className, variant =
|
|
|
4277
4558
|
}
|
|
4278
4559
|
) });
|
|
4279
4560
|
});
|
|
4280
|
-
|
|
4281
|
-
var RadioGroupItem =
|
|
4561
|
+
RadioGroupRoot.displayName = RadioGroupPrimitive.Root.displayName;
|
|
4562
|
+
var RadioGroupItem = React28.forwardRef(function RadioGroupItem2({
|
|
4282
4563
|
className,
|
|
4283
4564
|
controlClassName,
|
|
4284
4565
|
description,
|
|
@@ -4290,14 +4571,14 @@ var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
|
4290
4571
|
labelClassName,
|
|
4291
4572
|
...props
|
|
4292
4573
|
}, ref) {
|
|
4293
|
-
const { variant } =
|
|
4294
|
-
const generatedId =
|
|
4574
|
+
const { variant } = React28.useContext(RadioGroupContext);
|
|
4575
|
+
const generatedId = React28.useId();
|
|
4295
4576
|
const resolvedId = id ?? generatedId;
|
|
4296
4577
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
4297
4578
|
const descriptionId = description ? `${resolvedId}-description` : void 0;
|
|
4298
|
-
const
|
|
4579
|
+
const alignClassName2 = description ? "items-start" : "items-center";
|
|
4299
4580
|
if (variant === "pill") {
|
|
4300
|
-
return /* @__PURE__ */ (0,
|
|
4581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4301
4582
|
RadioGroupPrimitive.Item,
|
|
4302
4583
|
{
|
|
4303
4584
|
ref,
|
|
@@ -4312,8 +4593,8 @@ var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
|
4312
4593
|
className
|
|
4313
4594
|
),
|
|
4314
4595
|
...props,
|
|
4315
|
-
children: label || description ? /* @__PURE__ */ (0,
|
|
4316
|
-
label ? /* @__PURE__ */ (0,
|
|
4596
|
+
children: label || description ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "grid justify-items-center gap-1 text-center", children: [
|
|
4597
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4317
4598
|
"span",
|
|
4318
4599
|
{
|
|
4319
4600
|
id: labelId,
|
|
@@ -4328,7 +4609,7 @@ var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
|
4328
4609
|
})
|
|
4329
4610
|
}
|
|
4330
4611
|
) : null,
|
|
4331
|
-
description ? /* @__PURE__ */ (0,
|
|
4612
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4332
4613
|
"span",
|
|
4333
4614
|
{
|
|
4334
4615
|
id: descriptionId,
|
|
@@ -4347,16 +4628,16 @@ var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
|
4347
4628
|
}
|
|
4348
4629
|
);
|
|
4349
4630
|
}
|
|
4350
|
-
return /* @__PURE__ */ (0,
|
|
4631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
4351
4632
|
"label",
|
|
4352
4633
|
{
|
|
4353
4634
|
className: selectionControlContainerClasses({
|
|
4354
|
-
alignClassName,
|
|
4635
|
+
alignClassName: alignClassName2,
|
|
4355
4636
|
className,
|
|
4356
4637
|
disabled
|
|
4357
4638
|
}),
|
|
4358
4639
|
children: [
|
|
4359
|
-
/* @__PURE__ */ (0,
|
|
4640
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4360
4641
|
RadioGroupPrimitive.Item,
|
|
4361
4642
|
{
|
|
4362
4643
|
ref,
|
|
@@ -4372,7 +4653,7 @@ var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
|
4372
4653
|
controlClassName
|
|
4373
4654
|
),
|
|
4374
4655
|
...props,
|
|
4375
|
-
children: /* @__PURE__ */ (0,
|
|
4656
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(RadioGroupPrimitive.Indicator, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4376
4657
|
"span",
|
|
4377
4658
|
{
|
|
4378
4659
|
"data-slot": "radio-group-indicator",
|
|
@@ -4384,8 +4665,8 @@ var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
|
4384
4665
|
) })
|
|
4385
4666
|
}
|
|
4386
4667
|
),
|
|
4387
|
-
label || description ? /* @__PURE__ */ (0,
|
|
4388
|
-
label ? /* @__PURE__ */ (0,
|
|
4668
|
+
label || description ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: selectionControlContentBaseClasses, children: [
|
|
4669
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4389
4670
|
"span",
|
|
4390
4671
|
{
|
|
4391
4672
|
id: labelId,
|
|
@@ -4400,7 +4681,7 @@ var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
|
4400
4681
|
})
|
|
4401
4682
|
}
|
|
4402
4683
|
) : null,
|
|
4403
|
-
description ? /* @__PURE__ */ (0,
|
|
4684
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4404
4685
|
"span",
|
|
4405
4686
|
{
|
|
4406
4687
|
id: descriptionId,
|
|
@@ -4421,14 +4702,216 @@ var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
|
4421
4702
|
);
|
|
4422
4703
|
});
|
|
4423
4704
|
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
4705
|
+
var RadioGroupOptionAvatar = React28.forwardRef(function RadioGroupOptionAvatar2({
|
|
4706
|
+
alt,
|
|
4707
|
+
avatarClassName,
|
|
4708
|
+
avatarProps,
|
|
4709
|
+
children,
|
|
4710
|
+
className,
|
|
4711
|
+
name,
|
|
4712
|
+
src,
|
|
4713
|
+
...props
|
|
4714
|
+
}, ref) {
|
|
4715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4716
|
+
"span",
|
|
4717
|
+
{
|
|
4718
|
+
ref,
|
|
4719
|
+
"data-slot": "radio-group-option-avatar",
|
|
4720
|
+
className: cn(
|
|
4721
|
+
"flex h-[38px] w-[38px] shrink-0 items-center justify-center rounded-full bg-card",
|
|
4722
|
+
className
|
|
4723
|
+
),
|
|
4724
|
+
...props,
|
|
4725
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4726
|
+
Avatar,
|
|
4727
|
+
{
|
|
4728
|
+
...avatarProps,
|
|
4729
|
+
alt,
|
|
4730
|
+
name: name ?? "",
|
|
4731
|
+
src,
|
|
4732
|
+
className: cn(
|
|
4733
|
+
"h-[38px] w-[38px] border border-transparent bg-card text-[13px] font-medium leading-[22px] text-[color:var(--sofya-text-default)] transition-[border-color,background-color] duration-sofya ease-sofya group-hover/radio-option:border-[color:hsl(var(--sofya-background)/0.8)] group-data-[state=checked]/radio-option:border-[color:hsl(var(--sofya-background)/0.8)]",
|
|
4734
|
+
avatarClassName
|
|
4735
|
+
)
|
|
4736
|
+
}
|
|
4737
|
+
)
|
|
4738
|
+
}
|
|
4739
|
+
);
|
|
4740
|
+
});
|
|
4741
|
+
RadioGroupOptionAvatar.displayName = "RadioGroupOptionAvatar";
|
|
4742
|
+
var RadioGroupOptionLabel = React28.forwardRef(function RadioGroupOptionLabel2({ children, className, ...props }, ref) {
|
|
4743
|
+
const { labelId } = React28.useContext(RadioGroupOptionContext);
|
|
4744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4745
|
+
"span",
|
|
4746
|
+
{
|
|
4747
|
+
ref,
|
|
4748
|
+
id: labelId,
|
|
4749
|
+
"data-slot": "radio-group-option-label",
|
|
4750
|
+
className: cn(
|
|
4751
|
+
"min-w-0 text-[16px] font-semibold leading-[22px] text-[color:var(--sofya-text-default)]",
|
|
4752
|
+
className
|
|
4753
|
+
),
|
|
4754
|
+
...props,
|
|
4755
|
+
children: renderTextContent(children, {
|
|
4756
|
+
as: "span",
|
|
4757
|
+
className: "block truncate text-[inherit] font-semibold",
|
|
4758
|
+
weight: 600
|
|
4759
|
+
})
|
|
4760
|
+
}
|
|
4761
|
+
);
|
|
4762
|
+
});
|
|
4763
|
+
RadioGroupOptionLabel.displayName = "RadioGroupOptionLabel";
|
|
4764
|
+
var RadioGroupOptionDescription = React28.forwardRef(function RadioGroupOptionDescription2({ children, className, ...props }, ref) {
|
|
4765
|
+
const { descriptionId } = React28.useContext(RadioGroupOptionContext);
|
|
4766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4767
|
+
"span",
|
|
4768
|
+
{
|
|
4769
|
+
ref,
|
|
4770
|
+
id: descriptionId,
|
|
4771
|
+
"data-slot": "radio-group-option-description",
|
|
4772
|
+
className: cn(
|
|
4773
|
+
"min-w-0 text-[12px] leading-[18px] text-muted-foreground",
|
|
4774
|
+
className
|
|
4775
|
+
),
|
|
4776
|
+
...props,
|
|
4777
|
+
children: renderTextContent(children, {
|
|
4778
|
+
as: "span",
|
|
4779
|
+
className: "block truncate text-[inherit]"
|
|
4780
|
+
})
|
|
4781
|
+
}
|
|
4782
|
+
);
|
|
4783
|
+
});
|
|
4784
|
+
RadioGroupOptionDescription.displayName = "RadioGroupOptionDescription";
|
|
4785
|
+
var RadioGroupOptionIndicator = React28.forwardRef(function RadioGroupOptionIndicator2({ children, className, ...props }, ref) {
|
|
4786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4787
|
+
"span",
|
|
4788
|
+
{
|
|
4789
|
+
ref,
|
|
4790
|
+
"data-slot": "radio-group-option-indicator",
|
|
4791
|
+
className: cn(
|
|
4792
|
+
"ml-auto inline-flex shrink-0 items-center justify-end text-[color:var(--sofya-text-default)]",
|
|
4793
|
+
className
|
|
4794
|
+
),
|
|
4795
|
+
...props,
|
|
4796
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4797
|
+
"svg",
|
|
4798
|
+
{
|
|
4799
|
+
"aria-hidden": "true",
|
|
4800
|
+
viewBox: "0 0 24 24",
|
|
4801
|
+
className: "h-6 w-6 opacity-0 transition-opacity duration-sofya ease-sofya group-data-[state=checked]/radio-option:opacity-100",
|
|
4802
|
+
fill: "none",
|
|
4803
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4804
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4805
|
+
"path",
|
|
4806
|
+
{
|
|
4807
|
+
d: "M9.55 17.6537L4.2155 12.3192L5.2845 11.25L9.55 15.5155L18.7155 6.35L19.7845 7.41925L9.55 17.6537Z",
|
|
4808
|
+
fill: "var(--sofya-radio-option-indicator)"
|
|
4809
|
+
}
|
|
4810
|
+
)
|
|
4811
|
+
}
|
|
4812
|
+
)
|
|
4813
|
+
}
|
|
4814
|
+
);
|
|
4815
|
+
});
|
|
4816
|
+
RadioGroupOptionIndicator.displayName = "RadioGroupOptionIndicator";
|
|
4817
|
+
function isOptionChild(child, component) {
|
|
4818
|
+
return React28.isValidElement(child) && child.type === component;
|
|
4819
|
+
}
|
|
4820
|
+
var RadioGroupOption = React28.forwardRef(function RadioGroupOption2({ children, className, disabled, id, ...props }, ref) {
|
|
4821
|
+
const generatedId = React28.useId();
|
|
4822
|
+
const resolvedId = id ?? generatedId;
|
|
4823
|
+
const labelId = `${resolvedId}-label`;
|
|
4824
|
+
const descriptionId = `${resolvedId}-description`;
|
|
4825
|
+
const childArray = React28.Children.toArray(children);
|
|
4826
|
+
const leadingChildren = [];
|
|
4827
|
+
const contentChildren = [];
|
|
4828
|
+
let indicatorChild = null;
|
|
4829
|
+
for (const child of childArray) {
|
|
4830
|
+
if (isOptionChild(child, RadioGroupOptionAvatar)) {
|
|
4831
|
+
leadingChildren.push(child);
|
|
4832
|
+
continue;
|
|
4833
|
+
}
|
|
4834
|
+
if (isOptionChild(child, RadioGroupOptionIndicator)) {
|
|
4835
|
+
indicatorChild = child;
|
|
4836
|
+
continue;
|
|
4837
|
+
}
|
|
4838
|
+
contentChildren.push(child);
|
|
4839
|
+
}
|
|
4840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(RadioGroupOptionContext.Provider, { value: { descriptionId, labelId }, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
4841
|
+
RadioGroupPrimitive.Item,
|
|
4842
|
+
{
|
|
4843
|
+
ref,
|
|
4844
|
+
id: resolvedId,
|
|
4845
|
+
disabled,
|
|
4846
|
+
"aria-describedby": contentChildren.some(
|
|
4847
|
+
(child) => isOptionChild(child, RadioGroupOptionDescription)
|
|
4848
|
+
) ? descriptionId : void 0,
|
|
4849
|
+
"aria-labelledby": contentChildren.some(
|
|
4850
|
+
(child) => isOptionChild(child, RadioGroupOptionLabel)
|
|
4851
|
+
) ? labelId : void 0,
|
|
4852
|
+
"data-slot": "radio-group-option",
|
|
4853
|
+
className: cn(
|
|
4854
|
+
"group/radio-option flex min-h-[50px] w-full items-center gap-4 rounded-full border border-transparent bg-card pl-2 pr-5 text-left outline-none transition-[background-color,border-color,box-shadow,color,opacity] duration-sofya ease-sofya hover:bg-[color:var(--sofya-surface-selected)] focus-visible:ring-2 focus-visible:ring-[color:var(--sofya-focus-ring-soft)] focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-[color:var(--sofya-surface-selected)] data-[state=checked]:hover:bg-[color:var(--sofya-surface-selected)]",
|
|
4855
|
+
className
|
|
4856
|
+
),
|
|
4857
|
+
...props,
|
|
4858
|
+
children: [
|
|
4859
|
+
leadingChildren,
|
|
4860
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4861
|
+
"span",
|
|
4862
|
+
{
|
|
4863
|
+
"data-slot": "radio-group-option-content",
|
|
4864
|
+
className: "flex min-w-0 flex-1 flex-col justify-center gap-0.5",
|
|
4865
|
+
children: contentChildren
|
|
4866
|
+
}
|
|
4867
|
+
),
|
|
4868
|
+
indicatorChild ?? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(RadioGroupOptionIndicator, {})
|
|
4869
|
+
]
|
|
4870
|
+
}
|
|
4871
|
+
) });
|
|
4872
|
+
});
|
|
4873
|
+
RadioGroupOption.displayName = "RadioGroupOption";
|
|
4874
|
+
var RadioGroup3 = Object.assign(RadioGroupRoot, {
|
|
4875
|
+
Root: RadioGroupRoot,
|
|
4876
|
+
Item: RadioGroupItem,
|
|
4877
|
+
Option: RadioGroupOption,
|
|
4878
|
+
OptionAvatar: RadioGroupOptionAvatar,
|
|
4879
|
+
OptionDescription: RadioGroupOptionDescription,
|
|
4880
|
+
OptionIndicator: RadioGroupOptionIndicator,
|
|
4881
|
+
OptionLabel: RadioGroupOptionLabel
|
|
4882
|
+
});
|
|
4883
|
+
|
|
4884
|
+
// src/components/right-rail-action.tsx
|
|
4885
|
+
var React29 = __toESM(require("react"), 1);
|
|
4886
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
4887
|
+
var RightRailAction = React29.forwardRef(
|
|
4888
|
+
({ active = false, className, icon, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4889
|
+
Button,
|
|
4890
|
+
{
|
|
4891
|
+
ref,
|
|
4892
|
+
active,
|
|
4893
|
+
"data-slot": "right-rail-action",
|
|
4894
|
+
leftIcon: icon,
|
|
4895
|
+
size: "icon",
|
|
4896
|
+
variant: "icon",
|
|
4897
|
+
className: cn(
|
|
4898
|
+
"size-[var(--sofya-icon-button-size-md)] rounded-[var(--sofya-radius-md)] shadow-none",
|
|
4899
|
+
active && "bg-[color:var(--sofya-surface-selected)]",
|
|
4900
|
+
className
|
|
4901
|
+
),
|
|
4902
|
+
...props
|
|
4903
|
+
}
|
|
4904
|
+
)
|
|
4905
|
+
);
|
|
4906
|
+
RightRailAction.displayName = "RightRailAction";
|
|
4424
4907
|
|
|
4425
4908
|
// src/components/scroll-area.tsx
|
|
4426
|
-
var
|
|
4909
|
+
var React30 = __toESM(require("react"), 1);
|
|
4427
4910
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
4428
|
-
var
|
|
4911
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4429
4912
|
var scrollAreaOrientationOptions = ["horizontal", "vertical"];
|
|
4430
|
-
var ScrollArea =
|
|
4431
|
-
return /* @__PURE__ */ (0,
|
|
4913
|
+
var ScrollArea = React30.forwardRef(function ScrollArea2({ className, ...props }, ref) {
|
|
4914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4432
4915
|
ScrollAreaPrimitive.Root,
|
|
4433
4916
|
{
|
|
4434
4917
|
ref,
|
|
@@ -4439,8 +4922,8 @@ var ScrollArea = React26.forwardRef(function ScrollArea2({ className, ...props }
|
|
|
4439
4922
|
);
|
|
4440
4923
|
});
|
|
4441
4924
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
4442
|
-
var ScrollAreaViewport =
|
|
4443
|
-
return /* @__PURE__ */ (0,
|
|
4925
|
+
var ScrollAreaViewport = React30.forwardRef(function ScrollAreaViewport2({ className, ...props }, ref) {
|
|
4926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4444
4927
|
ScrollAreaPrimitive.Viewport,
|
|
4445
4928
|
{
|
|
4446
4929
|
ref,
|
|
@@ -4454,8 +4937,8 @@ var ScrollAreaViewport = React26.forwardRef(function ScrollAreaViewport2({ class
|
|
|
4454
4937
|
);
|
|
4455
4938
|
});
|
|
4456
4939
|
ScrollAreaViewport.displayName = ScrollAreaPrimitive.Viewport.displayName;
|
|
4457
|
-
var ScrollAreaScrollbar =
|
|
4458
|
-
return /* @__PURE__ */ (0,
|
|
4940
|
+
var ScrollAreaScrollbar = React30.forwardRef(function ScrollAreaScrollbar2({ className, orientation = "vertical", thumbClassName, ...props }, ref) {
|
|
4941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4459
4942
|
ScrollAreaPrimitive.Scrollbar,
|
|
4460
4943
|
{
|
|
4461
4944
|
ref,
|
|
@@ -4466,7 +4949,7 @@ var ScrollAreaScrollbar = React26.forwardRef(function ScrollAreaScrollbar2({ cla
|
|
|
4466
4949
|
className
|
|
4467
4950
|
),
|
|
4468
4951
|
...props,
|
|
4469
|
-
children: /* @__PURE__ */ (0,
|
|
4952
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4470
4953
|
ScrollAreaPrimitive.Thumb,
|
|
4471
4954
|
{
|
|
4472
4955
|
"data-slot": "scroll-area-thumb",
|
|
@@ -4480,8 +4963,8 @@ var ScrollAreaScrollbar = React26.forwardRef(function ScrollAreaScrollbar2({ cla
|
|
|
4480
4963
|
);
|
|
4481
4964
|
});
|
|
4482
4965
|
ScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;
|
|
4483
|
-
var ScrollAreaCorner =
|
|
4484
|
-
return /* @__PURE__ */ (0,
|
|
4966
|
+
var ScrollAreaCorner = React30.forwardRef(function ScrollAreaCorner2({ className, ...props }, ref) {
|
|
4967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4485
4968
|
ScrollAreaPrimitive.Corner,
|
|
4486
4969
|
{
|
|
4487
4970
|
ref,
|
|
@@ -4494,19 +4977,19 @@ var ScrollAreaCorner = React26.forwardRef(function ScrollAreaCorner2({ className
|
|
|
4494
4977
|
ScrollAreaCorner.displayName = ScrollAreaPrimitive.Corner.displayName;
|
|
4495
4978
|
|
|
4496
4979
|
// src/components/select.tsx
|
|
4497
|
-
var
|
|
4980
|
+
var React31 = __toESM(require("react"), 1);
|
|
4498
4981
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
4499
4982
|
|
|
4500
4983
|
// src/lib/form-control-classes.ts
|
|
4501
4984
|
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)]";
|
|
4502
4985
|
|
|
4503
4986
|
// src/components/select.tsx
|
|
4504
|
-
var
|
|
4987
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
4505
4988
|
var selectSizeOptions = ["default", "sm"];
|
|
4506
4989
|
var Select = SelectPrimitive.Root;
|
|
4507
4990
|
var SelectGroup = SelectPrimitive.Group;
|
|
4508
|
-
var SelectValue =
|
|
4509
|
-
return /* @__PURE__ */ (0,
|
|
4991
|
+
var SelectValue = React31.forwardRef(function SelectValue2({ className, ...props }, ref) {
|
|
4992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4510
4993
|
Text,
|
|
4511
4994
|
{
|
|
4512
4995
|
ref,
|
|
@@ -4515,13 +4998,13 @@ var SelectValue = React27.forwardRef(function SelectValue2({ className, ...props
|
|
|
4515
4998
|
className: cn("block truncate text-inherit", className),
|
|
4516
4999
|
size: "tiny",
|
|
4517
5000
|
style: inheritedTypographyStyle,
|
|
4518
|
-
children: /* @__PURE__ */ (0,
|
|
5001
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectPrimitive.Value, { className: "block truncate", ...props })
|
|
4519
5002
|
}
|
|
4520
5003
|
);
|
|
4521
5004
|
});
|
|
4522
5005
|
SelectValue.displayName = SelectPrimitive.Value.displayName;
|
|
4523
|
-
var SelectTrigger =
|
|
4524
|
-
return /* @__PURE__ */ (0,
|
|
5006
|
+
var SelectTrigger = React31.forwardRef(function SelectTrigger2({ className, children, size = "default", ...props }, ref) {
|
|
5007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
4525
5008
|
SelectPrimitive.Trigger,
|
|
4526
5009
|
{
|
|
4527
5010
|
ref,
|
|
@@ -4535,7 +5018,7 @@ var SelectTrigger = React27.forwardRef(function SelectTrigger2({ className, chil
|
|
|
4535
5018
|
...props,
|
|
4536
5019
|
children: [
|
|
4537
5020
|
children,
|
|
4538
|
-
/* @__PURE__ */ (0,
|
|
5021
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4539
5022
|
Icon,
|
|
4540
5023
|
{
|
|
4541
5024
|
name: "caret-down",
|
|
@@ -4548,8 +5031,8 @@ var SelectTrigger = React27.forwardRef(function SelectTrigger2({ className, chil
|
|
|
4548
5031
|
);
|
|
4549
5032
|
});
|
|
4550
5033
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
4551
|
-
var SelectScrollUpButton =
|
|
4552
|
-
return /* @__PURE__ */ (0,
|
|
5034
|
+
var SelectScrollUpButton = React31.forwardRef(function SelectScrollUpButton2({ className, ...props }, ref) {
|
|
5035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4553
5036
|
SelectPrimitive.ScrollUpButton,
|
|
4554
5037
|
{
|
|
4555
5038
|
ref,
|
|
@@ -4559,13 +5042,13 @@ var SelectScrollUpButton = React27.forwardRef(function SelectScrollUpButton2({ c
|
|
|
4559
5042
|
className
|
|
4560
5043
|
),
|
|
4561
5044
|
...props,
|
|
4562
|
-
children: /* @__PURE__ */ (0,
|
|
5045
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { name: "caret-up", size: 12 })
|
|
4563
5046
|
}
|
|
4564
5047
|
);
|
|
4565
5048
|
});
|
|
4566
5049
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
4567
|
-
var SelectScrollDownButton =
|
|
4568
|
-
return /* @__PURE__ */ (0,
|
|
5050
|
+
var SelectScrollDownButton = React31.forwardRef(function SelectScrollDownButton2({ className, ...props }, ref) {
|
|
5051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4569
5052
|
SelectPrimitive.ScrollDownButton,
|
|
4570
5053
|
{
|
|
4571
5054
|
ref,
|
|
@@ -4575,13 +5058,13 @@ var SelectScrollDownButton = React27.forwardRef(function SelectScrollDownButton2
|
|
|
4575
5058
|
className
|
|
4576
5059
|
),
|
|
4577
5060
|
...props,
|
|
4578
|
-
children: /* @__PURE__ */ (0,
|
|
5061
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { name: "caret-down", size: 12 })
|
|
4579
5062
|
}
|
|
4580
5063
|
);
|
|
4581
5064
|
});
|
|
4582
5065
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
4583
|
-
var SelectContent =
|
|
4584
|
-
return /* @__PURE__ */ (0,
|
|
5066
|
+
var SelectContent = React31.forwardRef(function SelectContent2({ className, children, position = "popper", ...props }, ref) {
|
|
5067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
4585
5068
|
SelectPrimitive.Content,
|
|
4586
5069
|
{
|
|
4587
5070
|
ref,
|
|
@@ -4594,8 +5077,8 @@ var SelectContent = React27.forwardRef(function SelectContent2({ className, chil
|
|
|
4594
5077
|
),
|
|
4595
5078
|
...props,
|
|
4596
5079
|
children: [
|
|
4597
|
-
/* @__PURE__ */ (0,
|
|
4598
|
-
/* @__PURE__ */ (0,
|
|
5080
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectScrollUpButton, {}),
|
|
5081
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4599
5082
|
SelectPrimitive.Viewport,
|
|
4600
5083
|
{
|
|
4601
5084
|
"data-slot": "select-viewport",
|
|
@@ -4603,14 +5086,14 @@ var SelectContent = React27.forwardRef(function SelectContent2({ className, chil
|
|
|
4603
5086
|
children
|
|
4604
5087
|
}
|
|
4605
5088
|
),
|
|
4606
|
-
/* @__PURE__ */ (0,
|
|
5089
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectScrollDownButton, {})
|
|
4607
5090
|
]
|
|
4608
5091
|
}
|
|
4609
5092
|
) });
|
|
4610
5093
|
});
|
|
4611
5094
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
4612
|
-
var SelectLabel =
|
|
4613
|
-
return /* @__PURE__ */ (0,
|
|
5095
|
+
var SelectLabel = React31.forwardRef(function SelectLabel2({ className, ...props }, ref) {
|
|
5096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4614
5097
|
SelectPrimitive.Label,
|
|
4615
5098
|
{
|
|
4616
5099
|
ref,
|
|
@@ -4632,8 +5115,8 @@ var SelectLabel = React27.forwardRef(function SelectLabel2({ className, ...props
|
|
|
4632
5115
|
);
|
|
4633
5116
|
});
|
|
4634
5117
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
4635
|
-
var SelectItem =
|
|
4636
|
-
return /* @__PURE__ */ (0,
|
|
5118
|
+
var SelectItem = React31.forwardRef(function SelectItem2({ className, children, ...props }, ref) {
|
|
5119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
4637
5120
|
SelectPrimitive.Item,
|
|
4638
5121
|
{
|
|
4639
5122
|
ref,
|
|
@@ -4644,20 +5127,20 @@ var SelectItem = React27.forwardRef(function SelectItem2({ className, children,
|
|
|
4644
5127
|
),
|
|
4645
5128
|
...props,
|
|
4646
5129
|
children: [
|
|
4647
|
-
/* @__PURE__ */ (0,
|
|
5130
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectPrimitive.ItemText, { className: "truncate", children: renderTextContent(children, {
|
|
4648
5131
|
as: "span",
|
|
4649
5132
|
className: "block truncate text-[color:var(--sofya-text-default)]",
|
|
4650
5133
|
size: "tiny",
|
|
4651
5134
|
style: inheritedTypographyStyle
|
|
4652
5135
|
}) }),
|
|
4653
|
-
/* @__PURE__ */ (0,
|
|
5136
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectPrimitive.ItemIndicator, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "absolute right-4 inline-flex h-4 w-4 items-center justify-center text-primary", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { name: "check", size: 14 }) }) })
|
|
4654
5137
|
]
|
|
4655
5138
|
}
|
|
4656
5139
|
);
|
|
4657
5140
|
});
|
|
4658
5141
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
4659
|
-
var SelectSeparator =
|
|
4660
|
-
return /* @__PURE__ */ (0,
|
|
5142
|
+
var SelectSeparator = React31.forwardRef(function SelectSeparator2({ className, ...props }, ref) {
|
|
5143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4661
5144
|
SelectPrimitive.Separator,
|
|
4662
5145
|
{
|
|
4663
5146
|
ref,
|
|
@@ -4670,11 +5153,11 @@ var SelectSeparator = React27.forwardRef(function SelectSeparator2({ className,
|
|
|
4670
5153
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
4671
5154
|
|
|
4672
5155
|
// src/components/separator.tsx
|
|
4673
|
-
var
|
|
5156
|
+
var React32 = __toESM(require("react"), 1);
|
|
4674
5157
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
4675
|
-
var
|
|
4676
|
-
var Separator2 =
|
|
4677
|
-
return /* @__PURE__ */ (0,
|
|
5158
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5159
|
+
var Separator2 = React32.forwardRef(function Separator3({ className, decorative = true, orientation = "horizontal", ...props }, ref) {
|
|
5160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4678
5161
|
SeparatorPrimitive.Root,
|
|
4679
5162
|
{
|
|
4680
5163
|
ref,
|
|
@@ -4693,8 +5176,8 @@ var Separator2 = React28.forwardRef(function Separator3({ className, decorative
|
|
|
4693
5176
|
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
4694
5177
|
|
|
4695
5178
|
// src/components/slider.tsx
|
|
4696
|
-
var
|
|
4697
|
-
var
|
|
5179
|
+
var React33 = __toESM(require("react"), 1);
|
|
5180
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
4698
5181
|
function clampSliderValue(value, min, max) {
|
|
4699
5182
|
if (Number.isNaN(value)) {
|
|
4700
5183
|
return min;
|
|
@@ -4719,7 +5202,7 @@ function resolveSliderMeasurement(value, fallback) {
|
|
|
4719
5202
|
function isTextValue(value) {
|
|
4720
5203
|
return typeof value === "string" || typeof value === "number";
|
|
4721
5204
|
}
|
|
4722
|
-
var Slider =
|
|
5205
|
+
var Slider = React33.forwardRef(function Slider2({
|
|
4723
5206
|
className,
|
|
4724
5207
|
defaultValue,
|
|
4725
5208
|
formatValue,
|
|
@@ -4742,7 +5225,7 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
4742
5225
|
valueClassName,
|
|
4743
5226
|
...props
|
|
4744
5227
|
}, ref) {
|
|
4745
|
-
const resolvedId =
|
|
5228
|
+
const resolvedId = React33.useId();
|
|
4746
5229
|
const inputId = id ?? resolvedId;
|
|
4747
5230
|
const safeMin = min;
|
|
4748
5231
|
const safeMax = resolveSliderMax(safeMin, max);
|
|
@@ -4751,7 +5234,7 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
4751
5234
|
onChange: onValueChange,
|
|
4752
5235
|
value
|
|
4753
5236
|
});
|
|
4754
|
-
|
|
5237
|
+
React33.useEffect(() => {
|
|
4755
5238
|
if (value !== void 0) {
|
|
4756
5239
|
return;
|
|
4757
5240
|
}
|
|
@@ -4798,14 +5281,14 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
4798
5281
|
setControllableValue(nextValue);
|
|
4799
5282
|
onChange?.(event);
|
|
4800
5283
|
};
|
|
4801
|
-
return /* @__PURE__ */ (0,
|
|
5284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4802
5285
|
"div",
|
|
4803
5286
|
{
|
|
4804
5287
|
"data-slot": "slider",
|
|
4805
5288
|
className: cn("grid w-full gap-2", className),
|
|
4806
5289
|
children: [
|
|
4807
|
-
label || showValue ? /* @__PURE__ */ (0,
|
|
4808
|
-
label ? /* @__PURE__ */ (0,
|
|
5290
|
+
label || showValue ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
5291
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4809
5292
|
FieldLabel,
|
|
4810
5293
|
{
|
|
4811
5294
|
htmlFor: inputId,
|
|
@@ -4816,8 +5299,8 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
4816
5299
|
textClassName: "block min-w-0 text-[color:var(--sofya-text-default)]",
|
|
4817
5300
|
children: label
|
|
4818
5301
|
}
|
|
4819
|
-
) : /* @__PURE__ */ (0,
|
|
4820
|
-
showValue ? /* @__PURE__ */ (0,
|
|
5302
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", {}),
|
|
5303
|
+
showValue ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4821
5304
|
"div",
|
|
4822
5305
|
{
|
|
4823
5306
|
className: cn(
|
|
@@ -4835,7 +5318,7 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
4835
5318
|
}
|
|
4836
5319
|
) : null
|
|
4837
5320
|
] }) : null,
|
|
4838
|
-
/* @__PURE__ */ (0,
|
|
5321
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4839
5322
|
"div",
|
|
4840
5323
|
{
|
|
4841
5324
|
"data-slot": "slider-control",
|
|
@@ -4845,7 +5328,7 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
4845
5328
|
),
|
|
4846
5329
|
style: controlStyle,
|
|
4847
5330
|
children: [
|
|
4848
|
-
/* @__PURE__ */ (0,
|
|
5331
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4849
5332
|
"input",
|
|
4850
5333
|
{
|
|
4851
5334
|
...props,
|
|
@@ -4862,7 +5345,7 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
4862
5345
|
style: inputBoundsStyle
|
|
4863
5346
|
}
|
|
4864
5347
|
),
|
|
4865
|
-
/* @__PURE__ */ (0,
|
|
5348
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4866
5349
|
"div",
|
|
4867
5350
|
{
|
|
4868
5351
|
"data-slot": "slider-track",
|
|
@@ -4873,7 +5356,7 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
4873
5356
|
style: trackBoundsStyle
|
|
4874
5357
|
}
|
|
4875
5358
|
),
|
|
4876
|
-
/* @__PURE__ */ (0,
|
|
5359
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4877
5360
|
"div",
|
|
4878
5361
|
{
|
|
4879
5362
|
"data-slot": "slider-range",
|
|
@@ -4884,7 +5367,7 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
4884
5367
|
style: rangeStyle
|
|
4885
5368
|
}
|
|
4886
5369
|
),
|
|
4887
|
-
/* @__PURE__ */ (0,
|
|
5370
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4888
5371
|
"div",
|
|
4889
5372
|
{
|
|
4890
5373
|
"data-slot": "slider-thumb",
|
|
@@ -4905,10 +5388,10 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
4905
5388
|
Slider.displayName = "Slider";
|
|
4906
5389
|
|
|
4907
5390
|
// src/components/skeleton.tsx
|
|
4908
|
-
var
|
|
4909
|
-
var
|
|
4910
|
-
var Skeleton =
|
|
4911
|
-
return /* @__PURE__ */ (0,
|
|
5391
|
+
var React34 = __toESM(require("react"), 1);
|
|
5392
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5393
|
+
var Skeleton = React34.forwardRef(function Skeleton2({ className, ...props }, ref) {
|
|
5394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4912
5395
|
"div",
|
|
4913
5396
|
{
|
|
4914
5397
|
ref,
|
|
@@ -4923,15 +5406,15 @@ var Skeleton = React30.forwardRef(function Skeleton2({ className, ...props }, re
|
|
|
4923
5406
|
Skeleton.displayName = "Skeleton";
|
|
4924
5407
|
|
|
4925
5408
|
// src/components/sonner.tsx
|
|
4926
|
-
var
|
|
5409
|
+
var React35 = __toESM(require("react"), 1);
|
|
4927
5410
|
var import_sonner = require("sonner");
|
|
4928
|
-
var
|
|
5411
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
4929
5412
|
var notificationVariantOptions = ["default", "success", "error", "warning"];
|
|
4930
5413
|
function ToastStatusIcon({
|
|
4931
5414
|
iconName,
|
|
4932
5415
|
className
|
|
4933
5416
|
}) {
|
|
4934
|
-
return /* @__PURE__ */ (0,
|
|
5417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
4935
5418
|
"span",
|
|
4936
5419
|
{
|
|
4937
5420
|
"aria-hidden": "true",
|
|
@@ -4939,7 +5422,7 @@ function ToastStatusIcon({
|
|
|
4939
5422
|
"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full border shadow-sofya-sm",
|
|
4940
5423
|
className
|
|
4941
5424
|
),
|
|
4942
|
-
children: /* @__PURE__ */ (0,
|
|
5425
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { name: iconName, size: 16 })
|
|
4943
5426
|
}
|
|
4944
5427
|
);
|
|
4945
5428
|
}
|
|
@@ -4960,35 +5443,35 @@ var defaultToastClassNames = {
|
|
|
4960
5443
|
loading: "border-border bg-card text-foreground"
|
|
4961
5444
|
};
|
|
4962
5445
|
var defaultToastIcons = {
|
|
4963
|
-
success: /* @__PURE__ */ (0,
|
|
5446
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
4964
5447
|
ToastStatusIcon,
|
|
4965
5448
|
{
|
|
4966
5449
|
iconName: "check",
|
|
4967
5450
|
className: "border-success/15 bg-success/12 text-success"
|
|
4968
5451
|
}
|
|
4969
5452
|
),
|
|
4970
|
-
error: /* @__PURE__ */ (0,
|
|
5453
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
4971
5454
|
ToastStatusIcon,
|
|
4972
5455
|
{
|
|
4973
5456
|
iconName: "x",
|
|
4974
5457
|
className: "border-destructive/15 bg-destructive/12 text-destructive"
|
|
4975
5458
|
}
|
|
4976
5459
|
),
|
|
4977
|
-
warning: /* @__PURE__ */ (0,
|
|
5460
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
4978
5461
|
ToastStatusIcon,
|
|
4979
5462
|
{
|
|
4980
5463
|
iconName: "question",
|
|
4981
5464
|
className: "border-warning/20 bg-warning/15 text-foreground"
|
|
4982
5465
|
}
|
|
4983
5466
|
),
|
|
4984
|
-
info: /* @__PURE__ */ (0,
|
|
5467
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
4985
5468
|
ToastStatusIcon,
|
|
4986
5469
|
{
|
|
4987
5470
|
iconName: "question",
|
|
4988
5471
|
className: "border-primary/15 bg-primary/10 text-primary"
|
|
4989
5472
|
}
|
|
4990
5473
|
),
|
|
4991
|
-
close: /* @__PURE__ */ (0,
|
|
5474
|
+
close: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { name: "x", size: 12 })
|
|
4992
5475
|
};
|
|
4993
5476
|
function mergeToastClassNames(overrides) {
|
|
4994
5477
|
return {
|
|
@@ -4996,7 +5479,7 @@ function mergeToastClassNames(overrides) {
|
|
|
4996
5479
|
...overrides
|
|
4997
5480
|
};
|
|
4998
5481
|
}
|
|
4999
|
-
var Toaster =
|
|
5482
|
+
var Toaster = React35.forwardRef(
|
|
5000
5483
|
function Toaster2({
|
|
5001
5484
|
className,
|
|
5002
5485
|
closeButton = true,
|
|
@@ -5008,7 +5491,7 @@ var Toaster = React31.forwardRef(
|
|
|
5008
5491
|
visibleToasts = 5,
|
|
5009
5492
|
...props
|
|
5010
5493
|
}, ref) {
|
|
5011
|
-
return /* @__PURE__ */ (0,
|
|
5494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5012
5495
|
import_sonner.Toaster,
|
|
5013
5496
|
{
|
|
5014
5497
|
ref,
|
|
@@ -5038,9 +5521,9 @@ var Toaster = React31.forwardRef(
|
|
|
5038
5521
|
Toaster.displayName = "Toaster";
|
|
5039
5522
|
|
|
5040
5523
|
// src/components/switch.tsx
|
|
5041
|
-
var
|
|
5524
|
+
var React36 = __toESM(require("react"), 1);
|
|
5042
5525
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
|
|
5043
|
-
var
|
|
5526
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5044
5527
|
var switchSizeOptions = ["default", "sm"];
|
|
5045
5528
|
var switchRootSizeClasses = {
|
|
5046
5529
|
default: "h-6 w-11",
|
|
@@ -5050,7 +5533,7 @@ var switchThumbSizeClasses = {
|
|
|
5050
5533
|
default: "h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
|
5051
5534
|
sm: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
5052
5535
|
};
|
|
5053
|
-
var Switch =
|
|
5536
|
+
var Switch = React36.forwardRef(
|
|
5054
5537
|
({
|
|
5055
5538
|
"aria-describedby": ariaDescribedBy,
|
|
5056
5539
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -5065,16 +5548,16 @@ var Switch = React32.forwardRef(
|
|
|
5065
5548
|
size,
|
|
5066
5549
|
...props
|
|
5067
5550
|
}, ref) => {
|
|
5068
|
-
const generatedId =
|
|
5551
|
+
const generatedId = React36.useId();
|
|
5069
5552
|
const resolvedId = id ?? generatedId;
|
|
5070
5553
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
5071
5554
|
const descriptionId = description ? `${resolvedId}-description` : void 0;
|
|
5072
5555
|
const hasTextContent = label !== void 0 || description !== void 0;
|
|
5073
5556
|
const resolvedSize = size ?? (hasTextContent ? "sm" : "default");
|
|
5074
|
-
const
|
|
5557
|
+
const alignClassName2 = description ? "items-start" : "items-center";
|
|
5075
5558
|
const resolvedAriaDescribedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ") || void 0;
|
|
5076
5559
|
const resolvedAriaLabelledBy = ariaLabelledBy ?? labelId;
|
|
5077
|
-
const switchControl = /* @__PURE__ */ (0,
|
|
5560
|
+
const switchControl = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5078
5561
|
SwitchPrimitives.Root,
|
|
5079
5562
|
{
|
|
5080
5563
|
id: resolvedId,
|
|
@@ -5089,7 +5572,7 @@ var Switch = React32.forwardRef(
|
|
|
5089
5572
|
"data-size": resolvedSize,
|
|
5090
5573
|
...props,
|
|
5091
5574
|
ref,
|
|
5092
|
-
children: /* @__PURE__ */ (0,
|
|
5575
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5093
5576
|
SwitchPrimitives.Thumb,
|
|
5094
5577
|
{
|
|
5095
5578
|
className: cn(
|
|
@@ -5103,19 +5586,19 @@ var Switch = React32.forwardRef(
|
|
|
5103
5586
|
if (!hasTextContent) {
|
|
5104
5587
|
return switchControl;
|
|
5105
5588
|
}
|
|
5106
|
-
return /* @__PURE__ */ (0,
|
|
5589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
5107
5590
|
"div",
|
|
5108
5591
|
{
|
|
5109
5592
|
"data-slot": "switch-container",
|
|
5110
5593
|
className: selectionControlContainerClasses({
|
|
5111
|
-
alignClassName,
|
|
5594
|
+
alignClassName: alignClassName2,
|
|
5112
5595
|
className: containerClassName,
|
|
5113
5596
|
disabled
|
|
5114
5597
|
}),
|
|
5115
5598
|
children: [
|
|
5116
5599
|
switchControl,
|
|
5117
|
-
/* @__PURE__ */ (0,
|
|
5118
|
-
label ? /* @__PURE__ */ (0,
|
|
5600
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: selectionControlContentBaseClasses, children: [
|
|
5601
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("label", { htmlFor: resolvedId, className: selectionControlLabelTextBaseClasses, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5119
5602
|
"span",
|
|
5120
5603
|
{
|
|
5121
5604
|
id: labelId,
|
|
@@ -5130,7 +5613,7 @@ var Switch = React32.forwardRef(
|
|
|
5130
5613
|
})
|
|
5131
5614
|
}
|
|
5132
5615
|
) }) : null,
|
|
5133
|
-
description ? /* @__PURE__ */ (0,
|
|
5616
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5134
5617
|
"span",
|
|
5135
5618
|
{
|
|
5136
5619
|
id: descriptionId,
|
|
@@ -5155,8 +5638,8 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
|
5155
5638
|
|
|
5156
5639
|
// src/components/table.tsx
|
|
5157
5640
|
var import_class_variance_authority8 = require("class-variance-authority");
|
|
5158
|
-
var
|
|
5159
|
-
var
|
|
5641
|
+
var React37 = __toESM(require("react"), 1);
|
|
5642
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
5160
5643
|
var tableCellVariantOptions = ["default", "primary", "muted"];
|
|
5161
5644
|
var tableStatusToneOptions = [
|
|
5162
5645
|
"active",
|
|
@@ -5206,13 +5689,13 @@ var tableActionButtonVariants = (0, import_class_variance_authority8.cva)(
|
|
|
5206
5689
|
}
|
|
5207
5690
|
}
|
|
5208
5691
|
);
|
|
5209
|
-
var Table =
|
|
5210
|
-
return /* @__PURE__ */ (0,
|
|
5692
|
+
var Table = React37.forwardRef(function Table2({ className, ...props }, ref) {
|
|
5693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5211
5694
|
"div",
|
|
5212
5695
|
{
|
|
5213
5696
|
"data-slot": "table-container",
|
|
5214
5697
|
className: "relative w-full overflow-x-auto",
|
|
5215
|
-
children: /* @__PURE__ */ (0,
|
|
5698
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5216
5699
|
"table",
|
|
5217
5700
|
{
|
|
5218
5701
|
"data-slot": "table",
|
|
@@ -5227,8 +5710,8 @@ var Table = React33.forwardRef(function Table2({ className, ...props }, ref) {
|
|
|
5227
5710
|
}
|
|
5228
5711
|
);
|
|
5229
5712
|
});
|
|
5230
|
-
var TableHeader =
|
|
5231
|
-
return /* @__PURE__ */ (0,
|
|
5713
|
+
var TableHeader = React37.forwardRef(function TableHeader2({ className, ...props }, ref) {
|
|
5714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5232
5715
|
"thead",
|
|
5233
5716
|
{
|
|
5234
5717
|
"data-slot": "table-header",
|
|
@@ -5241,8 +5724,8 @@ var TableHeader = React33.forwardRef(function TableHeader2({ className, ...props
|
|
|
5241
5724
|
}
|
|
5242
5725
|
);
|
|
5243
5726
|
});
|
|
5244
|
-
var TableBody =
|
|
5245
|
-
return /* @__PURE__ */ (0,
|
|
5727
|
+
var TableBody = React37.forwardRef(function TableBody2({ className, ...props }, ref) {
|
|
5728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5246
5729
|
"tbody",
|
|
5247
5730
|
{
|
|
5248
5731
|
"data-slot": "table-body",
|
|
@@ -5252,8 +5735,8 @@ var TableBody = React33.forwardRef(function TableBody2({ className, ...props },
|
|
|
5252
5735
|
}
|
|
5253
5736
|
);
|
|
5254
5737
|
});
|
|
5255
|
-
var TableFooter =
|
|
5256
|
-
return /* @__PURE__ */ (0,
|
|
5738
|
+
var TableFooter = React37.forwardRef(function TableFooter2({ className, ...props }, ref) {
|
|
5739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5257
5740
|
"tfoot",
|
|
5258
5741
|
{
|
|
5259
5742
|
"data-slot": "table-footer",
|
|
@@ -5266,8 +5749,8 @@ var TableFooter = React33.forwardRef(function TableFooter2({ className, ...props
|
|
|
5266
5749
|
}
|
|
5267
5750
|
);
|
|
5268
5751
|
});
|
|
5269
|
-
var TableRow =
|
|
5270
|
-
return /* @__PURE__ */ (0,
|
|
5752
|
+
var TableRow = React37.forwardRef(function TableRow2({ className, ...props }, ref) {
|
|
5753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5271
5754
|
"tr",
|
|
5272
5755
|
{
|
|
5273
5756
|
"data-slot": "table-row",
|
|
@@ -5280,8 +5763,8 @@ var TableRow = React33.forwardRef(function TableRow2({ className, ...props }, re
|
|
|
5280
5763
|
}
|
|
5281
5764
|
);
|
|
5282
5765
|
});
|
|
5283
|
-
var TableHead =
|
|
5284
|
-
return /* @__PURE__ */ (0,
|
|
5766
|
+
var TableHead = React37.forwardRef(function TableHead2({ className, children, ...props }, ref) {
|
|
5767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5285
5768
|
"th",
|
|
5286
5769
|
{
|
|
5287
5770
|
"data-slot": "table-head",
|
|
@@ -5300,9 +5783,9 @@ var TableHead = React33.forwardRef(function TableHead2({ className, children, ..
|
|
|
5300
5783
|
}
|
|
5301
5784
|
);
|
|
5302
5785
|
});
|
|
5303
|
-
var TableCell =
|
|
5786
|
+
var TableCell = React37.forwardRef(
|
|
5304
5787
|
function TableCell2({ className, variant, truncate, children, ...props }, ref) {
|
|
5305
|
-
return /* @__PURE__ */ (0,
|
|
5788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5306
5789
|
"td",
|
|
5307
5790
|
{
|
|
5308
5791
|
"data-slot": "table-cell",
|
|
@@ -5326,8 +5809,8 @@ var TableCell = React33.forwardRef(
|
|
|
5326
5809
|
);
|
|
5327
5810
|
}
|
|
5328
5811
|
);
|
|
5329
|
-
var TableCaption =
|
|
5330
|
-
return /* @__PURE__ */ (0,
|
|
5812
|
+
var TableCaption = React37.forwardRef(function TableCaption2({ className, children, ...props }, ref) {
|
|
5813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5331
5814
|
"caption",
|
|
5332
5815
|
{
|
|
5333
5816
|
"data-slot": "table-caption",
|
|
@@ -5352,7 +5835,7 @@ function TableStatusBadge({
|
|
|
5352
5835
|
children,
|
|
5353
5836
|
...props
|
|
5354
5837
|
}) {
|
|
5355
|
-
return /* @__PURE__ */ (0,
|
|
5838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5356
5839
|
Badge,
|
|
5357
5840
|
{
|
|
5358
5841
|
variant: "pill",
|
|
@@ -5367,8 +5850,8 @@ function TableStatusBadge({
|
|
|
5367
5850
|
}
|
|
5368
5851
|
);
|
|
5369
5852
|
}
|
|
5370
|
-
var TableActionButton =
|
|
5371
|
-
return /* @__PURE__ */ (0,
|
|
5853
|
+
var TableActionButton = React37.forwardRef(function TableActionButton2({ className, tone, type = "button", children, ...props }, ref) {
|
|
5854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5372
5855
|
Button,
|
|
5373
5856
|
{
|
|
5374
5857
|
ref,
|
|
@@ -5386,8 +5869,8 @@ var TableActionButton = React33.forwardRef(function TableActionButton2({ classNa
|
|
|
5386
5869
|
}
|
|
5387
5870
|
);
|
|
5388
5871
|
});
|
|
5389
|
-
var TableActions =
|
|
5390
|
-
return /* @__PURE__ */ (0,
|
|
5872
|
+
var TableActions = React37.forwardRef(function TableActions2({ className, ...props }, ref) {
|
|
5873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5391
5874
|
"div",
|
|
5392
5875
|
{
|
|
5393
5876
|
ref,
|
|
@@ -5408,10 +5891,10 @@ TableActionButton.displayName = "TableActionButton";
|
|
|
5408
5891
|
TableActions.displayName = "TableActions";
|
|
5409
5892
|
|
|
5410
5893
|
// src/components/tabs.tsx
|
|
5411
|
-
var
|
|
5894
|
+
var React38 = __toESM(require("react"), 1);
|
|
5412
5895
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
5413
5896
|
var import_react3 = require("motion/react");
|
|
5414
|
-
var
|
|
5897
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
5415
5898
|
function resolveDefaultValue(items, defaultValue) {
|
|
5416
5899
|
if (defaultValue) {
|
|
5417
5900
|
return defaultValue;
|
|
@@ -5435,13 +5918,13 @@ function Tabs({
|
|
|
5435
5918
|
onChange: onValueChange,
|
|
5436
5919
|
value
|
|
5437
5920
|
});
|
|
5438
|
-
const indicatorLayoutId =
|
|
5439
|
-
|
|
5921
|
+
const indicatorLayoutId = React38.useId();
|
|
5922
|
+
React38.useEffect(() => {
|
|
5440
5923
|
if (value === void 0) {
|
|
5441
5924
|
setUncontrolledCurrentValue(resolvedDefaultValue);
|
|
5442
5925
|
}
|
|
5443
5926
|
}, [resolvedDefaultValue, setUncontrolledCurrentValue, value]);
|
|
5444
|
-
return /* @__PURE__ */ (0,
|
|
5927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
5445
5928
|
TabsPrimitive.Root,
|
|
5446
5929
|
{
|
|
5447
5930
|
className: cn("w-full", className),
|
|
@@ -5449,7 +5932,7 @@ function Tabs({
|
|
|
5449
5932
|
value: currentValue,
|
|
5450
5933
|
...props,
|
|
5451
5934
|
children: [
|
|
5452
|
-
/* @__PURE__ */ (0,
|
|
5935
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5453
5936
|
TabsPrimitive.List,
|
|
5454
5937
|
{
|
|
5455
5938
|
"aria-label": "Subtelas navegaveis",
|
|
@@ -5460,7 +5943,7 @@ function Tabs({
|
|
|
5460
5943
|
children: items.map((item) => {
|
|
5461
5944
|
const isUnavailable = item.disabled || item.loading;
|
|
5462
5945
|
const isActive = item.value === currentValue;
|
|
5463
|
-
return /* @__PURE__ */ (0,
|
|
5946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
5464
5947
|
TabsPrimitive.Trigger,
|
|
5465
5948
|
{
|
|
5466
5949
|
value: item.value,
|
|
@@ -5472,7 +5955,7 @@ function Tabs({
|
|
|
5472
5955
|
item.triggerClassName
|
|
5473
5956
|
),
|
|
5474
5957
|
children: [
|
|
5475
|
-
isActive ? /* @__PURE__ */ (0,
|
|
5958
|
+
isActive ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5476
5959
|
import_react3.motion.span,
|
|
5477
5960
|
{
|
|
5478
5961
|
"aria-hidden": "true",
|
|
@@ -5482,15 +5965,15 @@ function Tabs({
|
|
|
5482
5965
|
transition: { duration: 0.25, ease: "easeInOut" }
|
|
5483
5966
|
}
|
|
5484
5967
|
) : null,
|
|
5485
|
-
/* @__PURE__ */ (0,
|
|
5486
|
-
item.loading ? /* @__PURE__ */ (0,
|
|
5968
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "relative z-10 inline-flex items-center gap-2", children: [
|
|
5969
|
+
item.loading ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5487
5970
|
"span",
|
|
5488
5971
|
{
|
|
5489
5972
|
"aria-hidden": "true",
|
|
5490
5973
|
className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-r-transparent"
|
|
5491
5974
|
}
|
|
5492
5975
|
) : null,
|
|
5493
|
-
/* @__PURE__ */ (0,
|
|
5976
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: renderTextContent(item.label, {
|
|
5494
5977
|
as: "span",
|
|
5495
5978
|
className: "block text-inherit",
|
|
5496
5979
|
size: "body"
|
|
@@ -5504,7 +5987,7 @@ function Tabs({
|
|
|
5504
5987
|
}
|
|
5505
5988
|
),
|
|
5506
5989
|
items.map(
|
|
5507
|
-
(item) => item.content !== void 0 ? /* @__PURE__ */ (0,
|
|
5990
|
+
(item) => item.content !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5508
5991
|
TabsPrimitive.Content,
|
|
5509
5992
|
{
|
|
5510
5993
|
value: item.value,
|
|
@@ -5527,9 +6010,9 @@ function Tabs({
|
|
|
5527
6010
|
Tabs.displayName = "Tabs";
|
|
5528
6011
|
|
|
5529
6012
|
// src/components/textarea.tsx
|
|
5530
|
-
var
|
|
5531
|
-
var
|
|
5532
|
-
var Textarea =
|
|
6013
|
+
var React39 = __toESM(require("react"), 1);
|
|
6014
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
6015
|
+
var Textarea = React39.forwardRef(
|
|
5533
6016
|
({
|
|
5534
6017
|
className,
|
|
5535
6018
|
containerClassName,
|
|
@@ -5539,10 +6022,10 @@ var Textarea = React35.forwardRef(
|
|
|
5539
6022
|
rows = 5,
|
|
5540
6023
|
...props
|
|
5541
6024
|
}, ref) => {
|
|
5542
|
-
const generatedId =
|
|
6025
|
+
const generatedId = React39.useId();
|
|
5543
6026
|
const resolvedId = id ?? generatedId;
|
|
5544
6027
|
const ariaLabel = props["aria-label"] ?? (typeof label === "string" ? label : void 0);
|
|
5545
|
-
const control = /* @__PURE__ */ (0,
|
|
6028
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5546
6029
|
"textarea",
|
|
5547
6030
|
{
|
|
5548
6031
|
className: cn(
|
|
@@ -5556,7 +6039,7 @@ var Textarea = React35.forwardRef(
|
|
|
5556
6039
|
"aria-label": ariaLabel
|
|
5557
6040
|
}
|
|
5558
6041
|
);
|
|
5559
|
-
return /* @__PURE__ */ (0,
|
|
6042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5560
6043
|
FieldShell,
|
|
5561
6044
|
{
|
|
5562
6045
|
control,
|
|
@@ -5571,10 +6054,10 @@ var Textarea = React35.forwardRef(
|
|
|
5571
6054
|
Textarea.displayName = "Textarea";
|
|
5572
6055
|
|
|
5573
6056
|
// src/components/toggle.tsx
|
|
5574
|
-
var
|
|
6057
|
+
var React40 = __toESM(require("react"), 1);
|
|
5575
6058
|
var SwitchPrimitives2 = __toESM(require("@radix-ui/react-switch"), 1);
|
|
5576
|
-
var
|
|
5577
|
-
var Toggle =
|
|
6059
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
6060
|
+
var Toggle = React40.forwardRef(function Toggle2({
|
|
5578
6061
|
"aria-describedby": ariaDescribedBy,
|
|
5579
6062
|
"aria-labelledby": ariaLabelledBy,
|
|
5580
6063
|
className,
|
|
@@ -5587,15 +6070,15 @@ var Toggle = React36.forwardRef(function Toggle2({
|
|
|
5587
6070
|
labelClassName,
|
|
5588
6071
|
...props
|
|
5589
6072
|
}, ref) {
|
|
5590
|
-
const generatedId =
|
|
6073
|
+
const generatedId = React40.useId();
|
|
5591
6074
|
const resolvedId = id ?? generatedId;
|
|
5592
6075
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
5593
6076
|
const descriptionId = description ? `${resolvedId}-description` : void 0;
|
|
5594
6077
|
const hasTextContent = label !== void 0 || description !== void 0;
|
|
5595
|
-
const
|
|
6078
|
+
const alignClassName2 = description ? "items-start" : "items-center";
|
|
5596
6079
|
const resolvedAriaDescribedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ") || void 0;
|
|
5597
6080
|
const resolvedAriaLabelledBy = ariaLabelledBy ?? labelId;
|
|
5598
|
-
const toggleControl = /* @__PURE__ */ (0,
|
|
6081
|
+
const toggleControl = /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5599
6082
|
SwitchPrimitives2.Root,
|
|
5600
6083
|
{
|
|
5601
6084
|
id: resolvedId,
|
|
@@ -5609,7 +6092,7 @@ var Toggle = React36.forwardRef(function Toggle2({
|
|
|
5609
6092
|
className
|
|
5610
6093
|
),
|
|
5611
6094
|
...props,
|
|
5612
|
-
children: /* @__PURE__ */ (0,
|
|
6095
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5613
6096
|
SwitchPrimitives2.Thumb,
|
|
5614
6097
|
{
|
|
5615
6098
|
"data-slot": "toggle-thumb",
|
|
@@ -5621,19 +6104,19 @@ var Toggle = React36.forwardRef(function Toggle2({
|
|
|
5621
6104
|
if (!hasTextContent) {
|
|
5622
6105
|
return toggleControl;
|
|
5623
6106
|
}
|
|
5624
|
-
return /* @__PURE__ */ (0,
|
|
6107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
5625
6108
|
"div",
|
|
5626
6109
|
{
|
|
5627
6110
|
"data-slot": "toggle-container",
|
|
5628
6111
|
className: selectionControlContainerClasses({
|
|
5629
|
-
alignClassName,
|
|
6112
|
+
alignClassName: alignClassName2,
|
|
5630
6113
|
className: containerClassName,
|
|
5631
6114
|
disabled
|
|
5632
6115
|
}),
|
|
5633
6116
|
children: [
|
|
5634
6117
|
toggleControl,
|
|
5635
|
-
/* @__PURE__ */ (0,
|
|
5636
|
-
label ? /* @__PURE__ */ (0,
|
|
6118
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: selectionControlContentBaseClasses, children: [
|
|
6119
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("label", { htmlFor: resolvedId, className: selectionControlLabelTextBaseClasses, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5637
6120
|
"span",
|
|
5638
6121
|
{
|
|
5639
6122
|
id: labelId,
|
|
@@ -5645,7 +6128,7 @@ var Toggle = React36.forwardRef(function Toggle2({
|
|
|
5645
6128
|
})
|
|
5646
6129
|
}
|
|
5647
6130
|
) }) : null,
|
|
5648
|
-
description ? /* @__PURE__ */ (0,
|
|
6131
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5649
6132
|
"span",
|
|
5650
6133
|
{
|
|
5651
6134
|
id: descriptionId,
|
|
@@ -5668,14 +6151,14 @@ var Toggle = React36.forwardRef(function Toggle2({
|
|
|
5668
6151
|
Toggle.displayName = "Toggle";
|
|
5669
6152
|
|
|
5670
6153
|
// src/components/tooltip.tsx
|
|
5671
|
-
var
|
|
6154
|
+
var React41 = __toESM(require("react"), 1);
|
|
5672
6155
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
5673
|
-
var
|
|
6156
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5674
6157
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
5675
6158
|
var Tooltip = TooltipPrimitive.Root;
|
|
5676
6159
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
5677
|
-
var TooltipContent =
|
|
5678
|
-
return /* @__PURE__ */ (0,
|
|
6160
|
+
var TooltipContent = React41.forwardRef(function TooltipContent2({ className, sideOffset = 8, ...props }, ref) {
|
|
6161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5679
6162
|
TooltipPrimitive.Content,
|
|
5680
6163
|
{
|
|
5681
6164
|
ref,
|
|
@@ -5699,9 +6182,9 @@ var TooltipContent = React37.forwardRef(function TooltipContent2({ className, si
|
|
|
5699
6182
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
5700
6183
|
|
|
5701
6184
|
// src/theme/provider.tsx
|
|
5702
|
-
var
|
|
5703
|
-
var
|
|
5704
|
-
var
|
|
6185
|
+
var React42 = __toESM(require("react"), 1);
|
|
6186
|
+
var import_tokens3 = require("@sofya-ds/tokens");
|
|
6187
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
5705
6188
|
var SOFYA_FONT_LINKS = [
|
|
5706
6189
|
{
|
|
5707
6190
|
id: "preconnect-googleapis",
|
|
@@ -5721,7 +6204,7 @@ var SOFYA_FONT_LINKS = [
|
|
|
5721
6204
|
}
|
|
5722
6205
|
];
|
|
5723
6206
|
function useSofyaFontLinks() {
|
|
5724
|
-
|
|
6207
|
+
React42.useEffect(() => {
|
|
5725
6208
|
if (typeof document === "undefined") {
|
|
5726
6209
|
return;
|
|
5727
6210
|
}
|
|
@@ -5744,7 +6227,7 @@ function useSofyaFontLinks() {
|
|
|
5744
6227
|
}, []);
|
|
5745
6228
|
}
|
|
5746
6229
|
function SofyaProvider({
|
|
5747
|
-
preset =
|
|
6230
|
+
preset = import_tokens3.defaultTheme,
|
|
5748
6231
|
overrides,
|
|
5749
6232
|
className,
|
|
5750
6233
|
style,
|
|
@@ -5752,9 +6235,9 @@ function SofyaProvider({
|
|
|
5752
6235
|
...props
|
|
5753
6236
|
}) {
|
|
5754
6237
|
useSofyaFontLinks();
|
|
5755
|
-
const theme = (0,
|
|
5756
|
-
const cssVariables = (0,
|
|
5757
|
-
return /* @__PURE__ */ (0,
|
|
6238
|
+
const theme = (0, import_tokens3.createWhitelabelTheme)(overrides ?? {}, preset);
|
|
6239
|
+
const cssVariables = (0, import_tokens3.themeToCssVariables)(theme);
|
|
6240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5758
6241
|
"div",
|
|
5759
6242
|
{
|
|
5760
6243
|
"data-sofya-theme": theme.name,
|
|
@@ -5767,7 +6250,7 @@ function SofyaProvider({
|
|
|
5767
6250
|
}
|
|
5768
6251
|
|
|
5769
6252
|
// src/index.ts
|
|
5770
|
-
var
|
|
6253
|
+
var import_tokens4 = require("@sofya-ds/tokens");
|
|
5771
6254
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5772
6255
|
0 && (module.exports = {
|
|
5773
6256
|
Accordion,
|
|
@@ -5787,6 +6270,8 @@ var import_tokens2 = require("@sofya-ds/tokens");
|
|
|
5787
6270
|
CardHeader,
|
|
5788
6271
|
CardTitle,
|
|
5789
6272
|
Checkbox,
|
|
6273
|
+
Cluster,
|
|
6274
|
+
Container,
|
|
5790
6275
|
Dialog,
|
|
5791
6276
|
DialogBody,
|
|
5792
6277
|
DialogCancel,
|
|
@@ -5799,6 +6284,7 @@ var import_tokens2 = require("@sofya-ds/tokens");
|
|
|
5799
6284
|
DialogPortal,
|
|
5800
6285
|
DialogTitle,
|
|
5801
6286
|
DialogTrigger,
|
|
6287
|
+
DocumentCard,
|
|
5802
6288
|
Dropdown,
|
|
5803
6289
|
DropdownSearch,
|
|
5804
6290
|
Empty,
|
|
@@ -5808,6 +6294,7 @@ var import_tokens2 = require("@sofya-ds/tokens");
|
|
|
5808
6294
|
EmptyMedia,
|
|
5809
6295
|
EmptyTitle,
|
|
5810
6296
|
Icon,
|
|
6297
|
+
Inline,
|
|
5811
6298
|
Input,
|
|
5812
6299
|
InputOTP,
|
|
5813
6300
|
InputOTPGroup,
|
|
@@ -5832,9 +6319,20 @@ var import_tokens2 = require("@sofya-ds/tokens");
|
|
|
5832
6319
|
PopoverTitle,
|
|
5833
6320
|
PopoverTrigger,
|
|
5834
6321
|
Progress,
|
|
6322
|
+
ProseDialogBody,
|
|
6323
|
+
ProseDialogContent,
|
|
6324
|
+
ProseDialogDescription,
|
|
6325
|
+
ProseDialogHeader,
|
|
6326
|
+
ProseDialogTitle,
|
|
5835
6327
|
REGEXP_ONLY_DIGITS,
|
|
5836
6328
|
RadioGroup,
|
|
5837
6329
|
RadioGroupItem,
|
|
6330
|
+
RadioGroupOption,
|
|
6331
|
+
RadioGroupOptionAvatar,
|
|
6332
|
+
RadioGroupOptionDescription,
|
|
6333
|
+
RadioGroupOptionIndicator,
|
|
6334
|
+
RadioGroupOptionLabel,
|
|
6335
|
+
RightRailAction,
|
|
5838
6336
|
ScrollArea,
|
|
5839
6337
|
ScrollAreaCorner,
|
|
5840
6338
|
ScrollAreaScrollbar,
|
|
@@ -5854,6 +6352,7 @@ var import_tokens2 = require("@sofya-ds/tokens");
|
|
|
5854
6352
|
Slider,
|
|
5855
6353
|
SofyaProvider,
|
|
5856
6354
|
Spinner,
|
|
6355
|
+
Stack,
|
|
5857
6356
|
Surface,
|
|
5858
6357
|
Switch,
|
|
5859
6358
|
Table,
|
|
@@ -5924,10 +6423,15 @@ var import_tokens2 = require("@sofya-ds/tokens");
|
|
|
5924
6423
|
selectSizeOptions,
|
|
5925
6424
|
sofyaBrandPalette,
|
|
5926
6425
|
sofyaColorPalette,
|
|
6426
|
+
sofyaGapNames,
|
|
6427
|
+
sofyaMeasureNames,
|
|
6428
|
+
sofyaRhythmNames,
|
|
5927
6429
|
sofyaSemanticColorHex,
|
|
6430
|
+
sofyaSpaceNames,
|
|
5928
6431
|
sofyaSurfaceNames,
|
|
5929
6432
|
sofyaTextStyleNames,
|
|
5930
6433
|
spinnerSizeOptions,
|
|
6434
|
+
surfaceVariantOptions,
|
|
5931
6435
|
switchSizeOptions,
|
|
5932
6436
|
tableActionToneOptions,
|
|
5933
6437
|
tableCellVariantOptions,
|