@sofya-ds/react 1.7.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 +601 -288
- package/dist/index.css +1 -1
- package/dist/index.d.cts +63 -8
- package/dist/index.d.ts +63 -8
- package/dist/index.js +575 -270
- 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,6 +96,11 @@ __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
105
|
RadioGroup: () => RadioGroup3,
|
|
97
106
|
RadioGroupItem: () => RadioGroupItem,
|
|
@@ -100,6 +109,7 @@ __export(index_exports, {
|
|
|
100
109
|
RadioGroupOptionDescription: () => RadioGroupOptionDescription,
|
|
101
110
|
RadioGroupOptionIndicator: () => RadioGroupOptionIndicator,
|
|
102
111
|
RadioGroupOptionLabel: () => RadioGroupOptionLabel,
|
|
112
|
+
RightRailAction: () => RightRailAction,
|
|
103
113
|
ScrollArea: () => ScrollArea,
|
|
104
114
|
ScrollAreaCorner: () => ScrollAreaCorner,
|
|
105
115
|
ScrollAreaScrollbar: () => ScrollAreaScrollbar,
|
|
@@ -119,6 +129,7 @@ __export(index_exports, {
|
|
|
119
129
|
Slider: () => Slider,
|
|
120
130
|
SofyaProvider: () => SofyaProvider,
|
|
121
131
|
Spinner: () => Spinner,
|
|
132
|
+
Stack: () => Stack,
|
|
122
133
|
Surface: () => Surface,
|
|
123
134
|
Switch: () => Switch,
|
|
124
135
|
Table: () => Table,
|
|
@@ -152,21 +163,21 @@ __export(index_exports, {
|
|
|
152
163
|
badgePillVariants: () => badgePillVariants,
|
|
153
164
|
badgeVariantOptions: () => badgeVariantOptions,
|
|
154
165
|
badgeVariants: () => badgeVariants,
|
|
155
|
-
brandPaletteToCssVariables: () =>
|
|
166
|
+
brandPaletteToCssVariables: () => import_tokens4.brandPaletteToCssVariables,
|
|
156
167
|
buttonLanguageLocaleOptions: () => buttonLanguageLocaleOptions,
|
|
157
168
|
buttonSizeOptions: () => buttonSizeOptions,
|
|
158
169
|
buttonVariantOptions: () => buttonVariantOptions,
|
|
159
170
|
buttonVariants: () => buttonVariants,
|
|
160
171
|
cardVariants: () => cardVariants,
|
|
161
|
-
createWhitelabelTheme: () =>
|
|
162
|
-
defaultTheme: () =>
|
|
172
|
+
createWhitelabelTheme: () => import_tokens4.createWhitelabelTheme,
|
|
173
|
+
defaultTheme: () => import_tokens4.defaultTheme,
|
|
163
174
|
dropdownAppearanceOptions: () => dropdownAppearanceOptions,
|
|
164
175
|
dropdownLanguageItems: () => dropdownLanguageItems,
|
|
165
176
|
dropdownTriggerSizeOptions: () => dropdownTriggerSizeOptions,
|
|
166
177
|
dropdownVariantOptions: () => dropdownVariantOptions,
|
|
167
178
|
emptyMediaVariantOptions: () => emptyMediaVariantOptions,
|
|
168
|
-
gradientToCss: () =>
|
|
169
|
-
hexToHslChannels: () =>
|
|
179
|
+
gradientToCss: () => import_tokens4.gradientToCss,
|
|
180
|
+
hexToHslChannels: () => import_tokens4.hexToHslChannels,
|
|
170
181
|
iconColorOptions: () => iconColorOptions,
|
|
171
182
|
iconNames: () => iconNames,
|
|
172
183
|
iconSizeMap: () => iconSizeMap,
|
|
@@ -175,24 +186,29 @@ __export(index_exports, {
|
|
|
175
186
|
isTextContent: () => isTextContent,
|
|
176
187
|
logoSizeOptions: () => logoSizeOptions,
|
|
177
188
|
logoVariants: () => logoVariants,
|
|
178
|
-
mergeTheme: () =>
|
|
189
|
+
mergeTheme: () => import_tokens4.mergeTheme,
|
|
179
190
|
notificationVariantOptions: () => notificationVariantOptions,
|
|
180
191
|
paginationLinkVariants: () => paginationLinkVariants,
|
|
181
192
|
progressSizeOptions: () => progressSizeOptions,
|
|
182
193
|
radioGroupOrientationOptions: () => radioGroupOrientationOptions,
|
|
183
194
|
radioGroupVariantOptions: () => radioGroupVariantOptions,
|
|
184
195
|
renderTextContent: () => renderTextContent,
|
|
185
|
-
resolveSurfaceToken: () =>
|
|
186
|
-
resolveTextStyle: () =>
|
|
187
|
-
resolveTheme: () =>
|
|
196
|
+
resolveSurfaceToken: () => import_tokens4.resolveSurfaceToken,
|
|
197
|
+
resolveTextStyle: () => import_tokens4.resolveTextStyle,
|
|
198
|
+
resolveTheme: () => import_tokens4.resolveTheme,
|
|
188
199
|
scrollAreaOrientationOptions: () => scrollAreaOrientationOptions,
|
|
189
200
|
selectSizeOptions: () => selectSizeOptions,
|
|
190
|
-
sofyaBrandPalette: () =>
|
|
191
|
-
sofyaColorPalette: () =>
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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,
|
|
195
210
|
spinnerSizeOptions: () => spinnerSizeOptions,
|
|
211
|
+
surfaceVariantOptions: () => surfaceVariantOptions,
|
|
196
212
|
switchSizeOptions: () => switchSizeOptions,
|
|
197
213
|
tableActionToneOptions: () => tableActionToneOptions,
|
|
198
214
|
tableCellVariantOptions: () => tableCellVariantOptions,
|
|
@@ -200,9 +216,9 @@ __export(index_exports, {
|
|
|
200
216
|
textSizeOptions: () => textSizeOptions,
|
|
201
217
|
textSplitTypeOptions: () => textSplitTypeOptions,
|
|
202
218
|
textVariantOptions: () => textVariantOptions,
|
|
203
|
-
themePresetNames: () =>
|
|
204
|
-
themePresets: () =>
|
|
205
|
-
themeToCssVariables: () =>
|
|
219
|
+
themePresetNames: () => import_tokens4.themePresetNames,
|
|
220
|
+
themePresets: () => import_tokens4.themePresets,
|
|
221
|
+
themeToCssVariables: () => import_tokens4.themeToCssVariables,
|
|
206
222
|
toast: () => import_sonner.toast,
|
|
207
223
|
uploadKindOptions: () => uploadKindOptions
|
|
208
224
|
});
|
|
@@ -561,19 +577,47 @@ Icon.displayName = "Icon";
|
|
|
561
577
|
|
|
562
578
|
// src/components/text.tsx
|
|
563
579
|
var React3 = __toESM(require("react"), 1);
|
|
580
|
+
var import_tokens = require("@sofya-ds/tokens");
|
|
564
581
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
565
|
-
var textSizeOptions =
|
|
582
|
+
var textSizeOptions = import_tokens.sofyaTextStyleNames;
|
|
566
583
|
var textVariantOptions = ["default", "gradient", "shiny", "split"];
|
|
567
584
|
var textSplitTypeOptions = ["chars", "words", "words, chars"];
|
|
568
585
|
var defaultElements = {
|
|
586
|
+
"display-xl": "h1",
|
|
587
|
+
"display-lg": "h1",
|
|
588
|
+
"heading-xl": "h1",
|
|
589
|
+
"heading-lg": "h2",
|
|
590
|
+
"heading-md": "h3",
|
|
569
591
|
h1: "h1",
|
|
570
592
|
h2: "h2",
|
|
571
593
|
h3: "h3",
|
|
572
594
|
h4: "h4",
|
|
573
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",
|
|
574
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",
|
|
575
618
|
tiny: "span",
|
|
576
|
-
"extra-tiny": "span"
|
|
619
|
+
"extra-tiny": "span",
|
|
620
|
+
"code-sm": "code"
|
|
577
621
|
};
|
|
578
622
|
var textSizeStyles = Object.fromEntries(
|
|
579
623
|
textSizeOptions.map((size) => [
|
|
@@ -1723,27 +1767,24 @@ Button.displayName = "Button";
|
|
|
1723
1767
|
// src/components/surface.tsx
|
|
1724
1768
|
var React9 = __toESM(require("react"), 1);
|
|
1725
1769
|
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
1770
|
+
var import_tokens2 = require("@sofya-ds/tokens");
|
|
1726
1771
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1727
|
-
var
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
focus: {
|
|
1738
|
-
backgroundColor: "hsl(var(--sofya-surface-focus-background))",
|
|
1739
|
-
borderColor: "hsl(var(--sofya-surface-focus-border-color))",
|
|
1740
|
-
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)`,
|
|
1741
1782
|
borderStyle: "solid",
|
|
1742
|
-
borderRadius:
|
|
1743
|
-
"--sofya-surface-shadow-base":
|
|
1783
|
+
borderRadius: `var(--sofya-surface-${cssName}-radius)`,
|
|
1784
|
+
"--sofya-surface-shadow-base": `var(--sofya-surface-${cssName}-shadow)`,
|
|
1744
1785
|
boxShadow: "var(--sofya-surface-shadow-override, var(--sofya-surface-shadow-base))"
|
|
1745
|
-
}
|
|
1746
|
-
}
|
|
1786
|
+
};
|
|
1787
|
+
}
|
|
1747
1788
|
function SurfaceComponent({ as, asChild = false, variant = "card", className, style, ...props }, ref) {
|
|
1748
1789
|
const Component = asChild ? import_react_slot2.Slot : as ?? "div";
|
|
1749
1790
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
@@ -1752,7 +1793,7 @@ function SurfaceComponent({ as, asChild = false, variant = "card", className, st
|
|
|
1752
1793
|
ref,
|
|
1753
1794
|
"data-surface-variant": variant,
|
|
1754
1795
|
className: cn("relative text-foreground", className),
|
|
1755
|
-
style: { ...
|
|
1796
|
+
style: { ...getSurfaceStyle(variant), ...style },
|
|
1756
1797
|
...props
|
|
1757
1798
|
}
|
|
1758
1799
|
);
|
|
@@ -1829,13 +1870,13 @@ var selectionControlLabelTextBaseClasses = "text-[color:var(--sofya-text-default
|
|
|
1829
1870
|
var selectionControlDescriptionTextBaseClasses = "text-muted-foreground";
|
|
1830
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";
|
|
1831
1872
|
function selectionControlContainerClasses({
|
|
1832
|
-
alignClassName,
|
|
1873
|
+
alignClassName: alignClassName2,
|
|
1833
1874
|
className,
|
|
1834
1875
|
disabled
|
|
1835
1876
|
}) {
|
|
1836
1877
|
return cn(
|
|
1837
1878
|
selectionControlContainerBaseClasses,
|
|
1838
|
-
|
|
1879
|
+
alignClassName2,
|
|
1839
1880
|
disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
1840
1881
|
className
|
|
1841
1882
|
);
|
|
@@ -1859,13 +1900,13 @@ var Checkbox = React10.forwardRef(
|
|
|
1859
1900
|
const generatedId = React10.useId();
|
|
1860
1901
|
const resolvedId = id ?? generatedId;
|
|
1861
1902
|
const descriptionId = description ? `${resolvedId}-description` : void 0;
|
|
1862
|
-
const
|
|
1903
|
+
const alignClassName2 = description ? "items-start" : "items-center";
|
|
1863
1904
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1864
1905
|
"label",
|
|
1865
1906
|
{
|
|
1866
1907
|
htmlFor: resolvedId,
|
|
1867
1908
|
className: selectionControlContainerClasses({
|
|
1868
|
-
alignClassName,
|
|
1909
|
+
alignClassName: alignClassName2,
|
|
1869
1910
|
className,
|
|
1870
1911
|
disabled
|
|
1871
1912
|
}),
|
|
@@ -3585,13 +3626,16 @@ var DialogContent = React19.forwardRef(
|
|
|
3585
3626
|
className,
|
|
3586
3627
|
children,
|
|
3587
3628
|
cardClassName,
|
|
3629
|
+
cardStyle,
|
|
3588
3630
|
overlayClassName,
|
|
3589
3631
|
showCloseButton = true,
|
|
3632
|
+
surfaceShadow = "var(--sofya-shadow-lg)",
|
|
3590
3633
|
variant = "card",
|
|
3591
3634
|
...props
|
|
3592
3635
|
}, ref) => {
|
|
3593
3636
|
const dialogCardStyle = {
|
|
3594
|
-
"--sofya-surface-shadow-override":
|
|
3637
|
+
"--sofya-surface-shadow-override": surfaceShadow,
|
|
3638
|
+
...cardStyle
|
|
3595
3639
|
};
|
|
3596
3640
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DialogInternalContext.Provider, { value: { showCloseButton }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(DialogPortal, { children: [
|
|
3597
3641
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DialogOverlay, { className: overlayClassName }),
|
|
@@ -3697,10 +3741,73 @@ var DialogDescription = React19.forwardRef(({ children, className, ...props }, r
|
|
|
3697
3741
|
));
|
|
3698
3742
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
3699
3743
|
|
|
3700
|
-
// src/components/
|
|
3744
|
+
// src/components/document-card.tsx
|
|
3701
3745
|
var React20 = __toESM(require("react"), 1);
|
|
3702
|
-
var import_class_variance_authority5 = require("class-variance-authority");
|
|
3703
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");
|
|
3704
3811
|
var emptyMediaVariantOptions = ["default", "icon"];
|
|
3705
3812
|
var emptyMediaVariants = (0, import_class_variance_authority5.cva)(
|
|
3706
3813
|
"inline-flex shrink-0 items-center justify-center transition-[background-color,border-color,color,box-shadow] duration-sofya ease-sofya",
|
|
@@ -3716,11 +3823,11 @@ var emptyMediaVariants = (0, import_class_variance_authority5.cva)(
|
|
|
3716
3823
|
}
|
|
3717
3824
|
}
|
|
3718
3825
|
);
|
|
3719
|
-
var EmptyMedia =
|
|
3720
|
-
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 });
|
|
3721
3828
|
});
|
|
3722
3829
|
function EmptyHeader({ className, ...props }) {
|
|
3723
|
-
return /* @__PURE__ */ (0,
|
|
3830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3724
3831
|
"div",
|
|
3725
3832
|
{
|
|
3726
3833
|
className: cn("flex max-w-[34rem] flex-col items-center gap-4 text-center", className),
|
|
@@ -3729,7 +3836,7 @@ function EmptyHeader({ className, ...props }) {
|
|
|
3729
3836
|
);
|
|
3730
3837
|
}
|
|
3731
3838
|
function EmptyTitle({ children, className, ...props }) {
|
|
3732
|
-
return /* @__PURE__ */ (0,
|
|
3839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3733
3840
|
"h2",
|
|
3734
3841
|
{
|
|
3735
3842
|
className: cn("text-foreground", className),
|
|
@@ -3747,7 +3854,7 @@ function EmptyDescription({
|
|
|
3747
3854
|
className,
|
|
3748
3855
|
...props
|
|
3749
3856
|
}) {
|
|
3750
|
-
return /* @__PURE__ */ (0,
|
|
3857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3751
3858
|
"p",
|
|
3752
3859
|
{
|
|
3753
3860
|
className: cn("max-w-full text-muted-foreground whitespace-nowrap", className),
|
|
@@ -3761,7 +3868,7 @@ function EmptyDescription({
|
|
|
3761
3868
|
);
|
|
3762
3869
|
}
|
|
3763
3870
|
function EmptyContent({ children, className, ...props }) {
|
|
3764
|
-
return /* @__PURE__ */ (0,
|
|
3871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3765
3872
|
"div",
|
|
3766
3873
|
{
|
|
3767
3874
|
className: cn("flex flex-wrap items-center justify-center gap-4 text-center", className),
|
|
@@ -3772,9 +3879,9 @@ function EmptyContent({ children, className, ...props }) {
|
|
|
3772
3879
|
}
|
|
3773
3880
|
);
|
|
3774
3881
|
}
|
|
3775
|
-
var Empty =
|
|
3776
|
-
const hasCustomChildren =
|
|
3777
|
-
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)(
|
|
3778
3885
|
"div",
|
|
3779
3886
|
{
|
|
3780
3887
|
ref,
|
|
@@ -3783,13 +3890,13 @@ var Empty = React20.forwardRef(function Empty2({ children, className, content, d
|
|
|
3783
3890
|
className
|
|
3784
3891
|
),
|
|
3785
3892
|
...props,
|
|
3786
|
-
children: hasCustomChildren ? children : /* @__PURE__ */ (0,
|
|
3787
|
-
/* @__PURE__ */ (0,
|
|
3788
|
-
media ?? /* @__PURE__ */ (0,
|
|
3789
|
-
/* @__PURE__ */ (0,
|
|
3790
|
-
/* @__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." })
|
|
3791
3898
|
] }),
|
|
3792
|
-
content !== void 0 && content !== null ? /* @__PURE__ */ (0,
|
|
3899
|
+
content !== void 0 && content !== null ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(EmptyContent, { children: content }) : null
|
|
3793
3900
|
] })
|
|
3794
3901
|
}
|
|
3795
3902
|
);
|
|
@@ -3802,11 +3909,11 @@ EmptyDescription.displayName = "EmptyDescription";
|
|
|
3802
3909
|
EmptyContent.displayName = "EmptyContent";
|
|
3803
3910
|
|
|
3804
3911
|
// src/components/label.tsx
|
|
3805
|
-
var
|
|
3806
|
-
var
|
|
3807
|
-
var Label =
|
|
3912
|
+
var React22 = __toESM(require("react"), 1);
|
|
3913
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3914
|
+
var Label = React22.forwardRef(
|
|
3808
3915
|
({ children, className, ...props }, ref) => {
|
|
3809
|
-
return /* @__PURE__ */ (0,
|
|
3916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3810
3917
|
"label",
|
|
3811
3918
|
{
|
|
3812
3919
|
ref,
|
|
@@ -3829,11 +3936,109 @@ var Label = React21.forwardRef(
|
|
|
3829
3936
|
);
|
|
3830
3937
|
Label.displayName = "Label";
|
|
3831
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
|
+
|
|
3832
4037
|
// src/components/link.tsx
|
|
3833
|
-
var
|
|
4038
|
+
var React24 = __toESM(require("react"), 1);
|
|
3834
4039
|
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
3835
4040
|
var import_class_variance_authority6 = require("class-variance-authority");
|
|
3836
|
-
var
|
|
4041
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3837
4042
|
var linkVariants = (0, import_class_variance_authority6.cva)(
|
|
3838
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",
|
|
3839
4044
|
{
|
|
@@ -3848,9 +4053,9 @@ var linkVariants = (0, import_class_variance_authority6.cva)(
|
|
|
3848
4053
|
}
|
|
3849
4054
|
}
|
|
3850
4055
|
);
|
|
3851
|
-
var Link =
|
|
4056
|
+
var Link = React24.forwardRef(function Link2({ asChild = false, children, className, variant = "default", ...props }, ref) {
|
|
3852
4057
|
const Component = asChild ? import_react_slot3.Slot : "a";
|
|
3853
|
-
return /* @__PURE__ */ (0,
|
|
4058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3854
4059
|
Component,
|
|
3855
4060
|
{
|
|
3856
4061
|
ref,
|
|
@@ -3868,7 +4073,7 @@ var Link = React22.forwardRef(function Link2({ asChild = false, children, classN
|
|
|
3868
4073
|
Link.displayName = "Link";
|
|
3869
4074
|
|
|
3870
4075
|
// src/components/logo.tsx
|
|
3871
|
-
var
|
|
4076
|
+
var React25 = __toESM(require("react"), 1);
|
|
3872
4077
|
|
|
3873
4078
|
// src/components/logo-data.ts
|
|
3874
4079
|
var logoAssets = {
|
|
@@ -3965,7 +4170,7 @@ var logoAssets = {
|
|
|
3965
4170
|
};
|
|
3966
4171
|
|
|
3967
4172
|
// src/components/logo.tsx
|
|
3968
|
-
var
|
|
4173
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3969
4174
|
var logoVariants = ["mono", "default", "text", "full"];
|
|
3970
4175
|
var logoSizeOptions = ["sm", "md", "lg", "xl", "2xl"];
|
|
3971
4176
|
var logoSizeScale = {
|
|
@@ -4001,7 +4206,7 @@ function resolveLogoDimensions(variant, size, width, height) {
|
|
|
4001
4206
|
height: resolvedHeight
|
|
4002
4207
|
};
|
|
4003
4208
|
}
|
|
4004
|
-
var Logo =
|
|
4209
|
+
var Logo = React25.forwardRef(function Logo2({
|
|
4005
4210
|
variant = "full",
|
|
4006
4211
|
size = "lg",
|
|
4007
4212
|
width,
|
|
@@ -4012,10 +4217,10 @@ var Logo = React23.forwardRef(function Logo2({
|
|
|
4012
4217
|
...props
|
|
4013
4218
|
}, ref) {
|
|
4014
4219
|
const asset = logoAssets[variant];
|
|
4015
|
-
const titleId =
|
|
4220
|
+
const titleId = React25.useId();
|
|
4016
4221
|
const dimensions = resolveLogoDimensions(variant, size, width, height);
|
|
4017
4222
|
const monoFill = variant === "mono" ? monoColor ?? "currentColor" : void 0;
|
|
4018
|
-
return /* @__PURE__ */ (0,
|
|
4223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4019
4224
|
"svg",
|
|
4020
4225
|
{
|
|
4021
4226
|
ref,
|
|
@@ -4030,8 +4235,8 @@ var Logo = React23.forwardRef(function Logo2({
|
|
|
4030
4235
|
focusable: "false",
|
|
4031
4236
|
...props,
|
|
4032
4237
|
children: [
|
|
4033
|
-
title ? /* @__PURE__ */ (0,
|
|
4034
|
-
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)(
|
|
4035
4240
|
"path",
|
|
4036
4241
|
{
|
|
4037
4242
|
d: path.d,
|
|
@@ -4063,7 +4268,7 @@ var inheritedTypographyStyle = {
|
|
|
4063
4268
|
};
|
|
4064
4269
|
|
|
4065
4270
|
// src/components/pagination.tsx
|
|
4066
|
-
var
|
|
4271
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
4067
4272
|
var paginationLinkVariants = (0, import_class_variance_authority7.cva)(
|
|
4068
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",
|
|
4069
4274
|
{
|
|
@@ -4084,7 +4289,7 @@ var paginationLinkVariants = (0, import_class_variance_authority7.cva)(
|
|
|
4084
4289
|
}
|
|
4085
4290
|
);
|
|
4086
4291
|
function Pagination({ className, ...props }) {
|
|
4087
|
-
return /* @__PURE__ */ (0,
|
|
4292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4088
4293
|
"nav",
|
|
4089
4294
|
{
|
|
4090
4295
|
"aria-label": "Pagination",
|
|
@@ -4097,7 +4302,7 @@ function PaginationContent({
|
|
|
4097
4302
|
className,
|
|
4098
4303
|
...props
|
|
4099
4304
|
}) {
|
|
4100
|
-
return /* @__PURE__ */ (0,
|
|
4305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4101
4306
|
"ul",
|
|
4102
4307
|
{
|
|
4103
4308
|
className: cn(
|
|
@@ -4109,7 +4314,7 @@ function PaginationContent({
|
|
|
4109
4314
|
);
|
|
4110
4315
|
}
|
|
4111
4316
|
function PaginationItem({ className, ...props }) {
|
|
4112
|
-
return /* @__PURE__ */ (0,
|
|
4317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("li", { className: cn("list-none", className), ...props });
|
|
4113
4318
|
}
|
|
4114
4319
|
function PaginationLink({
|
|
4115
4320
|
asChild = false,
|
|
@@ -4119,7 +4324,7 @@ function PaginationLink({
|
|
|
4119
4324
|
...props
|
|
4120
4325
|
}) {
|
|
4121
4326
|
const Component = asChild ? import_react_slot4.Slot : "a";
|
|
4122
|
-
return /* @__PURE__ */ (0,
|
|
4327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4123
4328
|
Component,
|
|
4124
4329
|
{
|
|
4125
4330
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -4129,25 +4334,25 @@ function PaginationLink({
|
|
|
4129
4334
|
);
|
|
4130
4335
|
}
|
|
4131
4336
|
function PaginationChevronLeft() {
|
|
4132
|
-
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 });
|
|
4133
4338
|
}
|
|
4134
4339
|
function PaginationChevronRight() {
|
|
4135
|
-
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 });
|
|
4136
4341
|
}
|
|
4137
4342
|
function PaginationPrevious({
|
|
4138
4343
|
className,
|
|
4139
4344
|
text = "Previous",
|
|
4140
4345
|
...props
|
|
4141
4346
|
}) {
|
|
4142
|
-
return /* @__PURE__ */ (0,
|
|
4347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
4143
4348
|
PaginationLink,
|
|
4144
4349
|
{
|
|
4145
4350
|
"aria-label": "Go to previous page",
|
|
4146
4351
|
className: cn("gap-2 px-4", className),
|
|
4147
4352
|
...props,
|
|
4148
4353
|
children: [
|
|
4149
|
-
/* @__PURE__ */ (0,
|
|
4150
|
-
/* @__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, {
|
|
4151
4356
|
as: "span",
|
|
4152
4357
|
className: "block text-inherit",
|
|
4153
4358
|
size: "body",
|
|
@@ -4162,20 +4367,20 @@ function PaginationNext({
|
|
|
4162
4367
|
text = "Next",
|
|
4163
4368
|
...props
|
|
4164
4369
|
}) {
|
|
4165
|
-
return /* @__PURE__ */ (0,
|
|
4370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
4166
4371
|
PaginationLink,
|
|
4167
4372
|
{
|
|
4168
4373
|
"aria-label": "Go to next page",
|
|
4169
4374
|
className: cn("gap-2 px-4", className),
|
|
4170
4375
|
...props,
|
|
4171
4376
|
children: [
|
|
4172
|
-
/* @__PURE__ */ (0,
|
|
4377
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "hidden sm:block", children: renderTextContent(text, {
|
|
4173
4378
|
as: "span",
|
|
4174
4379
|
className: "block text-inherit",
|
|
4175
4380
|
size: "body",
|
|
4176
4381
|
style: inheritedTypographyStyle
|
|
4177
4382
|
}) }),
|
|
4178
|
-
/* @__PURE__ */ (0,
|
|
4383
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PaginationChevronRight, {})
|
|
4179
4384
|
]
|
|
4180
4385
|
}
|
|
4181
4386
|
);
|
|
@@ -4184,7 +4389,7 @@ function PaginationEllipsis({
|
|
|
4184
4389
|
className,
|
|
4185
4390
|
...props
|
|
4186
4391
|
}) {
|
|
4187
|
-
return /* @__PURE__ */ (0,
|
|
4392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
4188
4393
|
"span",
|
|
4189
4394
|
{
|
|
4190
4395
|
"aria-hidden": "true",
|
|
@@ -4194,22 +4399,90 @@ function PaginationEllipsis({
|
|
|
4194
4399
|
),
|
|
4195
4400
|
...props,
|
|
4196
4401
|
children: [
|
|
4197
|
-
/* @__PURE__ */ (0,
|
|
4402
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: renderTextContent("...", {
|
|
4198
4403
|
as: "span",
|
|
4199
4404
|
className: "block text-inherit",
|
|
4200
4405
|
size: "h5",
|
|
4201
4406
|
style: inheritedTypographyStyle
|
|
4202
4407
|
}) }),
|
|
4203
|
-
/* @__PURE__ */ (0,
|
|
4408
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
4204
4409
|
]
|
|
4205
4410
|
}
|
|
4206
4411
|
);
|
|
4207
4412
|
}
|
|
4208
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
|
+
|
|
4209
4482
|
// src/components/progress.tsx
|
|
4210
|
-
var
|
|
4483
|
+
var React27 = __toESM(require("react"), 1);
|
|
4211
4484
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
|
|
4212
|
-
var
|
|
4485
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
4213
4486
|
var progressSizeOptions = ["sm", "default", "lg"];
|
|
4214
4487
|
function clampProgressValue(value, max) {
|
|
4215
4488
|
if (Number.isNaN(value)) {
|
|
@@ -4217,7 +4490,7 @@ function clampProgressValue(value, max) {
|
|
|
4217
4490
|
}
|
|
4218
4491
|
return Math.min(Math.max(value, 0), max);
|
|
4219
4492
|
}
|
|
4220
|
-
var Progress =
|
|
4493
|
+
var Progress = React27.forwardRef(function Progress2({
|
|
4221
4494
|
className,
|
|
4222
4495
|
indicatorClassName,
|
|
4223
4496
|
max = 100,
|
|
@@ -4228,7 +4501,7 @@ var Progress = React24.forwardRef(function Progress2({
|
|
|
4228
4501
|
const safeMax = max > 0 ? max : 100;
|
|
4229
4502
|
const resolvedValue = typeof value === "number" ? clampProgressValue(value, safeMax) : null;
|
|
4230
4503
|
const progressScale = resolvedValue === null ? void 0 : Number((resolvedValue / safeMax).toFixed(4));
|
|
4231
|
-
return /* @__PURE__ */ (0,
|
|
4504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4232
4505
|
ProgressPrimitive.Root,
|
|
4233
4506
|
{
|
|
4234
4507
|
ref,
|
|
@@ -4241,7 +4514,7 @@ var Progress = React24.forwardRef(function Progress2({
|
|
|
4241
4514
|
className
|
|
4242
4515
|
),
|
|
4243
4516
|
...props,
|
|
4244
|
-
children: /* @__PURE__ */ (0,
|
|
4517
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4245
4518
|
ProgressPrimitive.Indicator,
|
|
4246
4519
|
{
|
|
4247
4520
|
"data-slot": "progress-indicator",
|
|
@@ -4258,19 +4531,19 @@ var Progress = React24.forwardRef(function Progress2({
|
|
|
4258
4531
|
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
4259
4532
|
|
|
4260
4533
|
// src/components/radio-group.tsx
|
|
4261
|
-
var
|
|
4534
|
+
var React28 = __toESM(require("react"), 1);
|
|
4262
4535
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
4263
|
-
var
|
|
4536
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4264
4537
|
var radioGroupOrientationOptions = ["horizontal", "vertical"];
|
|
4265
4538
|
var radioGroupVariantOptions = ["default", "pill", "option"];
|
|
4266
|
-
var RadioGroupContext =
|
|
4539
|
+
var RadioGroupContext = React28.createContext({
|
|
4267
4540
|
variant: "default"
|
|
4268
4541
|
});
|
|
4269
|
-
var RadioGroupOptionContext =
|
|
4542
|
+
var RadioGroupOptionContext = React28.createContext(
|
|
4270
4543
|
{}
|
|
4271
4544
|
);
|
|
4272
|
-
var RadioGroupRoot =
|
|
4273
|
-
return /* @__PURE__ */ (0,
|
|
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)(
|
|
4274
4547
|
RadioGroupPrimitive.Root,
|
|
4275
4548
|
{
|
|
4276
4549
|
ref,
|
|
@@ -4286,7 +4559,7 @@ var RadioGroupRoot = React25.forwardRef(function RadioGroup2({ className, varian
|
|
|
4286
4559
|
) });
|
|
4287
4560
|
});
|
|
4288
4561
|
RadioGroupRoot.displayName = RadioGroupPrimitive.Root.displayName;
|
|
4289
|
-
var RadioGroupItem =
|
|
4562
|
+
var RadioGroupItem = React28.forwardRef(function RadioGroupItem2({
|
|
4290
4563
|
className,
|
|
4291
4564
|
controlClassName,
|
|
4292
4565
|
description,
|
|
@@ -4298,14 +4571,14 @@ var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
|
4298
4571
|
labelClassName,
|
|
4299
4572
|
...props
|
|
4300
4573
|
}, ref) {
|
|
4301
|
-
const { variant } =
|
|
4302
|
-
const generatedId =
|
|
4574
|
+
const { variant } = React28.useContext(RadioGroupContext);
|
|
4575
|
+
const generatedId = React28.useId();
|
|
4303
4576
|
const resolvedId = id ?? generatedId;
|
|
4304
4577
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
4305
4578
|
const descriptionId = description ? `${resolvedId}-description` : void 0;
|
|
4306
|
-
const
|
|
4579
|
+
const alignClassName2 = description ? "items-start" : "items-center";
|
|
4307
4580
|
if (variant === "pill") {
|
|
4308
|
-
return /* @__PURE__ */ (0,
|
|
4581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4309
4582
|
RadioGroupPrimitive.Item,
|
|
4310
4583
|
{
|
|
4311
4584
|
ref,
|
|
@@ -4320,8 +4593,8 @@ var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
|
4320
4593
|
className
|
|
4321
4594
|
),
|
|
4322
4595
|
...props,
|
|
4323
|
-
children: label || description ? /* @__PURE__ */ (0,
|
|
4324
|
-
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)(
|
|
4325
4598
|
"span",
|
|
4326
4599
|
{
|
|
4327
4600
|
id: labelId,
|
|
@@ -4336,7 +4609,7 @@ var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
|
4336
4609
|
})
|
|
4337
4610
|
}
|
|
4338
4611
|
) : null,
|
|
4339
|
-
description ? /* @__PURE__ */ (0,
|
|
4612
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4340
4613
|
"span",
|
|
4341
4614
|
{
|
|
4342
4615
|
id: descriptionId,
|
|
@@ -4355,16 +4628,16 @@ var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
|
4355
4628
|
}
|
|
4356
4629
|
);
|
|
4357
4630
|
}
|
|
4358
|
-
return /* @__PURE__ */ (0,
|
|
4631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
4359
4632
|
"label",
|
|
4360
4633
|
{
|
|
4361
4634
|
className: selectionControlContainerClasses({
|
|
4362
|
-
alignClassName,
|
|
4635
|
+
alignClassName: alignClassName2,
|
|
4363
4636
|
className,
|
|
4364
4637
|
disabled
|
|
4365
4638
|
}),
|
|
4366
4639
|
children: [
|
|
4367
|
-
/* @__PURE__ */ (0,
|
|
4640
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4368
4641
|
RadioGroupPrimitive.Item,
|
|
4369
4642
|
{
|
|
4370
4643
|
ref,
|
|
@@ -4380,7 +4653,7 @@ var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
|
4380
4653
|
controlClassName
|
|
4381
4654
|
),
|
|
4382
4655
|
...props,
|
|
4383
|
-
children: /* @__PURE__ */ (0,
|
|
4656
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(RadioGroupPrimitive.Indicator, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4384
4657
|
"span",
|
|
4385
4658
|
{
|
|
4386
4659
|
"data-slot": "radio-group-indicator",
|
|
@@ -4392,8 +4665,8 @@ var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
|
4392
4665
|
) })
|
|
4393
4666
|
}
|
|
4394
4667
|
),
|
|
4395
|
-
label || description ? /* @__PURE__ */ (0,
|
|
4396
|
-
label ? /* @__PURE__ */ (0,
|
|
4668
|
+
label || description ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: selectionControlContentBaseClasses, children: [
|
|
4669
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4397
4670
|
"span",
|
|
4398
4671
|
{
|
|
4399
4672
|
id: labelId,
|
|
@@ -4408,7 +4681,7 @@ var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
|
4408
4681
|
})
|
|
4409
4682
|
}
|
|
4410
4683
|
) : null,
|
|
4411
|
-
description ? /* @__PURE__ */ (0,
|
|
4684
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4412
4685
|
"span",
|
|
4413
4686
|
{
|
|
4414
4687
|
id: descriptionId,
|
|
@@ -4429,7 +4702,7 @@ var RadioGroupItem = React25.forwardRef(function RadioGroupItem2({
|
|
|
4429
4702
|
);
|
|
4430
4703
|
});
|
|
4431
4704
|
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
4432
|
-
var RadioGroupOptionAvatar =
|
|
4705
|
+
var RadioGroupOptionAvatar = React28.forwardRef(function RadioGroupOptionAvatar2({
|
|
4433
4706
|
alt,
|
|
4434
4707
|
avatarClassName,
|
|
4435
4708
|
avatarProps,
|
|
@@ -4439,7 +4712,7 @@ var RadioGroupOptionAvatar = React25.forwardRef(function RadioGroupOptionAvatar2
|
|
|
4439
4712
|
src,
|
|
4440
4713
|
...props
|
|
4441
4714
|
}, ref) {
|
|
4442
|
-
return /* @__PURE__ */ (0,
|
|
4715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4443
4716
|
"span",
|
|
4444
4717
|
{
|
|
4445
4718
|
ref,
|
|
@@ -4449,7 +4722,7 @@ var RadioGroupOptionAvatar = React25.forwardRef(function RadioGroupOptionAvatar2
|
|
|
4449
4722
|
className
|
|
4450
4723
|
),
|
|
4451
4724
|
...props,
|
|
4452
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
4725
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4453
4726
|
Avatar,
|
|
4454
4727
|
{
|
|
4455
4728
|
...avatarProps,
|
|
@@ -4466,9 +4739,9 @@ var RadioGroupOptionAvatar = React25.forwardRef(function RadioGroupOptionAvatar2
|
|
|
4466
4739
|
);
|
|
4467
4740
|
});
|
|
4468
4741
|
RadioGroupOptionAvatar.displayName = "RadioGroupOptionAvatar";
|
|
4469
|
-
var RadioGroupOptionLabel =
|
|
4470
|
-
const { labelId } =
|
|
4471
|
-
return /* @__PURE__ */ (0,
|
|
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)(
|
|
4472
4745
|
"span",
|
|
4473
4746
|
{
|
|
4474
4747
|
ref,
|
|
@@ -4488,9 +4761,9 @@ var RadioGroupOptionLabel = React25.forwardRef(function RadioGroupOptionLabel2({
|
|
|
4488
4761
|
);
|
|
4489
4762
|
});
|
|
4490
4763
|
RadioGroupOptionLabel.displayName = "RadioGroupOptionLabel";
|
|
4491
|
-
var RadioGroupOptionDescription =
|
|
4492
|
-
const { descriptionId } =
|
|
4493
|
-
return /* @__PURE__ */ (0,
|
|
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)(
|
|
4494
4767
|
"span",
|
|
4495
4768
|
{
|
|
4496
4769
|
ref,
|
|
@@ -4509,8 +4782,8 @@ var RadioGroupOptionDescription = React25.forwardRef(function RadioGroupOptionDe
|
|
|
4509
4782
|
);
|
|
4510
4783
|
});
|
|
4511
4784
|
RadioGroupOptionDescription.displayName = "RadioGroupOptionDescription";
|
|
4512
|
-
var RadioGroupOptionIndicator =
|
|
4513
|
-
return /* @__PURE__ */ (0,
|
|
4785
|
+
var RadioGroupOptionIndicator = React28.forwardRef(function RadioGroupOptionIndicator2({ children, className, ...props }, ref) {
|
|
4786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4514
4787
|
"span",
|
|
4515
4788
|
{
|
|
4516
4789
|
ref,
|
|
@@ -4520,7 +4793,7 @@ var RadioGroupOptionIndicator = React25.forwardRef(function RadioGroupOptionIndi
|
|
|
4520
4793
|
className
|
|
4521
4794
|
),
|
|
4522
4795
|
...props,
|
|
4523
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
4796
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4524
4797
|
"svg",
|
|
4525
4798
|
{
|
|
4526
4799
|
"aria-hidden": "true",
|
|
@@ -4528,7 +4801,7 @@ var RadioGroupOptionIndicator = React25.forwardRef(function RadioGroupOptionIndi
|
|
|
4528
4801
|
className: "h-6 w-6 opacity-0 transition-opacity duration-sofya ease-sofya group-data-[state=checked]/radio-option:opacity-100",
|
|
4529
4802
|
fill: "none",
|
|
4530
4803
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4531
|
-
children: /* @__PURE__ */ (0,
|
|
4804
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4532
4805
|
"path",
|
|
4533
4806
|
{
|
|
4534
4807
|
d: "M9.55 17.6537L4.2155 12.3192L5.2845 11.25L9.55 15.5155L18.7155 6.35L19.7845 7.41925L9.55 17.6537Z",
|
|
@@ -4542,14 +4815,14 @@ var RadioGroupOptionIndicator = React25.forwardRef(function RadioGroupOptionIndi
|
|
|
4542
4815
|
});
|
|
4543
4816
|
RadioGroupOptionIndicator.displayName = "RadioGroupOptionIndicator";
|
|
4544
4817
|
function isOptionChild(child, component) {
|
|
4545
|
-
return
|
|
4818
|
+
return React28.isValidElement(child) && child.type === component;
|
|
4546
4819
|
}
|
|
4547
|
-
var RadioGroupOption =
|
|
4548
|
-
const generatedId =
|
|
4820
|
+
var RadioGroupOption = React28.forwardRef(function RadioGroupOption2({ children, className, disabled, id, ...props }, ref) {
|
|
4821
|
+
const generatedId = React28.useId();
|
|
4549
4822
|
const resolvedId = id ?? generatedId;
|
|
4550
4823
|
const labelId = `${resolvedId}-label`;
|
|
4551
4824
|
const descriptionId = `${resolvedId}-description`;
|
|
4552
|
-
const childArray =
|
|
4825
|
+
const childArray = React28.Children.toArray(children);
|
|
4553
4826
|
const leadingChildren = [];
|
|
4554
4827
|
const contentChildren = [];
|
|
4555
4828
|
let indicatorChild = null;
|
|
@@ -4564,7 +4837,7 @@ var RadioGroupOption = React25.forwardRef(function RadioGroupOption2({ children,
|
|
|
4564
4837
|
}
|
|
4565
4838
|
contentChildren.push(child);
|
|
4566
4839
|
}
|
|
4567
|
-
return /* @__PURE__ */ (0,
|
|
4840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(RadioGroupOptionContext.Provider, { value: { descriptionId, labelId }, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
4568
4841
|
RadioGroupPrimitive.Item,
|
|
4569
4842
|
{
|
|
4570
4843
|
ref,
|
|
@@ -4584,7 +4857,7 @@ var RadioGroupOption = React25.forwardRef(function RadioGroupOption2({ children,
|
|
|
4584
4857
|
...props,
|
|
4585
4858
|
children: [
|
|
4586
4859
|
leadingChildren,
|
|
4587
|
-
/* @__PURE__ */ (0,
|
|
4860
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4588
4861
|
"span",
|
|
4589
4862
|
{
|
|
4590
4863
|
"data-slot": "radio-group-option-content",
|
|
@@ -4592,7 +4865,7 @@ var RadioGroupOption = React25.forwardRef(function RadioGroupOption2({ children,
|
|
|
4592
4865
|
children: contentChildren
|
|
4593
4866
|
}
|
|
4594
4867
|
),
|
|
4595
|
-
indicatorChild ?? /* @__PURE__ */ (0,
|
|
4868
|
+
indicatorChild ?? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(RadioGroupOptionIndicator, {})
|
|
4596
4869
|
]
|
|
4597
4870
|
}
|
|
4598
4871
|
) });
|
|
@@ -4608,13 +4881,37 @@ var RadioGroup3 = Object.assign(RadioGroupRoot, {
|
|
|
4608
4881
|
OptionLabel: RadioGroupOptionLabel
|
|
4609
4882
|
});
|
|
4610
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";
|
|
4907
|
+
|
|
4611
4908
|
// src/components/scroll-area.tsx
|
|
4612
|
-
var
|
|
4909
|
+
var React30 = __toESM(require("react"), 1);
|
|
4613
4910
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
4614
|
-
var
|
|
4911
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4615
4912
|
var scrollAreaOrientationOptions = ["horizontal", "vertical"];
|
|
4616
|
-
var ScrollArea =
|
|
4617
|
-
return /* @__PURE__ */ (0,
|
|
4913
|
+
var ScrollArea = React30.forwardRef(function ScrollArea2({ className, ...props }, ref) {
|
|
4914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4618
4915
|
ScrollAreaPrimitive.Root,
|
|
4619
4916
|
{
|
|
4620
4917
|
ref,
|
|
@@ -4625,8 +4922,8 @@ var ScrollArea = React26.forwardRef(function ScrollArea2({ className, ...props }
|
|
|
4625
4922
|
);
|
|
4626
4923
|
});
|
|
4627
4924
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
4628
|
-
var ScrollAreaViewport =
|
|
4629
|
-
return /* @__PURE__ */ (0,
|
|
4925
|
+
var ScrollAreaViewport = React30.forwardRef(function ScrollAreaViewport2({ className, ...props }, ref) {
|
|
4926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4630
4927
|
ScrollAreaPrimitive.Viewport,
|
|
4631
4928
|
{
|
|
4632
4929
|
ref,
|
|
@@ -4640,8 +4937,8 @@ var ScrollAreaViewport = React26.forwardRef(function ScrollAreaViewport2({ class
|
|
|
4640
4937
|
);
|
|
4641
4938
|
});
|
|
4642
4939
|
ScrollAreaViewport.displayName = ScrollAreaPrimitive.Viewport.displayName;
|
|
4643
|
-
var ScrollAreaScrollbar =
|
|
4644
|
-
return /* @__PURE__ */ (0,
|
|
4940
|
+
var ScrollAreaScrollbar = React30.forwardRef(function ScrollAreaScrollbar2({ className, orientation = "vertical", thumbClassName, ...props }, ref) {
|
|
4941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4645
4942
|
ScrollAreaPrimitive.Scrollbar,
|
|
4646
4943
|
{
|
|
4647
4944
|
ref,
|
|
@@ -4652,7 +4949,7 @@ var ScrollAreaScrollbar = React26.forwardRef(function ScrollAreaScrollbar2({ cla
|
|
|
4652
4949
|
className
|
|
4653
4950
|
),
|
|
4654
4951
|
...props,
|
|
4655
|
-
children: /* @__PURE__ */ (0,
|
|
4952
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4656
4953
|
ScrollAreaPrimitive.Thumb,
|
|
4657
4954
|
{
|
|
4658
4955
|
"data-slot": "scroll-area-thumb",
|
|
@@ -4666,8 +4963,8 @@ var ScrollAreaScrollbar = React26.forwardRef(function ScrollAreaScrollbar2({ cla
|
|
|
4666
4963
|
);
|
|
4667
4964
|
});
|
|
4668
4965
|
ScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;
|
|
4669
|
-
var ScrollAreaCorner =
|
|
4670
|
-
return /* @__PURE__ */ (0,
|
|
4966
|
+
var ScrollAreaCorner = React30.forwardRef(function ScrollAreaCorner2({ className, ...props }, ref) {
|
|
4967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4671
4968
|
ScrollAreaPrimitive.Corner,
|
|
4672
4969
|
{
|
|
4673
4970
|
ref,
|
|
@@ -4680,19 +4977,19 @@ var ScrollAreaCorner = React26.forwardRef(function ScrollAreaCorner2({ className
|
|
|
4680
4977
|
ScrollAreaCorner.displayName = ScrollAreaPrimitive.Corner.displayName;
|
|
4681
4978
|
|
|
4682
4979
|
// src/components/select.tsx
|
|
4683
|
-
var
|
|
4980
|
+
var React31 = __toESM(require("react"), 1);
|
|
4684
4981
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
4685
4982
|
|
|
4686
4983
|
// src/lib/form-control-classes.ts
|
|
4687
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)]";
|
|
4688
4985
|
|
|
4689
4986
|
// src/components/select.tsx
|
|
4690
|
-
var
|
|
4987
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
4691
4988
|
var selectSizeOptions = ["default", "sm"];
|
|
4692
4989
|
var Select = SelectPrimitive.Root;
|
|
4693
4990
|
var SelectGroup = SelectPrimitive.Group;
|
|
4694
|
-
var SelectValue =
|
|
4695
|
-
return /* @__PURE__ */ (0,
|
|
4991
|
+
var SelectValue = React31.forwardRef(function SelectValue2({ className, ...props }, ref) {
|
|
4992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4696
4993
|
Text,
|
|
4697
4994
|
{
|
|
4698
4995
|
ref,
|
|
@@ -4701,13 +4998,13 @@ var SelectValue = React27.forwardRef(function SelectValue2({ className, ...props
|
|
|
4701
4998
|
className: cn("block truncate text-inherit", className),
|
|
4702
4999
|
size: "tiny",
|
|
4703
5000
|
style: inheritedTypographyStyle,
|
|
4704
|
-
children: /* @__PURE__ */ (0,
|
|
5001
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectPrimitive.Value, { className: "block truncate", ...props })
|
|
4705
5002
|
}
|
|
4706
5003
|
);
|
|
4707
5004
|
});
|
|
4708
5005
|
SelectValue.displayName = SelectPrimitive.Value.displayName;
|
|
4709
|
-
var SelectTrigger =
|
|
4710
|
-
return /* @__PURE__ */ (0,
|
|
5006
|
+
var SelectTrigger = React31.forwardRef(function SelectTrigger2({ className, children, size = "default", ...props }, ref) {
|
|
5007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
4711
5008
|
SelectPrimitive.Trigger,
|
|
4712
5009
|
{
|
|
4713
5010
|
ref,
|
|
@@ -4721,7 +5018,7 @@ var SelectTrigger = React27.forwardRef(function SelectTrigger2({ className, chil
|
|
|
4721
5018
|
...props,
|
|
4722
5019
|
children: [
|
|
4723
5020
|
children,
|
|
4724
|
-
/* @__PURE__ */ (0,
|
|
5021
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4725
5022
|
Icon,
|
|
4726
5023
|
{
|
|
4727
5024
|
name: "caret-down",
|
|
@@ -4734,8 +5031,8 @@ var SelectTrigger = React27.forwardRef(function SelectTrigger2({ className, chil
|
|
|
4734
5031
|
);
|
|
4735
5032
|
});
|
|
4736
5033
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
4737
|
-
var SelectScrollUpButton =
|
|
4738
|
-
return /* @__PURE__ */ (0,
|
|
5034
|
+
var SelectScrollUpButton = React31.forwardRef(function SelectScrollUpButton2({ className, ...props }, ref) {
|
|
5035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4739
5036
|
SelectPrimitive.ScrollUpButton,
|
|
4740
5037
|
{
|
|
4741
5038
|
ref,
|
|
@@ -4745,13 +5042,13 @@ var SelectScrollUpButton = React27.forwardRef(function SelectScrollUpButton2({ c
|
|
|
4745
5042
|
className
|
|
4746
5043
|
),
|
|
4747
5044
|
...props,
|
|
4748
|
-
children: /* @__PURE__ */ (0,
|
|
5045
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { name: "caret-up", size: 12 })
|
|
4749
5046
|
}
|
|
4750
5047
|
);
|
|
4751
5048
|
});
|
|
4752
5049
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
4753
|
-
var SelectScrollDownButton =
|
|
4754
|
-
return /* @__PURE__ */ (0,
|
|
5050
|
+
var SelectScrollDownButton = React31.forwardRef(function SelectScrollDownButton2({ className, ...props }, ref) {
|
|
5051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4755
5052
|
SelectPrimitive.ScrollDownButton,
|
|
4756
5053
|
{
|
|
4757
5054
|
ref,
|
|
@@ -4761,13 +5058,13 @@ var SelectScrollDownButton = React27.forwardRef(function SelectScrollDownButton2
|
|
|
4761
5058
|
className
|
|
4762
5059
|
),
|
|
4763
5060
|
...props,
|
|
4764
|
-
children: /* @__PURE__ */ (0,
|
|
5061
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { name: "caret-down", size: 12 })
|
|
4765
5062
|
}
|
|
4766
5063
|
);
|
|
4767
5064
|
});
|
|
4768
5065
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
4769
|
-
var SelectContent =
|
|
4770
|
-
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)(
|
|
4771
5068
|
SelectPrimitive.Content,
|
|
4772
5069
|
{
|
|
4773
5070
|
ref,
|
|
@@ -4780,8 +5077,8 @@ var SelectContent = React27.forwardRef(function SelectContent2({ className, chil
|
|
|
4780
5077
|
),
|
|
4781
5078
|
...props,
|
|
4782
5079
|
children: [
|
|
4783
|
-
/* @__PURE__ */ (0,
|
|
4784
|
-
/* @__PURE__ */ (0,
|
|
5080
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectScrollUpButton, {}),
|
|
5081
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4785
5082
|
SelectPrimitive.Viewport,
|
|
4786
5083
|
{
|
|
4787
5084
|
"data-slot": "select-viewport",
|
|
@@ -4789,14 +5086,14 @@ var SelectContent = React27.forwardRef(function SelectContent2({ className, chil
|
|
|
4789
5086
|
children
|
|
4790
5087
|
}
|
|
4791
5088
|
),
|
|
4792
|
-
/* @__PURE__ */ (0,
|
|
5089
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectScrollDownButton, {})
|
|
4793
5090
|
]
|
|
4794
5091
|
}
|
|
4795
5092
|
) });
|
|
4796
5093
|
});
|
|
4797
5094
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
4798
|
-
var SelectLabel =
|
|
4799
|
-
return /* @__PURE__ */ (0,
|
|
5095
|
+
var SelectLabel = React31.forwardRef(function SelectLabel2({ className, ...props }, ref) {
|
|
5096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4800
5097
|
SelectPrimitive.Label,
|
|
4801
5098
|
{
|
|
4802
5099
|
ref,
|
|
@@ -4818,8 +5115,8 @@ var SelectLabel = React27.forwardRef(function SelectLabel2({ className, ...props
|
|
|
4818
5115
|
);
|
|
4819
5116
|
});
|
|
4820
5117
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
4821
|
-
var SelectItem =
|
|
4822
|
-
return /* @__PURE__ */ (0,
|
|
5118
|
+
var SelectItem = React31.forwardRef(function SelectItem2({ className, children, ...props }, ref) {
|
|
5119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
4823
5120
|
SelectPrimitive.Item,
|
|
4824
5121
|
{
|
|
4825
5122
|
ref,
|
|
@@ -4830,20 +5127,20 @@ var SelectItem = React27.forwardRef(function SelectItem2({ className, children,
|
|
|
4830
5127
|
),
|
|
4831
5128
|
...props,
|
|
4832
5129
|
children: [
|
|
4833
|
-
/* @__PURE__ */ (0,
|
|
5130
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectPrimitive.ItemText, { className: "truncate", children: renderTextContent(children, {
|
|
4834
5131
|
as: "span",
|
|
4835
5132
|
className: "block truncate text-[color:var(--sofya-text-default)]",
|
|
4836
5133
|
size: "tiny",
|
|
4837
5134
|
style: inheritedTypographyStyle
|
|
4838
5135
|
}) }),
|
|
4839
|
-
/* @__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 }) }) })
|
|
4840
5137
|
]
|
|
4841
5138
|
}
|
|
4842
5139
|
);
|
|
4843
5140
|
});
|
|
4844
5141
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
4845
|
-
var SelectSeparator =
|
|
4846
|
-
return /* @__PURE__ */ (0,
|
|
5142
|
+
var SelectSeparator = React31.forwardRef(function SelectSeparator2({ className, ...props }, ref) {
|
|
5143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4847
5144
|
SelectPrimitive.Separator,
|
|
4848
5145
|
{
|
|
4849
5146
|
ref,
|
|
@@ -4856,11 +5153,11 @@ var SelectSeparator = React27.forwardRef(function SelectSeparator2({ className,
|
|
|
4856
5153
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
4857
5154
|
|
|
4858
5155
|
// src/components/separator.tsx
|
|
4859
|
-
var
|
|
5156
|
+
var React32 = __toESM(require("react"), 1);
|
|
4860
5157
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
4861
|
-
var
|
|
4862
|
-
var Separator2 =
|
|
4863
|
-
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)(
|
|
4864
5161
|
SeparatorPrimitive.Root,
|
|
4865
5162
|
{
|
|
4866
5163
|
ref,
|
|
@@ -4879,8 +5176,8 @@ var Separator2 = React28.forwardRef(function Separator3({ className, decorative
|
|
|
4879
5176
|
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
4880
5177
|
|
|
4881
5178
|
// src/components/slider.tsx
|
|
4882
|
-
var
|
|
4883
|
-
var
|
|
5179
|
+
var React33 = __toESM(require("react"), 1);
|
|
5180
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
4884
5181
|
function clampSliderValue(value, min, max) {
|
|
4885
5182
|
if (Number.isNaN(value)) {
|
|
4886
5183
|
return min;
|
|
@@ -4905,7 +5202,7 @@ function resolveSliderMeasurement(value, fallback) {
|
|
|
4905
5202
|
function isTextValue(value) {
|
|
4906
5203
|
return typeof value === "string" || typeof value === "number";
|
|
4907
5204
|
}
|
|
4908
|
-
var Slider =
|
|
5205
|
+
var Slider = React33.forwardRef(function Slider2({
|
|
4909
5206
|
className,
|
|
4910
5207
|
defaultValue,
|
|
4911
5208
|
formatValue,
|
|
@@ -4928,7 +5225,7 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
4928
5225
|
valueClassName,
|
|
4929
5226
|
...props
|
|
4930
5227
|
}, ref) {
|
|
4931
|
-
const resolvedId =
|
|
5228
|
+
const resolvedId = React33.useId();
|
|
4932
5229
|
const inputId = id ?? resolvedId;
|
|
4933
5230
|
const safeMin = min;
|
|
4934
5231
|
const safeMax = resolveSliderMax(safeMin, max);
|
|
@@ -4937,7 +5234,7 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
4937
5234
|
onChange: onValueChange,
|
|
4938
5235
|
value
|
|
4939
5236
|
});
|
|
4940
|
-
|
|
5237
|
+
React33.useEffect(() => {
|
|
4941
5238
|
if (value !== void 0) {
|
|
4942
5239
|
return;
|
|
4943
5240
|
}
|
|
@@ -4984,14 +5281,14 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
4984
5281
|
setControllableValue(nextValue);
|
|
4985
5282
|
onChange?.(event);
|
|
4986
5283
|
};
|
|
4987
|
-
return /* @__PURE__ */ (0,
|
|
5284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4988
5285
|
"div",
|
|
4989
5286
|
{
|
|
4990
5287
|
"data-slot": "slider",
|
|
4991
5288
|
className: cn("grid w-full gap-2", className),
|
|
4992
5289
|
children: [
|
|
4993
|
-
label || showValue ? /* @__PURE__ */ (0,
|
|
4994
|
-
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)(
|
|
4995
5292
|
FieldLabel,
|
|
4996
5293
|
{
|
|
4997
5294
|
htmlFor: inputId,
|
|
@@ -5002,8 +5299,8 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
5002
5299
|
textClassName: "block min-w-0 text-[color:var(--sofya-text-default)]",
|
|
5003
5300
|
children: label
|
|
5004
5301
|
}
|
|
5005
|
-
) : /* @__PURE__ */ (0,
|
|
5006
|
-
showValue ? /* @__PURE__ */ (0,
|
|
5302
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", {}),
|
|
5303
|
+
showValue ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5007
5304
|
"div",
|
|
5008
5305
|
{
|
|
5009
5306
|
className: cn(
|
|
@@ -5021,7 +5318,7 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
5021
5318
|
}
|
|
5022
5319
|
) : null
|
|
5023
5320
|
] }) : null,
|
|
5024
|
-
/* @__PURE__ */ (0,
|
|
5321
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
5025
5322
|
"div",
|
|
5026
5323
|
{
|
|
5027
5324
|
"data-slot": "slider-control",
|
|
@@ -5031,7 +5328,7 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
5031
5328
|
),
|
|
5032
5329
|
style: controlStyle,
|
|
5033
5330
|
children: [
|
|
5034
|
-
/* @__PURE__ */ (0,
|
|
5331
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5035
5332
|
"input",
|
|
5036
5333
|
{
|
|
5037
5334
|
...props,
|
|
@@ -5048,7 +5345,7 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
5048
5345
|
style: inputBoundsStyle
|
|
5049
5346
|
}
|
|
5050
5347
|
),
|
|
5051
|
-
/* @__PURE__ */ (0,
|
|
5348
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5052
5349
|
"div",
|
|
5053
5350
|
{
|
|
5054
5351
|
"data-slot": "slider-track",
|
|
@@ -5059,7 +5356,7 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
5059
5356
|
style: trackBoundsStyle
|
|
5060
5357
|
}
|
|
5061
5358
|
),
|
|
5062
|
-
/* @__PURE__ */ (0,
|
|
5359
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5063
5360
|
"div",
|
|
5064
5361
|
{
|
|
5065
5362
|
"data-slot": "slider-range",
|
|
@@ -5070,7 +5367,7 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
5070
5367
|
style: rangeStyle
|
|
5071
5368
|
}
|
|
5072
5369
|
),
|
|
5073
|
-
/* @__PURE__ */ (0,
|
|
5370
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5074
5371
|
"div",
|
|
5075
5372
|
{
|
|
5076
5373
|
"data-slot": "slider-thumb",
|
|
@@ -5091,10 +5388,10 @@ var Slider = React29.forwardRef(function Slider2({
|
|
|
5091
5388
|
Slider.displayName = "Slider";
|
|
5092
5389
|
|
|
5093
5390
|
// src/components/skeleton.tsx
|
|
5094
|
-
var
|
|
5095
|
-
var
|
|
5096
|
-
var Skeleton =
|
|
5097
|
-
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)(
|
|
5098
5395
|
"div",
|
|
5099
5396
|
{
|
|
5100
5397
|
ref,
|
|
@@ -5109,15 +5406,15 @@ var Skeleton = React30.forwardRef(function Skeleton2({ className, ...props }, re
|
|
|
5109
5406
|
Skeleton.displayName = "Skeleton";
|
|
5110
5407
|
|
|
5111
5408
|
// src/components/sonner.tsx
|
|
5112
|
-
var
|
|
5409
|
+
var React35 = __toESM(require("react"), 1);
|
|
5113
5410
|
var import_sonner = require("sonner");
|
|
5114
|
-
var
|
|
5411
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
5115
5412
|
var notificationVariantOptions = ["default", "success", "error", "warning"];
|
|
5116
5413
|
function ToastStatusIcon({
|
|
5117
5414
|
iconName,
|
|
5118
5415
|
className
|
|
5119
5416
|
}) {
|
|
5120
|
-
return /* @__PURE__ */ (0,
|
|
5417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5121
5418
|
"span",
|
|
5122
5419
|
{
|
|
5123
5420
|
"aria-hidden": "true",
|
|
@@ -5125,7 +5422,7 @@ function ToastStatusIcon({
|
|
|
5125
5422
|
"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full border shadow-sofya-sm",
|
|
5126
5423
|
className
|
|
5127
5424
|
),
|
|
5128
|
-
children: /* @__PURE__ */ (0,
|
|
5425
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { name: iconName, size: 16 })
|
|
5129
5426
|
}
|
|
5130
5427
|
);
|
|
5131
5428
|
}
|
|
@@ -5146,35 +5443,35 @@ var defaultToastClassNames = {
|
|
|
5146
5443
|
loading: "border-border bg-card text-foreground"
|
|
5147
5444
|
};
|
|
5148
5445
|
var defaultToastIcons = {
|
|
5149
|
-
success: /* @__PURE__ */ (0,
|
|
5446
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5150
5447
|
ToastStatusIcon,
|
|
5151
5448
|
{
|
|
5152
5449
|
iconName: "check",
|
|
5153
5450
|
className: "border-success/15 bg-success/12 text-success"
|
|
5154
5451
|
}
|
|
5155
5452
|
),
|
|
5156
|
-
error: /* @__PURE__ */ (0,
|
|
5453
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5157
5454
|
ToastStatusIcon,
|
|
5158
5455
|
{
|
|
5159
5456
|
iconName: "x",
|
|
5160
5457
|
className: "border-destructive/15 bg-destructive/12 text-destructive"
|
|
5161
5458
|
}
|
|
5162
5459
|
),
|
|
5163
|
-
warning: /* @__PURE__ */ (0,
|
|
5460
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5164
5461
|
ToastStatusIcon,
|
|
5165
5462
|
{
|
|
5166
5463
|
iconName: "question",
|
|
5167
5464
|
className: "border-warning/20 bg-warning/15 text-foreground"
|
|
5168
5465
|
}
|
|
5169
5466
|
),
|
|
5170
|
-
info: /* @__PURE__ */ (0,
|
|
5467
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5171
5468
|
ToastStatusIcon,
|
|
5172
5469
|
{
|
|
5173
5470
|
iconName: "question",
|
|
5174
5471
|
className: "border-primary/15 bg-primary/10 text-primary"
|
|
5175
5472
|
}
|
|
5176
5473
|
),
|
|
5177
|
-
close: /* @__PURE__ */ (0,
|
|
5474
|
+
close: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { name: "x", size: 12 })
|
|
5178
5475
|
};
|
|
5179
5476
|
function mergeToastClassNames(overrides) {
|
|
5180
5477
|
return {
|
|
@@ -5182,7 +5479,7 @@ function mergeToastClassNames(overrides) {
|
|
|
5182
5479
|
...overrides
|
|
5183
5480
|
};
|
|
5184
5481
|
}
|
|
5185
|
-
var Toaster =
|
|
5482
|
+
var Toaster = React35.forwardRef(
|
|
5186
5483
|
function Toaster2({
|
|
5187
5484
|
className,
|
|
5188
5485
|
closeButton = true,
|
|
@@ -5194,7 +5491,7 @@ var Toaster = React31.forwardRef(
|
|
|
5194
5491
|
visibleToasts = 5,
|
|
5195
5492
|
...props
|
|
5196
5493
|
}, ref) {
|
|
5197
|
-
return /* @__PURE__ */ (0,
|
|
5494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5198
5495
|
import_sonner.Toaster,
|
|
5199
5496
|
{
|
|
5200
5497
|
ref,
|
|
@@ -5224,9 +5521,9 @@ var Toaster = React31.forwardRef(
|
|
|
5224
5521
|
Toaster.displayName = "Toaster";
|
|
5225
5522
|
|
|
5226
5523
|
// src/components/switch.tsx
|
|
5227
|
-
var
|
|
5524
|
+
var React36 = __toESM(require("react"), 1);
|
|
5228
5525
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
|
|
5229
|
-
var
|
|
5526
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5230
5527
|
var switchSizeOptions = ["default", "sm"];
|
|
5231
5528
|
var switchRootSizeClasses = {
|
|
5232
5529
|
default: "h-6 w-11",
|
|
@@ -5236,7 +5533,7 @@ var switchThumbSizeClasses = {
|
|
|
5236
5533
|
default: "h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
|
5237
5534
|
sm: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
5238
5535
|
};
|
|
5239
|
-
var Switch =
|
|
5536
|
+
var Switch = React36.forwardRef(
|
|
5240
5537
|
({
|
|
5241
5538
|
"aria-describedby": ariaDescribedBy,
|
|
5242
5539
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -5251,16 +5548,16 @@ var Switch = React32.forwardRef(
|
|
|
5251
5548
|
size,
|
|
5252
5549
|
...props
|
|
5253
5550
|
}, ref) => {
|
|
5254
|
-
const generatedId =
|
|
5551
|
+
const generatedId = React36.useId();
|
|
5255
5552
|
const resolvedId = id ?? generatedId;
|
|
5256
5553
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
5257
5554
|
const descriptionId = description ? `${resolvedId}-description` : void 0;
|
|
5258
5555
|
const hasTextContent = label !== void 0 || description !== void 0;
|
|
5259
5556
|
const resolvedSize = size ?? (hasTextContent ? "sm" : "default");
|
|
5260
|
-
const
|
|
5557
|
+
const alignClassName2 = description ? "items-start" : "items-center";
|
|
5261
5558
|
const resolvedAriaDescribedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ") || void 0;
|
|
5262
5559
|
const resolvedAriaLabelledBy = ariaLabelledBy ?? labelId;
|
|
5263
|
-
const switchControl = /* @__PURE__ */ (0,
|
|
5560
|
+
const switchControl = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5264
5561
|
SwitchPrimitives.Root,
|
|
5265
5562
|
{
|
|
5266
5563
|
id: resolvedId,
|
|
@@ -5275,7 +5572,7 @@ var Switch = React32.forwardRef(
|
|
|
5275
5572
|
"data-size": resolvedSize,
|
|
5276
5573
|
...props,
|
|
5277
5574
|
ref,
|
|
5278
|
-
children: /* @__PURE__ */ (0,
|
|
5575
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5279
5576
|
SwitchPrimitives.Thumb,
|
|
5280
5577
|
{
|
|
5281
5578
|
className: cn(
|
|
@@ -5289,19 +5586,19 @@ var Switch = React32.forwardRef(
|
|
|
5289
5586
|
if (!hasTextContent) {
|
|
5290
5587
|
return switchControl;
|
|
5291
5588
|
}
|
|
5292
|
-
return /* @__PURE__ */ (0,
|
|
5589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
5293
5590
|
"div",
|
|
5294
5591
|
{
|
|
5295
5592
|
"data-slot": "switch-container",
|
|
5296
5593
|
className: selectionControlContainerClasses({
|
|
5297
|
-
alignClassName,
|
|
5594
|
+
alignClassName: alignClassName2,
|
|
5298
5595
|
className: containerClassName,
|
|
5299
5596
|
disabled
|
|
5300
5597
|
}),
|
|
5301
5598
|
children: [
|
|
5302
5599
|
switchControl,
|
|
5303
|
-
/* @__PURE__ */ (0,
|
|
5304
|
-
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)(
|
|
5305
5602
|
"span",
|
|
5306
5603
|
{
|
|
5307
5604
|
id: labelId,
|
|
@@ -5316,7 +5613,7 @@ var Switch = React32.forwardRef(
|
|
|
5316
5613
|
})
|
|
5317
5614
|
}
|
|
5318
5615
|
) }) : null,
|
|
5319
|
-
description ? /* @__PURE__ */ (0,
|
|
5616
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5320
5617
|
"span",
|
|
5321
5618
|
{
|
|
5322
5619
|
id: descriptionId,
|
|
@@ -5341,8 +5638,8 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
|
5341
5638
|
|
|
5342
5639
|
// src/components/table.tsx
|
|
5343
5640
|
var import_class_variance_authority8 = require("class-variance-authority");
|
|
5344
|
-
var
|
|
5345
|
-
var
|
|
5641
|
+
var React37 = __toESM(require("react"), 1);
|
|
5642
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
5346
5643
|
var tableCellVariantOptions = ["default", "primary", "muted"];
|
|
5347
5644
|
var tableStatusToneOptions = [
|
|
5348
5645
|
"active",
|
|
@@ -5392,13 +5689,13 @@ var tableActionButtonVariants = (0, import_class_variance_authority8.cva)(
|
|
|
5392
5689
|
}
|
|
5393
5690
|
}
|
|
5394
5691
|
);
|
|
5395
|
-
var Table =
|
|
5396
|
-
return /* @__PURE__ */ (0,
|
|
5692
|
+
var Table = React37.forwardRef(function Table2({ className, ...props }, ref) {
|
|
5693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5397
5694
|
"div",
|
|
5398
5695
|
{
|
|
5399
5696
|
"data-slot": "table-container",
|
|
5400
5697
|
className: "relative w-full overflow-x-auto",
|
|
5401
|
-
children: /* @__PURE__ */ (0,
|
|
5698
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5402
5699
|
"table",
|
|
5403
5700
|
{
|
|
5404
5701
|
"data-slot": "table",
|
|
@@ -5413,8 +5710,8 @@ var Table = React33.forwardRef(function Table2({ className, ...props }, ref) {
|
|
|
5413
5710
|
}
|
|
5414
5711
|
);
|
|
5415
5712
|
});
|
|
5416
|
-
var TableHeader =
|
|
5417
|
-
return /* @__PURE__ */ (0,
|
|
5713
|
+
var TableHeader = React37.forwardRef(function TableHeader2({ className, ...props }, ref) {
|
|
5714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5418
5715
|
"thead",
|
|
5419
5716
|
{
|
|
5420
5717
|
"data-slot": "table-header",
|
|
@@ -5427,8 +5724,8 @@ var TableHeader = React33.forwardRef(function TableHeader2({ className, ...props
|
|
|
5427
5724
|
}
|
|
5428
5725
|
);
|
|
5429
5726
|
});
|
|
5430
|
-
var TableBody =
|
|
5431
|
-
return /* @__PURE__ */ (0,
|
|
5727
|
+
var TableBody = React37.forwardRef(function TableBody2({ className, ...props }, ref) {
|
|
5728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5432
5729
|
"tbody",
|
|
5433
5730
|
{
|
|
5434
5731
|
"data-slot": "table-body",
|
|
@@ -5438,8 +5735,8 @@ var TableBody = React33.forwardRef(function TableBody2({ className, ...props },
|
|
|
5438
5735
|
}
|
|
5439
5736
|
);
|
|
5440
5737
|
});
|
|
5441
|
-
var TableFooter =
|
|
5442
|
-
return /* @__PURE__ */ (0,
|
|
5738
|
+
var TableFooter = React37.forwardRef(function TableFooter2({ className, ...props }, ref) {
|
|
5739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5443
5740
|
"tfoot",
|
|
5444
5741
|
{
|
|
5445
5742
|
"data-slot": "table-footer",
|
|
@@ -5452,8 +5749,8 @@ var TableFooter = React33.forwardRef(function TableFooter2({ className, ...props
|
|
|
5452
5749
|
}
|
|
5453
5750
|
);
|
|
5454
5751
|
});
|
|
5455
|
-
var TableRow =
|
|
5456
|
-
return /* @__PURE__ */ (0,
|
|
5752
|
+
var TableRow = React37.forwardRef(function TableRow2({ className, ...props }, ref) {
|
|
5753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5457
5754
|
"tr",
|
|
5458
5755
|
{
|
|
5459
5756
|
"data-slot": "table-row",
|
|
@@ -5466,8 +5763,8 @@ var TableRow = React33.forwardRef(function TableRow2({ className, ...props }, re
|
|
|
5466
5763
|
}
|
|
5467
5764
|
);
|
|
5468
5765
|
});
|
|
5469
|
-
var TableHead =
|
|
5470
|
-
return /* @__PURE__ */ (0,
|
|
5766
|
+
var TableHead = React37.forwardRef(function TableHead2({ className, children, ...props }, ref) {
|
|
5767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5471
5768
|
"th",
|
|
5472
5769
|
{
|
|
5473
5770
|
"data-slot": "table-head",
|
|
@@ -5486,9 +5783,9 @@ var TableHead = React33.forwardRef(function TableHead2({ className, children, ..
|
|
|
5486
5783
|
}
|
|
5487
5784
|
);
|
|
5488
5785
|
});
|
|
5489
|
-
var TableCell =
|
|
5786
|
+
var TableCell = React37.forwardRef(
|
|
5490
5787
|
function TableCell2({ className, variant, truncate, children, ...props }, ref) {
|
|
5491
|
-
return /* @__PURE__ */ (0,
|
|
5788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5492
5789
|
"td",
|
|
5493
5790
|
{
|
|
5494
5791
|
"data-slot": "table-cell",
|
|
@@ -5512,8 +5809,8 @@ var TableCell = React33.forwardRef(
|
|
|
5512
5809
|
);
|
|
5513
5810
|
}
|
|
5514
5811
|
);
|
|
5515
|
-
var TableCaption =
|
|
5516
|
-
return /* @__PURE__ */ (0,
|
|
5812
|
+
var TableCaption = React37.forwardRef(function TableCaption2({ className, children, ...props }, ref) {
|
|
5813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5517
5814
|
"caption",
|
|
5518
5815
|
{
|
|
5519
5816
|
"data-slot": "table-caption",
|
|
@@ -5538,7 +5835,7 @@ function TableStatusBadge({
|
|
|
5538
5835
|
children,
|
|
5539
5836
|
...props
|
|
5540
5837
|
}) {
|
|
5541
|
-
return /* @__PURE__ */ (0,
|
|
5838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5542
5839
|
Badge,
|
|
5543
5840
|
{
|
|
5544
5841
|
variant: "pill",
|
|
@@ -5553,8 +5850,8 @@ function TableStatusBadge({
|
|
|
5553
5850
|
}
|
|
5554
5851
|
);
|
|
5555
5852
|
}
|
|
5556
|
-
var TableActionButton =
|
|
5557
|
-
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)(
|
|
5558
5855
|
Button,
|
|
5559
5856
|
{
|
|
5560
5857
|
ref,
|
|
@@ -5572,8 +5869,8 @@ var TableActionButton = React33.forwardRef(function TableActionButton2({ classNa
|
|
|
5572
5869
|
}
|
|
5573
5870
|
);
|
|
5574
5871
|
});
|
|
5575
|
-
var TableActions =
|
|
5576
|
-
return /* @__PURE__ */ (0,
|
|
5872
|
+
var TableActions = React37.forwardRef(function TableActions2({ className, ...props }, ref) {
|
|
5873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5577
5874
|
"div",
|
|
5578
5875
|
{
|
|
5579
5876
|
ref,
|
|
@@ -5594,10 +5891,10 @@ TableActionButton.displayName = "TableActionButton";
|
|
|
5594
5891
|
TableActions.displayName = "TableActions";
|
|
5595
5892
|
|
|
5596
5893
|
// src/components/tabs.tsx
|
|
5597
|
-
var
|
|
5894
|
+
var React38 = __toESM(require("react"), 1);
|
|
5598
5895
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
5599
5896
|
var import_react3 = require("motion/react");
|
|
5600
|
-
var
|
|
5897
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
5601
5898
|
function resolveDefaultValue(items, defaultValue) {
|
|
5602
5899
|
if (defaultValue) {
|
|
5603
5900
|
return defaultValue;
|
|
@@ -5621,13 +5918,13 @@ function Tabs({
|
|
|
5621
5918
|
onChange: onValueChange,
|
|
5622
5919
|
value
|
|
5623
5920
|
});
|
|
5624
|
-
const indicatorLayoutId =
|
|
5625
|
-
|
|
5921
|
+
const indicatorLayoutId = React38.useId();
|
|
5922
|
+
React38.useEffect(() => {
|
|
5626
5923
|
if (value === void 0) {
|
|
5627
5924
|
setUncontrolledCurrentValue(resolvedDefaultValue);
|
|
5628
5925
|
}
|
|
5629
5926
|
}, [resolvedDefaultValue, setUncontrolledCurrentValue, value]);
|
|
5630
|
-
return /* @__PURE__ */ (0,
|
|
5927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
5631
5928
|
TabsPrimitive.Root,
|
|
5632
5929
|
{
|
|
5633
5930
|
className: cn("w-full", className),
|
|
@@ -5635,7 +5932,7 @@ function Tabs({
|
|
|
5635
5932
|
value: currentValue,
|
|
5636
5933
|
...props,
|
|
5637
5934
|
children: [
|
|
5638
|
-
/* @__PURE__ */ (0,
|
|
5935
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5639
5936
|
TabsPrimitive.List,
|
|
5640
5937
|
{
|
|
5641
5938
|
"aria-label": "Subtelas navegaveis",
|
|
@@ -5646,7 +5943,7 @@ function Tabs({
|
|
|
5646
5943
|
children: items.map((item) => {
|
|
5647
5944
|
const isUnavailable = item.disabled || item.loading;
|
|
5648
5945
|
const isActive = item.value === currentValue;
|
|
5649
|
-
return /* @__PURE__ */ (0,
|
|
5946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
5650
5947
|
TabsPrimitive.Trigger,
|
|
5651
5948
|
{
|
|
5652
5949
|
value: item.value,
|
|
@@ -5658,7 +5955,7 @@ function Tabs({
|
|
|
5658
5955
|
item.triggerClassName
|
|
5659
5956
|
),
|
|
5660
5957
|
children: [
|
|
5661
|
-
isActive ? /* @__PURE__ */ (0,
|
|
5958
|
+
isActive ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5662
5959
|
import_react3.motion.span,
|
|
5663
5960
|
{
|
|
5664
5961
|
"aria-hidden": "true",
|
|
@@ -5668,15 +5965,15 @@ function Tabs({
|
|
|
5668
5965
|
transition: { duration: 0.25, ease: "easeInOut" }
|
|
5669
5966
|
}
|
|
5670
5967
|
) : null,
|
|
5671
|
-
/* @__PURE__ */ (0,
|
|
5672
|
-
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)(
|
|
5673
5970
|
"span",
|
|
5674
5971
|
{
|
|
5675
5972
|
"aria-hidden": "true",
|
|
5676
5973
|
className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-r-transparent"
|
|
5677
5974
|
}
|
|
5678
5975
|
) : null,
|
|
5679
|
-
/* @__PURE__ */ (0,
|
|
5976
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: renderTextContent(item.label, {
|
|
5680
5977
|
as: "span",
|
|
5681
5978
|
className: "block text-inherit",
|
|
5682
5979
|
size: "body"
|
|
@@ -5690,7 +5987,7 @@ function Tabs({
|
|
|
5690
5987
|
}
|
|
5691
5988
|
),
|
|
5692
5989
|
items.map(
|
|
5693
|
-
(item) => item.content !== void 0 ? /* @__PURE__ */ (0,
|
|
5990
|
+
(item) => item.content !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5694
5991
|
TabsPrimitive.Content,
|
|
5695
5992
|
{
|
|
5696
5993
|
value: item.value,
|
|
@@ -5713,9 +6010,9 @@ function Tabs({
|
|
|
5713
6010
|
Tabs.displayName = "Tabs";
|
|
5714
6011
|
|
|
5715
6012
|
// src/components/textarea.tsx
|
|
5716
|
-
var
|
|
5717
|
-
var
|
|
5718
|
-
var Textarea =
|
|
6013
|
+
var React39 = __toESM(require("react"), 1);
|
|
6014
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
6015
|
+
var Textarea = React39.forwardRef(
|
|
5719
6016
|
({
|
|
5720
6017
|
className,
|
|
5721
6018
|
containerClassName,
|
|
@@ -5725,10 +6022,10 @@ var Textarea = React35.forwardRef(
|
|
|
5725
6022
|
rows = 5,
|
|
5726
6023
|
...props
|
|
5727
6024
|
}, ref) => {
|
|
5728
|
-
const generatedId =
|
|
6025
|
+
const generatedId = React39.useId();
|
|
5729
6026
|
const resolvedId = id ?? generatedId;
|
|
5730
6027
|
const ariaLabel = props["aria-label"] ?? (typeof label === "string" ? label : void 0);
|
|
5731
|
-
const control = /* @__PURE__ */ (0,
|
|
6028
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5732
6029
|
"textarea",
|
|
5733
6030
|
{
|
|
5734
6031
|
className: cn(
|
|
@@ -5742,7 +6039,7 @@ var Textarea = React35.forwardRef(
|
|
|
5742
6039
|
"aria-label": ariaLabel
|
|
5743
6040
|
}
|
|
5744
6041
|
);
|
|
5745
|
-
return /* @__PURE__ */ (0,
|
|
6042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5746
6043
|
FieldShell,
|
|
5747
6044
|
{
|
|
5748
6045
|
control,
|
|
@@ -5757,10 +6054,10 @@ var Textarea = React35.forwardRef(
|
|
|
5757
6054
|
Textarea.displayName = "Textarea";
|
|
5758
6055
|
|
|
5759
6056
|
// src/components/toggle.tsx
|
|
5760
|
-
var
|
|
6057
|
+
var React40 = __toESM(require("react"), 1);
|
|
5761
6058
|
var SwitchPrimitives2 = __toESM(require("@radix-ui/react-switch"), 1);
|
|
5762
|
-
var
|
|
5763
|
-
var Toggle =
|
|
6059
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
6060
|
+
var Toggle = React40.forwardRef(function Toggle2({
|
|
5764
6061
|
"aria-describedby": ariaDescribedBy,
|
|
5765
6062
|
"aria-labelledby": ariaLabelledBy,
|
|
5766
6063
|
className,
|
|
@@ -5773,15 +6070,15 @@ var Toggle = React36.forwardRef(function Toggle2({
|
|
|
5773
6070
|
labelClassName,
|
|
5774
6071
|
...props
|
|
5775
6072
|
}, ref) {
|
|
5776
|
-
const generatedId =
|
|
6073
|
+
const generatedId = React40.useId();
|
|
5777
6074
|
const resolvedId = id ?? generatedId;
|
|
5778
6075
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
5779
6076
|
const descriptionId = description ? `${resolvedId}-description` : void 0;
|
|
5780
6077
|
const hasTextContent = label !== void 0 || description !== void 0;
|
|
5781
|
-
const
|
|
6078
|
+
const alignClassName2 = description ? "items-start" : "items-center";
|
|
5782
6079
|
const resolvedAriaDescribedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ") || void 0;
|
|
5783
6080
|
const resolvedAriaLabelledBy = ariaLabelledBy ?? labelId;
|
|
5784
|
-
const toggleControl = /* @__PURE__ */ (0,
|
|
6081
|
+
const toggleControl = /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5785
6082
|
SwitchPrimitives2.Root,
|
|
5786
6083
|
{
|
|
5787
6084
|
id: resolvedId,
|
|
@@ -5795,7 +6092,7 @@ var Toggle = React36.forwardRef(function Toggle2({
|
|
|
5795
6092
|
className
|
|
5796
6093
|
),
|
|
5797
6094
|
...props,
|
|
5798
|
-
children: /* @__PURE__ */ (0,
|
|
6095
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5799
6096
|
SwitchPrimitives2.Thumb,
|
|
5800
6097
|
{
|
|
5801
6098
|
"data-slot": "toggle-thumb",
|
|
@@ -5807,19 +6104,19 @@ var Toggle = React36.forwardRef(function Toggle2({
|
|
|
5807
6104
|
if (!hasTextContent) {
|
|
5808
6105
|
return toggleControl;
|
|
5809
6106
|
}
|
|
5810
|
-
return /* @__PURE__ */ (0,
|
|
6107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
5811
6108
|
"div",
|
|
5812
6109
|
{
|
|
5813
6110
|
"data-slot": "toggle-container",
|
|
5814
6111
|
className: selectionControlContainerClasses({
|
|
5815
|
-
alignClassName,
|
|
6112
|
+
alignClassName: alignClassName2,
|
|
5816
6113
|
className: containerClassName,
|
|
5817
6114
|
disabled
|
|
5818
6115
|
}),
|
|
5819
6116
|
children: [
|
|
5820
6117
|
toggleControl,
|
|
5821
|
-
/* @__PURE__ */ (0,
|
|
5822
|
-
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)(
|
|
5823
6120
|
"span",
|
|
5824
6121
|
{
|
|
5825
6122
|
id: labelId,
|
|
@@ -5831,7 +6128,7 @@ var Toggle = React36.forwardRef(function Toggle2({
|
|
|
5831
6128
|
})
|
|
5832
6129
|
}
|
|
5833
6130
|
) }) : null,
|
|
5834
|
-
description ? /* @__PURE__ */ (0,
|
|
6131
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5835
6132
|
"span",
|
|
5836
6133
|
{
|
|
5837
6134
|
id: descriptionId,
|
|
@@ -5854,14 +6151,14 @@ var Toggle = React36.forwardRef(function Toggle2({
|
|
|
5854
6151
|
Toggle.displayName = "Toggle";
|
|
5855
6152
|
|
|
5856
6153
|
// src/components/tooltip.tsx
|
|
5857
|
-
var
|
|
6154
|
+
var React41 = __toESM(require("react"), 1);
|
|
5858
6155
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
5859
|
-
var
|
|
6156
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5860
6157
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
5861
6158
|
var Tooltip = TooltipPrimitive.Root;
|
|
5862
6159
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
5863
|
-
var TooltipContent =
|
|
5864
|
-
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)(
|
|
5865
6162
|
TooltipPrimitive.Content,
|
|
5866
6163
|
{
|
|
5867
6164
|
ref,
|
|
@@ -5885,9 +6182,9 @@ var TooltipContent = React37.forwardRef(function TooltipContent2({ className, si
|
|
|
5885
6182
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
5886
6183
|
|
|
5887
6184
|
// src/theme/provider.tsx
|
|
5888
|
-
var
|
|
5889
|
-
var
|
|
5890
|
-
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");
|
|
5891
6188
|
var SOFYA_FONT_LINKS = [
|
|
5892
6189
|
{
|
|
5893
6190
|
id: "preconnect-googleapis",
|
|
@@ -5907,7 +6204,7 @@ var SOFYA_FONT_LINKS = [
|
|
|
5907
6204
|
}
|
|
5908
6205
|
];
|
|
5909
6206
|
function useSofyaFontLinks() {
|
|
5910
|
-
|
|
6207
|
+
React42.useEffect(() => {
|
|
5911
6208
|
if (typeof document === "undefined") {
|
|
5912
6209
|
return;
|
|
5913
6210
|
}
|
|
@@ -5930,7 +6227,7 @@ function useSofyaFontLinks() {
|
|
|
5930
6227
|
}, []);
|
|
5931
6228
|
}
|
|
5932
6229
|
function SofyaProvider({
|
|
5933
|
-
preset =
|
|
6230
|
+
preset = import_tokens3.defaultTheme,
|
|
5934
6231
|
overrides,
|
|
5935
6232
|
className,
|
|
5936
6233
|
style,
|
|
@@ -5938,9 +6235,9 @@ function SofyaProvider({
|
|
|
5938
6235
|
...props
|
|
5939
6236
|
}) {
|
|
5940
6237
|
useSofyaFontLinks();
|
|
5941
|
-
const theme = (0,
|
|
5942
|
-
const cssVariables = (0,
|
|
5943
|
-
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)(
|
|
5944
6241
|
"div",
|
|
5945
6242
|
{
|
|
5946
6243
|
"data-sofya-theme": theme.name,
|
|
@@ -5953,7 +6250,7 @@ function SofyaProvider({
|
|
|
5953
6250
|
}
|
|
5954
6251
|
|
|
5955
6252
|
// src/index.ts
|
|
5956
|
-
var
|
|
6253
|
+
var import_tokens4 = require("@sofya-ds/tokens");
|
|
5957
6254
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5958
6255
|
0 && (module.exports = {
|
|
5959
6256
|
Accordion,
|
|
@@ -5973,6 +6270,8 @@ var import_tokens2 = require("@sofya-ds/tokens");
|
|
|
5973
6270
|
CardHeader,
|
|
5974
6271
|
CardTitle,
|
|
5975
6272
|
Checkbox,
|
|
6273
|
+
Cluster,
|
|
6274
|
+
Container,
|
|
5976
6275
|
Dialog,
|
|
5977
6276
|
DialogBody,
|
|
5978
6277
|
DialogCancel,
|
|
@@ -5985,6 +6284,7 @@ var import_tokens2 = require("@sofya-ds/tokens");
|
|
|
5985
6284
|
DialogPortal,
|
|
5986
6285
|
DialogTitle,
|
|
5987
6286
|
DialogTrigger,
|
|
6287
|
+
DocumentCard,
|
|
5988
6288
|
Dropdown,
|
|
5989
6289
|
DropdownSearch,
|
|
5990
6290
|
Empty,
|
|
@@ -5994,6 +6294,7 @@ var import_tokens2 = require("@sofya-ds/tokens");
|
|
|
5994
6294
|
EmptyMedia,
|
|
5995
6295
|
EmptyTitle,
|
|
5996
6296
|
Icon,
|
|
6297
|
+
Inline,
|
|
5997
6298
|
Input,
|
|
5998
6299
|
InputOTP,
|
|
5999
6300
|
InputOTPGroup,
|
|
@@ -6018,6 +6319,11 @@ var import_tokens2 = require("@sofya-ds/tokens");
|
|
|
6018
6319
|
PopoverTitle,
|
|
6019
6320
|
PopoverTrigger,
|
|
6020
6321
|
Progress,
|
|
6322
|
+
ProseDialogBody,
|
|
6323
|
+
ProseDialogContent,
|
|
6324
|
+
ProseDialogDescription,
|
|
6325
|
+
ProseDialogHeader,
|
|
6326
|
+
ProseDialogTitle,
|
|
6021
6327
|
REGEXP_ONLY_DIGITS,
|
|
6022
6328
|
RadioGroup,
|
|
6023
6329
|
RadioGroupItem,
|
|
@@ -6026,6 +6332,7 @@ var import_tokens2 = require("@sofya-ds/tokens");
|
|
|
6026
6332
|
RadioGroupOptionDescription,
|
|
6027
6333
|
RadioGroupOptionIndicator,
|
|
6028
6334
|
RadioGroupOptionLabel,
|
|
6335
|
+
RightRailAction,
|
|
6029
6336
|
ScrollArea,
|
|
6030
6337
|
ScrollAreaCorner,
|
|
6031
6338
|
ScrollAreaScrollbar,
|
|
@@ -6045,6 +6352,7 @@ var import_tokens2 = require("@sofya-ds/tokens");
|
|
|
6045
6352
|
Slider,
|
|
6046
6353
|
SofyaProvider,
|
|
6047
6354
|
Spinner,
|
|
6355
|
+
Stack,
|
|
6048
6356
|
Surface,
|
|
6049
6357
|
Switch,
|
|
6050
6358
|
Table,
|
|
@@ -6115,10 +6423,15 @@ var import_tokens2 = require("@sofya-ds/tokens");
|
|
|
6115
6423
|
selectSizeOptions,
|
|
6116
6424
|
sofyaBrandPalette,
|
|
6117
6425
|
sofyaColorPalette,
|
|
6426
|
+
sofyaGapNames,
|
|
6427
|
+
sofyaMeasureNames,
|
|
6428
|
+
sofyaRhythmNames,
|
|
6118
6429
|
sofyaSemanticColorHex,
|
|
6430
|
+
sofyaSpaceNames,
|
|
6119
6431
|
sofyaSurfaceNames,
|
|
6120
6432
|
sofyaTextStyleNames,
|
|
6121
6433
|
spinnerSizeOptions,
|
|
6434
|
+
surfaceVariantOptions,
|
|
6122
6435
|
switchSizeOptions,
|
|
6123
6436
|
tableActionToneOptions,
|
|
6124
6437
|
tableCellVariantOptions,
|