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.cjs CHANGED
@@ -177,7 +177,9 @@ __export(index_exports, {
177
177
  FormControl: () => FormControl,
178
178
  FormDescription: () => FormDescription,
179
179
  FormField: () => FormField,
180
+ FormFieldContext: () => FormFieldContext,
180
181
  FormItem: () => FormItem,
182
+ FormItemContext: () => FormItemContext,
181
183
  FormLabel: () => FormLabel,
182
184
  FormMessage: () => FormMessage,
183
185
  FormSelect: () => FormSelect,
@@ -305,8 +307,13 @@ __export(index_exports, {
305
307
  badgeVariants: () => badgeVariants,
306
308
  buttonVariants: () => buttonVariants,
307
309
  cn: () => cn,
310
+ getDefaultOptionLabel: () => getDefaultOptionLabel,
311
+ getDefaultOptionValue: () => getDefaultOptionValue,
312
+ getErrorMessage: () => getErrorMessage,
313
+ getNextEnabledIndex: () => getNextEnabledIndex,
308
314
  iconButtonVariants: () => iconButtonVariants,
309
315
  navigationMenuTriggerStyle: () => navigationMenuTriggerStyle,
316
+ normalizeSearchText: () => normalizeSearchText,
310
317
  reducer: () => reducer,
311
318
  toast: () => toast,
312
319
  toggleVariants: () => toggleVariants,
@@ -775,7 +782,7 @@ var BreadcrumbList = React6.forwardRef((_a, ref) => {
775
782
  __spreadValues({
776
783
  ref,
777
784
  className: cn(
778
- "flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
785
+ "flex flex-wrap items-center gap-1.5 wrap-break-word text-sm text-muted-foreground sm:gap-2.5",
779
786
  className
780
787
  )
781
788
  }, props)
@@ -6572,36 +6579,22 @@ var DropdownMenuShortcut = (_a) => {
6572
6579
  };
6573
6580
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
6574
6581
 
6575
- // src/components/Form/form.tsx
6582
+ // src/components/Form/form-component.tsx
6583
+ var React44 = __toESM(require("react"), 1);
6584
+ var import_react_slot4 = require("@radix-ui/react-slot");
6576
6585
  var import_react_hook_form = require("react-hook-form");
6577
- var import_jsx_runtime18 = require("react/jsx-runtime");
6578
- function Form({
6579
- children,
6580
- methods,
6581
- onSubmit,
6582
- onError,
6583
- formProps
6584
- }) {
6585
- const handleSubmit = onSubmit ? methods.handleSubmit(onSubmit, onError) : void 0;
6586
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_hook_form.FormProvider, __spreadProps(__spreadValues({}, methods), { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("form", __spreadProps(__spreadValues({ noValidate: true, onSubmit: handleSubmit }, formProps), { children })) }));
6587
- }
6588
-
6589
- // src/components/Form/form-checkbox.tsx
6590
- var React46 = __toESM(require("react"), 1);
6591
- var import_lucide_react4 = require("lucide-react");
6592
- var import_react_hook_form3 = require("react-hook-form");
6593
6586
 
6594
6587
  // src/components/Label/label.tsx
6595
6588
  var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
6596
6589
  var import_class_variance_authority5 = require("class-variance-authority");
6597
6590
  var React43 = __toESM(require("react"), 1);
6598
- var import_jsx_runtime19 = require("react/jsx-runtime");
6591
+ var import_jsx_runtime18 = require("react/jsx-runtime");
6599
6592
  var labelVariants = (0, import_class_variance_authority5.cva)(
6600
6593
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-label"
6601
6594
  );
6602
6595
  var Label3 = React43.forwardRef((_a, ref) => {
6603
6596
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6604
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6597
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6605
6598
  LabelPrimitive.Root,
6606
6599
  __spreadValues({
6607
6600
  ref,
@@ -6611,14 +6604,306 @@ var Label3 = React43.forwardRef((_a, ref) => {
6611
6604
  });
6612
6605
  Label3.displayName = LabelPrimitive.Root.displayName;
6613
6606
 
6614
- // src/components/Form/form-field.tsx
6607
+ // src/components/Form/form-component.tsx
6608
+ var import_jsx_runtime19 = require("react/jsx-runtime");
6609
+ var FormFieldContext = React44.createContext(
6610
+ null
6611
+ );
6612
+ function getErrorMessage(error) {
6613
+ const message2 = error == null ? void 0 : error.message;
6614
+ return typeof message2 === "string" ? message2 : void 0;
6615
+ }
6616
+ function normalizeSearchText(value) {
6617
+ return String(value != null ? value : "").normalize("NFD").replace(new RegExp("\\p{Diacritic}", "gu"), "").toLowerCase();
6618
+ }
6619
+ function getDefaultOptionValue(item) {
6620
+ var _a;
6621
+ if (typeof item === "string") return item;
6622
+ if (item && typeof item === "object" && "value" in item) {
6623
+ return String((_a = item.value) != null ? _a : "");
6624
+ }
6625
+ return String(item != null ? item : "");
6626
+ }
6627
+ function getDefaultOptionLabel(item) {
6628
+ if (item && typeof item === "object" && "label" in item) {
6629
+ return item.label;
6630
+ }
6631
+ return getDefaultOptionValue(item);
6632
+ }
6633
+ function getNextEnabledIndex(options, currentIndex, direction) {
6634
+ var _a;
6635
+ if (!options.length) return -1;
6636
+ let nextIndex = currentIndex;
6637
+ for (let index = 0; index < options.length; index += 1) {
6638
+ nextIndex = (nextIndex + direction + options.length) % options.length;
6639
+ if (!((_a = options[nextIndex]) == null ? void 0 : _a.disabled)) {
6640
+ return nextIndex;
6641
+ }
6642
+ }
6643
+ return -1;
6644
+ }
6645
+ var FormItemContext = React44.createContext(null);
6646
+ var FormItem = React44.forwardRef((_a, ref) => {
6647
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6648
+ const id = React44.useId();
6649
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", __spreadValues({ ref, className: cn("space-y-2", className) }, props)) });
6650
+ });
6651
+ FormItem.displayName = "FormItem";
6652
+ var useFormField = () => {
6653
+ var _a;
6654
+ const generatedId = React44.useId();
6655
+ const fieldContext = React44.useContext(FormFieldContext);
6656
+ const itemContext = React44.useContext(FormItemContext);
6657
+ const formContext = (0, import_react_hook_form.useFormContext)();
6658
+ const id = (_a = itemContext == null ? void 0 : itemContext.id) != null ? _a : generatedId;
6659
+ if (!fieldContext || !formContext) {
6660
+ return {
6661
+ id,
6662
+ formItemId: `${id}-form-item`,
6663
+ formDescriptionId: `${id}-form-item-description`,
6664
+ formMessageId: `${id}-form-item-message`,
6665
+ error: void 0
6666
+ };
6667
+ }
6668
+ const fieldState = formContext.getFieldState(
6669
+ fieldContext.name,
6670
+ formContext.formState
6671
+ );
6672
+ return __spreadValues({
6673
+ id,
6674
+ name: fieldContext.name,
6675
+ formItemId: `${id}-form-item`,
6676
+ formDescriptionId: `${id}-form-item-description`,
6677
+ formMessageId: `${id}-form-item-message`
6678
+ }, fieldState);
6679
+ };
6680
+ var FormLabel = React44.forwardRef((_a, ref) => {
6681
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6682
+ const { error, formItemId } = useFormField();
6683
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6684
+ Label3,
6685
+ __spreadValues({
6686
+ ref,
6687
+ className: cn(error && "text-destructive", className),
6688
+ htmlFor: formItemId
6689
+ }, props)
6690
+ );
6691
+ });
6692
+ FormLabel.displayName = "FormLabel";
6693
+ var FormControl = React44.forwardRef((_a, ref) => {
6694
+ var props = __objRest(_a, []);
6695
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
6696
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6697
+ import_react_slot4.Slot,
6698
+ __spreadValues({
6699
+ ref,
6700
+ id: formItemId,
6701
+ "aria-describedby": error ? `${formDescriptionId} ${formMessageId}` : formDescriptionId,
6702
+ "aria-invalid": Boolean(error)
6703
+ }, props)
6704
+ );
6705
+ });
6706
+ FormControl.displayName = "FormControl";
6707
+ var FormMessage = React44.forwardRef((_a, ref) => {
6708
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
6709
+ const { error, formMessageId } = useFormField();
6710
+ const body = error ? getErrorMessage(error) : children;
6711
+ if (!body) return null;
6712
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6713
+ "p",
6714
+ __spreadProps(__spreadValues({
6715
+ ref,
6716
+ id: formMessageId,
6717
+ className: cn("text-[0.8rem] font-medium text-destructive", className)
6718
+ }, props), {
6719
+ children: body
6720
+ })
6721
+ );
6722
+ });
6723
+ FormMessage.displayName = "FormMessage";
6724
+ var FormDescription = React44.forwardRef((_a, ref) => {
6725
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6726
+ const { formDescriptionId } = useFormField();
6727
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6728
+ "p",
6729
+ __spreadValues({
6730
+ ref,
6731
+ id: formDescriptionId,
6732
+ className: cn("text-[0.8rem] text-muted-foreground", className)
6733
+ }, props)
6734
+ );
6735
+ });
6736
+ FormDescription.displayName = "FormDescription";
6737
+
6738
+ // src/components/Form/form.tsx
6739
+ var import_react_hook_form2 = require("react-hook-form");
6740
+ var import_jsx_runtime20 = require("react/jsx-runtime");
6741
+ function Form({
6742
+ children,
6743
+ methods,
6744
+ onSubmit,
6745
+ onError,
6746
+ formProps
6747
+ }) {
6748
+ const handleSubmit = onSubmit ? methods.handleSubmit(onSubmit, onError) : void 0;
6749
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_hook_form2.FormProvider, __spreadProps(__spreadValues({}, methods), { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("form", __spreadProps(__spreadValues({ noValidate: true, onSubmit: handleSubmit }, formProps), { children })) }));
6750
+ }
6751
+
6752
+ // src/components/Form/form-checkbox.tsx
6615
6753
  var React45 = __toESM(require("react"), 1);
6616
- var import_react_slot4 = require("@radix-ui/react-slot");
6617
6754
  var import_lucide_react3 = require("lucide-react");
6618
- var import_react_hook_form2 = require("react-hook-form");
6755
+ var import_react_hook_form3 = require("react-hook-form");
6756
+ var import_jsx_runtime21 = require("react/jsx-runtime");
6757
+ var FormCheckbox = (_a) => {
6758
+ var _b = _a, {
6759
+ name,
6760
+ control,
6761
+ rules,
6762
+ shouldUnregister,
6763
+ defaultValue,
6764
+ label,
6765
+ description,
6766
+ requiredLabel,
6767
+ className,
6768
+ itemClassName,
6769
+ checkboxClassName,
6770
+ labelClassName,
6771
+ descriptionClassName,
6772
+ messageClassName,
6773
+ requiredLabelClassName,
6774
+ onChange
6775
+ } = _b, checkboxProps = __objRest(_b, [
6776
+ "name",
6777
+ "control",
6778
+ "rules",
6779
+ "shouldUnregister",
6780
+ "defaultValue",
6781
+ "label",
6782
+ "description",
6783
+ "requiredLabel",
6784
+ "className",
6785
+ "itemClassName",
6786
+ "checkboxClassName",
6787
+ "labelClassName",
6788
+ "descriptionClassName",
6789
+ "messageClassName",
6790
+ "requiredLabelClassName",
6791
+ "onChange"
6792
+ ]);
6793
+ var _a2;
6794
+ const generatedId = React45.useId();
6795
+ const form = (0, import_react_hook_form3.useFormContext)();
6796
+ const controllerControl = control != null ? control : form == null ? void 0 : form.control;
6797
+ const checkboxId = (_a2 = checkboxProps.id) != null ? _a2 : `${generatedId}-checkbox`;
6798
+ const descriptionId = `${generatedId}-description`;
6799
+ const messageId = `${generatedId}-message`;
6800
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6801
+ import_react_hook_form3.Controller,
6802
+ {
6803
+ control: controllerControl,
6804
+ name,
6805
+ rules,
6806
+ shouldUnregister,
6807
+ defaultValue,
6808
+ render: ({ field, fieldState }) => {
6809
+ var _a3;
6810
+ const checked = Boolean(field.value);
6811
+ const fieldError = (_a3 = fieldState.error) == null ? void 0 : _a3.message;
6812
+ const hasError = Boolean(fieldError);
6813
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FormItem, { className: cn("space-y-1.5", itemClassName), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
6814
+ "div",
6815
+ {
6816
+ className: cn(
6817
+ "flex items-start gap-3 rounded-lg border border-transparent p-1 transition-colors",
6818
+ hasError && "border-destructive/20 bg-destructive/5",
6819
+ className
6820
+ ),
6821
+ children: [
6822
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6823
+ Checkbox,
6824
+ __spreadProps(__spreadValues({}, checkboxProps), {
6825
+ ref: field.ref,
6826
+ id: checkboxId,
6827
+ checked,
6828
+ invalid: hasError || checkboxProps.invalid,
6829
+ "aria-invalid": hasError || checkboxProps.invalid || void 0,
6830
+ "aria-describedby": [
6831
+ description ? descriptionId : void 0,
6832
+ hasError ? messageId : void 0
6833
+ ].filter(Boolean).join(" ") || void 0,
6834
+ className: cn("mt-0.5", checkboxClassName),
6835
+ onBlur: field.onBlur,
6836
+ onCheckedChange: (value) => {
6837
+ const nextValue = value === true;
6838
+ field.onChange(nextValue);
6839
+ onChange == null ? void 0 : onChange(nextValue);
6840
+ }
6841
+ })
6842
+ ),
6843
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "min-w-0 flex-1", children: [
6844
+ label ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
6845
+ Label3,
6846
+ {
6847
+ htmlFor: checkboxId,
6848
+ className: cn(
6849
+ "inline-flex cursor-pointer items-start gap-1 text-sm font-medium leading-none text-foreground",
6850
+ checkboxProps.disabled && "cursor-not-allowed text-muted-foreground",
6851
+ hasError && "text-destructive",
6852
+ labelClassName
6853
+ ),
6854
+ children: [
6855
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: label }),
6856
+ requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6857
+ import_lucide_react3.Asterisk,
6858
+ {
6859
+ "aria-hidden": "true",
6860
+ className: cn(
6861
+ "mt-0.5 h-3 w-3 shrink-0 text-red-500",
6862
+ requiredLabelClassName
6863
+ )
6864
+ }
6865
+ ) : null
6866
+ ]
6867
+ }
6868
+ ) : null,
6869
+ description ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6870
+ "p",
6871
+ {
6872
+ id: descriptionId,
6873
+ className: cn(
6874
+ "mt-1 text-sm leading-relaxed text-muted-foreground",
6875
+ descriptionClassName
6876
+ ),
6877
+ children: description
6878
+ }
6879
+ ) : null,
6880
+ fieldError ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6881
+ "p",
6882
+ {
6883
+ id: messageId,
6884
+ className: cn(
6885
+ "mt-1 text-sm font-medium text-destructive",
6886
+ messageClassName
6887
+ ),
6888
+ children: fieldError
6889
+ }
6890
+ ) : null
6891
+ ] })
6892
+ ]
6893
+ }
6894
+ ) });
6895
+ }
6896
+ }
6897
+ );
6898
+ };
6899
+ FormCheckbox.displayName = "FormCheckbox";
6900
+
6901
+ // src/components/Form/form-field.tsx
6902
+ var import_lucide_react4 = require("lucide-react");
6903
+ var import_react_hook_form4 = require("react-hook-form");
6619
6904
 
6620
6905
  // src/components/input.tsx
6621
- var React44 = __toESM(require("react"), 1);
6906
+ var React46 = __toESM(require("react"), 1);
6622
6907
 
6623
6908
  // src/components/Form/utils/form-utils.ts
