@sofya-ds/react 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -107,14 +107,27 @@ import * as React2 from "react";
107
107
  // src/components/icon-data.ts
108
108
  import {
109
109
  IconAdjustmentsHorizontalFilled,
110
+ IconAlignCenter,
111
+ IconAlignJustified,
112
+ IconAlignLeft,
113
+ IconAlignRight,
110
114
  IconArrowUp,
111
115
  IconArchive,
116
+ IconBold,
112
117
  IconBuildingHospital,
113
118
  IconBooks,
114
119
  IconBulb,
115
120
  IconChartBar,
116
121
  IconCheck,
117
122
  IconChecklist,
123
+ IconCode,
124
+ IconItalic,
125
+ IconLink,
126
+ IconList,
127
+ IconListNumbers,
128
+ IconQuote,
129
+ IconStrikethrough,
130
+ IconUnderline,
118
131
  IconChevronLeft,
119
132
  IconChevronDown,
120
133
  IconChevronUp,
@@ -152,14 +165,27 @@ import {
152
165
  } from "@tabler/icons-react";
153
166
  var tablerIconRegistry = {
154
167
  IconAdjustmentsHorizontalFilled,
168
+ IconAlignCenter,
169
+ IconAlignJustified,
170
+ IconAlignLeft,
171
+ IconAlignRight,
155
172
  IconArrowUp,
156
173
  IconArchive,
174
+ IconBold,
157
175
  IconBuildingHospital,
158
176
  IconBooks,
159
177
  IconBulb,
160
178
  IconChartBar,
161
179
  IconCheck,
162
180
  IconChecklist,
181
+ IconCode,
182
+ IconItalic,
183
+ IconLink,
184
+ IconList,
185
+ IconListNumbers,
186
+ IconQuote,
187
+ IconStrikethrough,
188
+ IconUnderline,
163
189
  IconChevronLeft,
164
190
  IconChevronDown,
165
191
  IconChevronUp,
@@ -252,7 +278,20 @@ var legacyIconToTablerNameMap = {
252
278
  "remove": "IconTrashX",
253
279
  "lixeira": "IconTrash",
254
280
  "settings": "IconSettings",
255
- "edit": "IconEdit"
281
+ "edit": "IconEdit",
282
+ "bold": "IconBold",
283
+ "italic": "IconItalic",
284
+ "underline": "IconUnderline",
285
+ "strikethrough": "IconStrikethrough",
286
+ "list-bullet": "IconList",
287
+ "list-numbers": "IconListNumbers",
288
+ "link": "IconLink",
289
+ "quote": "IconQuote",
290
+ "code": "IconCode",
291
+ "align-left": "IconAlignLeft",
292
+ "align-center": "IconAlignCenter",
293
+ "align-right": "IconAlignRight",
294
+ "align-justify": "IconAlignJustified"
256
295
  };
257
296
  var iconNames = Object.keys(legacyIconToTablerNameMap);
258
297
  var iconRegistry = Object.fromEntries(
@@ -405,7 +444,13 @@ import {
405
444
  import { jsx as jsx3 } from "react/jsx-runtime";
406
445
  var textSizeOptions = sofyaTextStyleNames;
407
446
  var textVariantOptions = ["default", "gradient", "shiny", "split"];
447
+ var textToneOptions = ["default", "soft", "subtle"];
408
448
  var textSplitTypeOptions = ["chars", "words", "words, chars"];
449
+ var textToneClassNames = {
450
+ default: "text-[color:var(--sofya-text-default)]",
451
+ soft: "text-[color:var(--sofya-text-soft)]",
452
+ subtle: "text-[color:var(--sofya-text-subtle)]"
453
+ };
409
454
  var defaultElements = {
410
455
  "display-xl": "h1",
411
456
  "display-lg": "h1",
@@ -509,6 +554,7 @@ var Text = React3.forwardRef(function Text2({
509
554
  splitThreshold = 0.1,
510
555
  splitType = "chars",
511
556
  style,
557
+ tone = "default",
512
558
  variant = "default",
513
559
  weight,
514
560
  ...props
@@ -631,16 +677,17 @@ var Text = React3.forwardRef(function Text2({
631
677
  ref: setRefs,
632
678
  "data-text-size": size,
633
679
  "data-text-variant": variant,
680
+ "data-text-tone": tone,
634
681
  "aria-label": shouldSplit ? props["aria-label"] ?? splitText ?? void 0 : props["aria-label"],
635
- className: cn("m-0 text-foreground", textVariantClassNames[variant], className),
682
+ className: cn("m-0", textToneClassNames[tone], textVariantClassNames[variant], className),
636
683
  style: { ...textSizeStyles[size], ...textVariantStyles[variant], ...weight != null && { fontWeight: weight }, ...style },
637
684
  ...props,
638
685
  children: shouldSplit ? renderSplitChildren() : children
639
686
  }
640
687
  );
641
688
  });
642
- function renderTextContent(children, { as, className, size = "body", style, variant = "default", weight } = {}) {
643
- return isTextContent(children) ? /* @__PURE__ */ jsx3(Text, { as, className, size, style, variant, weight, children }) : children;
689
+ function renderTextContent(children, { as, className, size = "body", style, tone = "default", variant = "default", weight } = {}) {
690
+ return isTextContent(children) ? /* @__PURE__ */ jsx3(Text, { as, className, size, style, tone, variant, weight, children }) : children;
644
691
  }
645
692
 
646
693
  // src/components/accordion.tsx
@@ -797,193 +844,17 @@ var AccordionContent = React4.forwardRef(({ className, children, contentClassNam
797
844
  AccordionContent.displayName = AccordionPrimitive.Content.displayName;
798
845
 
799
846
  // src/components/alert.tsx
800
- import * as React5 from "react";
801
- import { cva as cva2 } from "class-variance-authority";
802
- import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
803
- var alertToneOptions = [
804
- "default",
805
- "info",
806
- "success",
807
- "warning",
808
- "destructive"
809
- ];
810
- var alertSizeOptions = ["sm", "default", "lg"];
811
- var alertVariants = cva2("flex w-full items-start border", {
812
- variants: {
813
- size: {
814
- sm: "gap-2 rounded-[14px] px-4 py-2",
815
- default: "gap-4 rounded-[16px] px-4 py-4",
816
- lg: "gap-4 rounded-[18px] px-6 py-4"
817
- },
818
- tone: {
819
- default: "border-[color:var(--sofya-tone-default-border)] bg-[color:var(--sofya-tone-default-background)] text-[color:var(--sofya-tone-default-foreground)]",
820
- info: "border-[color:var(--sofya-tone-info-border)] bg-[color:var(--sofya-tone-info-background)] text-[color:var(--sofya-tone-info-foreground)]",
821
- success: "border-[color:var(--sofya-tone-success-border)] bg-[color:var(--sofya-tone-success-background)] text-[color:var(--sofya-tone-success-foreground)]",
822
- warning: "border-[color:var(--sofya-tone-warning-border)] bg-[color:var(--sofya-tone-warning-background)] text-[color:var(--sofya-tone-warning-foreground)]",
823
- destructive: "border-[color:var(--sofya-tone-destructive-border)] bg-[color:var(--sofya-tone-destructive-background)] text-[color:var(--sofya-tone-destructive-foreground)]"
824
- }
825
- },
826
- defaultVariants: {
827
- size: "default",
828
- tone: "default"
829
- }
830
- });
831
- var toneIconMap = {
832
- info: "lightbulb",
833
- success: "check",
834
- warning: "question",
835
- destructive: "x"
836
- };
837
- var Alert = React5.forwardRef(function Alert2({
838
- children,
839
- className,
840
- icon,
841
- role,
842
- showToneIcon = true,
843
- size,
844
- tone,
845
- ...props
846
- }, ref) {
847
- const resolvedSize = size ?? "default";
848
- const resolvedTone = tone ?? "default";
849
- const resolvedRole = role ?? (resolvedTone === "warning" || resolvedTone === "destructive" ? "alert" : "status");
850
- const toneIconName = resolvedTone !== "default" ? toneIconMap[resolvedTone] : void 0;
851
- const resolvedIcon = icon ?? (showToneIcon && toneIconName ? /* @__PURE__ */ jsx5(Icon, { name: toneIconName, size: 16, "aria-hidden": "true" }) : null);
852
- return /* @__PURE__ */ jsxs2(
853
- "div",
854
- {
855
- ref,
856
- "data-size": resolvedSize,
857
- "data-slot": "alert",
858
- "data-tone": resolvedTone,
859
- role: resolvedRole,
860
- className: cn(
861
- alertVariants({ size: resolvedSize, tone: resolvedTone }),
862
- className
863
- ),
864
- ...props,
865
- children: [
866
- resolvedIcon ? /* @__PURE__ */ jsx5(
867
- "span",
868
- {
869
- "data-slot": "alert-icon",
870
- className: "mt-2 inline-flex h-4 w-4 shrink-0 items-center justify-center text-current [&>svg]:h-4 [&>svg]:w-4",
871
- children: resolvedIcon
872
- }
873
- ) : null,
874
- /* @__PURE__ */ jsx5("div", { "data-slot": "alert-content", className: "flex min-w-0 flex-1 flex-col", children })
875
- ]
876
- }
877
- );
878
- });
879
- var AlertTitle = React5.forwardRef(function AlertTitle2({ children, className, ...props }, ref) {
880
- return /* @__PURE__ */ jsx5(
881
- "div",
882
- {
883
- ref,
884
- "data-slot": "alert-title",
885
- className: cn("text-current", className),
886
- ...props,
887
- children: renderTextContent(children, {
888
- as: "span",
889
- className: "block text-current",
890
- size: "h4"
891
- })
892
- }
893
- );
894
- });
895
- var AlertDescription = React5.forwardRef(function AlertDescription2({ children, className, ...props }, ref) {
896
- return /* @__PURE__ */ jsx5(
897
- "div",
898
- {
899
- ref,
900
- "data-slot": "alert-description",
901
- className: cn("[&:not(:first-child)]:mt-2 text-current/80", className),
902
- ...props,
903
- children: renderTextContent(children, {
904
- as: "span",
905
- className: "block text-current/80",
906
- size: "tiny"
907
- })
908
- }
909
- );
910
- });
911
- Alert.displayName = "Alert";
912
- AlertTitle.displayName = "AlertTitle";
913
- AlertDescription.displayName = "AlertDescription";
914
-
915
- // src/components/badge.tsx
847
+ import * as React9 from "react";
916
848
  import { cva as cva3 } from "class-variance-authority";
917
- import { jsx as jsx6 } from "react/jsx-runtime";
918
- var badgeVariantOptions = [
919
- "default",
920
- "secondary",
921
- "outline",
922
- "success",
923
- "warning",
924
- "destructive",
925
- "pill"
926
- ];
927
- var badgeAlertOptions = ["default", "medium", "high"];
928
- var badgePillToneOptions = ["neutral", "danger"];
929
- var badgeVariants = cva3(
930
- "inline-flex min-h-[34px] items-center justify-center whitespace-nowrap rounded-[5px] px-4 py-2 [font-family:var(--sofya-text-tiny-font-family)] text-[length:var(--sofya-text-tiny-font-size)] font-semibold uppercase leading-none tracking-[0.08em] transition-colors duration-sofya ease-sofya",
931
- {
932
- variants: {
933
- variant: {
934
- default: "border-transparent bg-accent/10 text-accent",
935
- secondary: "border-transparent bg-secondary text-secondary-foreground",
936
- outline: "border border-border bg-background text-foreground",
937
- success: "border-transparent bg-success/10 text-success",
938
- warning: "border-transparent bg-warning/10 text-warning",
939
- destructive: "border-transparent bg-destructive/10 text-destructive",
940
- pill: ""
941
- }
942
- },
943
- defaultVariants: {
944
- variant: "default"
945
- }
946
- }
947
- );
948
- var badgeAlertVariants = cva3(
949
- "inline-flex min-h-[34px] items-center justify-center whitespace-nowrap rounded-[5px] px-4 py-2 [font-family:var(--sofya-text-tiny-font-family)] text-[length:var(--sofya-text-tiny-font-size)] font-semibold uppercase leading-none tracking-[0.08em] transition-colors duration-sofya ease-sofya",
950
- {
951
- variants: {
952
- alert: {
953
- default: "border-transparent bg-accent/10 text-accent",
954
- medium: "border-transparent bg-[color:var(--sofya-tone-warning-background)] text-warning",
955
- high: "border-transparent bg-[color:var(--sofya-tone-destructive-background)] text-destructive"
956
- }
957
- },
958
- defaultVariants: {
959
- alert: "default"
960
- }
961
- }
962
- );
963
- var badgePillVariants = cva3(
964
- "inline-flex h-[30px] items-center justify-center whitespace-nowrap rounded-full border px-4 py-2 [font-family:var(--sofya-text-extra-tiny-font-family)] text-[length:var(--sofya-text-extra-tiny-font-size)] font-semibold leading-none tracking-normal transition-colors duration-sofya ease-sofya",
965
- {
966
- variants: {
967
- tone: {
968
- neutral: "border-[color:var(--sofya-tone-default-border)] bg-[color:var(--sofya-tone-default-background)] text-[color:var(--sofya-tone-default-foreground)]",
969
- danger: "border-[color:var(--sofya-tone-destructive-border)] bg-[color:var(--sofya-tone-destructive-background)] text-[color:var(--sofya-tone-destructive-foreground)]"
970
- }
971
- },
972
- defaultVariants: {
973
- tone: "neutral"
974
- }
975
- }
976
- );
977
- function Badge({ className, variant, alert, pillTone, ...props }) {
978
- const badgeClassName = variant === "pill" ? badgePillVariants({ tone: pillTone }) : alert ? badgeAlertVariants({ alert }) : badgeVariants({ variant });
979
- return /* @__PURE__ */ jsx6("div", { className: cn(badgeClassName, className), ...props });
980
- }
981
849
 
982
- // src/components/button.tsx
850
+ // src/components/close-button.tsx
983
851
  import * as React8 from "react";
852
+
853
+ // src/components/button.tsx
854
+ import * as React7 from "react";
984
855
  import { IconLoader2 } from "@tabler/icons-react";
985
856
  import { Slot } from "@radix-ui/react-slot";
986
- import { cva as cva4 } from "class-variance-authority";
857
+ import { cva as cva2 } from "class-variance-authority";
987
858
 
988
859
  // src/components/button-language-flags.ts
989
860
  function createFlagDataUri(svg) {
@@ -1108,9 +979,9 @@ var dropdownLanguageFlagSrc = {
1108
979
  };
1109
980
 
1110
981
  // src/components/button-ripple.tsx
1111
- import * as React6 from "react";
982
+ import * as React5 from "react";
1112
983
  import { motion, useReducedMotion } from "motion/react";
1113
- import { jsx as jsx7 } from "react/jsx-runtime";
984
+ import { jsx as jsx5 } from "react/jsx-runtime";
1114
985
  var MAX_ACTIVE_RIPPLES = 3;
1115
986
  var buttonRippleVariantClasses = {
1116
987
  default: "bg-[hsl(var(--sofya-primary-foreground)/0.82)] mix-blend-screen",
@@ -1137,15 +1008,15 @@ function useButtonRippleState({
1137
1008
  variant
1138
1009
  }) {
1139
1010
  const prefersReducedMotion = Boolean(useReducedMotion());
1140
- const [ripples, setRipples] = React6.useState([]);
1141
- const rippleIdRef = React6.useRef(0);
1142
- const lastRippleAtRef = React6.useRef(0);
1143
- const handleRippleComplete = React6.useCallback((rippleId) => {
1011
+ const [ripples, setRipples] = React5.useState([]);
1012
+ const rippleIdRef = React5.useRef(0);
1013
+ const lastRippleAtRef = React5.useRef(0);
1014
+ const handleRippleComplete = React5.useCallback((rippleId) => {
1144
1015
  setRipples(
1145
1016
  (currentRipples) => currentRipples.filter((currentRipple) => currentRipple.id !== rippleId)
1146
1017
  );
1147
1018
  }, []);
1148
- const createRipple = React6.useCallback(
1019
+ const createRipple = React5.useCallback(
1149
1020
  (currentTarget, clientX, clientY) => {
1150
1021
  const now = performance.now();
1151
1022
  if (now - lastRippleAtRef.current < 48) {
@@ -1184,7 +1055,7 @@ function useButtonRippleState({
1184
1055
  },
1185
1056
  [size]
1186
1057
  );
1187
- const handlePointerDown = React6.useCallback(
1058
+ const handlePointerDown = React5.useCallback(
1188
1059
  (event) => {
1189
1060
  onPointerDown?.(event);
1190
1061
  if (event.defaultPrevented || disabled) {
@@ -1203,7 +1074,7 @@ function useButtonRippleState({
1203
1074
  },
1204
1075
  [createRipple, disabled, onPointerDown, prefersReducedMotion]
1205
1076
  );
1206
- const handleClick = React6.useCallback(
1077
+ const handleClick = React5.useCallback(
1207
1078
  (event) => {
1208
1079
  if (!disabled && !prefersReducedMotion && event.detail === 0) {
1209
1080
  createRipple(event.currentTarget);
@@ -1230,12 +1101,12 @@ function ButtonRippleLayer({
1230
1101
  if (ripples.length === 0) {
1231
1102
  return null;
1232
1103
  }
1233
- return /* @__PURE__ */ jsx7(
1104
+ return /* @__PURE__ */ jsx5(
1234
1105
  "span",
1235
1106
  {
1236
1107
  "aria-hidden": "true",
1237
1108
  className: "pointer-events-none absolute inset-0 z-[1] overflow-hidden rounded-[inherit]",
1238
- children: ripples.map((ripple) => /* @__PURE__ */ jsx7(
1109
+ children: ripples.map((ripple) => /* @__PURE__ */ jsx5(
1239
1110
  motion.span,
1240
1111
  {
1241
1112
  className: cn(
@@ -1267,7 +1138,7 @@ function ButtonRippleLayer({
1267
1138
  }
1268
1139
 
1269
1140
  // src/components/button-loading-state.ts
1270
- import * as React7 from "react";
1141
+ import * as React6 from "react";
1271
1142
  var BUTTON_SEQUENCE_MS = 250;
1272
1143
  function useButtonLoadingState({
1273
1144
  buttonRef,
@@ -1276,15 +1147,15 @@ function useButtonLoadingState({
1276
1147
  loading,
1277
1148
  rightIcon
1278
1149
  }) {
1279
- const expandedWidthRef = React7.useRef(void 0);
1280
- const previousLoadingRef = React7.useRef(loading);
1281
- const timeoutsRef = React7.useRef([]);
1282
- const frameRef = React7.useRef(null);
1283
- const [animatedWidth, setAnimatedWidth] = React7.useState(void 0);
1284
- const [loadingPhase, setLoadingPhase] = React7.useState(
1150
+ const expandedWidthRef = React6.useRef(void 0);
1151
+ const previousLoadingRef = React6.useRef(loading);
1152
+ const timeoutsRef = React6.useRef([]);
1153
+ const frameRef = React6.useRef(null);
1154
+ const [animatedWidth, setAnimatedWidth] = React6.useState(void 0);
1155
+ const [loadingPhase, setLoadingPhase] = React6.useState(
1285
1156
  loading ? "loading" : "idle"
1286
1157
  );
1287
- const clearAnimationTimers = React7.useCallback(() => {
1158
+ const clearAnimationTimers = React6.useCallback(() => {
1288
1159
  for (const timeoutId of timeoutsRef.current) {
1289
1160
  window.clearTimeout(timeoutId);
1290
1161
  }
@@ -1294,7 +1165,7 @@ function useButtonLoadingState({
1294
1165
  frameRef.current = null;
1295
1166
  }
1296
1167
  }, []);
1297
- React7.useLayoutEffect(() => {
1168
+ React6.useLayoutEffect(() => {
1298
1169
  const element = buttonRef.current;
1299
1170
  if (element && loadingPhase === "idle" && !loading) {
1300
1171
  expandedWidthRef.current = element.offsetWidth;
@@ -1303,12 +1174,12 @@ function useButtonLoadingState({
1303
1174
  setAnimatedWidth(element.offsetHeight);
1304
1175
  }
1305
1176
  }, [animatedWidth, buttonRef, loading, loadingPhase, children, leftIcon, rightIcon]);
1306
- React7.useEffect(() => {
1177
+ React6.useEffect(() => {
1307
1178
  return () => {
1308
1179
  clearAnimationTimers();
1309
1180
  };
1310
1181
  }, [clearAnimationTimers]);
1311
- React7.useEffect(() => {
1182
+ React6.useEffect(() => {
1312
1183
  const element = buttonRef.current;
1313
1184
  if (!element) {
1314
1185
  return;
@@ -1371,7 +1242,7 @@ function useButtonLoadingState({
1371
1242
  }
1372
1243
 
1373
1244
  // src/components/button.tsx
1374
- import { Fragment, jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
1245
+ import { Fragment, jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
1375
1246
  var buttonVariantOptions = [
1376
1247
  "default",
1377
1248
  "gradient",
@@ -1384,20 +1255,22 @@ var buttonVariantOptions = [
1384
1255
  "destructive"
1385
1256
  ];
1386
1257
  var buttonSizeOptions = ["default", "sm", "lg", "icon"];
1387
- var buttonVariants = cva4(
1388
- "relative isolate inline-flex items-center justify-center gap-2 overflow-hidden whitespace-nowrap rounded-full font-medium tracking-[0.025em] transform-gpu transition-[width,transform,filter,background-color,border-color,color,box-shadow] duration-sofya ease-sofya motion-safe:active:scale-[0.985] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",
1258
+ var buttonVariants = cva2(
1259
+ "relative isolate inline-flex items-center justify-center gap-2 overflow-hidden whitespace-nowrap rounded-full font-medium tracking-[0.025em] transform-gpu transition-[width,transform,filter,background-color,border-color,color,box-shadow] duration-sofya ease-sofya motion-safe:active:scale-[0.985] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none data-[disabled=true]:cursor-not-allowed",
1389
1260
  {
1390
1261
  variants: {
1391
1262
  variant: {
1392
- default: "bg-primary text-primary-foreground hover:brightness-[1.04]",
1393
- gradient: "sofya-gradient-motion [--sofya-gradient-motion-duration:4s] bg-[linear-gradient(90deg,hsl(var(--sofya-button-gradient-from))_0%,hsl(var(--sofya-button-gradient-to))_100%)] text-primary-foreground hover:brightness-[1.05]",
1394
- dropdown: "justify-between border border-[color:var(--sofya-border-strong)] bg-card font-normal tracking-normal text-primary shadow-none hover:bg-card hover:border-[color:var(--sofya-border-strong)]",
1395
- icon: "border-0 bg-primary/10 text-primary shadow-sofya-sm hover:bg-primary/15",
1263
+ default: "bg-primary text-primary-foreground hover:brightness-[1.04] data-[disabled=true]:bg-muted data-[disabled=true]:text-[color:var(--sofya-text-subtle)] data-[disabled=true]:shadow-none",
1264
+ gradient: "sofya-gradient-motion [--sofya-gradient-motion-duration:4s] bg-[linear-gradient(90deg,hsl(var(--sofya-button-gradient-from))_0%,hsl(var(--sofya-button-gradient-to))_100%)] text-primary-foreground hover:brightness-[1.05] data-[disabled=true]:bg-none data-[disabled=true]:bg-muted data-[disabled=true]:text-[color:var(--sofya-text-subtle)]",
1265
+ dropdown: "justify-between border border-[color:var(--sofya-border-strong)] bg-card font-normal tracking-normal text-primary shadow-none hover:bg-card hover:border-[color:var(--sofya-border-strong)] data-[disabled=true]:text-[color:var(--sofya-text-subtle)] data-[disabled=true]:bg-muted",
1266
+ // Flat/ghost by default — same contract as `IconButton` so icon-only
1267
+ // actions never paint a box/background or shadow on light surfaces.
1268
+ icon: "border-0 bg-transparent text-[color:var(--sofya-text-soft)] shadow-none hover:bg-[color:var(--sofya-surface-hover)] hover:text-[color:var(--sofya-text-default)] data-[disabled=true]:bg-transparent data-[disabled=true]:text-[color:var(--sofya-text-subtle)] data-[disabled=true]:shadow-none",
1396
1269
  language: "border-0 bg-muted bg-cover bg-center bg-no-repeat text-primary-foreground shadow-none hover:brightness-[1.03]",
1397
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85",
1398
- outline: "border border-primary/15 bg-background text-foreground hover:border-primary/30 hover:bg-background active:bg-background",
1399
- ghost: "bg-transparent text-foreground hover:bg-muted",
1400
- destructive: "bg-destructive text-destructive-foreground hover:brightness-[1.04]"
1270
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 data-[disabled=true]:bg-muted data-[disabled=true]:text-[color:var(--sofya-text-subtle)]",
1271
+ outline: "border border-primary/15 bg-background text-foreground hover:border-primary/30 hover:bg-background active:bg-background data-[disabled=true]:border-[color:var(--sofya-border-soft)] data-[disabled=true]:text-[color:var(--sofya-text-subtle)]",
1272
+ ghost: "bg-transparent text-foreground hover:bg-muted data-[disabled=true]:text-[color:var(--sofya-text-subtle)]",
1273
+ destructive: "bg-destructive text-destructive-foreground hover:brightness-[1.04] data-[disabled=true]:bg-muted data-[disabled=true]:text-[color:var(--sofya-text-subtle)]"
1401
1274
  },
1402
1275
  size: {
1403
1276
  default: "h-11 px-10",
@@ -1427,7 +1300,7 @@ var languageButtonSizeClasses = {
1427
1300
  function ButtonSpinner({
1428
1301
  size
1429
1302
  }) {
1430
- return /* @__PURE__ */ jsx8(
1303
+ return /* @__PURE__ */ jsx6(
1431
1304
  IconLoader2,
1432
1305
  {
1433
1306
  "aria-hidden": "true",
@@ -1438,7 +1311,7 @@ function ButtonSpinner({
1438
1311
  }
1439
1312
  );
1440
1313
  }
1441
- var Button = React8.forwardRef(
1314
+ var Button = React7.forwardRef(
1442
1315
  ({
1443
1316
  active = false,
1444
1317
  disabled,
@@ -1457,9 +1330,9 @@ var Button = React8.forwardRef(
1457
1330
  style,
1458
1331
  ...props
1459
1332
  }, ref) => {
1460
- const buttonRef = React8.useRef(null);
1333
+ const buttonRef = React7.useRef(null);
1461
1334
  const Component = asChild ? Slot : "button";
1462
- const hasChildren = React8.Children.count(children) > 0;
1335
+ const hasChildren = React7.Children.count(children) > 0;
1463
1336
  const isIconOnly = !hasChildren && Boolean(leftIcon || rightIcon);
1464
1337
  const isIconOnlyAction = variant === "icon" && isIconOnly;
1465
1338
  const resolvedSize = size ?? (isIconOnly ? "icon" : "default");
@@ -1478,13 +1351,14 @@ var Button = React8.forwardRef(
1478
1351
  rightIcon
1479
1352
  });
1480
1353
  const isDisabled = disabled || loadingPhase !== "idle";
1354
+ const showDisabledTreatment = Boolean(disabled) && !loading;
1481
1355
  const resolvedWidthStyle = animatedWidth === void 0 ? style?.width : `${animatedWidth}px`;
1482
1356
  const isCompactPhase = loadingPhase === "collapsing" || loadingPhase === "loading" || loadingPhase === "hiding-spinner";
1483
1357
  const hideContent = loadingPhase === "hiding-content" || loadingPhase === "collapsing" || loadingPhase === "loading" || loadingPhase === "hiding-spinner" || loadingPhase === "expanding";
1484
1358
  const showSpinner = loadingPhase === "loading";
1485
1359
  const iconOnlyActionClassName = isIconOnlyAction ? cn(
1486
- "h-10 w-10 rounded-[10px] border-0 p-2 text-primary shadow-none",
1487
- active ? "bg-[color:var(--sofya-surface-selected)] hover:bg-[color:var(--sofya-surface-selected)]" : "bg-background hover:bg-background"
1360
+ "h-10 w-10 rounded-[10px] border-0 p-2 shadow-none",
1361
+ active ? "bg-[color:var(--sofya-surface-selected)] text-primary hover:bg-[color:var(--sofya-surface-selected)]" : "bg-transparent text-[color:var(--sofya-text-soft)] hover:bg-[color:var(--sofya-surface-hover)] hover:text-[color:var(--sofya-text-default)]"
1488
1362
  ) : void 0;
1489
1363
  const languageButtonClassName = isLanguageButton ? cn(
1490
1364
  "min-w-0 overflow-hidden border-0 text-primary-foreground shadow-none",
@@ -1513,12 +1387,12 @@ var Button = React8.forwardRef(
1513
1387
  size: resolvedSize,
1514
1388
  variant: resolvedVariant
1515
1389
  });
1516
- React8.useImperativeHandle(
1390
+ React7.useImperativeHandle(
1517
1391
  ref,
1518
1392
  () => buttonRef.current
1519
1393
  );
1520
- const buttonContent = isLanguageButton ? null : isIconOnly ? /* @__PURE__ */ jsx8("span", { className: iconSlotClassName, children: iconOnlyNode }) : /* @__PURE__ */ jsxs3(Fragment, { children: [
1521
- leftIcon ? /* @__PURE__ */ jsx8("span", { className: iconSlotClassName, children: leftIcon }) : null,
1394
+ const buttonContent = isLanguageButton ? null : isIconOnly ? /* @__PURE__ */ jsx6("span", { className: iconSlotClassName, children: iconOnlyNode }) : /* @__PURE__ */ jsxs2(Fragment, { children: [
1395
+ leftIcon ? /* @__PURE__ */ jsx6("span", { className: iconSlotClassName, children: leftIcon }) : null,
1522
1396
  hasChildren ? renderTextContent(children, {
1523
1397
  as: "span",
1524
1398
  className: "inline-flex items-center text-current",
@@ -1528,9 +1402,9 @@ var Button = React8.forwardRef(
1528
1402
  letterSpacing: "inherit"
1529
1403
  }
1530
1404
  }) : null,
1531
- rightIcon ? /* @__PURE__ */ jsx8("span", { className: iconSlotClassName, children: rightIcon }) : null
1405
+ rightIcon ? /* @__PURE__ */ jsx6("span", { className: iconSlotClassName, children: rightIcon }) : null
1532
1406
  ] });
1533
- return /* @__PURE__ */ jsxs3(
1407
+ return /* @__PURE__ */ jsxs2(
1534
1408
  Component,
1535
1409
  {
1536
1410
  className: cn(
@@ -1543,6 +1417,7 @@ var Button = React8.forwardRef(
1543
1417
  "aria-label": props["aria-label"] ?? (isLanguageButton ? resolvedLanguageLabel : void 0),
1544
1418
  "aria-pressed": isIconOnlyAction ? active : props["aria-pressed"],
1545
1419
  "aria-busy": loading,
1420
+ "data-disabled": showDisabledTreatment ? "true" : void 0,
1546
1421
  disabled: asChild ? void 0 : isDisabled,
1547
1422
  onClick: handleClick,
1548
1423
  onPointerDown: handlePointerDown,
@@ -1551,7 +1426,7 @@ var Button = React8.forwardRef(
1551
1426
  style: { ...resolvedButtonStyle, width: resolvedWidthStyle },
1552
1427
  ...props,
1553
1428
  children: [
1554
- /* @__PURE__ */ jsx8(
1429
+ /* @__PURE__ */ jsx6(
1555
1430
  ButtonRippleLayer,
1556
1431
  {
1557
1432
  onAnimationComplete: handleRippleComplete,
@@ -1560,7 +1435,7 @@ var Button = React8.forwardRef(
1560
1435
  ripples
1561
1436
  }
1562
1437
  ),
1563
- /* @__PURE__ */ jsx8(
1438
+ /* @__PURE__ */ jsx6(
1564
1439
  "span",
1565
1440
  {
1566
1441
  className: cn(
@@ -1570,7 +1445,7 @@ var Button = React8.forwardRef(
1570
1445
  children: buttonContent
1571
1446
  }
1572
1447
  ),
1573
- /* @__PURE__ */ jsx8(
1448
+ /* @__PURE__ */ jsx6(
1574
1449
  "span",
1575
1450
  {
1576
1451
  "aria-hidden": "true",
@@ -1578,23 +1453,248 @@ var Button = React8.forwardRef(
1578
1453
  "pointer-events-none absolute inset-0 z-[2] flex items-center justify-center transition-opacity duration-sofya ease-sofya",
1579
1454
  showSpinner ? "opacity-100" : "opacity-0"
1580
1455
  ),
1581
- children: /* @__PURE__ */ jsx8(ButtonSpinner, { size: resolvedSize })
1456
+ children: /* @__PURE__ */ jsx6(ButtonSpinner, { size: resolvedSize })
1582
1457
  }
1583
1458
  )
1584
1459
  ]
1585
1460
  }
1586
- );
1461
+ );
1462
+ }
1463
+ );
1464
+ Button.displayName = "Button";
1465
+
1466
+ // src/components/close-button.tsx
1467
+ import { jsx as jsx7 } from "react/jsx-runtime";
1468
+ var CloseButton = React8.forwardRef(
1469
+ function CloseButton2({
1470
+ className,
1471
+ iconSize = 18,
1472
+ label = "Fechar",
1473
+ size = "icon",
1474
+ type = "button",
1475
+ ...props
1476
+ }, ref) {
1477
+ const ariaLabel = props["aria-label"] ?? label;
1478
+ return /* @__PURE__ */ jsx7(
1479
+ Button,
1480
+ {
1481
+ ref,
1482
+ type,
1483
+ variant: "ghost",
1484
+ size,
1485
+ "data-slot": "close-button",
1486
+ "aria-label": ariaLabel,
1487
+ leftIcon: /* @__PURE__ */ jsx7(Icon, { name: "x", size: iconSize }),
1488
+ className: cn(
1489
+ "h-8 w-8 shrink-0 rounded-full bg-transparent text-[color:var(--sofya-text-soft)] hover:bg-[color:var(--sofya-surface-hover)] hover:text-[color:var(--sofya-text-default)]",
1490
+ className
1491
+ ),
1492
+ ...props
1493
+ }
1494
+ );
1495
+ }
1496
+ );
1497
+ CloseButton.displayName = "CloseButton";
1498
+
1499
+ // src/components/alert.tsx
1500
+ import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
1501
+ var alertToneOptions = [
1502
+ "default",
1503
+ "info",
1504
+ "success",
1505
+ "warning",
1506
+ "destructive"
1507
+ ];
1508
+ var alertSizeOptions = ["sm", "default", "lg"];
1509
+ var alertVariants = cva3("flex w-full items-start border", {
1510
+ variants: {
1511
+ size: {
1512
+ sm: "gap-2 rounded-[14px] px-4 py-2",
1513
+ default: "gap-4 rounded-[16px] px-4 py-4",
1514
+ lg: "gap-4 rounded-[18px] px-6 py-4"
1515
+ },
1516
+ tone: {
1517
+ default: "border-[color:var(--sofya-tone-default-border)] bg-[color:var(--sofya-tone-default-background)] text-[color:var(--sofya-tone-default-foreground)]",
1518
+ info: "border-[color:var(--sofya-tone-info-border)] bg-[color:var(--sofya-tone-info-background)] text-[color:var(--sofya-tone-info-foreground)]",
1519
+ success: "border-[color:var(--sofya-tone-success-border)] bg-[color:var(--sofya-tone-success-background)] text-[color:var(--sofya-tone-success-foreground)]",
1520
+ warning: "border-[color:var(--sofya-tone-warning-border)] bg-[color:var(--sofya-tone-warning-background)] text-[color:var(--sofya-tone-warning-foreground)]",
1521
+ destructive: "border-[color:var(--sofya-tone-destructive-border)] bg-[color:var(--sofya-tone-destructive-background)] text-[color:var(--sofya-tone-destructive-foreground)]"
1522
+ }
1523
+ },
1524
+ defaultVariants: {
1525
+ size: "default",
1526
+ tone: "default"
1527
+ }
1528
+ });
1529
+ var toneIconMap = {
1530
+ info: "lightbulb",
1531
+ success: "check",
1532
+ warning: "question",
1533
+ destructive: "x"
1534
+ };
1535
+ var Alert = React9.forwardRef(function Alert2({
1536
+ children,
1537
+ className,
1538
+ dismissLabel = "Dispensar",
1539
+ icon,
1540
+ onDismiss,
1541
+ role,
1542
+ showToneIcon = true,
1543
+ size,
1544
+ tone,
1545
+ ...props
1546
+ }, ref) {
1547
+ const resolvedSize = size ?? "default";
1548
+ const resolvedTone = tone ?? "default";
1549
+ const resolvedRole = role ?? (resolvedTone === "warning" || resolvedTone === "destructive" ? "alert" : "status");
1550
+ const toneIconName = resolvedTone !== "default" ? toneIconMap[resolvedTone] : void 0;
1551
+ const resolvedIcon = icon ?? (showToneIcon && toneIconName ? /* @__PURE__ */ jsx8(Icon, { name: toneIconName, size: 16, "aria-hidden": "true" }) : null);
1552
+ return /* @__PURE__ */ jsxs3(
1553
+ "div",
1554
+ {
1555
+ ref,
1556
+ "data-size": resolvedSize,
1557
+ "data-slot": "alert",
1558
+ "data-tone": resolvedTone,
1559
+ role: resolvedRole,
1560
+ className: cn(
1561
+ alertVariants({ size: resolvedSize, tone: resolvedTone }),
1562
+ className
1563
+ ),
1564
+ ...props,
1565
+ children: [
1566
+ resolvedIcon ? /* @__PURE__ */ jsx8(
1567
+ "span",
1568
+ {
1569
+ "data-slot": "alert-icon",
1570
+ className: "mt-2 inline-flex h-4 w-4 shrink-0 items-center justify-center text-current [&>svg]:h-4 [&>svg]:w-4",
1571
+ children: resolvedIcon
1572
+ }
1573
+ ) : null,
1574
+ /* @__PURE__ */ jsx8("div", { "data-slot": "alert-content", className: "flex min-w-0 flex-1 flex-col", children }),
1575
+ onDismiss ? /* @__PURE__ */ jsx8(
1576
+ CloseButton,
1577
+ {
1578
+ label: dismissLabel,
1579
+ onClick: onDismiss,
1580
+ iconSize: 16,
1581
+ className: "-mr-1 -mt-1 text-current hover:text-current"
1582
+ }
1583
+ ) : null
1584
+ ]
1585
+ }
1586
+ );
1587
+ });
1588
+ var AlertTitle = React9.forwardRef(function AlertTitle2({ children, className, ...props }, ref) {
1589
+ return /* @__PURE__ */ jsx8(
1590
+ "div",
1591
+ {
1592
+ ref,
1593
+ "data-slot": "alert-title",
1594
+ className: cn("text-current", className),
1595
+ ...props,
1596
+ children: renderTextContent(children, {
1597
+ as: "span",
1598
+ className: "block text-current",
1599
+ size: "h4"
1600
+ })
1601
+ }
1602
+ );
1603
+ });
1604
+ var AlertDescription = React9.forwardRef(function AlertDescription2({ children, className, ...props }, ref) {
1605
+ return /* @__PURE__ */ jsx8(
1606
+ "div",
1607
+ {
1608
+ ref,
1609
+ "data-slot": "alert-description",
1610
+ className: cn("[&:not(:first-child)]:mt-2 text-current/80", className),
1611
+ ...props,
1612
+ children: renderTextContent(children, {
1613
+ as: "span",
1614
+ className: "block text-current/80",
1615
+ size: "tiny"
1616
+ })
1617
+ }
1618
+ );
1619
+ });
1620
+ Alert.displayName = "Alert";
1621
+ AlertTitle.displayName = "AlertTitle";
1622
+ AlertDescription.displayName = "AlertDescription";
1623
+
1624
+ // src/components/badge.tsx
1625
+ import { cva as cva4 } from "class-variance-authority";
1626
+ import { jsx as jsx9 } from "react/jsx-runtime";
1627
+ var badgeVariantOptions = [
1628
+ "default",
1629
+ "secondary",
1630
+ "outline",
1631
+ "success",
1632
+ "warning",
1633
+ "destructive",
1634
+ "pill"
1635
+ ];
1636
+ var badgeAlertOptions = ["default", "medium", "high"];
1637
+ var badgePillToneOptions = ["neutral", "danger"];
1638
+ var badgeVariants = cva4(
1639
+ "inline-flex min-h-[34px] items-center justify-center whitespace-nowrap rounded-[5px] px-4 py-2 [font-family:var(--sofya-text-tiny-font-family)] text-[length:var(--sofya-text-tiny-font-size)] font-semibold uppercase leading-none tracking-[0.08em] transition-colors duration-sofya ease-sofya",
1640
+ {
1641
+ variants: {
1642
+ variant: {
1643
+ default: "border-transparent bg-accent/10 text-accent",
1644
+ secondary: "border-transparent bg-secondary text-secondary-foreground",
1645
+ outline: "border border-border bg-background text-foreground",
1646
+ success: "border-transparent bg-success/10 text-success",
1647
+ warning: "border-transparent bg-warning/10 text-warning",
1648
+ destructive: "border-transparent bg-destructive/10 text-destructive",
1649
+ pill: ""
1650
+ }
1651
+ },
1652
+ defaultVariants: {
1653
+ variant: "default"
1654
+ }
1655
+ }
1656
+ );
1657
+ var badgeAlertVariants = cva4(
1658
+ "inline-flex min-h-[34px] items-center justify-center whitespace-nowrap rounded-[5px] px-4 py-2 [font-family:var(--sofya-text-tiny-font-family)] text-[length:var(--sofya-text-tiny-font-size)] font-semibold uppercase leading-none tracking-[0.08em] transition-colors duration-sofya ease-sofya",
1659
+ {
1660
+ variants: {
1661
+ alert: {
1662
+ default: "border-transparent bg-accent/10 text-accent",
1663
+ medium: "border-transparent bg-[color:var(--sofya-tone-warning-background)] text-warning",
1664
+ high: "border-transparent bg-[color:var(--sofya-tone-destructive-background)] text-destructive"
1665
+ }
1666
+ },
1667
+ defaultVariants: {
1668
+ alert: "default"
1669
+ }
1587
1670
  }
1588
1671
  );
1589
- Button.displayName = "Button";
1672
+ var badgePillVariants = cva4(
1673
+ "inline-flex h-[30px] items-center justify-center whitespace-nowrap rounded-full border px-4 py-2 [font-family:var(--sofya-text-extra-tiny-font-family)] text-[length:var(--sofya-text-extra-tiny-font-size)] font-semibold leading-none tracking-normal transition-colors duration-sofya ease-sofya",
1674
+ {
1675
+ variants: {
1676
+ tone: {
1677
+ neutral: "border-[color:var(--sofya-tone-default-border)] bg-[color:var(--sofya-tone-default-background)] text-[color:var(--sofya-tone-default-foreground)]",
1678
+ danger: "border-[color:var(--sofya-tone-destructive-border)] bg-[color:var(--sofya-tone-destructive-background)] text-[color:var(--sofya-tone-destructive-foreground)]"
1679
+ }
1680
+ },
1681
+ defaultVariants: {
1682
+ tone: "neutral"
1683
+ }
1684
+ }
1685
+ );
1686
+ function Badge({ className, variant, alert, pillTone, ...props }) {
1687
+ const badgeClassName = variant === "pill" ? badgePillVariants({ tone: pillTone }) : alert ? badgeAlertVariants({ alert }) : badgeVariants({ variant });
1688
+ return /* @__PURE__ */ jsx9("div", { className: cn(badgeClassName, className), ...props });
1689
+ }
1590
1690
 
1591
1691
  // src/components/surface.tsx
1592
- import * as React9 from "react";
1692
+ import * as React10 from "react";
1593
1693
  import { Slot as Slot2 } from "@radix-ui/react-slot";
1594
1694
  import {
1595
1695
  sofyaSurfaceNames
1596
1696
  } from "@sofya-ds/tokens";
1597
- import { jsx as jsx9 } from "react/jsx-runtime";
1697
+ import { jsx as jsx10 } from "react/jsx-runtime";
1598
1698
  var surfaceVariantOptions = sofyaSurfaceNames;
1599
1699
  function toCssTokenName(name) {
1600
1700
  return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
@@ -1613,7 +1713,7 @@ function getSurfaceStyle(variant) {
1613
1713
  }
1614
1714
  function SurfaceComponent({ as, asChild = false, variant = "card", className, style, ...props }, ref) {
1615
1715
  const Component = asChild ? Slot2 : as ?? "div";
1616
- return /* @__PURE__ */ jsx9(
1716
+ return /* @__PURE__ */ jsx10(
1617
1717
  Component,
1618
1718
  {
1619
1719
  ref,
@@ -1624,16 +1724,16 @@ function SurfaceComponent({ as, asChild = false, variant = "card", className, st
1624
1724
  }
1625
1725
  );
1626
1726
  }
1627
- var SurfaceBase = React9.forwardRef(SurfaceComponent);
1727
+ var SurfaceBase = React10.forwardRef(SurfaceComponent);
1628
1728
  SurfaceBase.displayName = "Surface";
1629
1729
  var Surface = SurfaceBase;
1630
1730
 
1631
1731
  // src/components/card.tsx
1632
- import { jsx as jsx10 } from "react/jsx-runtime";
1732
+ import { jsx as jsx11 } from "react/jsx-runtime";
1633
1733
  var cardVariants = ["card", "focus"];
1634
1734
  function Card({ className, variant = "card", ...props }) {
1635
1735
  const hasHoverShadow = variant === "card";
1636
- return /* @__PURE__ */ jsx10(
1736
+ return /* @__PURE__ */ jsx11(
1637
1737
  Surface,
1638
1738
  {
1639
1739
  variant,
@@ -1647,10 +1747,10 @@ function Card({ className, variant = "card", ...props }) {
1647
1747
  );
1648
1748
  }
1649
1749
  function CardHeader({ className, ...props }) {
1650
- return /* @__PURE__ */ jsx10("div", { className: cn("flex flex-col gap-2 p-6", className), ...props });
1750
+ return /* @__PURE__ */ jsx11("div", { className: cn("flex flex-col gap-2 p-6", className), ...props });
1651
1751
  }
1652
1752
  function CardTitle({ children, className, ...props }) {
1653
- return /* @__PURE__ */ jsx10(
1753
+ return /* @__PURE__ */ jsx11(
1654
1754
  "h3",
1655
1755
  {
1656
1756
  className: cn("text-card-foreground", className),
@@ -1668,26 +1768,26 @@ function CardDescription({
1668
1768
  className,
1669
1769
  ...props
1670
1770
  }) {
1671
- return /* @__PURE__ */ jsx10("p", { className: cn("text-muted-foreground", className), ...props, children: renderTextContent(children, {
1771
+ return /* @__PURE__ */ jsx11("p", { className: cn("text-muted-foreground", className), ...props, children: renderTextContent(children, {
1672
1772
  as: "span",
1673
1773
  className: "block text-muted-foreground",
1674
1774
  size: "body"
1675
1775
  }) });
1676
1776
  }
1677
1777
  function CardContent({ children, className, ...props }) {
1678
- return /* @__PURE__ */ jsx10("div", { className: cn("p-6 pt-0", className), ...props, children: renderTextContent(children, {
1778
+ return /* @__PURE__ */ jsx11("div", { className: cn("p-6 pt-0", className), ...props, children: renderTextContent(children, {
1679
1779
  as: "span"
1680
1780
  }) });
1681
1781
  }
1682
1782
  function CardFooter({ children, className, ...props }) {
1683
- return /* @__PURE__ */ jsx10("div", { className: cn("flex items-center gap-4 p-6 pt-0", className), ...props, children: renderTextContent(children, {
1783
+ return /* @__PURE__ */ jsx11("div", { className: cn("flex items-center gap-4 p-6 pt-0", className), ...props, children: renderTextContent(children, {
1684
1784
  as: "span"
1685
1785
  }) });
1686
1786
  }
1687
1787
 
1688
1788
  // src/components/checkbox.tsx
1689
- import * as React10 from "react";
1690
- import { IconCheck as IconCheck2 } from "@tabler/icons-react";
1789
+ import * as React11 from "react";
1790
+ import { IconCheck as IconCheck2, IconMinus } from "@tabler/icons-react";
1691
1791
 
1692
1792
  // src/lib/selection-control-classes.ts
1693
1793
  var selectionControlContainerBaseClasses = "flex w-fit gap-4";
@@ -1709,8 +1809,8 @@ function selectionControlContainerClasses({
1709
1809
  }
1710
1810
 
1711
1811
  // src/components/checkbox.tsx
1712
- import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
1713
- var Checkbox = React10.forwardRef(
1812
+ import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
1813
+ var Checkbox = React11.forwardRef(
1714
1814
  function Checkbox2({
1715
1815
  checked,
1716
1816
  className,
@@ -1718,15 +1818,24 @@ var Checkbox = React10.forwardRef(
1718
1818
  description,
1719
1819
  descriptionClassName,
1720
1820
  disabled,
1821
+ error = false,
1721
1822
  id,
1823
+ indeterminate = false,
1722
1824
  label,
1723
1825
  labelClassName,
1724
1826
  ...props
1725
1827
  }, ref) {
1726
- const generatedId = React10.useId();
1828
+ const generatedId = React11.useId();
1727
1829
  const resolvedId = id ?? generatedId;
1728
1830
  const descriptionId = description ? `${resolvedId}-description` : void 0;
1729
1831
  const alignClassName2 = description ? "items-start" : "items-center";
1832
+ const innerRef = React11.useRef(null);
1833
+ React11.useImperativeHandle(ref, () => innerRef.current);
1834
+ React11.useEffect(() => {
1835
+ if (innerRef.current) {
1836
+ innerRef.current.indeterminate = indeterminate;
1837
+ }
1838
+ }, [indeterminate, checked]);
1730
1839
  return /* @__PURE__ */ jsxs4(
1731
1840
  "label",
1732
1841
  {
@@ -1737,34 +1846,58 @@ var Checkbox = React10.forwardRef(
1737
1846
  disabled
1738
1847
  }),
1739
1848
  children: [
1740
- /* @__PURE__ */ jsx11(
1741
- "input",
1742
- {
1743
- ref,
1744
- id: resolvedId,
1745
- type: "checkbox",
1746
- className: "peer sr-only",
1747
- checked,
1748
- defaultChecked,
1749
- disabled,
1750
- "aria-describedby": descriptionId,
1751
- ...props
1752
- }
1753
- ),
1754
- /* @__PURE__ */ jsx11(
1755
- "span",
1756
- {
1757
- "aria-hidden": "true",
1758
- className: cn(
1759
- "inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-[8px] text-transparent",
1760
- selectionControlControlBaseClasses,
1761
- "peer-checked:border-primary peer-checked:bg-primary peer-checked:text-primary-foreground peer-focus-visible:ring-2 peer-focus-visible:ring-[color:var(--sofya-focus-ring-soft)] peer-focus-visible:ring-offset-0"
1762
- ),
1763
- children: /* @__PURE__ */ jsx11(IconCheck2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0", stroke: 2.4 })
1764
- }
1765
- ),
1849
+ /* @__PURE__ */ jsxs4("span", { className: "relative inline-flex h-5 w-5 shrink-0", children: [
1850
+ /* @__PURE__ */ jsx12(
1851
+ "input",
1852
+ {
1853
+ ref: innerRef,
1854
+ id: resolvedId,
1855
+ type: "checkbox",
1856
+ className: "peer sr-only",
1857
+ checked,
1858
+ defaultChecked,
1859
+ disabled,
1860
+ "aria-invalid": error || void 0,
1861
+ "aria-describedby": descriptionId,
1862
+ ...props
1863
+ }
1864
+ ),
1865
+ /* @__PURE__ */ jsx12(
1866
+ "span",
1867
+ {
1868
+ "aria-hidden": "true",
1869
+ "data-error": error ? "true" : void 0,
1870
+ className: cn(
1871
+ "inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-[8px]",
1872
+ selectionControlControlBaseClasses,
1873
+ // Visible resting border on light surfaces (token-based, ~3.5:1).
1874
+ "border-muted-foreground",
1875
+ "peer-checked:border-primary peer-checked:bg-primary peer-indeterminate:border-primary peer-indeterminate:bg-primary",
1876
+ "peer-focus-visible:ring-2 peer-focus-visible:ring-[color:var(--sofya-focus-ring-soft)] peer-focus-visible:ring-offset-0",
1877
+ // Error state overrides the border/ring with destructive tokens.
1878
+ "data-[error=true]:border-destructive peer-focus-visible:data-[error=true]:ring-[color:var(--sofya-tone-destructive-border)]"
1879
+ )
1880
+ }
1881
+ ),
1882
+ /* @__PURE__ */ jsx12(
1883
+ IconCheck2,
1884
+ {
1885
+ "aria-hidden": "true",
1886
+ className: "pointer-events-none absolute left-1/2 top-1/2 h-4 w-4 -translate-x-1/2 -translate-y-1/2 text-primary-foreground opacity-0 peer-checked:opacity-100 peer-indeterminate:opacity-0",
1887
+ stroke: 2.4
1888
+ }
1889
+ ),
1890
+ /* @__PURE__ */ jsx12(
1891
+ IconMinus,
1892
+ {
1893
+ "aria-hidden": "true",
1894
+ className: "pointer-events-none absolute left-1/2 top-1/2 h-4 w-4 -translate-x-1/2 -translate-y-1/2 text-primary-foreground opacity-0 peer-indeterminate:opacity-100",
1895
+ stroke: 2.4
1896
+ }
1897
+ )
1898
+ ] }),
1766
1899
  label || description ? /* @__PURE__ */ jsxs4("span", { className: selectionControlContentBaseClasses, children: [
1767
- label ? /* @__PURE__ */ jsx11(
1900
+ label ? /* @__PURE__ */ jsx12(
1768
1901
  "span",
1769
1902
  {
1770
1903
  className: cn(
@@ -1778,7 +1911,7 @@ var Checkbox = React10.forwardRef(
1778
1911
  })
1779
1912
  }
1780
1913
  ) : null,
1781
- description ? /* @__PURE__ */ jsx11(
1914
+ description ? /* @__PURE__ */ jsx12(
1782
1915
  "span",
1783
1916
  {
1784
1917
  id: descriptionId,
@@ -1802,20 +1935,20 @@ var Checkbox = React10.forwardRef(
1802
1935
  Checkbox.displayName = "Checkbox";
1803
1936
 
1804
1937
  // src/components/dropdown.tsx
1805
- import * as React12 from "react";
1938
+ import * as React13 from "react";
1806
1939
  import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
1807
1940
 
1808
1941
  // src/lib/use-controllable-state.ts
1809
- import * as React11 from "react";
1942
+ import * as React12 from "react";
1810
1943
  function useControllableState({
1811
1944
  defaultValue,
1812
1945
  onChange,
1813
1946
  value
1814
1947
  }) {
1815
1948
  const isControlled = value !== void 0;
1816
- const [uncontrolledValue, setUncontrolledValue] = React11.useState(defaultValue);
1949
+ const [uncontrolledValue, setUncontrolledValue] = React12.useState(defaultValue);
1817
1950
  const currentValue = isControlled ? value : uncontrolledValue;
1818
- const setValue = React11.useCallback(
1951
+ const setValue = React12.useCallback(
1819
1952
  (nextValue) => {
1820
1953
  if (!isControlled) {
1821
1954
  setUncontrolledValue(nextValue);
@@ -1828,7 +1961,7 @@ function useControllableState({
1828
1961
  }
1829
1962
 
1830
1963
  // src/components/dropdown.tsx
1831
- import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
1964
+ import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
1832
1965
  var dropdownVariantOptions = [
1833
1966
  "card",
1834
1967
  "language",
@@ -1921,11 +2054,11 @@ function resolveAccessibleText(node) {
1921
2054
  if (typeof node === "string" || typeof node === "number") {
1922
2055
  return String(node);
1923
2056
  }
1924
- const parts = React12.Children.toArray(node).map((child) => {
2057
+ const parts = React13.Children.toArray(node).map((child) => {
1925
2058
  if (typeof child === "string" || typeof child === "number") {
1926
2059
  return String(child);
1927
2060
  }
1928
- if (React12.isValidElement(child)) {
2061
+ if (React13.isValidElement(child)) {
1929
2062
  return resolveAccessibleText(child.props.children);
1930
2063
  }
1931
2064
  return void 0;
@@ -1935,7 +2068,7 @@ function resolveAccessibleText(node) {
1935
2068
  }
1936
2069
  function DefaultDropdownTriggerIcon({ variant }) {
1937
2070
  if (variant === "selected") {
1938
- return /* @__PURE__ */ jsx12(
2071
+ return /* @__PURE__ */ jsx13(
1939
2072
  Icon,
1940
2073
  {
1941
2074
  name: "caret-down",
@@ -1943,16 +2076,16 @@ function DefaultDropdownTriggerIcon({ variant }) {
1943
2076
  }
1944
2077
  );
1945
2078
  }
1946
- return /* @__PURE__ */ jsx12("span", { className: "flex h-8 w-8 items-center justify-center rounded-[6px]", children: /* @__PURE__ */ jsx12(Icon, { name: "caret-down", className: "!h-4 !w-4" }) });
2079
+ return /* @__PURE__ */ jsx13("span", { className: "flex h-8 w-8 items-center justify-center rounded-[6px]", children: /* @__PURE__ */ jsx13(Icon, { name: "caret-down", className: "!h-4 !w-4" }) });
1947
2080
  }
1948
2081
  function DefaultDropdownItemIndicator() {
1949
- return /* @__PURE__ */ jsx12(Icon, { name: "check", size: 16 });
2082
+ return /* @__PURE__ */ jsx13(Icon, { name: "check", size: 16 });
1950
2083
  }
1951
2084
  function DefaultDropdownInlineCheck() {
1952
- return /* @__PURE__ */ jsx12(Icon, { name: "check", size: 14 });
2085
+ return /* @__PURE__ */ jsx13(Icon, { name: "check", size: 14 });
1953
2086
  }
1954
2087
  function LanguageFlagIcon({ locale }) {
1955
- return /* @__PURE__ */ jsx12(
2088
+ return /* @__PURE__ */ jsx13(
1956
2089
  "img",
1957
2090
  {
1958
2091
  alt: "",
@@ -1992,7 +2125,7 @@ function Dropdown({
1992
2125
  const resolvedAppearance = resolveDropdownAppearance({ appearance, variant });
1993
2126
  const triggerSizeFamily = isIconOnlyTrigger ? "action" : resolveDropdownTriggerSizeFamily(variant);
1994
2127
  const usesDefaultListStyle = !isLanguageVariant && !isActionVariant;
1995
- const resolvedItems = React12.useMemo(
2128
+ const resolvedItems = React13.useMemo(
1996
2129
  () => isLanguageVariant ? items && items.length > 0 ? items : dropdownLanguageItems : items ?? [],
1997
2130
  [isLanguageVariant, items]
1998
2131
  );
@@ -2002,14 +2135,14 @@ function Dropdown({
2002
2135
  onChange: onValueChange,
2003
2136
  value
2004
2137
  });
2005
- const [subValues, setSubValues] = React12.useState({});
2138
+ const [subValues, setSubValues] = React13.useState({});
2006
2139
  const radioValue = selectedValue ?? "";
2007
2140
  const selectedItem = resolvedItems.find(
2008
2141
  (item) => item.value === selectedValue
2009
2142
  );
2010
2143
  const hasSelectedItem = selectedItem !== void 0;
2011
2144
  const selectedLanguageLocale = resolveItemLanguageLocale(selectedItem);
2012
- React12.useEffect(() => {
2145
+ React13.useEffect(() => {
2013
2146
  if (value !== void 0) {
2014
2147
  return;
2015
2148
  }
@@ -2024,7 +2157,7 @@ function Dropdown({
2024
2157
  setUncontrolledSelectedValue,
2025
2158
  value
2026
2159
  ]);
2027
- const resolvedTriggerIcon = isLanguageVariant || isActionVariant || isIconOnlyTrigger ? void 0 : triggerIcon === void 0 ? /* @__PURE__ */ jsx12(DefaultDropdownTriggerIcon, { variant }) : triggerIcon;
2160
+ const resolvedTriggerIcon = isLanguageVariant || isActionVariant || isIconOnlyTrigger ? void 0 : triggerIcon === void 0 ? /* @__PURE__ */ jsx13(DefaultDropdownTriggerIcon, { variant }) : triggerIcon;
2028
2161
  const triggerLabel = selectedItem?.triggerLabel ?? selectedItem?.label ?? placeholder;
2029
2162
  const iconOnlyAriaLabel = isIconOnlyTrigger ? resolveAccessibleText(triggerLabel) : void 0;
2030
2163
  const selectedTriggerToneClassName = isSelectedVariant ? hasSelectedItem ? "text-foreground" : "text-[color:var(--sofya-text-soft)]" : void 0;
@@ -2036,7 +2169,7 @@ function Dropdown({
2036
2169
  onOpenChange,
2037
2170
  open,
2038
2171
  children: [
2039
- /* @__PURE__ */ jsx12(DropdownMenuPrimitive.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ jsx12(
2172
+ /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ jsx13(
2040
2173
  Button,
2041
2174
  {
2042
2175
  type: "button",
@@ -2054,16 +2187,16 @@ function Dropdown({
2054
2187
  isIconOnlyTrigger && "flex items-center justify-center",
2055
2188
  triggerClassName
2056
2189
  ),
2057
- leftIcon: isActionVariant || isIconOnlyTrigger ? iconTriggerSize !== void 0 ? /* @__PURE__ */ jsx12("span", { style: { fontSize: iconTriggerSize }, children: iconTrigger }) : iconTrigger : void 0,
2190
+ leftIcon: isActionVariant || isIconOnlyTrigger ? iconTriggerSize !== void 0 ? /* @__PURE__ */ jsx13("span", { style: { fontSize: iconTriggerSize }, children: iconTrigger }) : iconTrigger : void 0,
2058
2191
  rightIcon: resolvedTriggerIcon,
2059
- children: isLanguageVariant || isActionVariant || isIconOnlyTrigger ? null : /* @__PURE__ */ jsx12("span", { className: "min-w-0 truncate", children: renderTextContent(triggerLabel, {
2192
+ children: isLanguageVariant || isActionVariant || isIconOnlyTrigger ? null : /* @__PURE__ */ jsx13("span", { className: "min-w-0 truncate", children: renderTextContent(triggerLabel, {
2060
2193
  as: "span",
2061
2194
  className: "block min-w-0 truncate text-inherit",
2062
2195
  size: "tiny"
2063
2196
  }) })
2064
2197
  }
2065
2198
  ) }),
2066
- /* @__PURE__ */ jsx12(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx12(
2199
+ /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx13(
2067
2200
  DropdownMenuPrimitive.Content,
2068
2201
  {
2069
2202
  align,
@@ -2075,7 +2208,7 @@ function Dropdown({
2075
2208
  dropdownAppearanceClasses[resolvedAppearance].content,
2076
2209
  contentClassName
2077
2210
  ),
2078
- children: /* @__PURE__ */ jsx12(
2211
+ children: /* @__PURE__ */ jsx13(
2079
2212
  DropdownMenuPrimitive.RadioGroup,
2080
2213
  {
2081
2214
  value: radioValue,
@@ -2084,8 +2217,8 @@ function Dropdown({
2084
2217
  children: resolvedItems.map((item) => {
2085
2218
  const isSelected = item.value === selectedValue;
2086
2219
  const itemLanguageLocale = resolveItemLanguageLocale(item);
2087
- const indicator = item.indicator ?? /* @__PURE__ */ jsx12(DefaultDropdownItemIndicator, {});
2088
- const itemIcon = item.icon ?? (variant === "language" && itemLanguageLocale ? /* @__PURE__ */ jsx12(LanguageFlagIcon, { locale: itemLanguageLocale }) : null);
2220
+ const indicator = item.indicator ?? /* @__PURE__ */ jsx13(DefaultDropdownItemIndicator, {});
2221
+ const itemIcon = item.icon ?? (variant === "language" && itemLanguageLocale ? /* @__PURE__ */ jsx13(LanguageFlagIcon, { locale: itemLanguageLocale }) : null);
2089
2222
  if (isActionVariant && item.subItems && item.subItems.length > 0) {
2090
2223
  const currentSubValue = subValues[item.value];
2091
2224
  return /* @__PURE__ */ jsxs5(DropdownMenuPrimitive.Sub, { children: [
@@ -2100,17 +2233,17 @@ function Dropdown({
2100
2233
  itemClassName
2101
2234
  ),
2102
2235
  children: [
2103
- itemIcon && /* @__PURE__ */ jsx12("span", { className: "flex shrink-0 items-center justify-center", children: itemIcon }),
2104
- /* @__PURE__ */ jsx12("span", { className: "min-w-0 flex-1 truncate", children: renderTextContent(item.label, {
2236
+ itemIcon && /* @__PURE__ */ jsx13("span", { className: "flex shrink-0 items-center justify-center", children: itemIcon }),
2237
+ /* @__PURE__ */ jsx13("span", { className: "min-w-0 flex-1 truncate", children: renderTextContent(item.label, {
2105
2238
  as: "span",
2106
2239
  className: "block truncate text-inherit",
2107
2240
  size: "tiny"
2108
2241
  }) }),
2109
- /* @__PURE__ */ jsx12("span", { className: "flex shrink-0 items-center justify-center text-[color:var(--sofya-text-subtle)]", children: /* @__PURE__ */ jsx12(Icon, { name: "caret-right", size: 12 }) })
2242
+ /* @__PURE__ */ jsx13("span", { className: "flex shrink-0 items-center justify-center text-[color:var(--sofya-text-subtle)]", children: /* @__PURE__ */ jsx13(Icon, { name: "caret-right", size: 12 }) })
2110
2243
  ]
2111
2244
  }
2112
2245
  ),
2113
- /* @__PURE__ */ jsx12(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx12(
2246
+ /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx13(
2114
2247
  DropdownMenuPrimitive.SubContent,
2115
2248
  {
2116
2249
  sideOffset: 4,
@@ -2118,7 +2251,7 @@ function Dropdown({
2118
2251
  "sofya-dropdown-content z-50 w-[224px] min-w-[224px] overflow-hidden border bg-card p-2 outline-none",
2119
2252
  "rounded-[20px] border-[color:var(--sofya-border-strong)] text-foreground shadow-[var(--sofya-shadow-soft)]"
2120
2253
  ),
2121
- children: /* @__PURE__ */ jsx12(
2254
+ children: /* @__PURE__ */ jsx13(
2122
2255
  DropdownMenuPrimitive.RadioGroup,
2123
2256
  {
2124
2257
  value: currentSubValue ?? "",
@@ -2142,13 +2275,13 @@ function Dropdown({
2142
2275
  "data-[highlighted]:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-40"
2143
2276
  ),
2144
2277
  children: [
2145
- subItem.icon && /* @__PURE__ */ jsx12("span", { className: "flex shrink-0 items-center justify-center", children: subItem.icon }),
2146
- /* @__PURE__ */ jsx12("span", { className: "min-w-0 flex-1 truncate", children: renderTextContent(subItem.label, {
2278
+ subItem.icon && /* @__PURE__ */ jsx13("span", { className: "flex shrink-0 items-center justify-center", children: subItem.icon }),
2279
+ /* @__PURE__ */ jsx13("span", { className: "min-w-0 flex-1 truncate", children: renderTextContent(subItem.label, {
2147
2280
  as: "span",
2148
2281
  className: "block truncate text-inherit",
2149
2282
  size: "tiny"
2150
2283
  }) }),
2151
- /* @__PURE__ */ jsx12(
2284
+ /* @__PURE__ */ jsx13(
2152
2285
  "span",
2153
2286
  {
2154
2287
  "aria-hidden": "true",
@@ -2156,7 +2289,7 @@ function Dropdown({
2156
2289
  "flex h-4 w-4 shrink-0 items-center justify-center text-primary transition-opacity duration-sofya ease-sofya",
2157
2290
  isSubSelected ? "opacity-100" : "opacity-0"
2158
2291
  ),
2159
- children: /* @__PURE__ */ jsx12(DefaultDropdownItemIndicator, {})
2292
+ children: /* @__PURE__ */ jsx13(DefaultDropdownItemIndicator, {})
2160
2293
  }
2161
2294
  )
2162
2295
  ]
@@ -2173,7 +2306,7 @@ function Dropdown({
2173
2306
  if (usesDefaultListStyle && item.subItems && item.subItems.length > 0) {
2174
2307
  const currentSubValue = subValues[item.value];
2175
2308
  return /* @__PURE__ */ jsxs5(DropdownMenuPrimitive.Sub, { children: [
2176
- /* @__PURE__ */ jsx12(
2309
+ /* @__PURE__ */ jsx13(
2177
2310
  DropdownMenuPrimitive.SubTrigger,
2178
2311
  {
2179
2312
  disabled: item.disabled,
@@ -2189,19 +2322,19 @@ function Dropdown({
2189
2322
  "data-dropdown-item-body": true,
2190
2323
  className: "inline-flex min-w-0 items-center gap-2 rounded-full px-4 py-2 transition-colors duration-sofya ease-sofya bg-transparent",
2191
2324
  children: [
2192
- itemIcon ? /* @__PURE__ */ jsx12("span", { className: "flex shrink-0 items-center justify-center", children: itemIcon }) : null,
2193
- /* @__PURE__ */ jsx12("span", { className: "truncate", children: renderTextContent(item.label, {
2325
+ itemIcon ? /* @__PURE__ */ jsx13("span", { className: "flex shrink-0 items-center justify-center", children: itemIcon }) : null,
2326
+ /* @__PURE__ */ jsx13("span", { className: "truncate", children: renderTextContent(item.label, {
2194
2327
  as: "span",
2195
2328
  className: "block truncate text-inherit",
2196
2329
  size: "tiny"
2197
2330
  }) }),
2198
- /* @__PURE__ */ jsx12("span", { className: "flex shrink-0 items-center justify-center text-[color:var(--sofya-text-subtle)]", children: /* @__PURE__ */ jsx12(Icon, { name: "caret-right", size: 12 }) })
2331
+ /* @__PURE__ */ jsx13("span", { className: "flex shrink-0 items-center justify-center text-[color:var(--sofya-text-subtle)]", children: /* @__PURE__ */ jsx13(Icon, { name: "caret-right", size: 12 }) })
2199
2332
  ]
2200
2333
  }
2201
2334
  )
2202
2335
  }
2203
2336
  ),
2204
- /* @__PURE__ */ jsx12(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx12(
2337
+ /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx13(
2205
2338
  DropdownMenuPrimitive.SubContent,
2206
2339
  {
2207
2340
  sideOffset: 4,
@@ -2209,7 +2342,7 @@ function Dropdown({
2209
2342
  "sofya-dropdown-content z-50 w-auto min-w-[var(--radix-dropdown-menu-trigger-width)] max-w-[224px] overflow-hidden border bg-card p-2 outline-none",
2210
2343
  "rounded-[20px] border-[color:var(--sofya-border-strong)] text-foreground shadow-[var(--sofya-shadow-soft)]"
2211
2344
  ),
2212
- children: /* @__PURE__ */ jsx12(
2345
+ children: /* @__PURE__ */ jsx13(
2213
2346
  DropdownMenuPrimitive.RadioGroup,
2214
2347
  {
2215
2348
  value: currentSubValue ?? "",
@@ -2223,7 +2356,7 @@ function Dropdown({
2223
2356
  className: "grid gap-1",
2224
2357
  children: item.subItems.map((subItem) => {
2225
2358
  const isSubSelected = subItem.value === currentSubValue;
2226
- return /* @__PURE__ */ jsx12(
2359
+ return /* @__PURE__ */ jsx13(
2227
2360
  DropdownMenuPrimitive.RadioItem,
2228
2361
  {
2229
2362
  value: subItem.value,
@@ -2241,18 +2374,18 @@ function Dropdown({
2241
2374
  isSubSelected ? "bg-[color:var(--sofya-surface-selected)]" : "bg-transparent"
2242
2375
  ),
2243
2376
  children: [
2244
- subItem.icon ? /* @__PURE__ */ jsx12("span", { className: "flex shrink-0 items-center justify-center", children: subItem.icon }) : null,
2245
- /* @__PURE__ */ jsx12("span", { className: "min-w-0 truncate", children: renderTextContent(subItem.label, {
2377
+ subItem.icon ? /* @__PURE__ */ jsx13("span", { className: "flex shrink-0 items-center justify-center", children: subItem.icon }) : null,
2378
+ /* @__PURE__ */ jsx13("span", { className: "min-w-0 truncate", children: renderTextContent(subItem.label, {
2246
2379
  as: "span",
2247
2380
  className: "block truncate text-inherit",
2248
2381
  size: "tiny"
2249
2382
  }) }),
2250
- isSubSelected ? /* @__PURE__ */ jsx12(
2383
+ isSubSelected ? /* @__PURE__ */ jsx13(
2251
2384
  "span",
2252
2385
  {
2253
2386
  "aria-hidden": "true",
2254
2387
  className: "flex h-[14px] w-[14px] shrink-0 items-center justify-center",
2255
- children: /* @__PURE__ */ jsx12(DefaultDropdownInlineCheck, {})
2388
+ children: /* @__PURE__ */ jsx13(DefaultDropdownInlineCheck, {})
2256
2389
  }
2257
2390
  ) : null
2258
2391
  ]
@@ -2281,13 +2414,13 @@ function Dropdown({
2281
2414
  itemClassName
2282
2415
  ),
2283
2416
  children: [
2284
- itemIcon && /* @__PURE__ */ jsx12("span", { className: "flex shrink-0 items-center justify-center", children: itemIcon }),
2285
- /* @__PURE__ */ jsx12("span", { className: "min-w-0 flex-1 truncate", children: renderTextContent(item.label, {
2417
+ itemIcon && /* @__PURE__ */ jsx13("span", { className: "flex shrink-0 items-center justify-center", children: itemIcon }),
2418
+ /* @__PURE__ */ jsx13("span", { className: "min-w-0 flex-1 truncate", children: renderTextContent(item.label, {
2286
2419
  as: "span",
2287
2420
  className: "block truncate text-inherit",
2288
2421
  size: "tiny"
2289
2422
  }) }),
2290
- /* @__PURE__ */ jsx12(
2423
+ /* @__PURE__ */ jsx13(
2291
2424
  "span",
2292
2425
  {
2293
2426
  "aria-hidden": "true",
@@ -2303,7 +2436,7 @@ function Dropdown({
2303
2436
  item.value
2304
2437
  );
2305
2438
  }
2306
- return /* @__PURE__ */ jsx12(
2439
+ return /* @__PURE__ */ jsx13(
2307
2440
  DropdownMenuPrimitive.RadioItem,
2308
2441
  {
2309
2442
  value: item.value,
@@ -2323,18 +2456,18 @@ function Dropdown({
2323
2456
  isSelected ? "bg-[color:var(--sofya-surface-selected)]" : "bg-transparent"
2324
2457
  ),
2325
2458
  children: [
2326
- itemIcon ? /* @__PURE__ */ jsx12("span", { className: "flex shrink-0 items-center justify-center", children: itemIcon }) : null,
2327
- /* @__PURE__ */ jsx12("span", { className: "truncate", children: renderTextContent(item.label, {
2459
+ itemIcon ? /* @__PURE__ */ jsx13("span", { className: "flex shrink-0 items-center justify-center", children: itemIcon }) : null,
2460
+ /* @__PURE__ */ jsx13("span", { className: "truncate", children: renderTextContent(item.label, {
2328
2461
  as: "span",
2329
2462
  className: "block truncate text-inherit",
2330
2463
  size: "tiny"
2331
2464
  }) }),
2332
- isSelected ? /* @__PURE__ */ jsx12(
2465
+ isSelected ? /* @__PURE__ */ jsx13(
2333
2466
  "span",
2334
2467
  {
2335
2468
  "aria-hidden": "true",
2336
2469
  className: "flex h-[14px] w-[14px] shrink-0 items-center justify-center",
2337
- children: /* @__PURE__ */ jsx12(DefaultDropdownInlineCheck, {})
2470
+ children: /* @__PURE__ */ jsx13(DefaultDropdownInlineCheck, {})
2338
2471
  }
2339
2472
  ) : null
2340
2473
  ]
@@ -2354,14 +2487,14 @@ function Dropdown({
2354
2487
  }
2355
2488
 
2356
2489
  // src/components/dropdown-search.tsx
2357
- import * as React18 from "react";
2490
+ import * as React19 from "react";
2358
2491
 
2359
2492
  // src/components/input.tsx
2360
- import * as React15 from "react";
2493
+ import * as React16 from "react";
2361
2494
  import { REGEXP_ONLY_DIGITS as REGEXP_ONLY_DIGITS2 } from "input-otp";
2362
2495
 
2363
2496
  // src/lib/field-shell.tsx
2364
- import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
2497
+ import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
2365
2498
  function FieldLabel({
2366
2499
  children,
2367
2500
  className,
@@ -2376,7 +2509,7 @@ function FieldLabel({
2376
2509
  return null;
2377
2510
  }
2378
2511
  const Component = htmlFor ? "label" : "div";
2379
- return /* @__PURE__ */ jsx13(
2512
+ return /* @__PURE__ */ jsx14(
2380
2513
  Component,
2381
2514
  {
2382
2515
  className: cn("text-[color:var(--sofya-text-default)]", className),
@@ -2404,7 +2537,7 @@ function FieldShell({
2404
2537
  return control;
2405
2538
  }
2406
2539
  return /* @__PURE__ */ jsxs6("div", { className: cn("grid w-full gap-2", containerClassName), children: [
2407
- label ? /* @__PURE__ */ jsx13(
2540
+ label ? /* @__PURE__ */ jsx14(
2408
2541
  FieldLabel,
2409
2542
  {
2410
2543
  className: labelClassName,
@@ -2420,7 +2553,7 @@ function FieldShell({
2420
2553
  }
2421
2554
 
2422
2555
  // src/components/input-upload.tsx
2423
- import * as React13 from "react";
2556
+ import * as React14 from "react";
2424
2557
  import {
2425
2558
  IconFileText,
2426
2559
  IconPhoto,
@@ -2428,7 +2561,7 @@ import {
2428
2561
  IconVideo
2429
2562
  } from "@tabler/icons-react";
2430
2563
  import { AnimatePresence, motion as motion2, useReducedMotion as useReducedMotion2 } from "motion/react";
2431
- import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
2564
+ import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
2432
2565
  var uploadKindOptions = ["document", "image", "video"];
2433
2566
  var uploadAcceptByKind = {
2434
2567
  document: ".pdf,.doc,.docx,.txt,.rtf,.odt,.jpg,.jpeg,.png,.webp,.gif",
@@ -2522,7 +2655,7 @@ function resolveUploadFileVisualKind(file, fallbackKind) {
2522
2655
  return "document";
2523
2656
  }
2524
2657
  function UploadGlyph({ className }) {
2525
- return /* @__PURE__ */ jsx14(
2658
+ return /* @__PURE__ */ jsx15(
2526
2659
  IconUpload,
2527
2660
  {
2528
2661
  "aria-hidden": "true",
@@ -2535,7 +2668,7 @@ function UploadFileTypeGlyph({
2535
2668
  kind
2536
2669
  }) {
2537
2670
  if (kind === "image") {
2538
- return /* @__PURE__ */ jsx14(
2671
+ return /* @__PURE__ */ jsx15(
2539
2672
  IconPhoto,
2540
2673
  {
2541
2674
  "aria-hidden": "true",
@@ -2544,7 +2677,7 @@ function UploadFileTypeGlyph({
2544
2677
  );
2545
2678
  }
2546
2679
  if (kind === "video") {
2547
- return /* @__PURE__ */ jsx14(
2680
+ return /* @__PURE__ */ jsx15(
2548
2681
  IconVideo,
2549
2682
  {
2550
2683
  "aria-hidden": "true",
@@ -2552,7 +2685,7 @@ function UploadFileTypeGlyph({
2552
2685
  }
2553
2686
  );
2554
2687
  }
2555
- return /* @__PURE__ */ jsx14(
2688
+ return /* @__PURE__ */ jsx15(
2556
2689
  IconFileText,
2557
2690
  {
2558
2691
  "aria-hidden": "true",
@@ -2560,7 +2693,7 @@ function UploadFileTypeGlyph({
2560
2693
  }
2561
2694
  );
2562
2695
  }
2563
- var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2696
+ var UploadInputControl = React14.forwardRef(function UploadInputControl2({
2564
2697
  accept,
2565
2698
  "aria-label": ariaLabel,
2566
2699
  className,
@@ -2574,17 +2707,17 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2574
2707
  resolvedId,
2575
2708
  ...uploadProps
2576
2709
  }, ref) {
2577
- const inputRef = React13.useRef(null);
2578
- const [isDragActive, setIsDragActive] = React13.useState(false);
2579
- const [selectedFiles, setSelectedFiles] = React13.useState([]);
2710
+ const inputRef = React14.useRef(null);
2711
+ const [isDragActive, setIsDragActive] = React14.useState(false);
2712
+ const [selectedFiles, setSelectedFiles] = React14.useState([]);
2580
2713
  const resolvedMultiple = multiple ?? true;
2581
2714
  const prefersReducedMotion = useReducedMotion2();
2582
- React13.useImperativeHandle(ref, () => inputRef.current);
2715
+ React14.useImperativeHandle(ref, () => inputRef.current);
2583
2716
  const resolvedAccept = accept ?? uploadAcceptByKind[uploadKind];
2584
2717
  const resolvedAriaLabel = ariaLabel ?? uploadAriaLabelByKind[uploadKind];
2585
2718
  const resolvedTitle = uploadTitle ?? "Arraste arquivos aqui ou clique para selecionar";
2586
2719
  const resolvedDescription = uploadDescription ?? uploadDescriptionByKind[uploadKind];
2587
- const syncSelectedFiles = React13.useCallback(
2720
+ const syncSelectedFiles = React14.useCallback(
2588
2721
  (files) => {
2589
2722
  const normalizedFiles = resolvedMultiple ? files : files.slice(0, 1);
2590
2723
  setSelectedFiles(normalizedFiles);
@@ -2592,7 +2725,7 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2592
2725
  },
2593
2726
  [onFilesChange, resolvedMultiple]
2594
2727
  );
2595
- const applyFilesToInput = React13.useCallback((files) => {
2728
+ const applyFilesToInput = React14.useCallback((files) => {
2596
2729
  const inputElement = inputRef.current;
2597
2730
  if (!inputElement || typeof DataTransfer === "undefined") {
2598
2731
  return false;
@@ -2611,7 +2744,7 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2611
2744
  return false;
2612
2745
  }
2613
2746
  }, []);
2614
- const handleInputChange = React13.useCallback(
2747
+ const handleInputChange = React14.useCallback(
2615
2748
  (event) => {
2616
2749
  const nextFiles = mergeUploadFiles(
2617
2750
  selectedFiles,
@@ -2630,12 +2763,12 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2630
2763
  syncSelectedFiles
2631
2764
  ]
2632
2765
  );
2633
- const openPicker = React13.useCallback(() => {
2766
+ const openPicker = React14.useCallback(() => {
2634
2767
  if (!disabled) {
2635
2768
  inputRef.current?.click();
2636
2769
  }
2637
2770
  }, [disabled]);
2638
- const handleKeyDown = React13.useCallback(
2771
+ const handleKeyDown = React14.useCallback(
2639
2772
  (event) => {
2640
2773
  if (disabled) {
2641
2774
  return;
@@ -2647,7 +2780,7 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2647
2780
  },
2648
2781
  [disabled, openPicker]
2649
2782
  );
2650
- const handleDragEnter = React13.useCallback(
2783
+ const handleDragEnter = React14.useCallback(
2651
2784
  (event) => {
2652
2785
  event.preventDefault();
2653
2786
  if (!disabled) {
@@ -2656,7 +2789,7 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2656
2789
  },
2657
2790
  [disabled]
2658
2791
  );
2659
- const handleDragLeave = React13.useCallback(
2792
+ const handleDragLeave = React14.useCallback(
2660
2793
  (event) => {
2661
2794
  if (disabled) {
2662
2795
  return;
@@ -2669,7 +2802,7 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2669
2802
  },
2670
2803
  [disabled]
2671
2804
  );
2672
- const handleDragOver = React13.useCallback(
2805
+ const handleDragOver = React14.useCallback(
2673
2806
  (event) => {
2674
2807
  event.preventDefault();
2675
2808
  if (disabled) {
@@ -2680,7 +2813,7 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2680
2813
  },
2681
2814
  [disabled]
2682
2815
  );
2683
- const handleDrop = React13.useCallback(
2816
+ const handleDrop = React14.useCallback(
2684
2817
  (event) => {
2685
2818
  event.preventDefault();
2686
2819
  if (disabled) {
@@ -2713,7 +2846,7 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2713
2846
  syncSelectedFiles
2714
2847
  ]
2715
2848
  );
2716
- const handleRemoveFile = React13.useCallback(
2849
+ const handleRemoveFile = React14.useCallback(
2717
2850
  (fileIndex) => {
2718
2851
  if (disabled) {
2719
2852
  return;
@@ -2725,7 +2858,7 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2725
2858
  [applyFilesToInput, disabled, selectedFiles, syncSelectedFiles]
2726
2859
  );
2727
2860
  return /* @__PURE__ */ jsxs7("div", { className: "grid w-full gap-4", children: [
2728
- /* @__PURE__ */ jsx14(
2861
+ /* @__PURE__ */ jsx15(
2729
2862
  "input",
2730
2863
  {
2731
2864
  ...uploadProps,
@@ -2760,8 +2893,8 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2760
2893
  onDrop: handleDrop,
2761
2894
  onKeyDown: handleKeyDown,
2762
2895
  children: [
2763
- /* @__PURE__ */ jsx14("span", { className: "flex size-10 items-center justify-center rounded-[6px] p-2 text-[color:var(--sofya-text-default)]", children: /* @__PURE__ */ jsx14(UploadGlyph, { className: "size-[18px]" }) }),
2764
- /* @__PURE__ */ jsx14("span", { className: "text-[color:var(--sofya-text-default)]", children: renderTextContent(resolvedTitle, {
2896
+ /* @__PURE__ */ jsx15("span", { className: "flex size-10 items-center justify-center rounded-[6px] p-2 text-[color:var(--sofya-text-default)]", children: /* @__PURE__ */ jsx15(UploadGlyph, { className: "size-[18px]" }) }),
2897
+ /* @__PURE__ */ jsx15("span", { className: "text-[color:var(--sofya-text-default)]", children: renderTextContent(resolvedTitle, {
2765
2898
  as: "span",
2766
2899
  className: "block text-[color:var(--sofya-text-default)]",
2767
2900
  size: "tiny",
@@ -2769,7 +2902,7 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2769
2902
  fontWeight: 500
2770
2903
  }
2771
2904
  }) }),
2772
- resolvedDescription ? /* @__PURE__ */ jsx14("span", { className: "text-[color:var(--sofya-text-subtle)]", children: renderTextContent(resolvedDescription, {
2905
+ resolvedDescription ? /* @__PURE__ */ jsx15("span", { className: "text-[color:var(--sofya-text-subtle)]", children: renderTextContent(resolvedDescription, {
2773
2906
  as: "span",
2774
2907
  className: "block text-[color:var(--sofya-text-subtle)]",
2775
2908
  size: "extra-tiny"
@@ -2777,9 +2910,9 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2777
2910
  ]
2778
2911
  }
2779
2912
  ),
2780
- /* @__PURE__ */ jsx14("div", { role: "list", className: "grid gap-4 overflow-hidden", children: /* @__PURE__ */ jsx14(AnimatePresence, { initial: false, children: selectedFiles.map((file, index) => {
2913
+ /* @__PURE__ */ jsx15("div", { role: "list", className: "grid gap-4 overflow-hidden", children: /* @__PURE__ */ jsx15(AnimatePresence, { initial: false, children: selectedFiles.map((file, index) => {
2781
2914
  const fileKey = resolveUploadFileSignature(file);
2782
- return /* @__PURE__ */ jsx14(
2915
+ return /* @__PURE__ */ jsx15(
2783
2916
  motion2.div,
2784
2917
  {
2785
2918
  role: "listitem",
@@ -2789,7 +2922,7 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2789
2922
  exit: prefersReducedMotion ? { opacity: 0 } : { opacity: 0, y: -6 },
2790
2923
  transition: uploadListItemTransition,
2791
2924
  children: /* @__PURE__ */ jsxs7(Card, { variant: "card", className: "flex items-center gap-4 p-4", children: [
2792
- /* @__PURE__ */ jsx14("span", { className: "flex size-11 shrink-0 items-center justify-center rounded-full bg-[color:var(--sofya-surface-hover)] text-primary", children: /* @__PURE__ */ jsx14(
2925
+ /* @__PURE__ */ jsx15("span", { className: "flex size-11 shrink-0 items-center justify-center rounded-full bg-[color:var(--sofya-surface-hover)] text-primary", children: /* @__PURE__ */ jsx15(
2793
2926
  UploadFileTypeGlyph,
2794
2927
  {
2795
2928
  className: "size-[18px]",
@@ -2797,7 +2930,7 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2797
2930
  }
2798
2931
  ) }),
2799
2932
  /* @__PURE__ */ jsxs7("div", { className: "min-w-0 flex-1", children: [
2800
- /* @__PURE__ */ jsx14("p", { className: "truncate text-[color:var(--sofya-text-default)]", children: renderTextContent(file.name, {
2933
+ /* @__PURE__ */ jsx15("p", { className: "truncate text-[color:var(--sofya-text-default)]", children: renderTextContent(file.name, {
2801
2934
  as: "span",
2802
2935
  className: "block truncate text-[color:var(--sofya-text-default)]",
2803
2936
  size: "tiny",
@@ -2805,7 +2938,7 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2805
2938
  fontWeight: 500
2806
2939
  }
2807
2940
  }) }),
2808
- /* @__PURE__ */ jsx14("p", { className: "mt-2 text-[color:var(--sofya-text-subtle)]", children: renderTextContent(
2941
+ /* @__PURE__ */ jsx15("p", { className: "mt-2 text-[color:var(--sofya-text-subtle)]", children: renderTextContent(
2809
2942
  `${resolveUploadFileBadge(
2810
2943
  file
2811
2944
  )} \xB7 ${formatUploadFileSize(file.size)}`,
@@ -2816,7 +2949,7 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2816
2949
  }
2817
2950
  ) })
2818
2951
  ] }),
2819
- /* @__PURE__ */ jsx14(
2952
+ /* @__PURE__ */ jsx15(
2820
2953
  "button",
2821
2954
  {
2822
2955
  "aria-label": `Remover ${file.name}`,
@@ -2828,7 +2961,7 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2828
2961
  event.stopPropagation();
2829
2962
  handleRemoveFile(index);
2830
2963
  },
2831
- children: /* @__PURE__ */ jsx14(
2964
+ children: /* @__PURE__ */ jsx15(
2832
2965
  Icon,
2833
2966
  {
2834
2967
  "aria-hidden": "true",
@@ -2849,15 +2982,15 @@ var UploadInputControl = React13.forwardRef(function UploadInputControl2({
2849
2982
  UploadInputControl.displayName = "UploadInputControl";
2850
2983
 
2851
2984
  // src/components/input-otp.tsx
2852
- import * as React14 from "react";
2985
+ import * as React15 from "react";
2853
2986
  import {
2854
2987
  OTPInput,
2855
2988
  OTPInputContext,
2856
2989
  REGEXP_ONLY_DIGITS
2857
2990
  } from "input-otp";
2858
- import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
2859
- var InputOTP = React14.forwardRef(({ className, containerClassName, ...props }, ref) => {
2860
- return /* @__PURE__ */ jsx15(
2991
+ import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
2992
+ var InputOTP = React15.forwardRef(({ className, containerClassName, ...props }, ref) => {
2993
+ return /* @__PURE__ */ jsx16(
2861
2994
  OTPInput,
2862
2995
  {
2863
2996
  ref,
@@ -2871,8 +3004,8 @@ var InputOTP = React14.forwardRef(({ className, containerClassName, ...props },
2871
3004
  );
2872
3005
  });
2873
3006
  InputOTP.displayName = "InputOTP";
2874
- var InputOTPGroup = React14.forwardRef(({ className, ...props }, ref) => {
2875
- return /* @__PURE__ */ jsx15(
3007
+ var InputOTPGroup = React15.forwardRef(({ className, ...props }, ref) => {
3008
+ return /* @__PURE__ */ jsx16(
2876
3009
  "div",
2877
3010
  {
2878
3011
  ref,
@@ -2885,12 +3018,12 @@ var InputOTPGroup = React14.forwardRef(({ className, ...props }, ref) => {
2885
3018
  );
2886
3019
  });
2887
3020
  InputOTPGroup.displayName = "InputOTPGroup";
2888
- var InputOTPSlot = React14.forwardRef(
3021
+ var InputOTPSlot = React15.forwardRef(
2889
3022
  ({ className, index, ...props }, ref) => {
2890
- const otpContext = React14.useContext(OTPInputContext);
3023
+ const otpContext = React15.useContext(OTPInputContext);
2891
3024
  const slot = otpContext.slots[index];
2892
3025
  if (!slot) {
2893
- return /* @__PURE__ */ jsx15(
3026
+ return /* @__PURE__ */ jsx16(
2894
3027
  "div",
2895
3028
  {
2896
3029
  ref,
@@ -2914,15 +3047,15 @@ var InputOTPSlot = React14.forwardRef(
2914
3047
  ...props,
2915
3048
  children: [
2916
3049
  slot.char ?? null,
2917
- slot.hasFakeCaret ? /* @__PURE__ */ jsx15("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx15("div", { className: "h-10 w-[2px] animate-pulse rounded-full bg-primary shadow-[var(--sofya-shadow-caret-glow)]" }) }) : null
3050
+ slot.hasFakeCaret ? /* @__PURE__ */ jsx16("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx16("div", { className: "h-10 w-[2px] animate-pulse rounded-full bg-primary shadow-[var(--sofya-shadow-caret-glow)]" }) }) : null
2918
3051
  ]
2919
3052
  }
2920
3053
  );
2921
3054
  }
2922
3055
  );
2923
3056
  InputOTPSlot.displayName = "InputOTPSlot";
2924
- var InputOTPSeparator = React14.forwardRef(({ className, ...props }, ref) => {
2925
- return /* @__PURE__ */ jsx15(
3057
+ var InputOTPSeparator = React15.forwardRef(({ className, ...props }, ref) => {
3058
+ return /* @__PURE__ */ jsx16(
2926
3059
  "div",
2927
3060
  {
2928
3061
  ref,
@@ -2932,22 +3065,22 @@ var InputOTPSeparator = React14.forwardRef(({ className, ...props }, ref) => {
2932
3065
  className
2933
3066
  ),
2934
3067
  ...props,
2935
- children: /* @__PURE__ */ jsx15("span", { "aria-hidden": "true", children: "." })
3068
+ children: /* @__PURE__ */ jsx16("span", { "aria-hidden": "true", children: "." })
2936
3069
  }
2937
3070
  );
2938
3071
  });
2939
3072
  InputOTPSeparator.displayName = "InputOTPSeparator";
2940
3073
 
2941
3074
  // src/components/input.tsx
2942
- import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
3075
+ import { Fragment as Fragment2, jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
2943
3076
  var inputVariantOptions = [
2944
3077
  "default",
2945
3078
  "search",
2946
3079
  "otp",
2947
3080
  "upload"
2948
3081
  ];
2949
- var Input = React15.forwardRef((props, ref) => {
2950
- const generatedId = React15.useId();
3082
+ var Input = React16.forwardRef((props, ref) => {
3083
+ const generatedId = React16.useId();
2951
3084
  const resolvedId = props.id ?? generatedId;
2952
3085
  const variant = props.variant ?? "default";
2953
3086
  if (variant === "otp") {
@@ -2988,7 +3121,7 @@ var Input = React15.forwardRef((props, ref) => {
2988
3121
  containerClassName: className2,
2989
3122
  ...otpProps,
2990
3123
  children: [
2991
- /* @__PURE__ */ jsx16(InputOTPGroup, { className: otpGroupClassName, children: Array.from({ length: resolvedSplitIndex }, (_, index) => /* @__PURE__ */ jsx16(
3124
+ /* @__PURE__ */ jsx17(InputOTPGroup, { className: otpGroupClassName, children: Array.from({ length: resolvedSplitIndex }, (_, index) => /* @__PURE__ */ jsx17(
2992
3125
  InputOTPSlot,
2993
3126
  {
2994
3127
  className: otpSlotClassName,
@@ -2996,10 +3129,10 @@ var Input = React15.forwardRef((props, ref) => {
2996
3129
  },
2997
3130
  `otp-leading-${index}`
2998
3131
  )) }),
2999
- hasTrailingGroup ? otpSeparator ?? /* @__PURE__ */ jsx16(InputOTPSeparator, { className: otpSeparatorClassName }) : null,
3000
- hasTrailingGroup ? /* @__PURE__ */ jsx16(InputOTPGroup, { className: otpGroupClassName, children: Array.from(
3132
+ hasTrailingGroup ? otpSeparator ?? /* @__PURE__ */ jsx17(InputOTPSeparator, { className: otpSeparatorClassName }) : null,
3133
+ hasTrailingGroup ? /* @__PURE__ */ jsx17(InputOTPGroup, { className: otpGroupClassName, children: Array.from(
3001
3134
  { length: resolvedLength - resolvedSplitIndex },
3002
- (_, index) => /* @__PURE__ */ jsx16(
3135
+ (_, index) => /* @__PURE__ */ jsx17(
3003
3136
  InputOTPSlot,
3004
3137
  {
3005
3138
  className: otpSlotClassName,
@@ -3011,7 +3144,7 @@ var Input = React15.forwardRef((props, ref) => {
3011
3144
  ]
3012
3145
  }
3013
3146
  );
3014
- return /* @__PURE__ */ jsx16(
3147
+ return /* @__PURE__ */ jsx17(
3015
3148
  FieldShell,
3016
3149
  {
3017
3150
  containerClassName: containerClassName2,
@@ -3030,7 +3163,7 @@ var Input = React15.forwardRef((props, ref) => {
3030
3163
  variant: _variant2,
3031
3164
  ...uploadProps
3032
3165
  } = props;
3033
- const uploadControl = /* @__PURE__ */ jsx16(
3166
+ const uploadControl = /* @__PURE__ */ jsx17(
3034
3167
  UploadInputControl,
3035
3168
  {
3036
3169
  ...uploadProps,
@@ -3047,13 +3180,13 @@ var Input = React15.forwardRef((props, ref) => {
3047
3180
  fontWeight: 700
3048
3181
  }
3049
3182
  }),
3050
- uploadOptionalLabel ? /* @__PURE__ */ jsx16("span", { className: "ml-2 text-[color:var(--sofya-text-subtle)]", children: renderTextContent(uploadOptionalLabel, {
3183
+ uploadOptionalLabel ? /* @__PURE__ */ jsx17("span", { className: "ml-2 text-[color:var(--sofya-text-subtle)]", children: renderTextContent(uploadOptionalLabel, {
3051
3184
  as: "span",
3052
3185
  className: "text-[color:var(--sofya-text-subtle)]",
3053
3186
  size: "tiny"
3054
3187
  }) }) : null
3055
3188
  ] }) : void 0;
3056
- return /* @__PURE__ */ jsx16(
3189
+ return /* @__PURE__ */ jsx17(
3057
3190
  FieldShell,
3058
3191
  {
3059
3192
  containerClassName: containerClassName2,
@@ -3077,7 +3210,7 @@ var Input = React15.forwardRef((props, ref) => {
3077
3210
  const resolvedType = type ?? (isSearch ? "search" : void 0);
3078
3211
  const ariaLabel = nativeProps["aria-label"] ?? (typeof label === "string" ? label : isSearch ? "Search" : void 0);
3079
3212
  const nativeControl = isSearch ? /* @__PURE__ */ jsxs9("div", { className: "flex h-[88px] w-full items-center gap-6 rounded-full border border-[color:var(--sofya-border-strong)] bg-card px-8 shadow-none transition-[border-color,box-shadow,background-color] duration-sofya ease-sofya hover:border-[color:var(--sofya-border-hover)] hover:ring-2 hover:ring-[color:var(--sofya-focus-ring-soft)] focus-within:border-transparent focus-within:ring-2 focus-within:ring-[color:var(--sofya-focus-ring-soft)] has-[:active]:border-transparent has-[:active]:ring-2 has-[:active]:ring-[color:var(--sofya-focus-ring-soft)]", children: [
3080
- /* @__PURE__ */ jsx16(
3213
+ /* @__PURE__ */ jsx17(
3081
3214
  Icon,
3082
3215
  {
3083
3216
  "aria-hidden": "true",
@@ -3086,7 +3219,7 @@ var Input = React15.forwardRef((props, ref) => {
3086
3219
  size: 32
3087
3220
  }
3088
3221
  ),
3089
- /* @__PURE__ */ jsx16(
3222
+ /* @__PURE__ */ jsx17(
3090
3223
  "input",
3091
3224
  {
3092
3225
  id: resolvedId,
@@ -3102,7 +3235,7 @@ var Input = React15.forwardRef((props, ref) => {
3102
3235
  placeholder: nativeProps.placeholder ?? "Search"
3103
3236
  }
3104
3237
  )
3105
- ] }) : /* @__PURE__ */ jsx16(
3238
+ ] }) : /* @__PURE__ */ jsx17(
3106
3239
  "input",
3107
3240
  {
3108
3241
  id: resolvedId,
@@ -3116,7 +3249,7 @@ var Input = React15.forwardRef((props, ref) => {
3116
3249
  "aria-label": ariaLabel
3117
3250
  }
3118
3251
  );
3119
- return /* @__PURE__ */ jsx16(
3252
+ return /* @__PURE__ */ jsx17(
3120
3253
  FieldShell,
3121
3254
  {
3122
3255
  containerClassName,
@@ -3130,22 +3263,33 @@ var Input = React15.forwardRef((props, ref) => {
3130
3263
  Input.displayName = "Input";
3131
3264
 
3132
3265
  // src/components/popover.tsx
3133
- import * as React16 from "react";
3266
+ import * as React17 from "react";
3134
3267
  import * as PopoverPrimitive from "@radix-ui/react-popover";
3135
- import { jsx as jsx17 } from "react/jsx-runtime";
3268
+ import { jsx as jsx18 } from "react/jsx-runtime";
3136
3269
  var Popover = PopoverPrimitive.Root;
3137
3270
  var PopoverTrigger = PopoverPrimitive.Trigger;
3138
3271
  var PopoverAnchor = PopoverPrimitive.Anchor;
3139
3272
  var PopoverPortal = PopoverPrimitive.Portal;
3140
3273
  var PopoverClose = PopoverPrimitive.Close;
3141
- var PopoverContent = React16.forwardRef(function PopoverContent2({
3274
+ var PopoverCloseButton = React17.forwardRef(function PopoverCloseButton2({ className, ...props }, ref) {
3275
+ return /* @__PURE__ */ jsx18(PopoverPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx18(
3276
+ CloseButton,
3277
+ {
3278
+ ref,
3279
+ className: cn("absolute right-2 top-2", className),
3280
+ ...props
3281
+ }
3282
+ ) });
3283
+ });
3284
+ PopoverCloseButton.displayName = "PopoverCloseButton";
3285
+ var PopoverContent = React17.forwardRef(function PopoverContent2({
3142
3286
  align = "center",
3143
3287
  className,
3144
3288
  collisionPadding = 8,
3145
3289
  sideOffset = 8,
3146
3290
  ...props
3147
3291
  }, ref) {
3148
- return /* @__PURE__ */ jsx17(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx17(
3292
+ return /* @__PURE__ */ jsx18(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx18(
3149
3293
  PopoverPrimitive.Content,
3150
3294
  {
3151
3295
  ref,
@@ -3162,8 +3306,8 @@ var PopoverContent = React16.forwardRef(function PopoverContent2({
3162
3306
  ) });
3163
3307
  });
3164
3308
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
3165
- var PopoverTitle = React16.forwardRef(function PopoverTitle2({ children, className, ...props }, ref) {
3166
- return /* @__PURE__ */ jsx17(
3309
+ var PopoverTitle = React17.forwardRef(function PopoverTitle2({ children, className, ...props }, ref) {
3310
+ return /* @__PURE__ */ jsx18(
3167
3311
  "h4",
3168
3312
  {
3169
3313
  ref,
@@ -3179,8 +3323,8 @@ var PopoverTitle = React16.forwardRef(function PopoverTitle2({ children, classNa
3179
3323
  );
3180
3324
  });
3181
3325
  PopoverTitle.displayName = "PopoverTitle";
3182
- var PopoverDescription = React16.forwardRef(function PopoverDescription2({ children, className, ...props }, ref) {
3183
- return /* @__PURE__ */ jsx17(
3326
+ var PopoverDescription = React17.forwardRef(function PopoverDescription2({ children, className, ...props }, ref) {
3327
+ return /* @__PURE__ */ jsx18(
3184
3328
  "p",
3185
3329
  {
3186
3330
  ref,
@@ -3198,11 +3342,11 @@ var PopoverDescription = React16.forwardRef(function PopoverDescription2({ child
3198
3342
  PopoverDescription.displayName = "PopoverDescription";
3199
3343
 
3200
3344
  // src/components/spinner.tsx
3201
- import * as React17 from "react";
3345
+ import * as React18 from "react";
3202
3346
  import { IconLoader2 as IconLoader22 } from "@tabler/icons-react";
3203
- import { jsx as jsx18 } from "react/jsx-runtime";
3347
+ import { jsx as jsx19 } from "react/jsx-runtime";
3204
3348
  var spinnerSizeOptions = ["sm", "default", "lg"];
3205
- var Spinner = React17.forwardRef(function Spinner2({
3349
+ var Spinner = React18.forwardRef(function Spinner2({
3206
3350
  "aria-label": ariaLabelProp,
3207
3351
  "aria-labelledby": ariaLabelledby,
3208
3352
  className,
@@ -3211,7 +3355,7 @@ var Spinner = React17.forwardRef(function Spinner2({
3211
3355
  ...props
3212
3356
  }, ref) {
3213
3357
  const ariaLabel = ariaLabelProp ?? (ariaLabelledby ? void 0 : "Loading");
3214
- return /* @__PURE__ */ jsx18(
3358
+ return /* @__PURE__ */ jsx19(
3215
3359
  IconLoader22,
3216
3360
  {
3217
3361
  ref,
@@ -3231,8 +3375,8 @@ var Spinner = React17.forwardRef(function Spinner2({
3231
3375
  Spinner.displayName = "Spinner";
3232
3376
 
3233
3377
  // src/components/dropdown-search.tsx
3234
- import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
3235
- var DropdownSearch = React18.forwardRef(
3378
+ import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
3379
+ var DropdownSearch = React19.forwardRef(
3236
3380
  function DropdownSearch2({
3237
3381
  className,
3238
3382
  containerClassName,
@@ -3250,8 +3394,8 @@ var DropdownSearch = React18.forwardRef(
3250
3394
  query: queryProp,
3251
3395
  value: valueProp
3252
3396
  }, ref) {
3253
- const listboxId = React18.useId();
3254
- const [open, setOpen] = React18.useState(false);
3397
+ const listboxId = React19.useId();
3398
+ const [open, setOpen] = React19.useState(false);
3255
3399
  const [query, setQuery] = useControllableState({
3256
3400
  defaultValue: defaultQuery,
3257
3401
  onChange: onQueryChange,
@@ -3262,9 +3406,9 @@ var DropdownSearch = React18.forwardRef(
3262
3406
  onChange,
3263
3407
  value: valueProp
3264
3408
  });
3265
- const inputRef = React18.useRef(null);
3266
- const listRef = React18.useRef(null);
3267
- const setInputRef = React18.useCallback(
3409
+ const inputRef = React19.useRef(null);
3410
+ const listRef = React19.useRef(null);
3411
+ const setInputRef = React19.useCallback(
3268
3412
  (node) => {
3269
3413
  inputRef.current = node;
3270
3414
  if (typeof ref === "function") {
@@ -3326,7 +3470,7 @@ var DropdownSearch = React18.forwardRef(
3326
3470
  setOpen(false);
3327
3471
  }
3328
3472
  return /* @__PURE__ */ jsxs10(Popover, { open, onOpenChange: setOpen, children: [
3329
- /* @__PURE__ */ jsx19(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsx19("div", { className: cn("w-full", containerClassName), children: /* @__PURE__ */ jsx19(
3473
+ /* @__PURE__ */ jsx20(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsx20("div", { className: cn("w-full", containerClassName), children: /* @__PURE__ */ jsx20(
3330
3474
  Input,
3331
3475
  {
3332
3476
  ref: setInputRef,
@@ -3347,7 +3491,7 @@ var DropdownSearch = React18.forwardRef(
3347
3491
  onKeyDown: handleInputKeyDown
3348
3492
  }
3349
3493
  ) }) }),
3350
- /* @__PURE__ */ jsx19(
3494
+ /* @__PURE__ */ jsx20(
3351
3495
  PopoverContent,
3352
3496
  {
3353
3497
  align: "start",
@@ -3358,7 +3502,7 @@ var DropdownSearch = React18.forwardRef(
3358
3502
  e.preventDefault();
3359
3503
  }
3360
3504
  },
3361
- children: loading ? /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx19(Spinner, { size: "sm" }) }) : options.length === 0 ? /* @__PURE__ */ jsx19("div", { className: "px-3 py-4 text-center", children: /* @__PURE__ */ jsx19(
3505
+ children: loading ? /* @__PURE__ */ jsx20("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx20(Spinner, { size: "sm" }) }) : options.length === 0 ? /* @__PURE__ */ jsx20("div", { className: "px-3 py-4 text-center", children: /* @__PURE__ */ jsx20(
3362
3506
  Text,
3363
3507
  {
3364
3508
  as: "span",
@@ -3366,7 +3510,7 @@ var DropdownSearch = React18.forwardRef(
3366
3510
  className: "text-[color:var(--sofya-text-subtle)]",
3367
3511
  children: emptyMessage
3368
3512
  }
3369
- ) }) : /* @__PURE__ */ jsx19(
3513
+ ) }) : /* @__PURE__ */ jsx20(
3370
3514
  "ul",
3371
3515
  {
3372
3516
  ref: listRef,
@@ -3374,7 +3518,7 @@ var DropdownSearch = React18.forwardRef(
3374
3518
  role: "listbox",
3375
3519
  "aria-label": typeof label === "string" ? label : "Options",
3376
3520
  className: "flex flex-col gap-0.5",
3377
- children: options.map((option) => /* @__PURE__ */ jsx19(
3521
+ children: options.map((option) => /* @__PURE__ */ jsx20(
3378
3522
  "li",
3379
3523
  {
3380
3524
  role: "option",
@@ -3398,8 +3542,8 @@ var DropdownSearch = React18.forwardRef(
3398
3542
  onKeyDown: (e) => handleItemKeyDown(e, option),
3399
3543
  children: [
3400
3544
  /* @__PURE__ */ jsxs10("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
3401
- /* @__PURE__ */ jsx19(Text, { as: "span", size: "tiny", className: "truncate", children: option.label }),
3402
- option.description ? /* @__PURE__ */ jsx19(
3545
+ /* @__PURE__ */ jsx20(Text, { as: "span", size: "tiny", className: "truncate", children: option.label }),
3546
+ option.description ? /* @__PURE__ */ jsx20(
3403
3547
  Text,
3404
3548
  {
3405
3549
  as: "span",
@@ -3409,7 +3553,7 @@ var DropdownSearch = React18.forwardRef(
3409
3553
  }
3410
3554
  ) : null
3411
3555
  ] }),
3412
- value === option.value ? /* @__PURE__ */ jsx19(
3556
+ value === option.value ? /* @__PURE__ */ jsx20(
3413
3557
  Icon,
3414
3558
  {
3415
3559
  "aria-hidden": "true",
@@ -3434,17 +3578,17 @@ var DropdownSearch = React18.forwardRef(
3434
3578
  DropdownSearch.displayName = "DropdownSearch";
3435
3579
 
3436
3580
  // src/components/dialog.tsx
3437
- import * as React19 from "react";
3581
+ import * as React20 from "react";
3438
3582
  import * as DialogPrimitive from "@radix-ui/react-dialog";
3439
- import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
3583
+ import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
3440
3584
  var Dialog = DialogPrimitive.Root;
3441
3585
  var DialogTrigger = DialogPrimitive.Trigger;
3442
3586
  var DialogPortal = DialogPrimitive.Portal;
3443
3587
  var DialogClose = DialogPrimitive.Close;
3444
- var DialogInternalContext = React19.createContext({
3588
+ var DialogInternalContext = React20.createContext({
3445
3589
  showCloseButton: true
3446
3590
  });
3447
- var DialogOverlay = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
3591
+ var DialogOverlay = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
3448
3592
  DialogPrimitive.Overlay,
3449
3593
  {
3450
3594
  ref,
@@ -3456,7 +3600,7 @@ var DialogOverlay = React19.forwardRef(({ className, ...props }, ref) => /* @__P
3456
3600
  }
3457
3601
  ));
3458
3602
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
3459
- var DialogContent = React19.forwardRef(
3603
+ var DialogContent = React20.forwardRef(
3460
3604
  ({
3461
3605
  className,
3462
3606
  children,
@@ -3472,9 +3616,9 @@ var DialogContent = React19.forwardRef(
3472
3616
  "--sofya-surface-shadow-override": surfaceShadow,
3473
3617
  ...cardStyle
3474
3618
  };
3475
- return /* @__PURE__ */ jsx20(DialogInternalContext.Provider, { value: { showCloseButton }, children: /* @__PURE__ */ jsxs11(DialogPortal, { children: [
3476
- /* @__PURE__ */ jsx20(DialogOverlay, { className: overlayClassName }),
3477
- /* @__PURE__ */ jsx20("div", { className: "sofya-dialog-positioner fixed inset-0 z-50 flex items-center justify-center p-4", children: /* @__PURE__ */ jsx20(
3619
+ return /* @__PURE__ */ jsx21(DialogInternalContext.Provider, { value: { showCloseButton }, children: /* @__PURE__ */ jsxs11(DialogPortal, { children: [
3620
+ /* @__PURE__ */ jsx21(DialogOverlay, { className: overlayClassName }),
3621
+ /* @__PURE__ */ jsx21("div", { className: "sofya-dialog-positioner fixed inset-0 z-50 flex items-center justify-center p-4", children: /* @__PURE__ */ jsx21(
3478
3622
  DialogPrimitive.Content,
3479
3623
  {
3480
3624
  ref,
@@ -3483,7 +3627,7 @@ var DialogContent = React19.forwardRef(
3483
3627
  className
3484
3628
  ),
3485
3629
  ...props,
3486
- children: /* @__PURE__ */ jsx20(
3630
+ children: /* @__PURE__ */ jsx21(
3487
3631
  Card,
3488
3632
  {
3489
3633
  variant,
@@ -3502,31 +3646,21 @@ var DialogContent = React19.forwardRef(
3502
3646
  );
3503
3647
  DialogContent.displayName = DialogPrimitive.Content.displayName;
3504
3648
  function DialogHeader({ className, children, ...props }) {
3505
- const { showCloseButton } = React19.useContext(DialogInternalContext);
3649
+ const { showCloseButton } = React20.useContext(DialogInternalContext);
3506
3650
  return /* @__PURE__ */ jsxs11(
3507
3651
  "div",
3508
3652
  {
3509
3653
  className: cn("flex w-full items-start justify-between gap-4", className),
3510
3654
  ...props,
3511
3655
  children: [
3512
- /* @__PURE__ */ jsx20("div", { className: "flex min-w-0 flex-1 flex-col gap-2 text-left", children }),
3513
- showCloseButton ? /* @__PURE__ */ jsx20(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx20(
3514
- Button,
3515
- {
3516
- type: "button",
3517
- variant: "ghost",
3518
- size: "icon",
3519
- "aria-label": "Close",
3520
- leftIcon: /* @__PURE__ */ jsx20(Icon, { name: "x", size: 18 }),
3521
- className: "shrink-0 text-muted-foreground hover:text-foreground"
3522
- }
3523
- ) }) : null
3656
+ /* @__PURE__ */ jsx21("div", { className: "flex min-w-0 flex-1 flex-col gap-2 text-left", children }),
3657
+ showCloseButton ? /* @__PURE__ */ jsx21(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx21(CloseButton, { label: "Fechar" }) }) : null
3524
3658
  ]
3525
3659
  }
3526
3660
  );
3527
3661
  }
3528
3662
  function DialogBody({ className, ...props }) {
3529
- return /* @__PURE__ */ jsx20(
3663
+ return /* @__PURE__ */ jsx21(
3530
3664
  "div",
3531
3665
  {
3532
3666
  className: cn("flex flex-col gap-4", className),
@@ -3535,7 +3669,7 @@ function DialogBody({ className, ...props }) {
3535
3669
  );
3536
3670
  }
3537
3671
  function DialogFooter({ className, ...props }) {
3538
- return /* @__PURE__ */ jsx20(
3672
+ return /* @__PURE__ */ jsx21(
3539
3673
  "div",
3540
3674
  {
3541
3675
  className: cn("flex items-center justify-end gap-2", className),
@@ -3543,11 +3677,11 @@ function DialogFooter({ className, ...props }) {
3543
3677
  }
3544
3678
  );
3545
3679
  }
3546
- var DialogCancel = React19.forwardRef(
3547
- ({ type = "button", variant = "ghost", ...props }, ref) => /* @__PURE__ */ jsx20(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx20(Button, { ref, type, variant, ...props }) })
3680
+ var DialogCancel = React20.forwardRef(
3681
+ ({ type = "button", variant = "ghost", ...props }, ref) => /* @__PURE__ */ jsx21(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx21(Button, { ref, type, variant, ...props }) })
3548
3682
  );
3549
3683
  DialogCancel.displayName = "DialogCancel";
3550
- var DialogTitle = React19.forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ jsx20(
3684
+ var DialogTitle = React20.forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ jsx21(
3551
3685
  DialogPrimitive.Title,
3552
3686
  {
3553
3687
  ref,
@@ -3561,7 +3695,7 @@ var DialogTitle = React19.forwardRef(({ children, className, ...props }, ref) =>
3561
3695
  }
3562
3696
  ));
3563
3697
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
3564
- var DialogDescription = React19.forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ jsx20(
3698
+ var DialogDescription = React20.forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ jsx21(
3565
3699
  DialogPrimitive.Description,
3566
3700
  {
3567
3701
  ref,
@@ -3577,9 +3711,9 @@ var DialogDescription = React19.forwardRef(({ children, className, ...props }, r
3577
3711
  DialogDescription.displayName = DialogPrimitive.Description.displayName;
3578
3712
 
3579
3713
  // src/components/document-card.tsx
3580
- import * as React20 from "react";
3581
- import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
3582
- var DocumentCard = React20.forwardRef(
3714
+ import * as React21 from "react";
3715
+ import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
3716
+ var DocumentCard = React21.forwardRef(
3583
3717
  ({
3584
3718
  actions,
3585
3719
  className,
@@ -3611,7 +3745,7 @@ var DocumentCard = React20.forwardRef(
3611
3745
  ),
3612
3746
  ...props,
3613
3747
  children: [
3614
- leading ? /* @__PURE__ */ jsx21(
3748
+ leading ? /* @__PURE__ */ jsx22(
3615
3749
  "span",
3616
3750
  {
3617
3751
  "data-slot": "document-card-leading",
@@ -3620,11 +3754,11 @@ var DocumentCard = React20.forwardRef(
3620
3754
  }
3621
3755
  ) : null,
3622
3756
  /* @__PURE__ */ jsxs12("span", { "data-slot": "document-card-content", className: "min-w-0", children: [
3623
- /* @__PURE__ */ jsx21(Text, { as: "span", size: "label-md", className: "block truncate text-foreground", children: title }),
3624
- description ? /* @__PURE__ */ jsx21(Text, { as: "span", size: "caption", className: "block truncate text-muted-foreground", children: description }) : null,
3625
- meta ? /* @__PURE__ */ jsx21(Text, { as: "span", size: "caption", className: "block truncate text-muted-foreground", children: meta }) : null
3757
+ /* @__PURE__ */ jsx22(Text, { as: "span", size: "label-md", className: "block truncate text-foreground", children: title }),
3758
+ description ? /* @__PURE__ */ jsx22(Text, { as: "span", size: "caption", className: "block truncate text-muted-foreground", children: description }) : null,
3759
+ meta ? /* @__PURE__ */ jsx22(Text, { as: "span", size: "caption", className: "block truncate text-muted-foreground", children: meta }) : null
3626
3760
  ] }),
3627
- actions ? /* @__PURE__ */ jsx21(
3761
+ actions ? /* @__PURE__ */ jsx22(
3628
3762
  "span",
3629
3763
  {
3630
3764
  "data-slot": "document-card-actions",
@@ -3640,9 +3774,9 @@ var DocumentCard = React20.forwardRef(
3640
3774
  DocumentCard.displayName = "DocumentCard";
3641
3775
 
3642
3776
  // src/components/empty.tsx
3643
- import * as React21 from "react";
3777
+ import * as React22 from "react";
3644
3778
  import { cva as cva5 } from "class-variance-authority";
3645
- import { Fragment as Fragment3, jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
3779
+ import { Fragment as Fragment3, jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
3646
3780
  var emptyMediaVariantOptions = ["default", "icon"];
3647
3781
  var emptyMediaVariants = cva5(
3648
3782
  "inline-flex shrink-0 items-center justify-center transition-[background-color,border-color,color,box-shadow] duration-sofya ease-sofya",
@@ -3658,11 +3792,11 @@ var emptyMediaVariants = cva5(
3658
3792
  }
3659
3793
  }
3660
3794
  );
3661
- var EmptyMedia = React21.forwardRef(function EmptyMedia2({ className, variant, ...props }, ref) {
3662
- return /* @__PURE__ */ jsx22("div", { ref, className: cn(emptyMediaVariants({ variant }), className), ...props });
3795
+ var EmptyMedia = React22.forwardRef(function EmptyMedia2({ className, variant, ...props }, ref) {
3796
+ return /* @__PURE__ */ jsx23("div", { ref, className: cn(emptyMediaVariants({ variant }), className), ...props });
3663
3797
  });
3664
3798
  function EmptyHeader({ className, ...props }) {
3665
- return /* @__PURE__ */ jsx22(
3799
+ return /* @__PURE__ */ jsx23(
3666
3800
  "div",
3667
3801
  {
3668
3802
  className: cn("flex max-w-[34rem] flex-col items-center gap-4 text-center", className),
@@ -3671,7 +3805,7 @@ function EmptyHeader({ className, ...props }) {
3671
3805
  );
3672
3806
  }
3673
3807
  function EmptyTitle({ children, className, ...props }) {
3674
- return /* @__PURE__ */ jsx22(
3808
+ return /* @__PURE__ */ jsx23(
3675
3809
  "h2",
3676
3810
  {
3677
3811
  className: cn("text-foreground", className),
@@ -3689,7 +3823,7 @@ function EmptyDescription({
3689
3823
  className,
3690
3824
  ...props
3691
3825
  }) {
3692
- return /* @__PURE__ */ jsx22(
3826
+ return /* @__PURE__ */ jsx23(
3693
3827
  "p",
3694
3828
  {
3695
3829
  className: cn("max-w-full text-muted-foreground whitespace-nowrap", className),
@@ -3703,7 +3837,7 @@ function EmptyDescription({
3703
3837
  );
3704
3838
  }
3705
3839
  function EmptyContent({ children, className, ...props }) {
3706
- return /* @__PURE__ */ jsx22(
3840
+ return /* @__PURE__ */ jsx23(
3707
3841
  "div",
3708
3842
  {
3709
3843
  className: cn("flex flex-wrap items-center justify-center gap-4 text-center", className),
@@ -3714,9 +3848,9 @@ function EmptyContent({ children, className, ...props }) {
3714
3848
  }
3715
3849
  );
3716
3850
  }
3717
- var Empty = React21.forwardRef(function Empty2({ children, className, content, description, media, title, ...props }, ref) {
3718
- const hasCustomChildren = React21.Children.count(children) > 0;
3719
- return /* @__PURE__ */ jsx22(
3851
+ var Empty = React22.forwardRef(function Empty2({ children, className, content, description, media, title, ...props }, ref) {
3852
+ const hasCustomChildren = React22.Children.count(children) > 0;
3853
+ return /* @__PURE__ */ jsx23(
3720
3854
  "div",
3721
3855
  {
3722
3856
  ref,
@@ -3727,11 +3861,11 @@ var Empty = React21.forwardRef(function Empty2({ children, className, content, d
3727
3861
  ...props,
3728
3862
  children: hasCustomChildren ? children : /* @__PURE__ */ jsxs13(Fragment3, { children: [
3729
3863
  /* @__PURE__ */ jsxs13(EmptyHeader, { children: [
3730
- media ?? /* @__PURE__ */ jsx22(EmptyMedia, { variant: "icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx22(Icon, { name: "folders", size: 28 }) }),
3731
- /* @__PURE__ */ jsx22(EmptyTitle, { children: title ?? "Nada por aqui" }),
3732
- /* @__PURE__ */ jsx22(EmptyDescription, { children: description ?? "Quando houver conte\xFAdo dispon\xEDvel, ele aparecer\xE1 aqui." })
3864
+ media ?? /* @__PURE__ */ jsx23(EmptyMedia, { variant: "icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx23(Icon, { name: "folders", size: 28 }) }),
3865
+ /* @__PURE__ */ jsx23(EmptyTitle, { children: title ?? "Nada por aqui" }),
3866
+ /* @__PURE__ */ jsx23(EmptyDescription, { children: description ?? "Quando houver conte\xFAdo dispon\xEDvel, ele aparecer\xE1 aqui." })
3733
3867
  ] }),
3734
- content !== void 0 && content !== null ? /* @__PURE__ */ jsx22(EmptyContent, { children: content }) : null
3868
+ content !== void 0 && content !== null ? /* @__PURE__ */ jsx23(EmptyContent, { children: content }) : null
3735
3869
  ] })
3736
3870
  }
3737
3871
  );
@@ -3743,12 +3877,58 @@ EmptyTitle.displayName = "EmptyTitle";
3743
3877
  EmptyDescription.displayName = "EmptyDescription";
3744
3878
  EmptyContent.displayName = "EmptyContent";
3745
3879
 
3880
+ // src/components/icon-button.tsx
3881
+ import * as React23 from "react";
3882
+ import { jsx as jsx24 } from "react/jsx-runtime";
3883
+ var iconButtonVariantOptions = [
3884
+ "ghost",
3885
+ "subtle",
3886
+ "solid",
3887
+ "destructive"
3888
+ ];
3889
+ var iconButtonSizeOptions = ["sm", "md", "lg"];
3890
+ var iconButtonSizeClasses = {
3891
+ sm: "size-8",
3892
+ md: "size-10",
3893
+ lg: "size-12"
3894
+ };
3895
+ var iconButtonVariantClasses = {
3896
+ ghost: "bg-transparent text-[color:var(--sofya-text-soft)] shadow-none hover:bg-[color:var(--sofya-surface-hover)] hover:text-[color:var(--sofya-text-default)] data-[selected=true]:bg-[color:var(--sofya-surface-selected)] data-[selected=true]:text-primary",
3897
+ subtle: "bg-[color:var(--sofya-surface-muted)] text-[color:var(--sofya-text-default)] shadow-none hover:bg-[color:var(--sofya-surface-hover-strong)] data-[selected=true]:bg-[color:var(--sofya-surface-selected)] data-[selected=true]:text-primary",
3898
+ solid: "bg-primary text-primary-foreground shadow-none hover:brightness-[1.04] data-[selected=true]:bg-primary",
3899
+ destructive: "bg-transparent text-[color:var(--sofya-text-soft)] shadow-none hover:bg-[color:var(--sofya-surface-destructive)] hover:text-destructive"
3900
+ };
3901
+ var IconButton = React23.forwardRef(
3902
+ function IconButton2({ className, icon, selected, size = "sm", variant = "ghost", ...props }, ref) {
3903
+ return /* @__PURE__ */ jsx24(
3904
+ Button,
3905
+ {
3906
+ ref,
3907
+ "data-slot": "icon-button",
3908
+ "data-selected": selected ? "true" : void 0,
3909
+ "aria-pressed": selected === void 0 ? void 0 : selected,
3910
+ variant: "ghost",
3911
+ size: "icon",
3912
+ leftIcon: icon,
3913
+ className: cn(
3914
+ "rounded-[var(--sofya-radius-md)] p-0 shadow-none",
3915
+ iconButtonSizeClasses[size],
3916
+ iconButtonVariantClasses[variant],
3917
+ className
3918
+ ),
3919
+ ...props
3920
+ }
3921
+ );
3922
+ }
3923
+ );
3924
+ IconButton.displayName = "IconButton";
3925
+
3746
3926
  // src/components/label.tsx
3747
- import * as React22 from "react";
3748
- import { jsx as jsx23 } from "react/jsx-runtime";
3749
- var Label = React22.forwardRef(
3927
+ import * as React24 from "react";
3928
+ import { jsx as jsx25 } from "react/jsx-runtime";
3929
+ var Label = React24.forwardRef(
3750
3930
  ({ children, className, ...props }, ref) => {
3751
- return /* @__PURE__ */ jsx23(
3931
+ return /* @__PURE__ */ jsx25(
3752
3932
  "label",
3753
3933
  {
3754
3934
  ref,
@@ -3772,8 +3952,8 @@ var Label = React22.forwardRef(
3772
3952
  Label.displayName = "Label";
3773
3953
 
3774
3954
  // src/components/layout.tsx
3775
- import * as React23 from "react";
3776
- import { jsx as jsx24 } from "react/jsx-runtime";
3955
+ import * as React25 from "react";
3956
+ import { jsx as jsx26 } from "react/jsx-runtime";
3777
3957
  var alignClassName = {
3778
3958
  start: "items-start",
3779
3959
  center: "items-center",
@@ -3791,8 +3971,8 @@ function getGapStyle(gap) {
3791
3971
  "--sofya-layout-gap": `var(--sofya-gap-${gap})`
3792
3972
  };
3793
3973
  }
3794
- var Stack = React23.forwardRef(
3795
- ({ className, gap = "default", style, ...props }, ref) => /* @__PURE__ */ jsx24(
3974
+ var Stack = React25.forwardRef(
3975
+ ({ className, gap = "default", style, ...props }, ref) => /* @__PURE__ */ jsx26(
3796
3976
  "div",
3797
3977
  {
3798
3978
  ref,
@@ -3804,7 +3984,7 @@ var Stack = React23.forwardRef(
3804
3984
  )
3805
3985
  );
3806
3986
  Stack.displayName = "Stack";
3807
- var Cluster = React23.forwardRef(
3987
+ var Cluster = React25.forwardRef(
3808
3988
  ({
3809
3989
  align = "center",
3810
3990
  className,
@@ -3812,7 +3992,7 @@ var Cluster = React23.forwardRef(
3812
3992
  justify = "start",
3813
3993
  style,
3814
3994
  ...props
3815
- }, ref) => /* @__PURE__ */ jsx24(
3995
+ }, ref) => /* @__PURE__ */ jsx26(
3816
3996
  "div",
3817
3997
  {
3818
3998
  ref,
@@ -3829,8 +4009,8 @@ var Cluster = React23.forwardRef(
3829
4009
  )
3830
4010
  );
3831
4011
  Cluster.displayName = "Cluster";
3832
- var Inline = React23.forwardRef(
3833
- ({ align = "center", className, gap = "compact", style, ...props }, ref) => /* @__PURE__ */ jsx24(
4012
+ var Inline = React25.forwardRef(
4013
+ ({ align = "center", className, gap = "compact", style, ...props }, ref) => /* @__PURE__ */ jsx26(
3834
4014
  "div",
3835
4015
  {
3836
4016
  ref,
@@ -3846,12 +4026,12 @@ var Inline = React23.forwardRef(
3846
4026
  )
3847
4027
  );
3848
4028
  Inline.displayName = "Inline";
3849
- var Container = React23.forwardRef(
4029
+ var Container = React25.forwardRef(
3850
4030
  ({ className, measure = "reading", style, ...props }, ref) => {
3851
4031
  const measureStyle = measure === "none" ? void 0 : {
3852
4032
  "--sofya-layout-measure": `var(--sofya-measure-${measure})`
3853
4033
  };
3854
- return /* @__PURE__ */ jsx24(
4034
+ return /* @__PURE__ */ jsx26(
3855
4035
  "div",
3856
4036
  {
3857
4037
  ref,
@@ -3870,10 +4050,10 @@ var Container = React23.forwardRef(
3870
4050
  Container.displayName = "Container";
3871
4051
 
3872
4052
  // src/components/link.tsx
3873
- import * as React24 from "react";
4053
+ import * as React26 from "react";
3874
4054
  import { Slot as Slot3 } from "@radix-ui/react-slot";
3875
4055
  import { cva as cva6 } from "class-variance-authority";
3876
- import { jsx as jsx25 } from "react/jsx-runtime";
4056
+ import { jsx as jsx27 } from "react/jsx-runtime";
3877
4057
  var linkVariants = cva6(
3878
4058
  "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",
3879
4059
  {
@@ -3888,9 +4068,9 @@ var linkVariants = cva6(
3888
4068
  }
3889
4069
  }
3890
4070
  );
3891
- var Link = React24.forwardRef(function Link2({ asChild = false, children, className, variant = "default", ...props }, ref) {
4071
+ var Link = React26.forwardRef(function Link2({ asChild = false, children, className, variant = "default", ...props }, ref) {
3892
4072
  const Component = asChild ? Slot3 : "a";
3893
- return /* @__PURE__ */ jsx25(
4073
+ return /* @__PURE__ */ jsx27(
3894
4074
  Component,
3895
4075
  {
3896
4076
  ref,
@@ -3908,7 +4088,7 @@ var Link = React24.forwardRef(function Link2({ asChild = false, children, classN
3908
4088
  Link.displayName = "Link";
3909
4089
 
3910
4090
  // src/components/logo.tsx
3911
- import * as React25 from "react";
4091
+ import * as React27 from "react";
3912
4092
 
3913
4093
  // src/components/logo-data.ts
3914
4094
  var logoAssets = {
@@ -4005,7 +4185,7 @@ var logoAssets = {
4005
4185
  };
4006
4186
 
4007
4187
  // src/components/logo.tsx
4008
- import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
4188
+ import { jsx as jsx28, jsxs as jsxs14 } from "react/jsx-runtime";
4009
4189
  var logoVariants = ["mono", "default", "text", "full"];
4010
4190
  var logoSizeOptions = ["sm", "md", "lg", "xl", "2xl"];
4011
4191
  var logoSizeScale = {
@@ -4041,7 +4221,7 @@ function resolveLogoDimensions(variant, size, width, height) {
4041
4221
  height: resolvedHeight
4042
4222
  };
4043
4223
  }
4044
- var Logo = React25.forwardRef(function Logo2({
4224
+ var Logo = React27.forwardRef(function Logo2({
4045
4225
  variant = "full",
4046
4226
  size = "lg",
4047
4227
  width,
@@ -4052,7 +4232,7 @@ var Logo = React25.forwardRef(function Logo2({
4052
4232
  ...props
4053
4233
  }, ref) {
4054
4234
  const asset = logoAssets[variant];
4055
- const titleId = React25.useId();
4235
+ const titleId = React27.useId();
4056
4236
  const dimensions = resolveLogoDimensions(variant, size, width, height);
4057
4237
  const monoFill = variant === "mono" ? monoColor ?? "currentColor" : void 0;
4058
4238
  return /* @__PURE__ */ jsxs14(
@@ -4070,8 +4250,8 @@ var Logo = React25.forwardRef(function Logo2({
4070
4250
  focusable: "false",
4071
4251
  ...props,
4072
4252
  children: [
4073
- title ? /* @__PURE__ */ jsx26("title", { id: titleId, children: title }) : null,
4074
- asset.paths.map((path, index) => /* @__PURE__ */ jsx26(
4253
+ title ? /* @__PURE__ */ jsx28("title", { id: titleId, children: title }) : null,
4254
+ asset.paths.map((path, index) => /* @__PURE__ */ jsx28(
4075
4255
  "path",
4076
4256
  {
4077
4257
  d: path.d,
@@ -4103,14 +4283,15 @@ var inheritedTypographyStyle = {
4103
4283
  };
4104
4284
 
4105
4285
  // src/components/pagination.tsx
4106
- import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
4286
+ import { jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
4107
4287
  var paginationLinkVariants = cva7(
4108
- "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",
4288
+ "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] 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 aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:hover:bg-transparent",
4109
4289
  {
4110
4290
  variants: {
4111
4291
  isActive: {
4112
- true: "border-[color:var(--sofya-border-strong)] bg-card text-primary shadow-sofya-sm",
4113
- false: "hover:border-[color:var(--sofya-border-soft)] hover:bg-card hover:text-primary"
4292
+ // Flat, neutral, clearly current — no shadow, no decorative glow.
4293
+ true: "bg-[color:var(--sofya-surface-selected)] font-semibold text-primary",
4294
+ false: "hover:bg-[color:var(--sofya-surface-hover)] hover:text-[color:var(--sofya-text-default)]"
4114
4295
  },
4115
4296
  size: {
4116
4297
  default: "px-4",
@@ -4124,7 +4305,7 @@ var paginationLinkVariants = cva7(
4124
4305
  }
4125
4306
  );
4126
4307
  function Pagination({ className, ...props }) {
4127
- return /* @__PURE__ */ jsx27(
4308
+ return /* @__PURE__ */ jsx29(
4128
4309
  "nav",
4129
4310
  {
4130
4311
  "aria-label": "Pagination",
@@ -4137,7 +4318,7 @@ function PaginationContent({
4137
4318
  className,
4138
4319
  ...props
4139
4320
  }) {
4140
- return /* @__PURE__ */ jsx27(
4321
+ return /* @__PURE__ */ jsx29(
4141
4322
  "ul",
4142
4323
  {
4143
4324
  className: cn(
@@ -4149,7 +4330,7 @@ function PaginationContent({
4149
4330
  );
4150
4331
  }
4151
4332
  function PaginationItem({ className, ...props }) {
4152
- return /* @__PURE__ */ jsx27("li", { className: cn("list-none", className), ...props });
4333
+ return /* @__PURE__ */ jsx29("li", { className: cn("list-none", className), ...props });
4153
4334
  }
4154
4335
  function PaginationLink({
4155
4336
  asChild = false,
@@ -4159,7 +4340,7 @@ function PaginationLink({
4159
4340
  ...props
4160
4341
  }) {
4161
4342
  const Component = asChild ? Slot4 : "a";
4162
- return /* @__PURE__ */ jsx27(
4343
+ return /* @__PURE__ */ jsx29(
4163
4344
  Component,
4164
4345
  {
4165
4346
  "aria-current": isActive ? "page" : void 0,
@@ -4169,10 +4350,10 @@ function PaginationLink({
4169
4350
  );
4170
4351
  }
4171
4352
  function PaginationChevronLeft() {
4172
- return /* @__PURE__ */ jsx27(IconChevronLeft2, { "aria-hidden": "true", className: "h-4 w-4", stroke: 1.75 });
4353
+ return /* @__PURE__ */ jsx29(IconChevronLeft2, { "aria-hidden": "true", className: "h-4 w-4", stroke: 1.75 });
4173
4354
  }
4174
4355
  function PaginationChevronRight() {
4175
- return /* @__PURE__ */ jsx27(IconChevronRight2, { "aria-hidden": "true", className: "h-4 w-4", stroke: 1.75 });
4356
+ return /* @__PURE__ */ jsx29(IconChevronRight2, { "aria-hidden": "true", className: "h-4 w-4", stroke: 1.75 });
4176
4357
  }
4177
4358
  function PaginationPrevious({
4178
4359
  className,
@@ -4186,8 +4367,8 @@ function PaginationPrevious({
4186
4367
  className: cn("gap-2 px-4", className),
4187
4368
  ...props,
4188
4369
  children: [
4189
- /* @__PURE__ */ jsx27(PaginationChevronLeft, {}),
4190
- /* @__PURE__ */ jsx27("span", { className: "hidden sm:block", children: renderTextContent(text, {
4370
+ /* @__PURE__ */ jsx29(PaginationChevronLeft, {}),
4371
+ /* @__PURE__ */ jsx29("span", { className: "hidden sm:block", children: renderTextContent(text, {
4191
4372
  as: "span",
4192
4373
  className: "block text-inherit",
4193
4374
  size: "body",
@@ -4209,13 +4390,13 @@ function PaginationNext({
4209
4390
  className: cn("gap-2 px-4", className),
4210
4391
  ...props,
4211
4392
  children: [
4212
- /* @__PURE__ */ jsx27("span", { className: "hidden sm:block", children: renderTextContent(text, {
4393
+ /* @__PURE__ */ jsx29("span", { className: "hidden sm:block", children: renderTextContent(text, {
4213
4394
  as: "span",
4214
4395
  className: "block text-inherit",
4215
4396
  size: "body",
4216
4397
  style: inheritedTypographyStyle
4217
4398
  }) }),
4218
- /* @__PURE__ */ jsx27(PaginationChevronRight, {})
4399
+ /* @__PURE__ */ jsx29(PaginationChevronRight, {})
4219
4400
  ]
4220
4401
  }
4221
4402
  );
@@ -4234,23 +4415,23 @@ function PaginationEllipsis({
4234
4415
  ),
4235
4416
  ...props,
4236
4417
  children: [
4237
- /* @__PURE__ */ jsx27("span", { children: renderTextContent("...", {
4418
+ /* @__PURE__ */ jsx29("span", { children: renderTextContent("...", {
4238
4419
  as: "span",
4239
4420
  className: "block text-inherit",
4240
4421
  size: "h5",
4241
4422
  style: inheritedTypographyStyle
4242
4423
  }) }),
4243
- /* @__PURE__ */ jsx27("span", { className: "sr-only", children: "More pages" })
4424
+ /* @__PURE__ */ jsx29("span", { className: "sr-only", children: "More pages" })
4244
4425
  ]
4245
4426
  }
4246
4427
  );
4247
4428
  }
4248
4429
 
4249
4430
  // src/components/prose-dialog.tsx
4250
- import * as React26 from "react";
4251
- import { jsx as jsx28 } from "react/jsx-runtime";
4431
+ import * as React28 from "react";
4432
+ import { jsx as jsx30 } from "react/jsx-runtime";
4252
4433
  var proseDialogMaxWidth = "min(var(--sofya-layout-prose-dialog-width), calc(100vw - var(--sofya-space-8)))";
4253
- var ProseDialogContent = React26.forwardRef(
4434
+ var ProseDialogContent = React28.forwardRef(
4254
4435
  ({
4255
4436
  cardClassName,
4256
4437
  cardStyle: incomingCardStyle,
@@ -4268,7 +4449,7 @@ var ProseDialogContent = React26.forwardRef(
4268
4449
  ...incomingCardStyle,
4269
4450
  maxWidth: proseDialogMaxWidth
4270
4451
  };
4271
- return /* @__PURE__ */ jsx28(
4452
+ return /* @__PURE__ */ jsx30(
4272
4453
  DialogContent,
4273
4454
  {
4274
4455
  ref,
@@ -4289,14 +4470,14 @@ var ProseDialogContent = React26.forwardRef(
4289
4470
  );
4290
4471
  ProseDialogContent.displayName = "ProseDialogContent";
4291
4472
  function ProseDialogHeader(props) {
4292
- return /* @__PURE__ */ jsx28(DialogHeader, { "data-slot": "prose-dialog-header", ...props });
4473
+ return /* @__PURE__ */ jsx30(DialogHeader, { "data-slot": "prose-dialog-header", ...props });
4293
4474
  }
4294
4475
  ProseDialogHeader.displayName = "ProseDialogHeader";
4295
- var ProseDialogTitle = React26.forwardRef((props, ref) => /* @__PURE__ */ jsx28(DialogTitle, { ref, "data-slot": "prose-dialog-title", ...props }));
4476
+ var ProseDialogTitle = React28.forwardRef((props, ref) => /* @__PURE__ */ jsx30(DialogTitle, { ref, "data-slot": "prose-dialog-title", ...props }));
4296
4477
  ProseDialogTitle.displayName = "ProseDialogTitle";
4297
- var ProseDialogDescription = React26.forwardRef((props, ref) => /* @__PURE__ */ jsx28(DialogDescription, { ref, "data-slot": "prose-dialog-description", ...props }));
4478
+ var ProseDialogDescription = React28.forwardRef((props, ref) => /* @__PURE__ */ jsx30(DialogDescription, { ref, "data-slot": "prose-dialog-description", ...props }));
4298
4479
  ProseDialogDescription.displayName = "ProseDialogDescription";
4299
- var ProseDialogBody = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
4480
+ var ProseDialogBody = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
4300
4481
  "div",
4301
4482
  {
4302
4483
  ref,
@@ -4315,9 +4496,9 @@ var ProseDialogBody = React26.forwardRef(({ className, ...props }, ref) => /* @_
4315
4496
  ProseDialogBody.displayName = "ProseDialogBody";
4316
4497
 
4317
4498
  // src/components/progress.tsx
4318
- import * as React27 from "react";
4499
+ import * as React29 from "react";
4319
4500
  import * as ProgressPrimitive from "@radix-ui/react-progress";
4320
- import { jsx as jsx29 } from "react/jsx-runtime";
4501
+ import { jsx as jsx31 } from "react/jsx-runtime";
4321
4502
  var progressSizeOptions = ["sm", "default", "lg"];
4322
4503
  function clampProgressValue(value, max) {
4323
4504
  if (Number.isNaN(value)) {
@@ -4325,7 +4506,7 @@ function clampProgressValue(value, max) {
4325
4506
  }
4326
4507
  return Math.min(Math.max(value, 0), max);
4327
4508
  }
4328
- var Progress = React27.forwardRef(function Progress2({
4509
+ var Progress = React29.forwardRef(function Progress2({
4329
4510
  className,
4330
4511
  indicatorClassName,
4331
4512
  max = 100,
@@ -4336,7 +4517,7 @@ var Progress = React27.forwardRef(function Progress2({
4336
4517
  const safeMax = max > 0 ? max : 100;
4337
4518
  const resolvedValue = typeof value === "number" ? clampProgressValue(value, safeMax) : null;
4338
4519
  const progressScale = resolvedValue === null ? void 0 : Number((resolvedValue / safeMax).toFixed(4));
4339
- return /* @__PURE__ */ jsx29(
4520
+ return /* @__PURE__ */ jsx31(
4340
4521
  ProgressPrimitive.Root,
4341
4522
  {
4342
4523
  ref,
@@ -4349,7 +4530,7 @@ var Progress = React27.forwardRef(function Progress2({
4349
4530
  className
4350
4531
  ),
4351
4532
  ...props,
4352
- children: /* @__PURE__ */ jsx29(
4533
+ children: /* @__PURE__ */ jsx31(
4353
4534
  ProgressPrimitive.Indicator,
4354
4535
  {
4355
4536
  "data-slot": "progress-indicator",
@@ -4366,19 +4547,19 @@ var Progress = React27.forwardRef(function Progress2({
4366
4547
  Progress.displayName = ProgressPrimitive.Root.displayName;
4367
4548
 
4368
4549
  // src/components/radio-group.tsx
4369
- import * as React28 from "react";
4550
+ import * as React30 from "react";
4370
4551
  import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
4371
- import { jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
4552
+ import { jsx as jsx32, jsxs as jsxs16 } from "react/jsx-runtime";
4372
4553
  var radioGroupOrientationOptions = ["horizontal", "vertical"];
4373
4554
  var radioGroupVariantOptions = ["default", "pill", "option"];
4374
- var RadioGroupContext = React28.createContext({
4555
+ var RadioGroupContext = React30.createContext({
4375
4556
  variant: "default"
4376
4557
  });
4377
- var RadioGroupOptionContext = React28.createContext(
4558
+ var RadioGroupOptionContext = React30.createContext(
4378
4559
  {}
4379
4560
  );
4380
- var RadioGroupRoot = React28.forwardRef(function RadioGroup2({ className, variant = "default", ...props }, ref) {
4381
- return /* @__PURE__ */ jsx30(RadioGroupContext.Provider, { value: { variant }, children: /* @__PURE__ */ jsx30(
4561
+ var RadioGroupRoot = React30.forwardRef(function RadioGroup2({ className, variant = "default", ...props }, ref) {
4562
+ return /* @__PURE__ */ jsx32(RadioGroupContext.Provider, { value: { variant }, children: /* @__PURE__ */ jsx32(
4382
4563
  RadioGroupPrimitive.Root,
4383
4564
  {
4384
4565
  ref,
@@ -4394,7 +4575,7 @@ var RadioGroupRoot = React28.forwardRef(function RadioGroup2({ className, varian
4394
4575
  ) });
4395
4576
  });
4396
4577
  RadioGroupRoot.displayName = RadioGroupPrimitive.Root.displayName;
4397
- var RadioGroupItem = React28.forwardRef(function RadioGroupItem2({
4578
+ var RadioGroupItem = React30.forwardRef(function RadioGroupItem2({
4398
4579
  className,
4399
4580
  controlClassName,
4400
4581
  description,
@@ -4406,14 +4587,14 @@ var RadioGroupItem = React28.forwardRef(function RadioGroupItem2({
4406
4587
  labelClassName,
4407
4588
  ...props
4408
4589
  }, ref) {
4409
- const { variant } = React28.useContext(RadioGroupContext);
4410
- const generatedId = React28.useId();
4590
+ const { variant } = React30.useContext(RadioGroupContext);
4591
+ const generatedId = React30.useId();
4411
4592
  const resolvedId = id ?? generatedId;
4412
4593
  const labelId = label ? `${resolvedId}-label` : void 0;
4413
4594
  const descriptionId = description ? `${resolvedId}-description` : void 0;
4414
4595
  const alignClassName2 = description ? "items-start" : "items-center";
4415
4596
  if (variant === "pill") {
4416
- return /* @__PURE__ */ jsx30(
4597
+ return /* @__PURE__ */ jsx32(
4417
4598
  RadioGroupPrimitive.Item,
4418
4599
  {
4419
4600
  ref,
@@ -4429,7 +4610,7 @@ var RadioGroupItem = React28.forwardRef(function RadioGroupItem2({
4429
4610
  ),
4430
4611
  ...props,
4431
4612
  children: label || description ? /* @__PURE__ */ jsxs16("span", { className: "grid justify-items-center gap-1 text-center", children: [
4432
- label ? /* @__PURE__ */ jsx30(
4613
+ label ? /* @__PURE__ */ jsx32(
4433
4614
  "span",
4434
4615
  {
4435
4616
  id: labelId,
@@ -4444,7 +4625,7 @@ var RadioGroupItem = React28.forwardRef(function RadioGroupItem2({
4444
4625
  })
4445
4626
  }
4446
4627
  ) : null,
4447
- description ? /* @__PURE__ */ jsx30(
4628
+ description ? /* @__PURE__ */ jsx32(
4448
4629
  "span",
4449
4630
  {
4450
4631
  id: descriptionId,
@@ -4472,7 +4653,7 @@ var RadioGroupItem = React28.forwardRef(function RadioGroupItem2({
4472
4653
  disabled
4473
4654
  }),
4474
4655
  children: [
4475
- /* @__PURE__ */ jsx30(
4656
+ /* @__PURE__ */ jsx32(
4476
4657
  RadioGroupPrimitive.Item,
4477
4658
  {
4478
4659
  ref,
@@ -4488,7 +4669,7 @@ var RadioGroupItem = React28.forwardRef(function RadioGroupItem2({
4488
4669
  controlClassName
4489
4670
  ),
4490
4671
  ...props,
4491
- children: /* @__PURE__ */ jsx30(RadioGroupPrimitive.Indicator, { asChild: true, children: /* @__PURE__ */ jsx30(
4672
+ children: /* @__PURE__ */ jsx32(RadioGroupPrimitive.Indicator, { asChild: true, children: /* @__PURE__ */ jsx32(
4492
4673
  "span",
4493
4674
  {
4494
4675
  "data-slot": "radio-group-indicator",
@@ -4501,7 +4682,7 @@ var RadioGroupItem = React28.forwardRef(function RadioGroupItem2({
4501
4682
  }
4502
4683
  ),
4503
4684
  label || description ? /* @__PURE__ */ jsxs16("span", { className: selectionControlContentBaseClasses, children: [
4504
- label ? /* @__PURE__ */ jsx30(
4685
+ label ? /* @__PURE__ */ jsx32(
4505
4686
  "span",
4506
4687
  {
4507
4688
  id: labelId,
@@ -4516,7 +4697,7 @@ var RadioGroupItem = React28.forwardRef(function RadioGroupItem2({
4516
4697
  })
4517
4698
  }
4518
4699
  ) : null,
4519
- description ? /* @__PURE__ */ jsx30(
4700
+ description ? /* @__PURE__ */ jsx32(
4520
4701
  "span",
4521
4702
  {
4522
4703
  id: descriptionId,
@@ -4537,7 +4718,7 @@ var RadioGroupItem = React28.forwardRef(function RadioGroupItem2({
4537
4718
  );
4538
4719
  });
4539
4720
  RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
4540
- var RadioGroupOptionAvatar = React28.forwardRef(function RadioGroupOptionAvatar2({
4721
+ var RadioGroupOptionAvatar = React30.forwardRef(function RadioGroupOptionAvatar2({
4541
4722
  alt,
4542
4723
  avatarClassName,
4543
4724
  avatarProps,
@@ -4547,7 +4728,7 @@ var RadioGroupOptionAvatar = React28.forwardRef(function RadioGroupOptionAvatar2
4547
4728
  src,
4548
4729
  ...props
4549
4730
  }, ref) {
4550
- return /* @__PURE__ */ jsx30(
4731
+ return /* @__PURE__ */ jsx32(
4551
4732
  "span",
4552
4733
  {
4553
4734
  ref,
@@ -4557,7 +4738,7 @@ var RadioGroupOptionAvatar = React28.forwardRef(function RadioGroupOptionAvatar2
4557
4738
  className
4558
4739
  ),
4559
4740
  ...props,
4560
- children: children ?? /* @__PURE__ */ jsx30(
4741
+ children: children ?? /* @__PURE__ */ jsx32(
4561
4742
  Avatar,
4562
4743
  {
4563
4744
  ...avatarProps,
@@ -4574,9 +4755,9 @@ var RadioGroupOptionAvatar = React28.forwardRef(function RadioGroupOptionAvatar2
4574
4755
  );
4575
4756
  });
4576
4757
  RadioGroupOptionAvatar.displayName = "RadioGroupOptionAvatar";
4577
- var RadioGroupOptionLabel = React28.forwardRef(function RadioGroupOptionLabel2({ children, className, ...props }, ref) {
4578
- const { labelId } = React28.useContext(RadioGroupOptionContext);
4579
- return /* @__PURE__ */ jsx30(
4758
+ var RadioGroupOptionLabel = React30.forwardRef(function RadioGroupOptionLabel2({ children, className, ...props }, ref) {
4759
+ const { labelId } = React30.useContext(RadioGroupOptionContext);
4760
+ return /* @__PURE__ */ jsx32(
4580
4761
  "span",
4581
4762
  {
4582
4763
  ref,
@@ -4596,9 +4777,9 @@ var RadioGroupOptionLabel = React28.forwardRef(function RadioGroupOptionLabel2({
4596
4777
  );
4597
4778
  });
4598
4779
  RadioGroupOptionLabel.displayName = "RadioGroupOptionLabel";
4599
- var RadioGroupOptionDescription = React28.forwardRef(function RadioGroupOptionDescription2({ children, className, ...props }, ref) {
4600
- const { descriptionId } = React28.useContext(RadioGroupOptionContext);
4601
- return /* @__PURE__ */ jsx30(
4780
+ var RadioGroupOptionDescription = React30.forwardRef(function RadioGroupOptionDescription2({ children, className, ...props }, ref) {
4781
+ const { descriptionId } = React30.useContext(RadioGroupOptionContext);
4782
+ return /* @__PURE__ */ jsx32(
4602
4783
  "span",
4603
4784
  {
4604
4785
  ref,
@@ -4617,8 +4798,8 @@ var RadioGroupOptionDescription = React28.forwardRef(function RadioGroupOptionDe
4617
4798
  );
4618
4799
  });
4619
4800
  RadioGroupOptionDescription.displayName = "RadioGroupOptionDescription";
4620
- var RadioGroupOptionIndicator = React28.forwardRef(function RadioGroupOptionIndicator2({ children, className, ...props }, ref) {
4621
- return /* @__PURE__ */ jsx30(
4801
+ var RadioGroupOptionIndicator = React30.forwardRef(function RadioGroupOptionIndicator2({ children, className, ...props }, ref) {
4802
+ return /* @__PURE__ */ jsx32(
4622
4803
  "span",
4623
4804
  {
4624
4805
  ref,
@@ -4628,7 +4809,7 @@ var RadioGroupOptionIndicator = React28.forwardRef(function RadioGroupOptionIndi
4628
4809
  className
4629
4810
  ),
4630
4811
  ...props,
4631
- children: children ?? /* @__PURE__ */ jsx30(
4812
+ children: children ?? /* @__PURE__ */ jsx32(
4632
4813
  "svg",
4633
4814
  {
4634
4815
  "aria-hidden": "true",
@@ -4636,7 +4817,7 @@ var RadioGroupOptionIndicator = React28.forwardRef(function RadioGroupOptionIndi
4636
4817
  className: "h-6 w-6 opacity-0 transition-opacity duration-sofya ease-sofya group-data-[state=checked]/radio-option:opacity-100",
4637
4818
  fill: "none",
4638
4819
  xmlns: "http://www.w3.org/2000/svg",
4639
- children: /* @__PURE__ */ jsx30(
4820
+ children: /* @__PURE__ */ jsx32(
4640
4821
  "path",
4641
4822
  {
4642
4823
  d: "M9.55 17.6537L4.2155 12.3192L5.2845 11.25L9.55 15.5155L18.7155 6.35L19.7845 7.41925L9.55 17.6537Z",
@@ -4650,14 +4831,14 @@ var RadioGroupOptionIndicator = React28.forwardRef(function RadioGroupOptionIndi
4650
4831
  });
4651
4832
  RadioGroupOptionIndicator.displayName = "RadioGroupOptionIndicator";
4652
4833
  function isOptionChild(child, component) {
4653
- return React28.isValidElement(child) && child.type === component;
4834
+ return React30.isValidElement(child) && child.type === component;
4654
4835
  }
4655
- var RadioGroupOption = React28.forwardRef(function RadioGroupOption2({ children, className, disabled, id, ...props }, ref) {
4656
- const generatedId = React28.useId();
4836
+ var RadioGroupOption = React30.forwardRef(function RadioGroupOption2({ children, className, disabled, id, ...props }, ref) {
4837
+ const generatedId = React30.useId();
4657
4838
  const resolvedId = id ?? generatedId;
4658
4839
  const labelId = `${resolvedId}-label`;
4659
4840
  const descriptionId = `${resolvedId}-description`;
4660
- const childArray = React28.Children.toArray(children);
4841
+ const childArray = React30.Children.toArray(children);
4661
4842
  const leadingChildren = [];
4662
4843
  const contentChildren = [];
4663
4844
  let indicatorChild = null;
@@ -4672,7 +4853,7 @@ var RadioGroupOption = React28.forwardRef(function RadioGroupOption2({ children,
4672
4853
  }
4673
4854
  contentChildren.push(child);
4674
4855
  }
4675
- return /* @__PURE__ */ jsx30(RadioGroupOptionContext.Provider, { value: { descriptionId, labelId }, children: /* @__PURE__ */ jsxs16(
4856
+ return /* @__PURE__ */ jsx32(RadioGroupOptionContext.Provider, { value: { descriptionId, labelId }, children: /* @__PURE__ */ jsxs16(
4676
4857
  RadioGroupPrimitive.Item,
4677
4858
  {
4678
4859
  ref,
@@ -4692,7 +4873,7 @@ var RadioGroupOption = React28.forwardRef(function RadioGroupOption2({ children,
4692
4873
  ...props,
4693
4874
  children: [
4694
4875
  leadingChildren,
4695
- /* @__PURE__ */ jsx30(
4876
+ /* @__PURE__ */ jsx32(
4696
4877
  "span",
4697
4878
  {
4698
4879
  "data-slot": "radio-group-option-content",
@@ -4700,7 +4881,7 @@ var RadioGroupOption = React28.forwardRef(function RadioGroupOption2({ children,
4700
4881
  children: contentChildren
4701
4882
  }
4702
4883
  ),
4703
- indicatorChild ?? /* @__PURE__ */ jsx30(RadioGroupOptionIndicator, {})
4884
+ indicatorChild ?? /* @__PURE__ */ jsx32(RadioGroupOptionIndicator, {})
4704
4885
  ]
4705
4886
  }
4706
4887
  ) });
@@ -4716,22 +4897,92 @@ var RadioGroup3 = Object.assign(RadioGroupRoot, {
4716
4897
  OptionLabel: RadioGroupOptionLabel
4717
4898
  });
4718
4899
 
4900
+ // src/components/rich-text-toolbar.tsx
4901
+ import * as React31 from "react";
4902
+ import { jsx as jsx33 } from "react/jsx-runtime";
4903
+ var RichTextToolbar = React31.forwardRef(
4904
+ function RichTextToolbar2({ className, editorFocused = false, role = "toolbar", ...props }, ref) {
4905
+ return /* @__PURE__ */ jsx33(
4906
+ "div",
4907
+ {
4908
+ ref,
4909
+ role,
4910
+ "aria-label": props["aria-label"] ?? "Formata\xE7\xE3o de texto",
4911
+ "aria-orientation": "horizontal",
4912
+ "data-slot": "rich-text-toolbar",
4913
+ "data-editor-focused": editorFocused ? "true" : void 0,
4914
+ className: cn(
4915
+ "inline-flex flex-wrap items-center gap-[var(--sofya-gap-tight)] rounded-[var(--sofya-radius-md)] border border-[color:var(--sofya-border-soft)] bg-card p-[var(--sofya-space-1)] transition-[border-color,box-shadow] duration-sofya ease-sofya",
4916
+ "focus-within:border-[color:var(--sofya-border-hover)]",
4917
+ "data-[editor-focused=true]:border-[color:var(--sofya-border-hover)] data-[editor-focused=true]:ring-2 data-[editor-focused=true]:ring-[color:var(--sofya-focus-ring-soft)]",
4918
+ className
4919
+ ),
4920
+ ...props
4921
+ }
4922
+ );
4923
+ }
4924
+ );
4925
+ RichTextToolbar.displayName = "RichTextToolbar";
4926
+ var RichTextToolbarGroup = React31.forwardRef(function RichTextToolbarGroup2({ className, role = "group", ...props }, ref) {
4927
+ return /* @__PURE__ */ jsx33(
4928
+ "div",
4929
+ {
4930
+ ref,
4931
+ role,
4932
+ "data-slot": "rich-text-toolbar-group",
4933
+ className: cn(
4934
+ "flex items-center gap-[var(--sofya-space-0-5)]",
4935
+ className
4936
+ ),
4937
+ ...props
4938
+ }
4939
+ );
4940
+ });
4941
+ RichTextToolbarGroup.displayName = "RichTextToolbarGroup";
4942
+ var RichTextToolbarSeparator = React31.forwardRef(function RichTextToolbarSeparator2({ className, ...props }, ref) {
4943
+ return /* @__PURE__ */ jsx33(
4944
+ "span",
4945
+ {
4946
+ ref,
4947
+ "aria-hidden": "true",
4948
+ "data-slot": "rich-text-toolbar-separator",
4949
+ className: cn(
4950
+ "mx-[var(--sofya-space-1)] h-5 w-px shrink-0 bg-[color:var(--sofya-border-soft)]",
4951
+ className
4952
+ ),
4953
+ ...props
4954
+ }
4955
+ );
4956
+ });
4957
+ RichTextToolbarSeparator.displayName = "RichTextToolbarSeparator";
4958
+ var RichTextToolbarButton = React31.forwardRef(function RichTextToolbarButton2({ active = false, ...props }, ref) {
4959
+ return /* @__PURE__ */ jsx33(
4960
+ IconButton,
4961
+ {
4962
+ ref,
4963
+ "data-slot": "rich-text-toolbar-button",
4964
+ variant: "ghost",
4965
+ selected: active,
4966
+ ...props
4967
+ }
4968
+ );
4969
+ });
4970
+ RichTextToolbarButton.displayName = "RichTextToolbarButton";
4971
+
4719
4972
  // src/components/right-rail-action.tsx
4720
- import * as React29 from "react";
4721
- import { jsx as jsx31 } from "react/jsx-runtime";
4722
- var RightRailAction = React29.forwardRef(
4723
- ({ active = false, className, icon, ...props }, ref) => /* @__PURE__ */ jsx31(
4724
- Button,
4973
+ import * as React32 from "react";
4974
+ import { jsx as jsx34 } from "react/jsx-runtime";
4975
+ var RightRailAction = React32.forwardRef(
4976
+ ({ active = false, className, icon, ...props }, ref) => /* @__PURE__ */ jsx34(
4977
+ IconButton,
4725
4978
  {
4726
4979
  ref,
4727
- active,
4980
+ icon,
4981
+ variant: "ghost",
4982
+ selected: active,
4728
4983
  "data-slot": "right-rail-action",
4729
- leftIcon: icon,
4730
- size: "icon",
4731
- variant: "icon",
4732
4984
  className: cn(
4733
4985
  "size-[var(--sofya-icon-button-size-md)] rounded-[var(--sofya-radius-md)] shadow-none",
4734
- active && "bg-[color:var(--sofya-surface-selected)]",
4735
4986
  className
4736
4987
  ),
4737
4988
  ...props
@@ -4741,12 +4992,12 @@ var RightRailAction = React29.forwardRef(
4741
4992
  RightRailAction.displayName = "RightRailAction";
4742
4993
 
4743
4994
  // src/components/scroll-area.tsx
4744
- import * as React30 from "react";
4995
+ import * as React33 from "react";
4745
4996
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
4746
- import { jsx as jsx32 } from "react/jsx-runtime";
4997
+ import { jsx as jsx35 } from "react/jsx-runtime";
4747
4998
  var scrollAreaOrientationOptions = ["horizontal", "vertical"];
4748
- var ScrollArea = React30.forwardRef(function ScrollArea2({ className, ...props }, ref) {
4749
- return /* @__PURE__ */ jsx32(
4999
+ var ScrollArea = React33.forwardRef(function ScrollArea2({ className, ...props }, ref) {
5000
+ return /* @__PURE__ */ jsx35(
4750
5001
  ScrollAreaPrimitive.Root,
4751
5002
  {
4752
5003
  ref,
@@ -4757,8 +5008,8 @@ var ScrollArea = React30.forwardRef(function ScrollArea2({ className, ...props }
4757
5008
  );
4758
5009
  });
4759
5010
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
4760
- var ScrollAreaViewport = React30.forwardRef(function ScrollAreaViewport2({ className, ...props }, ref) {
4761
- return /* @__PURE__ */ jsx32(
5011
+ var ScrollAreaViewport = React33.forwardRef(function ScrollAreaViewport2({ className, ...props }, ref) {
5012
+ return /* @__PURE__ */ jsx35(
4762
5013
  ScrollAreaPrimitive.Viewport,
4763
5014
  {
4764
5015
  ref,
@@ -4772,8 +5023,8 @@ var ScrollAreaViewport = React30.forwardRef(function ScrollAreaViewport2({ class
4772
5023
  );
4773
5024
  });
4774
5025
  ScrollAreaViewport.displayName = ScrollAreaPrimitive.Viewport.displayName;
4775
- var ScrollAreaScrollbar = React30.forwardRef(function ScrollAreaScrollbar2({ className, orientation = "vertical", thumbClassName, ...props }, ref) {
4776
- return /* @__PURE__ */ jsx32(
5026
+ var ScrollAreaScrollbar = React33.forwardRef(function ScrollAreaScrollbar2({ className, orientation = "vertical", thumbClassName, ...props }, ref) {
5027
+ return /* @__PURE__ */ jsx35(
4777
5028
  ScrollAreaPrimitive.Scrollbar,
4778
5029
  {
4779
5030
  ref,
@@ -4784,7 +5035,7 @@ var ScrollAreaScrollbar = React30.forwardRef(function ScrollAreaScrollbar2({ cla
4784
5035
  className
4785
5036
  ),
4786
5037
  ...props,
4787
- children: /* @__PURE__ */ jsx32(
5038
+ children: /* @__PURE__ */ jsx35(
4788
5039
  ScrollAreaPrimitive.Thumb,
4789
5040
  {
4790
5041
  "data-slot": "scroll-area-thumb",
@@ -4798,8 +5049,8 @@ var ScrollAreaScrollbar = React30.forwardRef(function ScrollAreaScrollbar2({ cla
4798
5049
  );
4799
5050
  });
4800
5051
  ScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;
4801
- var ScrollAreaCorner = React30.forwardRef(function ScrollAreaCorner2({ className, ...props }, ref) {
4802
- return /* @__PURE__ */ jsx32(
5052
+ var ScrollAreaCorner = React33.forwardRef(function ScrollAreaCorner2({ className, ...props }, ref) {
5053
+ return /* @__PURE__ */ jsx35(
4803
5054
  ScrollAreaPrimitive.Corner,
4804
5055
  {
4805
5056
  ref,
@@ -4812,19 +5063,19 @@ var ScrollAreaCorner = React30.forwardRef(function ScrollAreaCorner2({ className
4812
5063
  ScrollAreaCorner.displayName = ScrollAreaPrimitive.Corner.displayName;
4813
5064
 
4814
5065
  // src/components/select.tsx
4815
- import * as React31 from "react";
5066
+ import * as React34 from "react";
4816
5067
  import * as SelectPrimitive from "@radix-ui/react-select";
4817
5068
 
4818
5069
  // src/lib/form-control-classes.ts
4819
5070
  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)]";
4820
5071
 
4821
5072
  // src/components/select.tsx
4822
- import { jsx as jsx33, jsxs as jsxs17 } from "react/jsx-runtime";
5073
+ import { jsx as jsx36, jsxs as jsxs17 } from "react/jsx-runtime";
4823
5074
  var selectSizeOptions = ["default", "sm"];
4824
5075
  var Select = SelectPrimitive.Root;
4825
5076
  var SelectGroup = SelectPrimitive.Group;
4826
- var SelectValue = React31.forwardRef(function SelectValue2({ className, ...props }, ref) {
4827
- return /* @__PURE__ */ jsx33(
5077
+ var SelectValue = React34.forwardRef(function SelectValue2({ className, ...props }, ref) {
5078
+ return /* @__PURE__ */ jsx36(
4828
5079
  Text,
4829
5080
  {
4830
5081
  ref,
@@ -4833,12 +5084,12 @@ var SelectValue = React31.forwardRef(function SelectValue2({ className, ...props
4833
5084
  className: cn("block truncate text-inherit", className),
4834
5085
  size: "tiny",
4835
5086
  style: inheritedTypographyStyle,
4836
- children: /* @__PURE__ */ jsx33(SelectPrimitive.Value, { className: "block truncate", ...props })
5087
+ children: /* @__PURE__ */ jsx36(SelectPrimitive.Value, { className: "block truncate", ...props })
4837
5088
  }
4838
5089
  );
4839
5090
  });
4840
5091
  SelectValue.displayName = SelectPrimitive.Value.displayName;
4841
- var SelectTrigger = React31.forwardRef(function SelectTrigger2({ className, children, size = "default", ...props }, ref) {
5092
+ var SelectTrigger = React34.forwardRef(function SelectTrigger2({ className, children, size = "default", ...props }, ref) {
4842
5093
  return /* @__PURE__ */ jsxs17(
4843
5094
  SelectPrimitive.Trigger,
4844
5095
  {
@@ -4853,7 +5104,7 @@ var SelectTrigger = React31.forwardRef(function SelectTrigger2({ className, chil
4853
5104
  ...props,
4854
5105
  children: [
4855
5106
  children,
4856
- /* @__PURE__ */ jsx33(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx33(
5107
+ /* @__PURE__ */ jsx36(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx36(
4857
5108
  Icon,
4858
5109
  {
4859
5110
  name: "caret-down",
@@ -4866,8 +5117,8 @@ var SelectTrigger = React31.forwardRef(function SelectTrigger2({ className, chil
4866
5117
  );
4867
5118
  });
4868
5119
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
4869
- var SelectScrollUpButton = React31.forwardRef(function SelectScrollUpButton2({ className, ...props }, ref) {
4870
- return /* @__PURE__ */ jsx33(
5120
+ var SelectScrollUpButton = React34.forwardRef(function SelectScrollUpButton2({ className, ...props }, ref) {
5121
+ return /* @__PURE__ */ jsx36(
4871
5122
  SelectPrimitive.ScrollUpButton,
4872
5123
  {
4873
5124
  ref,
@@ -4877,13 +5128,13 @@ var SelectScrollUpButton = React31.forwardRef(function SelectScrollUpButton2({ c
4877
5128
  className
4878
5129
  ),
4879
5130
  ...props,
4880
- children: /* @__PURE__ */ jsx33(Icon, { name: "caret-up", size: 12 })
5131
+ children: /* @__PURE__ */ jsx36(Icon, { name: "caret-up", size: 12 })
4881
5132
  }
4882
5133
  );
4883
5134
  });
4884
5135
  SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
4885
- var SelectScrollDownButton = React31.forwardRef(function SelectScrollDownButton2({ className, ...props }, ref) {
4886
- return /* @__PURE__ */ jsx33(
5136
+ var SelectScrollDownButton = React34.forwardRef(function SelectScrollDownButton2({ className, ...props }, ref) {
5137
+ return /* @__PURE__ */ jsx36(
4887
5138
  SelectPrimitive.ScrollDownButton,
4888
5139
  {
4889
5140
  ref,
@@ -4893,13 +5144,13 @@ var SelectScrollDownButton = React31.forwardRef(function SelectScrollDownButton2
4893
5144
  className
4894
5145
  ),
4895
5146
  ...props,
4896
- children: /* @__PURE__ */ jsx33(Icon, { name: "caret-down", size: 12 })
5147
+ children: /* @__PURE__ */ jsx36(Icon, { name: "caret-down", size: 12 })
4897
5148
  }
4898
5149
  );
4899
5150
  });
4900
5151
  SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
4901
- var SelectContent = React31.forwardRef(function SelectContent2({ className, children, position = "popper", ...props }, ref) {
4902
- return /* @__PURE__ */ jsx33(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs17(
5152
+ var SelectContent = React34.forwardRef(function SelectContent2({ className, children, position = "popper", ...props }, ref) {
5153
+ return /* @__PURE__ */ jsx36(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs17(
4903
5154
  SelectPrimitive.Content,
4904
5155
  {
4905
5156
  ref,
@@ -4912,8 +5163,8 @@ var SelectContent = React31.forwardRef(function SelectContent2({ className, chil
4912
5163
  ),
4913
5164
  ...props,
4914
5165
  children: [
4915
- /* @__PURE__ */ jsx33(SelectScrollUpButton, {}),
4916
- /* @__PURE__ */ jsx33(
5166
+ /* @__PURE__ */ jsx36(SelectScrollUpButton, {}),
5167
+ /* @__PURE__ */ jsx36(
4917
5168
  SelectPrimitive.Viewport,
4918
5169
  {
4919
5170
  "data-slot": "select-viewport",
@@ -4921,14 +5172,14 @@ var SelectContent = React31.forwardRef(function SelectContent2({ className, chil
4921
5172
  children
4922
5173
  }
4923
5174
  ),
4924
- /* @__PURE__ */ jsx33(SelectScrollDownButton, {})
5175
+ /* @__PURE__ */ jsx36(SelectScrollDownButton, {})
4925
5176
  ]
4926
5177
  }
4927
5178
  ) });
4928
5179
  });
4929
5180
  SelectContent.displayName = SelectPrimitive.Content.displayName;
4930
- var SelectLabel = React31.forwardRef(function SelectLabel2({ className, ...props }, ref) {
4931
- return /* @__PURE__ */ jsx33(
5181
+ var SelectLabel = React34.forwardRef(function SelectLabel2({ className, ...props }, ref) {
5182
+ return /* @__PURE__ */ jsx36(
4932
5183
  SelectPrimitive.Label,
4933
5184
  {
4934
5185
  ref,
@@ -4950,7 +5201,7 @@ var SelectLabel = React31.forwardRef(function SelectLabel2({ className, ...props
4950
5201
  );
4951
5202
  });
4952
5203
  SelectLabel.displayName = SelectPrimitive.Label.displayName;
4953
- var SelectItem = React31.forwardRef(function SelectItem2({ className, children, ...props }, ref) {
5204
+ var SelectItem = React34.forwardRef(function SelectItem2({ className, children, ...props }, ref) {
4954
5205
  return /* @__PURE__ */ jsxs17(
4955
5206
  SelectPrimitive.Item,
4956
5207
  {
@@ -4962,20 +5213,20 @@ var SelectItem = React31.forwardRef(function SelectItem2({ className, children,
4962
5213
  ),
4963
5214
  ...props,
4964
5215
  children: [
4965
- /* @__PURE__ */ jsx33(SelectPrimitive.ItemText, { className: "truncate", children: renderTextContent(children, {
5216
+ /* @__PURE__ */ jsx36(SelectPrimitive.ItemText, { className: "truncate", children: renderTextContent(children, {
4966
5217
  as: "span",
4967
5218
  className: "block truncate text-[color:var(--sofya-text-default)]",
4968
5219
  size: "tiny",
4969
5220
  style: inheritedTypographyStyle
4970
5221
  }) }),
4971
- /* @__PURE__ */ jsx33(SelectPrimitive.ItemIndicator, { asChild: true, children: /* @__PURE__ */ jsx33("span", { className: "absolute right-4 inline-flex h-4 w-4 items-center justify-center text-primary", children: /* @__PURE__ */ jsx33(Icon, { name: "check", size: 14 }) }) })
5222
+ /* @__PURE__ */ jsx36(SelectPrimitive.ItemIndicator, { asChild: true, children: /* @__PURE__ */ jsx36("span", { className: "absolute right-4 inline-flex h-4 w-4 items-center justify-center text-primary", children: /* @__PURE__ */ jsx36(Icon, { name: "check", size: 14 }) }) })
4972
5223
  ]
4973
5224
  }
4974
5225
  );
4975
5226
  });
4976
5227
  SelectItem.displayName = SelectPrimitive.Item.displayName;
4977
- var SelectSeparator = React31.forwardRef(function SelectSeparator2({ className, ...props }, ref) {
4978
- return /* @__PURE__ */ jsx33(
5228
+ var SelectSeparator = React34.forwardRef(function SelectSeparator2({ className, ...props }, ref) {
5229
+ return /* @__PURE__ */ jsx36(
4979
5230
  SelectPrimitive.Separator,
4980
5231
  {
4981
5232
  ref,
@@ -4988,11 +5239,11 @@ var SelectSeparator = React31.forwardRef(function SelectSeparator2({ className,
4988
5239
  SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
4989
5240
 
4990
5241
  // src/components/separator.tsx
4991
- import * as React32 from "react";
5242
+ import * as React35 from "react";
4992
5243
  import * as SeparatorPrimitive from "@radix-ui/react-separator";
4993
- import { jsx as jsx34 } from "react/jsx-runtime";
4994
- var Separator2 = React32.forwardRef(function Separator3({ className, decorative = true, orientation = "horizontal", ...props }, ref) {
4995
- return /* @__PURE__ */ jsx34(
5244
+ import { jsx as jsx37 } from "react/jsx-runtime";
5245
+ var Separator2 = React35.forwardRef(function Separator3({ className, decorative = true, orientation = "horizontal", ...props }, ref) {
5246
+ return /* @__PURE__ */ jsx37(
4996
5247
  SeparatorPrimitive.Root,
4997
5248
  {
4998
5249
  ref,
@@ -5010,9 +5261,64 @@ var Separator2 = React32.forwardRef(function Separator3({ className, decorative
5010
5261
  });
5011
5262
  Separator2.displayName = SeparatorPrimitive.Root.displayName;
5012
5263
 
5264
+ // src/components/sidebar-nav-item.tsx
5265
+ import * as React36 from "react";
5266
+ import { jsx as jsx38, jsxs as jsxs18 } from "react/jsx-runtime";
5267
+ var SidebarNavItem = React36.forwardRef(
5268
+ function SidebarNavItem2({ as, active = false, disabled = false, icon, className, children, ...props }, ref) {
5269
+ const Comp = as ?? (props.href ? "a" : "button");
5270
+ const isNativeButton = Comp === "button";
5271
+ return /* @__PURE__ */ jsxs18(
5272
+ Comp,
5273
+ {
5274
+ ref,
5275
+ "data-slot": "sidebar-nav-item",
5276
+ "data-active": active ? "true" : void 0,
5277
+ "data-disabled": disabled ? "true" : void 0,
5278
+ "aria-current": active ? "page" : void 0,
5279
+ "aria-disabled": disabled || void 0,
5280
+ ...isNativeButton ? { type: "button", disabled } : {},
5281
+ className: cn(
5282
+ "group relative flex w-full items-center gap-[var(--sofya-gap-compact)] rounded-[var(--sofya-radius-md)] py-[var(--sofya-space-2)] pl-[var(--sofya-space-3)] pr-[var(--sofya-space-3)] text-left no-underline outline-none",
5283
+ "[font-family:var(--sofya-text-sidebar-title-font-family)] text-[length:var(--sofya-text-sidebar-title-font-size)] [font-weight:var(--sofya-text-sidebar-title-font-weight)] leading-[var(--sofya-text-sidebar-title-line-height)] tracking-[var(--sofya-text-sidebar-title-letter-spacing)]",
5284
+ "text-[color:var(--sofya-text-soft)] transition-colors duration-sofya ease-sofya",
5285
+ "hover:bg-[color:var(--sofya-surface-hover)] hover:text-[color:var(--sofya-text-default)]",
5286
+ "focus-visible:ring-2 focus-visible:ring-[color:var(--sofya-focus-ring-soft)] focus-visible:ring-offset-0",
5287
+ "data-[active=true]:bg-[color:var(--sofya-surface-selected)] data-[active=true]:text-[color:var(--sofya-text-default)]",
5288
+ "data-[active=true]:hover:bg-[color:var(--sofya-surface-selected-strong)]",
5289
+ "data-[disabled=true]:pointer-events-none data-[disabled=true]:cursor-not-allowed data-[disabled=true]:text-[color:var(--sofya-text-subtle)] data-[disabled=true]:hover:bg-transparent",
5290
+ className
5291
+ ),
5292
+ ...props,
5293
+ children: [
5294
+ /* @__PURE__ */ jsx38(
5295
+ "span",
5296
+ {
5297
+ "aria-hidden": "true",
5298
+ "data-slot": "sidebar-nav-indicator",
5299
+ className: cn(
5300
+ "pointer-events-none absolute left-0 top-1/2 h-[60%] w-[3px] -translate-y-1/2 rounded-full bg-primary transition-opacity duration-sofya ease-sofya",
5301
+ active ? "opacity-100" : "opacity-0"
5302
+ )
5303
+ }
5304
+ ),
5305
+ icon ? /* @__PURE__ */ jsx38("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center [&_svg]:h-[1em] [&_svg]:w-[1em] [&_svg]:shrink-0", children: icon }) : null,
5306
+ /* @__PURE__ */ jsx38("span", { className: "min-w-0 flex-1 truncate", children: renderTextContent(children, {
5307
+ as: "span",
5308
+ className: "block min-w-0 truncate text-inherit",
5309
+ size: "sidebar-title"
5310
+ }) })
5311
+ ]
5312
+ }
5313
+ );
5314
+ }
5315
+ );
5316
+ SidebarNavItem.displayName = "SidebarNavItem";
5317
+ var SettingsNavItem = SidebarNavItem;
5318
+
5013
5319
  // src/components/slider.tsx
5014
- import * as React33 from "react";
5015
- import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
5320
+ import * as React37 from "react";
5321
+ import { jsx as jsx39, jsxs as jsxs19 } from "react/jsx-runtime";
5016
5322
  function clampSliderValue(value, min, max) {
5017
5323
  if (Number.isNaN(value)) {
5018
5324
  return min;
@@ -5037,7 +5343,7 @@ function resolveSliderMeasurement(value, fallback) {
5037
5343
  function isTextValue(value) {
5038
5344
  return typeof value === "string" || typeof value === "number";
5039
5345
  }
5040
- var Slider = React33.forwardRef(function Slider2({
5346
+ var Slider = React37.forwardRef(function Slider2({
5041
5347
  className,
5042
5348
  defaultValue,
5043
5349
  formatValue,
@@ -5060,7 +5366,7 @@ var Slider = React33.forwardRef(function Slider2({
5060
5366
  valueClassName,
5061
5367
  ...props
5062
5368
  }, ref) {
5063
- const resolvedId = React33.useId();
5369
+ const resolvedId = React37.useId();
5064
5370
  const inputId = id ?? resolvedId;
5065
5371
  const safeMin = min;
5066
5372
  const safeMax = resolveSliderMax(safeMin, max);
@@ -5069,7 +5375,7 @@ var Slider = React33.forwardRef(function Slider2({
5069
5375
  onChange: onValueChange,
5070
5376
  value
5071
5377
  });
5072
- React33.useEffect(() => {
5378
+ React37.useEffect(() => {
5073
5379
  if (value !== void 0) {
5074
5380
  return;
5075
5381
  }
@@ -5116,14 +5422,14 @@ var Slider = React33.forwardRef(function Slider2({
5116
5422
  setControllableValue(nextValue);
5117
5423
  onChange?.(event);
5118
5424
  };
5119
- return /* @__PURE__ */ jsxs18(
5425
+ return /* @__PURE__ */ jsxs19(
5120
5426
  "div",
5121
5427
  {
5122
5428
  "data-slot": "slider",
5123
5429
  className: cn("grid w-full gap-2", className),
5124
5430
  children: [
5125
- label || showValue ? /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between gap-4", children: [
5126
- label ? /* @__PURE__ */ jsx35(
5431
+ label || showValue ? /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between gap-4", children: [
5432
+ label ? /* @__PURE__ */ jsx39(
5127
5433
  FieldLabel,
5128
5434
  {
5129
5435
  htmlFor: inputId,
@@ -5134,8 +5440,8 @@ var Slider = React33.forwardRef(function Slider2({
5134
5440
  textClassName: "block min-w-0 text-[color:var(--sofya-text-default)]",
5135
5441
  children: label
5136
5442
  }
5137
- ) : /* @__PURE__ */ jsx35("span", {}),
5138
- showValue ? /* @__PURE__ */ jsx35(
5443
+ ) : /* @__PURE__ */ jsx39("span", {}),
5444
+ showValue ? /* @__PURE__ */ jsx39(
5139
5445
  "div",
5140
5446
  {
5141
5447
  className: cn(
@@ -5153,7 +5459,7 @@ var Slider = React33.forwardRef(function Slider2({
5153
5459
  }
5154
5460
  ) : null
5155
5461
  ] }) : null,
5156
- /* @__PURE__ */ jsxs18(
5462
+ /* @__PURE__ */ jsxs19(
5157
5463
  "div",
5158
5464
  {
5159
5465
  "data-slot": "slider-control",
@@ -5163,7 +5469,7 @@ var Slider = React33.forwardRef(function Slider2({
5163
5469
  ),
5164
5470
  style: controlStyle,
5165
5471
  children: [
5166
- /* @__PURE__ */ jsx35(
5472
+ /* @__PURE__ */ jsx39(
5167
5473
  "input",
5168
5474
  {
5169
5475
  ...props,
@@ -5180,7 +5486,7 @@ var Slider = React33.forwardRef(function Slider2({
5180
5486
  style: inputBoundsStyle
5181
5487
  }
5182
5488
  ),
5183
- /* @__PURE__ */ jsx35(
5489
+ /* @__PURE__ */ jsx39(
5184
5490
  "div",
5185
5491
  {
5186
5492
  "data-slot": "slider-track",
@@ -5191,7 +5497,7 @@ var Slider = React33.forwardRef(function Slider2({
5191
5497
  style: trackBoundsStyle
5192
5498
  }
5193
5499
  ),
5194
- /* @__PURE__ */ jsx35(
5500
+ /* @__PURE__ */ jsx39(
5195
5501
  "div",
5196
5502
  {
5197
5503
  "data-slot": "slider-range",
@@ -5202,7 +5508,7 @@ var Slider = React33.forwardRef(function Slider2({
5202
5508
  style: rangeStyle
5203
5509
  }
5204
5510
  ),
5205
- /* @__PURE__ */ jsx35(
5511
+ /* @__PURE__ */ jsx39(
5206
5512
  "div",
5207
5513
  {
5208
5514
  "data-slot": "slider-thumb",
@@ -5223,10 +5529,10 @@ var Slider = React33.forwardRef(function Slider2({
5223
5529
  Slider.displayName = "Slider";
5224
5530
 
5225
5531
  // src/components/skeleton.tsx
5226
- import * as React34 from "react";
5227
- import { jsx as jsx36 } from "react/jsx-runtime";
5228
- var Skeleton = React34.forwardRef(function Skeleton2({ className, ...props }, ref) {
5229
- return /* @__PURE__ */ jsx36(
5532
+ import * as React38 from "react";
5533
+ import { jsx as jsx40 } from "react/jsx-runtime";
5534
+ var Skeleton = React38.forwardRef(function Skeleton2({ className, ...props }, ref) {
5535
+ return /* @__PURE__ */ jsx40(
5230
5536
  "div",
5231
5537
  {
5232
5538
  ref,
@@ -5241,75 +5547,78 @@ var Skeleton = React34.forwardRef(function Skeleton2({ className, ...props }, re
5241
5547
  Skeleton.displayName = "Skeleton";
5242
5548
 
5243
5549
  // src/components/sonner.tsx
5244
- import * as React35 from "react";
5550
+ import * as React39 from "react";
5245
5551
  import {
5246
5552
  Toaster as SonnerToaster,
5247
5553
  toast
5248
5554
  } from "sonner";
5249
- import { jsx as jsx37 } from "react/jsx-runtime";
5555
+ import { jsx as jsx41 } from "react/jsx-runtime";
5250
5556
  var notificationVariantOptions = ["default", "success", "error", "warning"];
5251
5557
  function ToastStatusIcon({
5252
5558
  iconName,
5253
5559
  className
5254
5560
  }) {
5255
- return /* @__PURE__ */ jsx37(
5561
+ return /* @__PURE__ */ jsx41(
5256
5562
  "span",
5257
5563
  {
5258
5564
  "aria-hidden": "true",
5259
5565
  className: cn(
5260
- "inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full border shadow-sofya-sm",
5566
+ "inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full border shadow-none",
5261
5567
  className
5262
5568
  ),
5263
- children: /* @__PURE__ */ jsx37(Icon, { name: iconName, size: 16 })
5569
+ children: /* @__PURE__ */ jsx41(Icon, { name: iconName, size: 16 })
5264
5570
  }
5265
5571
  );
5266
5572
  }
5267
5573
  var defaultToastClassNames = {
5268
- toast: "group pointer-events-auto relative flex w-full items-start gap-4 overflow-hidden rounded-[24px] border px-4 py-4 text-foreground shadow-sofya-lg",
5269
- content: "grid gap-2 pr-8",
5574
+ // Flat surface, soft (neutral) elevation, long-text safe content padding so
5575
+ // the message never sits under the single close button.
5576
+ toast: "group pointer-events-auto relative flex w-full items-start gap-4 overflow-hidden rounded-[24px] border px-4 py-4 text-foreground shadow-[var(--sofya-shadow-soft)]",
5577
+ content: "grid min-w-0 gap-2 pr-8",
5270
5578
  title: "font-display text-[15px] font-semibold leading-5 tracking-tight text-foreground",
5271
- description: "text-sm leading-5 text-muted-foreground",
5579
+ description: "text-sm leading-5 text-[color:var(--sofya-text-subtle)]",
5272
5580
  icon: "mt-0",
5273
- closeButton: "absolute right-3 top-3 inline-flex h-8 w-8 items-center justify-center rounded-full border border-transparent bg-transparent text-muted-foreground transition-[background-color,border-color,color] duration-sofya ease-sofya hover:border-border hover:bg-muted hover:text-foreground",
5581
+ closeButton: "absolute right-3 top-3 inline-flex h-8 w-8 items-center justify-center rounded-full border border-transparent bg-transparent text-[color:var(--sofya-text-soft)] transition-[background-color,border-color,color] duration-sofya ease-sofya hover:bg-[color:var(--sofya-surface-hover)] hover:text-[color:var(--sofya-text-default)]",
5274
5582
  actionButton: "inline-flex h-9 shrink-0 items-center justify-center rounded-full bg-primary px-4 text-sm font-medium text-primary-foreground transition-[filter,transform] duration-sofya ease-sofya hover:brightness-[1.04]",
5275
5583
  cancelButton: "inline-flex h-9 shrink-0 items-center justify-center rounded-full bg-secondary px-4 text-sm font-medium text-secondary-foreground transition-[background-color,transform] duration-sofya ease-sofya hover:bg-secondary/85",
5276
5584
  default: "data-[type=default]:border-border data-[type=default]:bg-card data-[type=default]:text-foreground",
5277
- success: "border-success/20 bg-[linear-gradient(135deg,hsl(var(--sofya-success)/0.14)_0%,hsl(var(--sofya-card))_100%)] text-foreground",
5278
- error: "border-destructive/20 bg-[linear-gradient(135deg,hsl(var(--sofya-destructive)/0.14)_0%,hsl(var(--sofya-card))_100%)] text-foreground",
5279
- warning: "border-warning/25 bg-[linear-gradient(135deg,hsl(var(--sofya-warning)/0.18)_0%,hsl(var(--sofya-card))_100%)] text-foreground",
5280
- info: "border-primary/20 bg-[linear-gradient(135deg,hsl(var(--sofya-primary)/0.12)_0%,hsl(var(--sofya-card))_100%)] text-foreground",
5585
+ // Flat semantic surfaces — no decorative gradients.
5586
+ success: "border-[color:var(--sofya-tone-success-border)] bg-[color:var(--sofya-tone-success-background)] text-foreground",
5587
+ error: "border-[color:var(--sofya-tone-destructive-border)] bg-[color:var(--sofya-tone-destructive-background)] text-foreground",
5588
+ warning: "border-[color:var(--sofya-tone-warning-border)] bg-[color:var(--sofya-tone-warning-background)] text-foreground",
5589
+ info: "border-[color:var(--sofya-tone-info-border)] bg-[color:var(--sofya-tone-info-background)] text-foreground",
5281
5590
  loading: "border-border bg-card text-foreground"
5282
5591
  };
5283
5592
  var defaultToastIcons = {
5284
- success: /* @__PURE__ */ jsx37(
5593
+ success: /* @__PURE__ */ jsx41(
5285
5594
  ToastStatusIcon,
5286
5595
  {
5287
5596
  iconName: "check",
5288
5597
  className: "border-success/15 bg-success/12 text-success"
5289
5598
  }
5290
5599
  ),
5291
- error: /* @__PURE__ */ jsx37(
5600
+ error: /* @__PURE__ */ jsx41(
5292
5601
  ToastStatusIcon,
5293
5602
  {
5294
5603
  iconName: "x",
5295
5604
  className: "border-destructive/15 bg-destructive/12 text-destructive"
5296
5605
  }
5297
5606
  ),
5298
- warning: /* @__PURE__ */ jsx37(
5607
+ warning: /* @__PURE__ */ jsx41(
5299
5608
  ToastStatusIcon,
5300
5609
  {
5301
5610
  iconName: "question",
5302
5611
  className: "border-warning/20 bg-warning/15 text-foreground"
5303
5612
  }
5304
5613
  ),
5305
- info: /* @__PURE__ */ jsx37(
5614
+ info: /* @__PURE__ */ jsx41(
5306
5615
  ToastStatusIcon,
5307
5616
  {
5308
5617
  iconName: "question",
5309
5618
  className: "border-primary/15 bg-primary/10 text-primary"
5310
5619
  }
5311
5620
  ),
5312
- close: /* @__PURE__ */ jsx37(Icon, { name: "x", size: 12 })
5621
+ close: /* @__PURE__ */ jsx41(Icon, { name: "x", size: 12 })
5313
5622
  };
5314
5623
  function mergeToastClassNames(overrides) {
5315
5624
  return {
@@ -5317,7 +5626,7 @@ function mergeToastClassNames(overrides) {
5317
5626
  ...overrides
5318
5627
  };
5319
5628
  }
5320
- var Toaster = React35.forwardRef(
5629
+ var Toaster = React39.forwardRef(
5321
5630
  function Toaster2({
5322
5631
  className,
5323
5632
  closeButton = true,
@@ -5329,7 +5638,7 @@ var Toaster = React35.forwardRef(
5329
5638
  visibleToasts = 5,
5330
5639
  ...props
5331
5640
  }, ref) {
5332
- return /* @__PURE__ */ jsx37(
5641
+ return /* @__PURE__ */ jsx41(
5333
5642
  SonnerToaster,
5334
5643
  {
5335
5644
  ref,
@@ -5357,11 +5666,257 @@ var Toaster = React35.forwardRef(
5357
5666
  }
5358
5667
  );
5359
5668
  Toaster.displayName = "Toaster";
5669
+ function resolveToastId(message, options) {
5670
+ if (options?.id !== void 0) {
5671
+ return options.id;
5672
+ }
5673
+ if (options?.key !== void 0) {
5674
+ return `sofya-toast:${options.key}`;
5675
+ }
5676
+ if (typeof message === "string" || typeof message === "number") {
5677
+ return `sofya-toast:${String(message)}`;
5678
+ }
5679
+ return void 0;
5680
+ }
5681
+ function withDedupId(message, options) {
5682
+ const { key: _key, ...rest } = options ?? {};
5683
+ return { ...rest, id: resolveToastId(message, options) };
5684
+ }
5685
+ var notify = ((message, options) => toast(message, withDedupId(message, options)));
5686
+ notify.success = (message, options) => toast.success(message, withDedupId(message, options));
5687
+ notify.error = (message, options) => toast.error(message, withDedupId(message, options));
5688
+ notify.warning = (message, options) => toast.warning(message, withDedupId(message, options));
5689
+ notify.info = (message, options) => toast.info(message, withDedupId(message, options));
5690
+ notify.message = (message, options) => toast.message(message, withDedupId(message, options));
5691
+ notify.loading = (message, options) => toast.loading(message, withDedupId(message, options));
5692
+ notify.dismiss = toast.dismiss;
5693
+ notify.promise = toast.promise;
5694
+
5695
+ // src/components/status-indicator.tsx
5696
+ import * as React41 from "react";
5697
+
5698
+ // src/components/tooltip.tsx
5699
+ import * as React40 from "react";
5700
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
5701
+ import { Fragment as Fragment4, jsx as jsx42, jsxs as jsxs20 } from "react/jsx-runtime";
5702
+ var TooltipProvider = TooltipPrimitive.Provider;
5703
+ var Tooltip = TooltipPrimitive.Root;
5704
+ var TooltipTrigger = TooltipPrimitive.Trigger;
5705
+ var tooltipToneOptions = [
5706
+ "default",
5707
+ "info",
5708
+ "success",
5709
+ "warning",
5710
+ "destructive"
5711
+ ];
5712
+ var tooltipToneClassNames = {
5713
+ default: "border-transparent bg-[color:var(--sofya-tooltip-background)] text-[color:var(--sofya-tooltip-foreground)]",
5714
+ info: "border-[color:var(--sofya-tone-info-border)] bg-[color:var(--sofya-tone-info-background)] text-[color:var(--sofya-tone-info-foreground)]",
5715
+ success: "border-[color:var(--sofya-tone-success-border)] bg-[color:var(--sofya-tone-success-background)] text-[color:var(--sofya-tone-success-foreground)]",
5716
+ warning: "border-[color:var(--sofya-tone-warning-border)] bg-[color:var(--sofya-tone-warning-background)] text-[color:var(--sofya-tone-warning-foreground)]",
5717
+ destructive: "border-[color:var(--sofya-tone-destructive-border)] bg-[color:var(--sofya-tone-destructive-background)] text-[color:var(--sofya-tone-destructive-foreground)]"
5718
+ };
5719
+ var TooltipContent = React40.forwardRef(function TooltipContent2({ className, sideOffset = 8, align = "center", tone = "default", ...props }, ref) {
5720
+ return /* @__PURE__ */ jsx42(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx42(
5721
+ TooltipPrimitive.Content,
5722
+ {
5723
+ ref,
5724
+ sideOffset,
5725
+ align,
5726
+ "data-tone": tone,
5727
+ className: cn(
5728
+ "sofya-tooltip-content z-[60] max-w-[260px] overflow-hidden rounded-[12px] border px-4 py-2 shadow-[var(--sofya-shadow-tooltip)]",
5729
+ tooltipToneClassNames[tone],
5730
+ className
5731
+ ),
5732
+ ...props,
5733
+ children: renderTextContent(props.children, {
5734
+ as: "span",
5735
+ className: "block",
5736
+ size: "tiny",
5737
+ style: {
5738
+ color: "currentColor",
5739
+ fontWeight: 500
5740
+ }
5741
+ })
5742
+ }
5743
+ ) });
5744
+ });
5745
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
5746
+ var StatusTooltip = React40.forwardRef(function StatusTooltip2({
5747
+ children,
5748
+ label,
5749
+ status = "default",
5750
+ side = "right",
5751
+ align = "center",
5752
+ sideOffset = 10,
5753
+ disabled = false,
5754
+ open,
5755
+ defaultOpen,
5756
+ onOpenChange,
5757
+ delayDuration = 120,
5758
+ className
5759
+ }, ref) {
5760
+ if (disabled) {
5761
+ return /* @__PURE__ */ jsx42(Fragment4, { children });
5762
+ }
5763
+ return /* @__PURE__ */ jsx42(TooltipProvider, { delayDuration, children: /* @__PURE__ */ jsxs20(Tooltip, { open, defaultOpen, onOpenChange, children: [
5764
+ /* @__PURE__ */ jsx42(TooltipTrigger, { asChild: true, children }),
5765
+ /* @__PURE__ */ jsx42(
5766
+ TooltipContent,
5767
+ {
5768
+ ref,
5769
+ side,
5770
+ align,
5771
+ sideOffset,
5772
+ tone: status,
5773
+ "data-status": status,
5774
+ className,
5775
+ children: label
5776
+ }
5777
+ )
5778
+ ] }) });
5779
+ });
5780
+ StatusTooltip.displayName = "StatusTooltip";
5781
+
5782
+ // src/components/status-indicator.tsx
5783
+ import { jsx as jsx43, jsxs as jsxs21 } from "react/jsx-runtime";
5784
+ var workflowStatusOptions = [
5785
+ "draft",
5786
+ "in_progress",
5787
+ "completed",
5788
+ "cancelled",
5789
+ "error",
5790
+ "warning"
5791
+ ];
5792
+ var workflowStatusDescriptors = {
5793
+ draft: { tone: "default", label: "Rascunho" },
5794
+ in_progress: { tone: "info", label: "Em curso" },
5795
+ completed: { tone: "success", label: "Finalizada" },
5796
+ cancelled: { tone: "default", label: "Cancelada" },
5797
+ error: { tone: "destructive", label: "Erro" },
5798
+ warning: { tone: "warning", label: "Aten\xE7\xE3o" }
5799
+ };
5800
+ var workflowStatusAliases = {
5801
+ draft: "draft",
5802
+ rascunho: "draft",
5803
+ in_progress: "in_progress",
5804
+ "in-progress": "in_progress",
5805
+ inprogress: "in_progress",
5806
+ em_curso: "in_progress",
5807
+ "em-curso": "in_progress",
5808
+ em_andamento: "in_progress",
5809
+ completed: "completed",
5810
+ complete: "completed",
5811
+ done: "completed",
5812
+ finalizada: "completed",
5813
+ finalizado: "completed",
5814
+ concluida: "completed",
5815
+ cancelled: "cancelled",
5816
+ canceled: "cancelled",
5817
+ cancelada: "cancelled",
5818
+ cancelado: "cancelled",
5819
+ error: "error",
5820
+ errored: "error",
5821
+ failed: "error",
5822
+ erro: "error",
5823
+ falha: "error",
5824
+ warning: "warning",
5825
+ warn: "warning",
5826
+ atencao: "warning",
5827
+ aviso: "warning"
5828
+ };
5829
+ function humanize(value) {
5830
+ const text = value.replace(/[_-]+/g, " ").trim();
5831
+ return text ? text.charAt(0).toUpperCase() + text.slice(1) : value;
5832
+ }
5833
+ function resolveWorkflowStatus(status, options) {
5834
+ const normalized = String(status).trim().toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g, "");
5835
+ const canonical = workflowStatusAliases[normalized];
5836
+ if (canonical) {
5837
+ const descriptor = workflowStatusDescriptors[canonical];
5838
+ return {
5839
+ status: canonical,
5840
+ tone: descriptor.tone,
5841
+ label: options?.label ?? descriptor.label
5842
+ };
5843
+ }
5844
+ return {
5845
+ status: null,
5846
+ tone: "default",
5847
+ label: options?.label ?? humanize(String(status))
5848
+ };
5849
+ }
5850
+ var toneDotClassName = {
5851
+ default: "bg-[color:var(--sofya-text-subtle)]",
5852
+ info: "bg-[color:var(--sofya-tone-info-foreground)]",
5853
+ success: "bg-[color:var(--sofya-tone-success-foreground)]",
5854
+ warning: "bg-[color:var(--sofya-tone-warning-foreground)]",
5855
+ destructive: "bg-[color:var(--sofya-tone-destructive-foreground)]"
5856
+ };
5857
+ var toneTextClassName = {
5858
+ default: "text-[color:var(--sofya-text-soft)]",
5859
+ info: "text-[color:var(--sofya-tone-info-foreground)]",
5860
+ success: "text-[color:var(--sofya-tone-success-foreground)]",
5861
+ warning: "text-[color:var(--sofya-tone-warning-foreground)]",
5862
+ destructive: "text-[color:var(--sofya-tone-destructive-foreground)]"
5863
+ };
5864
+ var StatusIndicator = React41.forwardRef(
5865
+ function StatusIndicator2({
5866
+ className,
5867
+ label,
5868
+ showLabel = false,
5869
+ side = "right",
5870
+ status,
5871
+ tooltip = true,
5872
+ ...props
5873
+ }, ref) {
5874
+ const resolved = resolveWorkflowStatus(status, { label });
5875
+ const indicator = /* @__PURE__ */ jsxs21(
5876
+ "span",
5877
+ {
5878
+ ref,
5879
+ role: "img",
5880
+ "aria-label": resolved.label,
5881
+ "data-slot": "status-indicator",
5882
+ "data-status": resolved.status ?? "unknown",
5883
+ "data-tone": resolved.tone,
5884
+ className: cn(
5885
+ "inline-flex items-center gap-[var(--sofya-space-2)]",
5886
+ className
5887
+ ),
5888
+ ...props,
5889
+ children: [
5890
+ /* @__PURE__ */ jsx43(
5891
+ "span",
5892
+ {
5893
+ "aria-hidden": "true",
5894
+ className: cn(
5895
+ "h-2 w-2 shrink-0 rounded-full",
5896
+ toneDotClassName[resolved.tone]
5897
+ )
5898
+ }
5899
+ ),
5900
+ showLabel ? renderTextContent(resolved.label, {
5901
+ as: "span",
5902
+ className: cn("text-inherit", toneTextClassName[resolved.tone]),
5903
+ size: "sidebar-body"
5904
+ }) : null
5905
+ ]
5906
+ }
5907
+ );
5908
+ if (!tooltip) {
5909
+ return indicator;
5910
+ }
5911
+ return /* @__PURE__ */ jsx43(StatusTooltip, { status: resolved.tone, label: resolved.label, side, children: indicator });
5912
+ }
5913
+ );
5914
+ StatusIndicator.displayName = "StatusIndicator";
5360
5915
 
5361
5916
  // src/components/switch.tsx
5362
- import * as React36 from "react";
5917
+ import * as React42 from "react";
5363
5918
  import * as SwitchPrimitives from "@radix-ui/react-switch";
5364
- import { jsx as jsx38, jsxs as jsxs19 } from "react/jsx-runtime";
5919
+ import { jsx as jsx44, jsxs as jsxs22 } from "react/jsx-runtime";
5365
5920
  var switchSizeOptions = ["default", "sm"];
5366
5921
  var switchRootSizeClasses = {
5367
5922
  default: "h-6 w-11",
@@ -5371,7 +5926,7 @@ var switchThumbSizeClasses = {
5371
5926
  default: "h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
5372
5927
  sm: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
5373
5928
  };
5374
- var Switch = React36.forwardRef(
5929
+ var Switch = React42.forwardRef(
5375
5930
  ({
5376
5931
  "aria-describedby": ariaDescribedBy,
5377
5932
  "aria-labelledby": ariaLabelledBy,
@@ -5386,7 +5941,7 @@ var Switch = React36.forwardRef(
5386
5941
  size,
5387
5942
  ...props
5388
5943
  }, ref) => {
5389
- const generatedId = React36.useId();
5944
+ const generatedId = React42.useId();
5390
5945
  const resolvedId = id ?? generatedId;
5391
5946
  const labelId = label ? `${resolvedId}-label` : void 0;
5392
5947
  const descriptionId = description ? `${resolvedId}-description` : void 0;
@@ -5395,7 +5950,7 @@ var Switch = React36.forwardRef(
5395
5950
  const alignClassName2 = description ? "items-start" : "items-center";
5396
5951
  const resolvedAriaDescribedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ") || void 0;
5397
5952
  const resolvedAriaLabelledBy = ariaLabelledBy ?? labelId;
5398
- const switchControl = /* @__PURE__ */ jsx38(
5953
+ const switchControl = /* @__PURE__ */ jsx44(
5399
5954
  SwitchPrimitives.Root,
5400
5955
  {
5401
5956
  id: resolvedId,
@@ -5410,7 +5965,7 @@ var Switch = React36.forwardRef(
5410
5965
  "data-size": resolvedSize,
5411
5966
  ...props,
5412
5967
  ref,
5413
- children: /* @__PURE__ */ jsx38(
5968
+ children: /* @__PURE__ */ jsx44(
5414
5969
  SwitchPrimitives.Thumb,
5415
5970
  {
5416
5971
  className: cn(
@@ -5424,7 +5979,7 @@ var Switch = React36.forwardRef(
5424
5979
  if (!hasTextContent) {
5425
5980
  return switchControl;
5426
5981
  }
5427
- return /* @__PURE__ */ jsxs19(
5982
+ return /* @__PURE__ */ jsxs22(
5428
5983
  "div",
5429
5984
  {
5430
5985
  "data-slot": "switch-container",
@@ -5435,8 +5990,8 @@ var Switch = React36.forwardRef(
5435
5990
  }),
5436
5991
  children: [
5437
5992
  switchControl,
5438
- /* @__PURE__ */ jsxs19("span", { className: selectionControlContentBaseClasses, children: [
5439
- label ? /* @__PURE__ */ jsx38("label", { htmlFor: resolvedId, className: selectionControlLabelTextBaseClasses, children: /* @__PURE__ */ jsx38(
5993
+ /* @__PURE__ */ jsxs22("span", { className: selectionControlContentBaseClasses, children: [
5994
+ label ? /* @__PURE__ */ jsx44("label", { htmlFor: resolvedId, className: selectionControlLabelTextBaseClasses, children: /* @__PURE__ */ jsx44(
5440
5995
  "span",
5441
5996
  {
5442
5997
  id: labelId,
@@ -5451,7 +6006,7 @@ var Switch = React36.forwardRef(
5451
6006
  })
5452
6007
  }
5453
6008
  ) }) : null,
5454
- description ? /* @__PURE__ */ jsx38(
6009
+ description ? /* @__PURE__ */ jsx44(
5455
6010
  "span",
5456
6011
  {
5457
6012
  id: descriptionId,
@@ -5476,8 +6031,8 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
5476
6031
 
5477
6032
  // src/components/table.tsx
5478
6033
  import { cva as cva8 } from "class-variance-authority";
5479
- import * as React37 from "react";
5480
- import { jsx as jsx39 } from "react/jsx-runtime";
6034
+ import * as React43 from "react";
6035
+ import { jsx as jsx45 } from "react/jsx-runtime";
5481
6036
  var tableDensityOptions = ["default", "compact"];
5482
6037
  var tableCellVariantOptions = ["default", "primary", "muted"];
5483
6038
  var tableStatusToneOptions = [
@@ -5487,9 +6042,10 @@ var tableStatusToneOptions = [
5487
6042
  "warning"
5488
6043
  ];
5489
6044
  var tableActionToneOptions = ["primary", "neutral", "danger"];
5490
- var TableDensityContext = React37.createContext("default");
6045
+ var TableDensityContext = React43.createContext("default");
6046
+ var TableHeaderDensityContext = React43.createContext("default");
5491
6047
  function useTableDensity(density) {
5492
- const inheritedDensity = React37.useContext(TableDensityContext);
6048
+ const inheritedDensity = React43.useContext(TableDensityContext);
5493
6049
  return density ?? inheritedDensity;
5494
6050
  }
5495
6051
  var tableCellVariants = cva8(
@@ -5545,13 +6101,13 @@ var tableActionButtonVariants = cva8(
5545
6101
  }
5546
6102
  }
5547
6103
  );
5548
- var Table = React37.forwardRef(function Table2({ className, density = "default", ...props }, ref) {
5549
- return /* @__PURE__ */ jsx39(TableDensityContext.Provider, { value: density, children: /* @__PURE__ */ jsx39(
6104
+ var Table = React43.forwardRef(function Table2({ className, density = "default", ...props }, ref) {
6105
+ return /* @__PURE__ */ jsx45(TableDensityContext.Provider, { value: density, children: /* @__PURE__ */ jsx45(
5550
6106
  "div",
5551
6107
  {
5552
6108
  "data-slot": "table-container",
5553
6109
  className: "relative w-full overflow-x-auto",
5554
- children: /* @__PURE__ */ jsx39(
6110
+ children: /* @__PURE__ */ jsx45(
5555
6111
  "table",
5556
6112
  {
5557
6113
  "data-density": density,
@@ -5567,22 +6123,25 @@ var Table = React37.forwardRef(function Table2({ className, density = "default",
5567
6123
  }
5568
6124
  ) });
5569
6125
  });
5570
- var TableHeader = React37.forwardRef(function TableHeader2({ className, ...props }, ref) {
5571
- return /* @__PURE__ */ jsx39(TableDensityContext.Provider, { value: "default", children: /* @__PURE__ */ jsx39(
6126
+ var TableHeader = React43.forwardRef(function TableHeader2({ className, density, ...props }, ref) {
6127
+ const tableDensity = useTableDensity();
6128
+ const headerDensity = density ?? tableDensity;
6129
+ return /* @__PURE__ */ jsx45(TableHeaderDensityContext.Provider, { value: headerDensity, children: /* @__PURE__ */ jsx45(TableDensityContext.Provider, { value: "default", children: /* @__PURE__ */ jsx45(
5572
6130
  "thead",
5573
6131
  {
5574
6132
  "data-slot": "table-header",
6133
+ "data-header-density": headerDensity,
5575
6134
  ref,
5576
6135
  className: cn(
5577
- "[&_tr]:border-0 [&_tr:hover]:bg-transparent [&_th]:bg-[color:var(--sofya-tone-default-background)] [&_th:first-child]:rounded-tl-[var(--sofya-radius-md)] [&_th:last-child]:rounded-tr-[var(--sofya-radius-md)]",
6136
+ "[&_tr]:border-0 [&_tr:hover]:bg-transparent [&_th]:bg-background [&_th:first-child]:rounded-tl-[var(--sofya-radius-md)] [&_th:last-child]:rounded-tr-[var(--sofya-radius-md)]",
5578
6137
  className
5579
6138
  ),
5580
6139
  ...props
5581
6140
  }
5582
- ) });
6141
+ ) }) });
5583
6142
  });
5584
- var TableBody = React37.forwardRef(function TableBody2({ className, ...props }, ref) {
5585
- return /* @__PURE__ */ jsx39(
6143
+ var TableBody = React43.forwardRef(function TableBody2({ className, ...props }, ref) {
6144
+ return /* @__PURE__ */ jsx45(
5586
6145
  "tbody",
5587
6146
  {
5588
6147
  "data-slot": "table-body",
@@ -5592,24 +6151,24 @@ var TableBody = React37.forwardRef(function TableBody2({ className, ...props },
5592
6151
  }
5593
6152
  );
5594
6153
  });
5595
- var TableFooter = React37.forwardRef(function TableFooter2({ className, ...props }, ref) {
5596
- return /* @__PURE__ */ jsx39(
6154
+ var TableFooter = React43.forwardRef(function TableFooter2({ className, ...props }, ref) {
6155
+ return /* @__PURE__ */ jsx45(
5597
6156
  "tfoot",
5598
6157
  {
5599
6158
  "data-slot": "table-footer",
5600
6159
  ref,
5601
6160
  className: cn(
5602
- "border-t border-[color:var(--sofya-border-strong)] bg-[color:var(--sofya-tone-default-background)] font-medium [&>tr:last-child]:border-0",
6161
+ "border-t border-[color:var(--sofya-border-strong)] bg-background font-medium [&>tr:last-child]:border-0",
5603
6162
  className
5604
6163
  ),
5605
6164
  ...props
5606
6165
  }
5607
6166
  );
5608
6167
  });
5609
- var TableRow = React37.forwardRef(
6168
+ var TableRow = React43.forwardRef(
5610
6169
  function TableRow2({ className, density, ...props }, ref) {
5611
6170
  const resolvedDensity = useTableDensity(density);
5612
- return /* @__PURE__ */ jsx39(TableDensityContext.Provider, { value: resolvedDensity, children: /* @__PURE__ */ jsx39(
6171
+ return /* @__PURE__ */ jsx45(TableDensityContext.Provider, { value: resolvedDensity, children: /* @__PURE__ */ jsx45(
5613
6172
  "tr",
5614
6173
  {
5615
6174
  "data-density": resolvedDensity,
@@ -5625,14 +6184,17 @@ var TableRow = React37.forwardRef(
5625
6184
  ) });
5626
6185
  }
5627
6186
  );
5628
- var TableHead = React37.forwardRef(function TableHead2({ className, children, ...props }, ref) {
5629
- return /* @__PURE__ */ jsx39(
6187
+ var TableHead = React43.forwardRef(function TableHead2({ className, children, ...props }, ref) {
6188
+ const headerDensity = React43.useContext(TableHeaderDensityContext);
6189
+ return /* @__PURE__ */ jsx45(
5630
6190
  "th",
5631
6191
  {
5632
6192
  "data-slot": "table-head",
6193
+ "data-density": headerDensity,
5633
6194
  ref,
5634
6195
  className: cn(
5635
- "whitespace-nowrap px-4 py-4 text-left align-middle [font-family:var(--sofya-text-tiny-font-family)] text-[length:var(--sofya-text-tiny-font-size)] font-medium uppercase leading-4 tracking-[0.08em] text-[color:var(--sofya-text-default)] [&_svg]:h-[1em] [&_svg]:w-[1em] [&_svg]:shrink-0",
6196
+ "whitespace-nowrap px-4 text-left align-middle [font-family:var(--sofya-text-tiny-font-family)] text-[length:var(--sofya-text-tiny-font-size)] font-medium uppercase leading-4 tracking-[0.08em] text-[color:var(--sofya-text-default)] [&_svg]:h-[1em] [&_svg]:w-[1em] [&_svg]:shrink-0",
6197
+ headerDensity === "compact" ? "py-2.5" : "py-4",
5636
6198
  className
5637
6199
  ),
5638
6200
  ...props,
@@ -5645,10 +6207,10 @@ var TableHead = React37.forwardRef(function TableHead2({ className, children, ..
5645
6207
  }
5646
6208
  );
5647
6209
  });
5648
- var TableCell = React37.forwardRef(
6210
+ var TableCell = React43.forwardRef(
5649
6211
  function TableCell2({ className, density, variant, truncate, children, ...props }, ref) {
5650
6212
  const resolvedDensity = useTableDensity(density);
5651
- return /* @__PURE__ */ jsx39(
6213
+ return /* @__PURE__ */ jsx45(
5652
6214
  "td",
5653
6215
  {
5654
6216
  "data-density": resolvedDensity,
@@ -5673,8 +6235,8 @@ var TableCell = React37.forwardRef(
5673
6235
  );
5674
6236
  }
5675
6237
  );
5676
- var TableCaption = React37.forwardRef(function TableCaption2({ className, children, ...props }, ref) {
5677
- return /* @__PURE__ */ jsx39(
6238
+ var TableCaption = React43.forwardRef(function TableCaption2({ className, children, ...props }, ref) {
6239
+ return /* @__PURE__ */ jsx45(
5678
6240
  "caption",
5679
6241
  {
5680
6242
  "data-slot": "table-caption",
@@ -5693,12 +6255,12 @@ var TableCaption = React37.forwardRef(function TableCaption2({ className, childr
5693
6255
  }
5694
6256
  );
5695
6257
  });
5696
- var TableCellTitle = React37.forwardRef(
6258
+ var TableCellTitle = React43.forwardRef(
5697
6259
  function TableCellTitle2({ className, children, size, ...props }, ref) {
5698
6260
  const density = useTableDensity();
5699
6261
  const resolvedSize = size ?? (density === "compact" ? "compact" : "default");
5700
6262
  const textSize = resolvedSize === "compact" ? "label-md" : "body";
5701
- return /* @__PURE__ */ jsx39(
6263
+ return /* @__PURE__ */ jsx45(
5702
6264
  "span",
5703
6265
  {
5704
6266
  "data-slot": "table-cell-title",
@@ -5718,11 +6280,11 @@ var TableCellTitle = React37.forwardRef(
5718
6280
  );
5719
6281
  }
5720
6282
  );
5721
- var TableCellDescription = React37.forwardRef(function TableCellDescription2({ className, children, size, ...props }, ref) {
6283
+ var TableCellDescription = React43.forwardRef(function TableCellDescription2({ className, children, size, ...props }, ref) {
5722
6284
  const density = useTableDensity();
5723
6285
  const resolvedSize = size ?? (density === "compact" ? "compact" : "default");
5724
6286
  const textSize = resolvedSize === "compact" ? "body-sm" : "tiny";
5725
- return /* @__PURE__ */ jsx39(
6287
+ return /* @__PURE__ */ jsx45(
5726
6288
  "span",
5727
6289
  {
5728
6290
  "data-slot": "table-cell-description",
@@ -5750,7 +6312,7 @@ function TableStatusBadge({
5750
6312
  ...props
5751
6313
  }) {
5752
6314
  const resolvedDensity = useTableDensity(density);
5753
- return /* @__PURE__ */ jsx39(
6315
+ return /* @__PURE__ */ jsx45(
5754
6316
  Badge,
5755
6317
  {
5756
6318
  "data-density": resolvedDensity,
@@ -5769,8 +6331,8 @@ function TableStatusBadge({
5769
6331
  }
5770
6332
  );
5771
6333
  }
5772
- var TableActionButton = React37.forwardRef(function TableActionButton2({ className, tone, type = "button", children, ...props }, ref) {
5773
- return /* @__PURE__ */ jsx39(
6334
+ var TableActionButton = React43.forwardRef(function TableActionButton2({ className, tone, type = "button", children, ...props }, ref) {
6335
+ return /* @__PURE__ */ jsx45(
5774
6336
  Button,
5775
6337
  {
5776
6338
  ref,
@@ -5788,12 +6350,15 @@ var TableActionButton = React37.forwardRef(function TableActionButton2({ classNa
5788
6350
  }
5789
6351
  );
5790
6352
  });
5791
- var TableActions = React37.forwardRef(function TableActions2({ className, ...props }, ref) {
5792
- return /* @__PURE__ */ jsx39(
6353
+ var TableActions = React43.forwardRef(function TableActions2({ className, ...props }, ref) {
6354
+ return /* @__PURE__ */ jsx45(
5793
6355
  "div",
5794
6356
  {
5795
6357
  ref,
5796
- className: cn("flex items-center gap-[0.2rem]", className),
6358
+ className: cn(
6359
+ "flex shrink-0 items-center justify-end gap-[0.2rem] whitespace-nowrap",
6360
+ className
6361
+ ),
5797
6362
  ...props
5798
6363
  }
5799
6364
  );
@@ -5811,11 +6376,212 @@ TableCellDescription.displayName = "TableCellDescription";
5811
6376
  TableActionButton.displayName = "TableActionButton";
5812
6377
  TableActions.displayName = "TableActions";
5813
6378
 
6379
+ // src/components/tag.tsx
6380
+ import { cva as cva9 } from "class-variance-authority";
6381
+ import * as React44 from "react";
6382
+ import { jsx as jsx46, jsxs as jsxs23 } from "react/jsx-runtime";
6383
+ var tagVariantOptions = [
6384
+ "neutral",
6385
+ "organization",
6386
+ "privacy",
6387
+ "status"
6388
+ ];
6389
+ var tagStatusToneOptions = [
6390
+ "info",
6391
+ "success",
6392
+ "warning",
6393
+ "destructive"
6394
+ ];
6395
+ var tagVariants = cva9(
6396
+ "inline-flex max-w-full items-center gap-[var(--sofya-space-1)] rounded-full border px-[var(--sofya-space-2-5)] py-[var(--sofya-space-0-5)] [font-family:var(--sofya-text-sidebar-tag-font-family)] text-[length:var(--sofya-text-sidebar-tag-font-size)] [font-weight:var(--sofya-text-sidebar-tag-font-weight)] leading-[var(--sofya-text-sidebar-tag-line-height)] tracking-[var(--sofya-text-sidebar-tag-letter-spacing)] [&_svg]:h-[1em] [&_svg]:w-[1em] [&_svg]:shrink-0",
6397
+ {
6398
+ variants: {
6399
+ variant: {
6400
+ neutral: "border-[color:var(--sofya-tone-default-border)] bg-[color:var(--sofya-tone-default-background)] text-[color:var(--sofya-tone-default-foreground)]",
6401
+ organization: "border-[color:var(--sofya-tone-info-border)] bg-[color:var(--sofya-tone-info-background)] text-[color:var(--sofya-tone-info-foreground)]",
6402
+ privacy: "border-transparent bg-[color:var(--sofya-surface-muted)] text-[color:var(--sofya-text-subtle)]",
6403
+ status: ""
6404
+ }
6405
+ },
6406
+ defaultVariants: {
6407
+ variant: "neutral"
6408
+ }
6409
+ }
6410
+ );
6411
+ var tagStatusToneClasses = {
6412
+ info: "border-[color:var(--sofya-tone-info-border)] bg-[color:var(--sofya-tone-info-background)] text-[color:var(--sofya-tone-info-foreground)]",
6413
+ success: "border-[color:var(--sofya-tone-success-border)] bg-[color:var(--sofya-tone-success-background)] text-[color:var(--sofya-tone-success-foreground)]",
6414
+ warning: "border-[color:var(--sofya-tone-warning-border)] bg-[color:var(--sofya-tone-warning-background)] text-[color:var(--sofya-tone-warning-foreground)]",
6415
+ destructive: "border-[color:var(--sofya-tone-destructive-border)] bg-[color:var(--sofya-tone-destructive-background)] text-[color:var(--sofya-tone-destructive-foreground)]"
6416
+ };
6417
+ var Tag = React44.forwardRef(function Tag2({ children, className, icon, tone = "info", truncate = false, variant, ...props }, ref) {
6418
+ const resolvedVariant = variant ?? "neutral";
6419
+ return /* @__PURE__ */ jsxs23(
6420
+ "span",
6421
+ {
6422
+ ref,
6423
+ "data-slot": "tag",
6424
+ "data-variant": resolvedVariant,
6425
+ className: cn(
6426
+ tagVariants({ variant: resolvedVariant }),
6427
+ resolvedVariant === "status" && tagStatusToneClasses[tone],
6428
+ truncate ? "min-w-0" : "whitespace-nowrap",
6429
+ className
6430
+ ),
6431
+ ...props,
6432
+ children: [
6433
+ icon ? /* @__PURE__ */ jsx46("span", { className: "inline-flex shrink-0 items-center justify-center", children: icon }) : null,
6434
+ renderTextContent(children, {
6435
+ as: "span",
6436
+ className: cn("text-inherit", truncate && "min-w-0 truncate"),
6437
+ size: "sidebar-tag"
6438
+ })
6439
+ ]
6440
+ }
6441
+ );
6442
+ });
6443
+ Tag.displayName = "Tag";
6444
+ var privacyLevelOptions = [
6445
+ "private",
6446
+ "organization",
6447
+ "public"
6448
+ ];
6449
+ var privacyDefaultLabels = {
6450
+ private: "Privado",
6451
+ organization: "Minha organiza\xE7\xE3o",
6452
+ public: "P\xFAblico"
6453
+ };
6454
+ var PrivacyLabel = React44.forwardRef(
6455
+ function PrivacyLabel2({ appearance = "text", className, icon, label, privacy, ...props }, ref) {
6456
+ const content = label ?? privacyDefaultLabels[privacy];
6457
+ if (appearance === "tag") {
6458
+ return /* @__PURE__ */ jsx46(
6459
+ Tag,
6460
+ {
6461
+ ref,
6462
+ variant: privacy === "organization" ? "organization" : "privacy",
6463
+ icon,
6464
+ "data-privacy": privacy,
6465
+ className,
6466
+ ...props,
6467
+ children: content
6468
+ }
6469
+ );
6470
+ }
6471
+ return /* @__PURE__ */ jsxs23(
6472
+ "span",
6473
+ {
6474
+ ref,
6475
+ "data-slot": "privacy-label",
6476
+ "data-privacy": privacy,
6477
+ className: cn(
6478
+ "inline-flex items-center gap-[var(--sofya-space-1)] text-[color:var(--sofya-text-soft)] [&_svg]:h-[1em] [&_svg]:w-[1em] [&_svg]:shrink-0",
6479
+ className
6480
+ ),
6481
+ ...props,
6482
+ children: [
6483
+ icon ? /* @__PURE__ */ jsx46("span", { className: "inline-flex shrink-0 items-center justify-center", children: icon }) : null,
6484
+ renderTextContent(content, {
6485
+ as: "span",
6486
+ className: "text-inherit",
6487
+ size: "sidebar-body"
6488
+ })
6489
+ ]
6490
+ }
6491
+ );
6492
+ }
6493
+ );
6494
+ PrivacyLabel.displayName = "PrivacyLabel";
6495
+
6496
+ // src/components/template-card.tsx
6497
+ import * as React45 from "react";
6498
+ import { Fragment as Fragment5, jsx as jsx47, jsxs as jsxs24 } from "react/jsx-runtime";
6499
+ var templateCardLayoutOptions = ["card", "list"];
6500
+ var TemplateCard = React45.forwardRef(
6501
+ function TemplateCard2({
6502
+ className,
6503
+ description,
6504
+ favoriteLabel = "Favoritar",
6505
+ favorited,
6506
+ layout = "card",
6507
+ meta,
6508
+ onToggleFavorite,
6509
+ overflow,
6510
+ selected = false,
6511
+ title,
6512
+ ...props
6513
+ }, ref) {
6514
+ const isList = layout === "list";
6515
+ const descriptionSize = isList ? "caption" : "body-sm";
6516
+ const actions = onToggleFavorite || favorited !== void 0 || overflow ? /* @__PURE__ */ jsxs24("div", { className: "flex shrink-0 items-center gap-[var(--sofya-gap-tight)]", children: [
6517
+ onToggleFavorite || favorited !== void 0 ? /* @__PURE__ */ jsx47(
6518
+ IconButton,
6519
+ {
6520
+ "aria-label": favoriteLabel,
6521
+ selected: Boolean(favorited),
6522
+ onClick: onToggleFavorite,
6523
+ icon: /* @__PURE__ */ jsx47(Icon, { name: "star", size: 18 })
6524
+ }
6525
+ ) : null,
6526
+ overflow
6527
+ ] }) : null;
6528
+ const heading = /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-col gap-[var(--sofya-space-1)]", children: [
6529
+ renderTextContent(title, {
6530
+ as: "span",
6531
+ className: "block min-w-0 truncate font-semibold text-[color:var(--sofya-text-default)]",
6532
+ size: "title-sm"
6533
+ }),
6534
+ description ? renderTextContent(description, {
6535
+ as: "span",
6536
+ className: cn(
6537
+ "block min-w-0 text-[color:var(--sofya-text-soft)]",
6538
+ isList && "truncate"
6539
+ ),
6540
+ size: descriptionSize
6541
+ }) : null
6542
+ ] });
6543
+ return /* @__PURE__ */ jsx47(
6544
+ "div",
6545
+ {
6546
+ ref,
6547
+ "data-slot": "template-card",
6548
+ "data-layout": layout,
6549
+ "data-selected": selected ? "true" : void 0,
6550
+ "data-favorited": favorited ? "true" : void 0,
6551
+ className: cn(
6552
+ "group rounded-[var(--sofya-radius-md)] border border-[color:var(--sofya-border-soft)] bg-card transition-colors duration-sofya ease-sofya",
6553
+ "hover:border-[color:var(--sofya-border-strong)] hover:bg-[color:var(--sofya-surface-hover)]",
6554
+ "data-[selected=true]:border-primary data-[selected=true]:bg-[color:var(--sofya-surface-selected)]",
6555
+ isList ? "flex items-center gap-[var(--sofya-gap-default)] px-[var(--sofya-space-4)] py-[var(--sofya-space-3)]" : "flex flex-col gap-[var(--sofya-space-3)] p-[var(--sofya-space-4)]",
6556
+ className
6557
+ ),
6558
+ ...props,
6559
+ children: isList ? /* @__PURE__ */ jsxs24(Fragment5, { children: [
6560
+ /* @__PURE__ */ jsx47("div", { className: "min-w-0 flex-1", children: heading }),
6561
+ meta ? /* @__PURE__ */ jsx47("div", { className: "flex shrink-0 items-center gap-[var(--sofya-gap-compact)] text-[color:var(--sofya-text-subtle)]", children: meta }) : null,
6562
+ actions
6563
+ ] }) : /* @__PURE__ */ jsxs24(Fragment5, { children: [
6564
+ /* @__PURE__ */ jsxs24("div", { className: "flex items-start justify-between gap-[var(--sofya-gap-compact)]", children: [
6565
+ heading,
6566
+ actions
6567
+ ] }),
6568
+ meta ? /* @__PURE__ */ jsx47("div", { className: "flex flex-wrap items-center gap-[var(--sofya-gap-compact)] text-[color:var(--sofya-text-subtle)]", children: meta }) : null
6569
+ ] })
6570
+ }
6571
+ );
6572
+ }
6573
+ );
6574
+ TemplateCard.displayName = "TemplateCard";
6575
+ var TemplateListItem = React45.forwardRef(function TemplateListItem2(props, ref) {
6576
+ return /* @__PURE__ */ jsx47(TemplateCard, { ref, layout: "list", ...props });
6577
+ });
6578
+ TemplateListItem.displayName = "TemplateListItem";
6579
+
5814
6580
  // src/components/tabs.tsx
5815
- import * as React38 from "react";
6581
+ import * as React46 from "react";
5816
6582
  import * as TabsPrimitive from "@radix-ui/react-tabs";
5817
6583
  import { motion as motion3 } from "motion/react";
5818
- import { jsx as jsx40, jsxs as jsxs20 } from "react/jsx-runtime";
6584
+ import { jsx as jsx48, jsxs as jsxs25 } from "react/jsx-runtime";
5819
6585
  function resolveDefaultValue(items, defaultValue) {
5820
6586
  if (defaultValue) {
5821
6587
  return defaultValue;
@@ -5839,13 +6605,13 @@ function Tabs({
5839
6605
  onChange: onValueChange,
5840
6606
  value
5841
6607
  });
5842
- const indicatorLayoutId = React38.useId();
5843
- React38.useEffect(() => {
6608
+ const indicatorLayoutId = React46.useId();
6609
+ React46.useEffect(() => {
5844
6610
  if (value === void 0) {
5845
6611
  setUncontrolledCurrentValue(resolvedDefaultValue);
5846
6612
  }
5847
6613
  }, [resolvedDefaultValue, setUncontrolledCurrentValue, value]);
5848
- return /* @__PURE__ */ jsxs20(
6614
+ return /* @__PURE__ */ jsxs25(
5849
6615
  TabsPrimitive.Root,
5850
6616
  {
5851
6617
  className: cn("w-full", className),
@@ -5853,7 +6619,7 @@ function Tabs({
5853
6619
  value: currentValue,
5854
6620
  ...props,
5855
6621
  children: [
5856
- /* @__PURE__ */ jsx40(
6622
+ /* @__PURE__ */ jsx48(
5857
6623
  TabsPrimitive.List,
5858
6624
  {
5859
6625
  "aria-label": "Subtelas navegaveis",
@@ -5864,7 +6630,7 @@ function Tabs({
5864
6630
  children: items.map((item) => {
5865
6631
  const isUnavailable = item.disabled || item.loading;
5866
6632
  const isActive = item.value === currentValue;
5867
- return /* @__PURE__ */ jsxs20(
6633
+ return /* @__PURE__ */ jsxs25(
5868
6634
  TabsPrimitive.Trigger,
5869
6635
  {
5870
6636
  value: item.value,
@@ -5876,7 +6642,7 @@ function Tabs({
5876
6642
  item.triggerClassName
5877
6643
  ),
5878
6644
  children: [
5879
- isActive ? /* @__PURE__ */ jsx40(
6645
+ isActive ? /* @__PURE__ */ jsx48(
5880
6646
  motion3.span,
5881
6647
  {
5882
6648
  "aria-hidden": "true",
@@ -5886,15 +6652,15 @@ function Tabs({
5886
6652
  transition: { duration: 0.25, ease: "easeInOut" }
5887
6653
  }
5888
6654
  ) : null,
5889
- /* @__PURE__ */ jsxs20("span", { className: "relative z-10 inline-flex items-center gap-2", children: [
5890
- item.loading ? /* @__PURE__ */ jsx40(
6655
+ /* @__PURE__ */ jsxs25("span", { className: "relative z-10 inline-flex items-center gap-2", children: [
6656
+ item.loading ? /* @__PURE__ */ jsx48(
5891
6657
  "span",
5892
6658
  {
5893
6659
  "aria-hidden": "true",
5894
6660
  className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-r-transparent"
5895
6661
  }
5896
6662
  ) : null,
5897
- /* @__PURE__ */ jsx40("span", { children: renderTextContent(item.label, {
6663
+ /* @__PURE__ */ jsx48("span", { children: renderTextContent(item.label, {
5898
6664
  as: "span",
5899
6665
  className: "block text-inherit",
5900
6666
  size: "body"
@@ -5908,7 +6674,7 @@ function Tabs({
5908
6674
  }
5909
6675
  ),
5910
6676
  items.map(
5911
- (item) => item.content !== void 0 ? /* @__PURE__ */ jsx40(
6677
+ (item) => item.content !== void 0 ? /* @__PURE__ */ jsx48(
5912
6678
  TabsPrimitive.Content,
5913
6679
  {
5914
6680
  value: item.value,
@@ -5931,9 +6697,9 @@ function Tabs({
5931
6697
  Tabs.displayName = "Tabs";
5932
6698
 
5933
6699
  // src/components/textarea.tsx
5934
- import * as React39 from "react";
5935
- import { jsx as jsx41 } from "react/jsx-runtime";
5936
- var Textarea = React39.forwardRef(
6700
+ import * as React47 from "react";
6701
+ import { jsx as jsx49 } from "react/jsx-runtime";
6702
+ var Textarea = React47.forwardRef(
5937
6703
  ({
5938
6704
  className,
5939
6705
  containerClassName,
@@ -5943,10 +6709,10 @@ var Textarea = React39.forwardRef(
5943
6709
  rows = 5,
5944
6710
  ...props
5945
6711
  }, ref) => {
5946
- const generatedId = React39.useId();
6712
+ const generatedId = React47.useId();
5947
6713
  const resolvedId = id ?? generatedId;
5948
6714
  const ariaLabel = props["aria-label"] ?? (typeof label === "string" ? label : void 0);
5949
- const control = /* @__PURE__ */ jsx41(
6715
+ const control = /* @__PURE__ */ jsx49(
5950
6716
  "textarea",
5951
6717
  {
5952
6718
  className: cn(
@@ -5960,7 +6726,7 @@ var Textarea = React39.forwardRef(
5960
6726
  "aria-label": ariaLabel
5961
6727
  }
5962
6728
  );
5963
- return /* @__PURE__ */ jsx41(
6729
+ return /* @__PURE__ */ jsx49(
5964
6730
  FieldShell,
5965
6731
  {
5966
6732
  control,
@@ -5975,10 +6741,10 @@ var Textarea = React39.forwardRef(
5975
6741
  Textarea.displayName = "Textarea";
5976
6742
 
5977
6743
  // src/components/toggle.tsx
5978
- import * as React40 from "react";
6744
+ import * as React48 from "react";
5979
6745
  import * as SwitchPrimitives2 from "@radix-ui/react-switch";
5980
- import { jsx as jsx42, jsxs as jsxs21 } from "react/jsx-runtime";
5981
- var Toggle = React40.forwardRef(function Toggle2({
6746
+ import { jsx as jsx50, jsxs as jsxs26 } from "react/jsx-runtime";
6747
+ var Toggle = React48.forwardRef(function Toggle2({
5982
6748
  "aria-describedby": ariaDescribedBy,
5983
6749
  "aria-labelledby": ariaLabelledBy,
5984
6750
  className,
@@ -5991,7 +6757,7 @@ var Toggle = React40.forwardRef(function Toggle2({
5991
6757
  labelClassName,
5992
6758
  ...props
5993
6759
  }, ref) {
5994
- const generatedId = React40.useId();
6760
+ const generatedId = React48.useId();
5995
6761
  const resolvedId = id ?? generatedId;
5996
6762
  const labelId = label ? `${resolvedId}-label` : void 0;
5997
6763
  const descriptionId = description ? `${resolvedId}-description` : void 0;
@@ -5999,7 +6765,7 @@ var Toggle = React40.forwardRef(function Toggle2({
5999
6765
  const alignClassName2 = description ? "items-start" : "items-center";
6000
6766
  const resolvedAriaDescribedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ") || void 0;
6001
6767
  const resolvedAriaLabelledBy = ariaLabelledBy ?? labelId;
6002
- const toggleControl = /* @__PURE__ */ jsx42(
6768
+ const toggleControl = /* @__PURE__ */ jsx50(
6003
6769
  SwitchPrimitives2.Root,
6004
6770
  {
6005
6771
  id: resolvedId,
@@ -6013,7 +6779,7 @@ var Toggle = React40.forwardRef(function Toggle2({
6013
6779
  className
6014
6780
  ),
6015
6781
  ...props,
6016
- children: /* @__PURE__ */ jsx42(
6782
+ children: /* @__PURE__ */ jsx50(
6017
6783
  SwitchPrimitives2.Thumb,
6018
6784
  {
6019
6785
  "data-slot": "toggle-thumb",
@@ -6025,7 +6791,7 @@ var Toggle = React40.forwardRef(function Toggle2({
6025
6791
  if (!hasTextContent) {
6026
6792
  return toggleControl;
6027
6793
  }
6028
- return /* @__PURE__ */ jsxs21(
6794
+ return /* @__PURE__ */ jsxs26(
6029
6795
  "div",
6030
6796
  {
6031
6797
  "data-slot": "toggle-container",
@@ -6036,8 +6802,8 @@ var Toggle = React40.forwardRef(function Toggle2({
6036
6802
  }),
6037
6803
  children: [
6038
6804
  toggleControl,
6039
- /* @__PURE__ */ jsxs21("span", { className: selectionControlContentBaseClasses, children: [
6040
- label ? /* @__PURE__ */ jsx42("label", { htmlFor: resolvedId, className: selectionControlLabelTextBaseClasses, children: /* @__PURE__ */ jsx42(
6805
+ /* @__PURE__ */ jsxs26("span", { className: selectionControlContentBaseClasses, children: [
6806
+ label ? /* @__PURE__ */ jsx50("label", { htmlFor: resolvedId, className: selectionControlLabelTextBaseClasses, children: /* @__PURE__ */ jsx50(
6041
6807
  "span",
6042
6808
  {
6043
6809
  id: labelId,
@@ -6049,7 +6815,7 @@ var Toggle = React40.forwardRef(function Toggle2({
6049
6815
  })
6050
6816
  }
6051
6817
  ) }) : null,
6052
- description ? /* @__PURE__ */ jsx42(
6818
+ description ? /* @__PURE__ */ jsx50(
6053
6819
  "span",
6054
6820
  {
6055
6821
  id: descriptionId,
@@ -6071,45 +6837,14 @@ var Toggle = React40.forwardRef(function Toggle2({
6071
6837
  });
6072
6838
  Toggle.displayName = "Toggle";
6073
6839
 
6074
- // src/components/tooltip.tsx
6075
- import * as React41 from "react";
6076
- import * as TooltipPrimitive from "@radix-ui/react-tooltip";
6077
- import { jsx as jsx43 } from "react/jsx-runtime";
6078
- var TooltipProvider = TooltipPrimitive.Provider;
6079
- var Tooltip = TooltipPrimitive.Root;
6080
- var TooltipTrigger = TooltipPrimitive.Trigger;
6081
- var TooltipContent = React41.forwardRef(function TooltipContent2({ className, sideOffset = 8, ...props }, ref) {
6082
- return /* @__PURE__ */ jsx43(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx43(
6083
- TooltipPrimitive.Content,
6084
- {
6085
- ref,
6086
- sideOffset,
6087
- className: cn(
6088
- "sofya-tooltip-content z-50 max-w-[260px] overflow-hidden rounded-[12px] border border-[color:var(--sofya-tone-default-border)] bg-[color:var(--sofya-tooltip-background)] px-4 py-2 text-[color:var(--sofya-tooltip-foreground)] shadow-[var(--sofya-shadow-tooltip)]",
6089
- className
6090
- ),
6091
- ...props,
6092
- children: renderTextContent(props.children, {
6093
- as: "span",
6094
- className: "block text-[color:var(--sofya-tooltip-foreground)]",
6095
- size: "tiny",
6096
- style: {
6097
- fontWeight: 500
6098
- }
6099
- })
6100
- }
6101
- ) });
6102
- });
6103
- TooltipContent.displayName = TooltipPrimitive.Content.displayName;
6104
-
6105
6840
  // src/theme/provider.tsx
6106
- import * as React42 from "react";
6841
+ import * as React49 from "react";
6107
6842
  import {
6108
6843
  createWhitelabelTheme,
6109
6844
  defaultTheme,
6110
6845
  themeToCssVariables
6111
6846
  } from "@sofya-ds/tokens";
6112
- import { jsx as jsx44 } from "react/jsx-runtime";
6847
+ import { jsx as jsx51 } from "react/jsx-runtime";
6113
6848
  var SOFYA_FONT_LINKS = [
6114
6849
  {
6115
6850
  id: "preconnect-googleapis",
@@ -6129,7 +6864,7 @@ var SOFYA_FONT_LINKS = [
6129
6864
  }
6130
6865
  ];
6131
6866
  function useSofyaFontLinks() {
6132
- React42.useEffect(() => {
6867
+ React49.useEffect(() => {
6133
6868
  if (typeof document === "undefined") {
6134
6869
  return;
6135
6870
  }
@@ -6162,7 +6897,7 @@ function SofyaProvider({
6162
6897
  useSofyaFontLinks();
6163
6898
  const theme = createWhitelabelTheme(overrides ?? {}, preset);
6164
6899
  const cssVariables = themeToCssVariables(theme);
6165
- return /* @__PURE__ */ jsx44(
6900
+ return /* @__PURE__ */ jsx51(
6166
6901
  "div",
6167
6902
  {
6168
6903
  "data-sofya-theme": theme.name,
@@ -6216,6 +6951,7 @@ export {
6216
6951
  CardHeader,
6217
6952
  CardTitle,
6218
6953
  Checkbox,
6954
+ CloseButton,
6219
6955
  Cluster,
6220
6956
  Container,
6221
6957
  Dialog,
@@ -6240,6 +6976,7 @@ export {
6240
6976
  EmptyMedia,
6241
6977
  EmptyTitle,
6242
6978
  Icon,
6979
+ IconButton,
6243
6980
  Inline,
6244
6981
  Input,
6245
6982
  InputOTP,
@@ -6259,11 +6996,13 @@ export {
6259
6996
  Popover,
6260
6997
  PopoverAnchor,
6261
6998
  PopoverClose,
6999
+ PopoverCloseButton,
6262
7000
  PopoverContent,
6263
7001
  PopoverDescription,
6264
7002
  PopoverPortal,
6265
7003
  PopoverTitle,
6266
7004
  PopoverTrigger,
7005
+ PrivacyLabel,
6267
7006
  Progress,
6268
7007
  ProseDialogBody,
6269
7008
  ProseDialogContent,
@@ -6278,6 +7017,10 @@ export {
6278
7017
  RadioGroupOptionDescription,
6279
7018
  RadioGroupOptionIndicator,
6280
7019
  RadioGroupOptionLabel,
7020
+ RichTextToolbar,
7021
+ RichTextToolbarButton,
7022
+ RichTextToolbarGroup,
7023
+ RichTextToolbarSeparator,
6281
7024
  RightRailAction,
6282
7025
  ScrollArea,
6283
7026
  ScrollAreaCorner,
@@ -6294,11 +7037,15 @@ export {
6294
7037
  SelectTrigger,
6295
7038
  SelectValue,
6296
7039
  Separator2 as Separator,
7040
+ SettingsNavItem,
7041
+ SidebarNavItem,
6297
7042
  Skeleton,
6298
7043
  Slider,
6299
7044
  SofyaProvider,
6300
7045
  Spinner,
6301
7046
  Stack,
7047
+ StatusIndicator,
7048
+ StatusTooltip,
6302
7049
  Surface,
6303
7050
  Switch,
6304
7051
  Table,
@@ -6315,6 +7062,9 @@ export {
6315
7062
  TableRow,
6316
7063
  TableStatusBadge,
6317
7064
  Tabs,
7065
+ Tag,
7066
+ TemplateCard,
7067
+ TemplateListItem,
6318
7068
  Text,
6319
7069
  Textarea,
6320
7070
  Toaster,
@@ -6349,6 +7099,8 @@ export {
6349
7099
  emptyMediaVariantOptions,
6350
7100
  gradientToCss,
6351
7101
  hexToHslChannels,
7102
+ iconButtonSizeOptions,
7103
+ iconButtonVariantOptions,
6352
7104
  iconColorOptions,
6353
7105
  iconNames,
6354
7106
  iconSizeMap,
@@ -6359,7 +7111,9 @@ export {
6359
7111
  logoVariants,
6360
7112
  mergeTheme,
6361
7113
  notificationVariantOptions,
7114
+ notify,
6362
7115
  paginationLinkVariants,
7116
+ privacyLevelOptions,
6363
7117
  progressSizeOptions,
6364
7118
  radioGroupOrientationOptions,
6365
7119
  radioGroupVariantOptions,
@@ -6367,6 +7121,7 @@ export {
6367
7121
  resolveSurfaceToken,
6368
7122
  resolveTextStyle,
6369
7123
  resolveTheme,
7124
+ resolveWorkflowStatus,
6370
7125
  scrollAreaOrientationOptions,
6371
7126
  selectSizeOptions,
6372
7127
  sofyaBrandPalette,
@@ -6385,12 +7140,18 @@ export {
6385
7140
  tableCellVariantOptions,
6386
7141
  tableDensityOptions,
6387
7142
  tableStatusToneOptions,
7143
+ tagStatusToneOptions,
7144
+ tagVariantOptions,
7145
+ templateCardLayoutOptions,
6388
7146
  textSizeOptions,
6389
7147
  textSplitTypeOptions,
7148
+ textToneOptions,
6390
7149
  textVariantOptions,
6391
7150
  themePresetNames,
6392
7151
  themePresets,
6393
7152
  themeToCssVariables2 as themeToCssVariables,
6394
7153
  toast,
6395
- uploadKindOptions
7154
+ tooltipToneOptions,
7155
+ uploadKindOptions,
7156
+ workflowStatusOptions
6396
7157
  };