shadcn-ui-react 0.7.8 → 0.7.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.js CHANGED
@@ -493,7 +493,7 @@ var BreadcrumbList = React6.forwardRef((_a, ref) => {
493
493
  __spreadValues({
494
494
  ref,
495
495
  className: cn(
496
- "flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
496
+ "flex flex-wrap items-center gap-1.5 wrap-break-word text-sm text-muted-foreground sm:gap-2.5",
497
497
  className
498
498
  )
499
499
  }, props)
@@ -6298,41 +6298,24 @@ var DropdownMenuShortcut = (_a) => {
6298
6298
  };
6299
6299
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
6300
6300
 
6301
- // src/components/Form/form.tsx
6302
- import {
6303
- FormProvider
6304
- } from "react-hook-form";
6305
- import { jsx as jsx18 } from "react/jsx-runtime";
6306
- function Form({
6307
- children,
6308
- methods,
6309
- onSubmit,
6310
- onError,
6311
- formProps
6312
- }) {
6313
- const handleSubmit = onSubmit ? methods.handleSubmit(onSubmit, onError) : void 0;
6314
- return /* @__PURE__ */ jsx18(FormProvider, __spreadProps(__spreadValues({}, methods), { children: /* @__PURE__ */ jsx18("form", __spreadProps(__spreadValues({ noValidate: true, onSubmit: handleSubmit }, formProps), { children })) }));
6315
- }
6316
-
6317
- // src/components/Form/form-checkbox.tsx
6318
- import * as React46 from "react";
6319
- import { Asterisk as Asterisk2 } from "lucide-react";
6301
+ // src/components/Form/form-component.tsx
6302
+ import * as React44 from "react";
6303
+ import { Slot as Slot4 } from "@radix-ui/react-slot";
6320
6304
  import {
6321
- Controller as Controller2,
6322
- useFormContext as useFormContext2
6305
+ useFormContext
6323
6306
  } from "react-hook-form";
6324
6307
 
6325
6308
  // src/components/Label/label.tsx
6326
6309
  import * as LabelPrimitive from "@radix-ui/react-label";
6327
6310
  import { cva as cva5 } from "class-variance-authority";
6328
6311
  import * as React43 from "react";
6329
- import { jsx as jsx19 } from "react/jsx-runtime";
6312
+ import { jsx as jsx18 } from "react/jsx-runtime";
6330
6313
  var labelVariants = cva5(
6331
6314
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-label"
6332
6315
  );
6333
6316
  var Label3 = React43.forwardRef((_a, ref) => {
6334
6317
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6335
- return /* @__PURE__ */ jsx19(
6318
+ return /* @__PURE__ */ jsx18(
6336
6319
  LabelPrimitive.Root,
6337
6320
  __spreadValues({
6338
6321
  ref,
@@ -6342,17 +6325,314 @@ var Label3 = React43.forwardRef((_a, ref) => {
6342
6325
  });
6343
6326
  Label3.displayName = LabelPrimitive.Root.displayName;
6344
6327
 
6345
- // src/components/Form/form-field.tsx
6328
+ // src/components/Form/form-component.tsx
6329
+ import { jsx as jsx19 } from "react/jsx-runtime";
6330
+ var FormFieldContext = React44.createContext(
6331
+ null
6332
+ );
6333
+ function getErrorMessage(error) {
6334
+ const message2 = error == null ? void 0 : error.message;
6335
+ return typeof message2 === "string" ? message2 : void 0;
6336
+ }
6337
+ function normalizeSearchText(value) {
6338
+ return String(value != null ? value : "").normalize("NFD").replace(new RegExp("\\p{Diacritic}", "gu"), "").toLowerCase();
6339
+ }
6340
+ function getDefaultOptionValue(item) {
6341
+ var _a;
6342
+ if (typeof item === "string") return item;
6343
+ if (item && typeof item === "object" && "value" in item) {
6344
+ return String((_a = item.value) != null ? _a : "");
6345
+ }
6346
+ return String(item != null ? item : "");
6347
+ }
6348
+ function getDefaultOptionLabel(item) {
6349
+ if (item && typeof item === "object" && "label" in item) {
6350
+ return item.label;
6351
+ }
6352
+ return getDefaultOptionValue(item);
6353
+ }
6354
+ function getNextEnabledIndex(options, currentIndex, direction) {
6355
+ var _a;
6356
+ if (!options.length) return -1;
6357
+ let nextIndex = currentIndex;
6358
+ for (let index = 0; index < options.length; index += 1) {
6359
+ nextIndex = (nextIndex + direction + options.length) % options.length;
6360
+ if (!((_a = options[nextIndex]) == null ? void 0 : _a.disabled)) {
6361
+ return nextIndex;
6362
+ }
6363
+ }
6364
+ return -1;
6365
+ }
6366
+ var FormItemContext = React44.createContext(null);
6367
+ var FormItem = React44.forwardRef((_a, ref) => {
6368
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6369
+ const id = React44.useId();
6370
+ return /* @__PURE__ */ jsx19(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx19("div", __spreadValues({ ref, className: cn("space-y-2", className) }, props)) });
6371
+ });
6372
+ FormItem.displayName = "FormItem";
6373
+ var useFormField = () => {
6374
+ var _a;
6375
+ const generatedId = React44.useId();
6376
+ const fieldContext = React44.useContext(FormFieldContext);
6377
+ const itemContext = React44.useContext(FormItemContext);
6378
+ const formContext = useFormContext();
6379
+ const id = (_a = itemContext == null ? void 0 : itemContext.id) != null ? _a : generatedId;
6380
+ if (!fieldContext || !formContext) {
6381
+ return {
6382
+ id,
6383
+ formItemId: `${id}-form-item`,
6384
+ formDescriptionId: `${id}-form-item-description`,
6385
+ formMessageId: `${id}-form-item-message`,
6386
+ error: void 0
6387
+ };
6388
+ }
6389
+ const fieldState = formContext.getFieldState(
6390
+ fieldContext.name,
6391
+ formContext.formState
6392
+ );
6393
+ return __spreadValues({
6394
+ id,
6395
+ name: fieldContext.name,
6396
+ formItemId: `${id}-form-item`,
6397
+ formDescriptionId: `${id}-form-item-description`,
6398
+ formMessageId: `${id}-form-item-message`
6399
+ }, fieldState);
6400
+ };
6401
+ var FormLabel = React44.forwardRef((_a, ref) => {
6402
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6403
+ const { error, formItemId } = useFormField();
6404
+ return /* @__PURE__ */ jsx19(
6405
+ Label3,
6406
+ __spreadValues({
6407
+ ref,
6408
+ className: cn(error && "text-destructive", className),
6409
+ htmlFor: formItemId
6410
+ }, props)
6411
+ );
6412
+ });
6413
+ FormLabel.displayName = "FormLabel";
6414
+ var FormControl = React44.forwardRef((_a, ref) => {
6415
+ var props = __objRest(_a, []);
6416
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
6417
+ return /* @__PURE__ */ jsx19(
6418
+ Slot4,
6419
+ __spreadValues({
6420
+ ref,
6421
+ id: formItemId,
6422
+ "aria-describedby": error ? `${formDescriptionId} ${formMessageId}` : formDescriptionId,
6423
+ "aria-invalid": Boolean(error)
6424
+ }, props)
6425
+ );
6426
+ });
6427
+ FormControl.displayName = "FormControl";
6428
+ var FormMessage = React44.forwardRef((_a, ref) => {
6429
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
6430
+ const { error, formMessageId } = useFormField();
6431
+ const body = error ? getErrorMessage(error) : children;
6432
+ if (!body) return null;
6433
+ return /* @__PURE__ */ jsx19(
6434
+ "p",
6435
+ __spreadProps(__spreadValues({
6436
+ ref,
6437
+ id: formMessageId,
6438
+ className: cn("text-[0.8rem] font-medium text-destructive", className)
6439
+ }, props), {
6440
+ children: body
6441
+ })
6442
+ );
6443
+ });
6444
+ FormMessage.displayName = "FormMessage";
6445
+ var FormDescription = React44.forwardRef((_a, ref) => {
6446
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6447
+ const { formDescriptionId } = useFormField();
6448
+ return /* @__PURE__ */ jsx19(
6449
+ "p",
6450
+ __spreadValues({
6451
+ ref,
6452
+ id: formDescriptionId,
6453
+ className: cn("text-[0.8rem] text-muted-foreground", className)
6454
+ }, props)
6455
+ );
6456
+ });
6457
+ FormDescription.displayName = "FormDescription";
6458
+
6459
+ // src/components/Form/form.tsx
6460
+ import {
6461
+ FormProvider
6462
+ } from "react-hook-form";
6463
+ import { jsx as jsx20 } from "react/jsx-runtime";
6464
+ function Form({
6465
+ children,
6466
+ methods,
6467
+ onSubmit,
6468
+ onError,
6469
+ formProps
6470
+ }) {
6471
+ const handleSubmit = onSubmit ? methods.handleSubmit(onSubmit, onError) : void 0;
6472
+ return /* @__PURE__ */ jsx20(FormProvider, __spreadProps(__spreadValues({}, methods), { children: /* @__PURE__ */ jsx20("form", __spreadProps(__spreadValues({ noValidate: true, onSubmit: handleSubmit }, formProps), { children })) }));
6473
+ }
6474
+
6475
+ // src/components/Form/form-checkbox.tsx
6346
6476
  import * as React45 from "react";
6347
- import { Slot as Slot4 } from "@radix-ui/react-slot";
6348
6477
  import { Asterisk } from "lucide-react";
6349
6478
  import {
6350
6479
  Controller,
6351
- useFormContext
6480
+ useFormContext as useFormContext2
6481
+ } from "react-hook-form";
6482
+ import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
6483
+ var FormCheckbox = (_a) => {
6484
+ var _b = _a, {
6485
+ name,
6486
+ control,
6487
+ rules,
6488
+ shouldUnregister,
6489
+ defaultValue,
6490
+ label,
6491
+ description,
6492
+ requiredLabel,
6493
+ className,
6494
+ itemClassName,
6495
+ checkboxClassName,
6496
+ labelClassName,
6497
+ descriptionClassName,
6498
+ messageClassName,
6499
+ requiredLabelClassName,
6500
+ onChange
6501
+ } = _b, checkboxProps = __objRest(_b, [
6502
+ "name",
6503
+ "control",
6504
+ "rules",
6505
+ "shouldUnregister",
6506
+ "defaultValue",
6507
+ "label",
6508
+ "description",
6509
+ "requiredLabel",
6510
+ "className",
6511
+ "itemClassName",
6512
+ "checkboxClassName",
6513
+ "labelClassName",
6514
+ "descriptionClassName",
6515
+ "messageClassName",
6516
+ "requiredLabelClassName",
6517
+ "onChange"
6518
+ ]);
6519
+ var _a2;
6520
+ const generatedId = React45.useId();
6521
+ const form = useFormContext2();
6522
+ const controllerControl = control != null ? control : form == null ? void 0 : form.control;
6523
+ const checkboxId = (_a2 = checkboxProps.id) != null ? _a2 : `${generatedId}-checkbox`;
6524
+ const descriptionId = `${generatedId}-description`;
6525
+ const messageId = `${generatedId}-message`;
6526
+ return /* @__PURE__ */ jsx21(
6527
+ Controller,
6528
+ {
6529
+ control: controllerControl,
6530
+ name,
6531
+ rules,
6532
+ shouldUnregister,
6533
+ defaultValue,
6534
+ render: ({ field, fieldState }) => {
6535
+ var _a3;
6536
+ const checked = Boolean(field.value);
6537
+ const fieldError = (_a3 = fieldState.error) == null ? void 0 : _a3.message;
6538
+ const hasError = Boolean(fieldError);
6539
+ return /* @__PURE__ */ jsx21(FormItem, { className: cn("space-y-1.5", itemClassName), children: /* @__PURE__ */ jsxs11(
6540
+ "div",
6541
+ {
6542
+ className: cn(
6543
+ "flex items-start gap-3 rounded-lg border border-transparent p-1 transition-colors",
6544
+ hasError && "border-destructive/20 bg-destructive/5",
6545
+ className
6546
+ ),
6547
+ children: [
6548
+ /* @__PURE__ */ jsx21(
6549
+ Checkbox,
6550
+ __spreadProps(__spreadValues({}, checkboxProps), {
6551
+ ref: field.ref,
6552
+ id: checkboxId,
6553
+ checked,
6554
+ invalid: hasError || checkboxProps.invalid,
6555
+ "aria-invalid": hasError || checkboxProps.invalid || void 0,
6556
+ "aria-describedby": [
6557
+ description ? descriptionId : void 0,
6558
+ hasError ? messageId : void 0
6559
+ ].filter(Boolean).join(" ") || void 0,
6560
+ className: cn("mt-0.5", checkboxClassName),
6561
+ onBlur: field.onBlur,
6562
+ onCheckedChange: (value) => {
6563
+ const nextValue = value === true;
6564
+ field.onChange(nextValue);
6565
+ onChange == null ? void 0 : onChange(nextValue);
6566
+ }
6567
+ })
6568
+ ),
6569
+ /* @__PURE__ */ jsxs11("div", { className: "min-w-0 flex-1", children: [
6570
+ label ? /* @__PURE__ */ jsxs11(
6571
+ Label3,
6572
+ {
6573
+ htmlFor: checkboxId,
6574
+ className: cn(
6575
+ "inline-flex cursor-pointer items-start gap-1 text-sm font-medium leading-none text-foreground",
6576
+ checkboxProps.disabled && "cursor-not-allowed text-muted-foreground",
6577
+ hasError && "text-destructive",
6578
+ labelClassName
6579
+ ),
6580
+ children: [
6581
+ /* @__PURE__ */ jsx21("span", { children: label }),
6582
+ requiredLabel ? /* @__PURE__ */ jsx21(
6583
+ Asterisk,
6584
+ {
6585
+ "aria-hidden": "true",
6586
+ className: cn(
6587
+ "mt-0.5 h-3 w-3 shrink-0 text-red-500",
6588
+ requiredLabelClassName
6589
+ )
6590
+ }
6591
+ ) : null
6592
+ ]
6593
+ }
6594
+ ) : null,
6595
+ description ? /* @__PURE__ */ jsx21(
6596
+ "p",
6597
+ {
6598
+ id: descriptionId,
6599
+ className: cn(
6600
+ "mt-1 text-sm leading-relaxed text-muted-foreground",
6601
+ descriptionClassName
6602
+ ),
6603
+ children: description
6604
+ }
6605
+ ) : null,
6606
+ fieldError ? /* @__PURE__ */ jsx21(
6607
+ "p",
6608
+ {
6609
+ id: messageId,
6610
+ className: cn(
6611
+ "mt-1 text-sm font-medium text-destructive",
6612
+ messageClassName
6613
+ ),
6614
+ children: fieldError
6615
+ }
6616
+ ) : null
6617
+ ] })
6618
+ ]
6619
+ }
6620
+ ) });
6621
+ }
6622
+ }
6623
+ );
6624
+ };
6625
+ FormCheckbox.displayName = "FormCheckbox";
6626
+
6627
+ // src/components/Form/form-field.tsx
6628
+ import { Asterisk as Asterisk2 } from "lucide-react";
6629
+ import {
6630
+ Controller as Controller2,
6631
+ useFormContext as useFormContext3
6352
6632
  } from "react-hook-form";
6353
6633
 
6354
6634
  // src/components/input.tsx
6355
- import * as React44 from "react";
6635
+ import * as React46 from "react";
6356
6636
 
6357
6637
  // src/components/Form/utils/form-utils.ts
6358
6638
  var formInputVariants = {
@@ -6449,8 +6729,8 @@ function getFormSizeClasses(size = "md", customSize) {
6449
6729
  }
6450
6730
 
6451
6731
  // src/components/input.tsx
6452
- import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
6453
- var Input = React44.forwardRef(
6732
+ import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
6733
+ var Input = React46.forwardRef(
6454
6734
  (_a, ref) => {
6455
6735
  var _b = _a, {
6456
6736
  className,
@@ -6483,8 +6763,8 @@ var Input = React44.forwardRef(
6483
6763
  const iconSizeClass = size === "2xl" ? "text-[1.3rem]" : size === "xl" ? "text-[1.2rem]" : size === "lg" ? "text-[1.15rem]" : size === "2xs" || size === "xs" ? "text-[0.85rem]" : "text-[1rem]";
6484
6764
  const iconPositionClass = size === "2xs" || size === "xs" ? "left-2" : size === "xl" || size === "2xl" ? "left-4" : "left-3";
6485
6765
  const trailingIconPositionClass = size === "2xs" || size === "xs" ? "right-2" : size === "xl" || size === "2xl" ? "right-4" : "right-3";
6486
- return /* @__PURE__ */ jsxs11("div", { className: cn("relative", disabled && "opacity-80"), children: [
6487
- leading ? /* @__PURE__ */ jsx20(
6766
+ return /* @__PURE__ */ jsxs12("div", { className: cn("relative", disabled && "opacity-80"), children: [
6767
+ leading ? /* @__PURE__ */ jsx22(
6488
6768
  "span",
6489
6769
  {
6490
6770
  className: cn(
@@ -6496,7 +6776,7 @@ var Input = React44.forwardRef(
6496
6776
  children: leading
6497
6777
  }
6498
6778
  ) : null,
6499
- /* @__PURE__ */ jsx20(
6779
+ /* @__PURE__ */ jsx22(
6500
6780
  "input",
6501
6781
  __spreadValues({
6502
6782
  ref,
@@ -6514,7 +6794,7 @@ var Input = React44.forwardRef(
6514
6794
  "data-private": true
6515
6795
  }, props)
6516
6796
  ),
6517
- trailing ? /* @__PURE__ */ jsx20(
6797
+ trailing ? /* @__PURE__ */ jsx22(
6518
6798
  "span",
6519
6799
  {
6520
6800
  className: cn(
@@ -6532,11 +6812,8 @@ var Input = React44.forwardRef(
6532
6812
  Input.displayName = "Input";
6533
6813
 
6534
6814
  // src/components/Form/form-field.tsx
6535
- import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
6536
- var FormFieldContext = React45.createContext(
6537
- null
6538
- );
6539
- function getErrorMessage(error) {
6815
+ import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
6816
+ function getErrorMessage2(error) {
6540
6817
  const message2 = error == null ? void 0 : error.message;
6541
6818
  return typeof message2 === "string" ? message2 : void 0;
6542
6819
  }
@@ -6563,233 +6840,32 @@ var FormField = (_a) => {
6563
6840
  trailing,
6564
6841
  invalid,
6565
6842
  onChange
6566
- } = _b, inputProps = __objRest(_b, [
6567
- "name",
6568
- "control",
6569
- "label",
6570
- "placeholder",
6571
- "requiredLabel",
6572
- "className",
6573
- "classNameDefault",
6574
- "itemClassName",
6575
- "labelClassName",
6576
- "messageClassName",
6577
- "requiredLabelClassName",
6578
- "variant",
6579
- "size",
6580
- "customSize",
6581
- "rules",
6582
- "shouldUnregister",
6583
- "defaultValue",
6584
- "leading",
6585
- "trailing",
6586
- "invalid",
6587
- "onChange"
6588
- ]);
6589
- const form = useFormContext();
6590
- const controllerControl = control != null ? control : form == null ? void 0 : form.control;
6591
- return /* @__PURE__ */ jsx21(FormFieldContext.Provider, { value: { name }, children: /* @__PURE__ */ jsx21(
6592
- Controller,
6593
- {
6594
- control: controllerControl,
6595
- name,
6596
- rules,
6597
- shouldUnregister,
6598
- defaultValue,
6599
- render: ({ field, fieldState }) => {
6600
- var _a2;
6601
- const fieldError = getErrorMessage(fieldState.error);
6602
- return /* @__PURE__ */ jsxs12(FormItem, { className: itemClassName, children: [
6603
- label ? /* @__PURE__ */ jsxs12(
6604
- FormLabel,
6605
- {
6606
- className: cn("flex items-center gap-0.5", labelClassName),
6607
- children: [
6608
- /* @__PURE__ */ jsx21("span", { children: label }),
6609
- requiredLabel ? /* @__PURE__ */ jsx21(
6610
- Asterisk,
6611
- {
6612
- "aria-hidden": "true",
6613
- className: cn(
6614
- "h-3 w-3 shrink-0 text-red-500",
6615
- requiredLabelClassName
6616
- )
6617
- }
6618
- ) : null
6619
- ]
6620
- }
6621
- ) : null,
6622
- /* @__PURE__ */ jsx21(FormControl, { children: /* @__PURE__ */ jsx21(
6623
- Input,
6624
- __spreadProps(__spreadValues(__spreadValues({}, field), inputProps), {
6625
- value: (_a2 = field.value) != null ? _a2 : "",
6626
- onChange: (event) => {
6627
- field.onChange(event);
6628
- onChange == null ? void 0 : onChange(event.target.value);
6629
- },
6630
- onBlur: (event) => {
6631
- var _a3;
6632
- field.onBlur();
6633
- (_a3 = inputProps.onBlur) == null ? void 0 : _a3.call(inputProps, event);
6634
- },
6635
- ref: field.ref,
6636
- leading,
6637
- trailing,
6638
- invalid: invalid || Boolean(fieldError),
6639
- variant,
6640
- size,
6641
- customSize,
6642
- placeholder,
6643
- className: cn(className),
6644
- classNameDefault
6645
- })
6646
- ) }),
6647
- fieldError ? /* @__PURE__ */ jsx21(FormMessage, { className: messageClassName, children: fieldError }) : null
6648
- ] });
6649
- }
6650
- }
6651
- ) });
6652
- };
6653
- FormField.displayName = "FormField";
6654
- var FormItemContext = React45.createContext(null);
6655
- var FormItem = React45.forwardRef((_a, ref) => {
6656
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6657
- const id = React45.useId();
6658
- return /* @__PURE__ */ jsx21(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx21("div", __spreadValues({ ref, className: cn("space-y-2", className) }, props)) });
6659
- });
6660
- FormItem.displayName = "FormItem";
6661
- var useFormField = () => {
6662
- var _a;
6663
- const generatedId = React45.useId();
6664
- const fieldContext = React45.useContext(FormFieldContext);
6665
- const itemContext = React45.useContext(FormItemContext);
6666
- const formContext = useFormContext();
6667
- const id = (_a = itemContext == null ? void 0 : itemContext.id) != null ? _a : generatedId;
6668
- if (!fieldContext || !formContext) {
6669
- return {
6670
- id,
6671
- formItemId: `${id}-form-item`,
6672
- formDescriptionId: `${id}-form-item-description`,
6673
- formMessageId: `${id}-form-item-message`,
6674
- error: void 0
6675
- };
6676
- }
6677
- const fieldState = formContext.getFieldState(
6678
- fieldContext.name,
6679
- formContext.formState
6680
- );
6681
- return __spreadValues({
6682
- id,
6683
- name: fieldContext.name,
6684
- formItemId: `${id}-form-item`,
6685
- formDescriptionId: `${id}-form-item-description`,
6686
- formMessageId: `${id}-form-item-message`
6687
- }, fieldState);
6688
- };
6689
- var FormLabel = React45.forwardRef((_a, ref) => {
6690
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6691
- const { error, formItemId } = useFormField();
6692
- return /* @__PURE__ */ jsx21(
6693
- Label3,
6694
- __spreadValues({
6695
- ref,
6696
- className: cn(error && "text-destructive", className),
6697
- htmlFor: formItemId
6698
- }, props)
6699
- );
6700
- });
6701
- FormLabel.displayName = "FormLabel";
6702
- var FormControl = React45.forwardRef((_a, ref) => {
6703
- var props = __objRest(_a, []);
6704
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
6705
- return /* @__PURE__ */ jsx21(
6706
- Slot4,
6707
- __spreadValues({
6708
- ref,
6709
- id: formItemId,
6710
- "aria-describedby": error ? `${formDescriptionId} ${formMessageId}` : formDescriptionId,
6711
- "aria-invalid": Boolean(error)
6712
- }, props)
6713
- );
6714
- });
6715
- FormControl.displayName = "FormControl";
6716
- var FormDescription = React45.forwardRef((_a, ref) => {
6717
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6718
- const { formDescriptionId } = useFormField();
6719
- return /* @__PURE__ */ jsx21(
6720
- "p",
6721
- __spreadValues({
6722
- ref,
6723
- id: formDescriptionId,
6724
- className: cn("text-[0.8rem] text-muted-foreground", className)
6725
- }, props)
6726
- );
6727
- });
6728
- FormDescription.displayName = "FormDescription";
6729
- var FormMessage = React45.forwardRef((_a, ref) => {
6730
- var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
6731
- const { error, formMessageId } = useFormField();
6732
- const body = error ? getErrorMessage(error) : children;
6733
- if (!body) return null;
6734
- return /* @__PURE__ */ jsx21(
6735
- "p",
6736
- __spreadProps(__spreadValues({
6737
- ref,
6738
- id: formMessageId,
6739
- className: cn("text-[0.8rem] font-medium text-destructive", className)
6740
- }, props), {
6741
- children: body
6742
- })
6743
- );
6744
- });
6745
- FormMessage.displayName = "FormMessage";
6746
-
6747
- // src/components/Form/form-checkbox.tsx
6748
- import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
6749
- var FormCheckbox = (_a) => {
6750
- var _b = _a, {
6751
- name,
6752
- control,
6753
- rules,
6754
- shouldUnregister,
6755
- defaultValue,
6756
- label,
6757
- description,
6758
- requiredLabel,
6759
- className,
6760
- itemClassName,
6761
- checkboxClassName,
6762
- labelClassName,
6763
- descriptionClassName,
6764
- messageClassName,
6765
- requiredLabelClassName,
6766
- onChange
6767
- } = _b, checkboxProps = __objRest(_b, [
6843
+ } = _b, inputProps = __objRest(_b, [
6768
6844
  "name",
6769
6845
  "control",
6770
- "rules",
6771
- "shouldUnregister",
6772
- "defaultValue",
6773
6846
  "label",
6774
- "description",
6847
+ "placeholder",
6775
6848
  "requiredLabel",
6776
6849
  "className",
6850
+ "classNameDefault",
6777
6851
  "itemClassName",
6778
- "checkboxClassName",
6779
6852
  "labelClassName",
6780
- "descriptionClassName",
6781
6853
  "messageClassName",
6782
6854
  "requiredLabelClassName",
6855
+ "variant",
6856
+ "size",
6857
+ "customSize",
6858
+ "rules",
6859
+ "shouldUnregister",
6860
+ "defaultValue",
6861
+ "leading",
6862
+ "trailing",
6863
+ "invalid",
6783
6864
  "onChange"
6784
6865
  ]);
6785
- var _a2;
6786
- const generatedId = React46.useId();
6787
- const form = useFormContext2();
6866
+ const form = useFormContext3();
6788
6867
  const controllerControl = control != null ? control : form == null ? void 0 : form.control;
6789
- const checkboxId = (_a2 = checkboxProps.id) != null ? _a2 : `${generatedId}-checkbox`;
6790
- const descriptionId = `${generatedId}-description`;
6791
- const messageId = `${generatedId}-message`;
6792
- return /* @__PURE__ */ jsx22(
6868
+ return /* @__PURE__ */ jsx23(FormFieldContext.Provider, { value: { name }, children: /* @__PURE__ */ jsx23(
6793
6869
  Controller2,
6794
6870
  {
6795
6871
  control: controllerControl,
@@ -6798,102 +6874,67 @@ var FormCheckbox = (_a) => {
6798
6874
  shouldUnregister,
6799
6875
  defaultValue,
6800
6876
  render: ({ field, fieldState }) => {
6801
- var _a3;
6802
- const checked = Boolean(field.value);
6803
- const fieldError = (_a3 = fieldState.error) == null ? void 0 : _a3.message;
6804
- const hasError = Boolean(fieldError);
6805
- return /* @__PURE__ */ jsx22(FormItem, { className: cn("space-y-1.5", itemClassName), children: /* @__PURE__ */ jsxs13(
6806
- "div",
6807
- {
6808
- className: cn(
6809
- "flex items-start gap-3 rounded-lg border border-transparent p-1 transition-colors",
6810
- hasError && "border-destructive/20 bg-destructive/5",
6811
- className
6812
- ),
6813
- children: [
6814
- /* @__PURE__ */ jsx22(
6815
- Checkbox,
6816
- __spreadProps(__spreadValues({}, checkboxProps), {
6817
- ref: field.ref,
6818
- id: checkboxId,
6819
- checked,
6820
- invalid: hasError || checkboxProps.invalid,
6821
- "aria-invalid": hasError || checkboxProps.invalid || void 0,
6822
- "aria-describedby": [description ? descriptionId : void 0, hasError ? messageId : void 0].filter(Boolean).join(" ") || void 0,
6823
- className: cn("mt-0.5", checkboxClassName),
6824
- onBlur: field.onBlur,
6825
- onCheckedChange: (value) => {
6826
- const nextValue = value === true;
6827
- field.onChange(nextValue);
6828
- onChange == null ? void 0 : onChange(nextValue);
6829
- }
6830
- })
6831
- ),
6832
- /* @__PURE__ */ jsxs13("div", { className: "min-w-0 flex-1", children: [
6833
- label ? /* @__PURE__ */ jsxs13(
6834
- Label3,
6835
- {
6836
- htmlFor: checkboxId,
6837
- className: cn(
6838
- "inline-flex cursor-pointer items-start gap-1 text-sm font-medium leading-none text-foreground",
6839
- checkboxProps.disabled && "cursor-not-allowed text-muted-foreground",
6840
- hasError && "text-destructive",
6841
- labelClassName
6842
- ),
6843
- children: [
6844
- /* @__PURE__ */ jsx22("span", { children: label }),
6845
- requiredLabel ? /* @__PURE__ */ jsx22(
6846
- Asterisk2,
6847
- {
6848
- "aria-hidden": "true",
6849
- className: cn(
6850
- "mt-0.5 h-3 w-3 shrink-0 text-red-500",
6851
- requiredLabelClassName
6852
- )
6853
- }
6854
- ) : null
6855
- ]
6856
- }
6857
- ) : null,
6858
- description ? /* @__PURE__ */ jsx22(
6859
- "p",
6860
- {
6861
- id: descriptionId,
6862
- className: cn(
6863
- "mt-1 text-sm leading-relaxed text-muted-foreground",
6864
- descriptionClassName
6865
- ),
6866
- children: description
6867
- }
6868
- ) : null,
6869
- fieldError ? /* @__PURE__ */ jsx22(
6870
- "p",
6877
+ var _a2;
6878
+ const fieldError = getErrorMessage2(fieldState.error);
6879
+ return /* @__PURE__ */ jsxs13(FormItem, { className: itemClassName, children: [
6880
+ label ? /* @__PURE__ */ jsxs13(
6881
+ FormLabel,
6882
+ {
6883
+ className: cn("flex items-center gap-0.5", labelClassName),
6884
+ children: [
6885
+ /* @__PURE__ */ jsx23("span", { children: label }),
6886
+ requiredLabel ? /* @__PURE__ */ jsx23(
6887
+ Asterisk2,
6871
6888
  {
6872
- id: messageId,
6889
+ "aria-hidden": "true",
6873
6890
  className: cn(
6874
- "mt-1 text-sm font-medium text-destructive",
6875
- messageClassName
6876
- ),
6877
- children: fieldError
6891
+ "h-3 w-3 shrink-0 text-red-500",
6892
+ requiredLabelClassName
6893
+ )
6878
6894
  }
6879
6895
  ) : null
6880
- ] })
6881
- ]
6882
- }
6883
- ) });
6896
+ ]
6897
+ }
6898
+ ) : null,
6899
+ /* @__PURE__ */ jsx23(FormControl, { children: /* @__PURE__ */ jsx23(
6900
+ Input,
6901
+ __spreadProps(__spreadValues(__spreadValues({}, field), inputProps), {
6902
+ value: (_a2 = field.value) != null ? _a2 : "",
6903
+ onChange: (event) => {
6904
+ field.onChange(event);
6905
+ onChange == null ? void 0 : onChange(event.target.value);
6906
+ },
6907
+ onBlur: (event) => {
6908
+ var _a3;
6909
+ field.onBlur();
6910
+ (_a3 = inputProps.onBlur) == null ? void 0 : _a3.call(inputProps, event);
6911
+ },
6912
+ ref: field.ref,
6913
+ leading,
6914
+ trailing,
6915
+ invalid: invalid || Boolean(fieldError),
6916
+ variant,
6917
+ size,
6918
+ customSize,
6919
+ placeholder,
6920
+ className: cn(className),
6921
+ classNameDefault
6922
+ })
6923
+ ) }),
6924
+ fieldError ? /* @__PURE__ */ jsx23(FormMessage, { className: messageClassName, children: fieldError }) : null
6925
+ ] });
6884
6926
  }
6885
6927
  }
6886
- );
6928
+ ) });
6887
6929
  };
6888
- FormCheckbox.displayName = "FormCheckbox";
6930
+ FormField.displayName = "FormField";
6889
6931
 
6890
6932
  // src/components/Form/form-select.tsx
6891
6933
  import * as React48 from "react";
6892
- import { Slot as Slot5 } from "@radix-ui/react-slot";
6893
6934
  import { Asterisk as Asterisk3 } from "lucide-react";
6894
6935
  import {
6895
6936
  Controller as Controller3,
6896
- useFormContext as useFormContext3
6937
+ useFormContext as useFormContext4
6897
6938
  } from "react-hook-form";
6898
6939
 
6899
6940
  // src/components/select.tsx
@@ -6905,7 +6946,7 @@ import {
6905
6946
  } from "@radix-ui/react-icons";
6906
6947
  import * as SelectPrimitive from "@radix-ui/react-select";
6907
6948
  import * as React47 from "react";
6908
- import { jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
6949
+ import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
6909
6950
  var Select2 = SelectPrimitive.Root;
6910
6951
  var SelectGroup = SelectPrimitive.Group;
6911
6952
  var SelectValue = SelectPrimitive.Value;
@@ -6922,7 +6963,7 @@ var SelectTrigger = React47.forwardRef((_a, ref) => {
6922
6963
  }, props), {
6923
6964
  children: [
6924
6965
  children,
6925
- /* @__PURE__ */ jsx23(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx23(CaretSortIcon, { className: "h-4 w-4 opacity-50" }) })
6966
+ /* @__PURE__ */ jsx24(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx24(CaretSortIcon, { className: "h-4 w-4 opacity-50" }) })
6926
6967
  ]
6927
6968
  })
6928
6969
  );
@@ -6930,7 +6971,7 @@ var SelectTrigger = React47.forwardRef((_a, ref) => {
6930
6971
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
6931
6972
  var SelectScrollUpButton = React47.forwardRef((_a, ref) => {
6932
6973
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6933
- return /* @__PURE__ */ jsx23(
6974
+ return /* @__PURE__ */ jsx24(
6934
6975
  SelectPrimitive.ScrollUpButton,
6935
6976
  __spreadProps(__spreadValues({
6936
6977
  ref,
@@ -6939,14 +6980,14 @@ var SelectScrollUpButton = React47.forwardRef((_a, ref) => {
6939
6980
  className
6940
6981
  )
6941
6982
  }, props), {
6942
- children: /* @__PURE__ */ jsx23(ChevronUpIcon, {})
6983
+ children: /* @__PURE__ */ jsx24(ChevronUpIcon, {})
6943
6984
  })
6944
6985
  );
6945
6986
  });
6946
6987
  SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
6947
6988
  var SelectScrollDownButton = React47.forwardRef((_a, ref) => {
6948
6989
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6949
- return /* @__PURE__ */ jsx23(
6990
+ return /* @__PURE__ */ jsx24(
6950
6991
  SelectPrimitive.ScrollDownButton,
6951
6992
  __spreadProps(__spreadValues({
6952
6993
  ref,
@@ -6955,14 +6996,14 @@ var SelectScrollDownButton = React47.forwardRef((_a, ref) => {
6955
6996
  className
6956
6997
  )
6957
6998
  }, props), {
6958
- children: /* @__PURE__ */ jsx23(ChevronDownIcon2, {})
6999
+ children: /* @__PURE__ */ jsx24(ChevronDownIcon2, {})
6959
7000
  })
6960
7001
  );
6961
7002
  });
6962
7003
  SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
6963
7004
  var SelectContent = React47.forwardRef((_a, ref) => {
6964
7005
  var _b = _a, { className, children, position = "popper" } = _b, props = __objRest(_b, ["className", "children", "position"]);
6965
- return /* @__PURE__ */ jsx23(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs14(
7006
+ return /* @__PURE__ */ jsx24(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs14(
6966
7007
  SelectPrimitive.Content,
6967
7008
  __spreadProps(__spreadValues({
6968
7009
  ref,
@@ -6974,8 +7015,8 @@ var SelectContent = React47.forwardRef((_a, ref) => {
6974
7015
  position
6975
7016
  }, props), {
6976
7017
  children: [
6977
- /* @__PURE__ */ jsx23(SelectScrollUpButton, {}),
6978
- /* @__PURE__ */ jsx23(
7018
+ /* @__PURE__ */ jsx24(SelectScrollUpButton, {}),
7019
+ /* @__PURE__ */ jsx24(
6979
7020
  SelectPrimitive.Viewport,
6980
7021
  {
6981
7022
  className: cn(
@@ -6985,7 +7026,7 @@ var SelectContent = React47.forwardRef((_a, ref) => {
6985
7026
  children
6986
7027
  }
6987
7028
  ),
6988
- /* @__PURE__ */ jsx23(SelectScrollDownButton, {})
7029
+ /* @__PURE__ */ jsx24(SelectScrollDownButton, {})
6989
7030
  ]
6990
7031
  })
6991
7032
  ) });
@@ -6993,7 +7034,7 @@ var SelectContent = React47.forwardRef((_a, ref) => {
6993
7034
  SelectContent.displayName = SelectPrimitive.Content.displayName;
6994
7035
  var SelectLabel = React47.forwardRef((_a, ref) => {
6995
7036
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6996
- return /* @__PURE__ */ jsx23(
7037
+ return /* @__PURE__ */ jsx24(
6997
7038
  SelectPrimitive.Label,
6998
7039
  __spreadValues({
6999
7040
  ref,
@@ -7014,8 +7055,8 @@ var SelectItem = React47.forwardRef((_a, ref) => {
7014
7055
  )
7015
7056
  }, props), {
7016
7057
  children: [
7017
- /* @__PURE__ */ jsx23("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx23(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx23(CheckIcon4, { className: "h-4 w-4" }) }) }),
7018
- /* @__PURE__ */ jsx23(SelectPrimitive.ItemText, { children })
7058
+ /* @__PURE__ */ jsx24("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx24(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx24(CheckIcon4, { className: "h-4 w-4" }) }) }),
7059
+ /* @__PURE__ */ jsx24(SelectPrimitive.ItemText, { children })
7019
7060
  ]
7020
7061
  })
7021
7062
  );
@@ -7023,7 +7064,7 @@ var SelectItem = React47.forwardRef((_a, ref) => {
7023
7064
  SelectItem.displayName = SelectPrimitive.Item.displayName;
7024
7065
  var SelectSeparator = React47.forwardRef((_a, ref) => {
7025
7066
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7026
- return /* @__PURE__ */ jsx23(
7067
+ return /* @__PURE__ */ jsx24(
7027
7068
  SelectPrimitive.Separator,
7028
7069
  __spreadValues({
7029
7070
  ref,
@@ -7034,114 +7075,14 @@ var SelectSeparator = React47.forwardRef((_a, ref) => {
7034
7075
  SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
7035
7076
 
7036
7077
  // src/components/Form/form-select.tsx
7037
- import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
7038
- var FormFieldContext2 = React48.createContext(
7039
- null
7040
- );
7041
- function getErrorMessage2(error) {
7042
- const message2 = error == null ? void 0 : error.message;
7043
- return typeof message2 === "string" ? message2 : void 0;
7044
- }
7045
- var FormItemContext2 = React48.createContext(null);
7046
- var FormItem2 = React48.forwardRef((_a, ref) => {
7047
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7048
- const id = React48.useId();
7049
- return /* @__PURE__ */ jsx24(FormItemContext2.Provider, { value: { id }, children: /* @__PURE__ */ jsx24("div", __spreadValues({ ref, className: cn("space-y-2", className) }, props)) });
7050
- });
7051
- FormItem2.displayName = "FormItem";
7052
- var useFormField2 = () => {
7053
- var _a;
7054
- const generatedId = React48.useId();
7055
- const fieldContext = React48.useContext(FormFieldContext2);
7056
- const itemContext = React48.useContext(FormItemContext2);
7057
- const formContext = useFormContext3();
7058
- const id = (_a = itemContext == null ? void 0 : itemContext.id) != null ? _a : generatedId;
7059
- if (!fieldContext || !formContext) {
7060
- return {
7061
- id,
7062
- formItemId: `${id}-form-item`,
7063
- formDescriptionId: `${id}-form-item-description`,
7064
- formMessageId: `${id}-form-item-message`,
7065
- error: void 0
7066
- };
7067
- }
7068
- const fieldState = formContext.getFieldState(
7069
- fieldContext.name,
7070
- formContext.formState
7071
- );
7072
- return __spreadValues({
7073
- id,
7074
- name: fieldContext.name,
7075
- formItemId: `${id}-form-item`,
7076
- formDescriptionId: `${id}-form-item-description`,
7077
- formMessageId: `${id}-form-item-message`
7078
- }, fieldState);
7079
- };
7080
- var FormLabel2 = React48.forwardRef((_a, ref) => {
7081
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7082
- const { error, formItemId } = useFormField2();
7083
- return /* @__PURE__ */ jsx24(
7084
- Label3,
7085
- __spreadValues({
7086
- ref,
7087
- className: cn(error && "text-destructive", className),
7088
- htmlFor: formItemId
7089
- }, props)
7090
- );
7091
- });
7092
- FormLabel2.displayName = "FormLabel";
7093
- var FormControl2 = React48.forwardRef((_a, ref) => {
7094
- var props = __objRest(_a, []);
7095
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField2();
7096
- return /* @__PURE__ */ jsx24(
7097
- Slot5,
7098
- __spreadValues({
7099
- ref,
7100
- id: formItemId,
7101
- "aria-describedby": error ? `${formDescriptionId} ${formMessageId}` : formDescriptionId,
7102
- "aria-invalid": Boolean(error)
7103
- }, props)
7104
- );
7105
- });
7106
- FormControl2.displayName = "FormControl";
7107
- var FormMessage2 = React48.forwardRef((_a, ref) => {
7108
- var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
7109
- const { error, formMessageId } = useFormField2();
7110
- const body = error ? getErrorMessage2(error) : children;
7111
- if (!body) return null;
7112
- return /* @__PURE__ */ jsx24(
7113
- "p",
7114
- __spreadProps(__spreadValues({
7115
- ref,
7116
- id: formMessageId,
7117
- className: cn("text-[0.8rem] font-medium text-destructive", className)
7118
- }, props), {
7119
- children: body
7120
- })
7121
- );
7122
- });
7123
- FormMessage2.displayName = "FormMessage";
7124
- var getDefaultOptionValue = (item) => {
7125
- var _a;
7126
- if (typeof item === "string") return item;
7127
- if (item && typeof item === "object" && "value" in item) {
7128
- return String((_a = item.value) != null ? _a : "");
7129
- }
7130
- return String(item != null ? item : "");
7131
- };
7132
- var getDefaultOptionLabel = (item) => {
7133
- if (item && typeof item === "object" && "label" in item) {
7134
- return item.label;
7135
- }
7136
- return getDefaultOptionValue(item);
7137
- };
7078
+ import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
7138
7079
  var FormSelect = ({
7139
7080
  name,
7140
7081
  control,
7141
7082
  rules,
7142
7083
  shouldUnregister,
7143
7084
  defaultValue,
7144
- placeholder,
7085
+ placeholder = "Seleccionar opci\xF3n",
7145
7086
  label,
7146
7087
  requiredLabel,
7147
7088
  className,
@@ -7170,14 +7111,12 @@ var FormSelect = ({
7170
7111
  emptyText = "No hay resultados",
7171
7112
  position = "popper"
7172
7113
  }) => {
7173
- const form = useFormContext3();
7114
+ const form = useFormContext4();
7174
7115
  const controllerControl = control != null ? control : form == null ? void 0 : form.control;
7175
- const [query, setQuery] = React48.useState("");
7176
- const searchRef = React48.useRef(null);
7177
7116
  const sizeClasses = getFormSizeClasses(size, customSize);
7178
- const triggerBase = "relative inline-flex w-full items-center justify-between text-foreground outline-none ring-offset-background transition placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50";
7117
+ const triggerBase = "relative inline-flex w-full items-center justify-between gap-2 text-foreground outline-none ring-offset-background transition placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50";
7179
7118
  const triggerSizeClass = variant === "flushed" ? sizeClasses.flushedControl : variant === "link" ? sizeClasses.linkControl : sizeClasses.control;
7180
- const contentBase = "z-50 rounded-md border border-border bg-popover text-popover-foreground shadow-md !overflow-hidden";
7119
+ const contentBase = "z-50 rounded-xl border border-border bg-popover text-popover-foreground shadow-xl outline-none";
7181
7120
  const contentViewport = "[&_[data-radix-select-viewport]]:max-h-72 [&_[data-radix-select-viewport]]:overflow-y-auto [&_[data-radix-select-viewport]]:overscroll-contain [&_[data-radix-select-viewport]]:[scrollbar-gutter:stable]";
7182
7121
  const normalizedOptions = React48.useMemo(() => {
7183
7122
  if (options) return options;
@@ -7198,16 +7137,7 @@ var FormSelect = ({
7198
7137
  items,
7199
7138
  options
7200
7139
  ]);
7201
- const filteredOptions = React48.useMemo(() => {
7202
- if (!searchable || !query.trim()) return normalizedOptions;
7203
- const normalizedQuery = query.trim().toLowerCase();
7204
- return normalizedOptions.filter((option) => {
7205
- var _a;
7206
- const label2 = typeof option.label === "string" ? option.label : String((_a = option.value) != null ? _a : "");
7207
- return `${label2} ${option.value}`.toLowerCase().includes(normalizedQuery);
7208
- });
7209
- }, [normalizedOptions, query, searchable]);
7210
- return /* @__PURE__ */ jsx24(FormFieldContext2.Provider, { value: { name }, children: /* @__PURE__ */ jsx24(
7140
+ return /* @__PURE__ */ jsx25(FormFieldContext.Provider, { value: { name }, children: /* @__PURE__ */ jsx25(
7211
7141
  Controller3,
7212
7142
  {
7213
7143
  control: controllerControl,
@@ -7217,12 +7147,20 @@ var FormSelect = ({
7217
7147
  defaultValue,
7218
7148
  render: ({ field, fieldState }) => {
7219
7149
  var _a;
7220
- const fieldError = getErrorMessage2(fieldState.error);
7150
+ const fieldError = getErrorMessage(fieldState.error);
7221
7151
  const hasError = Boolean(invalid || fieldError);
7222
- const hasOptions = filteredOptions.length > 0;
7223
- return /* @__PURE__ */ jsxs15(FormItem2, { children: [
7152
+ const handleValueChange = (value) => {
7153
+ var _a2;
7154
+ const nextOption = normalizedOptions.find(
7155
+ (option) => option.value === value
7156
+ );
7157
+ field.onChange(value);
7158
+ onChange == null ? void 0 : onChange(value);
7159
+ onChangeItem == null ? void 0 : onChangeItem((_a2 = nextOption == null ? void 0 : nextOption.data) != null ? _a2 : null);
7160
+ };
7161
+ return /* @__PURE__ */ jsxs15(FormItem, { children: [
7224
7162
  label ? /* @__PURE__ */ jsxs15(
7225
- FormLabel2,
7163
+ FormLabel,
7226
7164
  {
7227
7165
  className: cn(
7228
7166
  "flex items-center gap-0.5",
@@ -7230,8 +7168,8 @@ var FormSelect = ({
7230
7168
  labelClassName
7231
7169
  ),
7232
7170
  children: [
7233
- /* @__PURE__ */ jsx24("span", { children: label }),
7234
- requiredLabel ? /* @__PURE__ */ jsx24(
7171
+ /* @__PURE__ */ jsx25("span", { children: label }),
7172
+ requiredLabel ? /* @__PURE__ */ jsx25(
7235
7173
  Asterisk3,
7236
7174
  {
7237
7175
  "aria-hidden": "true",
@@ -7244,35 +7182,29 @@ var FormSelect = ({
7244
7182
  ]
7245
7183
  }
7246
7184
  ) : null,
7247
- /* @__PURE__ */ jsxs15(
7185
+ searchable ? /* @__PURE__ */ jsx25(
7186
+ Badge,
7187
+ {
7188
+ variant: "outline",
7189
+ className: cn(
7190
+ "w-full cursor-pointer",
7191
+ hasError && "border-destructive ring-destructive focus:ring-destructive/40",
7192
+ className
7193
+ )
7194
+ }
7195
+ ) : /* @__PURE__ */ jsxs15(
7248
7196
  Select2,
7249
7197
  {
7250
7198
  value: (_a = field.value) != null ? _a : "",
7251
- onValueChange: (value) => {
7252
- var _a2;
7253
- const selectedOption = normalizedOptions.find(
7254
- (option) => option.value === value
7255
- );
7256
- field.onChange(value);
7257
- onChange == null ? void 0 : onChange(value);
7258
- onChangeItem == null ? void 0 : onChangeItem(
7259
- (_a2 = selectedOption == null ? void 0 : selectedOption.data) != null ? _a2 : null
7260
- );
7261
- },
7262
- onOpenChange: (open) => {
7263
- if (open && searchable) {
7264
- requestAnimationFrame(() => {
7265
- var _a2;
7266
- (_a2 = searchRef.current) == null ? void 0 : _a2.focus();
7267
- });
7268
- }
7269
- if (!open) {
7270
- setQuery("");
7199
+ onValueChange: handleValueChange,
7200
+ onOpenChange: (nextOpen) => {
7201
+ if (!nextOpen) {
7202
+ field.onBlur();
7271
7203
  }
7272
7204
  },
7273
7205
  disabled,
7274
7206
  children: [
7275
- /* @__PURE__ */ jsx24(FormControl2, { children: /* @__PURE__ */ jsx24(
7207
+ /* @__PURE__ */ jsx25(FormControl, { children: /* @__PURE__ */ jsx25(
7276
7208
  SelectTrigger,
7277
7209
  {
7278
7210
  className: cn(
@@ -7282,10 +7214,10 @@ var FormSelect = ({
7282
7214
  hasError && "border-destructive ring-destructive focus:ring-destructive/40",
7283
7215
  className
7284
7216
  ),
7285
- children: /* @__PURE__ */ jsx24(SelectValue, { placeholder })
7217
+ children: /* @__PURE__ */ jsx25(SelectValue, { placeholder })
7286
7218
  }
7287
7219
  ) }),
7288
- /* @__PURE__ */ jsxs15(
7220
+ /* @__PURE__ */ jsx25(
7289
7221
  SelectContent,
7290
7222
  {
7291
7223
  position,
@@ -7293,73 +7225,41 @@ var FormSelect = ({
7293
7225
  className: cn(
7294
7226
  contentBase,
7295
7227
  contentViewport,
7296
- "w-(--radix-select-trigger-width) min-w-(--radix-select-trigger-width)",
7228
+ "w-(--radix-select-trigger-width) min-w-(--radix-select-trigger-width) overflow-hidden!",
7297
7229
  contentClassName
7298
- ),
7299
- onCloseAutoFocus: (event) => {
7300
- if (searchable) {
7301
- event.preventDefault();
7302
- }
7303
- },
7304
- onWheelCapture: (event) => {
7305
- event.stopPropagation();
7306
- },
7307
- onTouchMoveCapture: (event) => {
7308
- event.stopPropagation();
7309
- },
7310
- children: [
7311
- searchable && normalizedOptions.length > 0 ? /* @__PURE__ */ jsx24("div", { className: "sticky top-0 z-10 border-b border-border bg-popover p-2", children: /* @__PURE__ */ jsx24(
7312
- "input",
7313
- {
7314
- ref: searchRef,
7315
- value: query,
7316
- onChange: (event) => setQuery(event.target.value),
7317
- placeholder: searchPlaceholder,
7318
- className: cn(
7319
- "w-full rounded-md border border-input bg-input outline-none focus:ring-2 focus:ring-primary/20",
7320
- sizeClasses.searchInput,
7321
- searchInputClassName
7322
- ),
7323
- onKeyDown: (event) => {
7324
- if (event.key !== "Escape") {
7325
- event.stopPropagation();
7326
- }
7327
- },
7328
- onPointerDown: (event) => event.stopPropagation(),
7329
- onClick: (event) => event.stopPropagation()
7330
- }
7331
- ) }) : null,
7332
- children && !searchable ? children : null,
7333
- !children || searchable ? hasOptions ? filteredOptions.map((option) => /* @__PURE__ */ jsx24(
7334
- SelectItem,
7335
- {
7336
- value: option.value,
7337
- disabled: option.disabled,
7338
- className: cn(
7339
- sizeClasses.selectItem,
7340
- itemClassName
7341
- ),
7342
- children: option.label
7343
- },
7344
- option.value
7345
- )) : /* @__PURE__ */ jsx24(
7346
- "div",
7347
- {
7348
- className: cn(
7349
- "px-3 py-2 text-muted-foreground",
7350
- sizeClasses.message
7351
- ),
7352
- children: emptyText
7353
- }
7354
- ) : null
7355
- ]
7230
+ ),
7231
+ onWheelCapture: (event) => {
7232
+ event.stopPropagation();
7233
+ },
7234
+ onTouchMoveCapture: (event) => {
7235
+ event.stopPropagation();
7236
+ },
7237
+ children: children ? children : normalizedOptions.length > 0 ? normalizedOptions.map((option) => /* @__PURE__ */ jsx25(
7238
+ SelectItem,
7239
+ {
7240
+ value: option.value,
7241
+ disabled: option.disabled,
7242
+ className: cn(sizeClasses.selectItem, itemClassName),
7243
+ children: option.label
7244
+ },
7245
+ option.value
7246
+ )) : /* @__PURE__ */ jsx25(
7247
+ "div",
7248
+ {
7249
+ className: cn(
7250
+ "px-3 py-2 text-muted-foreground",
7251
+ sizeClasses.message
7252
+ ),
7253
+ children: emptyText
7254
+ }
7255
+ )
7356
7256
  }
7357
7257
  )
7358
7258
  ]
7359
7259
  }
7360
7260
  ),
7361
- fieldError ? /* @__PURE__ */ jsx24(
7362
- FormMessage2,
7261
+ fieldError ? /* @__PURE__ */ jsx25(
7262
+ FormMessage,
7363
7263
  {
7364
7264
  className: cn(sizeClasses.message, messageClassName),
7365
7265
  children: fieldError
@@ -7375,12 +7275,12 @@ FormSelect.displayName = "FormSelect";
7375
7275
  // src/components/hover-card.tsx
7376
7276
  import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
7377
7277
  import * as React49 from "react";
7378
- import { jsx as jsx25 } from "react/jsx-runtime";
7278
+ import { jsx as jsx26 } from "react/jsx-runtime";
7379
7279
  var HoverCard = HoverCardPrimitive.Root;
7380
7280
  var HoverCardTrigger = HoverCardPrimitive.Trigger;
7381
7281
  var HoverCardContent = React49.forwardRef((_a, ref) => {
7382
7282
  var _b = _a, { className, align = "center", sideOffset = 4 } = _b, props = __objRest(_b, ["className", "align", "sideOffset"]);
7383
- return /* @__PURE__ */ jsx25(
7283
+ return /* @__PURE__ */ jsx26(
7384
7284
  HoverCardPrimitive.Content,
7385
7285
  __spreadValues({
7386
7286
  ref,
@@ -7460,10 +7360,10 @@ var Icons = IconsApp;
7460
7360
  import { DashIcon } from "@radix-ui/react-icons";
7461
7361
  import { OTPInput, OTPInputContext } from "input-otp";
7462
7362
  import * as React50 from "react";
7463
- import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
7363
+ import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
7464
7364
  var InputOTP = React50.forwardRef((_a, ref) => {
7465
7365
  var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
7466
- return /* @__PURE__ */ jsx26(
7366
+ return /* @__PURE__ */ jsx27(
7467
7367
  OTPInput,
7468
7368
  __spreadValues({
7469
7369
  ref,
@@ -7478,7 +7378,7 @@ var InputOTP = React50.forwardRef((_a, ref) => {
7478
7378
  InputOTP.displayName = "InputOTP";
7479
7379
  var InputOTPGroup = React50.forwardRef((_a, ref) => {
7480
7380
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7481
- return /* @__PURE__ */ jsx26("div", __spreadValues({ ref, className: cn("flex items-center", className) }, props));
7381
+ return /* @__PURE__ */ jsx27("div", __spreadValues({ ref, className: cn("flex items-center", className) }, props));
7482
7382
  });
7483
7383
  InputOTPGroup.displayName = "InputOTPGroup";
7484
7384
  var InputOTPSlot = React50.forwardRef((_a, ref) => {
@@ -7498,7 +7398,7 @@ var InputOTPSlot = React50.forwardRef((_a, ref) => {
7498
7398
  }, props), {
7499
7399
  children: [
7500
7400
  char,
7501
- hasFakeCaret && /* @__PURE__ */ jsx26("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx26("div", { className: "animate-caret-blink h-4 w-px bg-foreground duration-1000" }) })
7401
+ hasFakeCaret && /* @__PURE__ */ jsx27("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx27("div", { className: "animate-caret-blink h-4 w-px bg-foreground duration-1000" }) })
7502
7402
  ]
7503
7403
  })
7504
7404
  );
@@ -7506,7 +7406,7 @@ var InputOTPSlot = React50.forwardRef((_a, ref) => {
7506
7406
  InputOTPSlot.displayName = "InputOTPSlot";
7507
7407
  var InputOTPSeparator = React50.forwardRef((_a, ref) => {
7508
7408
  var props = __objRest(_a, []);
7509
- return /* @__PURE__ */ jsx26("div", __spreadProps(__spreadValues({ ref, role: "separator" }, props), { children: /* @__PURE__ */ jsx26(DashIcon, {}) }));
7409
+ return /* @__PURE__ */ jsx27("div", __spreadProps(__spreadValues({ ref, role: "separator" }, props), { children: /* @__PURE__ */ jsx27(DashIcon, {}) }));
7510
7410
  });
7511
7411
  InputOTPSeparator.displayName = "InputOTPSeparator";
7512
7412
 
@@ -7518,7 +7418,7 @@ import {
7518
7418
  } from "@radix-ui/react-icons";
7519
7419
  import * as MenubarPrimitive from "@radix-ui/react-menubar";
7520
7420
  import * as React51 from "react";
7521
- import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
7421
+ import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
7522
7422
  var MenubarMenu = MenubarPrimitive.Menu;
7523
7423
  var MenubarGroup = MenubarPrimitive.Group;
7524
7424
  var MenubarPortal = MenubarPrimitive.Portal;
@@ -7526,7 +7426,7 @@ var MenubarSub = MenubarPrimitive.Sub;
7526
7426
  var MenubarRadioGroup = MenubarPrimitive.RadioGroup;
7527
7427
  var Menubar = React51.forwardRef((_a, ref) => {
7528
7428
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7529
- return /* @__PURE__ */ jsx27(
7429
+ return /* @__PURE__ */ jsx28(
7530
7430
  MenubarPrimitive.Root,
7531
7431
  __spreadValues({
7532
7432
  ref,
@@ -7540,7 +7440,7 @@ var Menubar = React51.forwardRef((_a, ref) => {
7540
7440
  Menubar.displayName = MenubarPrimitive.Root.displayName;
7541
7441
  var MenubarTrigger = React51.forwardRef((_a, ref) => {
7542
7442
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7543
- return /* @__PURE__ */ jsx27(
7443
+ return /* @__PURE__ */ jsx28(
7544
7444
  MenubarPrimitive.Trigger,
7545
7445
  __spreadValues({
7546
7446
  ref,
@@ -7566,7 +7466,7 @@ var MenubarSubTrigger = React51.forwardRef((_a, ref) => {
7566
7466
  }, props), {
7567
7467
  children: [
7568
7468
  children,
7569
- /* @__PURE__ */ jsx27(ChevronRightIcon4, { className: "ml-auto h-4 w-4" })
7469
+ /* @__PURE__ */ jsx28(ChevronRightIcon4, { className: "ml-auto h-4 w-4" })
7570
7470
  ]
7571
7471
  })
7572
7472
  );
@@ -7574,7 +7474,7 @@ var MenubarSubTrigger = React51.forwardRef((_a, ref) => {
7574
7474
  MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
7575
7475
  var MenubarSubContent = React51.forwardRef((_a, ref) => {
7576
7476
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7577
- return /* @__PURE__ */ jsx27(
7477
+ return /* @__PURE__ */ jsx28(
7578
7478
  MenubarPrimitive.SubContent,
7579
7479
  __spreadValues({
7580
7480
  ref,
@@ -7589,7 +7489,7 @@ MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
7589
7489
  var MenubarContent = React51.forwardRef(
7590
7490
  (_a, ref) => {
7591
7491
  var _b = _a, { className, align = "start", alignOffset = -4, sideOffset = 8 } = _b, props = __objRest(_b, ["className", "align", "alignOffset", "sideOffset"]);
7592
- return /* @__PURE__ */ jsx27(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx27(
7492
+ return /* @__PURE__ */ jsx28(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx28(
7593
7493
  MenubarPrimitive.Content,
7594
7494
  __spreadValues({
7595
7495
  ref,
@@ -7607,7 +7507,7 @@ var MenubarContent = React51.forwardRef(
7607
7507
  MenubarContent.displayName = MenubarPrimitive.Content.displayName;
7608
7508
  var MenubarItem = React51.forwardRef((_a, ref) => {
7609
7509
  var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
7610
- return /* @__PURE__ */ jsx27(
7510
+ return /* @__PURE__ */ jsx28(
7611
7511
  MenubarPrimitive.Item,
7612
7512
  __spreadValues({
7613
7513
  ref,
@@ -7633,7 +7533,7 @@ var MenubarCheckboxItem = React51.forwardRef((_a, ref) => {
7633
7533
  checked
7634
7534
  }, props), {
7635
7535
  children: [
7636
- /* @__PURE__ */ jsx27("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx27(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx27(CheckIcon5, { className: "h-4 w-4" }) }) }),
7536
+ /* @__PURE__ */ jsx28("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx28(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx28(CheckIcon5, { className: "h-4 w-4" }) }) }),
7637
7537
  children
7638
7538
  ]
7639
7539
  })
@@ -7652,7 +7552,7 @@ var MenubarRadioItem = React51.forwardRef((_a, ref) => {
7652
7552
  )
7653
7553
  }, props), {
7654
7554
  children: [
7655
- /* @__PURE__ */ jsx27("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx27(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx27(DotFilledIcon3, { className: "h-4 w-4 fill-current" }) }) }),
7555
+ /* @__PURE__ */ jsx28("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx28(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx28(DotFilledIcon3, { className: "h-4 w-4 fill-current" }) }) }),
7656
7556
  children
7657
7557
  ]
7658
7558
  })
@@ -7661,7 +7561,7 @@ var MenubarRadioItem = React51.forwardRef((_a, ref) => {
7661
7561
  MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
7662
7562
  var MenubarLabel = React51.forwardRef((_a, ref) => {
7663
7563
  var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
7664
- return /* @__PURE__ */ jsx27(
7564
+ return /* @__PURE__ */ jsx28(
7665
7565
  MenubarPrimitive.Label,
7666
7566
  __spreadValues({
7667
7567
  ref,
@@ -7676,7 +7576,7 @@ var MenubarLabel = React51.forwardRef((_a, ref) => {
7676
7576
  MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
7677
7577
  var MenubarSeparator = React51.forwardRef((_a, ref) => {
7678
7578
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7679
- return /* @__PURE__ */ jsx27(
7579
+ return /* @__PURE__ */ jsx28(
7680
7580
  MenubarPrimitive.Separator,
7681
7581
  __spreadValues({
7682
7582
  ref,
@@ -7691,7 +7591,7 @@ var MenubarShortcut = (_a) => {
7691
7591
  } = _b, props = __objRest(_b, [
7692
7592
  "className"
7693
7593
  ]);
7694
- return /* @__PURE__ */ jsx27(
7594
+ return /* @__PURE__ */ jsx28(
7695
7595
  "span",
7696
7596
  __spreadValues({
7697
7597
  className: cn(
@@ -7704,7 +7604,7 @@ var MenubarShortcut = (_a) => {
7704
7604
  MenubarShortcut.displayname = "MenubarShortcut";
7705
7605
 
7706
7606
  // src/components/modal.tsx
7707
- import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
7607
+ import { jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
7708
7608
  var Modal = ({
7709
7609
  title,
7710
7610
  description,
@@ -7718,12 +7618,12 @@ var Modal = ({
7718
7618
  onClose();
7719
7619
  }
7720
7620
  };
7721
- return /* @__PURE__ */ jsx28(Dialog, { open: isOpen, onOpenChange: onChange, children: /* @__PURE__ */ jsxs18(DialogContent, { className, children: [
7621
+ return /* @__PURE__ */ jsx29(Dialog, { open: isOpen, onOpenChange: onChange, children: /* @__PURE__ */ jsxs18(DialogContent, { className, children: [
7722
7622
  /* @__PURE__ */ jsxs18(DialogHeader, { children: [
7723
- /* @__PURE__ */ jsx28(DialogTitle, { children: title }),
7724
- /* @__PURE__ */ jsx28(DialogDescription, { children: description })
7623
+ /* @__PURE__ */ jsx29(DialogTitle, { children: title }),
7624
+ /* @__PURE__ */ jsx29(DialogDescription, { children: description })
7725
7625
  ] }),
7726
- /* @__PURE__ */ jsx28("div", { children })
7626
+ /* @__PURE__ */ jsx29("div", { children })
7727
7627
  ] }) });
7728
7628
  };
7729
7629
 
@@ -7732,7 +7632,7 @@ import { ChevronDownIcon as ChevronDownIcon3 } from "@radix-ui/react-icons";
7732
7632
  import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
7733
7633
  import { cva as cva6 } from "class-variance-authority";
7734
7634
  import * as React52 from "react";
7735
- import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
7635
+ import { jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
7736
7636
  var NavigationMenu = React52.forwardRef((_a, ref) => {
7737
7637
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
7738
7638
  return /* @__PURE__ */ jsxs19(
@@ -7746,7 +7646,7 @@ var NavigationMenu = React52.forwardRef((_a, ref) => {
7746
7646
  }, props), {
7747
7647
  children: [
7748
7648
  children,
7749
- /* @__PURE__ */ jsx29(NavigationMenuViewport, {})
7649
+ /* @__PURE__ */ jsx30(NavigationMenuViewport, {})
7750
7650
  ]
7751
7651
  })
7752
7652
  );
@@ -7754,7 +7654,7 @@ var NavigationMenu = React52.forwardRef((_a, ref) => {
7754
7654
  NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
7755
7655
  var NavigationMenuList = React52.forwardRef((_a, ref) => {
7756
7656
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7757
- return /* @__PURE__ */ jsx29(
7657
+ return /* @__PURE__ */ jsx30(
7758
7658
  NavigationMenuPrimitive.List,
7759
7659
  __spreadValues({
7760
7660
  ref,
@@ -7781,7 +7681,7 @@ var NavigationMenuTrigger = React52.forwardRef((_a, ref) => {
7781
7681
  children: [
7782
7682
  children,
7783
7683
  " ",
7784
- /* @__PURE__ */ jsx29(
7684
+ /* @__PURE__ */ jsx30(
7785
7685
  ChevronDownIcon3,
7786
7686
  {
7787
7687
  className: "relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180",
@@ -7795,7 +7695,7 @@ var NavigationMenuTrigger = React52.forwardRef((_a, ref) => {
7795
7695
  NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
7796
7696
  var NavigationMenuContent = React52.forwardRef((_a, ref) => {
7797
7697
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7798
- return /* @__PURE__ */ jsx29(
7698
+ return /* @__PURE__ */ jsx30(
7799
7699
  NavigationMenuPrimitive.Content,
7800
7700
  __spreadValues({
7801
7701
  ref,
@@ -7810,7 +7710,7 @@ NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
7810
7710
  var NavigationMenuLink = NavigationMenuPrimitive.Link;
7811
7711
  var NavigationMenuViewport = React52.forwardRef((_a, ref) => {
7812
7712
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7813
- return /* @__PURE__ */ jsx29("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx29(
7713
+ return /* @__PURE__ */ jsx30("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx30(
7814
7714
  NavigationMenuPrimitive.Viewport,
7815
7715
  __spreadValues({
7816
7716
  className: cn(
@@ -7824,7 +7724,7 @@ var NavigationMenuViewport = React52.forwardRef((_a, ref) => {
7824
7724
  NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
7825
7725
  var NavigationMenuIndicator = React52.forwardRef((_a, ref) => {
7826
7726
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7827
- return /* @__PURE__ */ jsx29(
7727
+ return /* @__PURE__ */ jsx30(
7828
7728
  NavigationMenuPrimitive.Indicator,
7829
7729
  __spreadProps(__spreadValues({
7830
7730
  ref,
@@ -7833,7 +7733,7 @@ var NavigationMenuIndicator = React52.forwardRef((_a, ref) => {
7833
7733
  className
7834
7734
  )
7835
7735
  }, props), {
7836
- children: /* @__PURE__ */ jsx29("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
7736
+ children: /* @__PURE__ */ jsx30("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
7837
7737
  })
7838
7738
  );
7839
7739
  });
@@ -7847,10 +7747,10 @@ import {
7847
7747
  } from "@radix-ui/react-icons";
7848
7748
  import * as React53 from "react";
7849
7749
  import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
7850
- import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
7750
+ import { jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
7851
7751
  var Pagination = (_a) => {
7852
7752
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7853
- return /* @__PURE__ */ jsx30(
7753
+ return /* @__PURE__ */ jsx31(
7854
7754
  "nav",
7855
7755
  __spreadValues({
7856
7756
  role: "navigation",
@@ -7862,7 +7762,7 @@ var Pagination = (_a) => {
7862
7762
  Pagination.displayName = "Pagination";
7863
7763
  var PaginationContent = React53.forwardRef((_a, ref) => {
7864
7764
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7865
- return /* @__PURE__ */ jsx30(
7765
+ return /* @__PURE__ */ jsx31(
7866
7766
  "ul",
7867
7767
  __spreadValues({
7868
7768
  ref,
@@ -7873,7 +7773,7 @@ var PaginationContent = React53.forwardRef((_a, ref) => {
7873
7773
  PaginationContent.displayName = "PaginationContent";
7874
7774
  var PaginationItem = React53.forwardRef((_a, ref) => {
7875
7775
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7876
- return /* @__PURE__ */ jsx30("li", __spreadValues({ ref, className: cn("", className) }, props));
7776
+ return /* @__PURE__ */ jsx31("li", __spreadValues({ ref, className: cn("", className) }, props));
7877
7777
  });
7878
7778
  PaginationItem.displayName = "PaginationItem";
7879
7779
  var PaginationLink = (_a) => {
@@ -7886,7 +7786,7 @@ var PaginationLink = (_a) => {
7886
7786
  "isActive",
7887
7787
  "size"
7888
7788
  ]);
7889
- return /* @__PURE__ */ jsx30(
7789
+ return /* @__PURE__ */ jsx31(
7890
7790
  "a",
7891
7791
  __spreadValues({
7892
7792
  "aria-current": isActive ? "page" : void 0,
@@ -7915,8 +7815,8 @@ var PaginationPreviousLast = (_a) => {
7915
7815
  className: cn("gap-1 pl-2.5", className)
7916
7816
  }, props), {
7917
7817
  children: [
7918
- /* @__PURE__ */ jsx30(ChevronLeft2, { className: "h-4 w-4" }),
7919
- /* @__PURE__ */ jsx30("span", { className: "sr-only", children: "Previous Last" })
7818
+ /* @__PURE__ */ jsx31(ChevronLeft2, { className: "h-4 w-4" }),
7819
+ /* @__PURE__ */ jsx31("span", { className: "sr-only", children: "Previous Last" })
7920
7820
  ]
7921
7821
  })
7922
7822
  );
@@ -7936,8 +7836,8 @@ var PaginationPrevious = (_a) => {
7936
7836
  className: cn("gap-1 pl-2.5", className)
7937
7837
  }, props), {
7938
7838
  children: [
7939
- /* @__PURE__ */ jsx30(ChevronLeftIcon, { className: "h-4 w-4" }),
7940
- /* @__PURE__ */ jsx30("span", { children: "Previous" })
7839
+ /* @__PURE__ */ jsx31(ChevronLeftIcon, { className: "h-4 w-4" }),
7840
+ /* @__PURE__ */ jsx31("span", { children: "Previous" })
7941
7841
  ]
7942
7842
  })
7943
7843
  );
@@ -7957,8 +7857,8 @@ var PaginationNext = (_a) => {
7957
7857
  className: cn("gap-1 pr-2.5", className)
7958
7858
  }, props), {
7959
7859
  children: [
7960
- /* @__PURE__ */ jsx30("span", { children: "Next" }),
7961
- /* @__PURE__ */ jsx30(ChevronRightIcon5, { className: "h-4 w-4" })
7860
+ /* @__PURE__ */ jsx31("span", { children: "Next" }),
7861
+ /* @__PURE__ */ jsx31(ChevronRightIcon5, { className: "h-4 w-4" })
7962
7862
  ]
7963
7863
  })
7964
7864
  );
@@ -7978,8 +7878,8 @@ var PaginationNextLast = (_a) => {
7978
7878
  className: cn("gap-1 pr-2.5", className)
7979
7879
  }, props), {
7980
7880
  children: [
7981
- /* @__PURE__ */ jsx30("span", { className: "sr-only", children: "Next Last" }),
7982
- /* @__PURE__ */ jsx30(ChevronRight2, { className: "h-4 w-4" })
7881
+ /* @__PURE__ */ jsx31("span", { className: "sr-only", children: "Next Last" }),
7882
+ /* @__PURE__ */ jsx31(ChevronRight2, { className: "h-4 w-4" })
7983
7883
  ]
7984
7884
  })
7985
7885
  );
@@ -7998,8 +7898,8 @@ var PaginationEllipsis = (_a) => {
7998
7898
  className: cn("flex h-9 w-9 items-center justify-center", className)
7999
7899
  }, props), {
8000
7900
  children: [
8001
- /* @__PURE__ */ jsx30(DotsHorizontalIcon2, { className: "h-4 w-4" }),
8002
- /* @__PURE__ */ jsx30("span", { className: "sr-only", children: "More pages" })
7901
+ /* @__PURE__ */ jsx31(DotsHorizontalIcon2, { className: "h-4 w-4" }),
7902
+ /* @__PURE__ */ jsx31("span", { className: "sr-only", children: "More pages" })
8003
7903
  ]
8004
7904
  })
8005
7905
  );
@@ -8009,13 +7909,13 @@ PaginationEllipsis.displayName = "PaginationEllipsis";
8009
7909
  // src/components/popover.tsx
8010
7910
  import * as PopoverPrimitive from "@radix-ui/react-popover";
8011
7911
  import * as React54 from "react";
8012
- import { jsx as jsx31 } from "react/jsx-runtime";
7912
+ import { jsx as jsx32 } from "react/jsx-runtime";
8013
7913
  var Popover = PopoverPrimitive.Root;
8014
7914
  var PopoverTrigger = PopoverPrimitive.Trigger;
8015
7915
  var PopoverAnchor = PopoverPrimitive.Anchor;
8016
7916
  var PopoverContent = React54.forwardRef((_a, ref) => {
8017
7917
  var _b = _a, { className, align = "center", sideOffset = 4 } = _b, props = __objRest(_b, ["className", "align", "sideOffset"]);
8018
- return /* @__PURE__ */ jsx31(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx31(
7918
+ return /* @__PURE__ */ jsx32(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx32(
8019
7919
  PopoverPrimitive.Content,
8020
7920
  __spreadValues({
8021
7921
  ref,
@@ -8033,10 +7933,10 @@ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
8033
7933
  // src/components/progress.tsx
8034
7934
  import * as ProgressPrimitive from "@radix-ui/react-progress";
8035
7935
  import * as React55 from "react";
8036
- import { jsx as jsx32 } from "react/jsx-runtime";
7936
+ import { jsx as jsx33 } from "react/jsx-runtime";
8037
7937
  var Progress = React55.forwardRef((_a, ref) => {
8038
7938
  var _b = _a, { className, value } = _b, props = __objRest(_b, ["className", "value"]);
8039
- return /* @__PURE__ */ jsx32(
7939
+ return /* @__PURE__ */ jsx33(
8040
7940
  ProgressPrimitive.Root,
8041
7941
  __spreadProps(__spreadValues({
8042
7942
  ref,
@@ -8045,7 +7945,7 @@ var Progress = React55.forwardRef((_a, ref) => {
8045
7945
  className
8046
7946
  )
8047
7947
  }, props), {
8048
- children: /* @__PURE__ */ jsx32(
7948
+ children: /* @__PURE__ */ jsx33(
8049
7949
  ProgressPrimitive.Indicator,
8050
7950
  {
8051
7951
  className: "h-full w-full flex-1 bg-primary transition-all",
@@ -8061,10 +7961,10 @@ Progress.displayName = ProgressPrimitive.Root.displayName;
8061
7961
  import { CheckIcon as CheckIcon6 } from "@radix-ui/react-icons";
8062
7962
  import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
8063
7963
  import * as React56 from "react";
8064
- import { jsx as jsx33 } from "react/jsx-runtime";
7964
+ import { jsx as jsx34 } from "react/jsx-runtime";
8065
7965
  var RadioGroup4 = React56.forwardRef((_a, ref) => {
8066
7966
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8067
- return /* @__PURE__ */ jsx33(
7967
+ return /* @__PURE__ */ jsx34(
8068
7968
  RadioGroupPrimitive.Root,
8069
7969
  __spreadProps(__spreadValues({
8070
7970
  className: cn("grid gap-2", className)
@@ -8076,7 +7976,7 @@ var RadioGroup4 = React56.forwardRef((_a, ref) => {
8076
7976
  RadioGroup4.displayName = RadioGroupPrimitive.Root.displayName;
8077
7977
  var RadioGroupItem = React56.forwardRef((_a, ref) => {
8078
7978
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8079
- return /* @__PURE__ */ jsx33(
7979
+ return /* @__PURE__ */ jsx34(
8080
7980
  RadioGroupPrimitive.Item,
8081
7981
  __spreadProps(__spreadValues({
8082
7982
  ref,
@@ -8085,7 +7985,7 @@ var RadioGroupItem = React56.forwardRef((_a, ref) => {
8085
7985
  className
8086
7986
  )
8087
7987
  }, props), {
8088
- children: /* @__PURE__ */ jsx33(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx33(CheckIcon6, { className: "h-3.5 w-3.5 fill-primary" }) })
7988
+ children: /* @__PURE__ */ jsx34(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx34(CheckIcon6, { className: "h-3.5 w-3.5 fill-primary" }) })
8089
7989
  })
8090
7990
  );
8091
7991
  });
@@ -8094,14 +7994,14 @@ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
8094
7994
  // src/components/resizable.tsx
8095
7995
  import { DragHandleDots2Icon } from "@radix-ui/react-icons";
8096
7996
  import * as ResizablePrimitive from "react-resizable-panels";
8097
- import { jsx as jsx34 } from "react/jsx-runtime";
7997
+ import { jsx as jsx35 } from "react/jsx-runtime";
8098
7998
  var ResizablePanelGroup = (_a) => {
8099
7999
  var _b = _a, {
8100
8000
  className
8101
8001
  } = _b, props = __objRest(_b, [
8102
8002
  "className"
8103
8003
  ]);
8104
- return /* @__PURE__ */ jsx34(
8004
+ return /* @__PURE__ */ jsx35(
8105
8005
  ResizablePrimitive.Group,
8106
8006
  __spreadValues({
8107
8007
  className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className)
@@ -8117,7 +8017,7 @@ var ResizableHandle = (_a) => {
8117
8017
  "withHandle",
8118
8018
  "className"
8119
8019
  ]);
8120
- return /* @__PURE__ */ jsx34(
8020
+ return /* @__PURE__ */ jsx35(
8121
8021
  ResizablePrimitive.Separator,
8122
8022
  __spreadProps(__spreadValues({
8123
8023
  className: cn(
@@ -8125,7 +8025,7 @@ var ResizableHandle = (_a) => {
8125
8025
  className
8126
8026
  )
8127
8027
  }, props), {
8128
- children: withHandle && /* @__PURE__ */ jsx34("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ jsx34(DragHandleDots2Icon, { className: "h-2.5 w-2.5" }) })
8028
+ children: withHandle && /* @__PURE__ */ jsx35("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ jsx35(DragHandleDots2Icon, { className: "h-2.5 w-2.5" }) })
8129
8029
  })
8130
8030
  );
8131
8031
  };
@@ -8133,7 +8033,7 @@ var ResizableHandle = (_a) => {
8133
8033
  // src/components/scroll-area.tsx
8134
8034
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
8135
8035
  import * as React57 from "react";
8136
- import { jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
8036
+ import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
8137
8037
  var ScrollArea = React57.forwardRef((_a, ref) => {
8138
8038
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
8139
8039
  return /* @__PURE__ */ jsxs21(
@@ -8143,9 +8043,9 @@ var ScrollArea = React57.forwardRef((_a, ref) => {
8143
8043
  className: cn("relative overflow-hidden", className)
8144
8044
  }, props), {
8145
8045
  children: [
8146
- /* @__PURE__ */ jsx35(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
8147
- /* @__PURE__ */ jsx35(ScrollBar, {}),
8148
- /* @__PURE__ */ jsx35(ScrollAreaPrimitive.Corner, {})
8046
+ /* @__PURE__ */ jsx36(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
8047
+ /* @__PURE__ */ jsx36(ScrollBar, {}),
8048
+ /* @__PURE__ */ jsx36(ScrollAreaPrimitive.Corner, {})
8149
8049
  ]
8150
8050
  })
8151
8051
  );
@@ -8153,7 +8053,7 @@ var ScrollArea = React57.forwardRef((_a, ref) => {
8153
8053
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
8154
8054
  var ScrollBar = React57.forwardRef((_a, ref) => {
8155
8055
  var _b = _a, { className, orientation = "vertical" } = _b, props = __objRest(_b, ["className", "orientation"]);
8156
- return /* @__PURE__ */ jsx35(
8056
+ return /* @__PURE__ */ jsx36(
8157
8057
  ScrollAreaPrimitive.ScrollAreaScrollbar,
8158
8058
  __spreadProps(__spreadValues({
8159
8059
  ref,
@@ -8165,208 +8065,465 @@ var ScrollBar = React57.forwardRef((_a, ref) => {
8165
8065
  className
8166
8066
  )
8167
8067
  }, props), {
8168
- children: /* @__PURE__ */ jsx35(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
8068
+ children: /* @__PURE__ */ jsx36(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
8169
8069
  })
8170
8070
  );
8171
8071
  });
8172
8072
  ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
8173
8073
 
8174
8074
  // src/components/search-input.tsx
8175
- import React58 from "react";
8075
+ import * as React58 from "react";
8176
8076
  import { useDebouncedCallback } from "use-debounce";
8177
- import { jsx as jsx36 } from "react/jsx-runtime";
8178
- function SearchInput({
8179
- value = "",
8180
- placeholder,
8181
- className,
8182
- classNameDefault,
8183
- debounceTime = 750,
8184
- onSearch
8185
- }) {
8186
- const [searchTerm, setSearchTerm] = React58.useState(value != null ? value : "");
8187
- const debouncedSearch = useDebouncedCallback((nextValue) => {
8188
- onSearch(nextValue);
8189
- }, debounceTime);
8190
- React58.useEffect(() => {
8191
- setSearchTerm(value != null ? value : "");
8192
- }, [value]);
8193
- const handleChange = (event) => {
8194
- const nextValue = event.target.value;
8195
- setSearchTerm(nextValue);
8196
- debouncedSearch(nextValue);
8197
- };
8198
- return /* @__PURE__ */ jsx36(
8199
- Input,
8200
- {
8201
- placeholder: placeholder || "Search...",
8202
- value: searchTerm,
8203
- onChange: handleChange,
8204
- className: cn("w-full md:max-w-sm", className),
8205
- classNameDefault
8206
- }
8207
- );
8077
+ import { jsx as jsx37 } from "react/jsx-runtime";
8078
+ function setForwardedRef(ref, value) {
8079
+ if (typeof ref === "function") {
8080
+ ref(value);
8081
+ return;
8082
+ }
8083
+ if (ref) {
8084
+ ref.current = value;
8085
+ }
8208
8086
  }
8087
+ var SearchInput = React58.forwardRef(
8088
+ (_a, ref) => {
8089
+ var _b = _a, {
8090
+ value = "",
8091
+ placeholder = "Search...",
8092
+ className,
8093
+ classNameDefault = true,
8094
+ debounceTime = 750,
8095
+ onSearch,
8096
+ onKeyDown,
8097
+ onPointerDown,
8098
+ onMouseDown,
8099
+ onClick,
8100
+ onFocus
8101
+ } = _b, props = __objRest(_b, [
8102
+ "value",
8103
+ "placeholder",
8104
+ "className",
8105
+ "classNameDefault",
8106
+ "debounceTime",
8107
+ "onSearch",
8108
+ "onKeyDown",
8109
+ "onPointerDown",
8110
+ "onMouseDown",
8111
+ "onClick",
8112
+ "onFocus"
8113
+ ]);
8114
+ const inputRef = React58.useRef(null);
8115
+ const [searchTerm, setSearchTerm] = React58.useState(value != null ? value : "");
8116
+ const focusInput = React58.useCallback(() => {
8117
+ const input = inputRef.current;
8118
+ if (!input || typeof document === "undefined") return;
8119
+ input.focus({ preventScroll: true });
8120
+ }, []);
8121
+ const composedRef = React58.useCallback(
8122
+ (node) => {
8123
+ inputRef.current = node;
8124
+ setForwardedRef(ref, node);
8125
+ },
8126
+ [ref]
8127
+ );
8128
+ const debouncedSearch = useDebouncedCallback((nextValue) => {
8129
+ onSearch(nextValue);
8130
+ requestAnimationFrame(() => {
8131
+ focusInput();
8132
+ });
8133
+ }, debounceTime);
8134
+ React58.useEffect(() => {
8135
+ setSearchTerm(value != null ? value : "");
8136
+ }, [value]);
8137
+ React58.useEffect(() => {
8138
+ return () => {
8139
+ debouncedSearch.cancel();
8140
+ };
8141
+ }, [debouncedSearch]);
8142
+ const handleChange = (event) => {
8143
+ const nextValue = event.target.value;
8144
+ setSearchTerm(nextValue);
8145
+ if (debounceTime <= 0) {
8146
+ debouncedSearch.cancel();
8147
+ onSearch(nextValue);
8148
+ requestAnimationFrame(() => {
8149
+ focusInput();
8150
+ });
8151
+ return;
8152
+ }
8153
+ debouncedSearch(nextValue);
8154
+ requestAnimationFrame(() => {
8155
+ focusInput();
8156
+ });
8157
+ };
8158
+ return /* @__PURE__ */ jsx37(
8159
+ Input,
8160
+ __spreadValues({
8161
+ ref: composedRef,
8162
+ type: "search",
8163
+ value: searchTerm,
8164
+ placeholder,
8165
+ onChange: handleChange,
8166
+ className: cn("w-full", className),
8167
+ classNameDefault,
8168
+ autoComplete: "off",
8169
+ onKeyDown: (event) => {
8170
+ if (event.key !== "Escape") {
8171
+ event.stopPropagation();
8172
+ }
8173
+ onKeyDown == null ? void 0 : onKeyDown(event);
8174
+ },
8175
+ onPointerDown: (event) => {
8176
+ event.stopPropagation();
8177
+ onPointerDown == null ? void 0 : onPointerDown(event);
8178
+ },
8179
+ onMouseDown: (event) => {
8180
+ event.stopPropagation();
8181
+ onMouseDown == null ? void 0 : onMouseDown(event);
8182
+ },
8183
+ onClick: (event) => {
8184
+ event.stopPropagation();
8185
+ requestAnimationFrame(() => {
8186
+ focusInput();
8187
+ });
8188
+ onClick == null ? void 0 : onClick(event);
8189
+ },
8190
+ onFocus: (event) => {
8191
+ event.stopPropagation();
8192
+ onFocus == null ? void 0 : onFocus(event);
8193
+ }
8194
+ }, props)
8195
+ );
8196
+ }
8197
+ );
8198
+ SearchInput.displayName = "SearchInput";
8209
8199
 
8210
8200
  // src/components/searchable-select.tsx
8211
8201
  import * as React59 from "react";
8212
- import * as SelectPrimitive2 from "@radix-ui/react-select";
8213
8202
  import { CaretSortIcon as CaretSortIcon2, CheckIcon as CheckIcon7, Cross2Icon as Cross2Icon2 } from "@radix-ui/react-icons";
8214
- import { jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
8203
+ import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
8215
8204
  function normalizeText(value) {
8216
- return String(value != null ? value : "").normalize("NFD").replace(new RegExp("\\p{Diacritic}", "gu"), "").toLowerCase();
8205
+ return String(value != null ? value : "").normalize("NFD").replace(new RegExp("\\p{Diacritic}", "gu"), "").toLowerCase().trim();
8217
8206
  }
8218
- function SearchableSelect(_a) {
8219
- var _b = _a, {
8220
- items,
8221
- value,
8222
- defaultValue,
8223
- onValueChange,
8224
- placeholder = "Seleccionar opci\xF3n",
8225
- searchPlaceholder = "Buscar\u2026",
8226
- emptyText = "No hay resultados",
8227
- triggerClassName,
8228
- contentClassName,
8229
- itemClassName,
8230
- searchInputClassName
8231
- } = _b, rootProps = __objRest(_b, [
8232
- "items",
8233
- "value",
8234
- "defaultValue",
8235
- "onValueChange",
8236
- "placeholder",
8237
- "searchPlaceholder",
8238
- "emptyText",
8239
- "triggerClassName",
8240
- "contentClassName",
8241
- "itemClassName",
8242
- "searchInputClassName"
8243
- ]);
8244
- const [open, setOpen] = React59.useState(false);
8245
- const [query, setQuery] = React59.useState("");
8207
+ function getLabelText(value) {
8208
+ if (typeof value === "string" || typeof value === "number") {
8209
+ return String(value);
8210
+ }
8211
+ return "";
8212
+ }
8213
+ function getOptionText(item) {
8214
+ if (!item) return "";
8215
+ return getLabelText(item.label) || item.value;
8216
+ }
8217
+ function getNextEnabledIndex2(items, currentIndex, direction) {
8218
+ var _a;
8219
+ if (!items.length) return -1;
8220
+ let nextIndex = currentIndex;
8221
+ for (let index = 0; index < items.length; index += 1) {
8222
+ nextIndex = (nextIndex + direction + items.length) % items.length;
8223
+ if (!((_a = items[nextIndex]) == null ? void 0 : _a.disabled)) {
8224
+ return nextIndex;
8225
+ }
8226
+ }
8227
+ return -1;
8228
+ }
8229
+ function SearchableSelectBase({
8230
+ items,
8231
+ value,
8232
+ defaultValue,
8233
+ onValueChange,
8234
+ placeholder = "Seleccionar opci\xF3n",
8235
+ searchPlaceholder = "Buscar\u2026",
8236
+ emptyText = "No hay resultados",
8237
+ disabled,
8238
+ name,
8239
+ required,
8240
+ triggerClassName,
8241
+ contentClassName,
8242
+ itemClassName,
8243
+ searchInputClassName
8244
+ }) {
8245
+ const rootRef = React59.useRef(null);
8246
8246
  const inputRef = React59.useRef(null);
8247
+ const listboxId = React59.useId();
8248
+ const isControlled = value !== void 0;
8249
+ const [internalValue, setInternalValue] = React59.useState(defaultValue != null ? defaultValue : "");
8250
+ const currentValue = isControlled ? value != null ? value : "" : internalValue;
8251
+ const selectedItem = React59.useMemo(() => {
8252
+ return items.find((item) => item.value === currentValue);
8253
+ }, [currentValue, items]);
8254
+ const selectedText = React59.useMemo(() => {
8255
+ return getOptionText(selectedItem);
8256
+ }, [selectedItem]);
8257
+ const [open, setOpen] = React59.useState(false);
8258
+ const [inputValue, setInputValue] = React59.useState(selectedText);
8259
+ const [activeIndex, setActiveIndex] = React59.useState(-1);
8260
+ React59.useEffect(() => {
8261
+ if (!open) {
8262
+ setInputValue(selectedText);
8263
+ }
8264
+ }, [open, selectedText]);
8247
8265
  const filteredItems = React59.useMemo(() => {
8248
- const normalizedQuery = normalizeText(query.trim());
8249
- if (!normalizedQuery) return items;
8266
+ const query = normalizeText(inputValue);
8267
+ if (!query) return items;
8250
8268
  return items.filter((item) => {
8251
- var _a2, _b2;
8269
+ var _a;
8252
8270
  const haystack = normalizeText(
8253
- `${(_a2 = item.label) != null ? _a2 : ""} ${item.value} ${(_b2 = item.keywords) != null ? _b2 : ""}`
8271
+ `${getLabelText(item.label)} ${item.value} ${(_a = item.keywords) != null ? _a : ""}`
8254
8272
  );
8255
- return haystack.includes(normalizedQuery);
8273
+ return haystack.includes(query);
8256
8274
  });
8257
- }, [items, query]);
8258
- return /* @__PURE__ */ jsxs22(
8259
- SelectPrimitive2.Root,
8260
- __spreadProps(__spreadValues({
8261
- open,
8262
- onOpenChange: (nextOpen) => {
8263
- setOpen(nextOpen);
8264
- if (!nextOpen) setQuery("");
8265
- },
8266
- value,
8267
- defaultValue,
8268
- onValueChange: (nextValue) => {
8269
- onValueChange == null ? void 0 : onValueChange(
8270
- nextValue,
8271
- items.find((item) => item.value === nextValue)
8272
- );
8273
- setOpen(false);
8275
+ }, [inputValue, items]);
8276
+ React59.useEffect(() => {
8277
+ if (!open) return;
8278
+ const firstEnabledIndex = filteredItems.findIndex((item) => !item.disabled);
8279
+ setActiveIndex(firstEnabledIndex);
8280
+ }, [filteredItems, open]);
8281
+ React59.useEffect(() => {
8282
+ if (!open) return;
8283
+ const handlePointerDown = (event) => {
8284
+ var _a;
8285
+ const target = event.target;
8286
+ if (target && ((_a = rootRef.current) == null ? void 0 : _a.contains(target))) {
8287
+ return;
8274
8288
  }
8275
- }, rootProps), {
8276
- children: [
8277
- /* @__PURE__ */ jsxs22(
8278
- SelectPrimitive2.Trigger,
8279
- {
8280
- className: cn(
8281
- "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background transition focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
8282
- triggerClassName
8283
- ),
8284
- children: [
8285
- /* @__PURE__ */ jsx37(SelectPrimitive2.Value, { placeholder }),
8286
- /* @__PURE__ */ jsx37(SelectPrimitive2.Icon, { asChild: true, children: /* @__PURE__ */ jsx37(CaretSortIcon2, { className: "h-4 w-4 opacity-50" }) })
8287
- ]
8288
- }
8289
+ setOpen(false);
8290
+ };
8291
+ document.addEventListener("pointerdown", handlePointerDown, true);
8292
+ return () => {
8293
+ document.removeEventListener("pointerdown", handlePointerDown, true);
8294
+ };
8295
+ }, [open]);
8296
+ const selectItem = React59.useCallback(
8297
+ (item) => {
8298
+ if (item.disabled) return;
8299
+ if (!isControlled) {
8300
+ setInternalValue(item.value);
8301
+ }
8302
+ setInputValue(getOptionText(item));
8303
+ setOpen(false);
8304
+ onValueChange == null ? void 0 : onValueChange(item.value, item);
8305
+ requestAnimationFrame(() => {
8306
+ var _a;
8307
+ (_a = inputRef.current) == null ? void 0 : _a.blur();
8308
+ });
8309
+ },
8310
+ [isControlled, onValueChange]
8311
+ );
8312
+ return /* @__PURE__ */ jsxs22("div", { ref: rootRef, className: "relative w-full", children: [
8313
+ name ? /* @__PURE__ */ jsx38(
8314
+ "input",
8315
+ {
8316
+ type: "hidden",
8317
+ name,
8318
+ value: currentValue,
8319
+ required,
8320
+ disabled
8321
+ }
8322
+ ) : null,
8323
+ /* @__PURE__ */ jsxs22(
8324
+ "div",
8325
+ {
8326
+ className: cn(
8327
+ "relative flex h-9 w-full items-center gap-2 rounded-md border border-input bg-background px-3 text-sm shadow-sm transition",
8328
+ "focus-within:border-primary/60 focus-within:ring-2 focus-within:ring-primary/20",
8329
+ disabled && "cursor-not-allowed opacity-50",
8330
+ triggerClassName
8331
+ ),
8332
+ onPointerDown: () => {
8333
+ if (disabled) return;
8334
+ setOpen(true);
8335
+ requestAnimationFrame(() => {
8336
+ var _a;
8337
+ (_a = inputRef.current) == null ? void 0 : _a.focus({ preventScroll: true });
8338
+ });
8339
+ },
8340
+ children: [
8341
+ /* @__PURE__ */ jsx38(
8342
+ "input",
8343
+ {
8344
+ ref: inputRef,
8345
+ value: inputValue,
8346
+ role: "combobox",
8347
+ "aria-autocomplete": "list",
8348
+ "aria-expanded": open,
8349
+ "aria-controls": listboxId,
8350
+ "aria-activedescendant": activeIndex >= 0 ? `${listboxId}-option-${activeIndex}` : void 0,
8351
+ placeholder: open ? searchPlaceholder : placeholder,
8352
+ autoComplete: "off",
8353
+ spellCheck: false,
8354
+ disabled,
8355
+ onFocus: () => {
8356
+ setOpen(true);
8357
+ requestAnimationFrame(() => {
8358
+ var _a;
8359
+ (_a = inputRef.current) == null ? void 0 : _a.select();
8360
+ });
8361
+ },
8362
+ onChange: (event) => {
8363
+ setInputValue(event.target.value);
8364
+ setOpen(true);
8365
+ },
8366
+ onKeyDown: (event) => {
8367
+ var _a;
8368
+ if (event.key === "ArrowDown") {
8369
+ event.preventDefault();
8370
+ setOpen(true);
8371
+ setActiveIndex(
8372
+ (currentIndex) => getNextEnabledIndex2(filteredItems, currentIndex, 1)
8373
+ );
8374
+ return;
8375
+ }
8376
+ if (event.key === "ArrowUp") {
8377
+ event.preventDefault();
8378
+ setOpen(true);
8379
+ setActiveIndex(
8380
+ (currentIndex) => getNextEnabledIndex2(filteredItems, currentIndex, -1)
8381
+ );
8382
+ return;
8383
+ }
8384
+ if (event.key === "Enter") {
8385
+ if (!open) return;
8386
+ event.preventDefault();
8387
+ const activeItem = filteredItems[activeIndex];
8388
+ if (activeItem) {
8389
+ selectItem(activeItem);
8390
+ }
8391
+ return;
8392
+ }
8393
+ if (event.key === "Escape") {
8394
+ event.preventDefault();
8395
+ setOpen(false);
8396
+ setInputValue(selectedText);
8397
+ (_a = inputRef.current) == null ? void 0 : _a.blur();
8398
+ }
8399
+ },
8400
+ className: cn(
8401
+ "h-full min-w-0 flex-1 border-0 bg-transparent p-0 text-sm outline-none",
8402
+ "placeholder:text-muted-foreground disabled:cursor-not-allowed",
8403
+ searchInputClassName
8404
+ )
8405
+ }
8406
+ ),
8407
+ inputValue && open ? /* @__PURE__ */ jsx38(
8408
+ "button",
8409
+ {
8410
+ type: "button",
8411
+ "aria-label": "Limpiar b\xFAsqueda",
8412
+ tabIndex: -1,
8413
+ onPointerDown: (event) => {
8414
+ event.preventDefault();
8415
+ event.stopPropagation();
8416
+ },
8417
+ onClick: (event) => {
8418
+ event.preventDefault();
8419
+ event.stopPropagation();
8420
+ setInputValue("");
8421
+ requestAnimationFrame(() => {
8422
+ var _a;
8423
+ (_a = inputRef.current) == null ? void 0 : _a.focus({ preventScroll: true });
8424
+ });
8425
+ },
8426
+ className: "inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition hover:bg-muted hover:text-foreground",
8427
+ children: /* @__PURE__ */ jsx38(Cross2Icon2, { "aria-hidden": "true", className: "h-3.5 w-3.5" })
8428
+ }
8429
+ ) : null,
8430
+ /* @__PURE__ */ jsx38(
8431
+ CaretSortIcon2,
8432
+ {
8433
+ "aria-hidden": "true",
8434
+ className: cn(
8435
+ "h-4 w-4 shrink-0 opacity-50 transition-transform",
8436
+ open && "rotate-180"
8437
+ )
8438
+ }
8439
+ )
8440
+ ]
8441
+ }
8442
+ ),
8443
+ /* @__PURE__ */ jsx38(
8444
+ "div",
8445
+ {
8446
+ className: cn(
8447
+ "absolute left-0 top-full z-50 mt-1 w-full overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-xl transition",
8448
+ !open && "pointer-events-none invisible opacity-0",
8449
+ open && "visible opacity-100",
8450
+ contentClassName
8289
8451
  ),
8290
- /* @__PURE__ */ jsx37(SelectPrimitive2.Portal, { children: /* @__PURE__ */ jsxs22(
8291
- SelectPrimitive2.Content,
8452
+ children: /* @__PURE__ */ jsx38(
8453
+ "div",
8292
8454
  {
8293
- position: "popper",
8294
- className: cn(
8295
- "relative z-50 max-h-96 min-w-48 overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:translate-y-1 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:-translate-x-1 data-[side=left]:slide-in-from-right-2 data-[side=right]:translate-x-1 data-[side=right]:slide-in-from-left-2 data-[side=top]:-translate-y-1 data-[side=top]:slide-in-from-bottom-2",
8296
- contentClassName
8297
- ),
8298
- onCloseAutoFocus: (event) => {
8299
- event.preventDefault();
8300
- requestAnimationFrame(() => {
8301
- var _a2;
8302
- return (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
8303
- });
8455
+ id: listboxId,
8456
+ role: "listbox",
8457
+ className: "max-h-72 overflow-y-auto overscroll-contain p-1 [scrollbar-gutter:stable]",
8458
+ onWheelCapture: (event) => {
8459
+ event.stopPropagation();
8304
8460
  },
8305
- children: [
8306
- /* @__PURE__ */ jsx37("div", { className: "border-b border-border bg-popover p-2", children: /* @__PURE__ */ jsxs22("div", { className: "relative", children: [
8307
- /* @__PURE__ */ jsx37(
8308
- "input",
8309
- {
8310
- ref: inputRef,
8311
- value: query,
8312
- onChange: (event) => setQuery(event.target.value),
8313
- onKeyDown: (event) => {
8314
- if (event.key !== "Escape") event.stopPropagation();
8315
- },
8316
- placeholder: searchPlaceholder,
8317
- className: cn(
8318
- "h-9 w-full rounded-md border border-input bg-input px-3 pr-8 text-sm outline-none focus:ring-2 focus:ring-primary/20",
8319
- searchInputClassName
8320
- )
8321
- }
8322
- ),
8323
- query ? /* @__PURE__ */ jsx37(
8324
- "button",
8325
- {
8326
- type: "button",
8327
- "aria-label": "Limpiar b\xFAsqueda",
8328
- onClick: () => {
8329
- var _a2;
8330
- setQuery("");
8331
- (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
8332
- },
8333
- className: "absolute right-2 top-1/2 -translate-y-1/2 rounded-sm opacity-70 transition hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring/40",
8334
- children: /* @__PURE__ */ jsx37(Cross2Icon2, { className: "h-3.5 w-3.5" })
8335
- }
8336
- ) : null
8337
- ] }) }),
8338
- /* @__PURE__ */ jsx37(SelectPrimitive2.Viewport, { className: "max-h-80 p-1", children: filteredItems.length === 0 ? /* @__PURE__ */ jsx37("div", { className: "px-3 py-2 text-sm text-muted-foreground", children: emptyText }) : filteredItems.map((item) => /* @__PURE__ */ jsxs22(
8339
- SelectPrimitive2.Item,
8461
+ onTouchMoveCapture: (event) => {
8462
+ event.stopPropagation();
8463
+ },
8464
+ children: filteredItems.length === 0 ? /* @__PURE__ */ jsx38("div", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: emptyText }) : filteredItems.map((item, index) => {
8465
+ const isSelected = item.value === currentValue;
8466
+ const isActive = index === activeIndex;
8467
+ return /* @__PURE__ */ jsxs22(
8468
+ "div",
8340
8469
  {
8341
- value: item.value,
8342
- disabled: item.disabled,
8470
+ id: `${listboxId}-option-${index}`,
8471
+ role: "option",
8472
+ "aria-selected": isSelected,
8473
+ "aria-disabled": item.disabled,
8474
+ tabIndex: -1,
8475
+ onMouseMove: () => {
8476
+ if (!item.disabled) {
8477
+ setActiveIndex(index);
8478
+ }
8479
+ },
8480
+ onPointerDown: (event) => {
8481
+ event.preventDefault();
8482
+ event.stopPropagation();
8483
+ if (!item.disabled) {
8484
+ selectItem(item);
8485
+ }
8486
+ },
8343
8487
  className: cn(
8344
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
8488
+ "relative flex w-full select-none items-center gap-2 rounded-lg px-3 py-2 text-left text-sm outline-none transition",
8489
+ item.disabled ? "pointer-events-none opacity-50" : "cursor-pointer",
8490
+ isActive && !item.disabled && "bg-accent text-accent-foreground",
8491
+ !isActive && !item.disabled && "hover:bg-accent/70 hover:text-accent-foreground",
8492
+ isSelected && "font-medium",
8345
8493
  itemClassName
8346
8494
  ),
8347
8495
  children: [
8348
- /* @__PURE__ */ jsx37(SelectPrimitive2.ItemText, { children: item.label }),
8349
- /* @__PURE__ */ jsx37("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx37(SelectPrimitive2.ItemIndicator, { children: /* @__PURE__ */ jsx37(CheckIcon7, { className: "h-4 w-4" }) }) })
8496
+ /* @__PURE__ */ jsx38("span", { className: "min-w-0 flex-1 truncate", children: item.label }),
8497
+ isSelected ? /* @__PURE__ */ jsx38(
8498
+ CheckIcon7,
8499
+ {
8500
+ "aria-hidden": "true",
8501
+ className: "h-4 w-4 shrink-0 text-primary"
8502
+ }
8503
+ ) : null
8350
8504
  ]
8351
8505
  },
8352
8506
  item.value
8353
- )) })
8354
- ]
8507
+ );
8508
+ })
8355
8509
  }
8356
- ) })
8357
- ]
8358
- })
8359
- );
8510
+ )
8511
+ }
8512
+ )
8513
+ ] });
8360
8514
  }
8515
+ var SearchableSelect = React59.memo(
8516
+ SearchableSelectBase
8517
+ );
8361
8518
 
8362
8519
  // src/components/separator.tsx
8363
8520
  import * as SeparatorPrimitive from "@radix-ui/react-separator";
8364
8521
  import * as React60 from "react";
8365
- import { jsx as jsx38 } from "react/jsx-runtime";
8522
+ import { jsx as jsx39 } from "react/jsx-runtime";
8366
8523
  var Separator6 = React60.forwardRef(
8367
8524
  (_a, ref) => {
8368
8525
  var _b = _a, { className, orientation = "horizontal", decorative = true } = _b, props = __objRest(_b, ["className", "orientation", "decorative"]);
8369
- return /* @__PURE__ */ jsx38(
8526
+ return /* @__PURE__ */ jsx39(
8370
8527
  SeparatorPrimitive.Root,
8371
8528
  __spreadValues({
8372
8529
  ref,
@@ -8388,14 +8545,14 @@ import * as SheetPrimitive from "@radix-ui/react-dialog";
8388
8545
  import { Cross2Icon as Cross2Icon3 } from "@radix-ui/react-icons";
8389
8546
  import { cva as cva7 } from "class-variance-authority";
8390
8547
  import * as React61 from "react";
8391
- import { jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
8548
+ import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
8392
8549
  var Sheet = SheetPrimitive.Root;
8393
8550
  var SheetTrigger = SheetPrimitive.Trigger;
8394
8551
  var SheetClose = SheetPrimitive.Close;
8395
8552
  var SheetPortal = SheetPrimitive.Portal;
8396
8553
  var SheetOverlay = React61.forwardRef((_a, ref) => {
8397
8554
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8398
- return /* @__PURE__ */ jsx39(
8555
+ return /* @__PURE__ */ jsx40(
8399
8556
  SheetPrimitive.Overlay,
8400
8557
  __spreadProps(__spreadValues({
8401
8558
  className: cn(
@@ -8427,7 +8584,7 @@ var sheetVariants = cva7(
8427
8584
  var SheetContent = React61.forwardRef((_a, ref) => {
8428
8585
  var _b = _a, { side = "right", className, children } = _b, props = __objRest(_b, ["side", "className", "children"]);
8429
8586
  return /* @__PURE__ */ jsxs23(SheetPortal, { children: [
8430
- /* @__PURE__ */ jsx39(SheetOverlay, {}),
8587
+ /* @__PURE__ */ jsx40(SheetOverlay, {}),
8431
8588
  /* @__PURE__ */ jsxs23(
8432
8589
  SheetPrimitive.Content,
8433
8590
  __spreadProps(__spreadValues({
@@ -8437,8 +8594,8 @@ var SheetContent = React61.forwardRef((_a, ref) => {
8437
8594
  children: [
8438
8595
  children,
8439
8596
  /* @__PURE__ */ jsxs23(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
8440
- /* @__PURE__ */ jsx39(Cross2Icon3, { className: "h-4 w-4" }),
8441
- /* @__PURE__ */ jsx39("span", { className: "sr-only", children: "Close" })
8597
+ /* @__PURE__ */ jsx40(Cross2Icon3, { className: "h-4 w-4" }),
8598
+ /* @__PURE__ */ jsx40("span", { className: "sr-only", children: "Close" })
8442
8599
  ] })
8443
8600
  ]
8444
8601
  })
@@ -8452,7 +8609,7 @@ var SheetHeader = (_a) => {
8452
8609
  } = _b, props = __objRest(_b, [
8453
8610
  "className"
8454
8611
  ]);
8455
- return /* @__PURE__ */ jsx39(
8612
+ return /* @__PURE__ */ jsx40(
8456
8613
  "div",
8457
8614
  __spreadValues({
8458
8615
  className: cn(
@@ -8469,7 +8626,7 @@ var SheetFooter = (_a) => {
8469
8626
  } = _b, props = __objRest(_b, [
8470
8627
  "className"
8471
8628
  ]);
8472
- return /* @__PURE__ */ jsx39(
8629
+ return /* @__PURE__ */ jsx40(
8473
8630
  "div",
8474
8631
  __spreadValues({
8475
8632
  className: cn(
@@ -8482,7 +8639,7 @@ var SheetFooter = (_a) => {
8482
8639
  SheetFooter.displayName = "SheetFooter";
8483
8640
  var SheetTitle = React61.forwardRef((_a, ref) => {
8484
8641
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8485
- return /* @__PURE__ */ jsx39(
8642
+ return /* @__PURE__ */ jsx40(
8486
8643
  SheetPrimitive.Title,
8487
8644
  __spreadValues({
8488
8645
  ref,
@@ -8493,7 +8650,7 @@ var SheetTitle = React61.forwardRef((_a, ref) => {
8493
8650
  SheetTitle.displayName = SheetPrimitive.Title.displayName;
8494
8651
  var SheetDescription = React61.forwardRef((_a, ref) => {
8495
8652
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8496
- return /* @__PURE__ */ jsx39(
8653
+ return /* @__PURE__ */ jsx40(
8497
8654
  SheetPrimitive.Description,
8498
8655
  __spreadValues({
8499
8656
  ref,
@@ -8504,14 +8661,14 @@ var SheetDescription = React61.forwardRef((_a, ref) => {
8504
8661
  SheetDescription.displayName = SheetPrimitive.Description.displayName;
8505
8662
 
8506
8663
  // src/components/skeleton.tsx
8507
- import { jsx as jsx40 } from "react/jsx-runtime";
8664
+ import { jsx as jsx41 } from "react/jsx-runtime";
8508
8665
  function Skeleton(_a) {
8509
8666
  var _b = _a, {
8510
8667
  className
8511
8668
  } = _b, props = __objRest(_b, [
8512
8669
  "className"
8513
8670
  ]);
8514
- return /* @__PURE__ */ jsx40(
8671
+ return /* @__PURE__ */ jsx41(
8515
8672
  "div",
8516
8673
  __spreadValues({
8517
8674
  className: cn("animate-pulse rounded-md bg-primary/10", className)
@@ -8522,7 +8679,7 @@ function Skeleton(_a) {
8522
8679
  // src/components/slider.tsx
8523
8680
  import * as SliderPrimitive from "@radix-ui/react-slider";
8524
8681
  import * as React62 from "react";
8525
- import { jsx as jsx41, jsxs as jsxs24 } from "react/jsx-runtime";
8682
+ import { jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
8526
8683
  var Slider = React62.forwardRef((_a, ref) => {
8527
8684
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8528
8685
  return /* @__PURE__ */ jsxs24(
@@ -8535,8 +8692,8 @@ var Slider = React62.forwardRef((_a, ref) => {
8535
8692
  )
8536
8693
  }, props), {
8537
8694
  children: [
8538
- /* @__PURE__ */ jsx41(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ jsx41(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
8539
- /* @__PURE__ */ jsx41(SliderPrimitive.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })
8695
+ /* @__PURE__ */ jsx42(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ jsx42(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
8696
+ /* @__PURE__ */ jsx42(SliderPrimitive.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })
8540
8697
  ]
8541
8698
  })
8542
8699
  );
@@ -8546,11 +8703,11 @@ Slider.displayName = SliderPrimitive.Root.displayName;
8546
8703
  // src/components/sonner.tsx
8547
8704
  import { useTheme } from "next-themes";
8548
8705
  import { Toaster as Sonner } from "sonner";
8549
- import { jsx as jsx42 } from "react/jsx-runtime";
8706
+ import { jsx as jsx43 } from "react/jsx-runtime";
8550
8707
  var ToasterSonner = (_a) => {
8551
8708
  var props = __objRest(_a, []);
8552
8709
  const { theme = "system" } = useTheme();
8553
- return /* @__PURE__ */ jsx42(
8710
+ return /* @__PURE__ */ jsx43(
8554
8711
  Sonner,
8555
8712
  __spreadValues({
8556
8713
  theme,
@@ -8570,10 +8727,10 @@ var ToasterSonner = (_a) => {
8570
8727
  // src/components/switch.tsx
8571
8728
  import * as SwitchPrimitives from "@radix-ui/react-switch";
8572
8729
  import * as React63 from "react";
8573
- import { jsx as jsx43 } from "react/jsx-runtime";
8730
+ import { jsx as jsx44 } from "react/jsx-runtime";
8574
8731
  var Switch = React63.forwardRef((_a, ref) => {
8575
8732
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8576
- return /* @__PURE__ */ jsx43(
8733
+ return /* @__PURE__ */ jsx44(
8577
8734
  SwitchPrimitives.Root,
8578
8735
  __spreadProps(__spreadValues({
8579
8736
  className: cn(
@@ -8582,7 +8739,7 @@ var Switch = React63.forwardRef((_a, ref) => {
8582
8739
  )
8583
8740
  }, props), {
8584
8741
  ref,
8585
- children: /* @__PURE__ */ jsx43(
8742
+ children: /* @__PURE__ */ jsx44(
8586
8743
  SwitchPrimitives.Thumb,
8587
8744
  {
8588
8745
  className: cn(
@@ -8597,11 +8754,11 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
8597
8754
 
8598
8755
  // src/components/table.tsx
8599
8756
  import * as React64 from "react";
8600
- import { jsx as jsx44 } from "react/jsx-runtime";
8757
+ import { jsx as jsx45 } from "react/jsx-runtime";
8601
8758
  var Table = React64.forwardRef(
8602
8759
  (_a, ref) => {
8603
8760
  var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
8604
- return /* @__PURE__ */ jsx44("div", { className: cn("relative w-full overflow-visible", containerClassName), children: /* @__PURE__ */ jsx44(
8761
+ return /* @__PURE__ */ jsx45("div", { className: cn("relative w-full overflow-visible", containerClassName), children: /* @__PURE__ */ jsx45(
8605
8762
  "table",
8606
8763
  __spreadValues({
8607
8764
  ref,
@@ -8613,12 +8770,12 @@ var Table = React64.forwardRef(
8613
8770
  Table.displayName = "Table";
8614
8771
  var TableHeader = React64.forwardRef((_a, ref) => {
8615
8772
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8616
- return /* @__PURE__ */ jsx44("thead", __spreadValues({ ref, className: cn("[&_tr]:border-b", className) }, props));
8773
+ return /* @__PURE__ */ jsx45("thead", __spreadValues({ ref, className: cn("[&_tr]:border-b", className) }, props));
8617
8774
  });
8618
8775
  TableHeader.displayName = "TableHeader";
8619
8776
  var TableBody = React64.forwardRef((_a, ref) => {
8620
8777
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8621
- return /* @__PURE__ */ jsx44(
8778
+ return /* @__PURE__ */ jsx45(
8622
8779
  "tbody",
8623
8780
  __spreadValues({
8624
8781
  ref,
@@ -8629,7 +8786,7 @@ var TableBody = React64.forwardRef((_a, ref) => {
8629
8786
  TableBody.displayName = "TableBody";
8630
8787
  var TableFooter = React64.forwardRef((_a, ref) => {
8631
8788
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8632
- return /* @__PURE__ */ jsx44(
8789
+ return /* @__PURE__ */ jsx45(
8633
8790
  "tfoot",
8634
8791
  __spreadValues({
8635
8792
  ref,
@@ -8643,7 +8800,7 @@ var TableFooter = React64.forwardRef((_a, ref) => {
8643
8800
  TableFooter.displayName = "TableFooter";
8644
8801
  var TableRow = React64.forwardRef((_a, ref) => {
8645
8802
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8646
- return /* @__PURE__ */ jsx44(
8803
+ return /* @__PURE__ */ jsx45(
8647
8804
  "tr",
8648
8805
  __spreadValues({
8649
8806
  ref,
@@ -8657,7 +8814,7 @@ var TableRow = React64.forwardRef((_a, ref) => {
8657
8814
  TableRow.displayName = "TableRow";
8658
8815
  var TableHead = React64.forwardRef((_a, ref) => {
8659
8816
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8660
- return /* @__PURE__ */ jsx44(
8817
+ return /* @__PURE__ */ jsx45(
8661
8818
  "th",
8662
8819
  __spreadValues({
8663
8820
  ref,
@@ -8671,7 +8828,7 @@ var TableHead = React64.forwardRef((_a, ref) => {
8671
8828
  TableHead.displayName = "TableHead";
8672
8829
  var TableCell = React64.forwardRef((_a, ref) => {
8673
8830
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8674
- return /* @__PURE__ */ jsx44(
8831
+ return /* @__PURE__ */ jsx45(
8675
8832
  "td",
8676
8833
  __spreadValues({
8677
8834
  ref,
@@ -8685,7 +8842,7 @@ var TableCell = React64.forwardRef((_a, ref) => {
8685
8842
  TableCell.displayName = "TableCell";
8686
8843
  var TableCaption = React64.forwardRef((_a, ref) => {
8687
8844
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8688
- return /* @__PURE__ */ jsx44(
8845
+ return /* @__PURE__ */ jsx45(
8689
8846
  "caption",
8690
8847
  __spreadValues({
8691
8848
  ref,
@@ -8698,11 +8855,11 @@ TableCaption.displayName = "TableCaption";
8698
8855
  // src/components/tabs.tsx
8699
8856
  import * as TabsPrimitive from "@radix-ui/react-tabs";
8700
8857
  import * as React65 from "react";
8701
- import { jsx as jsx45 } from "react/jsx-runtime";
8858
+ import { jsx as jsx46 } from "react/jsx-runtime";
8702
8859
  var Tabs = TabsPrimitive.Root;
8703
8860
  var TabsList = React65.forwardRef((_a, ref) => {
8704
8861
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8705
- return /* @__PURE__ */ jsx45(
8862
+ return /* @__PURE__ */ jsx46(
8706
8863
  TabsPrimitive.List,
8707
8864
  __spreadValues({
8708
8865
  ref,
@@ -8716,7 +8873,7 @@ var TabsList = React65.forwardRef((_a, ref) => {
8716
8873
  TabsList.displayName = TabsPrimitive.List.displayName;
8717
8874
  var TabsTrigger = React65.forwardRef((_a, ref) => {
8718
8875
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8719
- return /* @__PURE__ */ jsx45(
8876
+ return /* @__PURE__ */ jsx46(
8720
8877
  TabsPrimitive.Trigger,
8721
8878
  __spreadValues({
8722
8879
  ref,
@@ -8730,7 +8887,7 @@ var TabsTrigger = React65.forwardRef((_a, ref) => {
8730
8887
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
8731
8888
  var TabsContent = React65.forwardRef((_a, ref) => {
8732
8889
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8733
- return /* @__PURE__ */ jsx45(
8890
+ return /* @__PURE__ */ jsx46(
8734
8891
  TabsPrimitive.Content,
8735
8892
  __spreadValues({
8736
8893
  ref,
@@ -8745,11 +8902,11 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
8745
8902
 
8746
8903
  // src/components/textarea.tsx
8747
8904
  import * as React66 from "react";
8748
- import { jsx as jsx46 } from "react/jsx-runtime";
8905
+ import { jsx as jsx47 } from "react/jsx-runtime";
8749
8906
  var Textarea = React66.forwardRef(
8750
8907
  (_a, ref) => {
8751
8908
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8752
- return /* @__PURE__ */ jsx46(
8909
+ return /* @__PURE__ */ jsx47(
8753
8910
  "textarea",
8754
8911
  __spreadValues({
8755
8912
  className: cn(
@@ -8768,11 +8925,11 @@ import { Cross2Icon as Cross2Icon4 } from "@radix-ui/react-icons";
8768
8925
  import * as ToastPrimitives from "@radix-ui/react-toast";
8769
8926
  import { cva as cva8 } from "class-variance-authority";
8770
8927
  import * as React67 from "react";
8771
- import { jsx as jsx47 } from "react/jsx-runtime";
8928
+ import { jsx as jsx48 } from "react/jsx-runtime";
8772
8929
  var ToastProvider = ToastPrimitives.Provider;
8773
8930
  var ToastViewport = React67.forwardRef((_a, ref) => {
8774
8931
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8775
- return /* @__PURE__ */ jsx47(
8932
+ return /* @__PURE__ */ jsx48(
8776
8933
  ToastPrimitives.Viewport,
8777
8934
  __spreadValues({
8778
8935
  ref,
@@ -8800,7 +8957,7 @@ var toastVariants = cva8(
8800
8957
  );
8801
8958
  var Toast = React67.forwardRef((_a, ref) => {
8802
8959
  var _b = _a, { className, variant } = _b, props = __objRest(_b, ["className", "variant"]);
8803
- return /* @__PURE__ */ jsx47(
8960
+ return /* @__PURE__ */ jsx48(
8804
8961
  ToastPrimitives.Root,
8805
8962
  __spreadValues({
8806
8963
  ref,
@@ -8811,7 +8968,7 @@ var Toast = React67.forwardRef((_a, ref) => {
8811
8968
  Toast.displayName = ToastPrimitives.Root.displayName;
8812
8969
  var ToastAction = React67.forwardRef((_a, ref) => {
8813
8970
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8814
- return /* @__PURE__ */ jsx47(
8971
+ return /* @__PURE__ */ jsx48(
8815
8972
  ToastPrimitives.Action,
8816
8973
  __spreadValues({
8817
8974
  ref,
@@ -8825,7 +8982,7 @@ var ToastAction = React67.forwardRef((_a, ref) => {
8825
8982
  ToastAction.displayName = ToastPrimitives.Action.displayName;
8826
8983
  var ToastClose = React67.forwardRef((_a, ref) => {
8827
8984
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8828
- return /* @__PURE__ */ jsx47(
8985
+ return /* @__PURE__ */ jsx48(
8829
8986
  ToastPrimitives.Close,
8830
8987
  __spreadProps(__spreadValues({
8831
8988
  ref,
@@ -8835,14 +8992,14 @@ var ToastClose = React67.forwardRef((_a, ref) => {
8835
8992
  ),
8836
8993
  "toast-close": ""
8837
8994
  }, props), {
8838
- children: /* @__PURE__ */ jsx47(Cross2Icon4, { className: "h-4 w-4" })
8995
+ children: /* @__PURE__ */ jsx48(Cross2Icon4, { className: "h-4 w-4" })
8839
8996
  })
8840
8997
  );
8841
8998
  });
8842
8999
  ToastClose.displayName = ToastPrimitives.Close.displayName;
8843
9000
  var ToastTitle = React67.forwardRef((_a, ref) => {
8844
9001
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8845
- return /* @__PURE__ */ jsx47(
9002
+ return /* @__PURE__ */ jsx48(
8846
9003
  ToastPrimitives.Title,
8847
9004
  __spreadValues({
8848
9005
  ref,
@@ -8853,7 +9010,7 @@ var ToastTitle = React67.forwardRef((_a, ref) => {
8853
9010
  ToastTitle.displayName = ToastPrimitives.Title.displayName;
8854
9011
  var ToastDescription = React67.forwardRef((_a, ref) => {
8855
9012
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8856
- return /* @__PURE__ */ jsx47(
9013
+ return /* @__PURE__ */ jsx48(
8857
9014
  ToastPrimitives.Description,
8858
9015
  __spreadValues({
8859
9016
  ref,
@@ -8976,7 +9133,7 @@ function useToast() {
8976
9133
  }
8977
9134
 
8978
9135
  // src/components/toaster.tsx
8979
- import { jsx as jsx48, jsxs as jsxs25 } from "react/jsx-runtime";
9136
+ import { jsx as jsx49, jsxs as jsxs25 } from "react/jsx-runtime";
8980
9137
  function Toaster() {
8981
9138
  const { toasts } = useToast();
8982
9139
  return /* @__PURE__ */ jsxs25(ToastProvider, { children: [
@@ -8984,14 +9141,14 @@ function Toaster() {
8984
9141
  var _b = _a, { id, title, description, action } = _b, props = __objRest(_b, ["id", "title", "description", "action"]);
8985
9142
  return /* @__PURE__ */ jsxs25(Toast, __spreadProps(__spreadValues({}, props), { children: [
8986
9143
  /* @__PURE__ */ jsxs25("div", { className: "grid gap-1", children: [
8987
- title && /* @__PURE__ */ jsx48(ToastTitle, { children: title }),
8988
- description && /* @__PURE__ */ jsx48(ToastDescription, { children: description })
9144
+ title && /* @__PURE__ */ jsx49(ToastTitle, { children: title }),
9145
+ description && /* @__PURE__ */ jsx49(ToastDescription, { children: description })
8989
9146
  ] }),
8990
9147
  action,
8991
- /* @__PURE__ */ jsx48(ToastClose, {})
9148
+ /* @__PURE__ */ jsx49(ToastClose, {})
8992
9149
  ] }), id);
8993
9150
  }),
8994
- /* @__PURE__ */ jsx48(ToastViewport, {})
9151
+ /* @__PURE__ */ jsx49(ToastViewport, {})
8995
9152
  ] });
8996
9153
  }
8997
9154
 
@@ -8999,7 +9156,7 @@ function Toaster() {
8999
9156
  import * as TogglePrimitive from "@radix-ui/react-toggle";
9000
9157
  import { cva as cva9 } from "class-variance-authority";
9001
9158
  import * as React69 from "react";
9002
- import { jsx as jsx49 } from "react/jsx-runtime";
9159
+ import { jsx as jsx50 } from "react/jsx-runtime";
9003
9160
  var toggleVariants = cva9(
9004
9161
  "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
9005
9162
  {
@@ -9022,7 +9179,7 @@ var toggleVariants = cva9(
9022
9179
  );
9023
9180
  var Toggle = React69.forwardRef((_a, ref) => {
9024
9181
  var _b = _a, { className, variant, size } = _b, props = __objRest(_b, ["className", "variant", "size"]);
9025
- return /* @__PURE__ */ jsx49(
9182
+ return /* @__PURE__ */ jsx50(
9026
9183
  TogglePrimitive.Root,
9027
9184
  __spreadValues({
9028
9185
  ref,
@@ -9035,20 +9192,20 @@ Toggle.displayName = TogglePrimitive.Root.displayName;
9035
9192
  // src/components/toggle-group.tsx
9036
9193
  import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
9037
9194
  import * as React70 from "react";
9038
- import { jsx as jsx50 } from "react/jsx-runtime";
9195
+ import { jsx as jsx51 } from "react/jsx-runtime";
9039
9196
  var ToggleGroupContext = React70.createContext({
9040
9197
  size: "default",
9041
9198
  variant: "default"
9042
9199
  });
9043
9200
  var ToggleGroup = React70.forwardRef((_a, ref) => {
9044
9201
  var _b = _a, { className, variant, size, children } = _b, props = __objRest(_b, ["className", "variant", "size", "children"]);
9045
- return /* @__PURE__ */ jsx50(
9202
+ return /* @__PURE__ */ jsx51(
9046
9203
  ToggleGroupPrimitive.Root,
9047
9204
  __spreadProps(__spreadValues({
9048
9205
  ref,
9049
9206
  className: cn("flex items-center justify-center gap-1", className)
9050
9207
  }, props), {
9051
- children: /* @__PURE__ */ jsx50(ToggleGroupContext.Provider, { value: { variant, size }, children })
9208
+ children: /* @__PURE__ */ jsx51(ToggleGroupContext.Provider, { value: { variant, size }, children })
9052
9209
  })
9053
9210
  );
9054
9211
  });
@@ -9056,7 +9213,7 @@ ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
9056
9213
  var ToggleGroupItem = React70.forwardRef((_a, ref) => {
9057
9214
  var _b = _a, { className, children, variant, size } = _b, props = __objRest(_b, ["className", "children", "variant", "size"]);
9058
9215
  const context = React70.useContext(ToggleGroupContext);
9059
- return /* @__PURE__ */ jsx50(
9216
+ return /* @__PURE__ */ jsx51(
9060
9217
  ToggleGroupPrimitive.Item,
9061
9218
  __spreadProps(__spreadValues({
9062
9219
  ref,
@@ -9077,13 +9234,13 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
9077
9234
  // src/components/tooltip.tsx
9078
9235
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
9079
9236
  import * as React71 from "react";
9080
- import { jsx as jsx51 } from "react/jsx-runtime";
9237
+ import { jsx as jsx52 } from "react/jsx-runtime";
9081
9238
  var TooltipProvider = TooltipPrimitive.Provider;
9082
9239
  var Tooltip = TooltipPrimitive.Root;
9083
9240
  var TooltipTrigger = TooltipPrimitive.Trigger;
9084
9241
  var TooltipContent = React71.forwardRef((_a, ref) => {
9085
9242
  var _b = _a, { className, sideOffset = 4 } = _b, props = __objRest(_b, ["className", "sideOffset"]);
9086
- return /* @__PURE__ */ jsx51(
9243
+ return /* @__PURE__ */ jsx52(
9087
9244
  TooltipPrimitive.Content,
9088
9245
  __spreadValues({
9089
9246
  ref,
@@ -9100,7 +9257,7 @@ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
9100
9257
  // src/components/ui/input.tsx
9101
9258
  import * as React72 from "react";
9102
9259
  import { Asterisk as Asterisk4 } from "lucide-react";
9103
- import { jsx as jsx52, jsxs as jsxs26 } from "react/jsx-runtime";
9260
+ import { jsx as jsx53, jsxs as jsxs26 } from "react/jsx-runtime";
9104
9261
  var UiInput = React72.forwardRef(
9105
9262
  (_a, ref) => {
9106
9263
  var _b = _a, {
@@ -9141,8 +9298,8 @@ var UiInput = React72.forwardRef(
9141
9298
  ),
9142
9299
  htmlFor: inputId,
9143
9300
  children: [
9144
- /* @__PURE__ */ jsx52("span", { children: label }),
9145
- requiredLabel ? /* @__PURE__ */ jsx52(
9301
+ /* @__PURE__ */ jsx53("span", { children: label }),
9302
+ requiredLabel ? /* @__PURE__ */ jsx53(
9146
9303
  Asterisk4,
9147
9304
  {
9148
9305
  "aria-hidden": "true",
@@ -9155,7 +9312,7 @@ var UiInput = React72.forwardRef(
9155
9312
  ]
9156
9313
  }
9157
9314
  ) : null,
9158
- /* @__PURE__ */ jsx52(
9315
+ /* @__PURE__ */ jsx53(
9159
9316
  Input,
9160
9317
  __spreadProps(__spreadValues({}, inputProps), {
9161
9318
  ref,
@@ -9166,7 +9323,7 @@ var UiInput = React72.forwardRef(
9166
9323
  className
9167
9324
  })
9168
9325
  ),
9169
- errorMessage ? /* @__PURE__ */ jsx52(
9326
+ errorMessage ? /* @__PURE__ */ jsx53(
9170
9327
  "p",
9171
9328
  {
9172
9329
  id: messageId,
@@ -9196,7 +9353,7 @@ var selectVariants = {
9196
9353
  var variants2 = selectVariants;
9197
9354
 
9198
9355
  // src/components/ui/select.tsx
9199
- import { jsx as jsx53, jsxs as jsxs27 } from "react/jsx-runtime";
9356
+ import { jsx as jsx54, jsxs as jsxs27 } from "react/jsx-runtime";
9200
9357
  function UiSelect({
9201
9358
  label,
9202
9359
  placeholder,
@@ -9247,8 +9404,8 @@ function UiSelect({
9247
9404
  ),
9248
9405
  htmlFor: triggerId,
9249
9406
  children: [
9250
- /* @__PURE__ */ jsx53("span", { children: label }),
9251
- requiredLabel ? /* @__PURE__ */ jsx53(
9407
+ /* @__PURE__ */ jsx54("span", { children: label }),
9408
+ requiredLabel ? /* @__PURE__ */ jsx54(
9252
9409
  Asterisk5,
9253
9410
  {
9254
9411
  "aria-hidden": "true",
@@ -9269,7 +9426,7 @@ function UiSelect({
9269
9426
  onValueChange: onChange,
9270
9427
  disabled,
9271
9428
  children: [
9272
- /* @__PURE__ */ jsx53(
9429
+ /* @__PURE__ */ jsx54(
9273
9430
  SelectTrigger,
9274
9431
  {
9275
9432
  id: triggerId,
@@ -9282,10 +9439,10 @@ function UiSelect({
9282
9439
  hasError && "border-destructive ring-destructive focus:ring-destructive/40",
9283
9440
  className
9284
9441
  ),
9285
- children: /* @__PURE__ */ jsx53(SelectValue, { placeholder })
9442
+ children: /* @__PURE__ */ jsx54(SelectValue, { placeholder })
9286
9443
  }
9287
9444
  ),
9288
- /* @__PURE__ */ jsx53(SelectContent, { className: contentClassName, children: children != null ? children : items == null ? void 0 : items.map((item) => /* @__PURE__ */ jsx53(
9445
+ /* @__PURE__ */ jsx54(SelectContent, { className: contentClassName, children: children != null ? children : items == null ? void 0 : items.map((item) => /* @__PURE__ */ jsx54(
9289
9446
  SelectItem,
9290
9447
  {
9291
9448
  value: item.value,
@@ -9298,7 +9455,7 @@ function UiSelect({
9298
9455
  ]
9299
9456
  }
9300
9457
  ),
9301
- errorMessage ? /* @__PURE__ */ jsx53(
9458
+ errorMessage ? /* @__PURE__ */ jsx54(
9302
9459
  "p",
9303
9460
  {
9304
9461
  id: messageId,
@@ -9312,7 +9469,7 @@ function UiSelect({
9312
9469
  // src/components/ui/ui-checkbox.tsx
9313
9470
  import * as React74 from "react";
9314
9471
  import { Asterisk as Asterisk6 } from "lucide-react";
9315
- import { jsx as jsx54, jsxs as jsxs28 } from "react/jsx-runtime";
9472
+ import { jsx as jsx55, jsxs as jsxs28 } from "react/jsx-runtime";
9316
9473
  var UiCheckbox = React74.forwardRef(
9317
9474
  (_a, ref) => {
9318
9475
  var _b = _a, {
@@ -9345,7 +9502,7 @@ var UiCheckbox = React74.forwardRef(
9345
9502
  "className"
9346
9503
  ]);
9347
9504
  const hasError = Boolean(errorMessage || invalid);
9348
- return /* @__PURE__ */ jsx54("div", { className: cn("w-full", containerClassName), children: /* @__PURE__ */ jsxs28(
9505
+ return /* @__PURE__ */ jsx55("div", { className: cn("w-full", containerClassName), children: /* @__PURE__ */ jsxs28(
9349
9506
  "div",
9350
9507
  {
9351
9508
  className: cn(
@@ -9354,7 +9511,7 @@ var UiCheckbox = React74.forwardRef(
9354
9511
  contentClassName
9355
9512
  ),
9356
9513
  children: [
9357
- /* @__PURE__ */ jsx54(
9514
+ /* @__PURE__ */ jsx55(
9358
9515
  Checkbox,
9359
9516
  __spreadValues({
9360
9517
  ref,
@@ -9375,8 +9532,8 @@ var UiCheckbox = React74.forwardRef(
9375
9532
  labelClassName
9376
9533
  ),
9377
9534
  children: [
9378
- /* @__PURE__ */ jsx54("span", { children: label }),
9379
- requiredLabel ? /* @__PURE__ */ jsx54(
9535
+ /* @__PURE__ */ jsx55("span", { children: label }),
9536
+ requiredLabel ? /* @__PURE__ */ jsx55(
9380
9537
  Asterisk6,
9381
9538
  {
9382
9539
  "aria-hidden": "true",
@@ -9389,7 +9546,7 @@ var UiCheckbox = React74.forwardRef(
9389
9546
  ]
9390
9547
  }
9391
9548
  ) : null,
9392
- description ? /* @__PURE__ */ jsx54(
9549
+ description ? /* @__PURE__ */ jsx55(
9393
9550
  "p",
9394
9551
  {
9395
9552
  className: cn(
@@ -9399,7 +9556,7 @@ var UiCheckbox = React74.forwardRef(
9399
9556
  children: description
9400
9557
  }
9401
9558
  ) : null,
9402
- errorMessage ? /* @__PURE__ */ jsx54(
9559
+ errorMessage ? /* @__PURE__ */ jsx55(
9403
9560
  "p",
9404
9561
  {
9405
9562
  className: cn(
@@ -9418,14 +9575,14 @@ var UiCheckbox = React74.forwardRef(
9418
9575
  UiCheckbox.displayName = "UiCheckbox";
9419
9576
 
9420
9577
  // src/hooks/use-sidebar.tsx
9421
- import { createContext as createContext6, useContext as useContext7, useState as useState7 } from "react";
9422
- import { jsx as jsx55 } from "react/jsx-runtime";
9423
- var SidebarContext = createContext6({
9578
+ import { createContext as createContext5, useContext as useContext6, useState as useState7 } from "react";
9579
+ import { jsx as jsx56 } from "react/jsx-runtime";
9580
+ var SidebarContext = createContext5({
9424
9581
  isMinimized: false,
9425
9582
  toggle: () => {
9426
9583
  }
9427
9584
  });
9428
- var useSidebar = () => useContext7(SidebarContext);
9585
+ var useSidebar = () => useContext6(SidebarContext);
9429
9586
  var SidebarProvider = ({
9430
9587
  children
9431
9588
  }) => {
@@ -9433,11 +9590,11 @@ var SidebarProvider = ({
9433
9590
  const toggle = () => {
9434
9591
  setIsMinimized(!isMinimized);
9435
9592
  };
9436
- return /* @__PURE__ */ jsx55(SidebarContext.Provider, { value: { isMinimized, toggle }, children });
9593
+ return /* @__PURE__ */ jsx56(SidebarContext.Provider, { value: { isMinimized, toggle }, children });
9437
9594
  };
9438
9595
 
9439
9596
  // src/shared/alert-modal.tsx
9440
- import { jsx as jsx56, jsxs as jsxs29 } from "react/jsx-runtime";
9597
+ import { jsx as jsx57, jsxs as jsxs29 } from "react/jsx-runtime";
9441
9598
  var AlertModal = ({
9442
9599
  isOpen,
9443
9600
  onClose,
@@ -9450,7 +9607,7 @@ var AlertModal = ({
9450
9607
  className,
9451
9608
  children
9452
9609
  }) => {
9453
- return /* @__PURE__ */ jsx56(
9610
+ return /* @__PURE__ */ jsx57(
9454
9611
  Modal,
9455
9612
  {
9456
9613
  title,
@@ -9459,8 +9616,8 @@ var AlertModal = ({
9459
9616
  onClose,
9460
9617
  className,
9461
9618
  children: children ? children : /* @__PURE__ */ jsxs29("div", { className: "flex w-full items-center justify-end space-x-2 pt-6", children: [
9462
- /* @__PURE__ */ jsx56(Button, { disabled: loading, variant: "outline", onClick: onClose, children: cancelText }),
9463
- /* @__PURE__ */ jsx56(
9619
+ /* @__PURE__ */ jsx57(Button, { disabled: loading, variant: "outline", onClick: onClose, children: cancelText }),
9620
+ /* @__PURE__ */ jsx57(
9464
9621
  Button,
9465
9622
  {
9466
9623
  disabled: loading,
@@ -9478,19 +9635,19 @@ var AlertModal = ({
9478
9635
  // src/shared/breadcrumbs.tsx
9479
9636
  import { Slash } from "lucide-react";
9480
9637
  import { Fragment } from "react";
9481
- import { jsx as jsx57, jsxs as jsxs30 } from "react/jsx-runtime";
9638
+ import { jsx as jsx58, jsxs as jsxs30 } from "react/jsx-runtime";
9482
9639
  function Breadcrumbs({
9483
9640
  items,
9484
9641
  className,
9485
9642
  classNameList,
9486
- separator = /* @__PURE__ */ jsx57(Slash, {})
9643
+ separator = /* @__PURE__ */ jsx58(Slash, {})
9487
9644
  }) {
9488
- return /* @__PURE__ */ jsx57(Breadcrumb, { className, children: /* @__PURE__ */ jsx57(BreadcrumbList, { className: classNameList, children: items.map((item, index) => {
9645
+ return /* @__PURE__ */ jsx58(Breadcrumb, { className, children: /* @__PURE__ */ jsx58(BreadcrumbList, { className: classNameList, children: items.map((item, index) => {
9489
9646
  var _a;
9490
9647
  const isLast = index === items.length - 1;
9491
9648
  return /* @__PURE__ */ jsxs30(Fragment, { children: [
9492
- !isLast ? /* @__PURE__ */ jsx57(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ jsx57(BreadcrumbLink, { href: (_a = item.link) != null ? _a : "#", children: item.title }) }) : /* @__PURE__ */ jsx57(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ jsx57(BreadcrumbPage, { children: item.title }) }),
9493
- !isLast ? /* @__PURE__ */ jsx57(BreadcrumbSeparator, { children: separator }) : null
9649
+ !isLast ? /* @__PURE__ */ jsx58(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ jsx58(BreadcrumbLink, { href: (_a = item.link) != null ? _a : "#", children: item.title }) }) : /* @__PURE__ */ jsx58(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ jsx58(BreadcrumbPage, { children: item.title }) }),
9650
+ !isLast ? /* @__PURE__ */ jsx58(BreadcrumbSeparator, { children: separator }) : null
9494
9651
  ] }, `${item.title}-${index}`);
9495
9652
  }) }) });
9496
9653
  }
@@ -9509,7 +9666,7 @@ import {
9509
9666
  useReactTable
9510
9667
  } from "@tanstack/react-table";
9511
9668
  import { ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight3 } from "lucide-react";
9512
- import { jsx as jsx58, jsxs as jsxs31 } from "react/jsx-runtime";
9669
+ import { jsx as jsx59, jsxs as jsxs31 } from "react/jsx-runtime";
9513
9670
  var ACCENT_COLOR = {
9514
9671
  primary: "var(--primary)",
9515
9672
  emerald: "#10b981",
@@ -9794,9 +9951,9 @@ function DataTable({
9794
9951
  className: cn(ui.root, heightClassName),
9795
9952
  style: accentOn ? { "--dt-accent": dtAccent } : void 0,
9796
9953
  children: [
9797
- /* @__PURE__ */ jsx58("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxs31(ScrollArea, { className: "h-full", children: [
9798
- /* @__PURE__ */ jsx58("div", { className: "relative w-max min-w-full", children: /* @__PURE__ */ jsxs31(Table, { className: cn(ui.table), children: [
9799
- /* @__PURE__ */ jsx58(TableHeader, { className: cn(ui.thead), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx58(TableRow, { className: cn(ui.trHead), children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx58(
9954
+ /* @__PURE__ */ jsx59("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxs31(ScrollArea, { className: "h-full", children: [
9955
+ /* @__PURE__ */ jsx59("div", { className: "relative w-max min-w-full", children: /* @__PURE__ */ jsxs31(Table, { className: cn(ui.table), children: [
9956
+ /* @__PURE__ */ jsx59(TableHeader, { className: cn(ui.thead), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx59(TableRow, { className: cn(ui.trHead), children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx59(
9800
9957
  TableHead,
9801
9958
  {
9802
9959
  className: cn(
@@ -9810,7 +9967,7 @@ function DataTable({
9810
9967
  },
9811
9968
  header.id
9812
9969
  )) }, headerGroup.id)) }),
9813
- animate ? /* @__PURE__ */ jsx58(AnimatePresence, { mode: "wait", initial: false, children: /* @__PURE__ */ jsx58(
9970
+ animate ? /* @__PURE__ */ jsx59(AnimatePresence, { mode: "wait", initial: false, children: /* @__PURE__ */ jsx59(
9814
9971
  motion.tbody,
9815
9972
  {
9816
9973
  className: cn(ui.tbody),
@@ -9818,7 +9975,7 @@ function DataTable({
9818
9975
  animate: { opacity: 1, y: 0 },
9819
9976
  exit: { opacity: 0, y: -6 },
9820
9977
  transition: { duration: 0.18 },
9821
- children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx58(
9978
+ children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx59(
9822
9979
  TableRow,
9823
9980
  {
9824
9981
  "data-accent": dataAccent,
@@ -9828,13 +9985,13 @@ function DataTable({
9828
9985
  ui.tr,
9829
9986
  clickable ? ui.trClickable : void 0
9830
9987
  ),
9831
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx58(TableCell, { className: cn(ui.td), children: flexRender(
9988
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx59(TableCell, { className: cn(ui.td), children: flexRender(
9832
9989
  cell.column.columnDef.cell,
9833
9990
  cell.getContext()
9834
9991
  ) }, cell.id))
9835
9992
  },
9836
9993
  row.id
9837
- )) : emptyData || /* @__PURE__ */ jsx58(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ jsx58(
9994
+ )) : emptyData || /* @__PURE__ */ jsx59(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ jsx59(
9838
9995
  TableCell,
9839
9996
  {
9840
9997
  colSpan: columns.length,
@@ -9847,7 +10004,7 @@ function DataTable({
9847
10004
  ) })
9848
10005
  },
9849
10006
  pageKey
9850
- ) }) : /* @__PURE__ */ jsx58(TableBody, { className: cn(ui.tbody), children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx58(
10007
+ ) }) : /* @__PURE__ */ jsx59(TableBody, { className: cn(ui.tbody), children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx59(
9851
10008
  TableRow,
9852
10009
  {
9853
10010
  "data-accent": dataAccent,
@@ -9857,13 +10014,13 @@ function DataTable({
9857
10014
  ui.tr,
9858
10015
  clickable ? ui.trClickable : void 0
9859
10016
  ),
9860
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx58(TableCell, { className: cn(ui.td), children: flexRender(
10017
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx59(TableCell, { className: cn(ui.td), children: flexRender(
9861
10018
  cell.column.columnDef.cell,
9862
10019
  cell.getContext()
9863
10020
  ) }, cell.id))
9864
10021
  },
9865
10022
  row.id
9866
- )) : emptyData || /* @__PURE__ */ jsx58(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ jsx58(
10023
+ )) : emptyData || /* @__PURE__ */ jsx59(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ jsx59(
9867
10024
  TableCell,
9868
10025
  {
9869
10026
  colSpan: columns.length,
@@ -9875,9 +10032,9 @@ function DataTable({
9875
10032
  }
9876
10033
  ) }) })
9877
10034
  ] }) }),
9878
- /* @__PURE__ */ jsx58(ScrollBar, { orientation: "horizontal" })
10035
+ /* @__PURE__ */ jsx59(ScrollBar, { orientation: "horizontal" })
9879
10036
  ] }) }),
9880
- /* @__PURE__ */ jsx58("div", { className: cn(ui.footer), children: /* @__PURE__ */ jsx58("div", { className: cn(ui.footerInner), children: /* @__PURE__ */ jsxs31("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-[1fr_auto] sm:items-center", children: [
10037
+ /* @__PURE__ */ jsx59("div", { className: cn(ui.footer), children: /* @__PURE__ */ jsx59("div", { className: cn(ui.footerInner), children: /* @__PURE__ */ jsxs31("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-[1fr_auto] sm:items-center", children: [
9881
10038
  /* @__PURE__ */ jsxs31("div", { className: cn(ui.metaWrap), children: [
9882
10039
  isRowsSelected && /* @__PURE__ */ jsxs31("div", { children: [
9883
10040
  table.getFilteredSelectedRowModel().rows.length,
@@ -9896,22 +10053,22 @@ function DataTable({
9896
10053
  ] }),
9897
10054
  /* @__PURE__ */ jsxs31("div", { className: cn(ui.controlsWrap), children: [
9898
10055
  /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
9899
- /* @__PURE__ */ jsx58("p", { className: cn(ui.pageSizeLabel), children: rowPerPageLabel }),
10056
+ /* @__PURE__ */ jsx59("p", { className: cn(ui.pageSizeLabel), children: rowPerPageLabel }),
9900
10057
  /* @__PURE__ */ jsxs31(
9901
10058
  Select2,
9902
10059
  {
9903
10060
  value: `${pageSize}`,
9904
10061
  onValueChange: (v) => changePageSize(Number(v)),
9905
10062
  children: [
9906
- /* @__PURE__ */ jsx58(
10063
+ /* @__PURE__ */ jsx59(
9907
10064
  SelectTrigger,
9908
10065
  {
9909
10066
  "data-accent": dataAccent,
9910
10067
  className: cn(ui.pageSizeTrigger),
9911
- children: /* @__PURE__ */ jsx58(SelectValue, { placeholder: `${pageSize}` })
10068
+ children: /* @__PURE__ */ jsx59(SelectValue, { placeholder: `${pageSize}` })
9912
10069
  }
9913
10070
  ),
9914
- /* @__PURE__ */ jsx58(SelectContent, { side: "top", children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx58(SelectItem, { value: `${size}`, children: size }, size)) })
10071
+ /* @__PURE__ */ jsx59(SelectContent, { side: "top", children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx59(SelectItem, { value: `${size}`, children: size }, size)) })
9915
10072
  ]
9916
10073
  }
9917
10074
  )
@@ -9926,7 +10083,7 @@ function DataTable({
9926
10083
  " ",
9927
10084
  safePageCount
9928
10085
  ] }),
9929
- /* @__PURE__ */ jsx58(
10086
+ /* @__PURE__ */ jsx59(
9930
10087
  Button,
9931
10088
  {
9932
10089
  "data-accent": dataAccent,
@@ -9935,10 +10092,10 @@ function DataTable({
9935
10092
  className: cn("hidden lg:flex", ui.navButton),
9936
10093
  onClick: () => goToPage(0),
9937
10094
  disabled: pageIndex === 0,
9938
- children: /* @__PURE__ */ jsx58(DoubleArrowLeftIcon, { className: "h-4 w-4" })
10095
+ children: /* @__PURE__ */ jsx59(DoubleArrowLeftIcon, { className: "h-4 w-4" })
9939
10096
  }
9940
10097
  ),
9941
- /* @__PURE__ */ jsx58(
10098
+ /* @__PURE__ */ jsx59(
9942
10099
  Button,
9943
10100
  {
9944
10101
  "data-accent": dataAccent,
@@ -9947,10 +10104,10 @@ function DataTable({
9947
10104
  className: cn(ui.navButton),
9948
10105
  onClick: () => goToPage(pageIndex - 1),
9949
10106
  disabled: pageIndex === 0,
9950
- children: /* @__PURE__ */ jsx58(ChevronLeft3, { className: "h-4 w-4" })
10107
+ children: /* @__PURE__ */ jsx59(ChevronLeft3, { className: "h-4 w-4" })
9951
10108
  }
9952
10109
  ),
9953
- /* @__PURE__ */ jsx58(
10110
+ /* @__PURE__ */ jsx59(
9954
10111
  Button,
9955
10112
  {
9956
10113
  "data-accent": dataAccent,
@@ -9959,10 +10116,10 @@ function DataTable({
9959
10116
  className: cn(ui.navButton),
9960
10117
  onClick: () => goToPage(pageIndex + 1),
9961
10118
  disabled: pageIndex + 1 >= safePageCount,
9962
- children: /* @__PURE__ */ jsx58(ChevronRight3, { className: "h-4 w-4" })
10119
+ children: /* @__PURE__ */ jsx59(ChevronRight3, { className: "h-4 w-4" })
9963
10120
  }
9964
10121
  ),
9965
- /* @__PURE__ */ jsx58(
10122
+ /* @__PURE__ */ jsx59(
9966
10123
  Button,
9967
10124
  {
9968
10125
  "data-accent": dataAccent,
@@ -9971,7 +10128,7 @@ function DataTable({
9971
10128
  className: cn("hidden lg:flex", ui.navButton),
9972
10129
  onClick: () => goToPage(safePageCount - 1),
9973
10130
  disabled: pageIndex + 1 >= safePageCount,
9974
- children: /* @__PURE__ */ jsx58(DoubleArrowRightIcon, { className: "h-4 w-4" })
10131
+ children: /* @__PURE__ */ jsx59(DoubleArrowRightIcon, { className: "h-4 w-4" })
9975
10132
  }
9976
10133
  )
9977
10134
  ] }),
@@ -9992,7 +10149,7 @@ function DataTable({
9992
10149
  }
9993
10150
 
9994
10151
  // src/shared/data-table-skeleton.tsx
9995
- import { jsx as jsx59, jsxs as jsxs32 } from "react/jsx-runtime";
10152
+ import { jsx as jsx60, jsxs as jsxs32 } from "react/jsx-runtime";
9996
10153
  function DataTableSkeleton({
9997
10154
  columnCount,
9998
10155
  rowCount = 10,
@@ -10003,28 +10160,28 @@ function DataTableSkeleton({
10003
10160
  return /* @__PURE__ */ jsxs32("div", { className: "w-full space-y-3 overflow-auto", children: [
10004
10161
  /* @__PURE__ */ jsxs32("div", { className: "flex w-full items-center justify-between space-x-2 overflow-auto p-1", children: [
10005
10162
  /* @__PURE__ */ jsxs32("div", { className: "flex flex-1 items-center space-x-2 space-y-4", children: [
10006
- searchableColumnCount > 0 ? Array.from({ length: searchableColumnCount }).map((_, i) => /* @__PURE__ */ jsx59(Skeleton, { className: "h-10 w-37.5 lg:w-62.5" }, i)) : null,
10007
- filterableColumnCount > 0 ? Array.from({ length: filterableColumnCount }).map((_, i) => /* @__PURE__ */ jsx59(Skeleton, { className: "h-10 w-17.5 border-dashed" }, i)) : null
10163
+ searchableColumnCount > 0 ? Array.from({ length: searchableColumnCount }).map((_, i) => /* @__PURE__ */ jsx60(Skeleton, { className: "h-10 w-37.5 lg:w-62.5" }, i)) : null,
10164
+ filterableColumnCount > 0 ? Array.from({ length: filterableColumnCount }).map((_, i) => /* @__PURE__ */ jsx60(Skeleton, { className: "h-10 w-17.5 border-dashed" }, i)) : null
10008
10165
  ] }),
10009
- showViewOptions ? /* @__PURE__ */ jsx59(Skeleton, { className: "ml-auto hidden h-7 w-17.5 lg:flex" }) : null
10166
+ showViewOptions ? /* @__PURE__ */ jsx60(Skeleton, { className: "ml-auto hidden h-7 w-17.5 lg:flex" }) : null
10010
10167
  ] }),
10011
- /* @__PURE__ */ jsx59("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs32(Table, { children: [
10012
- /* @__PURE__ */ jsx59(TableHeader, { children: Array.from({ length: 1 }).map((_, i) => /* @__PURE__ */ jsx59(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ jsx59(TableHead, { children: /* @__PURE__ */ jsx59(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) }),
10013
- /* @__PURE__ */ jsx59(TableBody, { children: Array.from({ length: rowCount }).map((_, i) => /* @__PURE__ */ jsx59(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ jsx59(TableCell, { children: /* @__PURE__ */ jsx59(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) })
10168
+ /* @__PURE__ */ jsx60("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs32(Table, { children: [
10169
+ /* @__PURE__ */ jsx60(TableHeader, { children: Array.from({ length: 1 }).map((_, i) => /* @__PURE__ */ jsx60(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ jsx60(TableHead, { children: /* @__PURE__ */ jsx60(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) }),
10170
+ /* @__PURE__ */ jsx60(TableBody, { children: Array.from({ length: rowCount }).map((_, i) => /* @__PURE__ */ jsx60(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ jsx60(TableCell, { children: /* @__PURE__ */ jsx60(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) })
10014
10171
  ] }) }),
10015
10172
  /* @__PURE__ */ jsxs32("div", { className: "flex w-full flex-col items-center justify-between gap-4 overflow-auto px-2 py-1 sm:flex-row sm:gap-8", children: [
10016
- /* @__PURE__ */ jsx59("div", { className: "flex-1", children: /* @__PURE__ */ jsx59(Skeleton, { className: "h-8 w-40" }) }),
10173
+ /* @__PURE__ */ jsx60("div", { className: "flex-1", children: /* @__PURE__ */ jsx60(Skeleton, { className: "h-8 w-40" }) }),
10017
10174
  /* @__PURE__ */ jsxs32("div", { className: "flex flex-col items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8", children: [
10018
10175
  /* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-2", children: [
10019
- /* @__PURE__ */ jsx59(Skeleton, { className: "h-8 w-24" }),
10020
- /* @__PURE__ */ jsx59(Skeleton, { className: "h-8 w-17.5" })
10176
+ /* @__PURE__ */ jsx60(Skeleton, { className: "h-8 w-24" }),
10177
+ /* @__PURE__ */ jsx60(Skeleton, { className: "h-8 w-17.5" })
10021
10178
  ] }),
10022
- /* @__PURE__ */ jsx59("div", { className: "flex w-25 items-center justify-center text-sm font-medium", children: /* @__PURE__ */ jsx59(Skeleton, { className: "h-8 w-20" }) }),
10179
+ /* @__PURE__ */ jsx60("div", { className: "flex w-25 items-center justify-center text-sm font-medium", children: /* @__PURE__ */ jsx60(Skeleton, { className: "h-8 w-20" }) }),
10023
10180
  /* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-2", children: [
10024
- /* @__PURE__ */ jsx59(Skeleton, { className: "hidden size-8 lg:block" }),
10025
- /* @__PURE__ */ jsx59(Skeleton, { className: "size-8" }),
10026
- /* @__PURE__ */ jsx59(Skeleton, { className: "size-8" }),
10027
- /* @__PURE__ */ jsx59(Skeleton, { className: "hidden size-8 lg:block" })
10181
+ /* @__PURE__ */ jsx60(Skeleton, { className: "hidden size-8 lg:block" }),
10182
+ /* @__PURE__ */ jsx60(Skeleton, { className: "size-8" }),
10183
+ /* @__PURE__ */ jsx60(Skeleton, { className: "size-8" }),
10184
+ /* @__PURE__ */ jsx60(Skeleton, { className: "hidden size-8 lg:block" })
10028
10185
  ] })
10029
10186
  ] })
10030
10187
  ] })
@@ -10033,7 +10190,7 @@ function DataTableSkeleton({
10033
10190
 
10034
10191
  // src/shared/dropzone.tsx
10035
10192
  import { useDropzone } from "react-dropzone";
10036
- import { jsx as jsx60, jsxs as jsxs33 } from "react/jsx-runtime";
10193
+ import { jsx as jsx61, jsxs as jsxs33 } from "react/jsx-runtime";
10037
10194
  function Dropzone({
10038
10195
  label,
10039
10196
  onChange,
@@ -10057,7 +10214,7 @@ function Dropzone({
10057
10214
  accept
10058
10215
  }, options));
10059
10216
  return /* @__PURE__ */ jsxs33("div", { className: cn("space-y-2", className), children: [
10060
- label && /* @__PURE__ */ jsx60("p", { className: cn("font-medium", labelClassName), children: label }),
10217
+ label && /* @__PURE__ */ jsx61("p", { className: cn("font-medium", labelClassName), children: label }),
10061
10218
  /* @__PURE__ */ jsxs33(
10062
10219
  "div",
10063
10220
  __spreadProps(__spreadValues({}, getRootProps()), {
@@ -10067,12 +10224,12 @@ function Dropzone({
10067
10224
  dropzoneClassName
10068
10225
  ),
10069
10226
  children: [
10070
- /* @__PURE__ */ jsx60("input", __spreadValues({}, getInputProps())),
10071
- /* @__PURE__ */ jsx60("p", { className: cn("text-gray-600", descriptionClassName), children: isDragActive ? descriptionActive : description })
10227
+ /* @__PURE__ */ jsx61("input", __spreadValues({}, getInputProps())),
10228
+ /* @__PURE__ */ jsx61("p", { className: cn("text-gray-600", descriptionClassName), children: isDragActive ? descriptionActive : description })
10072
10229
  ]
10073
10230
  })
10074
10231
  ),
10075
- value && value.length > 0 && /* @__PURE__ */ jsx60("ul", { className: cn("text-sm text-gray-700 space-y-1", valueClassName), children: value.map((file, idx) => /* @__PURE__ */ jsxs33("li", { children: [
10232
+ value && value.length > 0 && /* @__PURE__ */ jsx61("ul", { className: cn("text-sm text-gray-700 space-y-1", valueClassName), children: value.map((file, idx) => /* @__PURE__ */ jsxs33("li", { children: [
10076
10233
  "\u2022 ",
10077
10234
  file.name
10078
10235
  ] }, idx)) })
@@ -10082,9 +10239,9 @@ function Dropzone({
10082
10239
  // src/shared/fileupload.tsx
10083
10240
  import { AvatarIcon } from "@radix-ui/react-icons";
10084
10241
  import { CameraIcon } from "lucide-react";
10085
- import { useEffect as useEffect4, useState as useState8 } from "react";
10242
+ import { useEffect as useEffect6, useState as useState8 } from "react";
10086
10243
  import { useDropzone as useDropzone2 } from "react-dropzone";
10087
- import { jsx as jsx61, jsxs as jsxs34 } from "react/jsx-runtime";
10244
+ import { jsx as jsx62, jsxs as jsxs34 } from "react/jsx-runtime";
10088
10245
  function FileUpload({
10089
10246
  onChange,
10090
10247
  value = [],
@@ -10100,7 +10257,7 @@ function FileUpload({
10100
10257
  onChange(acceptedFiles);
10101
10258
  }
10102
10259
  }, options));
10103
- return /* @__PURE__ */ jsx61("div", { className: cn("flex items-center justify-center", className), children: /* @__PURE__ */ jsx61(
10260
+ return /* @__PURE__ */ jsx62("div", { className: cn("flex items-center justify-center", className), children: /* @__PURE__ */ jsx62(
10104
10261
  "div",
10105
10262
  {
10106
10263
  className: cn(
@@ -10108,10 +10265,10 @@ function FileUpload({
10108
10265
  classNameContent
10109
10266
  ),
10110
10267
  children: /* @__PURE__ */ jsxs34("div", __spreadProps(__spreadValues({}, getRootProps({ className: "dropzone cursor-pointer" })), { children: [
10111
- /* @__PURE__ */ jsx61("input", __spreadValues({}, getInputProps())),
10112
- value.length > 0 ? /* @__PURE__ */ jsx61(ImagePreview, { file: value[0] }) : /* @__PURE__ */ jsx61(AvatarIcon, { className: "h-36 w-36 text-gray-100" }),
10268
+ /* @__PURE__ */ jsx62("input", __spreadValues({}, getInputProps())),
10269
+ value.length > 0 ? /* @__PURE__ */ jsx62(ImagePreview, { file: value[0] }) : /* @__PURE__ */ jsx62(AvatarIcon, { className: "h-36 w-36 text-gray-100" }),
10113
10270
  /* @__PURE__ */ jsxs34("p", { className: "absolute -bottom-5 left-1/2 flex w-full -translate-x-1/2 -translate-y-1/2 transform flex-col items-center justify-center bg-gray-300 bg-opacity-50 py-1 text-xs font-normal text-muted-foreground", children: [
10114
- /* @__PURE__ */ jsx61(CameraIcon, { className: "h-4 w-4 text-muted-foreground" }),
10271
+ /* @__PURE__ */ jsx62(CameraIcon, { className: "h-4 w-4 text-muted-foreground" }),
10115
10272
  label
10116
10273
  ] })
10117
10274
  ] }))
@@ -10120,14 +10277,14 @@ function FileUpload({
10120
10277
  }
10121
10278
  function ImagePreview({ file }) {
10122
10279
  const [objectUrl, setObjectUrl] = useState8(null);
10123
- useEffect4(() => {
10280
+ useEffect6(() => {
10124
10281
  const url = URL.createObjectURL(file);
10125
10282
  setObjectUrl(url);
10126
10283
  return () => {
10127
10284
  URL.revokeObjectURL(url);
10128
10285
  };
10129
10286
  }, [file]);
10130
- return objectUrl ? /* @__PURE__ */ jsx61(
10287
+ return objectUrl ? /* @__PURE__ */ jsx62(
10131
10288
  "img",
10132
10289
  {
10133
10290
  src: objectUrl,
@@ -10138,23 +10295,23 @@ function ImagePreview({ file }) {
10138
10295
  }
10139
10296
 
10140
10297
  // src/shared/heading.tsx
10141
- import { jsx as jsx62, jsxs as jsxs35 } from "react/jsx-runtime";
10298
+ import { jsx as jsx63, jsxs as jsxs35 } from "react/jsx-runtime";
10142
10299
  function Heading({ title, description, className }) {
10143
10300
  return /* @__PURE__ */ jsxs35("div", { className, children: [
10144
- /* @__PURE__ */ jsx62("div", { className: "text-lg font-bold tracking-tight text-primary sm:text-3xl", children: title }),
10145
- /* @__PURE__ */ jsx62("p", { className: "text-sm text-muted-foreground", children: description })
10301
+ /* @__PURE__ */ jsx63("div", { className: "text-lg font-bold tracking-tight text-primary sm:text-3xl", children: title }),
10302
+ /* @__PURE__ */ jsx63("p", { className: "text-sm text-muted-foreground", children: description })
10146
10303
  ] });
10147
10304
  }
10148
10305
 
10149
10306
  // src/shared/page-head.tsx
10150
10307
  import { Helmet } from "react-helmet-next";
10151
- import { jsx as jsx63 } from "react/jsx-runtime";
10308
+ import { jsx as jsx64 } from "react/jsx-runtime";
10152
10309
  function PageHead({ title = "shadcn-ui-react" }) {
10153
- return /* @__PURE__ */ jsx63(Helmet, { children: /* @__PURE__ */ jsx63("title", { children: title }) });
10310
+ return /* @__PURE__ */ jsx64(Helmet, { children: /* @__PURE__ */ jsx64("title", { children: title }) });
10154
10311
  }
10155
10312
 
10156
10313
  // src/shared/pagination-section.tsx
10157
- import { jsx as jsx64, jsxs as jsxs36 } from "react/jsx-runtime";
10314
+ import { jsx as jsx65, jsxs as jsxs36 } from "react/jsx-runtime";
10158
10315
  function PaginationSection({
10159
10316
  totalPosts,
10160
10317
  postsPerPage,
@@ -10192,17 +10349,17 @@ function PaginationSection({
10192
10349
  }
10193
10350
  };
10194
10351
  const renderPages = () => {
10195
- const renderedPages = activePages.map((page, idx) => /* @__PURE__ */ jsx64(
10352
+ const renderedPages = activePages.map((page, idx) => /* @__PURE__ */ jsx65(
10196
10353
  PaginationItem,
10197
10354
  {
10198
10355
  className: currentPage === page ? "rounded-md bg-primary" : "",
10199
- children: /* @__PURE__ */ jsx64(PaginationLink, { onClick: () => setCurrentPage(page), size: void 0, children: page })
10356
+ children: /* @__PURE__ */ jsx65(PaginationLink, { onClick: () => setCurrentPage(page), size: void 0, children: page })
10200
10357
  },
10201
10358
  idx
10202
10359
  ));
10203
10360
  if (activePages[0] > 1) {
10204
10361
  renderedPages.unshift(
10205
- /* @__PURE__ */ jsx64(
10362
+ /* @__PURE__ */ jsx65(
10206
10363
  PaginationEllipsis,
10207
10364
  {
10208
10365
  onClick: () => setCurrentPage(activePages[0] - 1)
@@ -10213,7 +10370,7 @@ function PaginationSection({
10213
10370
  }
10214
10371
  if (activePages[activePages.length - 1] < pageNumbers.length) {
10215
10372
  renderedPages.push(
10216
- /* @__PURE__ */ jsx64(
10373
+ /* @__PURE__ */ jsx65(
10217
10374
  PaginationEllipsis,
10218
10375
  {
10219
10376
  onClick: () => setCurrentPage(activePages[activePages.length - 1] + 1)
@@ -10224,21 +10381,21 @@ function PaginationSection({
10224
10381
  }
10225
10382
  return renderedPages;
10226
10383
  };
10227
- return /* @__PURE__ */ jsx64("div", { className: "p-4", children: /* @__PURE__ */ jsx64(Pagination, { children: /* @__PURE__ */ jsxs36(PaginationContent, { children: [
10384
+ return /* @__PURE__ */ jsx65("div", { className: "p-4", children: /* @__PURE__ */ jsx65(Pagination, { children: /* @__PURE__ */ jsxs36(PaginationContent, { children: [
10228
10385
  /* @__PURE__ */ jsxs36(PaginationItem, { children: [
10229
- /* @__PURE__ */ jsx64(
10386
+ /* @__PURE__ */ jsx65(
10230
10387
  PaginationPreviousLast,
10231
10388
  {
10232
10389
  onClick: handlePrevPageLast,
10233
10390
  size: void 0
10234
10391
  }
10235
10392
  ),
10236
- /* @__PURE__ */ jsx64(PaginationPrevious, { onClick: handlePrevPage, size: void 0 })
10393
+ /* @__PURE__ */ jsx65(PaginationPrevious, { onClick: handlePrevPage, size: void 0 })
10237
10394
  ] }),
10238
10395
  renderPages(),
10239
10396
  /* @__PURE__ */ jsxs36(PaginationItem, { children: [
10240
- /* @__PURE__ */ jsx64(PaginationNext, { onClick: handleNextPage, size: void 0 }),
10241
- /* @__PURE__ */ jsx64(PaginationNextLast, { onClick: handleNextPageLast, size: void 0 })
10397
+ /* @__PURE__ */ jsx65(PaginationNext, { onClick: handleNextPage, size: void 0 }),
10398
+ /* @__PURE__ */ jsx65(PaginationNextLast, { onClick: handleNextPageLast, size: void 0 })
10242
10399
  ] })
10243
10400
  ] }) }) });
10244
10401
  }
@@ -10361,7 +10518,9 @@ export {
10361
10518
  FormControl,
10362
10519
  FormDescription,
10363
10520
  FormField,
10521
+ FormFieldContext,
10364
10522
  FormItem,
10523
+ FormItemContext,
10365
10524
  FormLabel,
10366
10525
  FormMessage,
10367
10526
  FormSelect,
@@ -10489,8 +10648,13 @@ export {
10489
10648
  badgeVariants,
10490
10649
  buttonVariants,
10491
10650
  cn,
10651
+ getDefaultOptionLabel,
10652
+ getDefaultOptionValue,
10653
+ getErrorMessage,
10654
+ getNextEnabledIndex,
10492
10655
  iconButtonVariants,
10493
10656
  navigationMenuTriggerStyle,
10657
+ normalizeSearchText,
10494
10658
  reducer,
10495
10659
  toast,
10496
10660
  toggleVariants,