@sofya-ds/react 1.1.7 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -109,6 +109,7 @@ __export(index_exports, {
109
109
  SelectValue: () => SelectValue,
110
110
  Separator: () => Separator2,
111
111
  Skeleton: () => Skeleton,
112
+ Slider: () => Slider,
112
113
  SofyaProvider: () => SofyaProvider,
113
114
  Spinner: () => Spinner,
114
115
  Surface: () => Surface,
@@ -1172,8 +1173,8 @@ var buttonVariants = (0, import_class_variance_authority4.cva)(
1172
1173
  icon: "border-0 bg-primary/10 text-primary shadow-sofya-sm hover:bg-primary/15",
1173
1174
  language: "border-0 bg-muted bg-cover bg-center bg-no-repeat text-primary-foreground shadow-none hover:brightness-[1.03]",
1174
1175
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85",
1175
- outline: "border border-primary/15 !bg-transparent text-foreground hover:border-primary/30 hover:!bg-transparent active:!bg-transparent",
1176
- ghost: "text-foreground hover:bg-muted",
1176
+ outline: "border border-primary/15 bg-background text-foreground hover:border-primary/30 hover:bg-background active:bg-background",
1177
+ ghost: "bg-background text-foreground hover:bg-muted",
1177
1178
  destructive: "bg-destructive text-destructive-foreground hover:brightness-[1.04]"
1178
1179
  },
1179
1180
  size: {
@@ -1297,7 +1298,7 @@ var Button = React6.forwardRef(
1297
1298
  const showSpinner = loadingPhase === "loading";
1298
1299
  const iconOnlyActionClassName = isIconOnlyAction ? cn(
1299
1300
  "h-10 w-10 rounded-[10px] border-0 p-2 text-primary shadow-none",
1300
- active ? "bg-[color:var(--sofya-surface-selected)] hover:bg-[color:var(--sofya-surface-selected)]" : "bg-transparent hover:bg-transparent"
1301
+ active ? "bg-[color:var(--sofya-surface-selected)] hover:bg-[color:var(--sofya-surface-selected)]" : "bg-background hover:bg-background"
1301
1302
  ) : void 0;
1302
1303
  const languageButtonClassName = isLanguageButton ? cn(
1303
1304
  "min-w-0 overflow-hidden border-0 text-primary-foreground shadow-none",
@@ -4051,11 +4052,188 @@ var Separator2 = React22.forwardRef(function Separator3({ className, decorative
4051
4052
  });
4052
4053
  Separator2.displayName = SeparatorPrimitive.Root.displayName;
4053
4054
 
4054
- // src/components/skeleton.tsx
4055
+ // src/components/slider.tsx
4055
4056
  var React23 = __toESM(require("react"), 1);
4056
4057
  var import_jsx_runtime26 = require("react/jsx-runtime");
4057
- var Skeleton = React23.forwardRef(function Skeleton2({ className, ...props }, ref) {
4058
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4058
+ function clampSliderValue(value, min, max) {
4059
+ if (Number.isNaN(value)) {
4060
+ return min;
4061
+ }
4062
+ return Math.min(Math.max(value, min), max);
4063
+ }
4064
+ function resolveSliderMax(min, max) {
4065
+ if (typeof max === "number" && max > min) {
4066
+ return max;
4067
+ }
4068
+ return min + 100;
4069
+ }
4070
+ function isTextValue(value) {
4071
+ return typeof value === "string" || typeof value === "number";
4072
+ }
4073
+ var Slider = React23.forwardRef(function Slider2({
4074
+ className,
4075
+ defaultValue,
4076
+ formatValue,
4077
+ id,
4078
+ label,
4079
+ labelClassName,
4080
+ max,
4081
+ min = 0,
4082
+ onChange,
4083
+ onValueChange,
4084
+ rangeClassName,
4085
+ sliderClassName,
4086
+ showValue = true,
4087
+ step = 1,
4088
+ thumbClassName,
4089
+ trackClassName,
4090
+ value,
4091
+ valueClassName,
4092
+ ...props
4093
+ }, ref) {
4094
+ const resolvedId = React23.useId();
4095
+ const inputId = id ?? resolvedId;
4096
+ const safeMin = min;
4097
+ const safeMax = resolveSliderMax(safeMin, max);
4098
+ const isControlled = value !== void 0;
4099
+ const [internalValue, setInternalValue] = React23.useState(
4100
+ () => clampSliderValue(defaultValue ?? safeMin, safeMin, safeMax)
4101
+ );
4102
+ React23.useEffect(() => {
4103
+ if (isControlled) {
4104
+ return;
4105
+ }
4106
+ setInternalValue(
4107
+ (currentValue2) => clampSliderValue(currentValue2, safeMin, safeMax)
4108
+ );
4109
+ }, [isControlled, safeMax, safeMin]);
4110
+ const currentValue = isControlled ? clampSliderValue(value ?? safeMin, safeMin, safeMax) : internalValue;
4111
+ const valuePercentage = safeMax === safeMin ? 0 : (currentValue - safeMin) / (safeMax - safeMin) * 100;
4112
+ const formattedValue = formatValue?.(currentValue) ?? currentValue.toString();
4113
+ const formattedValueText = isTextValue(formattedValue) ? String(formattedValue) : void 0;
4114
+ const handleChange = (event) => {
4115
+ const nextValue = clampSliderValue(
4116
+ Number(event.currentTarget.value),
4117
+ safeMin,
4118
+ safeMax
4119
+ );
4120
+ if (!isControlled) {
4121
+ setInternalValue(nextValue);
4122
+ }
4123
+ onChange?.(event);
4124
+ onValueChange?.(nextValue);
4125
+ };
4126
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
4127
+ "div",
4128
+ {
4129
+ "data-slot": "slider",
4130
+ className: cn("grid w-full gap-2", className),
4131
+ children: [
4132
+ label || showValue ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
4133
+ label ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4134
+ "label",
4135
+ {
4136
+ htmlFor: inputId,
4137
+ className: cn(
4138
+ "min-w-0 text-[color:var(--sofya-text-default)]",
4139
+ labelClassName
4140
+ ),
4141
+ children: renderTextContent(label, {
4142
+ as: "span",
4143
+ className: "block text-[color:var(--sofya-text-default)]",
4144
+ size: "body",
4145
+ style: {
4146
+ fontWeight: 500
4147
+ }
4148
+ })
4149
+ }
4150
+ ) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", {}),
4151
+ showValue ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4152
+ "div",
4153
+ {
4154
+ className: cn(
4155
+ "shrink-0 text-[color:var(--sofya-text-subtle)]",
4156
+ valueClassName
4157
+ ),
4158
+ children: renderTextContent(formattedValue, {
4159
+ as: "span",
4160
+ className: "block text-[color:var(--sofya-text-subtle)]",
4161
+ size: "body",
4162
+ style: {
4163
+ fontWeight: 500
4164
+ }
4165
+ })
4166
+ }
4167
+ ) : null
4168
+ ] }) : null,
4169
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
4170
+ "div",
4171
+ {
4172
+ "data-slot": "slider-control",
4173
+ className: cn("relative h-8 w-full", sliderClassName),
4174
+ children: [
4175
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4176
+ "input",
4177
+ {
4178
+ ...props,
4179
+ ref,
4180
+ id: inputId,
4181
+ type: "range",
4182
+ min: safeMin,
4183
+ max: safeMax,
4184
+ step,
4185
+ value: currentValue,
4186
+ "aria-valuetext": props["aria-valuetext"] ?? formattedValueText,
4187
+ className: "peer absolute inset-0 z-20 m-0 h-full w-full cursor-pointer appearance-none bg-transparent opacity-0 disabled:cursor-not-allowed",
4188
+ onChange: handleChange
4189
+ }
4190
+ ),
4191
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4192
+ "div",
4193
+ {
4194
+ "data-slot": "slider-track",
4195
+ className: cn(
4196
+ "pointer-events-none absolute left-0 top-1/2 h-2 w-full -translate-y-1/2 rounded-full bg-[color:var(--sofya-surface-muted-strong)] transition-colors duration-sofya ease-sofya peer-disabled:opacity-60",
4197
+ trackClassName
4198
+ )
4199
+ }
4200
+ ),
4201
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4202
+ "div",
4203
+ {
4204
+ "data-slot": "slider-range",
4205
+ className: cn(
4206
+ "pointer-events-none absolute left-0 top-1/2 h-2 -translate-y-1/2 rounded-full bg-primary transition-[width,background-color] duration-sofya ease-sofya peer-disabled:opacity-60",
4207
+ rangeClassName
4208
+ ),
4209
+ style: { width: `${valuePercentage}%` }
4210
+ }
4211
+ ),
4212
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4213
+ "div",
4214
+ {
4215
+ "data-slot": "slider-thumb",
4216
+ className: cn(
4217
+ "pointer-events-none absolute top-1/2 z-10 h-5 w-5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-primary bg-background shadow-[var(--sofya-shadow-soft)] transition-[left,transform,background-color,border-color,box-shadow] duration-sofya ease-sofya peer-focus-visible:ring-4 peer-focus-visible:ring-[color:var(--sofya-focus-ring-soft)] peer-disabled:opacity-60",
4218
+ thumbClassName
4219
+ ),
4220
+ style: { left: `${valuePercentage}%` }
4221
+ }
4222
+ )
4223
+ ]
4224
+ }
4225
+ )
4226
+ ]
4227
+ }
4228
+ );
4229
+ });
4230
+ Slider.displayName = "Slider";
4231
+
4232
+ // src/components/skeleton.tsx
4233
+ var React24 = __toESM(require("react"), 1);
4234
+ var import_jsx_runtime27 = require("react/jsx-runtime");
4235
+ var Skeleton = React24.forwardRef(function Skeleton2({ className, ...props }, ref) {
4236
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4059
4237
  "div",
4060
4238
  {
4061
4239
  ref,
@@ -4070,15 +4248,15 @@ var Skeleton = React23.forwardRef(function Skeleton2({ className, ...props }, re
4070
4248
  Skeleton.displayName = "Skeleton";
4071
4249
 
4072
4250
  // src/components/sonner.tsx
4073
- var React24 = __toESM(require("react"), 1);
4251
+ var React25 = __toESM(require("react"), 1);
4074
4252
  var import_sonner = require("sonner");
4075
- var import_jsx_runtime27 = require("react/jsx-runtime");
4253
+ var import_jsx_runtime28 = require("react/jsx-runtime");
4076
4254
  var notificationVariantOptions = ["default", "success", "error", "warning"];
4077
4255
  function ToastStatusIcon({
4078
4256
  iconName,
4079
4257
  className
4080
4258
  }) {
4081
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4259
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4082
4260
  "span",
4083
4261
  {
4084
4262
  "aria-hidden": "true",
@@ -4086,7 +4264,7 @@ function ToastStatusIcon({
4086
4264
  "inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full border shadow-sofya-sm",
4087
4265
  className
4088
4266
  ),
4089
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { name: iconName, size: 16 })
4267
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: iconName, size: 16 })
4090
4268
  }
4091
4269
  );
4092
4270
  }
@@ -4107,35 +4285,35 @@ var defaultToastClassNames = {
4107
4285
  loading: "border-border bg-card text-foreground"
4108
4286
  };
4109
4287
  var defaultToastIcons = {
4110
- success: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4288
+ success: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4111
4289
  ToastStatusIcon,
4112
4290
  {
4113
4291
  iconName: "check",
4114
4292
  className: "border-success/15 bg-success/12 text-success"
4115
4293
  }
4116
4294
  ),
4117
- error: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4295
+ error: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4118
4296
  ToastStatusIcon,
4119
4297
  {
4120
4298
  iconName: "x",
4121
4299
  className: "border-destructive/15 bg-destructive/12 text-destructive"
4122
4300
  }
4123
4301
  ),
4124
- warning: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4302
+ warning: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4125
4303
  ToastStatusIcon,
4126
4304
  {
4127
4305
  iconName: "question",
4128
4306
  className: "border-warning/20 bg-warning/15 text-foreground"
4129
4307
  }
4130
4308
  ),