6624
6909
  var formInputVariants = {
@@ -6715,8 +7000,8 @@ function getFormSizeClasses(size = "md", customSize) {
6715
7000
  }
6716
7001
 
6717
7002
  // src/components/input.tsx
6718
- var import_jsx_runtime20 = require("react/jsx-runtime");
6719
- var Input = React44.forwardRef(
7003
+ var import_jsx_runtime22 = require("react/jsx-runtime");
7004
+ var Input = React46.forwardRef(
6720
7005
  (_a, ref) => {
6721
7006
  var _b = _a, {
6722
7007
  className,
@@ -6749,8 +7034,8 @@ var Input = React44.forwardRef(
6749
7034
  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]";
6750
7035
  const iconPositionClass = size === "2xs" || size === "xs" ? "left-2" : size === "xl" || size === "2xl" ? "left-4" : "left-3";
6751
7036
  const trailingIconPositionClass = size === "2xs" || size === "xs" ? "right-2" : size === "xl" || size === "2xl" ? "right-4" : "right-3";
6752
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: cn("relative", disabled && "opacity-80"), children: [
6753
- leading ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
7037
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cn("relative", disabled && "opacity-80"), children: [
7038
+ leading ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
6754
7039
  "span",
6755
7040
  {
6756
7041
  className: cn(
@@ -6762,7 +7047,7 @@ var Input = React44.forwardRef(
6762
7047
  children: leading
6763
7048
  }
6764
7049
  ) : null,
6765
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
7050
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
6766
7051
  "input",
6767
7052
  __spreadValues({
6768
7053
  ref,
@@ -6780,7 +7065,7 @@ var Input = React44.forwardRef(
6780
7065
  "data-private": true
6781
7066
  }, props)
6782
7067
  ),
6783
- trailing ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
7068
+ trailing ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
6784
7069
  "span",
6785
7070
  {
6786
7071
  className: cn(
@@ -6798,11 +7083,8 @@ var Input = React44.forwardRef(
6798
7083
  Input.displayName = "Input";
6799
7084
 
6800
7085
  // src/components/Form/form-field.tsx
6801
- var import_jsx_runtime21 = require("react/jsx-runtime");
6802
- var FormFieldContext = React45.createContext(
6803
- null
6804
- );
6805
- function getErrorMessage(error) {
7086
+ var import_jsx_runtime23 = require("react/jsx-runtime");
7087
+ function getErrorMessage2(error) {
6806
7088
  const message2 = error == null ? void 0 : error.message;
6807
7089
  return typeof message2 === "string" ? message2 : void 0;
6808
7090
  }
@@ -6852,324 +7134,88 @@ var FormField = (_a) => {
6852
7134
  "invalid",
6853
7135
  "onChange"
6854
7136
  ]);
6855
- const form = (0, import_react_hook_form2.useFormContext)();
6856
- const controllerControl = control != null ? control : form == null ? void 0 : form.control;
6857
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FormFieldContext.Provider, { value: { name }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6858
- import_react_hook_form2.Controller,
6859
- {
6860
- control: controllerControl,
6861
- name,
6862
- rules,
6863
- shouldUnregister,
6864
- defaultValue,
6865
- render: ({ field, fieldState }) => {
6866
- var _a2;
6867
- const fieldError = getErrorMessage(fieldState.error);
6868
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(FormItem, { className: itemClassName, children: [
6869
- label ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
6870
- FormLabel,
6871
- {
6872
- className: cn("flex items-center gap-0.5", labelClassName),
6873
- children: [
6874
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: label }),
6875
- requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6876
- import_lucide_react3.Asterisk,
6877
- {
6878
- "aria-hidden": "true",
6879
- className: cn(
6880
- "h-3 w-3 shrink-0 text-red-500",
6881
- requiredLabelClassName
6882
- )
6883
- }
6884
- ) : null
6885
- ]
6886
- }
6887
- ) : null,
6888
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6889
- Input,
6890
- __spreadProps(__spreadValues(__spreadValues({}, field), inputProps), {
6891
- value: (_a2 = field.value) != null ? _a2 : "",
6892
- onChange: (event) => {
6893
- field.onChange(event);
6894
- onChange == null ? void 0 : onChange(event.target.value);
6895
- },
6896
- onBlur: (event) => {
6897
- var _a3;
6898
- field.onBlur();
6899
- (_a3 = inputProps.onBlur) == null ? void 0 : _a3.call(inputProps, event);
6900
- },
6901
- ref: field.ref,
6902
- leading,
6903
- trailing,
6904
- invalid: invalid || Boolean(fieldError),
6905
- variant,
6906
- size,
6907
- customSize,
6908
- placeholder,
6909
- className: cn(className),
6910
- classNameDefault
6911
- })
6912
- ) }),
6913
- fieldError ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FormMessage, { className: messageClassName, children: fieldError }) : null
6914
- ] });
6915
- }
6916
- }
6917
- ) });
6918
- };
6919
- FormField.displayName = "FormField";
6920
- var FormItemContext = React45.createContext(null);
6921
- var FormItem = React45.forwardRef((_a, ref) => {
6922
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6923
- const id = React45.useId();
6924
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", __spreadValues({ ref, className: cn("space-y-2", className) }, props)) });
6925
- });
6926
- FormItem.displayName = "FormItem";
6927
- var useFormField = () => {
6928
- var _a;
6929
- const generatedId = React45.useId();
6930
- const fieldContext = React45.useContext(FormFieldContext);
6931
- const itemContext = React45.useContext(FormItemContext);
6932
- const formContext = (0, import_react_hook_form2.useFormContext)();
6933
- const id = (_a = itemContext == null ? void 0 : itemContext.id) != null ? _a : generatedId;
6934
- if (!fieldContext || !formContext) {
6935
- return {
6936
- id,
6937
- formItemId: `${id}-form-item`,
6938
- formDescriptionId: `${id}-form-item-description`,
6939
- formMessageId: `${id}-form-item-message`,
6940
- error: void 0
6941
- };
6942
- }
6943
- const fieldState = formContext.getFieldState(
6944
- fieldContext.name,
6945
- formContext.formState
6946
- );
6947
- return __spreadValues({
6948
- id,
6949
- name: fieldContext.name,
6950
- formItemId: `${id}-form-item`,
6951
- formDescriptionId: `${id}-form-item-description`,
6952
- formMessageId: `${id}-form-item-message`
6953
- }, fieldState);
6954
- };
6955
- var FormLabel = React45.forwardRef((_a, ref) => {
6956
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6957
- const { error, formItemId } = useFormField();
6958
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6959
- Label3,
6960
- __spreadValues({
6961
- ref,
6962
- className: cn(error && "text-destructive", className),
6963
- htmlFor: formItemId
6964
- }, props)
6965
- );
6966
- });
6967
- FormLabel.displayName = "FormLabel";
6968
- var FormControl = React45.forwardRef((_a, ref) => {
6969
- var props = __objRest(_a, []);
6970
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
6971
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6972
- import_react_slot4.Slot,
6973
- __spreadValues({
6974
- ref,
6975
- id: formItemId,
6976
- "aria-describedby": error ? `${formDescriptionId} ${formMessageId}` : formDescriptionId,
6977
- "aria-invalid": Boolean(error)
6978
- }, props)
6979
- );
6980
- });
6981
- FormControl.displayName = "FormControl";
6982
- var FormDescription = React45.forwardRef((_a, ref) => {
6983
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6984
- const { formDescriptionId } = useFormField();
6985
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6986
- "p",
6987
- __spreadValues({
6988
- ref,
6989
- id: formDescriptionId,
6990
- className: cn("text-[0.8rem] text-muted-foreground", className)
6991
- }, props)
6992
- );
6993
- });
6994
- FormDescription.displayName = "FormDescription";
6995
- var FormMessage = React45.forwardRef((_a, ref) => {
6996
- var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
6997
- const { error, formMessageId } = useFormField();
6998
- const body = error ? getErrorMessage(error) : children;
6999
- if (!body) return null;
7000
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7001
- "p",
7002
- __spreadProps(__spreadValues({
7003
- ref,
7004
- id: formMessageId,
7005
- className: cn("text-[0.8rem] font-medium text-destructive", className)
7006
- }, props), {
7007
- children: body
7008
- })
7009
- );
7010
- });
7011
- FormMessage.displayName = "FormMessage";
7012
-
7013
- // src/components/Form/form-checkbox.tsx
7014
- var import_jsx_runtime22 = require("react/jsx-runtime");
7015
- var FormCheckbox = (_a) => {
7016
- var _b = _a, {
7017
- name,
7018
- control,
7019
- rules,
7020
- shouldUnregister,
7021
- defaultValue,
7022
- label,
7023
- description,
7024
- requiredLabel,
7025
- className,
7026
- itemClassName,
7027
- checkboxClassName,
7028
- labelClassName,
7029
- descriptionClassName,
7030
- messageClassName,
7031
- requiredLabelClassName,
7032
- onChange
7033
- } = _b, checkboxProps = __objRest(_b, [
7034
- "name",
7035
- "control",
7036
- "rules",
7037
- "shouldUnregister",
7038
- "defaultValue",
7039
- "label",
7040
- "description",
7041
- "requiredLabel",
7042
- "className",
7043
- "itemClassName",
7044
- "checkboxClassName",
7045
- "labelClassName",
7046
- "descriptionClassName",
7047
- "messageClassName",
7048
- "requiredLabelClassName",
7049
- "onChange"
7050
- ]);
7051
- var _a2;
7052
- const generatedId = React46.useId();
7053
- const form = (0, import_react_hook_form3.useFormContext)();
7054
- const controllerControl = control != null ? control : form == null ? void 0 : form.control;
7055
- const checkboxId = (_a2 = checkboxProps.id) != null ? _a2 : `${generatedId}-checkbox`;
7056
- const descriptionId = `${generatedId}-description`;
7057
- const messageId = `${generatedId}-message`;
7058
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7059
- import_react_hook_form3.Controller,
7060
- {
7061
- control: controllerControl,
7062
- name,
7063
- rules,
7064
- shouldUnregister,
7065
- defaultValue,
7066
- render: ({ field, fieldState }) => {
7067
- var _a3;
7068
- const checked = Boolean(field.value);
7069
- const fieldError = (_a3 = fieldState.error) == null ? void 0 : _a3.message;
7070
- const hasError = Boolean(fieldError);
7071
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FormItem, { className: cn("space-y-1.5", itemClassName), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
7072
- "div",
7073
- {
7074
- className: cn(
7075
- "flex items-start gap-3 rounded-lg border border-transparent p-1 transition-colors",
7076
- hasError && "border-destructive/20 bg-destructive/5",
7077
- className
7078
- ),
7079
- children: [
7080
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7081
- Checkbox,
7082
- __spreadProps(__spreadValues({}, checkboxProps), {
7083
- ref: field.ref,
7084
- id: checkboxId,
7085
- checked,
7086
- invalid: hasError || checkboxProps.invalid,
7087
- "aria-invalid": hasError || checkboxProps.invalid || void 0,
7088
- "aria-describedby": [description ? descriptionId : void 0, hasError ? messageId : void 0].filter(Boolean).join(" ") || void 0,
7089
- className: cn("mt-0.5", checkboxClassName),
7090
- onBlur: field.onBlur,
7091
- onCheckedChange: (value) => {
7092
- const nextValue = value === true;
7093
- field.onChange(nextValue);
7094
- onChange == null ? void 0 : onChange(nextValue);
7095
- }
7096
- })
7097
- ),
7098
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "min-w-0 flex-1", children: [
7099
- label ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
7100
- Label3,
7101
- {
7102
- htmlFor: checkboxId,
7103
- className: cn(
7104
- "inline-flex cursor-pointer items-start gap-1 text-sm font-medium leading-none text-foreground",
7105
- checkboxProps.disabled && "cursor-not-allowed text-muted-foreground",
7106
- hasError && "text-destructive",
7107
- labelClassName
7108
- ),
7109
- children: [
7110
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: label }),
7111
- requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7112
- import_lucide_react4.Asterisk,
7113
- {
7114
- "aria-hidden": "true",
7115
- className: cn(
7116
- "mt-0.5 h-3 w-3 shrink-0 text-red-500",
7117
- requiredLabelClassName
7118
- )
7119
- }
7120
- ) : null
7121
- ]
7122
- }
7123
- ) : null,
7124
- description ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7125
- "p",
7126
- {
7127
- id: descriptionId,
7128
- className: cn(
7129
- "mt-1 text-sm leading-relaxed text-muted-foreground",
7130
- descriptionClassName
7131
- ),
7132
- children: description
7133
- }
7134
- ) : null,
7135
- fieldError ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7136
- "p",
7137
+ const form = (0, import_react_hook_form4.useFormContext)();
7138
+ const controllerControl = control != null ? control : form == null ? void 0 : form.control;
7139
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FormFieldContext.Provider, { value: { name }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7140
+ import_react_hook_form4.Controller,
7141
+ {
7142
+ control: controllerControl,
7143
+ name,
7144
+ rules,
7145
+ shouldUnregister,
7146
+ defaultValue,
7147
+ render: ({ field, fieldState }) => {
7148
+ var _a2;
7149
+ const fieldError = getErrorMessage2(fieldState.error);
7150
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(FormItem, { className: itemClassName, children: [
7151
+ label ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
7152
+ FormLabel,
7153
+ {
7154
+ className: cn("flex items-center gap-0.5", labelClassName),
7155
+ children: [
7156
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: label }),
7157
+ requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7158
+ import_lucide_react4.Asterisk,
7137
7159
  {
7138
- id: messageId,
7160
+ "aria-hidden": "true",
7139
7161
  className: cn(
7140
- "mt-1 text-sm font-medium text-destructive",
7141
- messageClassName
7142
- ),
7143
- children: fieldError
7162
+ "h-3 w-3 shrink-0 text-red-500",
7163
+ requiredLabelClassName
7164
+ )
7144
7165
  }
7145
7166
  ) : null
7146
- ] })
7147
- ]
7148
- }
7149
- ) });
7167
+ ]
7168
+ }
7169
+ ) : null,
7170
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7171
+ Input,
7172
+ __spreadProps(__spreadValues(__spreadValues({}, field), inputProps), {
7173
+ value: (_a2 = field.value) != null ? _a2 : "",
7174
+ onChange: (event) => {
7175
+ field.onChange(event);
7176
+ onChange == null ? void 0 : onChange(event.target.value);
7177
+ },
7178
+ onBlur: (event) => {
7179
+ var _a3;
7180
+ field.onBlur();
7181
+ (_a3 = inputProps.onBlur) == null ? void 0 : _a3.call(inputProps, event);
7182
+ },
7183
+ ref: field.ref,
7184
+ leading,
7185
+ trailing,
7186
+ invalid: invalid || Boolean(fieldError),
7187
+ variant,
7188
+ size,
7189
+ customSize,
7190
+ placeholder,
7191
+ className: cn(className),
7192
+ classNameDefault
7193
+ })
7194
+ ) }),
7195
+ fieldError ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FormMessage, { className: messageClassName, children: fieldError }) : null
7196
+ ] });
7150
7197
  }
7151
7198
  }
7152
- );
7199
+ ) });
7153
7200
  };
7154
- FormCheckbox.displayName = "FormCheckbox";
7201
+ FormField.displayName = "FormField";
7155
7202
 
7156
7203
  // src/components/Form/form-select.tsx
7157
7204
  var React48 = __toESM(require("react"), 1);
7158
- var import_react_slot5 = require("@radix-ui/react-slot");
7159
7205
  var import_lucide_react5 = require("lucide-react");
7160
- var import_react_hook_form4 = require("react-hook-form");
7206
+ var import_react_hook_form5 = require("react-hook-form");
7161
7207
 
7162
7208
  // src/components/select.tsx
7163
7209
  var import_react_icons9 = require("@radix-ui/react-icons");
7164
7210
  var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
7165
7211
  var React47 = __toESM(require("react"), 1);
7166
- var import_jsx_runtime23 = require("react/jsx-runtime");
7212
+ var import_jsx_runtime24 = require("react/jsx-runtime");
7167
7213
  var Select2 = SelectPrimitive.Root;
7168
7214
  var SelectGroup = SelectPrimitive.Group;
7169
7215
  var SelectValue = SelectPrimitive.Value;
7170
7216
  var SelectTrigger = React47.forwardRef((_a, ref) => {
7171
7217
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
7172
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
7218
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
7173
7219
  SelectPrimitive.Trigger,
7174
7220
  __spreadProps(__spreadValues({
7175
7221
  ref,
@@ -7180,7 +7226,7 @@ var SelectTrigger = React47.forwardRef((_a, ref) => {
7180
7226
  }, props), {
7181
7227
  children: [
7182
7228
  children,
7183
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_icons9.CaretSortIcon, { className: "h-4 w-4 opacity-50" }) })
7229
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_icons9.CaretSortIcon, { className: "h-4 w-4 opacity-50" }) })
7184
7230
  ]
7185
7231
  })
7186
7232
  );
@@ -7188,7 +7234,7 @@ var SelectTrigger = React47.forwardRef((_a, ref) => {
7188
7234
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
7189
7235
  var SelectScrollUpButton = React47.forwardRef((_a, ref) => {
7190
7236
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7191
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7237
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7192
7238
  SelectPrimitive.ScrollUpButton,
7193
7239
  __spreadProps(__spreadValues({
7194
7240
  ref,
@@ -7197,14 +7243,14 @@ var SelectScrollUpButton = React47.forwardRef((_a, ref) => {
7197
7243
  className
7198
7244
  )
7199
7245
  }, props), {
7200
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_icons9.ChevronUpIcon, {})
7246
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_icons9.ChevronUpIcon, {})
7201
7247
  })
7202
7248
  );
7203
7249
  });
7204
7250
  SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
7205
7251
  var SelectScrollDownButton = React47.forwardRef((_a, ref) => {
7206
7252
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7207
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7253
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7208
7254
  SelectPrimitive.ScrollDownButton,
7209
7255
  __spreadProps(__spreadValues({
7210
7256
  ref,
@@ -7213,14 +7259,14 @@ var SelectScrollDownButton = React47.forwardRef((_a, ref) => {
7213
7259
  className
7214
7260
  )
7215
7261
  }, props), {
7216
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_icons9.ChevronDownIcon, {})
7262
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_icons9.ChevronDownIcon, {})
7217
7263
  })
7218
7264
  );
7219
7265
  });
7220
7266
  SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
7221
7267
  var SelectContent = React47.forwardRef((_a, ref) => {
7222
7268
  var _b = _a, { className, children, position = "popper" } = _b, props = __objRest(_b, ["className", "children", "position"]);
7223
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
7269
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
7224
7270
  SelectPrimitive.Content,
7225
7271
  __spreadProps(__spreadValues({
7226
7272
  ref,
@@ -7232,8 +7278,8 @@ var SelectContent = React47.forwardRef((_a, ref) => {
7232
7278
  position
7233
7279
  }, props), {
7234
7280
  children: [
7235
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectScrollUpButton, {}),
7236
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7281
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SelectScrollUpButton, {}),
7282
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7237
7283
  SelectPrimitive.Viewport,
7238
7284
  {
7239
7285
  className: cn(
@@ -7243,7 +7289,7 @@ var SelectContent = React47.forwardRef((_a, ref) => {
7243
7289
  children
7244
7290
  }
7245
7291
  ),
7246
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectScrollDownButton, {})
7292
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SelectScrollDownButton, {})
7247
7293
  ]
7248
7294
  })
7249
7295
  ) });
@@ -7251,7 +7297,7 @@ var SelectContent = React47.forwardRef((_a, ref) => {
7251
7297
  SelectContent.displayName = SelectPrimitive.Content.displayName;
7252
7298
  var SelectLabel = React47.forwardRef((_a, ref) => {
7253
7299
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7254
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7300
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7255
7301
  SelectPrimitive.Label,
7256
7302
  __spreadValues({
7257
7303
  ref,
@@ -7262,7 +7308,7 @@ var SelectLabel = React47.forwardRef((_a, ref) => {
7262
7308
  SelectLabel.displayName = SelectPrimitive.Label.displayName;
7263
7309
  var SelectItem = React47.forwardRef((_a, ref) => {
7264
7310
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
7265
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
7311
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
7266
7312
  SelectPrimitive.Item,
7267
7313
  __spreadProps(__spreadValues({
7268
7314
  ref,
@@ -7272,8 +7318,8 @@ var SelectItem = React47.forwardRef((_a, ref) => {
7272
7318
  )
7273
7319
  }, props), {
7274
7320
  children: [
7275
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_icons9.CheckIcon, { className: "h-4 w-4" }) }) }),
7276
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectPrimitive.ItemText, { children })
7321
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_icons9.CheckIcon, { className: "h-4 w-4" }) }) }),
7322
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SelectPrimitive.ItemText, { children })
7277
7323
  ]
7278
7324
  })
7279
7325
  );
@@ -7281,7 +7327,7 @@ var SelectItem = React47.forwardRef((_a, ref) => {
7281
7327
  SelectItem.displayName = SelectPrimitive.Item.displayName;
7282
7328
  var SelectSeparator = React47.forwardRef((_a, ref) => {
7283
7329
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7284
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7330
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7285
7331
  SelectPrimitive.Separator,
7286
7332
  __spreadValues({
7287
7333
  ref,
@@ -7292,114 +7338,14 @@ var SelectSeparator = React47.forwardRef((_a, ref) => {
7292
7338
  SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
7293
7339
 
7294
7340
  // src/components/Form/form-select.tsx
7295
- var import_jsx_runtime24 = require("react/jsx-runtime");
7296
- var FormFieldContext2 = React48.createContext(
7297
- null
7298
- );
7299
- function getErrorMessage2(error) {
7300
- const message2 = error == null ? void 0 : error.message;
7301
- return typeof message2 === "string" ? message2 : void 0;
7302
- }
7303
- var FormItemContext2 = React48.createContext(null);
7304
- var FormItem2 = React48.forwardRef((_a, ref) => {
7305
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7306
- const id = React48.useId();
7307
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FormItemContext2.Provider, { value: { id }, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", __spreadValues({ ref, className: cn("space-y-2", className) }, props)) });
7308
- });
7309
- FormItem2.displayName = "FormItem";
7310
- var useFormField2 = () => {
7311
- var _a;
7312
- const generatedId = React48.useId();
7313
- const fieldContext = React48.useContext(FormFieldContext2);
7314
- const itemContext = React48.useContext(FormItemContext2);
7315
- const formContext = (0, import_react_hook_form4.useFormContext)();
7316
- const id = (_a = itemContext == null ? void 0 : itemContext.id) != null ? _a : generatedId;
7317
- if (!fieldContext || !formContext) {
7318
- return {
7319
- id,
7320
- formItemId: `${id}-form-item`,
7321
- formDescriptionId: `${id}-form-item-description`,
7322
- formMessageId: `${id}-form-item-message`,
7323
- error: void 0
7324
- };
7325
- }
7326
- const fieldState = formContext.getFieldState(
7327
- fieldContext.name,
7328
- formContext.formState
7329
- );
7330
- return __spreadValues({
7331
- id,
7332
- name: fieldContext.name,
7333
- formItemId: `${id}-form-item`,
7334
- formDescriptionId: `${id}-form-item-description`,
7335
- formMessageId: `${id}-form-item-message`
7336
- }, fieldState);
7337
- };
7338
- var FormLabel2 = React48.forwardRef((_a, ref) => {
7339
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7340
- const { error, formItemId } = useFormField2();
7341
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7342
- Label3,
7343
- __spreadValues({
7344
- ref,
7345
- className: cn(error && "text-destructive", className),
7346
- htmlFor: formItemId
7347
- }, props)
7348
- );
7349
- });
7350
- FormLabel2.displayName = "FormLabel";
7351
- var FormControl2 = React48.forwardRef((_a, ref) => {
7352
- var props = __objRest(_a, []);
7353
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField2();
7354
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7355
- import_react_slot5.Slot,
7356
- __spreadValues({
7357
- ref,
7358
- id: formItemId,
7359
- "aria-describedby": error ? `${formDescriptionId} ${formMessageId}` : formDescriptionId,
7360
- "aria-invalid": Boolean(error)
7361
- }, props)
7362
- );
7363
- });
7364
- FormControl2.displayName = "FormControl";
7365
- var FormMessage2 = React48.forwardRef((_a, ref) => {
7366
- var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
7367
- const { error, formMessageId } = useFormField2();
7368
- const body = error ? getErrorMessage2(error) : children;
7369
- if (!body) return null;
7370
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7371
- "p",
7372
- __spreadProps(__spreadValues({
7373
- ref,
7374
- id: formMessageId,
7375
- className: cn("text-[0.8rem] font-medium text-destructive", className)
7376
- }, props), {
7377
- children: body
7378
- })
7379
- );
7380
- });
7381
- FormMessage2.displayName = "FormMessage";
7382
- var getDefaultOptionValue = (item) => {
7383
- var _a;
7384
- if (typeof item === "string") return item;
7385
- if (item && typeof item === "object" && "value" in item) {
7386
- return String((_a = item.value) != null ? _a : "");
7387
- }
7388
- return String(item != null ? item : "");
7389
- };
7390
- var getDefaultOptionLabel = (item) => {
7391
- if (item && typeof item === "object" && "label" in item) {
7392
- return item.label;
7393
- }
7394
- return getDefaultOptionValue(item);
7395
- };
7341
+ var import_jsx_runtime25 = require("react/jsx-runtime");
7396
7342
  var FormSelect = ({
7397
7343
  name,
7398
7344
  control,
7399
7345
  rules,
7400
7346
  shouldUnregister,
7401
7347
  defaultValue,
7402
- placeholder,
7348
+ placeholder = "Seleccionar opci\xF3n",
7403
7349
  label,
7404
7350
  requiredLabel,
7405
7351
  className,
@@ -7428,14 +7374,12 @@ var FormSelect = ({
7428
7374
  emptyText = "No hay resultados",
7429
7375
  position = "popper"
7430
7376
  }) => {
7431
- const form = (0, import_react_hook_form4.useFormContext)();
7377
+ const form = (0, import_react_hook_form5.useFormContext)();
7432
7378
  const controllerControl = control != null ? control : form == null ? void 0 : form.control;
7433
- const [query, setQuery] = React48.useState("");
7434
- const searchRef = React48.useRef(null);
7435
7379
  const sizeClasses = getFormSizeClasses(size, customSize);
7436
- 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";
7380
+ 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";
7437
7381
  const triggerSizeClass = variant === "flushed" ? sizeClasses.flushedControl : variant === "link" ? sizeClasses.linkControl : sizeClasses.control;
7438
- const contentBase = "z-50 rounded-md border border-border bg-popover text-popover-foreground shadow-md !overflow-hidden";
7382
+ const contentBase = "z-50 rounded-xl border border-border bg-popover text-popover-foreground shadow-xl outline-none";
7439
7383
  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]";
7440
7384
  const normalizedOptions = React48.useMemo(() => {
7441
7385
  if (options) return options;
@@ -7456,17 +7400,8 @@ var FormSelect = ({
7456
7400
  items,
7457
7401
  options
7458
7402
  ]);
7459
- const filteredOptions = React48.useMemo(() => {
7460
- if (!searchable || !query.trim()) return normalizedOptions;
7461
- const normalizedQuery = query.trim().toLowerCase();
7462
- return normalizedOptions.filter((option) => {
7463
- var _a;
7464
- const label2 = typeof option.label === "string" ? option.label : String((_a = option.value) != null ? _a : "");
7465
- return `${label2} ${option.value}`.toLowerCase().includes(normalizedQuery);
7466
- });
7467
- }, [normalizedOptions, query, searchable]);
7468
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FormFieldContext2.Provider, { value: { name }, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7469
- import_react_hook_form4.Controller,
7403
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FormFieldContext.Provider, { value: { name }, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7404
+ import_react_hook_form5.Controller,
7470
7405
  {
7471
7406
  control: controllerControl,
7472
7407
  name,
@@ -7475,12 +7410,20 @@ var FormSelect = ({
7475
7410
  defaultValue,
7476
7411
  render: ({ field, fieldState }) => {
7477
7412
  var _a;
7478
- const fieldError = getErrorMessage2(fieldState.error);
7413
+ const fieldError = getErrorMessage(fieldState.error);
7479
7414
  const hasError = Boolean(invalid || fieldError);
7480
- const hasOptions = filteredOptions.length > 0;
7481
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(FormItem2, { children: [
7482
- label ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
7483
- FormLabel2,
7415
+ const handleValueChange = (value) => {
7416
+ var _a2;
7417
+ const nextOption = normalizedOptions.find(
7418
+ (option) => option.value === value
7419
+ );
7420
+ field.onChange(value);
7421
+ onChange == null ? void 0 : onChange(value);
7422
+ onChangeItem == null ? void 0 : onChangeItem((_a2 = nextOption == null ? void 0 : nextOption.data) != null ? _a2 : null);
7423
+ };
7424
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(FormItem, { children: [
7425
+ label ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
7426
+ FormLabel,
7484
7427
  {
7485
7428
  className: cn(
7486
7429
  "flex items-center gap-0.5",
@@ -7488,8 +7431,8 @@ var FormSelect = ({
7488
7431
  labelClassName
7489
7432
  ),
7490
7433
  children: [
7491
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: label }),
7492
- requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7434
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: label }),
7435
+ requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7493
7436
  import_lucide_react5.Asterisk,
7494
7437
  {
7495
7438
  "aria-hidden": "true",
@@ -7502,35 +7445,29 @@ var FormSelect = ({
7502
7445
  ]
7503
7446
  }
7504
7447
  ) : null,
7505
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
7448
+ searchable ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7449
+ Badge,
7450
+ {
7451
+ variant: "outline",
7452
+ className: cn(
7453
+ "w-full cursor-pointer",
7454
+ hasError && "border-destructive ring-destructive focus:ring-destructive/40",
7455
+ className
7456
+ )
7457
+ }
7458
+ ) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
7506
7459
  Select2,
7507
7460
  {
7508
7461
  value: (_a = field.value) != null ? _a : "",
7509
- onValueChange: (value) => {
7510
- var _a2;
7511
- const selectedOption = normalizedOptions.find(
7512
- (option) => option.value === value
7513
- );
7514
- field.onChange(value);
7515
- onChange == null ? void 0 : onChange(value);
7516
- onChangeItem == null ? void 0 : onChangeItem(
7517
- (_a2 = selectedOption == null ? void 0 : selectedOption.data) != null ? _a2 : null
7518
- );
7519
- },
7520
- onOpenChange: (open) => {
7521
- if (open && searchable) {
7522
- requestAnimationFrame(() => {
7523
- var _a2;
7524
- (_a2 = searchRef.current) == null ? void 0 : _a2.focus();
7525
- });
7526
- }
7527
- if (!open) {
7528
- setQuery("");
7462
+ onValueChange: handleValueChange,
7463
+ onOpenChange: (nextOpen) => {
7464
+ if (!nextOpen) {
7465
+ field.onBlur();
7529
7466
  }
7530
7467
  },
7531
7468
  disabled,
7532
7469
  children: [
7533
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FormControl2, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7470
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7534
7471
  SelectTrigger,
7535
7472
  {
7536
7473
  className: cn(
@@ -7540,10 +7477,10 @@ var FormSelect = ({
7540
7477
  hasError && "border-destructive ring-destructive focus:ring-destructive/40",
7541
7478
  className
7542
7479
  ),
7543
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SelectValue, { placeholder })
7480
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SelectValue, { placeholder })
7544
7481
  }
7545
7482
  ) }),
7546
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
7483
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7547
7484
  SelectContent,
7548
7485
  {
7549
7486
  position,
@@ -7551,73 +7488,41 @@ var FormSelect = ({
7551
7488
  className: cn(
7552
7489
  contentBase,
7553
7490
  contentViewport,
7554
- "w-(--radix-select-trigger-width) min-w-(--radix-select-trigger-width)",
7491
+ "w-(--radix-select-trigger-width) min-w-(--radix-select-trigger-width) overflow-hidden!",
7555
7492
  contentClassName
7556
7493
  ),
7557
- onCloseAutoFocus: (event) => {
7558
- if (searchable) {
7559
- event.preventDefault();
7560
- }
7561
- },
7562
7494
  onWheelCapture: (event) => {
7563
7495
  event.stopPropagation();
7564
7496
  },
7565
7497
  onTouchMoveCapture: (event) => {
7566
7498
  event.stopPropagation();
7567
7499
  },
7568
- children: [
7569
- searchable && normalizedOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "sticky top-0 z-10 border-b border-border bg-popover p-2", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7570
- "input",
7571
- {
7572
- ref: searchRef,
7573
- value: query,
7574
- onChange: (event) => setQuery(event.target.value),
7575
- placeholder: searchPlaceholder,
7576
- className: cn(
7577
- "w-full rounded-md border border-input bg-input outline-none focus:ring-2 focus:ring-primary/20",
7578
- sizeClasses.searchInput,
7579
- searchInputClassName
7580
- ),
7581
- onKeyDown: (event) => {
7582
- if (event.key !== "Escape") {
7583
- event.stopPropagation();
7584
- }
7585
- },
7586
- onPointerDown: (event) => event.stopPropagation(),
7587
- onClick: (event) => event.stopPropagation()
7588
- }
7589
- ) }) : null,
7590
- children && !searchable ? children : null,
7591
- !children || searchable ? hasOptions ? filteredOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7592
- SelectItem,
7593
- {
7594
- value: option.value,
7595
- disabled: option.disabled,
7596
- className: cn(
7597
- sizeClasses.selectItem,
7598
- itemClassName
7599
- ),
7600
- children: option.label
7601
- },
7602
- option.value
7603
- )) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7604
- "div",
7605
- {
7606
- className: cn(
7607
- "px-3 py-2 text-muted-foreground",
7608
- sizeClasses.message
7609
- ),
7610
- children: emptyText
7611
- }
7612
- ) : null
7613
- ]
7500
+ children: children ? children : normalizedOptions.length > 0 ? normalizedOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7501
+ SelectItem,
7502
+ {
7503
+ value: option.value,
7504
+ disabled: option.disabled,
7505
+ className: cn(sizeClasses.selectItem, itemClassName),
7506
+ children: option.label
7507
+ },
7508
+ option.value
7509
+ )) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7510
+ "div",
7511
+ {
7512
+ className: cn(
7513
+ "px-3 py-2 text-muted-foreground",
7514
+ sizeClasses.message
7515
+ ),
7516
+ children: emptyText
7517
+ }
7518
+ )
7614
7519
  }
7615
7520
  )
7616
7521
  ]
7617
7522
  }
7618
7523
  ),
7619
- fieldError ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7620
- FormMessage2,
7524
+ fieldError ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7525
+ FormMessage,
7621
7526
  {
7622
7527
  className: cn(sizeClasses.message, messageClassName),
7623
7528
  children: fieldError
@@ -7633,12 +7538,12 @@ FormSelect.displayName = "FormSelect";
7633
7538
  // src/components/hover-card.tsx
7634
7539
  var HoverCardPrimitive = __toESM(require("@radix-ui/react-hover-card"), 1);
7635
7540
  var React49 = __toESM(require("react"), 1);
7636
- var import_jsx_runtime25 = require("react/jsx-runtime");
7541
+ var import_jsx_runtime26 = require("react/jsx-runtime");
7637
7542
  var HoverCard = HoverCardPrimitive.Root;
7638
7543
  var HoverCardTrigger = HoverCardPrimitive.Trigger;
7639
7544
  var HoverCardContent = React49.forwardRef((_a, ref) => {
7640
7545
  var _b = _a, { className, align = "center", sideOffset = 4 } = _b, props = __objRest(_b, ["className", "align", "sideOffset"]);
7641
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7546
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7642
7547
  HoverCardPrimitive.Content,
7643
7548
  __spreadValues({
7644
7549
  ref,
@@ -7690,10 +7595,10 @@ var Icons = IconsApp;
7690
7595
  var import_react_icons10 = require("@radix-ui/react-icons");
7691
7596
  var import_input_otp = require("input-otp");
7692
7597
  var React50 = __toESM(require("react"), 1);
7693
- var import_jsx_runtime26 = require("react/jsx-runtime");
7598
+ var import_jsx_runtime27 = require("react/jsx-runtime");
7694
7599
  var InputOTP = React50.forwardRef((_a, ref) => {
7695
7600
  var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
7696
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7601
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7697
7602
  import_input_otp.OTPInput,
7698
7603
  __spreadValues({
7699
7604
  ref,
@@ -7708,14 +7613,14 @@ var InputOTP = React50.forwardRef((_a, ref) => {
7708
7613
  InputOTP.displayName = "InputOTP";
7709
7614
  var InputOTPGroup = React50.forwardRef((_a, ref) => {
7710
7615
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7711
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", __spreadValues({ ref, className: cn("flex items-center", className) }, props));
7616
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", __spreadValues({ ref, className: cn("flex items-center", className) }, props));
7712
7617
  });
7713
7618
  InputOTPGroup.displayName = "InputOTPGroup";
7714
7619
  var InputOTPSlot = React50.forwardRef((_a, ref) => {
7715
7620
  var _b = _a, { index, className } = _b, props = __objRest(_b, ["index", "className"]);
7716
7621
  const inputOTPContext = React50.useContext(import_input_otp.OTPInputContext);
7717
7622
  const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
7718
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
7623
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7719
7624
  "div",
7720
7625
  __spreadProps(__spreadValues({
7721
7626
  ref,
@@ -7728,7 +7633,7 @@ var InputOTPSlot = React50.forwardRef((_a, ref) => {
7728
7633
  }, props), {
7729
7634
  children: [
7730
7635
  char,
7731
- hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "animate-caret-blink h-4 w-px bg-foreground duration-1000" }) })
7636
+ hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "animate-caret-blink h-4 w-px bg-foreground duration-1000" }) })
7732
7637
  ]
7733
7638
  })
7734
7639
  );
@@ -7736,7 +7641,7 @@ var InputOTPSlot = React50.forwardRef((_a, ref) => {
7736
7641
  InputOTPSlot.displayName = "InputOTPSlot";
7737
7642
  var InputOTPSeparator = React50.forwardRef((_a, ref) => {
7738
7643
  var props = __objRest(_a, []);
7739
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", __spreadProps(__spreadValues({ ref, role: "separator" }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_icons10.DashIcon, {}) }));
7644
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", __spreadProps(__spreadValues({ ref, role: "separator" }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_icons10.DashIcon, {}) }));
7740
7645
  });
7741
7646
  InputOTPSeparator.displayName = "InputOTPSeparator";
7742
7647
 
@@ -7744,7 +7649,7 @@ InputOTPSeparator.displayName = "InputOTPSeparator";
7744
7649
  var import_react_icons11 = require("@radix-ui/react-icons");
7745
7650
  var MenubarPrimitive = __toESM(require("@radix-ui/react-menubar"), 1);
7746
7651
  var React51 = __toESM(require("react"), 1);
7747
- var import_jsx_runtime27 = require("react/jsx-runtime");
7652
+ var import_jsx_runtime28 = require("react/jsx-runtime");
7748
7653
  var MenubarMenu = MenubarPrimitive.Menu;
7749
7654
  var MenubarGroup = MenubarPrimitive.Group;
7750
7655
  var MenubarPortal = MenubarPrimitive.Portal;
@@ -7752,7 +7657,7 @@ var MenubarSub = MenubarPrimitive.Sub;
7752
7657
  var MenubarRadioGroup = MenubarPrimitive.RadioGroup;
7753
7658
  var Menubar = React51.forwardRef((_a, ref) => {
7754
7659
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7755
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7660
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7756
7661
  MenubarPrimitive.Root,
7757
7662
  __spreadValues({
7758
7663
  ref,
@@ -7766,7 +7671,7 @@ var Menubar = React51.forwardRef((_a, ref) => {
7766
7671
  Menubar.displayName = MenubarPrimitive.Root.displayName;
7767
7672
  var MenubarTrigger = React51.forwardRef((_a, ref) => {
7768
7673
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7769
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7674
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7770
7675
  MenubarPrimitive.Trigger,
7771
7676
  __spreadValues({
7772
7677
  ref,
@@ -7780,7 +7685,7 @@ var MenubarTrigger = React51.forwardRef((_a, ref) => {
7780
7685
  MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
7781
7686
  var MenubarSubTrigger = React51.forwardRef((_a, ref) => {
7782
7687
  var _b = _a, { className, inset, children } = _b, props = __objRest(_b, ["className", "inset", "children"]);
7783
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7688
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
7784
7689
  MenubarPrimitive.SubTrigger,
7785
7690
  __spreadProps(__spreadValues({
7786
7691
  ref,
@@ -7792,7 +7697,7 @@ var MenubarSubTrigger = React51.forwardRef((_a, ref) => {
7792
7697
  }, props), {
7793
7698
  children: [
7794
7699
  children,
7795
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_icons11.ChevronRightIcon, { className: "ml-auto h-4 w-4" })
7700
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_icons11.ChevronRightIcon, { className: "ml-auto h-4 w-4" })
7796
7701
  ]
7797
7702
  })
7798
7703
  );
@@ -7800,7 +7705,7 @@ var MenubarSubTrigger = React51.forwardRef((_a, ref) => {
7800
7705
  MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
7801
7706
  var MenubarSubContent = React51.forwardRef((_a, ref) => {
7802
7707
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7803
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7708
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7804
7709
  MenubarPrimitive.SubContent,
7805
7710
  __spreadValues({
7806
7711
  ref,
@@ -7815,7 +7720,7 @@ MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
7815
7720
  var MenubarContent = React51.forwardRef(
7816
7721
  (_a, ref) => {
7817
7722
  var _b = _a, { className, align = "start", alignOffset = -4, sideOffset = 8 } = _b, props = __objRest(_b, ["className", "align", "alignOffset", "sideOffset"]);
7818
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MenubarPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7723
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MenubarPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7819
7724
  MenubarPrimitive.Content,
7820
7725
  __spreadValues({
7821
7726
  ref,
@@ -7833,7 +7738,7 @@ var MenubarContent = React51.forwardRef(
7833
7738
  MenubarContent.displayName = MenubarPrimitive.Content.displayName;
7834
7739
  var MenubarItem = React51.forwardRef((_a, ref) => {
7835
7740
  var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
7836
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7741
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7837
7742
  MenubarPrimitive.Item,
7838
7743
  __spreadValues({
7839
7744
  ref,
@@ -7848,7 +7753,7 @@ var MenubarItem = React51.forwardRef((_a, ref) => {
7848
7753
  MenubarItem.displayName = MenubarPrimitive.Item.displayName;
7849
7754
  var MenubarCheckboxItem = React51.forwardRef((_a, ref) => {
7850
7755
  var _b = _a, { className, children, checked } = _b, props = __objRest(_b, ["className", "children", "checked"]);
7851
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7756
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
7852
7757
  MenubarPrimitive.CheckboxItem,
7853
7758
  __spreadProps(__spreadValues({
7854
7759
  ref,
@@ -7859,7 +7764,7 @@ var MenubarCheckboxItem = React51.forwardRef((_a, ref) => {
7859
7764
  checked
7860
7765
  }, props), {
7861
7766
  children: [
7862
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_icons11.CheckIcon, { className: "h-4 w-4" }) }) }),
7767
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_icons11.CheckIcon, { className: "h-4 w-4" }) }) }),
7863
7768
  children
7864
7769
  ]
7865
7770
  })
@@ -7868,7 +7773,7 @@ var MenubarCheckboxItem = React51.forwardRef((_a, ref) => {
7868
7773
  MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
7869
7774
  var MenubarRadioItem = React51.forwardRef((_a, ref) => {
7870
7775
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
7871
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7776
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
7872
7777
  MenubarPrimitive.RadioItem,
7873
7778
  __spreadProps(__spreadValues({
7874
7779
  ref,
@@ -7878,7 +7783,7 @@ var MenubarRadioItem = React51.forwardRef((_a, ref) => {
7878
7783
  )
7879
7784
  }, props), {
7880
7785
  children: [
7881
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_icons11.DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
7786
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_icons11.DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
7882
7787
  children
7883
7788
  ]
7884
7789
  })
@@ -7887,7 +7792,7 @@ var MenubarRadioItem = React51.forwardRef((_a, ref) => {
7887
7792
  MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
7888
7793
  var MenubarLabel = React51.forwardRef((_a, ref) => {
7889
7794
  var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
7890
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7795
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7891
7796
  MenubarPrimitive.Label,
7892
7797
  __spreadValues({
7893
7798
  ref,
@@ -7902,7 +7807,7 @@ var MenubarLabel = React51.forwardRef((_a, ref) => {
7902
7807
  MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
7903
7808
  var MenubarSeparator = React51.forwardRef((_a, ref) => {
7904
7809
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7905
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7810
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7906
7811
  MenubarPrimitive.Separator,
7907
7812
  __spreadValues({
7908
7813
  ref,
@@ -7917,7 +7822,7 @@ var MenubarShortcut = (_a) => {
7917
7822
  } = _b, props = __objRest(_b, [
7918
7823
  "className"
7919
7824
  ]);
7920
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7825
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7921
7826
  "span",
7922
7827
  __spreadValues({
7923
7828
  className: cn(
@@ -7930,7 +7835,7 @@ var MenubarShortcut = (_a) => {
7930
7835
  MenubarShortcut.displayname = "MenubarShortcut";
7931
7836
 
7932
7837
  // src/components/modal.tsx
7933
- var import_jsx_runtime28 = require("react/jsx-runtime");
7838
+ var import_jsx_runtime29 = require("react/jsx-runtime");
7934
7839
  var Modal = ({
7935
7840
  title,
7936
7841
  description,
@@ -7944,12 +7849,12 @@ var Modal = ({
7944
7849
  onClose();
7945
7850
  }
7946
7851
  };
7947
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Dialog, { open: isOpen, onOpenChange: onChange, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(DialogContent, { className, children: [
7948
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(DialogHeader, { children: [
7949
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DialogTitle, { children: title }),
7950
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DialogDescription, { children: description })
7852
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Dialog, { open: isOpen, onOpenChange: onChange, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(DialogContent, { className, children: [
7853
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(DialogHeader, { children: [
7854
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DialogTitle, { children: title }),
7855
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DialogDescription, { children: description })
7951
7856
  ] }),
7952
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { children })
7857
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { children })
7953
7858
  ] }) });
7954
7859
  };
7955
7860
 
@@ -7958,10 +7863,10 @@ var import_react_icons12 = require("@radix-ui/react-icons");
7958
7863
  var NavigationMenuPrimitive = __toESM(require("@radix-ui/react-navigation-menu"), 1);
7959
7864
  var import_class_variance_authority6 = require("class-variance-authority");
7960
7865
  var React52 = __toESM(require("react"), 1);
7961
- var import_jsx_runtime29 = require("react/jsx-runtime");
7866
+ var import_jsx_runtime30 = require("react/jsx-runtime");
7962
7867
  var NavigationMenu = React52.forwardRef((_a, ref) => {
7963
7868
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
7964
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
7869
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
7965
7870
  NavigationMenuPrimitive.Root,
7966
7871
  __spreadProps(__spreadValues({
7967
7872
  ref,
@@ -7972,7 +7877,7 @@ var NavigationMenu = React52.forwardRef((_a, ref) => {
7972
7877
  }, props), {
7973
7878
  children: [
7974
7879
  children,
7975
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(NavigationMenuViewport, {})
7880
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(NavigationMenuViewport, {})
7976
7881
  ]
7977
7882
  })
7978
7883
  );
@@ -7980,7 +7885,7 @@ var NavigationMenu = React52.forwardRef((_a, ref) => {
7980
7885
  NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
7981
7886
  var NavigationMenuList = React52.forwardRef((_a, ref) => {
7982
7887
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7983
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7888
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7984
7889
  NavigationMenuPrimitive.List,
7985
7890
  __spreadValues({
7986
7891
  ref,
@@ -7998,7 +7903,7 @@ var navigationMenuTriggerStyle = (0, import_class_variance_authority6.cva)(
7998
7903
  );
7999
7904
  var NavigationMenuTrigger = React52.forwardRef((_a, ref) => {
8000
7905
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
8001
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
7906
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
8002
7907
  NavigationMenuPrimitive.Trigger,
8003
7908
  __spreadProps(__spreadValues({
8004
7909
  ref,
@@ -8007,7 +7912,7 @@ var NavigationMenuTrigger = React52.forwardRef((_a, ref) => {
8007
7912
  children: [
8008
7913
  children,
8009
7914
  " ",
8010
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7915
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8011
7916
  import_react_icons12.ChevronDownIcon,
8012
7917
  {
8013
7918
  className: "relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180",
@@ -8021,7 +7926,7 @@ var NavigationMenuTrigger = React52.forwardRef((_a, ref) => {
8021
7926
  NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
8022
7927
  var NavigationMenuContent = React52.forwardRef((_a, ref) => {
8023
7928
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8024
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7929
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8025
7930
  NavigationMenuPrimitive.Content,
8026
7931
  __spreadValues({
8027
7932
  ref,
@@ -8036,7 +7941,7 @@ NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
8036
7941
  var NavigationMenuLink = NavigationMenuPrimitive.Link;
8037
7942
  var NavigationMenuViewport = React52.forwardRef((_a, ref) => {
8038
7943
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8039
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7944
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8040
7945
  NavigationMenuPrimitive.Viewport,
8041
7946
  __spreadValues({
8042
7947
  className: cn(
@@ -8050,7 +7955,7 @@ var NavigationMenuViewport = React52.forwardRef((_a, ref) => {
8050
7955
  NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
8051
7956
  var NavigationMenuIndicator = React52.forwardRef((_a, ref) => {
8052
7957
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8053
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7958
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8054
7959
  NavigationMenuPrimitive.Indicator,
8055
7960
  __spreadProps(__spreadValues({
8056
7961
  ref,
@@ -8059,7 +7964,7 @@ var NavigationMenuIndicator = React52.forwardRef((_a, ref) => {
8059
7964
  className
8060
7965
  )
8061
7966
  }, props), {
8062
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
7967
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
8063
7968
  })
8064
7969
  );
8065
7970
  });
@@ -8069,10 +7974,10 @@ NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayN
8069
7974
  var import_react_icons13 = require("@radix-ui/react-icons");
8070
7975
  var React53 = __toESM(require("react"), 1);
8071
7976
  var import_lucide_react7 = require("lucide-react");
8072
- var import_jsx_runtime30 = require("react/jsx-runtime");
7977
+ var import_jsx_runtime31 = require("react/jsx-runtime");
8073
7978
  var Pagination = (_a) => {
8074
7979
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8075
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7980
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
8076
7981
  "nav",
8077
7982
  __spreadValues({
8078
7983
  role: "navigation",
@@ -8084,7 +7989,7 @@ var Pagination = (_a) => {
8084
7989
  Pagination.displayName = "Pagination";
8085
7990
  var PaginationContent = React53.forwardRef((_a, ref) => {
8086
7991
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8087
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7992
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
8088
7993
  "ul",
8089
7994
  __spreadValues({
8090
7995
  ref,
@@ -8095,7 +8000,7 @@ var PaginationContent = React53.forwardRef((_a, ref) => {
8095
8000
  PaginationContent.displayName = "PaginationContent";
8096
8001
  var PaginationItem = React53.forwardRef((_a, ref) => {
8097
8002
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8098
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("li", __spreadValues({ ref, className: cn("", className) }, props));
8003
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("li", __spreadValues({ ref, className: cn("", className) }, props));
8099
8004
  });
8100
8005
  PaginationItem.displayName = "PaginationItem";
8101
8006
  var PaginationLink = (_a) => {
@@ -8108,7 +8013,7 @@ var PaginationLink = (_a) => {
8108
8013
  "isActive",
8109
8014
  "size"
8110
8015
  ]);
8111
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8016
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
8112
8017
  "a",
8113
8018
  __spreadValues({
8114
8019
  "aria-current": isActive ? "page" : void 0,
@@ -8129,7 +8034,7 @@ var PaginationPreviousLast = (_a) => {
8129
8034
  } = _b, props = __objRest(_b, [
8130
8035
  "className"
8131
8036
  ]);
8132
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
8037
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
8133
8038
  PaginationLink,
8134
8039
  __spreadProps(__spreadValues({
8135
8040
  "aria-label": "Go to previous page",
@@ -8137,8 +8042,8 @@ var PaginationPreviousLast = (_a) => {
8137
8042
  className: cn("gap-1 pl-2.5", className)
8138
8043
  }, props), {
8139
8044
  children: [
8140
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react7.ChevronLeft, { className: "h-4 w-4" }),
8141
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "sr-only", children: "Previous Last" })
8045
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react7.ChevronLeft, { className: "h-4 w-4" }),
8046
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "sr-only", children: "Previous Last" })
8142
8047
  ]
8143
8048
  })
8144
8049
  );
@@ -8150,7 +8055,7 @@ var PaginationPrevious = (_a) => {
8150
8055
  } = _b, props = __objRest(_b, [
8151
8056
  "className"
8152
8057
  ]);
8153
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
8058
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
8154
8059
  PaginationLink,
8155
8060
  __spreadProps(__spreadValues({
8156
8061
  "aria-label": "Go to previous page",
@@ -8158,8 +8063,8 @@ var PaginationPrevious = (_a) => {
8158
8063
  className: cn("gap-1 pl-2.5", className)
8159
8064
  }, props), {
8160
8065
  children: [
8161
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_icons13.ChevronLeftIcon, { className: "h-4 w-4" }),
8162
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "Previous" })
8066
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_icons13.ChevronLeftIcon, { className: "h-4 w-4" }),
8067
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: "Previous" })
8163
8068
  ]
8164
8069
  })
8165
8070
  );
@@ -8171,7 +8076,7 @@ var PaginationNext = (_a) => {
8171
8076
  } = _b, props = __objRest(_b, [
8172
8077
  "className"
8173
8078
  ]);
8174
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
8079
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
8175
8080
  PaginationLink,
8176
8081
  __spreadProps(__spreadValues({
8177
8082
  "aria-label": "Go to next page",
@@ -8179,8 +8084,8 @@ var PaginationNext = (_a) => {
8179
8084
  className: cn("gap-1 pr-2.5", className)
8180
8085
  }, props), {
8181
8086
  children: [
8182
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "Next" }),
8183
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_icons13.ChevronRightIcon, { className: "h-4 w-4" })
8087
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: "Next" }),
8088
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_icons13.ChevronRightIcon, { className: "h-4 w-4" })
8184
8089
  ]
8185
8090
  })
8186
8091
  );
@@ -8192,7 +8097,7 @@ var PaginationNextLast = (_a) => {
8192
8097
  } = _b, props = __objRest(_b, [
8193
8098
  "className"
8194
8099
  ]);
8195
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
8100
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
8196
8101
  PaginationLink,
8197
8102
  __spreadProps(__spreadValues({
8198
8103
  "aria-label": "Go to next page",
@@ -8200,8 +8105,8 @@ var PaginationNextLast = (_a) => {
8200
8105
  className: cn("gap-1 pr-2.5", className)
8201
8106
  }, props), {
8202
8107
  children: [
8203
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "sr-only", children: "Next Last" }),
8204
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react7.ChevronRight, { className: "h-4 w-4" })
8108
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "sr-only", children: "Next Last" }),
8109
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react7.ChevronRight, { className: "h-4 w-4" })
8205
8110
  ]
8206
8111
  })
8207
8112
  );
@@ -8213,15 +8118,15 @@ var PaginationEllipsis = (_a) => {
8213
8118
  } = _b, props = __objRest(_b, [
8214
8119
  "className"
8215
8120
  ]);
8216
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
8121
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
8217
8122
  "span",
8218
8123
  __spreadProps(__spreadValues({
8219
8124
  "aria-hidden": true,
8220
8125
  className: cn("flex h-9 w-9 items-center justify-center", className)
8221
8126
  }, props), {
8222
8127
  children: [
8223
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_icons13.DotsHorizontalIcon, { className: "h-4 w-4" }),
8224
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "sr-only", children: "More pages" })
8128
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_icons13.DotsHorizontalIcon, { className: "h-4 w-4" }),
8129
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "sr-only", children: "More pages" })
8225
8130
  ]
8226
8131
  })
8227
8132
  );
@@ -8231,13 +8136,13 @@ PaginationEllipsis.displayName = "PaginationEllipsis";
8231
8136
  // src/components/popover.tsx
8232
8137
  var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
8233
8138
  var React54 = __toESM(require("react"), 1);
8234
- var import_jsx_runtime31 = require("react/jsx-runtime");
8139
+ var import_jsx_runtime32 = require("react/jsx-runtime");
8235
8140
  var Popover = PopoverPrimitive.Root;
8236
8141
  var PopoverTrigger = PopoverPrimitive.Trigger;
8237
8142
  var PopoverAnchor = PopoverPrimitive.Anchor;
8238
8143
  var PopoverContent = React54.forwardRef((_a, ref) => {
8239
8144
  var _b = _a, { className, align = "center", sideOffset = 4 } = _b, props = __objRest(_b, ["className", "align", "sideOffset"]);
8240
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
8145
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
8241
8146
  PopoverPrimitive.Content,
8242
8147
  __spreadValues({
8243
8148
  ref,
@@ -8255,10 +8160,10 @@ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
8255
8160
  // src/components/progress.tsx
8256
8161
  var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
8257
8162
  var React55 = __toESM(require("react"), 1);
8258
- var import_jsx_runtime32 = require("react/jsx-runtime");
8163
+ var import_jsx_runtime33 = require("react/jsx-runtime");
8259
8164
  var Progress = React55.forwardRef((_a, ref) => {
8260
8165
  var _b = _a, { className, value } = _b, props = __objRest(_b, ["className", "value"]);
8261
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
8166
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
8262
8167
  ProgressPrimitive.Root,
8263
8168
  __spreadProps(__spreadValues({
8264
8169
  ref,
@@ -8267,7 +8172,7 @@ var Progress = React55.forwardRef((_a, ref) => {
8267
8172
  className
8268
8173
  )
8269
8174
  }, props), {
8270
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
8175
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
8271
8176
  ProgressPrimitive.Indicator,
8272
8177
  {
8273
8178
  className: "h-full w-full flex-1 bg-primary transition-all",
@@ -8283,10 +8188,10 @@ Progress.displayName = ProgressPrimitive.Root.displayName;
8283
8188
  var import_react_icons14 = require("@radix-ui/react-icons");
8284
8189
  var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
8285
8190
  var React56 = __toESM(require("react"), 1);
8286
- var import_jsx_runtime33 = require("react/jsx-runtime");
8191
+ var import_jsx_runtime34 = require("react/jsx-runtime");
8287
8192
  var RadioGroup4 = React56.forwardRef((_a, ref) => {
8288
8193
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8289
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
8194
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
8290
8195
  RadioGroupPrimitive.Root,
8291
8196
  __spreadProps(__spreadValues({
8292
8197
  className: cn("grid gap-2", className)
@@ -8298,7 +8203,7 @@ var RadioGroup4 = React56.forwardRef((_a, ref) => {
8298
8203
  RadioGroup4.displayName = RadioGroupPrimitive.Root.displayName;
8299
8204
  var RadioGroupItem = React56.forwardRef((_a, ref) => {
8300
8205
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8301
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
8206
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
8302
8207
  RadioGroupPrimitive.Item,
8303
8208
  __spreadProps(__spreadValues({
8304
8209
  ref,
@@ -8307,7 +8212,7 @@ var RadioGroupItem = React56.forwardRef((_a, ref) => {
8307
8212
  className
8308
8213
  )
8309
8214
  }, props), {
8310
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_icons14.CheckIcon, { className: "h-3.5 w-3.5 fill-primary" }) })
8215
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_icons14.CheckIcon, { className: "h-3.5 w-3.5 fill-primary" }) })
8311
8216
  })
8312
8217
  );
8313
8218
  });
@@ -8316,14 +8221,14 @@ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
8316
8221
  // src/components/resizable.tsx
8317
8222
  var import_react_icons15 = require("@radix-ui/react-icons");
8318
8223
  var ResizablePrimitive = __toESM(require("react-resizable-panels"), 1);
8319
- var import_jsx_runtime34 = require("react/jsx-runtime");
8224
+ var import_jsx_runtime35 = require("react/jsx-runtime");
8320
8225
  var ResizablePanelGroup = (_a) => {
8321
8226
  var _b = _a, {
8322
8227
  className
8323
8228
  } = _b, props = __objRest(_b, [
8324
8229
  "className"
8325
8230
  ]);
8326
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
8231
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
8327
8232
  ResizablePrimitive.Group,
8328
8233
  __spreadValues({
8329
8234
  className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className)
@@ -8339,7 +8244,7 @@ var ResizableHandle = (_a) => {
8339
8244
  "withHandle",
8340
8245
  "className"
8341
8246
  ]);
8342
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
8247
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
8343
8248
  ResizablePrimitive.Separator,
8344
8249
  __spreadProps(__spreadValues({
8345
8250
  className: cn(
@@ -8347,7 +8252,7 @@ var ResizableHandle = (_a) => {
8347
8252
  className
8348
8253
  )
8349
8254
  }, props), {
8350
- children: withHandle && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_icons15.DragHandleDots2Icon, { className: "h-2.5 w-2.5" }) })
8255
+ children: withHandle && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_icons15.DragHandleDots2Icon, { className: "h-2.5 w-2.5" }) })
8351
8256
  })
8352
8257
  );
8353
8258
  };
@@ -8355,19 +8260,19 @@ var ResizableHandle = (_a) => {
8355
8260
  // src/components/scroll-area.tsx
8356
8261
  var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
8357
8262
  var React57 = __toESM(require("react"), 1);
8358
- var import_jsx_runtime35 = require("react/jsx-runtime");
8263
+ var import_jsx_runtime36 = require("react/jsx-runtime");
8359
8264
  var ScrollArea = React57.forwardRef((_a, ref) => {
8360
8265
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
8361
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
8266
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
8362
8267
  ScrollAreaPrimitive.Root,
8363
8268
  __spreadProps(__spreadValues({
8364
8269
  ref,
8365
8270
  className: cn("relative overflow-hidden", className)
8366
8271
  }, props), {
8367
8272
  children: [
8368
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
8369
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ScrollBar, {}),
8370
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ScrollAreaPrimitive.Corner, {})
8273
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
8274
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ScrollBar, {}),
8275
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ScrollAreaPrimitive.Corner, {})
8371
8276
  ]
8372
8277
  })
8373
8278
  );
@@ -8375,7 +8280,7 @@ var ScrollArea = React57.forwardRef((_a, ref) => {
8375
8280
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
8376
8281
  var ScrollBar = React57.forwardRef((_a, ref) => {
8377
8282
  var _b = _a, { className, orientation = "vertical" } = _b, props = __objRest(_b, ["className", "orientation"]);
8378
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
8283
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
8379
8284
  ScrollAreaPrimitive.ScrollAreaScrollbar,
8380
8285
  __spreadProps(__spreadValues({
8381
8286
  ref,
@@ -8387,208 +8292,465 @@ var ScrollBar = React57.forwardRef((_a, ref) => {
8387
8292
  className
8388
8293
  )
8389
8294
  }, props), {
8390
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
8295
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
8391
8296
  })
8392
8297
  );
8393
8298
  });
8394
- ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
8395
-
8396
- // src/components/search-input.tsx
8397
- var import_react33 = __toESM(require("react"), 1);
8398
- var import_use_debounce = require("use-debounce");
8399
- var import_jsx_runtime36 = require("react/jsx-runtime");
8400
- function SearchInput({
8401
- value = "",
8402
- placeholder,
8403
- className,
8404
- classNameDefault,
8405
- debounceTime = 750,
8406
- onSearch
8407
- }) {
8408
- const [searchTerm, setSearchTerm] = import_react33.default.useState(value != null ? value : "");
8409
- const debouncedSearch = (0, import_use_debounce.useDebouncedCallback)((nextValue) => {
8410
- onSearch(nextValue);
8411
- }, debounceTime);
8412
- import_react33.default.useEffect(() => {
8413
- setSearchTerm(value != null ? value : "");
8414
- }, [value]);
8415
- const handleChange = (event) => {
8416
- const nextValue = event.target.value;
8417
- setSearchTerm(nextValue);
8418
- debouncedSearch(nextValue);
8419
- };
8420
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
8421
- Input,
8422
- {
8423
- placeholder: placeholder || "Search...",
8424
- value: searchTerm,
8425
- onChange: handleChange,
8426
- className: cn("w-full md:max-w-sm", className),
8427
- classNameDefault
8428
- }
8429
- );
8299
+ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
8300
+
8301
+ // src/components/search-input.tsx
8302
+ var React58 = __toESM(require("react"), 1);
8303
+ var import_use_debounce = require("use-debounce");
8304
+ var import_jsx_runtime37 = require("react/jsx-runtime");
8305
+ function setForwardedRef(ref, value) {
8306
+ if (typeof ref === "function") {
8307
+ ref(value);
8308
+ return;
8309
+ }
8310
+ if (ref) {
8311
+ ref.current = value;
8312
+ }
8430
8313
  }
8314
+ var SearchInput = React58.forwardRef(
8315
+ (_a, ref) => {
8316
+ var _b = _a, {
8317
+ value = "",
8318
+ placeholder = "Search...",
8319
+ className,
8320
+ classNameDefault = true,
8321
+ debounceTime = 750,
8322
+ onSearch,
8323
+ onKeyDown,
8324
+ onPointerDown,
8325
+ onMouseDown,
8326
+ onClick,
8327
+ onFocus
8328
+ } = _b, props = __objRest(_b, [
8329
+ "value",
8330
+ "placeholder",
8331
+ "className",
8332
+ "classNameDefault",
8333
+ "debounceTime",
8334
+ "onSearch",
8335
+ "onKeyDown",
8336
+ "onPointerDown",
8337
+ "onMouseDown",
8338
+ "onClick",
8339
+ "onFocus"
8340
+ ]);
8341
+ const inputRef = React58.useRef(null);
8342
+ const [searchTerm, setSearchTerm] = React58.useState(value != null ? value : "");
8343
+ const focusInput = React58.useCallback(() => {
8344
+ const input = inputRef.current;
8345
+ if (!input || typeof document === "undefined") return;
8346
+ input.focus({ preventScroll: true });
8347
+ }, []);
8348
+ const composedRef = React58.useCallback(
8349
+ (node) => {
8350
+ inputRef.current = node;
8351
+ setForwardedRef(ref, node);
8352
+ },
8353
+ [ref]
8354
+ );
8355
+ const debouncedSearch = (0, import_use_debounce.useDebouncedCallback)((nextValue) => {
8356
+ onSearch(nextValue);
8357
+ requestAnimationFrame(() => {
8358
+ focusInput();
8359
+ });
8360
+ }, debounceTime);
8361
+ React58.useEffect(() => {
8362
+ setSearchTerm(value != null ? value : "");
8363
+ }, [value]);
8364
+ React58.useEffect(() => {
8365
+ return () => {
8366
+ debouncedSearch.cancel();
8367
+ };
8368
+ }, [debouncedSearch]);
8369
+ const handleChange = (event) => {
8370
+ const nextValue = event.target.value;
8371
+ setSearchTerm(nextValue);
8372
+ if (debounceTime <= 0) {
8373
+ debouncedSearch.cancel();
8374
+ onSearch(nextValue);
8375
+ requestAnimationFrame(() => {
8376
+ focusInput();
8377
+ });
8378
+ return;
8379
+ }
8380
+ debouncedSearch(nextValue);
8381
+ requestAnimationFrame(() => {
8382
+ focusInput();
8383
+ });
8384
+ };
8385
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
8386
+ Input,
8387
+ __spreadValues({
8388
+ ref: composedRef,
8389
+ type: "search",
8390
+ value: searchTerm,
8391
+ placeholder,
8392
+ onChange: handleChange,
8393
+ className: cn("w-full", className),
8394
+ classNameDefault,
8395
+ autoComplete: "off",
8396
+ onKeyDown: (event) => {
8397
+ if (event.key !== "Escape") {
8398
+ event.stopPropagation();
8399
+ }
8400
+ onKeyDown == null ? void 0 : onKeyDown(event);
8401
+ },
8402
+ onPointerDown: (event) => {
8403
+ event.stopPropagation();
8404
+ onPointerDown == null ? void 0 : onPointerDown(event);
8405
+ },
8406
+ onMouseDown: (event) => {
8407
+ event.stopPropagation();
8408
+ onMouseDown == null ? void 0 : onMouseDown(event);
8409
+ },
8410
+ onClick: (event) => {
8411
+ event.stopPropagation();
8412
+ requestAnimationFrame(() => {
8413
+ focusInput();
8414
+ });
8415
+ onClick == null ? void 0 : onClick(event);
8416
+ },
8417
+ onFocus: (event) => {
8418
+ event.stopPropagation();
8419
+ onFocus == null ? void 0 : onFocus(event);
8420
+ }
8421
+ }, props)
8422
+ );
8423
+ }
8424
+ );
8425
+ SearchInput.displayName = "SearchInput";
8431
8426
 
8432
8427
  // src/components/searchable-select.tsx
8433
8428
  var React59 = __toESM(require("react"), 1);
8434
- var SelectPrimitive2 = __toESM(require("@radix-ui/react-select"), 1);
8435
8429
  var import_react_icons16 = require("@radix-ui/react-icons");
8436
- var import_jsx_runtime37 = require("react/jsx-runtime");
8430
+ var import_jsx_runtime38 = require("react/jsx-runtime");
8437
8431
  function normalizeText(value) {
8438
- return String(value != null ? value : "").normalize("NFD").replace(new RegExp("\\p{Diacritic}", "gu"), "").toLowerCase();
8432
+ return String(value != null ? value : "").normalize("NFD").replace(new RegExp("\\p{Diacritic}", "gu"), "").toLowerCase().trim();
8439
8433
  }
8440
- function SearchableSelect(_a) {
8441
- var _b = _a, {
8442
- items,
8443
- value,
8444
- defaultValue,
8445
- onValueChange,
8446
- placeholder = "Seleccionar opci\xF3n",
8447
- searchPlaceholder = "Buscar\u2026",
8448
- emptyText = "No hay resultados",
8449
- triggerClassName,
8450
- contentClassName,
8451
- itemClassName,
8452
- searchInputClassName
8453
- } = _b, rootProps = __objRest(_b, [
8454
- "items",
8455
- "value",
8456
- "defaultValue",
8457
- "onValueChange",
8458
- "placeholder",
8459
- "searchPlaceholder",
8460
- "emptyText",
8461
- "triggerClassName",
8462
- "contentClassName",
8463
- "itemClassName",
8464
- "searchInputClassName"
8465
- ]);
8466
- const [open, setOpen] = React59.useState(false);
8467
- const [query, setQuery] = React59.useState("");
8434
+ function getLabelText(value) {
8435
+ if (typeof value === "string" || typeof value === "number") {
8436
+ return String(value);
8437
+ }
8438
+ return "";
8439
+ }
8440
+ function getOptionText(item) {
8441
+ if (!item) return "";
8442
+ return getLabelText(item.label) || item.value;
8443
+ }
8444
+ function getNextEnabledIndex2(items, currentIndex, direction) {
8445
+ var _a;
8446
+ if (!items.length) return -1;
8447
+ let nextIndex = currentIndex;
8448
+ for (let index = 0; index < items.length; index += 1) {
8449
+ nextIndex = (nextIndex + direction + items.length) % items.length;
8450
+ if (!((_a = items[nextIndex]) == null ? void 0 : _a.disabled)) {
8451
+ return nextIndex;
8452
+ }
8453
+ }
8454
+ return -1;
8455
+ }
8456
+ function SearchableSelectBase({
8457
+ items,
8458
+ value,
8459
+ defaultValue,
8460
+ onValueChange,
8461
+ placeholder = "Seleccionar opci\xF3n",
8462
+ searchPlaceholder = "Buscar\u2026",
8463
+ emptyText = "No hay resultados",
8464
+ disabled,
8465
+ name,
8466
+ required,
8467
+ triggerClassName,
8468
+ contentClassName,
8469
+ itemClassName,
8470
+ searchInputClassName
8471
+ }) {
8472
+ const rootRef = React59.useRef(null);
8468
8473
  const inputRef = React59.useRef(null);
8474
+ const listboxId = React59.useId();
8475
+ const isControlled = value !== void 0;
8476
+ const [internalValue, setInternalValue] = React59.useState(defaultValue != null ? defaultValue : "");
8477
+ const currentValue = isControlled ? value != null ? value : "" : internalValue;
8478
+ const selectedItem = React59.useMemo(() => {
8479
+ return items.find((item) => item.value === currentValue);
8480
+ }, [currentValue, items]);
8481
+ const selectedText = React59.useMemo(() => {
8482
+ return getOptionText(selectedItem);
8483
+ }, [selectedItem]);
8484
+ const [open, setOpen] = React59.useState(false);
8485
+ const [inputValue, setInputValue] = React59.useState(selectedText);
8486
+ const [activeIndex, setActiveIndex] = React59.useState(-1);
8487
+ React59.useEffect(() => {
8488
+ if (!open) {
8489
+ setInputValue(selectedText);
8490
+ }
8491
+ }, [open, selectedText]);
8469
8492
  const filteredItems = React59.useMemo(() => {
8470
- const normalizedQuery = normalizeText(query.trim());
8471
- if (!normalizedQuery) return items;
8493
+ const query = normalizeText(inputValue);
8494
+ if (!query) return items;
8472
8495
  return items.filter((item) => {
8473
- var _a2, _b2;
8496
+ var _a;
8474
8497
  const haystack = normalizeText(
8475
- `${(_a2 = item.label) != null ? _a2 : ""} ${item.value} ${(_b2 = item.keywords) != null ? _b2 : ""}`
8498
+ `${getLabelText(item.label)} ${item.value} ${(_a = item.keywords) != null ? _a : ""}`
8476
8499
  );
8477
- return haystack.includes(normalizedQuery);
8500
+ return haystack.includes(query);
8478
8501
  });
8479
- }, [items, query]);
8480
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
8481
- SelectPrimitive2.Root,
8482
- __spreadProps(__spreadValues({
8483
- open,
8484
- onOpenChange: (nextOpen) => {
8485
- setOpen(nextOpen);
8486
- if (!nextOpen) setQuery("");
8487
- },
8488
- value,
8489
- defaultValue,
8490
- onValueChange: (nextValue) => {
8491
- onValueChange == null ? void 0 : onValueChange(
8492
- nextValue,
8493
- items.find((item) => item.value === nextValue)
8494
- );
8495
- setOpen(false);
8502
+ }, [inputValue, items]);
8503
+ React59.useEffect(() => {
8504
+ if (!open) return;
8505
+ const firstEnabledIndex = filteredItems.findIndex((item) => !item.disabled);
8506
+ setActiveIndex(firstEnabledIndex);
8507
+ }, [filteredItems, open]);
8508
+ React59.useEffect(() => {
8509
+ if (!open) return;
8510
+ const handlePointerDown = (event) => {
8511
+ var _a;
8512
+ const target = event.target;
8513
+ if (target && ((_a = rootRef.current) == null ? void 0 : _a.contains(target))) {
8514
+ return;
8496
8515
  }
8497
- }, rootProps), {
8498
- children: [
8499
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
8500
- SelectPrimitive2.Trigger,
8501
- {
8502
- className: cn(
8503
- "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",
8504
- triggerClassName
8505
- ),
8506
- children: [
8507
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectPrimitive2.Value, { placeholder }),
8508
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectPrimitive2.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_icons16.CaretSortIcon, { className: "h-4 w-4 opacity-50" }) })
8509
- ]
8510
- }
8516
+ setOpen(false);
8517
+ };
8518
+ document.addEventListener("pointerdown", handlePointerDown, true);
8519
+ return () => {
8520
+ document.removeEventListener("pointerdown", handlePointerDown, true);
8521
+ };
8522
+ }, [open]);
8523
+ const selectItem = React59.useCallback(
8524
+ (item) => {
8525
+ if (item.disabled) return;
8526
+ if (!isControlled) {
8527
+ setInternalValue(item.value);
8528
+ }
8529
+ setInputValue(getOptionText(item));
8530
+ setOpen(false);
8531
+ onValueChange == null ? void 0 : onValueChange(item.value, item);
8532
+ requestAnimationFrame(() => {
8533
+ var _a;
8534
+ (_a = inputRef.current) == null ? void 0 : _a.blur();
8535
+ });
8536
+ },
8537
+ [isControlled, onValueChange]
8538
+ );
8539
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { ref: rootRef, className: "relative w-full", children: [
8540
+ name ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8541
+ "input",
8542
+ {
8543
+ type: "hidden",
8544
+ name,
8545
+ value: currentValue,
8546
+ required,
8547
+ disabled
8548
+ }
8549
+ ) : null,
8550
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
8551
+ "div",
8552
+ {
8553
+ className: cn(
8554
+ "relative flex h-9 w-full items-center gap-2 rounded-md border border-input bg-background px-3 text-sm shadow-sm transition",
8555
+ "focus-within:border-primary/60 focus-within:ring-2 focus-within:ring-primary/20",
8556
+ disabled && "cursor-not-allowed opacity-50",
8557
+ triggerClassName
8558
+ ),
8559
+ onPointerDown: () => {
8560
+ if (disabled) return;
8561
+ setOpen(true);
8562
+ requestAnimationFrame(() => {
8563
+ var _a;
8564
+ (_a = inputRef.current) == null ? void 0 : _a.focus({ preventScroll: true });
8565
+ });
8566
+ },
8567
+ children: [
8568
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8569
+ "input",
8570
+ {
8571
+ ref: inputRef,
8572
+ value: inputValue,
8573
+ role: "combobox",
8574
+ "aria-autocomplete": "list",
8575
+ "aria-expanded": open,
8576
+ "aria-controls": listboxId,
8577
+ "aria-activedescendant": activeIndex >= 0 ? `${listboxId}-option-${activeIndex}` : void 0,
8578
+ placeholder: open ? searchPlaceholder : placeholder,
8579
+ autoComplete: "off",
8580
+ spellCheck: false,
8581
+ disabled,
8582
+ onFocus: () => {
8583
+ setOpen(true);
8584
+ requestAnimationFrame(() => {
8585
+ var _a;
8586
+ (_a = inputRef.current) == null ? void 0 : _a.select();
8587
+ });
8588
+ },
8589
+ onChange: (event) => {
8590
+ setInputValue(event.target.value);
8591
+ setOpen(true);
8592
+ },
8593
+ onKeyDown: (event) => {
8594
+ var _a;
8595
+ if (event.key === "ArrowDown") {
8596
+ event.preventDefault();
8597
+ setOpen(true);
8598
+ setActiveIndex(
8599
+ (currentIndex) => getNextEnabledIndex2(filteredItems, currentIndex, 1)
8600
+ );
8601
+ return;
8602
+ }
8603
+ if (event.key === "ArrowUp") {
8604
+ event.preventDefault();
8605
+ setOpen(true);
8606
+ setActiveIndex(
8607
+ (currentIndex) => getNextEnabledIndex2(filteredItems, currentIndex, -1)
8608
+ );
8609
+ return;
8610
+ }
8611
+ if (event.key === "Enter") {
8612
+ if (!open) return;
8613
+ event.preventDefault();
8614
+ const activeItem = filteredItems[activeIndex];
8615
+ if (activeItem) {
8616
+ selectItem(activeItem);
8617
+ }
8618
+ return;
8619
+ }
8620
+ if (event.key === "Escape") {
8621
+ event.preventDefault();
8622
+ setOpen(false);
8623
+ setInputValue(selectedText);
8624
+ (_a = inputRef.current) == null ? void 0 : _a.blur();
8625
+ }
8626
+ },
8627
+ className: cn(
8628
+ "h-full min-w-0 flex-1 border-0 bg-transparent p-0 text-sm outline-none",
8629
+ "placeholder:text-muted-foreground disabled:cursor-not-allowed",
8630
+ searchInputClassName
8631
+ )
8632
+ }
8633
+ ),
8634
+ inputValue && open ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8635
+ "button",
8636
+ {
8637
+ type: "button",
8638
+ "aria-label": "Limpiar b\xFAsqueda",
8639
+ tabIndex: -1,
8640
+ onPointerDown: (event) => {
8641
+ event.preventDefault();
8642
+ event.stopPropagation();
8643
+ },
8644
+ onClick: (event) => {
8645
+ event.preventDefault();
8646
+ event.stopPropagation();
8647
+ setInputValue("");
8648
+ requestAnimationFrame(() => {
8649
+ var _a;
8650
+ (_a = inputRef.current) == null ? void 0 : _a.focus({ preventScroll: true });
8651
+ });
8652
+ },
8653
+ 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",
8654
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_icons16.Cross2Icon, { "aria-hidden": "true", className: "h-3.5 w-3.5" })
8655
+ }
8656
+ ) : null,
8657
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8658
+ import_react_icons16.CaretSortIcon,
8659
+ {
8660
+ "aria-hidden": "true",
8661
+ className: cn(
8662
+ "h-4 w-4 shrink-0 opacity-50 transition-transform",
8663
+ open && "rotate-180"
8664
+ )
8665
+ }
8666
+ )
8667
+ ]
8668
+ }
8669
+ ),
8670
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8671
+ "div",
8672
+ {
8673
+ className: cn(
8674
+ "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",
8675
+ !open && "pointer-events-none invisible opacity-0",
8676
+ open && "visible opacity-100",
8677
+ contentClassName
8511
8678
  ),
8512
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectPrimitive2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
8513
- SelectPrimitive2.Content,
8679
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8680
+ "div",
8514
8681
  {
8515
- position: "popper",
8516
- className: cn(
8517
- "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",
8518
- contentClassName
8519
- ),
8520
- onCloseAutoFocus: (event) => {
8521
- event.preventDefault();
8522
- requestAnimationFrame(() => {
8523
- var _a2;
8524
- return (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
8525
- });
8682
+ id: listboxId,
8683
+ role: "listbox",
8684
+ className: "max-h-72 overflow-y-auto overscroll-contain p-1 [scrollbar-gutter:stable]",
8685
+ onWheelCapture: (event) => {
8686
+ event.stopPropagation();
8526
8687
  },
8527
- children: [
8528
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "border-b border-border bg-popover p-2", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "relative", children: [
8529
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
8530
- "input",
8531
- {
8532
- ref: inputRef,
8533
- value: query,
8534
- onChange: (event) => setQuery(event.target.value),
8535
- onKeyDown: (event) => {
8536
- if (event.key !== "Escape") event.stopPropagation();
8537
- },
8538
- placeholder: searchPlaceholder,
8539
- className: cn(
8540
- "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",
8541
- searchInputClassName
8542
- )
8543
- }
8544
- ),
8545
- query ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
8546
- "button",
8547
- {
8548
- type: "button",
8549
- "aria-label": "Limpiar b\xFAsqueda",
8550
- onClick: () => {
8551
- var _a2;
8552
- setQuery("");
8553
- (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
8554
- },
8555
- 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",
8556
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_icons16.Cross2Icon, { className: "h-3.5 w-3.5" })
8557
- }
8558
- ) : null
8559
- ] }) }),
8560
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectPrimitive2.Viewport, { className: "max-h-80 p-1", children: filteredItems.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "px-3 py-2 text-sm text-muted-foreground", children: emptyText }) : filteredItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
8561
- SelectPrimitive2.Item,
8688
+ onTouchMoveCapture: (event) => {
8689
+ event.stopPropagation();
8690
+ },
8691
+ children: filteredItems.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: emptyText }) : filteredItems.map((item, index) => {
8692
+ const isSelected = item.value === currentValue;
8693
+ const isActive = index === activeIndex;
8694
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
8695
+ "div",
8562
8696
  {
8563
- value: item.value,
8564
- disabled: item.disabled,
8697
+ id: `${listboxId}-option-${index}`,
8698
+ role: "option",
8699
+ "aria-selected": isSelected,
8700
+ "aria-disabled": item.disabled,
8701
+ tabIndex: -1,
8702
+ onMouseMove: () => {
8703
+ if (!item.disabled) {
8704
+ setActiveIndex(index);
8705
+ }
8706
+ },
8707
+ onPointerDown: (event) => {
8708
+ event.preventDefault();
8709
+ event.stopPropagation();
8710
+ if (!item.disabled) {
8711
+ selectItem(item);
8712
+ }
8713
+ },
8565
8714
  className: cn(
8566
- "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",
8715
+ "relative flex w-full select-none items-center gap-2 rounded-lg px-3 py-2 text-left text-sm outline-none transition",
8716
+ item.disabled ? "pointer-events-none opacity-50" : "cursor-pointer",
8717
+ isActive && !item.disabled && "bg-accent text-accent-foreground",
8718
+ !isActive && !item.disabled && "hover:bg-accent/70 hover:text-accent-foreground",
8719
+ isSelected && "font-medium",
8567
8720
  itemClassName
8568
8721
  ),
8569
8722
  children: [
8570
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectPrimitive2.ItemText, { children: item.label }),
8571
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectPrimitive2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_icons16.CheckIcon, { className: "h-4 w-4" }) }) })
8723
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "min-w-0 flex-1 truncate", children: item.label }),
8724
+ isSelected ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8725
+ import_react_icons16.CheckIcon,
8726
+ {
8727
+ "aria-hidden": "true",
8728
+ className: "h-4 w-4 shrink-0 text-primary"
8729
+ }
8730
+ ) : null
8572
8731
  ]
8573
8732
  },
8574
8733
  item.value
8575
- )) })
8576
- ]
8734
+ );
8735
+ })
8577
8736
  }
8578
- ) })
8579
- ]
8580
- })
8581
- );
8737
+ )
8738
+ }
8739
+ )
8740
+ ] });
8582
8741
  }
8742
+ var SearchableSelect = React59.memo(
8743
+ SearchableSelectBase
8744
+ );
8583
8745
 
8584
8746
  // src/components/separator.tsx
8585
8747
  var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
8586
8748
  var React60 = __toESM(require("react"), 1);
8587
- var import_jsx_runtime38 = require("react/jsx-runtime");
8749
+ var import_jsx_runtime39 = require("react/jsx-runtime");
8588
8750
  var Separator6 = React60.forwardRef(
8589
8751
  (_a, ref) => {
8590
8752
  var _b = _a, { className, orientation = "horizontal", decorative = true } = _b, props = __objRest(_b, ["className", "orientation", "decorative"]);
8591
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8753
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8592
8754
  SeparatorPrimitive.Root,
8593
8755
  __spreadValues({
8594
8756
  ref,
@@ -8610,14 +8772,14 @@ var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
8610
8772
  var import_react_icons17 = require("@radix-ui/react-icons");
8611
8773
  var import_class_variance_authority7 = require("class-variance-authority");
8612
8774
  var React61 = __toESM(require("react"), 1);
8613
- var import_jsx_runtime39 = require("react/jsx-runtime");
8775
+ var import_jsx_runtime40 = require("react/jsx-runtime");
8614
8776
  var Sheet = SheetPrimitive.Root;
8615
8777
  var SheetTrigger = SheetPrimitive.Trigger;
8616
8778
  var SheetClose = SheetPrimitive.Close;
8617
8779
  var SheetPortal = SheetPrimitive.Portal;
8618
8780
  var SheetOverlay = React61.forwardRef((_a, ref) => {
8619
8781
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8620
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8782
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
8621
8783
  SheetPrimitive.Overlay,
8622
8784
  __spreadProps(__spreadValues({
8623
8785
  className: cn(
@@ -8648,9 +8810,9 @@ var sheetVariants = (0, import_class_variance_authority7.cva)(
8648
8810
  );
8649
8811
  var SheetContent = React61.forwardRef((_a, ref) => {
8650
8812
  var _b = _a, { side = "right", className, children } = _b, props = __objRest(_b, ["side", "className", "children"]);
8651
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(SheetPortal, { children: [
8652
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SheetOverlay, {}),
8653
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
8813
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(SheetPortal, { children: [
8814
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SheetOverlay, {}),
8815
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
8654
8816
  SheetPrimitive.Content,
8655
8817
  __spreadProps(__spreadValues({
8656
8818
  ref,
@@ -8658,9 +8820,9 @@ var SheetContent = React61.forwardRef((_a, ref) => {
8658
8820
  }, props), {
8659
8821
  children: [
8660
8822
  children,
8661
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(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: [
8662
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_icons17.Cross2Icon, { className: "h-4 w-4" }),
8663
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "sr-only", children: "Close" })
8823
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(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: [
8824
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_icons17.Cross2Icon, { className: "h-4 w-4" }),
8825
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "sr-only", children: "Close" })
8664
8826
  ] })
8665
8827
  ]
8666
8828
  })
@@ -8674,7 +8836,7 @@ var SheetHeader = (_a) => {
8674
8836
  } = _b, props = __objRest(_b, [
8675
8837
  "className"
8676
8838
  ]);
8677
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8839
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
8678
8840
  "div",
8679
8841
  __spreadValues({
8680
8842
  className: cn(
@@ -8691,7 +8853,7 @@ var SheetFooter = (_a) => {
8691
8853
  } = _b, props = __objRest(_b, [
8692
8854
  "className"
8693
8855
  ]);
8694
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8856
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
8695
8857
  "div",
8696
8858
  __spreadValues({
8697
8859
  className: cn(
@@ -8704,7 +8866,7 @@ var SheetFooter = (_a) => {
8704
8866
  SheetFooter.displayName = "SheetFooter";
8705
8867
  var SheetTitle = React61.forwardRef((_a, ref) => {
8706
8868
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8707
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8869
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
8708
8870
  SheetPrimitive.Title,
8709
8871
  __spreadValues({
8710
8872
  ref,
@@ -8715,7 +8877,7 @@ var SheetTitle = React61.forwardRef((_a, ref) => {
8715
8877
  SheetTitle.displayName = SheetPrimitive.Title.displayName;
8716
8878
  var SheetDescription = React61.forwardRef((_a, ref) => {
8717
8879
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8718
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8880
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
8719
8881
  SheetPrimitive.Description,
8720
8882
  __spreadValues({
8721
8883
  ref,
@@ -8726,14 +8888,14 @@ var SheetDescription = React61.forwardRef((_a, ref) => {
8726
8888
  SheetDescription.displayName = SheetPrimitive.Description.displayName;
8727
8889
 
8728
8890
  // src/components/skeleton.tsx
8729
- var import_jsx_runtime40 = require("react/jsx-runtime");
8891
+ var import_jsx_runtime41 = require("react/jsx-runtime");
8730
8892
  function Skeleton(_a) {
8731
8893
  var _b = _a, {
8732
8894
  className
8733
8895
  } = _b, props = __objRest(_b, [
8734
8896
  "className"
8735
8897
  ]);
8736
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
8898
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
8737
8899
  "div",
8738
8900
  __spreadValues({
8739
8901
  className: cn("animate-pulse rounded-md bg-primary/10", className)
@@ -8744,10 +8906,10 @@ function Skeleton(_a) {
8744
8906
  // src/components/slider.tsx
8745
8907
  var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
8746
8908
  var React62 = __toESM(require("react"), 1);
8747
- var import_jsx_runtime41 = require("react/jsx-runtime");
8909
+ var import_jsx_runtime42 = require("react/jsx-runtime");
8748
8910
  var Slider = React62.forwardRef((_a, ref) => {
8749
8911
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8750
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
8912
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
8751
8913
  SliderPrimitive.Root,
8752
8914
  __spreadProps(__spreadValues({
8753
8915
  ref,
@@ -8757,8 +8919,8 @@ var Slider = React62.forwardRef((_a, ref) => {
8757
8919
  )
8758
8920
  }, props), {
8759
8921
  children: [
8760
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
8761
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(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" })
8922
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
8923
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(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" })
8762
8924
  ]
8763
8925
  })
8764
8926
  );
@@ -8768,11 +8930,11 @@ Slider.displayName = SliderPrimitive.Root.displayName;
8768
8930
  // src/components/sonner.tsx
8769
8931
  var import_next_themes = require("next-themes");
8770
8932
  var import_sonner = require("sonner");
8771
- var import_jsx_runtime42 = require("react/jsx-runtime");
8933
+ var import_jsx_runtime43 = require("react/jsx-runtime");
8772
8934
  var ToasterSonner = (_a) => {
8773
8935
  var props = __objRest(_a, []);
8774
8936
  const { theme = "system" } = (0, import_next_themes.useTheme)();
8775
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8937
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8776
8938
  import_sonner.Toaster,
8777
8939
  __spreadValues({
8778
8940
  theme,
@@ -8792,10 +8954,10 @@ var ToasterSonner = (_a) => {
8792
8954
  // src/components/switch.tsx
8793
8955
  var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
8794
8956
  var React63 = __toESM(require("react"), 1);
8795
- var import_jsx_runtime43 = require("react/jsx-runtime");
8957
+ var import_jsx_runtime44 = require("react/jsx-runtime");
8796
8958
  var Switch = React63.forwardRef((_a, ref) => {
8797
8959
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8798
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8960
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8799
8961
  SwitchPrimitives.Root,
8800
8962
  __spreadProps(__spreadValues({
8801
8963
  className: cn(
@@ -8804,7 +8966,7 @@ var Switch = React63.forwardRef((_a, ref) => {
8804
8966
  )
8805
8967
  }, props), {
8806
8968
  ref,
8807
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8969
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8808
8970
  SwitchPrimitives.Thumb,
8809
8971
  {
8810
8972
  className: cn(
@@ -8819,11 +8981,11 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
8819
8981
 
8820
8982
  // src/components/table.tsx
8821
8983
  var React64 = __toESM(require("react"), 1);
8822
- var import_jsx_runtime44 = require("react/jsx-runtime");
8984
+ var import_jsx_runtime45 = require("react/jsx-runtime");
8823
8985
  var Table = React64.forwardRef(
8824
8986
  (_a, ref) => {
8825
8987
  var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
8826
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: cn("relative w-full overflow-visible", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8988
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: cn("relative w-full overflow-visible", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8827
8989
  "table",
8828
8990
  __spreadValues({
8829
8991
  ref,
@@ -8835,12 +8997,12 @@ var Table = React64.forwardRef(
8835
8997
  Table.displayName = "Table";
8836
8998
  var TableHeader = React64.forwardRef((_a, ref) => {
8837
8999
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8838
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("thead", __spreadValues({ ref, className: cn("[&_tr]:border-b", className) }, props));
9000
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("thead", __spreadValues({ ref, className: cn("[&_tr]:border-b", className) }, props));
8839
9001
  });
8840
9002
  TableHeader.displayName = "TableHeader";
8841
9003
  var TableBody = React64.forwardRef((_a, ref) => {
8842
9004
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8843
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
9005
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8844
9006
  "tbody",
8845
9007
  __spreadValues({
8846
9008
  ref,
@@ -8851,7 +9013,7 @@ var TableBody = React64.forwardRef((_a, ref) => {
8851
9013
  TableBody.displayName = "TableBody";
8852
9014
  var TableFooter = React64.forwardRef((_a, ref) => {
8853
9015
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8854
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
9016
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8855
9017
  "tfoot",
8856
9018
  __spreadValues({
8857
9019
  ref,
@@ -8865,7 +9027,7 @@ var TableFooter = React64.forwardRef((_a, ref) => {
8865
9027
  TableFooter.displayName = "TableFooter";
8866
9028
  var TableRow = React64.forwardRef((_a, ref) => {
8867
9029
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8868
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
9030
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8869
9031
  "tr",
8870
9032
  __spreadValues({
8871
9033
  ref,
@@ -8879,7 +9041,7 @@ var TableRow = React64.forwardRef((_a, ref) => {
8879
9041
  TableRow.displayName = "TableRow";
8880
9042
  var TableHead = React64.forwardRef((_a, ref) => {
8881
9043
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8882
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
9044
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8883
9045
  "th",
8884
9046
  __spreadValues({
8885
9047
  ref,
@@ -8893,7 +9055,7 @@ var TableHead = React64.forwardRef((_a, ref) => {
8893
9055
  TableHead.displayName = "TableHead";
8894
9056
  var TableCell = React64.forwardRef((_a, ref) => {
8895
9057
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8896
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
9058
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8897
9059
  "td",
8898
9060
  __spreadValues({
8899
9061
  ref,
@@ -8907,7 +9069,7 @@ var TableCell = React64.forwardRef((_a, ref) => {
8907
9069
  TableCell.displayName = "TableCell";
8908
9070
  var TableCaption = React64.forwardRef((_a, ref) => {
8909
9071
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8910
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
9072
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8911
9073
  "caption",
8912
9074
  __spreadValues({
8913
9075
  ref,
@@ -8920,11 +9082,11 @@ TableCaption.displayName = "TableCaption";
8920
9082
  // src/components/tabs.tsx
8921
9083
  var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
8922
9084
  var React65 = __toESM(require("react"), 1);
8923
- var import_jsx_runtime45 = require("react/jsx-runtime");
9085
+ var import_jsx_runtime46 = require("react/jsx-runtime");
8924
9086
  var Tabs = TabsPrimitive.Root;
8925
9087
  var TabsList = React65.forwardRef((_a, ref) => {
8926
9088
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8927
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
9089
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8928
9090
  TabsPrimitive.List,
8929
9091
  __spreadValues({
8930
9092
  ref,
@@ -8938,7 +9100,7 @@ var TabsList = React65.forwardRef((_a, ref) => {
8938
9100
  TabsList.displayName = TabsPrimitive.List.displayName;
8939
9101
  var TabsTrigger = React65.forwardRef((_a, ref) => {
8940
9102
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8941
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
9103
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8942
9104
  TabsPrimitive.Trigger,
8943
9105
  __spreadValues({
8944
9106
  ref,
@@ -8952,7 +9114,7 @@ var TabsTrigger = React65.forwardRef((_a, ref) => {
8952
9114
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
8953
9115
  var TabsContent = React65.forwardRef((_a, ref) => {
8954
9116
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8955
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
9117
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8956
9118
  TabsPrimitive.Content,
8957
9119
  __spreadValues({
8958
9120
  ref,
@@ -8967,11 +9129,11 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
8967
9129
 
8968
9130
  // src/components/textarea.tsx
8969
9131
  var React66 = __toESM(require("react"), 1);
8970
- var import_jsx_runtime46 = require("react/jsx-runtime");
9132
+ var import_jsx_runtime47 = require("react/jsx-runtime");
8971
9133
  var Textarea = React66.forwardRef(
8972
9134
  (_a, ref) => {
8973
9135
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8974
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
9136
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
8975
9137
  "textarea",
8976
9138
  __spreadValues({
8977
9139
  className: cn(
@@ -8990,11 +9152,11 @@ var import_react_icons18 = require("@radix-ui/react-icons");
8990
9152
  var ToastPrimitives = __toESM(require("@radix-ui/react-toast"), 1);
8991
9153
  var import_class_variance_authority8 = require("class-variance-authority");
8992
9154
  var React67 = __toESM(require("react"), 1);
8993
- var import_jsx_runtime47 = require("react/jsx-runtime");
9155
+ var import_jsx_runtime48 = require("react/jsx-runtime");
8994
9156
  var ToastProvider = ToastPrimitives.Provider;
8995
9157
  var ToastViewport = React67.forwardRef((_a, ref) => {
8996
9158
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8997
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9159
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
8998
9160
  ToastPrimitives.Viewport,
8999
9161
  __spreadValues({
9000
9162
  ref,
@@ -9022,7 +9184,7 @@ var toastVariants = (0, import_class_variance_authority8.cva)(
9022
9184
  );
9023
9185
  var Toast = React67.forwardRef((_a, ref) => {
9024
9186
  var _b = _a, { className, variant } = _b, props = __objRest(_b, ["className", "variant"]);
9025
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9187
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9026
9188
  ToastPrimitives.Root,
9027
9189
  __spreadValues({
9028
9190
  ref,
@@ -9033,7 +9195,7 @@ var Toast = React67.forwardRef((_a, ref) => {
9033
9195
  Toast.displayName = ToastPrimitives.Root.displayName;
9034
9196
  var ToastAction = React67.forwardRef((_a, ref) => {
9035
9197
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
9036
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9198
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9037
9199
  ToastPrimitives.Action,
9038
9200
  __spreadValues({
9039
9201
  ref,
@@ -9047,7 +9209,7 @@ var ToastAction = React67.forwardRef((_a, ref) => {
9047
9209
  ToastAction.displayName = ToastPrimitives.Action.displayName;
9048
9210
  var ToastClose = React67.forwardRef((_a, ref) => {
9049
9211
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
9050
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9212
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9051
9213
  ToastPrimitives.Close,
9052
9214
  __spreadProps(__spreadValues({
9053
9215
  ref,
@@ -9057,14 +9219,14 @@ var ToastClose = React67.forwardRef((_a, ref) => {
9057
9219
  ),
9058
9220
  "toast-close": ""
9059
9221
  }, props), {
9060
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_icons18.Cross2Icon, { className: "h-4 w-4" })
9222
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_icons18.Cross2Icon, { className: "h-4 w-4" })
9061
9223
  })
9062
9224
  );
9063
9225
  });
9064
9226
  ToastClose.displayName = ToastPrimitives.Close.displayName;
9065
9227
  var ToastTitle = React67.forwardRef((_a, ref) => {
9066
9228
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
9067
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9229
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9068
9230
  ToastPrimitives.Title,
9069
9231
  __spreadValues({
9070
9232
  ref,
@@ -9075,7 +9237,7 @@ var ToastTitle = React67.forwardRef((_a, ref) => {
9075
9237
  ToastTitle.displayName = ToastPrimitives.Title.displayName;
9076
9238
  var ToastDescription = React67.forwardRef((_a, ref) => {
9077
9239
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
9078
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9240
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9079
9241
  ToastPrimitives.Description,
9080
9242
  __spreadValues({
9081
9243
  ref,
@@ -9198,22 +9360,22 @@ function useToast() {
9198
9360
  }
9199
9361
 
9200
9362
  // src/components/toaster.tsx
9201
- var import_jsx_runtime48 = require("react/jsx-runtime");
9363
+ var import_jsx_runtime49 = require("react/jsx-runtime");
9202
9364
  function Toaster() {
9203
9365
  const { toasts } = useToast();
9204
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(ToastProvider, { children: [
9366
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(ToastProvider, { children: [
9205
9367
  toasts.map(function(_a) {
9206
9368
  var _b = _a, { id, title, description, action } = _b, props = __objRest(_b, ["id", "title", "description", "action"]);
9207
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Toast, __spreadProps(__spreadValues({}, props), { children: [
9208
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "grid gap-1", children: [
9209
- title && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ToastTitle, { children: title }),
9210
- description && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ToastDescription, { children: description })
9369
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Toast, __spreadProps(__spreadValues({}, props), { children: [
9370
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "grid gap-1", children: [
9371
+ title && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ToastTitle, { children: title }),
9372
+ description && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ToastDescription, { children: description })
9211
9373
  ] }),
9212
9374
  action,
9213
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ToastClose, {})
9375
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ToastClose, {})
9214
9376
  ] }), id);
9215
9377
  }),
9216
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ToastViewport, {})
9378
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ToastViewport, {})
9217
9379
  ] });
9218
9380
  }
9219
9381
 
@@ -9221,7 +9383,7 @@ function Toaster() {
9221
9383
  var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
9222
9384
  var import_class_variance_authority9 = require("class-variance-authority");
9223
9385
  var React69 = __toESM(require("react"), 1);
9224
- var import_jsx_runtime49 = require("react/jsx-runtime");
9386
+ var import_jsx_runtime50 = require("react/jsx-runtime");
9225
9387
  var toggleVariants = (0, import_class_variance_authority9.cva)(
9226
9388
  "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",
9227
9389
  {
@@ -9244,7 +9406,7 @@ var toggleVariants = (0, import_class_variance_authority9.cva)(
9244
9406
  );
9245
9407
  var Toggle = React69.forwardRef((_a, ref) => {
9246
9408
  var _b = _a, { className, variant, size } = _b, props = __objRest(_b, ["className", "variant", "size"]);
9247
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9409
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9248
9410
  TogglePrimitive.Root,
9249
9411
  __spreadValues({
9250
9412
  ref,
@@ -9257,20 +9419,20 @@ Toggle.displayName = TogglePrimitive.Root.displayName;
9257
9419
  // src/components/toggle-group.tsx
9258
9420
  var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
9259
9421
  var React70 = __toESM(require("react"), 1);
9260
- var import_jsx_runtime50 = require("react/jsx-runtime");
9422
+ var import_jsx_runtime51 = require("react/jsx-runtime");
9261
9423
  var ToggleGroupContext = React70.createContext({
9262
9424
  size: "default",
9263
9425
  variant: "default"
9264
9426
  });
9265
9427
  var ToggleGroup = React70.forwardRef((_a, ref) => {
9266
9428
  var _b = _a, { className, variant, size, children } = _b, props = __objRest(_b, ["className", "variant", "size", "children"]);
9267
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9429
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
9268
9430
  ToggleGroupPrimitive.Root,
9269
9431
  __spreadProps(__spreadValues({
9270
9432
  ref,
9271
9433
  className: cn("flex items-center justify-center gap-1", className)
9272
9434
  }, props), {
9273
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
9435
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
9274
9436
  })
9275
9437
  );
9276
9438
  });
@@ -9278,7 +9440,7 @@ ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
9278
9440
  var ToggleGroupItem = React70.forwardRef((_a, ref) => {
9279
9441
  var _b = _a, { className, children, variant, size } = _b, props = __objRest(_b, ["className", "children", "variant", "size"]);
9280
9442
  const context = React70.useContext(ToggleGroupContext);
9281
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9443
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
9282
9444
  ToggleGroupPrimitive.Item,
9283
9445
  __spreadProps(__spreadValues({
9284
9446
  ref,
@@ -9299,13 +9461,13 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
9299
9461
  // src/components/tooltip.tsx
9300
9462
  var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
9301
9463
  var React71 = __toESM(require("react"), 1);
9302
- var import_jsx_runtime51 = require("react/jsx-runtime");
9464
+ var import_jsx_runtime52 = require("react/jsx-runtime");
9303
9465
  var TooltipProvider = TooltipPrimitive.Provider;
9304
9466
  var Tooltip = TooltipPrimitive.Root;
9305
9467
  var TooltipTrigger = TooltipPrimitive.Trigger;
9306
9468
  var TooltipContent = React71.forwardRef((_a, ref) => {
9307
9469
  var _b = _a, { className, sideOffset = 4 } = _b, props = __objRest(_b, ["className", "sideOffset"]);
9308
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
9470
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
9309
9471
  TooltipPrimitive.Content,
9310
9472
  __spreadValues({
9311
9473
  ref,
@@ -9322,7 +9484,7 @@ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
9322
9484
  // src/components/ui/input.tsx
9323
9485
  var React72 = __toESM(require("react"), 1);
9324
9486
  var import_lucide_react8 = require("lucide-react");
9325
- var import_jsx_runtime52 = require("react/jsx-runtime");
9487
+ var import_jsx_runtime53 = require("react/jsx-runtime");
9326
9488
  var UiInput = React72.forwardRef(
9327
9489
  (_a, ref) => {
9328
9490
  var _b = _a, {
@@ -9352,8 +9514,8 @@ var UiInput = React72.forwardRef(
9352
9514
  const inputId = htmlFormItemId != null ? htmlFormItemId : generatedId;
9353
9515
  const messageId = `${inputId}-message`;
9354
9516
  const hasError = Boolean(errorMessage || invalid);
9355
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: cn("w-full space-y-1.5", containerClassName), children: [
9356
- label ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
9517
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("w-full space-y-1.5", containerClassName), children: [
9518
+ label ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
9357
9519
  Label3,
9358
9520
  {
9359
9521
  className: cn(
@@ -9363,8 +9525,8 @@ var UiInput = React72.forwardRef(
9363
9525
  ),
9364
9526
  htmlFor: inputId,
9365
9527
  children: [
9366
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: label }),
9367
- requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
9528
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: label }),
9529
+ requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9368
9530
  import_lucide_react8.Asterisk,
9369
9531
  {
9370
9532
  "aria-hidden": "true",
@@ -9377,7 +9539,7 @@ var UiInput = React72.forwardRef(
9377
9539
  ]
9378
9540
  }
9379
9541
  ) : null,
9380
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
9542
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9381
9543
  Input,
9382
9544
  __spreadProps(__spreadValues({}, inputProps), {
9383
9545
  ref,
@@ -9388,7 +9550,7 @@ var UiInput = React72.forwardRef(
9388
9550
  className
9389
9551
  })
9390
9552
  ),
9391
- errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
9553
+ errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9392
9554
  "p",
9393
9555
  {
9394
9556
  id: messageId,
@@ -9418,7 +9580,7 @@ var selectVariants = {
9418
9580
  var variants2 = selectVariants;
9419
9581
 
9420
9582
  // src/components/ui/select.tsx
9421
- var import_jsx_runtime53 = require("react/jsx-runtime");
9583
+ var import_jsx_runtime54 = require("react/jsx-runtime");
9422
9584
  function UiSelect({
9423
9585
  label,
9424
9586
  placeholder,
@@ -9458,8 +9620,8 @@ function UiSelect({
9458
9620
  };
9459
9621
  const specialFlushed = variant === "flushed" ? size === "sm" ? "h-9 text-sm" : size === "lg" ? "h-11 text-base" : "h-10 text-sm" : "";
9460
9622
  const specialLink = variant === "link" ? "text-sm" : "";
9461
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("w-full space-y-1.5", selectClassName), children: [
9462
- label ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
9623
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: cn("w-full space-y-1.5", selectClassName), children: [
9624
+ label ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
9463
9625
  Label3,
9464
9626
  {
9465
9627
  className: cn(
@@ -9469,8 +9631,8 @@ function UiSelect({
9469
9631
  ),
9470
9632
  htmlFor: triggerId,
9471
9633
  children: [
9472
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: label }),
9473
- requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9634
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children: label }),
9635
+ requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
9474
9636
  import_lucide_react9.Asterisk,
9475
9637
  {
9476
9638
  "aria-hidden": "true",
@@ -9483,7 +9645,7 @@ function UiSelect({
9483
9645
  ]
9484
9646
  }
9485
9647
  ) : null,
9486
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
9648
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
9487
9649
  Select2,
9488
9650
  {
9489
9651
  value,
@@ -9491,7 +9653,7 @@ function UiSelect({
9491
9653
  onValueChange: onChange,
9492
9654
  disabled,
9493
9655
  children: [
9494
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9656
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
9495
9657
  SelectTrigger,
9496
9658
  {
9497
9659
  id: triggerId,
@@ -9504,10 +9666,10 @@ function UiSelect({
9504
9666
  hasError && "border-destructive ring-destructive focus:ring-destructive/40",
9505
9667
  className
9506
9668
  ),
9507
- children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectValue, { placeholder })
9669
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(SelectValue, { placeholder })
9508
9670
  }
9509
9671
  ),
9510
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectContent, { className: contentClassName, children: children != null ? children : items == null ? void 0 : items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9672
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(SelectContent, { className: contentClassName, children: children != null ? children : items == null ? void 0 : items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
9511
9673
  SelectItem,
9512
9674
  {
9513
9675
  value: item.value,
@@ -9520,7 +9682,7 @@ function UiSelect({
9520
9682
  ]
9521
9683
  }
9522
9684
  ),
9523
- errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9685
+ errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
9524
9686
  "p",
9525
9687
  {
9526
9688
  id: messageId,
@@ -9534,7 +9696,7 @@ function UiSelect({
9534
9696
  // src/components/ui/ui-checkbox.tsx
9535
9697
  var React74 = __toESM(require("react"), 1);
9536
9698
  var import_lucide_react10 = require("lucide-react");
9537
- var import_jsx_runtime54 = require("react/jsx-runtime");
9699
+ var import_jsx_runtime55 = require("react/jsx-runtime");
9538
9700
  var UiCheckbox = React74.forwardRef(
9539
9701
  (_a, ref) => {
9540
9702
  var _b = _a, {
@@ -9567,7 +9729,7 @@ var UiCheckbox = React74.forwardRef(
9567
9729
  "className"
9568
9730
  ]);
9569
9731
  const hasError = Boolean(errorMessage || invalid);
9570
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: cn("w-full", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
9732
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: cn("w-full", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
9571
9733
  "div",
9572
9734
  {
9573
9735
  className: cn(
@@ -9576,7 +9738,7 @@ var UiCheckbox = React74.forwardRef(
9576
9738
  contentClassName
9577
9739
  ),
9578
9740
  children: [
9579
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
9741
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
9580
9742
  Checkbox,
9581
9743
  __spreadValues({
9582
9744
  ref,
@@ -9585,8 +9747,8 @@ var UiCheckbox = React74.forwardRef(
9585
9747
  className: cn("mt-0.5", className)
9586
9748
  }, checkboxProps)
9587
9749
  ),
9588
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "min-w-0 flex-1", children: [
9589
- label ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
9750
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "min-w-0 flex-1", children: [
9751
+ label ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
9590
9752
  Label3,
9591
9753
  {
9592
9754
  htmlFor: htmlFormItemId,
@@ -9597,8 +9759,8 @@ var UiCheckbox = React74.forwardRef(
9597
9759
  labelClassName
9598
9760
  ),
9599
9761
  children: [
9600
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children: label }),
9601
- requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
9762
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: label }),
9763
+ requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
9602
9764
  import_lucide_react10.Asterisk,
9603
9765
  {
9604
9766
  "aria-hidden": "true",
@@ -9611,7 +9773,7 @@ var UiCheckbox = React74.forwardRef(
9611
9773
  ]
9612
9774
  }
9613
9775
  ) : null,
9614
- description ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
9776
+ description ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
9615
9777
  "p",
9616
9778
  {
9617
9779
  className: cn(
@@ -9621,7 +9783,7 @@ var UiCheckbox = React74.forwardRef(
9621
9783
  children: description
9622
9784
  }
9623
9785
  ) : null,
9624
- errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
9786
+ errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
9625
9787
  "p",
9626
9788
  {
9627
9789
  className: cn(
@@ -9640,26 +9802,26 @@ var UiCheckbox = React74.forwardRef(
9640
9802
  UiCheckbox.displayName = "UiCheckbox";
9641
9803
 
9642
9804
  // src/hooks/use-sidebar.tsx
9643
- var import_react34 = require("react");
9644
- var import_jsx_runtime55 = require("react/jsx-runtime");
9645
- var SidebarContext = (0, import_react34.createContext)({
9805
+ var import_react33 = require("react");
9806
+ var import_jsx_runtime56 = require("react/jsx-runtime");
9807
+ var SidebarContext = (0, import_react33.createContext)({
9646
9808
  isMinimized: false,
9647
9809
  toggle: () => {
9648
9810
  }
9649
9811
  });
9650
- var useSidebar = () => (0, import_react34.useContext)(SidebarContext);
9812
+ var useSidebar = () => (0, import_react33.useContext)(SidebarContext);
9651
9813
  var SidebarProvider = ({
9652
9814
  children
9653
9815
  }) => {
9654
- const [isMinimized, setIsMinimized] = (0, import_react34.useState)(false);
9816
+ const [isMinimized, setIsMinimized] = (0, import_react33.useState)(false);
9655
9817
  const toggle = () => {
9656
9818
  setIsMinimized(!isMinimized);
9657
9819
  };
9658
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SidebarContext.Provider, { value: { isMinimized, toggle }, children });
9820
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SidebarContext.Provider, { value: { isMinimized, toggle }, children });
9659
9821
  };
9660
9822
 
9661
9823
  // src/shared/alert-modal.tsx
9662
- var import_jsx_runtime56 = require("react/jsx-runtime");
9824
+ var import_jsx_runtime57 = require("react/jsx-runtime");
9663
9825
  var AlertModal = ({
9664
9826
  isOpen,
9665
9827
  onClose,
@@ -9672,7 +9834,7 @@ var AlertModal = ({
9672
9834
  className,
9673
9835
  children
9674
9836
  }) => {
9675
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
9837
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
9676
9838
  Modal,
9677
9839
  {
9678
9840
  title,
@@ -9680,9 +9842,9 @@ var AlertModal = ({
9680
9842
  isOpen,
9681
9843
  onClose,
9682
9844
  className,
9683
- children: children ? children : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex w-full items-center justify-end space-x-2 pt-6", children: [
9684
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button, { disabled: loading, variant: "outline", onClick: onClose, children: cancelText }),
9685
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
9845
+ children: children ? children : /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex w-full items-center justify-end space-x-2 pt-6", children: [
9846
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Button, { disabled: loading, variant: "outline", onClick: onClose, children: cancelText }),
9847
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
9686
9848
  Button,
9687
9849
  {
9688
9850
  disabled: loading,
@@ -9699,31 +9861,31 @@ var AlertModal = ({
9699
9861
 
9700
9862
  // src/shared/breadcrumbs.tsx
9701
9863
  var import_lucide_react11 = require("lucide-react");
9702
- var import_react35 = require("react");
9703
- var import_jsx_runtime57 = require("react/jsx-runtime");
9864
+ var import_react34 = require("react");
9865
+ var import_jsx_runtime58 = require("react/jsx-runtime");
9704
9866
  function Breadcrumbs({
9705
9867
  items,
9706
9868
  className,
9707
9869
  classNameList,
9708
- separator = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react11.Slash, {})
9870
+ separator = /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react11.Slash, {})
9709
9871
  }) {
9710
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Breadcrumb, { className, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(BreadcrumbList, { className: classNameList, children: items.map((item, index) => {
9872
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Breadcrumb, { className, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(BreadcrumbList, { className: classNameList, children: items.map((item, index) => {
9711
9873
  var _a;
9712
9874
  const isLast = index === items.length - 1;
9713
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_react35.Fragment, { children: [
9714
- !isLast ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(BreadcrumbLink, { href: (_a = item.link) != null ? _a : "#", children: item.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(BreadcrumbPage, { children: item.title }) }),
9715
- !isLast ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(BreadcrumbSeparator, { children: separator }) : null
9875
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_react34.Fragment, { children: [
9876
+ !isLast ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(BreadcrumbLink, { href: (_a = item.link) != null ? _a : "#", children: item.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(BreadcrumbPage, { children: item.title }) }),
9877
+ !isLast ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(BreadcrumbSeparator, { children: separator }) : null
9716
9878
  ] }, `${item.title}-${index}`);
9717
9879
  }) }) });
9718
9880
  }
9719
9881
 
9720
9882
  // src/shared/data-table.tsx
9721
- var import_react36 = require("react");
9883
+ var import_react35 = require("react");
9722
9884
  var import_framer_motion = require("framer-motion");
9723
9885
  var import_react_icons19 = require("@radix-ui/react-icons");
9724
9886
  var import_react_table = require("@tanstack/react-table");
9725
9887
  var import_lucide_react12 = require("lucide-react");
9726
- var import_jsx_runtime58 = require("react/jsx-runtime");
9888
+ var import_jsx_runtime59 = require("react/jsx-runtime");
9727
9889
  var ACCENT_COLOR = {
9728
9890
  primary: "var(--primary)",
9729
9891
  emerald: "#10b981",
@@ -9960,7 +10122,7 @@ function DataTable({
9960
10122
  const safePageCount = Math.max(pageCount != null ? pageCount : 1, 1);
9961
10123
  const pageIndex = Math.min(Math.max(page - 1, 0), safePageCount - 1);
9962
10124
  const pageSize = Math.max(perPage, 1);
9963
- const paginationState = (0, import_react36.useMemo)(
10125
+ const paginationState = (0, import_react35.useMemo)(
9964
10126
  () => ({ pageIndex, pageSize }),
9965
10127
  [pageIndex, pageSize]
9966
10128
  );
@@ -9977,7 +10139,7 @@ function DataTable({
9977
10139
  autoResetPageIndex: false
9978
10140
  });
9979
10141
  const clickable = !!onClick;
9980
- const pageKey = (0, import_react36.useMemo)(
10142
+ const pageKey = (0, import_react35.useMemo)(
9981
10143
  () => `${pageIndex}-${pageSize}-${data.length}`,
9982
10144
  [pageIndex, pageSize, data.length]
9983
10145
  );
@@ -9992,7 +10154,7 @@ function DataTable({
9992
10154
  onPageSizeChange == null ? void 0 : onPageSizeChange(size);
9993
10155
  onPageChange == null ? void 0 : onPageChange(1);
9994
10156
  };
9995
- const ui = (0, import_react36.useMemo)(() => {
10157
+ const ui = (0, import_react35.useMemo)(() => {
9996
10158
  var _a;
9997
10159
  const builtIn = (_a = DATA_TABLE_TEMPLATES[template]) != null ? _a : DATA_TABLE_TEMPLATES.neo;
9998
10160
  return mergeSlots(DATA_TABLE_TEMPLATES.neo, builtIn, classNames);
@@ -10001,16 +10163,16 @@ function DataTable({
10001
10163
  const accentOn = !!dtAccent;
10002
10164
  const dataAccent = accentOn ? "on" : "off";
10003
10165
  const headerIsSticky = stickyHeader && !headerScroll;
10004
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
10166
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
10005
10167
  "div",
10006
10168
  {
10007
10169
  "data-accent": dataAccent,
10008
10170
  className: cn(ui.root, heightClassName),
10009
10171
  style: accentOn ? { "--dt-accent": dtAccent } : void 0,
10010
10172
  children: [
10011
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(ScrollArea, { className: "h-full", children: [
10012
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "relative w-max min-w-full", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Table, { className: cn(ui.table), children: [
10013
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableHeader, { className: cn(ui.thead), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableRow, { className: cn(ui.trHead), children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
10173
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(ScrollArea, { className: "h-full", children: [
10174
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "relative w-max min-w-full", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Table, { className: cn(ui.table), children: [
10175
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TableHeader, { className: cn(ui.thead), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TableRow, { className: cn(ui.trHead), children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
10014
10176
  TableHead,
10015
10177
  {
10016
10178
  className: cn(
@@ -10024,7 +10186,7 @@ function DataTable({
10024
10186
  },
10025
10187
  header.id
10026
10188
  )) }, headerGroup.id)) }),
10027
- animate ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_framer_motion.AnimatePresence, { mode: "wait", initial: false, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
10189
+ animate ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_framer_motion.AnimatePresence, { mode: "wait", initial: false, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
10028
10190
  import_framer_motion.motion.tbody,
10029
10191
  {
10030
10192
  className: cn(ui.tbody),
@@ -10032,7 +10194,7 @@ function DataTable({
10032
10194
  animate: { opacity: 1, y: 0 },
10033
10195
  exit: { opacity: 0, y: -6 },
10034
10196
  transition: { duration: 0.18 },
10035
- children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
10197
+ children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
10036
10198
  TableRow,
10037
10199
  {
10038
10200
  "data-accent": dataAccent,
@@ -10042,13 +10204,13 @@ function DataTable({
10042
10204
  ui.tr,
10043
10205
  clickable ? ui.trClickable : void 0
10044
10206
  ),
10045
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableCell, { className: cn(ui.td), children: (0, import_react_table.flexRender)(
10207
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TableCell, { className: cn(ui.td), children: (0, import_react_table.flexRender)(
10046
10208
  cell.column.columnDef.cell,
10047
10209
  cell.getContext()
10048
10210
  ) }, cell.id))
10049
10211
  },
10050
10212
  row.id
10051
- )) : emptyData || /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
10213
+ )) : emptyData || /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
10052
10214
  TableCell,
10053
10215
  {
10054
10216
  colSpan: columns.length,
@@ -10061,7 +10223,7 @@ function DataTable({
10061
10223
  ) })
10062
10224
  },
10063
10225
  pageKey
10064
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableBody, { className: cn(ui.tbody), children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
10226
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TableBody, { className: cn(ui.tbody), children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
10065
10227
  TableRow,
10066
10228
  {
10067
10229
  "data-accent": dataAccent,
@@ -10071,13 +10233,13 @@ function DataTable({
10071
10233
  ui.tr,
10072
10234
  clickable ? ui.trClickable : void 0
10073
10235
  ),
10074
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableCell, { className: cn(ui.td), children: (0, import_react_table.flexRender)(
10236
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TableCell, { className: cn(ui.td), children: (0, import_react_table.flexRender)(
10075
10237
  cell.column.columnDef.cell,
10076
10238
  cell.getContext()
10077
10239
  ) }, cell.id))
10078
10240
  },
10079
10241
  row.id
10080
- )) : emptyData || /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
10242
+ )) : emptyData || /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
10081
10243
  TableCell,
10082
10244
  {
10083
10245
  colSpan: columns.length,
@@ -10089,11 +10251,11 @@ function DataTable({
10089
10251
  }
10090
10252
  ) }) })
10091
10253
  ] }) }),
10092
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ScrollBar, { orientation: "horizontal" })
10254
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ScrollBar, { orientation: "horizontal" })
10093
10255
  ] }) }),
10094
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: cn(ui.footer), children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: cn(ui.footerInner), children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-[1fr_auto] sm:items-center", children: [
10095
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: cn(ui.metaWrap), children: [
10096
- isRowsSelected && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { children: [
10256
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: cn(ui.footer), children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: cn(ui.footerInner), children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-[1fr_auto] sm:items-center", children: [
10257
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: cn(ui.metaWrap), children: [
10258
+ isRowsSelected && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
10097
10259
  table.getFilteredSelectedRowModel().rows.length,
10098
10260
  " ",
10099
10261
  ofLabel,
@@ -10102,36 +10264,36 @@ function DataTable({
10102
10264
  " ",
10103
10265
  rowsSelectedLabel
10104
10266
  ] }),
10105
- typeof totalRows === "number" && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { children: [
10267
+ typeof totalRows === "number" && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
10106
10268
  "Total: ",
10107
10269
  totalRows,
10108
10270
  " registros"
10109
10271
  ] })
10110
10272
  ] }),
10111
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: cn(ui.controlsWrap), children: [
10112
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center gap-2", children: [
10113
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: cn(ui.pageSizeLabel), children: rowPerPageLabel }),
10114
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
10273
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: cn(ui.controlsWrap), children: [
10274
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center gap-2", children: [
10275
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: cn(ui.pageSizeLabel), children: rowPerPageLabel }),
10276
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
10115
10277
  Select2,
10116
10278
  {
10117
10279
  value: `${pageSize}`,
10118
10280
  onValueChange: (v) => changePageSize(Number(v)),
10119
10281
  children: [
10120
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
10282
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
10121
10283
  SelectTrigger,
10122
10284
  {
10123
10285
  "data-accent": dataAccent,
10124
10286
  className: cn(ui.pageSizeTrigger),
10125
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SelectValue, { placeholder: `${pageSize}` })
10287
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectValue, { placeholder: `${pageSize}` })
10126
10288
  }
10127
10289
  ),
10128
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SelectContent, { side: "top", children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SelectItem, { value: `${size}`, children: size }, size)) })
10290
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectContent, { side: "top", children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectItem, { value: `${size}`, children: size }, size)) })
10129
10291
  ]
10130
10292
  }
10131
10293
  )
10132
10294
  ] }),
10133
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center gap-2", children: [
10134
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: cn(ui.pageLabel), children: [
10295
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center gap-2", children: [
10296
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: cn(ui.pageLabel), children: [
10135
10297
  pageLabel,
10136
10298
  " ",
10137
10299
  pageIndex + 1,
@@ -10140,7 +10302,7 @@ function DataTable({
10140
10302
  " ",
10141
10303
  safePageCount
10142
10304
  ] }),
10143
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
10305
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
10144
10306
  Button,
10145
10307
  {
10146
10308
  "data-accent": dataAccent,
@@ -10149,10 +10311,10 @@ function DataTable({
10149
10311
  className: cn("hidden lg:flex", ui.navButton),
10150
10312
  onClick: () => goToPage(0),
10151
10313
  disabled: pageIndex === 0,
10152
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react_icons19.DoubleArrowLeftIcon, { className: "h-4 w-4" })
10314
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_icons19.DoubleArrowLeftIcon, { className: "h-4 w-4" })
10153
10315
  }
10154
10316
  ),
10155
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
10317
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
10156
10318
  Button,
10157
10319
  {
10158
10320
  "data-accent": dataAccent,
@@ -10161,10 +10323,10 @@ function DataTable({
10161
10323
  className: cn(ui.navButton),
10162
10324
  onClick: () => goToPage(pageIndex - 1),
10163
10325
  disabled: pageIndex === 0,
10164
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react12.ChevronLeft, { className: "h-4 w-4" })
10326
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react12.ChevronLeft, { className: "h-4 w-4" })
10165
10327
  }
10166
10328
  ),
10167
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
10329
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
10168
10330
  Button,
10169
10331
  {
10170
10332
  "data-accent": dataAccent,
@@ -10173,10 +10335,10 @@ function DataTable({
10173
10335
  className: cn(ui.navButton),
10174
10336
  onClick: () => goToPage(pageIndex + 1),
10175
10337
  disabled: pageIndex + 1 >= safePageCount,
10176
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react12.ChevronRight, { className: "h-4 w-4" })
10338
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react12.ChevronRight, { className: "h-4 w-4" })
10177
10339
  }
10178
10340
  ),
10179
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
10341
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
10180
10342
  Button,
10181
10343
  {
10182
10344
  "data-accent": dataAccent,
@@ -10185,11 +10347,11 @@ function DataTable({
10185
10347
  className: cn("hidden lg:flex", ui.navButton),
10186
10348
  onClick: () => goToPage(safePageCount - 1),
10187
10349
  disabled: pageIndex + 1 >= safePageCount,
10188
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react_icons19.DoubleArrowRightIcon, { className: "h-4 w-4" })
10350
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_icons19.DoubleArrowRightIcon, { className: "h-4 w-4" })
10189
10351
  }
10190
10352
  )
10191
10353
  ] }),
10192
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "text-muted-foreground w-full text-center text-xs sm:hidden", children: [
10354
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "text-muted-foreground w-full text-center text-xs sm:hidden", children: [
10193
10355
  pageLabel,
10194
10356
  " ",
10195
10357
  pageIndex + 1,
@@ -10206,7 +10368,7 @@ function DataTable({
10206
10368
  }
10207
10369
 
10208
10370
  // src/shared/data-table-skeleton.tsx
10209
- var import_jsx_runtime59 = require("react/jsx-runtime");
10371
+ var import_jsx_runtime60 = require("react/jsx-runtime");
10210
10372
  function DataTableSkeleton({
10211
10373
  columnCount,
10212
10374
  rowCount = 10,
@@ -10214,31 +10376,31 @@ function DataTableSkeleton({
10214
10376
  filterableColumnCount = 0,
10215
10377
  showViewOptions = true
10216
10378
  }) {
10217
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "w-full space-y-3 overflow-auto", children: [
10218
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex w-full items-center justify-between space-x-2 overflow-auto p-1", children: [
10219
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex flex-1 items-center space-x-2 space-y-4", children: [
10220
- searchableColumnCount > 0 ? Array.from({ length: searchableColumnCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Skeleton, { className: "h-10 w-37.5 lg:w-62.5" }, i)) : null,
10221
- filterableColumnCount > 0 ? Array.from({ length: filterableColumnCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Skeleton, { className: "h-10 w-17.5 border-dashed" }, i)) : null
10379
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "w-full space-y-3 overflow-auto", children: [
10380
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex w-full items-center justify-between space-x-2 overflow-auto p-1", children: [
10381
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex flex-1 items-center space-x-2 space-y-4", children: [
10382
+ searchableColumnCount > 0 ? Array.from({ length: searchableColumnCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Skeleton, { className: "h-10 w-37.5 lg:w-62.5" }, i)) : null,
10383
+ filterableColumnCount > 0 ? Array.from({ length: filterableColumnCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Skeleton, { className: "h-10 w-17.5 border-dashed" }, i)) : null
10222
10384
  ] }),
10223
- showViewOptions ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Skeleton, { className: "ml-auto hidden h-7 w-17.5 lg:flex" }) : null
10385
+ showViewOptions ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Skeleton, { className: "ml-auto hidden h-7 w-17.5 lg:flex" }) : null
10224
10386
  ] }),
10225
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "rounded-md border", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Table, { children: [
10226
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TableHeader, { children: Array.from({ length: 1 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) }),
10227
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TableBody, { children: Array.from({ length: rowCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) })
10387
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "rounded-md border", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Table, { children: [
10388
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TableHeader, { children: Array.from({ length: 1 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) }),
10389
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TableBody, { children: Array.from({ length: rowCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) })
10228
10390
  ] }) }),
10229
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("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: [
10230
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Skeleton, { className: "h-8 w-40" }) }),
10231
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex flex-col items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8", children: [
10232
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center space-x-2", children: [
10233
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Skeleton, { className: "h-8 w-24" }),
10234
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Skeleton, { className: "h-8 w-17.5" })
10391
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("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: [
10392
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Skeleton, { className: "h-8 w-40" }) }),
10393
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex flex-col items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8", children: [
10394
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex items-center space-x-2", children: [
10395
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Skeleton, { className: "h-8 w-24" }),
10396
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Skeleton, { className: "h-8 w-17.5" })
10235
10397
  ] }),
10236
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex w-25 items-center justify-center text-sm font-medium", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Skeleton, { className: "h-8 w-20" }) }),
10237
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center space-x-2", children: [
10238
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Skeleton, { className: "hidden size-8 lg:block" }),
10239
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Skeleton, { className: "size-8" }),
10240
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Skeleton, { className: "size-8" }),
10241
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Skeleton, { className: "hidden size-8 lg:block" })
10398
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex w-25 items-center justify-center text-sm font-medium", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Skeleton, { className: "h-8 w-20" }) }),
10399
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex items-center space-x-2", children: [
10400
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Skeleton, { className: "hidden size-8 lg:block" }),
10401
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Skeleton, { className: "size-8" }),
10402
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Skeleton, { className: "size-8" }),
10403
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Skeleton, { className: "hidden size-8 lg:block" })
10242
10404
  ] })
10243
10405
  ] })
10244
10406
  ] })
@@ -10247,7 +10409,7 @@ function DataTableSkeleton({
10247
10409
 
10248
10410
  // src/shared/dropzone.tsx
10249
10411
  var import_react_dropzone = require("react-dropzone");
10250
- var import_jsx_runtime60 = require("react/jsx-runtime");
10412
+ var import_jsx_runtime61 = require("react/jsx-runtime");
10251
10413
  function Dropzone({
10252
10414
  label,
10253
10415
  onChange,
@@ -10270,9 +10432,9 @@ function Dropzone({
10270
10432
  },
10271
10433
  accept
10272
10434
  }, options));
10273
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: cn("space-y-2", className), children: [
10274
- label && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: cn("font-medium", labelClassName), children: label }),
10275
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
10435
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: cn("space-y-2", className), children: [
10436
+ label && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: cn("font-medium", labelClassName), children: label }),
10437
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
10276
10438
  "div",
10277
10439
  __spreadProps(__spreadValues({}, getRootProps()), {
10278
10440
  className: cn(
@@ -10281,12 +10443,12 @@ function Dropzone({
10281
10443
  dropzoneClassName
10282
10444
  ),
10283
10445
  children: [
10284
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("input", __spreadValues({}, getInputProps())),
10285
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: cn("text-gray-600", descriptionClassName), children: isDragActive ? descriptionActive : description })
10446
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("input", __spreadValues({}, getInputProps())),
10447
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: cn("text-gray-600", descriptionClassName), children: isDragActive ? descriptionActive : description })
10286
10448
  ]
10287
10449
  })
10288
10450
  ),
10289
- value && value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("ul", { className: cn("text-sm text-gray-700 space-y-1", valueClassName), children: value.map((file, idx) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("li", { children: [
10451
+ value && value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("ul", { className: cn("text-sm text-gray-700 space-y-1", valueClassName), children: value.map((file, idx) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("li", { children: [
10290
10452
  "\u2022 ",
10291
10453
  file.name
10292
10454
  ] }, idx)) })
@@ -10296,9 +10458,9 @@ function Dropzone({
10296
10458
  // src/shared/fileupload.tsx
10297
10459
  var import_react_icons20 = require("@radix-ui/react-icons");
10298
10460
  var import_lucide_react13 = require("lucide-react");
10299
- var import_react37 = require("react");
10461
+ var import_react36 = require("react");
10300
10462
  var import_react_dropzone2 = require("react-dropzone");
10301
- var import_jsx_runtime61 = require("react/jsx-runtime");
10463
+ var import_jsx_runtime62 = require("react/jsx-runtime");
10302
10464
  function FileUpload({
10303
10465
  onChange,
10304
10466
  value = [],
@@ -10314,18 +10476,18 @@ function FileUpload({
10314
10476
  onChange(acceptedFiles);
10315
10477
  }
10316
10478
  }, options));
10317
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: cn("flex items-center justify-center", className), children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
10479
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: cn("flex items-center justify-center", className), children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
10318
10480
  "div",
10319
10481
  {
10320
10482
  className: cn(
10321
10483
  "relative h-36 w-36 overflow-hidden rounded-full bg-gray-200 shadow-2xl",
10322
10484
  classNameContent
10323
10485
  ),
10324
- children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", __spreadProps(__spreadValues({}, getRootProps({ className: "dropzone cursor-pointer" })), { children: [
10325
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("input", __spreadValues({}, getInputProps())),
10326
- value.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ImagePreview, { file: value[0] }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react_icons20.AvatarIcon, { className: "h-36 w-36 text-gray-100" }),
10327
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("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: [
10328
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_lucide_react13.CameraIcon, { className: "h-4 w-4 text-muted-foreground" }),
10486
+ children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", __spreadProps(__spreadValues({}, getRootProps({ className: "dropzone cursor-pointer" })), { children: [
10487
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("input", __spreadValues({}, getInputProps())),
10488
+ value.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ImagePreview, { file: value[0] }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react_icons20.AvatarIcon, { className: "h-36 w-36 text-gray-100" }),
10489
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("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: [
10490
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react13.CameraIcon, { className: "h-4 w-4 text-muted-foreground" }),
10329
10491
  label
10330
10492
  ] })
10331
10493
  ] }))
@@ -10333,15 +10495,15 @@ function FileUpload({
10333
10495
  ) });
10334
10496
  }
10335
10497
  function ImagePreview({ file }) {
10336
- const [objectUrl, setObjectUrl] = (0, import_react37.useState)(null);
10337
- (0, import_react37.useEffect)(() => {
10498
+ const [objectUrl, setObjectUrl] = (0, import_react36.useState)(null);
10499
+ (0, import_react36.useEffect)(() => {
10338
10500
  const url = URL.createObjectURL(file);
10339
10501
  setObjectUrl(url);
10340
10502
  return () => {
10341
10503
  URL.revokeObjectURL(url);
10342
10504
  };
10343
10505
  }, [file]);
10344
- return objectUrl ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
10506
+ return objectUrl ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
10345
10507
  "img",
10346
10508
  {
10347
10509
  src: objectUrl,
@@ -10352,23 +10514,23 @@ function ImagePreview({ file }) {
10352
10514
  }
10353
10515
 
10354
10516
  // src/shared/heading.tsx
10355
- var import_jsx_runtime62 = require("react/jsx-runtime");
10517
+ var import_jsx_runtime63 = require("react/jsx-runtime");
10356
10518
  function Heading({ title, description, className }) {
10357
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className, children: [
10358
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "text-lg font-bold tracking-tight text-primary sm:text-3xl", children: title }),
10359
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "text-sm text-muted-foreground", children: description })
10519
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className, children: [
10520
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "text-lg font-bold tracking-tight text-primary sm:text-3xl", children: title }),
10521
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { className: "text-sm text-muted-foreground", children: description })
10360
10522
  ] });
10361
10523
  }
10362
10524
 
10363
10525
  // src/shared/page-head.tsx
10364
10526
  var import_react_helmet_next = require("react-helmet-next");
10365
- var import_jsx_runtime63 = require("react/jsx-runtime");
10527
+ var import_jsx_runtime64 = require("react/jsx-runtime");
10366
10528
  function PageHead({ title = "shadcn-ui-react" }) {
10367
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react_helmet_next.Helmet, { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("title", { children: title }) });
10529
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react_helmet_next.Helmet, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("title", { children: title }) });
10368
10530
  }
10369
10531
 
10370
10532
  // src/shared/pagination-section.tsx
10371
- var import_jsx_runtime64 = require("react/jsx-runtime");
10533
+ var import_jsx_runtime65 = require("react/jsx-runtime");
10372
10534
  function PaginationSection({
10373
10535
  totalPosts,
10374
10536
  postsPerPage,
@@ -10406,17 +10568,17 @@ function PaginationSection({
10406
10568
  }
10407
10569
  };
10408
10570
  const renderPages = () => {
10409
- const renderedPages = activePages.map((page, idx) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
10571
+ const renderedPages = activePages.map((page, idx) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
10410
10572
  PaginationItem,
10411
10573
  {
10412
10574
  className: currentPage === page ? "rounded-md bg-primary" : "",
10413
- children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(PaginationLink, { onClick: () => setCurrentPage(page), size: void 0, children: page })
10575
+ children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(PaginationLink, { onClick: () => setCurrentPage(page), size: void 0, children: page })
10414
10576
  },
10415
10577
  idx
10416
10578
  ));
10417
10579
  if (activePages[0] > 1) {
10418
10580
  renderedPages.unshift(
10419
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
10581
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
10420
10582
  PaginationEllipsis,
10421
10583
  {
10422
10584
  onClick: () => setCurrentPage(activePages[0] - 1)
@@ -10427,7 +10589,7 @@ function PaginationSection({
10427
10589
  }
10428
10590
  if (activePages[activePages.length - 1] < pageNumbers.length) {
10429
10591
  renderedPages.push(
10430
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
10592
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
10431
10593
  PaginationEllipsis,
10432
10594
  {
10433
10595
  onClick: () => setCurrentPage(activePages[activePages.length - 1] + 1)
@@ -10438,21 +10600,21 @@ function PaginationSection({
10438
10600
  }
10439
10601
  return renderedPages;
10440
10602
  };
10441
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "p-4", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Pagination, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(PaginationContent, { children: [
10442
- /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(PaginationItem, { children: [
10443
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
10603
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "p-4", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Pagination, { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(PaginationContent, { children: [
10604
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(PaginationItem, { children: [
10605
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
10444
10606
  PaginationPreviousLast,
10445
10607
  {
10446
10608
  onClick: handlePrevPageLast,
10447
10609
  size: void 0
10448
10610
  }
10449
10611
  ),
10450
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(PaginationPrevious, { onClick: handlePrevPage, size: void 0 })
10612
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(PaginationPrevious, { onClick: handlePrevPage, size: void 0 })
10451
10613
  ] }),
10452
10614
  renderPages(),
10453
- /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(PaginationItem, { children: [
10454
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(PaginationNext, { onClick: handleNextPage, size: void 0 }),
10455
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(PaginationNextLast, { onClick: handleNextPageLast, size: void 0 })
10615
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(PaginationItem, { children: [
10616
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(PaginationNext, { onClick: handleNextPage, size: void 0 }),
10617
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(PaginationNextLast, { onClick: handleNextPageLast, size: void 0 })
10456
10618
  ] })
10457
10619
  ] }) }) });
10458
10620
  }
@@ -10576,7 +10738,9 @@ function PaginationSection({
10576
10738
  FormControl,
10577
10739
  FormDescription,
10578
10740
  FormField,
10741
+ FormFieldContext,
10579
10742
  FormItem,
10743
+ FormItemContext,
10580
10744
  FormLabel,
10581
10745
  FormMessage,
10582
10746
  FormSelect,
@@ -10704,8 +10868,13 @@ function PaginationSection({
10704
10868
  badgeVariants,
10705
10869
  buttonVariants,
10706
10870
  cn,
10871
+ getDefaultOptionLabel,
10872
+ getDefaultOptionValue,
10873
+ getErrorMessage,
10874
+ getNextEnabledIndex,
10707
10875
  iconButtonVariants,
10708
10876
  navigationMenuTriggerStyle,
10877
+ normalizeSearchText,
10709
10878
  reducer,
10710
10879
  toast,
10711
10880
  toggleVariants,