4131
- info: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4309
+ info: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4132
4310
  ToastStatusIcon,
4133
4311
  {
4134
4312
  iconName: "question",
4135
4313
  className: "border-primary/15 bg-primary/10 text-primary"
4136
4314
  }
4137
4315
  ),
4138
- close: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { name: "x", size: 12 })
4316
+ close: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "x", size: 12 })
4139
4317
  };
4140
4318
  function mergeToastClassNames(overrides) {
4141
4319
  return {
@@ -4143,7 +4321,7 @@ function mergeToastClassNames(overrides) {
4143
4321
  ...overrides
4144
4322
  };
4145
4323
  }
4146
- var Toaster = React24.forwardRef(
4324
+ var Toaster = React25.forwardRef(
4147
4325
  function Toaster2({
4148
4326
  className,
4149
4327
  closeButton = true,
@@ -4155,7 +4333,7 @@ var Toaster = React24.forwardRef(
4155
4333
  visibleToasts = 5,
4156
4334
  ...props
4157
4335
  }, ref) {
4158
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4336
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4159
4337
  import_sonner.Toaster,
4160
4338
  {
4161
4339
  ref,
@@ -4185,10 +4363,10 @@ var Toaster = React24.forwardRef(
4185
4363
  Toaster.displayName = "Toaster";
4186
4364
 
4187
4365
  // src/components/spinner.tsx
4188
- var React25 = __toESM(require("react"), 1);
4189
- var import_jsx_runtime28 = require("react/jsx-runtime");
4366
+ var React26 = __toESM(require("react"), 1);
4367
+ var import_jsx_runtime29 = require("react/jsx-runtime");
4190
4368
  var spinnerSizeOptions = ["sm", "default", "lg"];
4191
- var Spinner = React25.forwardRef(function Spinner2({
4369
+ var Spinner = React26.forwardRef(function Spinner2({
4192
4370
  "aria-label": ariaLabelProp,
4193
4371
  "aria-labelledby": ariaLabelledby,
4194
4372
  className,
@@ -4197,7 +4375,7 @@ var Spinner = React25.forwardRef(function Spinner2({
4197
4375
  ...props
4198
4376
  }, ref) {
4199
4377
  const ariaLabel = ariaLabelProp ?? (ariaLabelledby ? void 0 : "Loading");
4200
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4378
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
4201
4379
  "svg",
4202
4380
  {
4203
4381
  ref,
@@ -4215,8 +4393,8 @@ var Spinner = React25.forwardRef(function Spinner2({
4215
4393
  ),
4216
4394
  ...props,
4217
4395
  children: [
4218
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("circle", { cx: "12", cy: "12", r: "9", className: "opacity-20", stroke: "currentColor", strokeWidth: "3" }),
4219
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4396
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("circle", { cx: "12", cy: "12", r: "9", className: "opacity-20", stroke: "currentColor", strokeWidth: "3" }),
4397
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4220
4398
  "path",
4221
4399
  {
4222
4400
  d: "M21 12A9 9 0 0 0 12 3",
@@ -4232,11 +4410,11 @@ var Spinner = React25.forwardRef(function Spinner2({
4232
4410
  Spinner.displayName = "Spinner";
4233
4411
 
4234
4412
  // src/components/switch.tsx
4235
- var React26 = __toESM(require("react"), 1);
4413
+ var React27 = __toESM(require("react"), 1);
4236
4414
  var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
4237
- var import_jsx_runtime29 = require("react/jsx-runtime");
4238
- var Switch = React26.forwardRef(({ className, ...props }, ref) => {
4239
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4415
+ var import_jsx_runtime30 = require("react/jsx-runtime");
4416
+ var Switch = React27.forwardRef(({ className, ...props }, ref) => {
4417
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4240
4418
  SwitchPrimitives.Root,
4241
4419
  {
4242
4420
  className: cn(
@@ -4245,7 +4423,7 @@ var Switch = React26.forwardRef(({ className, ...props }, ref) => {
4245
4423
  ),
4246
4424
  ...props,
4247
4425
  ref,
4248
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4426
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4249
4427
  SwitchPrimitives.Thumb,
4250
4428
  {
4251
4429
  className: "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-sm ring-0 transition-transform duration-sofya ease-sofya data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
@@ -4258,8 +4436,8 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
4258
4436
 
4259
4437
  // src/components/table.tsx
4260
4438
  var import_class_variance_authority8 = require("class-variance-authority");
4261
- var React27 = __toESM(require("react"), 1);
4262
- var import_jsx_runtime30 = require("react/jsx-runtime");
4439
+ var React28 = __toESM(require("react"), 1);
4440
+ var import_jsx_runtime31 = require("react/jsx-runtime");
4263
4441
  var tableCellVariantOptions = ["default", "primary", "muted"];
4264
4442
  var tableStatusToneOptions = [
4265
4443
  "active",
@@ -4317,13 +4495,13 @@ var inheritedTextStyle = {
4317
4495
  letterSpacing: "inherit",
4318
4496
  color: "inherit"
4319
4497
  };
4320
- var Table = React27.forwardRef(function Table2({ className, ...props }, ref) {
4321
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4498
+ var Table = React28.forwardRef(function Table2({ className, ...props }, ref) {
4499
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4322
4500
  "div",
4323
4501
  {
4324
4502
  "data-slot": "table-container",
4325
4503
  className: "relative w-full overflow-x-auto",
4326
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4504
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4327
4505
  "table",
4328
4506
  {
4329
4507
  "data-slot": "table",
@@ -4338,8 +4516,8 @@ var Table = React27.forwardRef(function Table2({ className, ...props }, ref) {
4338
4516
  }
4339
4517
  );
4340
4518
  });
4341
- var TableHeader = React27.forwardRef(function TableHeader2({ className, ...props }, ref) {
4342
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4519
+ var TableHeader = React28.forwardRef(function TableHeader2({ className, ...props }, ref) {
4520
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4343
4521
  "thead",
4344
4522
  {
4345
4523
  "data-slot": "table-header",
@@ -4352,8 +4530,8 @@ var TableHeader = React27.forwardRef(function TableHeader2({ className, ...props
4352
4530
  }
4353
4531
  );
4354
4532
  });
4355
- var TableBody = React27.forwardRef(function TableBody2({ className, ...props }, ref) {
4356
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4533
+ var TableBody = React28.forwardRef(function TableBody2({ className, ...props }, ref) {
4534
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4357
4535
  "tbody",
4358
4536
  {
4359
4537
  "data-slot": "table-body",
@@ -4363,8 +4541,8 @@ var TableBody = React27.forwardRef(function TableBody2({ className, ...props },
4363
4541
  }
4364
4542
  );
4365
4543
  });
4366
- var TableFooter = React27.forwardRef(function TableFooter2({ className, ...props }, ref) {
4367
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4544
+ var TableFooter = React28.forwardRef(function TableFooter2({ className, ...props }, ref) {
4545
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4368
4546
  "tfoot",
4369
4547
  {
4370
4548
  "data-slot": "table-footer",
@@ -4377,8 +4555,8 @@ var TableFooter = React27.forwardRef(function TableFooter2({ className, ...props
4377
4555
  }
4378
4556
  );
4379
4557
  });
4380
- var TableRow = React27.forwardRef(function TableRow2({ className, ...props }, ref) {
4381
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4558
+ var TableRow = React28.forwardRef(function TableRow2({ className, ...props }, ref) {
4559
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4382
4560
  "tr",
4383
4561
  {
4384
4562
  "data-slot": "table-row",
@@ -4391,8 +4569,8 @@ var TableRow = React27.forwardRef(function TableRow2({ className, ...props }, re
4391
4569
  }
4392
4570
  );
4393
4571
  });
4394
- var TableHead = React27.forwardRef(function TableHead2({ className, children, ...props }, ref) {
4395
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4572
+ var TableHead = React28.forwardRef(function TableHead2({ className, children, ...props }, ref) {
4573
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4396
4574
  "th",
4397
4575
  {
4398
4576
  "data-slot": "table-head",
@@ -4411,9 +4589,9 @@ var TableHead = React27.forwardRef(function TableHead2({ className, children, ..
4411
4589
  }
4412
4590
  );
4413
4591
  });
4414
- var TableCell = React27.forwardRef(
4592
+ var TableCell = React28.forwardRef(
4415
4593
  function TableCell2({ className, variant, children, ...props }, ref) {
4416
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4594
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4417
4595
  "td",
4418
4596
  {
4419
4597
  "data-slot": "table-cell",
@@ -4430,8 +4608,8 @@ var TableCell = React27.forwardRef(
4430
4608
  );
4431
4609
  }
4432
4610
  );
4433
- var TableCaption = React27.forwardRef(function TableCaption2({ className, children, ...props }, ref) {
4434
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4611
+ var TableCaption = React28.forwardRef(function TableCaption2({ className, children, ...props }, ref) {
4612
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4435
4613
  "caption",
4436
4614
  {
4437
4615
  "data-slot": "table-caption",
@@ -4456,7 +4634,7 @@ function TableStatusBadge({
4456
4634
  children,
4457
4635
  ...props
4458
4636
  }) {
4459
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4637
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4460
4638
  Badge,
4461
4639
  {
4462
4640
  variant: "pill",
@@ -4471,8 +4649,8 @@ function TableStatusBadge({
4471
4649
  }
4472
4650
  );
4473
4651
  }
4474
- var TableActionButton = React27.forwardRef(function TableActionButton2({ className, tone, type = "button", children, ...props }, ref) {
4475
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4652
+ var TableActionButton = React28.forwardRef(function TableActionButton2({ className, tone, type = "button", children, ...props }, ref) {
4653
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4476
4654
  Button,
4477
4655
  {
4478
4656
  ref,
@@ -4490,8 +4668,8 @@ var TableActionButton = React27.forwardRef(function TableActionButton2({ classNa
4490
4668
  }
4491
4669
  );
4492
4670
  });
4493
- var TableActions = React27.forwardRef(function TableActions2({ className, ...props }, ref) {
4494
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4671
+ var TableActions = React28.forwardRef(function TableActions2({ className, ...props }, ref) {
4672
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4495
4673
  "div",
4496
4674
  {
4497
4675
  ref,
@@ -4512,10 +4690,10 @@ TableActionButton.displayName = "TableActionButton";
4512
4690
  TableActions.displayName = "TableActions";
4513
4691
 
4514
4692
  // src/components/tabs.tsx
4515
- var React28 = __toESM(require("react"), 1);
4693
+ var React29 = __toESM(require("react"), 1);
4516
4694
  var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
4517
4695
  var import_react3 = require("motion/react");
4518
- var import_jsx_runtime31 = require("react/jsx-runtime");
4696
+ var import_jsx_runtime32 = require("react/jsx-runtime");
4519
4697
  function resolveDefaultValue(items, defaultValue) {
4520
4698
  if (defaultValue) {
4521
4699
  return defaultValue;
@@ -4535,15 +4713,15 @@ function Tabs({
4535
4713
  }) {
4536
4714
  const resolvedDefaultValue = resolveDefaultValue(items, defaultValue);
4537
4715
  const isControlled = value !== void 0;
4538
- const [selectedValue, setSelectedValue] = React28.useState(resolvedDefaultValue);
4539
- const indicatorLayoutId = React28.useId();
4716
+ const [selectedValue, setSelectedValue] = React29.useState(resolvedDefaultValue);
4717
+ const indicatorLayoutId = React29.useId();
4540
4718
  const currentValue = isControlled ? value : selectedValue;
4541
- React28.useEffect(() => {
4719
+ React29.useEffect(() => {
4542
4720
  if (!isControlled) {
4543
4721
  setSelectedValue(resolvedDefaultValue);
4544
4722
  }
4545
4723
  }, [isControlled, resolvedDefaultValue]);
4546
- const handleValueChange = React28.useCallback(
4724
+ const handleValueChange = React29.useCallback(
4547
4725
  (nextValue) => {
4548
4726
  if (!isControlled) {
4549
4727
  setSelectedValue(nextValue);
@@ -4552,7 +4730,7 @@ function Tabs({
4552
4730
  },
4553
4731
  [isControlled, onValueChange]
4554
4732
  );
4555
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
4733
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
4556
4734
  TabsPrimitive.Root,
4557
4735
  {
4558
4736
  className: cn("w-full", className),
@@ -4560,7 +4738,7 @@ function Tabs({
4560
4738
  value: currentValue,
4561
4739
  ...props,
4562
4740
  children: [
4563
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4741
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4564
4742
  TabsPrimitive.List,
4565
4743
  {
4566
4744
  "aria-label": "Subtelas navegaveis",
@@ -4571,7 +4749,7 @@ function Tabs({
4571
4749
  children: items.map((item) => {
4572
4750
  const isUnavailable = item.disabled || item.loading;
4573
4751
  const isActive = item.value === currentValue;
4574
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
4752
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
4575
4753
  TabsPrimitive.Trigger,
4576
4754
  {
4577
4755
  value: item.value,
@@ -4583,7 +4761,7 @@ function Tabs({
4583
4761
  item.triggerClassName
4584
4762
  ),
4585
4763
  children: [
4586
- isActive ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4764
+ isActive ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4587
4765
  import_react3.motion.span,
4588
4766
  {
4589
4767
  "aria-hidden": "true",
@@ -4593,15 +4771,15 @@ function Tabs({
4593
4771
  transition: { duration: 0.25, ease: "easeInOut" }
4594
4772
  }
4595
4773
  ) : null,
4596
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "relative z-10 inline-flex items-center gap-2", children: [
4597
- item.loading ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4774
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "relative z-10 inline-flex items-center gap-2", children: [
4775
+ item.loading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4598
4776
  "span",
4599
4777
  {
4600
4778
  "aria-hidden": "true",
4601
4779
  className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-r-transparent"
4602
4780
  }
4603
4781
  ) : null,
4604
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: renderTextContent(item.label, {
4782
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: renderTextContent(item.label, {
4605
4783
  as: "span",
4606
4784
  className: "block text-inherit",
4607
4785
  size: "h5"
@@ -4615,7 +4793,7 @@ function Tabs({
4615
4793
  }
4616
4794
  ),
4617
4795
  items.map(
4618
- (item) => item.content !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4796
+ (item) => item.content !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4619
4797
  TabsPrimitive.Content,
4620
4798
  {
4621
4799
  value: item.value,
@@ -4638,9 +4816,9 @@ function Tabs({
4638
4816
  Tabs.displayName = "Tabs";
4639
4817
 
4640
4818
  // src/components/textarea.tsx
4641
- var React29 = __toESM(require("react"), 1);
4642
- var import_jsx_runtime32 = require("react/jsx-runtime");
4643
- var Textarea = React29.forwardRef(
4819
+ var React30 = __toESM(require("react"), 1);
4820
+ var import_jsx_runtime33 = require("react/jsx-runtime");
4821
+ var Textarea = React30.forwardRef(
4644
4822
  ({
4645
4823
  className,
4646
4824
  containerClassName,
@@ -4650,10 +4828,10 @@ var Textarea = React29.forwardRef(
4650
4828
  rows = 5,
4651
4829
  ...props
4652
4830
  }, ref) => {
4653
- const generatedId = React29.useId();
4831
+ const generatedId = React30.useId();
4654
4832
  const resolvedId = id ?? generatedId;
4655
4833
  const ariaLabel = props["aria-label"] ?? (typeof label === "string" ? label : void 0);
4656
- const control = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4834
+ const control = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4657
4835
  "textarea",
4658
4836
  {
4659
4837
  className: cn(
@@ -4670,8 +4848,8 @@ var Textarea = React29.forwardRef(
4670
4848
  if (!label && !containerClassName) {
4671
4849
  return control;
4672
4850
  }
4673
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: cn("grid w-full gap-2", containerClassName), children: [
4674
- label ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4851
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: cn("grid w-full gap-2", containerClassName), children: [
4852
+ label ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4675
4853
  "label",
4676
4854
  {
4677
4855
  className: cn(
@@ -4696,14 +4874,14 @@ var Textarea = React29.forwardRef(
4696
4874
  Textarea.displayName = "Textarea";
4697
4875
 
4698
4876
  // src/components/tooltip.tsx
4699
- var React30 = __toESM(require("react"), 1);
4877
+ var React31 = __toESM(require("react"), 1);
4700
4878
  var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
4701
- var import_jsx_runtime33 = require("react/jsx-runtime");
4879
+ var import_jsx_runtime34 = require("react/jsx-runtime");
4702
4880
  var TooltipProvider = TooltipPrimitive.Provider;
4703
4881
  var Tooltip = TooltipPrimitive.Root;
4704
4882
  var TooltipTrigger = TooltipPrimitive.Trigger;
4705
- var TooltipContent = React30.forwardRef(function TooltipContent2({ className, sideOffset = 8, ...props }, ref) {
4706
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4883
+ var TooltipContent = React31.forwardRef(function TooltipContent2({ className, sideOffset = 8, ...props }, ref) {
4884
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4707
4885
  TooltipPrimitive.Content,
4708
4886
  {
4709
4887
  ref,
@@ -4727,9 +4905,9 @@ var TooltipContent = React30.forwardRef(function TooltipContent2({ className, si
4727
4905
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
4728
4906
 
4729
4907
  // src/theme/provider.tsx
4730
- var React31 = __toESM(require("react"), 1);
4908
+ var React32 = __toESM(require("react"), 1);
4731
4909
  var import_tokens = require("@sofya-ds/tokens");
4732
- var import_jsx_runtime34 = require("react/jsx-runtime");
4910
+ var import_jsx_runtime35 = require("react/jsx-runtime");
4733
4911
  var SOFYA_FONT_LINKS = [
4734
4912
  {
4735
4913
  id: "preconnect-googleapis",
@@ -4749,7 +4927,7 @@ var SOFYA_FONT_LINKS = [
4749
4927
  }
4750
4928
  ];
4751
4929
  function useSofyaFontLinks() {
4752
- React31.useEffect(() => {
4930
+ React32.useEffect(() => {
4753
4931
  if (typeof document === "undefined") {
4754
4932
  return;
4755
4933
  }
@@ -4782,7 +4960,7 @@ function SofyaProvider({
4782
4960
  useSofyaFontLinks();
4783
4961
  const theme = (0, import_tokens.createWhitelabelTheme)(overrides ?? {}, preset);
4784
4962
  const cssVariables = (0, import_tokens.themeToCssVariables)(theme);
4785
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4963
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4786
4964
  "div",
4787
4965
  {
4788
4966
  "data-sofya-theme": theme.name,
@@ -4877,6 +5055,7 @@ var import_tokens2 = require("@sofya-ds/tokens");
4877
5055
  SelectValue,
4878
5056
  Separator,
4879
5057
  Skeleton,
5058
+ Slider,
4880
5059
  SofyaProvider,
4881
5060
  Spinner,
4882
5061
  Surface,