shadcn-ui-react 0.7.7 → 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,16 +307,19 @@ __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
- inputVariants: () => inputVariants,
310
315
  navigationMenuTriggerStyle: () => navigationMenuTriggerStyle,
316
+ normalizeSearchText: () => normalizeSearchText,
311
317
  reducer: () => reducer,
312
318
  toast: () => toast,
313
319
  toggleVariants: () => toggleVariants,
314
320
  useFormField: () => useFormField,
315
321
  useSidebar: () => useSidebar,
316
- useToast: () => useToast,
317
- variants: () => variants
322
+ useToast: () => useToast
318
323
  });
319
324
  module.exports = __toCommonJS(index_exports);
320
325
 
@@ -777,7 +782,7 @@ var BreadcrumbList = React6.forwardRef((_a, ref) => {
777
782
  __spreadValues({
778
783
  ref,
779
784
  className: cn(
780
- "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",
781
786
  className
782
787
  )
783
788
  }, props)
@@ -6574,36 +6579,22 @@ var DropdownMenuShortcut = (_a) => {
6574
6579
  };
6575
6580
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
6576
6581
 
6577
- // 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");
6578
6585
  var import_react_hook_form = require("react-hook-form");
6579
- var import_jsx_runtime18 = require("react/jsx-runtime");
6580
- function Form({
6581
- children,
6582
- methods,
6583
- onSubmit,
6584
- onError,
6585
- formProps
6586
- }) {
6587
- const handleSubmit = onSubmit ? methods.handleSubmit(onSubmit, onError) : void 0;
6588
- 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 })) }));
6589
- }
6590
-
6591
- // src/components/Form/form-checkbox.tsx
6592
- var React47 = __toESM(require("react"), 1);
6593
- var import_lucide_react4 = require("lucide-react");
6594
- var import_react_hook_form3 = require("react-hook-form");
6595
6586
 
6596
6587
  // src/components/Label/label.tsx
6597
6588
  var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
6598
6589
  var import_class_variance_authority5 = require("class-variance-authority");
6599
6590
  var React43 = __toESM(require("react"), 1);
6600
- var import_jsx_runtime19 = require("react/jsx-runtime");
6591
+ var import_jsx_runtime18 = require("react/jsx-runtime");
6601
6592
  var labelVariants = (0, import_class_variance_authority5.cva)(
6602
6593
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-label"
6603
6594
  );
6604
6595
  var Label3 = React43.forwardRef((_a, ref) => {
6605
6596
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6606
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6597
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6607
6598
  LabelPrimitive.Root,
6608
6599
  __spreadValues({
6609
6600
  ref,
@@ -6613,21 +6604,410 @@ var Label3 = React43.forwardRef((_a, ref) => {
6613
6604
  });
6614
6605
  Label3.displayName = LabelPrimitive.Root.displayName;
6615
6606
 
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
6753
+ var React45 = __toESM(require("react"), 1);
6754
+ var import_lucide_react3 = require("lucide-react");
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
+
6616
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");
6904
+
6905
+ // src/components/input.tsx
6617
6906
  var React46 = __toESM(require("react"), 1);
6618
- var import_react_slot4 = require("@radix-ui/react-slot");
6619
- var import_lucide_react3 = require("lucide-react");
6620
- var import_react_hook_form2 = require("react-hook-form");
6907
+
6908
+ // src/components/Form/utils/form-utils.ts
6909
+ var formInputVariants = {
6910
+ outline: "rounded-md border border-input bg-input backdrop-blur-sm shadow-sm hover:border-primary/60 focus:border-primary focus:ring-2 focus:ring-primary/20",
6911
+ soft: "rounded-md border border-transparent bg-muted/60 shadow-sm hover:bg-muted focus:bg-input/80 focus:ring-2 focus:ring-primary/20",
6912
+ ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
6913
+ filled: "rounded-md border border-input bg-muted/70 shadow-inner hover:bg-muted focus:bg-input/70 focus:ring-2 focus:ring-primary/20",
6914
+ flushed: "rounded-none border-0 border-b border-input px-0 shadow-none focus:border-b-2 focus:border-primary focus:ring-0",
6915
+ unstyled: "border-0 shadow-none focus:ring-0",
6916
+ link: "h-auto border-0 bg-transparent p-0 text-primary shadow-none underline-offset-4 focus:underline focus:ring-0"
6917
+ };
6918
+ var variants = formInputVariants;
6919
+ var formSizeVariants = {
6920
+ "2xs": {
6921
+ control: "h-7 px-2 text-xs",
6922
+ flushedControl: "h-7 text-xs",
6923
+ linkControl: "text-xs",
6924
+ selectItem: "h-7 text-xs",
6925
+ searchInput: "h-7 px-2 text-xs",
6926
+ checkbox: "size-3",
6927
+ label: "text-xs",
6928
+ description: "text-xs",
6929
+ message: "text-xs"
6930
+ },
6931
+ xs: {
6932
+ control: "h-8 px-2.5 text-xs",
6933
+ flushedControl: "h-8 text-xs",
6934
+ linkControl: "text-xs",
6935
+ selectItem: "h-8 text-xs",
6936
+ searchInput: "h-8 px-2.5 text-xs",
6937
+ checkbox: "size-3.5",
6938
+ label: "text-xs",
6939
+ description: "text-xs",
6940
+ message: "text-xs"
6941
+ },
6942
+ sm: {
6943
+ control: "h-9 px-3 text-sm",
6944
+ flushedControl: "h-9 text-sm",
6945
+ linkControl: "text-sm",
6946
+ selectItem: "h-8 text-sm",
6947
+ searchInput: "h-9 px-3 text-sm",
6948
+ checkbox: "size-4",
6949
+ label: "text-sm",
6950
+ description: "text-sm",
6951
+ message: "text-sm"
6952
+ },
6953
+ md: {
6954
+ control: "h-10 px-3.5 text-sm",
6955
+ flushedControl: "h-10 text-sm",
6956
+ linkControl: "text-sm",
6957
+ selectItem: "h-9 text-sm",
6958
+ searchInput: "h-10 px-3.5 text-sm",
6959
+ checkbox: "size-4",
6960
+ label: "text-sm",
6961
+ description: "text-sm",
6962
+ message: "text-sm"
6963
+ },
6964
+ lg: {
6965
+ control: "h-11 px-4 text-base",
6966
+ flushedControl: "h-11 text-base",
6967
+ linkControl: "text-base",
6968
+ selectItem: "h-10 text-base",
6969
+ searchInput: "h-11 px-4 text-base",
6970
+ checkbox: "size-5",
6971
+ label: "text-base",
6972
+ description: "text-sm",
6973
+ message: "text-sm"
6974
+ },
6975
+ xl: {
6976
+ control: "h-12 px-4 text-base",
6977
+ flushedControl: "h-12 text-base",
6978
+ linkControl: "text-base",
6979
+ selectItem: "h-11 text-base",
6980
+ searchInput: "h-12 px-4 text-base",
6981
+ checkbox: "size-6",
6982
+ label: "text-base",
6983
+ description: "text-sm",
6984
+ message: "text-sm"
6985
+ },
6986
+ "2xl": {
6987
+ control: "h-14 px-5 text-lg",
6988
+ flushedControl: "h-14 text-lg",
6989
+ linkControl: "text-lg",
6990
+ selectItem: "h-12 text-lg",
6991
+ searchInput: "h-14 px-5 text-lg",
6992
+ checkbox: "size-7",
6993
+ label: "text-lg",
6994
+ description: "text-base",
6995
+ message: "text-base"
6996
+ }
6997
+ };
6998
+ function getFormSizeClasses(size = "md", customSize) {
6999
+ return __spreadValues(__spreadValues({}, formSizeVariants[size]), customSize);
7000
+ }
6621
7001
 
6622
7002
  // src/components/input.tsx
6623
- var React44 = __toESM(require("react"), 1);
6624
- var import_jsx_runtime20 = require("react/jsx-runtime");
6625
- var Input = React44.forwardRef(
7003
+ var import_jsx_runtime22 = require("react/jsx-runtime");
7004
+ var Input = React46.forwardRef(
6626
7005
  (_a, ref) => {
6627
7006
  var _b = _a, {
6628
7007
  className,
6629
7008
  variant = "outline",
6630
7009
  size = "md",
7010
+ customSize,
6631
7011
  leading,
6632
7012
  trailing,
6633
7013
  classNameDefault = true,
@@ -6637,50 +7017,37 @@ var Input = React44.forwardRef(
6637
7017
  "className",
6638
7018
  "variant",
6639
7019
  "size",
7020
+ "customSize",
6640
7021
  "leading",
6641
7022
  "trailing",
6642
7023
  "classNameDefault",
6643
7024
  "invalid",
6644
7025
  "disabled"
6645
7026
  ]);
6646
- const base = "block w-full bg-transparent text-foreground placeholder:text-muted-foreground outline-none transition disabled:opacity-50 disabled:cursor-not-allowed";
6647
- const sizeCls = size === "sm" ? "h-9 px-3 text-sm" : size === "lg" ? "h-11 px-4 text-base" : "h-10 px-3.5 text-sm";
6648
- const variants3 = {
6649
- outline: "rounded-md border border-input bg-input backdrop-blur-sm shadow-sm hover:border-primary/60 focus:border-primary focus:ring-2 focus:ring-primary/20",
6650
- soft: "rounded-md border border-transparent bg-muted/60 hover:bg-muted shadow-sm focus:bg-input/80 focus:ring-2 focus:ring-primary/20",
6651
- ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
6652
- filled: "rounded-md border border-input bg-muted/70 hover:bg-muted shadow-inner focus:bg-input/70 focus:ring-2 focus:ring-primary/20",
6653
- flushed: (
6654
- // sin bordes laterales/superior, solo inferior; sin sombras ni radios
6655
- "rounded-none border-0 border-b border-input px-0 shadow-none focus:border-b-2 focus:border-primary focus:ring-0"
6656
- ),
6657
- unstyled: (
6658
- // sin estilos, útil para inputs embebidos o controles muy custom
6659
- "border-0 shadow-none focus:ring-0"
6660
- ),
6661
- link: (
6662
- // aspecto tipo enlace: inline height-auto, sin paddings ni borde
6663
- "border-0 p-0 h-auto shadow-none bg-transparent text-primary underline-offset-4 focus:underline focus:ring-0"
6664
- )
6665
- };
6666
- const errorCls = invalid ? "border-destructive focus:border-destructive focus:ring-destructive/20" : "";
6667
- const iconPadLeft = leading && variant !== "flushed" && variant !== "link" ? size === "lg" ? "pl-12" : "pl-10" : "";
6668
- const iconPadRight = trailing && variant !== "flushed" && variant !== "link" ? size === "lg" ? "pr-12" : "pr-10" : "";
6669
- const specialSizeForFlushed = variant === "flushed" ? size === "sm" ? "h-9 text-sm" : size === "lg" ? "h-11 text-base" : "h-10 text-sm" : "";
6670
- const specialSizeForLink = variant === "link" ? "text-sm" : "";
6671
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: cn("relative", disabled && "opacity-80"), children: [
6672
- leading ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
7027
+ const sizeClasses = getFormSizeClasses(size, customSize);
7028
+ const base = "block w-full bg-transparent text-foreground placeholder:text-muted-foreground outline-none transition disabled:cursor-not-allowed disabled:opacity-50";
7029
+ const inputSizeClass = variant === "flushed" ? sizeClasses.flushedControl : variant === "link" ? sizeClasses.linkControl : sizeClasses.control;
7030
+ const errorClass = invalid ? "border-destructive focus:border-destructive focus:ring-destructive/20" : "";
7031
+ const hasIconPadding = variant !== "flushed" && variant !== "link";
7032
+ const iconPaddingLeft = leading && hasIconPadding ? size === "xl" || size === "2xl" ? "pl-14" : size === "lg" ? "pl-12" : size === "2xs" || size === "xs" ? "pl-8" : "pl-10" : "";
7033
+ const iconPaddingRight = trailing && hasIconPadding ? size === "xl" || size === "2xl" ? "pr-14" : size === "lg" ? "pr-12" : size === "2xs" || size === "xs" ? "pr-8" : "pr-10" : "";
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]";
7035
+ const iconPositionClass = size === "2xs" || size === "xs" ? "left-2" : size === "xl" || size === "2xl" ? "left-4" : "left-3";
7036
+ const trailingIconPositionClass = size === "2xs" || size === "xs" ? "right-2" : size === "xl" || size === "2xl" ? "right-4" : "right-3";
7037
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cn("relative", disabled && "opacity-80"), children: [
7038
+ leading ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
6673
7039
  "span",
6674
7040
  {
6675
7041
  className: cn(
6676
- "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 opacity-60",
6677
- size === "lg" ? "text-[1.15rem]" : "text-[1rem]",
6678
- variant === "flushed" || variant === "link" ? "hidden" : ""
7042
+ "pointer-events-none absolute top-1/2 -translate-y-1/2 opacity-60",
7043
+ iconPositionClass,
7044
+ iconSizeClass,
7045
+ !hasIconPadding && "hidden"
6679
7046
  ),
6680
7047
  children: leading
6681
7048
  }
6682
7049
  ) : null,
6683
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
7050
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
6684
7051
  "input",
6685
7052
  __spreadValues({
6686
7053
  ref,
@@ -6688,23 +7055,24 @@ var Input = React44.forwardRef(
6688
7055
  disabled,
6689
7056
  className: classNameDefault ? cn(
6690
7057
  base,
6691
- variants3[variant],
6692
- variant === "flushed" ? specialSizeForFlushed : variant === "link" ? specialSizeForLink : sizeCls,
6693
- errorCls,
6694
- iconPadLeft,
6695
- iconPadRight,
7058
+ formInputVariants[variant],
7059
+ inputSizeClass,
7060
+ errorClass,
7061
+ iconPaddingLeft,
7062
+ iconPaddingRight,
6696
7063
  className
6697
7064
  ) : className,
6698
7065
  "data-private": true
6699
7066
  }, props)
6700
7067
  ),
6701
- trailing ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
7068
+ trailing ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
6702
7069
  "span",
6703
7070
  {
6704
7071
  className: cn(
6705
- "absolute right-3 top-1/2 -translate-y-1/2 opacity-70",
6706
- size === "lg" ? "text-[1.15rem]" : "text-[1rem]",
6707
- variant === "flushed" || variant === "link" ? "hidden" : ""
7072
+ "absolute top-1/2 -translate-y-1/2 opacity-70",
7073
+ trailingIconPositionClass,
7074
+ iconSizeClass,
7075
+ !hasIconPadding && "hidden"
6708
7076
  ),
6709
7077
  children: trailing
6710
7078
  }
@@ -6714,154 +7082,9 @@ var Input = React44.forwardRef(
6714
7082
  );
6715
7083
  Input.displayName = "Input";
6716
7084
 
6717
- // src/components/select.tsx
6718
- var import_react_icons9 = require("@radix-ui/react-icons");
6719
- var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
6720
- var React45 = __toESM(require("react"), 1);
6721
- var import_jsx_runtime21 = require("react/jsx-runtime");
6722
- var Select2 = SelectPrimitive.Root;
6723
- var SelectGroup = SelectPrimitive.Group;
6724
- var SelectValue = SelectPrimitive.Value;
6725
- var SelectTrigger = React45.forwardRef((_a, ref) => {
6726
- var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
6727
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
6728
- SelectPrimitive.Trigger,
6729
- __spreadProps(__spreadValues({
6730
- ref,
6731
- className: cn(
6732
- "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 placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
6733
- className
6734
- )
6735
- }, props), {
6736
- children: [
6737
- children,
6738
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_icons9.CaretSortIcon, { className: "h-4 w-4 opacity-50" }) })
6739
- ]
6740
- })
6741
- );
6742
- });
6743
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
6744
- var SelectScrollUpButton = React45.forwardRef((_a, ref) => {
6745
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6746
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6747
- SelectPrimitive.ScrollUpButton,
6748
- __spreadProps(__spreadValues({
6749
- ref,
6750
- className: cn(
6751
- "flex cursor-default items-center justify-center py-1",
6752
- className
6753
- )
6754
- }, props), {
6755
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_icons9.ChevronUpIcon, {})
6756
- })
6757
- );
6758
- });
6759
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
6760
- var SelectScrollDownButton = React45.forwardRef((_a, ref) => {
6761
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6762
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6763
- SelectPrimitive.ScrollDownButton,
6764
- __spreadProps(__spreadValues({
6765
- ref,
6766
- className: cn(
6767
- "flex cursor-default items-center justify-center py-1",
6768
- className
6769
- )
6770
- }, props), {
6771
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_icons9.ChevronDownIcon, {})
6772
- })
6773
- );
6774
- });
6775
- SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
6776
- var SelectContent = React45.forwardRef((_a, ref) => {
6777
- var _b = _a, { className, children, position = "popper" } = _b, props = __objRest(_b, ["className", "children", "position"]);
6778
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
6779
- SelectPrimitive.Content,
6780
- __spreadProps(__spreadValues({
6781
- ref,
6782
- className: cn(
6783
- "relative z-50 max-h-96 min-w-32 overflow-hidden bg-popover border border-border text-popover-foreground rounded-md 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]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
6784
- position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
6785
- className
6786
- ),
6787
- position
6788
- }, props), {
6789
- children: [
6790
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectScrollUpButton, {}),
6791
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6792
- SelectPrimitive.Viewport,
6793
- {
6794
- className: cn(
6795
- "p-1",
6796
- position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"
6797
- ),
6798
- children
6799
- }
6800
- ),
6801
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectScrollDownButton, {})
6802
- ]
6803
- })
6804
- ) });
6805
- });
6806
- SelectContent.displayName = SelectPrimitive.Content.displayName;
6807
- var SelectLabel = React45.forwardRef((_a, ref) => {
6808
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6809
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6810
- SelectPrimitive.Label,
6811
- __spreadValues({
6812
- ref,
6813
- className: cn("px-2 py-1.5 text-sm font-semibold", className)
6814
- }, props)
6815
- );
6816
- });
6817
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
6818
- var SelectItem = React45.forwardRef((_a, ref) => {
6819
- var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
6820
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
6821
- SelectPrimitive.Item,
6822
- __spreadProps(__spreadValues({
6823
- ref,
6824
- className: cn(
6825
- "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",
6826
- className
6827
- )
6828
- }, props), {
6829
- children: [
6830
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_icons9.CheckIcon, { className: "h-4 w-4" }) }) }),
6831
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectPrimitive.ItemText, { children })
6832
- ]
6833
- })
6834
- );
6835
- });
6836
- SelectItem.displayName = SelectPrimitive.Item.displayName;
6837
- var SelectSeparator = React45.forwardRef((_a, ref) => {
6838
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6839
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6840
- SelectPrimitive.Separator,
6841
- __spreadValues({
6842
- ref,
6843
- className: cn("-mx-1 my-1 h-px bg-muted", className)
6844
- }, props)
6845
- );
6846
- });
6847
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
6848
-
6849
7085
  // src/components/Form/form-field.tsx
6850
- var import_jsx_runtime22 = require("react/jsx-runtime");
6851
- var inputVariants = {
6852
- outline: "rounded-md border border-input bg-input backdrop-blur-sm shadow-sm hover:border-primary/60 focus:border-primary focus:ring-2 focus:ring-primary/20",
6853
- soft: "rounded-md border border-transparent bg-muted/60 shadow-sm hover:bg-muted focus:bg-input/80 focus:ring-2 focus:ring-primary/20",
6854
- ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
6855
- filled: "rounded-md border border-input bg-muted/70 shadow-inner hover:bg-muted focus:bg-input/70 focus:ring-2 focus:ring-primary/20",
6856
- flushed: "rounded-none border-0 border-b border-input px-0 shadow-none focus:border-b-2 focus:border-primary focus:ring-0",
6857
- unstyled: "border-0 shadow-none focus:ring-0",
6858
- link: "h-auto border-0 bg-transparent p-0 text-primary shadow-none underline-offset-4 focus:underline focus:ring-0"
6859
- };
6860
- var variants = inputVariants;
6861
- var FormFieldContext = React46.createContext(
6862
- null
6863
- );
6864
- function getErrorMessage(error) {
7086
+ var import_jsx_runtime23 = require("react/jsx-runtime");
7087
+ function getErrorMessage2(error) {
6865
7088
  const message2 = error == null ? void 0 : error.message;
6866
7089
  return typeof message2 === "string" ? message2 : void 0;
6867
7090
  }
@@ -6880,6 +7103,7 @@ var FormField = (_a) => {
6880
7103
  requiredLabelClassName,
6881
7104
  variant = "outline",
6882
7105
  size = "md",
7106
+ customSize,
6883
7107
  rules,
6884
7108
  shouldUnregister,
6885
7109
  defaultValue,
@@ -6901,6 +7125,7 @@ var FormField = (_a) => {
6901
7125
  "requiredLabelClassName",
6902
7126
  "variant",
6903
7127
  "size",
7128
+ "customSize",
6904
7129
  "rules",
6905
7130
  "shouldUnregister",
6906
7131
  "defaultValue",
@@ -6909,10 +7134,10 @@ var FormField = (_a) => {
6909
7134
  "invalid",
6910
7135
  "onChange"
6911
7136
  ]);
6912
- const form = (0, import_react_hook_form2.useFormContext)();
7137
+ const form = (0, import_react_hook_form4.useFormContext)();
6913
7138
  const controllerControl = control != null ? control : form == null ? void 0 : form.control;
6914
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FormFieldContext.Provider, { value: { name }, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
6915
- import_react_hook_form2.Controller,
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,
6916
7141
  {
6917
7142
  control: controllerControl,
6918
7143
  name,
@@ -6921,16 +7146,16 @@ var FormField = (_a) => {
6921
7146
  defaultValue,
6922
7147
  render: ({ field, fieldState }) => {
6923
7148
  var _a2;
6924
- const fieldError = getErrorMessage(fieldState.error);
6925
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(FormItem, { className: itemClassName, children: [
6926
- label ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
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)(
6927
7152
  FormLabel,
6928
7153
  {
6929
7154
  className: cn("flex items-center gap-0.5", labelClassName),
6930
7155
  children: [
6931
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: label }),
6932
- requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
6933
- import_lucide_react3.Asterisk,
7156
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: label }),
7157
+ requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7158
+ import_lucide_react4.Asterisk,
6934
7159
  {
6935
7160
  "aria-hidden": "true",
6936
7161
  className: cn(
@@ -6942,7 +7167,7 @@ var FormField = (_a) => {
6942
7167
  ]
6943
7168
  }
6944
7169
  ) : null,
6945
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7170
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
6946
7171
  Input,
6947
7172
  __spreadProps(__spreadValues(__spreadValues({}, field), inputProps), {
6948
7173
  value: (_a2 = field.value) != null ? _a2 : "",
@@ -6961,136 +7186,172 @@ var FormField = (_a) => {
6961
7186
  invalid: invalid || Boolean(fieldError),
6962
7187
  variant,
6963
7188
  size,
7189
+ customSize,
6964
7190
  placeholder,
6965
7191
  className: cn(className),
6966
7192
  classNameDefault
6967
7193
  })
6968
7194
  ) }),
6969
- fieldError ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FormMessage, { className: messageClassName, children: fieldError }) : null
7195
+ fieldError ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FormMessage, { className: messageClassName, children: fieldError }) : null
6970
7196
  ] });
6971
7197
  }
6972
7198
  }
6973
7199
  ) });
6974
7200
  };
6975
7201
  FormField.displayName = "FormField";
6976
- var FormItemContext = React46.createContext(null);
6977
- var FormItem = React46.forwardRef((_a, ref) => {
6978
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6979
- const id = React46.useId();
6980
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", __spreadValues({ ref, className: cn("space-y-2", className) }, props)) });
6981
- });
6982
- FormItem.displayName = "FormItem";
6983
- var useFormField = () => {
6984
- var _a;
6985
- const generatedId = React46.useId();
6986
- const fieldContext = React46.useContext(FormFieldContext);
6987
- const itemContext = React46.useContext(FormItemContext);
6988
- const formContext = (0, import_react_hook_form2.useFormContext)();
6989
- const id = (_a = itemContext == null ? void 0 : itemContext.id) != null ? _a : generatedId;
6990
- if (!fieldContext || !formContext) {
6991
- return {
6992
- id,
6993
- formItemId: `${id}-form-item`,
6994
- formDescriptionId: `${id}-form-item-description`,
6995
- formMessageId: `${id}-form-item-message`,
6996
- error: void 0
6997
- };
6998
- }
6999
- const fieldState = formContext.getFieldState(
7000
- fieldContext.name,
7001
- formContext.formState
7202
+
7203
+ // src/components/Form/form-select.tsx
7204
+ var React48 = __toESM(require("react"), 1);
7205
+ var import_lucide_react5 = require("lucide-react");
7206
+ var import_react_hook_form5 = require("react-hook-form");
7207
+
7208
+ // src/components/select.tsx
7209
+ var import_react_icons9 = require("@radix-ui/react-icons");
7210
+ var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
7211
+ var React47 = __toESM(require("react"), 1);
7212
+ var import_jsx_runtime24 = require("react/jsx-runtime");
7213
+ var Select2 = SelectPrimitive.Root;
7214
+ var SelectGroup = SelectPrimitive.Group;
7215
+ var SelectValue = SelectPrimitive.Value;
7216
+ var SelectTrigger = React47.forwardRef((_a, ref) => {
7217
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
7218
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
7219
+ SelectPrimitive.Trigger,
7220
+ __spreadProps(__spreadValues({
7221
+ ref,
7222
+ className: cn(
7223
+ "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 placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
7224
+ className
7225
+ )
7226
+ }, props), {
7227
+ children: [
7228
+ children,
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" }) })
7230
+ ]
7231
+ })
7002
7232
  );
7003
- return __spreadValues({
7004
- id,
7005
- name: fieldContext.name,
7006
- formItemId: `${id}-form-item`,
7007
- formDescriptionId: `${id}-form-item-description`,
7008
- formMessageId: `${id}-form-item-message`
7009
- }, fieldState);
7010
- };
7011
- var FormLabel = React46.forwardRef((_a, ref) => {
7233
+ });
7234
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
7235
+ var SelectScrollUpButton = React47.forwardRef((_a, ref) => {
7012
7236
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7013
- const { error, formItemId } = useFormField();
7014
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7015
- Label3,
7016
- __spreadValues({
7237
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7238
+ SelectPrimitive.ScrollUpButton,
7239
+ __spreadProps(__spreadValues({
7017
7240
  ref,
7018
- className: cn(error && "text-destructive", className),
7019
- htmlFor: formItemId
7020
- }, props)
7241
+ className: cn(
7242
+ "flex cursor-default items-center justify-center py-1",
7243
+ className
7244
+ )
7245
+ }, props), {
7246
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_icons9.ChevronUpIcon, {})
7247
+ })
7021
7248
  );
7022
7249
  });
7023
- FormLabel.displayName = "FormLabel";
7024
- var FormControl = React46.forwardRef((_a, ref) => {
7025
- var props = __objRest(_a, []);
7026
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
7027
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7028
- import_react_slot4.Slot,
7029
- __spreadValues({
7250
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
7251
+ var SelectScrollDownButton = React47.forwardRef((_a, ref) => {
7252
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7253
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7254
+ SelectPrimitive.ScrollDownButton,
7255
+ __spreadProps(__spreadValues({
7030
7256
  ref,
7031
- id: formItemId,
7032
- "aria-describedby": error ? `${formDescriptionId} ${formMessageId}` : formDescriptionId,
7033
- "aria-invalid": Boolean(error)
7034
- }, props)
7257
+ className: cn(
7258
+ "flex cursor-default items-center justify-center py-1",
7259
+ className
7260
+ )
7261
+ }, props), {
7262
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_icons9.ChevronDownIcon, {})
7263
+ })
7035
7264
  );
7036
7265
  });
7037
- FormControl.displayName = "FormControl";
7038
- var FormDescription = React46.forwardRef((_a, ref) => {
7266
+ SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
7267
+ var SelectContent = React47.forwardRef((_a, ref) => {
7268
+ var _b = _a, { className, children, position = "popper" } = _b, props = __objRest(_b, ["className", "children", "position"]);
7269
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
7270
+ SelectPrimitive.Content,
7271
+ __spreadProps(__spreadValues({
7272
+ ref,
7273
+ className: cn(
7274
+ "relative z-50 max-h-96 min-w-32 overflow-hidden bg-popover border border-border text-popover-foreground rounded-md 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]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
7275
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
7276
+ className
7277
+ ),
7278
+ position
7279
+ }, props), {
7280
+ children: [
7281
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SelectScrollUpButton, {}),
7282
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7283
+ SelectPrimitive.Viewport,
7284
+ {
7285
+ className: cn(
7286
+ "p-1",
7287
+ position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"
7288
+ ),
7289
+ children
7290
+ }
7291
+ ),
7292
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SelectScrollDownButton, {})
7293
+ ]
7294
+ })
7295
+ ) });
7296
+ });
7297
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
7298
+ var SelectLabel = React47.forwardRef((_a, ref) => {
7039
7299
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7040
- const { formDescriptionId } = useFormField();
7041
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7042
- "p",
7300
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7301
+ SelectPrimitive.Label,
7043
7302
  __spreadValues({
7044
7303
  ref,
7045
- id: formDescriptionId,
7046
- className: cn("text-[0.8rem] text-muted-foreground", className)
7304
+ className: cn("px-2 py-1.5 text-sm font-semibold", className)
7047
7305
  }, props)
7048
7306
  );
7049
7307
  });
7050
- FormDescription.displayName = "FormDescription";
7051
- var FormMessage = React46.forwardRef((_a, ref) => {
7308
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
7309
+ var SelectItem = React47.forwardRef((_a, ref) => {
7052
7310
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
7053
- const { error, formMessageId } = useFormField();
7054
- const body = error ? getErrorMessage(error) : children;
7055
- if (!body) return null;
7056
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7057
- "p",
7311
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
7312
+ SelectPrimitive.Item,
7058
7313
  __spreadProps(__spreadValues({
7059
7314
  ref,
7060
- id: formMessageId,
7061
- className: cn("text-[0.8rem] font-medium text-destructive", className)
7315
+ className: cn(
7316
+ "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",
7317
+ className
7318
+ )
7062
7319
  }, props), {
7063
- children: body
7320
+ 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 })
7323
+ ]
7064
7324
  })
7065
7325
  );
7066
7326
  });
7067
- FormMessage.displayName = "FormMessage";
7068
- var getDefaultOptionValue = (item) => {
7069
- var _a;
7070
- if (typeof item === "string") return item;
7071
- if (item && typeof item === "object" && "value" in item) {
7072
- return String((_a = item.value) != null ? _a : "");
7073
- }
7074
- return String(item != null ? item : "");
7075
- };
7076
- var getDefaultOptionLabel = (item) => {
7077
- if (item && typeof item === "object" && "label" in item) {
7078
- return item.label;
7079
- }
7080
- return getDefaultOptionValue(item);
7081
- };
7327
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
7328
+ var SelectSeparator = React47.forwardRef((_a, ref) => {
7329
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7330
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7331
+ SelectPrimitive.Separator,
7332
+ __spreadValues({
7333
+ ref,
7334
+ className: cn("-mx-1 my-1 h-px bg-muted", className)
7335
+ }, props)
7336
+ );
7337
+ });
7338
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
7339
+
7340
+ // src/components/Form/form-select.tsx
7341
+ var import_jsx_runtime25 = require("react/jsx-runtime");
7082
7342
  var FormSelect = ({
7083
7343
  name,
7084
7344
  control,
7085
7345
  rules,
7086
7346
  shouldUnregister,
7087
7347
  defaultValue,
7088
- placeholder,
7348
+ placeholder = "Seleccionar opci\xF3n",
7089
7349
  label,
7090
7350
  requiredLabel,
7091
7351
  className,
7092
7352
  itemClassName,
7093
7353
  contentClassName,
7354
+ searchInputClassName,
7094
7355
  labelClassName,
7095
7356
  messageClassName,
7096
7357
  requiredLabelClassName,
@@ -7105,29 +7366,22 @@ var FormSelect = ({
7105
7366
  onChangeItem,
7106
7367
  disabled,
7107
7368
  size = "md",
7369
+ customSize,
7108
7370
  variant = "outline",
7109
7371
  invalid,
7110
7372
  searchable = false,
7111
7373
  searchPlaceholder = "Buscar\u2026",
7112
- emptyText = "No hay resultados"
7374
+ emptyText = "No hay resultados",
7375
+ position = "popper"
7113
7376
  }) => {
7114
- const form = (0, import_react_hook_form2.useFormContext)();
7377
+ const form = (0, import_react_hook_form5.useFormContext)();
7115
7378
  const controllerControl = control != null ? control : form == null ? void 0 : form.control;
7116
- const [query, setQuery] = React46.useState("");
7117
- const searchRef = React46.useRef(null);
7118
- 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";
7119
- const sizeTrigger = {
7120
- sm: "h-9 px-3 text-sm",
7121
- md: "h-10 px-3.5 text-sm",
7122
- lg: "h-11 px-4 text-base"
7123
- };
7124
- const contentBase = "rounded-md border border-border bg-popover text-popover-foreground shadow-md";
7125
- const itemSize = {
7126
- sm: "h-8 text-sm",
7127
- md: "h-9 text-sm",
7128
- lg: "h-10 text-base"
7129
- };
7130
- const normalizedOptions = React46.useMemo(() => {
7379
+ const sizeClasses = getFormSizeClasses(size, customSize);
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";
7381
+ const triggerSizeClass = variant === "flushed" ? sizeClasses.flushedControl : variant === "link" ? sizeClasses.linkControl : sizeClasses.control;
7382
+ const contentBase = "z-50 rounded-xl border border-border bg-popover text-popover-foreground shadow-xl outline-none";
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]";
7384
+ const normalizedOptions = React48.useMemo(() => {
7131
7385
  if (options) return options;
7132
7386
  return (items != null ? items : []).map((item) => {
7133
7387
  var _a;
@@ -7138,187 +7392,16 @@ var FormSelect = ({
7138
7392
  data: (_a = getOptionData == null ? void 0 : getOptionData(item)) != null ? _a : item
7139
7393
  };
7140
7394
  });
7141
- }, [
7142
- getOptionData,
7143
- getOptionDisabled,
7144
- getOptionLabel,
7145
- getOptionValue,
7146
- items,
7147
- options
7148
- ]);
7149
- const filteredOptions = React46.useMemo(() => {
7150
- if (!searchable || !query.trim()) return normalizedOptions;
7151
- const normalizedQuery = query.trim().toLowerCase();
7152
- return normalizedOptions.filter((option) => {
7153
- var _a;
7154
- const label2 = typeof option.label === "string" ? option.label : String((_a = option.value) != null ? _a : "");
7155
- return `${label2} ${option.value}`.toLowerCase().includes(normalizedQuery);
7156
- });
7157
- }, [normalizedOptions, query, searchable]);
7158
- const specialFlushed = variant === "flushed" ? size === "sm" ? "h-9 text-sm" : size === "lg" ? "h-11 text-base" : "h-10 text-sm" : "";
7159
- const specialLink = variant === "link" ? "text-sm" : "";
7160
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FormFieldContext.Provider, { value: { name }, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7161
- import_react_hook_form2.Controller,
7162
- {
7163
- control: controllerControl,
7164
- name,
7165
- rules,
7166
- shouldUnregister,
7167
- defaultValue,
7168
- render: ({ field, fieldState }) => {
7169
- var _a;
7170
- const fieldError = getErrorMessage(fieldState.error);
7171
- const hasOptions = filteredOptions.length > 0;
7172
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(FormItem, { children: [
7173
- label ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
7174
- FormLabel,
7175
- {
7176
- className: cn("flex items-center gap-0.5", labelClassName),
7177
- children: [
7178
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: label }),
7179
- requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7180
- import_lucide_react3.Asterisk,
7181
- {
7182
- "aria-hidden": "true",
7183
- className: cn(
7184
- "h-3 w-3 shrink-0 text-red-500",
7185
- requiredLabelClassName
7186
- )
7187
- }
7188
- ) : null
7189
- ]
7190
- }
7191
- ) : null,
7192
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
7193
- Select2,
7194
- {
7195
- value: (_a = field.value) != null ? _a : "",
7196
- onValueChange: (value) => {
7197
- var _a2;
7198
- const selectedOption = normalizedOptions.find(
7199
- (option) => option.value === value
7200
- );
7201
- field.onChange(value);
7202
- onChange == null ? void 0 : onChange(value);
7203
- onChangeItem == null ? void 0 : onChangeItem(
7204
- (_a2 = selectedOption == null ? void 0 : selectedOption.data) != null ? _a2 : null
7205
- );
7206
- },
7207
- disabled,
7208
- children: [
7209
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7210
- SelectTrigger,
7211
- {
7212
- className: cn(
7213
- triggerBase,
7214
- variants[variant],
7215
- variant === "flushed" ? specialFlushed : variant === "link" ? specialLink : sizeTrigger[size],
7216
- (invalid || fieldError) && "border-destructive ring-destructive focus:ring-destructive/40",
7217
- className
7218
- ),
7219
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SelectValue, { placeholder })
7220
- }
7221
- ) }),
7222
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
7223
- SelectContent,
7224
- {
7225
- className: cn(contentBase, contentClassName),
7226
- onCloseAutoFocus: (event) => {
7227
- if (!searchable) return;
7228
- event.preventDefault();
7229
- requestAnimationFrame(() => {
7230
- var _a2;
7231
- return (_a2 = searchRef.current) == null ? void 0 : _a2.focus();
7232
- });
7233
- },
7234
- children: [
7235
- searchable && normalizedOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "sticky top-0 z-10 border-b border-border bg-popover p-2", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7236
- "input",
7237
- {
7238
- ref: searchRef,
7239
- value: query,
7240
- onChange: (event) => setQuery(event.target.value),
7241
- placeholder: searchPlaceholder,
7242
- className: "w-full rounded-md border border-input bg-input px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/20",
7243
- onKeyDown: (event) => {
7244
- if (event.key !== "Escape") event.stopPropagation();
7245
- },
7246
- onPointerDown: (event) => event.stopPropagation(),
7247
- onClick: (event) => event.stopPropagation()
7248
- }
7249
- ) }) : null,
7250
- children && !searchable ? children : null,
7251
- !children || searchable ? hasOptions ? filteredOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7252
- SelectItem,
7253
- {
7254
- value: option.value,
7255
- disabled: option.disabled,
7256
- className: cn(itemSize[size], itemClassName),
7257
- children: option.label
7258
- },
7259
- option.value
7260
- )) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "px-3 py-2 text-sm text-muted-foreground", children: emptyText }) : null
7261
- ]
7262
- }
7263
- )
7264
- ]
7265
- }
7266
- ),
7267
- fieldError ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FormMessage, { className: messageClassName, children: fieldError }) : null
7268
- ] });
7269
- }
7270
- }
7271
- ) });
7272
- };
7273
- FormSelect.displayName = "FormSelect";
7274
-
7275
- // src/components/Form/form-checkbox.tsx
7276
- var import_jsx_runtime23 = require("react/jsx-runtime");
7277
- var FormCheckbox = (_a) => {
7278
- var _b = _a, {
7279
- name,
7280
- control,
7281
- rules,
7282
- shouldUnregister,
7283
- defaultValue,
7284
- label,
7285
- description,
7286
- requiredLabel,
7287
- className,
7288
- itemClassName,
7289
- checkboxClassName,
7290
- labelClassName,
7291
- descriptionClassName,
7292
- messageClassName,
7293
- requiredLabelClassName,
7294
- onChange
7295
- } = _b, checkboxProps = __objRest(_b, [
7296
- "name",
7297
- "control",
7298
- "rules",
7299
- "shouldUnregister",
7300
- "defaultValue",
7301
- "label",
7302
- "description",
7303
- "requiredLabel",
7304
- "className",
7305
- "itemClassName",
7306
- "checkboxClassName",
7307
- "labelClassName",
7308
- "descriptionClassName",
7309
- "messageClassName",
7310
- "requiredLabelClassName",
7311
- "onChange"
7395
+ }, [
7396
+ getOptionData,
7397
+ getOptionDisabled,
7398
+ getOptionLabel,
7399
+ getOptionValue,
7400
+ items,
7401
+ options
7312
7402
  ]);
7313
- var _a2;
7314
- const generatedId = React47.useId();
7315
- const form = (0, import_react_hook_form3.useFormContext)();
7316
- const controllerControl = control != null ? control : form == null ? void 0 : form.control;
7317
- const checkboxId = (_a2 = checkboxProps.id) != null ? _a2 : `${generatedId}-checkbox`;
7318
- const descriptionId = `${generatedId}-description`;
7319
- const messageId = `${generatedId}-message`;
7320
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7321
- import_react_hook_form3.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,
7322
7405
  {
7323
7406
  control: controllerControl,
7324
7407
  name,
@@ -7326,104 +7409,141 @@ var FormCheckbox = (_a) => {
7326
7409
  shouldUnregister,
7327
7410
  defaultValue,
7328
7411
  render: ({ field, fieldState }) => {
7329
- var _a3;
7330
- const checked = Boolean(field.value);
7331
- const fieldError = (_a3 = fieldState.error) == null ? void 0 : _a3.message;
7332
- const hasError = Boolean(fieldError);
7333
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FormItem, { className: cn("space-y-1.5", itemClassName), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
7334
- "div",
7335
- {
7336
- className: cn(
7337
- "flex items-start gap-3 rounded-lg border border-transparent p-1 transition-colors",
7338
- hasError && "border-destructive/20 bg-destructive/5",
7339
- className
7340
- ),
7341
- children: [
7342
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7343
- Checkbox,
7344
- __spreadProps(__spreadValues({}, checkboxProps), {
7345
- ref: field.ref,
7346
- id: checkboxId,
7347
- checked,
7348
- invalid: hasError || checkboxProps.invalid,
7349
- "aria-invalid": hasError || checkboxProps.invalid || void 0,
7350
- "aria-describedby": [description ? descriptionId : void 0, hasError ? messageId : void 0].filter(Boolean).join(" ") || void 0,
7351
- className: cn("mt-0.5", checkboxClassName),
7352
- onBlur: field.onBlur,
7353
- onCheckedChange: (value) => {
7354
- const nextValue = value === true;
7355
- field.onChange(nextValue);
7356
- onChange == null ? void 0 : onChange(nextValue);
7357
- }
7358
- })
7412
+ var _a;
7413
+ const fieldError = getErrorMessage(fieldState.error);
7414
+ const hasError = Boolean(invalid || fieldError);
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,
7427
+ {
7428
+ className: cn(
7429
+ "flex items-center gap-0.5",
7430
+ sizeClasses.label,
7431
+ labelClassName
7359
7432
  ),
7360
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "min-w-0 flex-1", children: [
7361
- label ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
7362
- Label3,
7433
+ children: [
7434
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: label }),
7435
+ requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7436
+ import_lucide_react5.Asterisk,
7363
7437
  {
7364
- htmlFor: checkboxId,
7438
+ "aria-hidden": "true",
7365
7439
  className: cn(
7366
- "inline-flex cursor-pointer items-start gap-1 text-sm font-medium leading-none text-foreground",
7367
- checkboxProps.disabled && "cursor-not-allowed text-muted-foreground",
7368
- hasError && "text-destructive",
7369
- labelClassName
7370
- ),
7371
- children: [
7372
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: label }),
7373
- requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7374
- import_lucide_react4.Asterisk,
7375
- {
7376
- "aria-hidden": "true",
7377
- className: cn(
7378
- "mt-0.5 h-3 w-3 shrink-0 text-red-500",
7379
- requiredLabelClassName
7380
- )
7381
- }
7382
- ) : null
7383
- ]
7440
+ "h-3 w-3 shrink-0 text-red-500",
7441
+ requiredLabelClassName
7442
+ )
7384
7443
  }
7385
- ) : null,
7386
- description ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7387
- "p",
7444
+ ) : null
7445
+ ]
7446
+ }
7447
+ ) : null,
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)(
7459
+ Select2,
7460
+ {
7461
+ value: (_a = field.value) != null ? _a : "",
7462
+ onValueChange: handleValueChange,
7463
+ onOpenChange: (nextOpen) => {
7464
+ if (!nextOpen) {
7465
+ field.onBlur();
7466
+ }
7467
+ },
7468
+ disabled,
7469
+ children: [
7470
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7471
+ SelectTrigger,
7388
7472
  {
7389
- id: descriptionId,
7390
7473
  className: cn(
7391
- "mt-1 text-sm leading-relaxed text-muted-foreground",
7392
- descriptionClassName
7474
+ triggerBase,
7475
+ variants[variant],
7476
+ triggerSizeClass,
7477
+ hasError && "border-destructive ring-destructive focus:ring-destructive/40",
7478
+ className
7393
7479
  ),
7394
- children: description
7480
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SelectValue, { placeholder })
7395
7481
  }
7396
- ) : null,
7397
- fieldError ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
7398
- "p",
7482
+ ) }),
7483
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7484
+ SelectContent,
7399
7485
  {
7400
- id: messageId,
7486
+ position,
7487
+ sideOffset: 6,
7401
7488
  className: cn(
7402
- "mt-1 text-sm font-medium text-destructive",
7403
- messageClassName
7489
+ contentBase,
7490
+ contentViewport,
7491
+ "w-(--radix-select-trigger-width) min-w-(--radix-select-trigger-width) overflow-hidden!",
7492
+ contentClassName
7404
7493
  ),
7405
- children: fieldError
7494
+ onWheelCapture: (event) => {
7495
+ event.stopPropagation();
7496
+ },
7497
+ onTouchMoveCapture: (event) => {
7498
+ event.stopPropagation();
7499
+ },
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
+ )
7406
7519
  }
7407
- ) : null
7408
- ] })
7409
- ]
7410
- }
7411
- ) });
7520
+ )
7521
+ ]
7522
+ }
7523
+ ),
7524
+ fieldError ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7525
+ FormMessage,
7526
+ {
7527
+ className: cn(sizeClasses.message, messageClassName),
7528
+ children: fieldError
7529
+ }
7530
+ ) : null
7531
+ ] });
7412
7532
  }
7413
7533
  }
7414
- );
7534
+ ) });
7415
7535
  };
7416
- FormCheckbox.displayName = "FormCheckbox";
7536
+ FormSelect.displayName = "FormSelect";
7417
7537
 
7418
7538
  // src/components/hover-card.tsx
7419
7539
  var HoverCardPrimitive = __toESM(require("@radix-ui/react-hover-card"), 1);
7420
- var React48 = __toESM(require("react"), 1);
7421
- var import_jsx_runtime24 = require("react/jsx-runtime");
7540
+ var React49 = __toESM(require("react"), 1);
7541
+ var import_jsx_runtime26 = require("react/jsx-runtime");
7422
7542
  var HoverCard = HoverCardPrimitive.Root;
7423
7543
  var HoverCardTrigger = HoverCardPrimitive.Trigger;
7424
- var HoverCardContent = React48.forwardRef((_a, ref) => {
7544
+ var HoverCardContent = React49.forwardRef((_a, ref) => {
7425
7545
  var _b = _a, { className, align = "center", sideOffset = 4 } = _b, props = __objRest(_b, ["className", "align", "sideOffset"]);
7426
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
7546
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7427
7547
  HoverCardPrimitive.Content,
7428
7548
  __spreadValues({
7429
7549
  ref,
@@ -7439,46 +7559,46 @@ var HoverCardContent = React48.forwardRef((_a, ref) => {
7439
7559
  HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
7440
7560
 
7441
7561
  // src/components/icons.tsx
7442
- var import_lucide_react5 = require("lucide-react");
7562
+ var import_lucide_react6 = require("lucide-react");
7443
7563
  var IconsApp = {
7444
- dashboard: import_lucide_react5.LayoutDashboardIcon,
7445
- logo: import_lucide_react5.Command,
7446
- login: import_lucide_react5.LogIn,
7447
- close: import_lucide_react5.X,
7448
- profile: import_lucide_react5.User2Icon,
7449
- spinner: import_lucide_react5.Loader2,
7450
- kanban: import_lucide_react5.CircuitBoardIcon,
7451
- chevronLeft: import_lucide_react5.ChevronLeft,
7452
- chevronRight: import_lucide_react5.ChevronRight,
7453
- trash: import_lucide_react5.Trash,
7454
- employee: import_lucide_react5.UserX2Icon,
7455
- post: import_lucide_react5.FileText,
7456
- page: import_lucide_react5.File,
7457
- media: import_lucide_react5.Image,
7458
- settings: import_lucide_react5.Settings,
7459
- billing: import_lucide_react5.CreditCard,
7460
- ellipsis: import_lucide_react5.MoreVertical,
7461
- add: import_lucide_react5.Plus,
7462
- warning: import_lucide_react5.AlertTriangle,
7463
- user: import_lucide_react5.User,
7464
- arrowRight: import_lucide_react5.ArrowRight,
7465
- help: import_lucide_react5.HelpCircle,
7466
- pizza: import_lucide_react5.Pizza,
7467
- sun: import_lucide_react5.SunMedium,
7468
- moon: import_lucide_react5.Moon,
7469
- laptop: import_lucide_react5.Laptop,
7470
- check: import_lucide_react5.Check
7564
+ dashboard: import_lucide_react6.LayoutDashboardIcon,
7565
+ logo: import_lucide_react6.Command,
7566
+ login: import_lucide_react6.LogIn,
7567
+ close: import_lucide_react6.X,
7568
+ profile: import_lucide_react6.User2Icon,
7569
+ spinner: import_lucide_react6.Loader2,
7570
+ kanban: import_lucide_react6.CircuitBoardIcon,
7571
+ chevronLeft: import_lucide_react6.ChevronLeft,
7572
+ chevronRight: import_lucide_react6.ChevronRight,
7573
+ trash: import_lucide_react6.Trash,
7574
+ employee: import_lucide_react6.UserX2Icon,
7575
+ post: import_lucide_react6.FileText,
7576
+ page: import_lucide_react6.File,
7577
+ media: import_lucide_react6.Image,
7578
+ settings: import_lucide_react6.Settings,
7579
+ billing: import_lucide_react6.CreditCard,
7580
+ ellipsis: import_lucide_react6.MoreVertical,
7581
+ add: import_lucide_react6.Plus,
7582
+ warning: import_lucide_react6.AlertTriangle,
7583
+ user: import_lucide_react6.User,
7584
+ arrowRight: import_lucide_react6.ArrowRight,
7585
+ help: import_lucide_react6.HelpCircle,
7586
+ pizza: import_lucide_react6.Pizza,
7587
+ sun: import_lucide_react6.SunMedium,
7588
+ moon: import_lucide_react6.Moon,
7589
+ laptop: import_lucide_react6.Laptop,
7590
+ check: import_lucide_react6.Check
7471
7591
  };
7472
7592
  var Icons = IconsApp;
7473
7593
 
7474
7594
  // src/components/input-otp.tsx
7475
7595
  var import_react_icons10 = require("@radix-ui/react-icons");
7476
7596
  var import_input_otp = require("input-otp");
7477
- var React49 = __toESM(require("react"), 1);
7478
- var import_jsx_runtime25 = require("react/jsx-runtime");
7479
- var InputOTP = React49.forwardRef((_a, ref) => {
7597
+ var React50 = __toESM(require("react"), 1);
7598
+ var import_jsx_runtime27 = require("react/jsx-runtime");
7599
+ var InputOTP = React50.forwardRef((_a, ref) => {
7480
7600
  var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
7481
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7601
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7482
7602
  import_input_otp.OTPInput,
7483
7603
  __spreadValues({
7484
7604
  ref,
@@ -7491,16 +7611,16 @@ var InputOTP = React49.forwardRef((_a, ref) => {
7491
7611
  );
7492
7612
  });
7493
7613
  InputOTP.displayName = "InputOTP";
7494
- var InputOTPGroup = React49.forwardRef((_a, ref) => {
7614
+ var InputOTPGroup = React50.forwardRef((_a, ref) => {
7495
7615
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7496
- return /* @__PURE__ */ (0, import_jsx_runtime25.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));
7497
7617
  });
7498
7618
  InputOTPGroup.displayName = "InputOTPGroup";
7499
- var InputOTPSlot = React49.forwardRef((_a, ref) => {
7619
+ var InputOTPSlot = React50.forwardRef((_a, ref) => {
7500
7620
  var _b = _a, { index, className } = _b, props = __objRest(_b, ["index", "className"]);
7501
- const inputOTPContext = React49.useContext(import_input_otp.OTPInputContext);
7621
+ const inputOTPContext = React50.useContext(import_input_otp.OTPInputContext);
7502
7622
  const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
7503
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
7623
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7504
7624
  "div",
7505
7625
  __spreadProps(__spreadValues({
7506
7626
  ref,
@@ -7513,31 +7633,31 @@ var InputOTPSlot = React49.forwardRef((_a, ref) => {
7513
7633
  }, props), {
7514
7634
  children: [
7515
7635
  char,
7516
- hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime25.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" }) })
7517
7637
  ]
7518
7638
  })
7519
7639
  );
7520
7640
  });
7521
7641
  InputOTPSlot.displayName = "InputOTPSlot";
7522
- var InputOTPSeparator = React49.forwardRef((_a, ref) => {
7642
+ var InputOTPSeparator = React50.forwardRef((_a, ref) => {
7523
7643
  var props = __objRest(_a, []);
7524
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", __spreadProps(__spreadValues({ ref, role: "separator" }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime25.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, {}) }));
7525
7645
  });
7526
7646
  InputOTPSeparator.displayName = "InputOTPSeparator";
7527
7647
 
7528
7648
  // src/components/menubar.tsx
7529
7649
  var import_react_icons11 = require("@radix-ui/react-icons");
7530
7650
  var MenubarPrimitive = __toESM(require("@radix-ui/react-menubar"), 1);
7531
- var React50 = __toESM(require("react"), 1);
7532
- var import_jsx_runtime26 = require("react/jsx-runtime");
7651
+ var React51 = __toESM(require("react"), 1);
7652
+ var import_jsx_runtime28 = require("react/jsx-runtime");
7533
7653
  var MenubarMenu = MenubarPrimitive.Menu;
7534
7654
  var MenubarGroup = MenubarPrimitive.Group;
7535
7655
  var MenubarPortal = MenubarPrimitive.Portal;
7536
7656
  var MenubarSub = MenubarPrimitive.Sub;
7537
7657
  var MenubarRadioGroup = MenubarPrimitive.RadioGroup;
7538
- var Menubar = React50.forwardRef((_a, ref) => {
7658
+ var Menubar = React51.forwardRef((_a, ref) => {
7539
7659
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7540
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7660
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7541
7661
  MenubarPrimitive.Root,
7542
7662
  __spreadValues({
7543
7663
  ref,
@@ -7549,9 +7669,9 @@ var Menubar = React50.forwardRef((_a, ref) => {
7549
7669
  );
7550
7670
  });
7551
7671
  Menubar.displayName = MenubarPrimitive.Root.displayName;
7552
- var MenubarTrigger = React50.forwardRef((_a, ref) => {
7672
+ var MenubarTrigger = React51.forwardRef((_a, ref) => {
7553
7673
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7554
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7674
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7555
7675
  MenubarPrimitive.Trigger,
7556
7676
  __spreadValues({
7557
7677
  ref,
@@ -7563,9 +7683,9 @@ var MenubarTrigger = React50.forwardRef((_a, ref) => {
7563
7683
  );
7564
7684
  });
7565
7685
  MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
7566
- var MenubarSubTrigger = React50.forwardRef((_a, ref) => {
7686
+ var MenubarSubTrigger = React51.forwardRef((_a, ref) => {
7567
7687
  var _b = _a, { className, inset, children } = _b, props = __objRest(_b, ["className", "inset", "children"]);
7568
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
7688
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
7569
7689
  MenubarPrimitive.SubTrigger,
7570
7690
  __spreadProps(__spreadValues({
7571
7691
  ref,
@@ -7577,15 +7697,15 @@ var MenubarSubTrigger = React50.forwardRef((_a, ref) => {
7577
7697
  }, props), {
7578
7698
  children: [
7579
7699
  children,
7580
- /* @__PURE__ */ (0, import_jsx_runtime26.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" })
7581
7701
  ]
7582
7702
  })
7583
7703
  );
7584
7704
  });
7585
7705
  MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
7586
- var MenubarSubContent = React50.forwardRef((_a, ref) => {
7706
+ var MenubarSubContent = React51.forwardRef((_a, ref) => {
7587
7707
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7588
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7708
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7589
7709
  MenubarPrimitive.SubContent,
7590
7710
  __spreadValues({
7591
7711
  ref,
@@ -7597,10 +7717,10 @@ var MenubarSubContent = React50.forwardRef((_a, ref) => {
7597
7717
  );
7598
7718
  });
7599
7719
  MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
7600
- var MenubarContent = React50.forwardRef(
7720
+ var MenubarContent = React51.forwardRef(
7601
7721
  (_a, ref) => {
7602
7722
  var _b = _a, { className, align = "start", alignOffset = -4, sideOffset = 8 } = _b, props = __objRest(_b, ["className", "align", "alignOffset", "sideOffset"]);
7603
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MenubarPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7723
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MenubarPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7604
7724
  MenubarPrimitive.Content,
7605
7725
  __spreadValues({
7606
7726
  ref,
@@ -7616,9 +7736,9 @@ var MenubarContent = React50.forwardRef(
7616
7736
  }
7617
7737
  );
7618
7738
  MenubarContent.displayName = MenubarPrimitive.Content.displayName;
7619
- var MenubarItem = React50.forwardRef((_a, ref) => {
7739
+ var MenubarItem = React51.forwardRef((_a, ref) => {
7620
7740
  var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
7621
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7741
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7622
7742
  MenubarPrimitive.Item,
7623
7743
  __spreadValues({
7624
7744
  ref,
@@ -7631,9 +7751,9 @@ var MenubarItem = React50.forwardRef((_a, ref) => {
7631
7751
  );
7632
7752
  });
7633
7753
  MenubarItem.displayName = MenubarPrimitive.Item.displayName;
7634
- var MenubarCheckboxItem = React50.forwardRef((_a, ref) => {
7754
+ var MenubarCheckboxItem = React51.forwardRef((_a, ref) => {
7635
7755
  var _b = _a, { className, children, checked } = _b, props = __objRest(_b, ["className", "children", "checked"]);
7636
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
7756
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
7637
7757
  MenubarPrimitive.CheckboxItem,
7638
7758
  __spreadProps(__spreadValues({
7639
7759
  ref,
@@ -7644,16 +7764,16 @@ var MenubarCheckboxItem = React50.forwardRef((_a, ref) => {
7644
7764
  checked
7645
7765
  }, props), {
7646
7766
  children: [
7647
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime26.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" }) }) }),
7648
7768
  children
7649
7769
  ]
7650
7770
  })
7651
7771
  );
7652
7772
  });
7653
7773
  MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
7654
- var MenubarRadioItem = React50.forwardRef((_a, ref) => {
7774
+ var MenubarRadioItem = React51.forwardRef((_a, ref) => {
7655
7775
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
7656
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
7776
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
7657
7777
  MenubarPrimitive.RadioItem,
7658
7778
  __spreadProps(__spreadValues({
7659
7779
  ref,
@@ -7663,16 +7783,16 @@ var MenubarRadioItem = React50.forwardRef((_a, ref) => {
7663
7783
  )
7664
7784
  }, props), {
7665
7785
  children: [
7666
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime26.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" }) }) }),
7667
7787
  children
7668
7788
  ]
7669
7789
  })
7670
7790
  );
7671
7791
  });
7672
7792
  MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
7673
- var MenubarLabel = React50.forwardRef((_a, ref) => {
7793
+ var MenubarLabel = React51.forwardRef((_a, ref) => {
7674
7794
  var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
7675
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7795
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7676
7796
  MenubarPrimitive.Label,
7677
7797
  __spreadValues({
7678
7798
  ref,
@@ -7685,9 +7805,9 @@ var MenubarLabel = React50.forwardRef((_a, ref) => {
7685
7805
  );
7686
7806
  });
7687
7807
  MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
7688
- var MenubarSeparator = React50.forwardRef((_a, ref) => {
7808
+ var MenubarSeparator = React51.forwardRef((_a, ref) => {
7689
7809
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7690
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7810
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7691
7811
  MenubarPrimitive.Separator,
7692
7812
  __spreadValues({
7693
7813
  ref,
@@ -7702,7 +7822,7 @@ var MenubarShortcut = (_a) => {
7702
7822
  } = _b, props = __objRest(_b, [
7703
7823
  "className"
7704
7824
  ]);
7705
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7825
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7706
7826
  "span",
7707
7827
  __spreadValues({
7708
7828
  className: cn(
@@ -7715,7 +7835,7 @@ var MenubarShortcut = (_a) => {
7715
7835
  MenubarShortcut.displayname = "MenubarShortcut";
7716
7836
 
7717
7837
  // src/components/modal.tsx
7718
- var import_jsx_runtime27 = require("react/jsx-runtime");
7838
+ var import_jsx_runtime29 = require("react/jsx-runtime");
7719
7839
  var Modal = ({
7720
7840
  title,
7721
7841
  description,
@@ -7729,12 +7849,12 @@ var Modal = ({
7729
7849
  onClose();
7730
7850
  }
7731
7851
  };
7732
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Dialog, { open: isOpen, onOpenChange: onChange, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(DialogContent, { className, children: [
7733
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(DialogHeader, { children: [
7734
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DialogTitle, { children: title }),
7735
- /* @__PURE__ */ (0, import_jsx_runtime27.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 })
7736
7856
  ] }),
7737
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children })
7857
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { children })
7738
7858
  ] }) });
7739
7859
  };
7740
7860
 
@@ -7742,11 +7862,11 @@ var Modal = ({
7742
7862
  var import_react_icons12 = require("@radix-ui/react-icons");
7743
7863
  var NavigationMenuPrimitive = __toESM(require("@radix-ui/react-navigation-menu"), 1);
7744
7864
  var import_class_variance_authority6 = require("class-variance-authority");
7745
- var React51 = __toESM(require("react"), 1);
7746
- var import_jsx_runtime28 = require("react/jsx-runtime");
7747
- var NavigationMenu = React51.forwardRef((_a, ref) => {
7865
+ var React52 = __toESM(require("react"), 1);
7866
+ var import_jsx_runtime30 = require("react/jsx-runtime");
7867
+ var NavigationMenu = React52.forwardRef((_a, ref) => {
7748
7868
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
7749
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
7869
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
7750
7870
  NavigationMenuPrimitive.Root,
7751
7871
  __spreadProps(__spreadValues({
7752
7872
  ref,
@@ -7757,15 +7877,15 @@ var NavigationMenu = React51.forwardRef((_a, ref) => {
7757
7877
  }, props), {
7758
7878
  children: [
7759
7879
  children,
7760
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(NavigationMenuViewport, {})
7880
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(NavigationMenuViewport, {})
7761
7881
  ]
7762
7882
  })
7763
7883
  );
7764
7884
  });
7765
7885
  NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
7766
- var NavigationMenuList = React51.forwardRef((_a, ref) => {
7886
+ var NavigationMenuList = React52.forwardRef((_a, ref) => {
7767
7887
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7768
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7888
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7769
7889
  NavigationMenuPrimitive.List,
7770
7890
  __spreadValues({
7771
7891
  ref,
@@ -7781,9 +7901,9 @@ var NavigationMenuItem = NavigationMenuPrimitive.Item;
7781
7901
  var navigationMenuTriggerStyle = (0, import_class_variance_authority6.cva)(
7782
7902
  "group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"
7783
7903
  );
7784
- var NavigationMenuTrigger = React51.forwardRef((_a, ref) => {
7904
+ var NavigationMenuTrigger = React52.forwardRef((_a, ref) => {
7785
7905
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
7786
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
7906
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
7787
7907
  NavigationMenuPrimitive.Trigger,
7788
7908
  __spreadProps(__spreadValues({
7789
7909
  ref,
@@ -7792,7 +7912,7 @@ var NavigationMenuTrigger = React51.forwardRef((_a, ref) => {
7792
7912
  children: [
7793
7913
  children,
7794
7914
  " ",
7795
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7915
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7796
7916
  import_react_icons12.ChevronDownIcon,
7797
7917
  {
7798
7918
  className: "relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180",
@@ -7804,9 +7924,9 @@ var NavigationMenuTrigger = React51.forwardRef((_a, ref) => {
7804
7924
  );
7805
7925
  });
7806
7926
  NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
7807
- var NavigationMenuContent = React51.forwardRef((_a, ref) => {
7927
+ var NavigationMenuContent = React52.forwardRef((_a, ref) => {
7808
7928
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7809
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7929
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7810
7930
  NavigationMenuPrimitive.Content,
7811
7931
  __spreadValues({
7812
7932
  ref,
@@ -7819,9 +7939,9 @@ var NavigationMenuContent = React51.forwardRef((_a, ref) => {
7819
7939
  });
7820
7940
  NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
7821
7941
  var NavigationMenuLink = NavigationMenuPrimitive.Link;
7822
- var NavigationMenuViewport = React51.forwardRef((_a, ref) => {
7942
+ var NavigationMenuViewport = React52.forwardRef((_a, ref) => {
7823
7943
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7824
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ (0, import_jsx_runtime28.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)(
7825
7945
  NavigationMenuPrimitive.Viewport,
7826
7946
  __spreadValues({
7827
7947
  className: cn(
@@ -7833,9 +7953,9 @@ var NavigationMenuViewport = React51.forwardRef((_a, ref) => {
7833
7953
  ) });
7834
7954
  });
7835
7955
  NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
7836
- var NavigationMenuIndicator = React51.forwardRef((_a, ref) => {
7956
+ var NavigationMenuIndicator = React52.forwardRef((_a, ref) => {
7837
7957
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7838
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7958
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7839
7959
  NavigationMenuPrimitive.Indicator,
7840
7960
  __spreadProps(__spreadValues({
7841
7961
  ref,
@@ -7844,7 +7964,7 @@ var NavigationMenuIndicator = React51.forwardRef((_a, ref) => {
7844
7964
  className
7845
7965
  )
7846
7966
  }, props), {
7847
- children: /* @__PURE__ */ (0, import_jsx_runtime28.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" })
7848
7968
  })
7849
7969
  );
7850
7970
  });
@@ -7852,12 +7972,12 @@ NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayN
7852
7972
 
7853
7973
  // src/components/pagination.tsx
7854
7974
  var import_react_icons13 = require("@radix-ui/react-icons");
7855
- var React52 = __toESM(require("react"), 1);
7856
- var import_lucide_react6 = require("lucide-react");
7857
- var import_jsx_runtime29 = require("react/jsx-runtime");
7975
+ var React53 = __toESM(require("react"), 1);
7976
+ var import_lucide_react7 = require("lucide-react");
7977
+ var import_jsx_runtime31 = require("react/jsx-runtime");
7858
7978
  var Pagination = (_a) => {
7859
7979
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7860
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7980
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
7861
7981
  "nav",
7862
7982
  __spreadValues({
7863
7983
  role: "navigation",
@@ -7867,9 +7987,9 @@ var Pagination = (_a) => {
7867
7987
  );
7868
7988
  };
7869
7989
  Pagination.displayName = "Pagination";
7870
- var PaginationContent = React52.forwardRef((_a, ref) => {
7990
+ var PaginationContent = React53.forwardRef((_a, ref) => {
7871
7991
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7872
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7992
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
7873
7993
  "ul",
7874
7994
  __spreadValues({
7875
7995
  ref,
@@ -7878,9 +7998,9 @@ var PaginationContent = React52.forwardRef((_a, ref) => {
7878
7998
  );
7879
7999
  });
7880
8000
  PaginationContent.displayName = "PaginationContent";
7881
- var PaginationItem = React52.forwardRef((_a, ref) => {
8001
+ var PaginationItem = React53.forwardRef((_a, ref) => {
7882
8002
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
7883
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("li", __spreadValues({ ref, className: cn("", className) }, props));
8003
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("li", __spreadValues({ ref, className: cn("", className) }, props));
7884
8004
  });
7885
8005
  PaginationItem.displayName = "PaginationItem";
7886
8006
  var PaginationLink = (_a) => {
@@ -7893,7 +8013,7 @@ var PaginationLink = (_a) => {
7893
8013
  "isActive",
7894
8014
  "size"
7895
8015
  ]);
7896
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
8016
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
7897
8017
  "a",
7898
8018
  __spreadValues({
7899
8019
  "aria-current": isActive ? "page" : void 0,
@@ -7914,7 +8034,7 @@ var PaginationPreviousLast = (_a) => {
7914
8034
  } = _b, props = __objRest(_b, [
7915
8035
  "className"
7916
8036
  ]);
7917
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
8037
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
7918
8038
  PaginationLink,
7919
8039
  __spreadProps(__spreadValues({
7920
8040
  "aria-label": "Go to previous page",
@@ -7922,8 +8042,8 @@ var PaginationPreviousLast = (_a) => {
7922
8042
  className: cn("gap-1 pl-2.5", className)
7923
8043
  }, props), {
7924
8044
  children: [
7925
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react6.ChevronLeft, { className: "h-4 w-4" }),
7926
- /* @__PURE__ */ (0, import_jsx_runtime29.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" })
7927
8047
  ]
7928
8048
  })
7929
8049
  );
@@ -7935,7 +8055,7 @@ var PaginationPrevious = (_a) => {
7935
8055
  } = _b, props = __objRest(_b, [
7936
8056
  "className"
7937
8057
  ]);
7938
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
8058
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
7939
8059
  PaginationLink,
7940
8060
  __spreadProps(__spreadValues({
7941
8061
  "aria-label": "Go to previous page",
@@ -7943,8 +8063,8 @@ var PaginationPrevious = (_a) => {
7943
8063
  className: cn("gap-1 pl-2.5", className)
7944
8064
  }, props), {
7945
8065
  children: [
7946
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_icons13.ChevronLeftIcon, { className: "h-4 w-4" }),
7947
- /* @__PURE__ */ (0, import_jsx_runtime29.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" })
7948
8068
  ]
7949
8069
  })
7950
8070
  );
@@ -7956,7 +8076,7 @@ var PaginationNext = (_a) => {
7956
8076
  } = _b, props = __objRest(_b, [
7957
8077
  "className"
7958
8078
  ]);
7959
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
8079
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
7960
8080
  PaginationLink,
7961
8081
  __spreadProps(__spreadValues({
7962
8082
  "aria-label": "Go to next page",
@@ -7964,8 +8084,8 @@ var PaginationNext = (_a) => {
7964
8084
  className: cn("gap-1 pr-2.5", className)
7965
8085
  }, props), {
7966
8086
  children: [
7967
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: "Next" }),
7968
- /* @__PURE__ */ (0, import_jsx_runtime29.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" })
7969
8089
  ]
7970
8090
  })
7971
8091
  );
@@ -7977,7 +8097,7 @@ var PaginationNextLast = (_a) => {
7977
8097
  } = _b, props = __objRest(_b, [
7978
8098
  "className"
7979
8099
  ]);
7980
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
8100
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
7981
8101
  PaginationLink,
7982
8102
  __spreadProps(__spreadValues({
7983
8103
  "aria-label": "Go to next page",
@@ -7985,8 +8105,8 @@ var PaginationNextLast = (_a) => {
7985
8105
  className: cn("gap-1 pr-2.5", className)
7986
8106
  }, props), {
7987
8107
  children: [
7988
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "sr-only", children: "Next Last" }),
7989
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react6.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" })
7990
8110
  ]
7991
8111
  })
7992
8112
  );
@@ -7998,15 +8118,15 @@ var PaginationEllipsis = (_a) => {
7998
8118
  } = _b, props = __objRest(_b, [
7999
8119
  "className"
8000
8120
  ]);
8001
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
8121
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
8002
8122
  "span",
8003
8123
  __spreadProps(__spreadValues({
8004
8124
  "aria-hidden": true,
8005
8125
  className: cn("flex h-9 w-9 items-center justify-center", className)
8006
8126
  }, props), {
8007
8127
  children: [
8008
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_icons13.DotsHorizontalIcon, { className: "h-4 w-4" }),
8009
- /* @__PURE__ */ (0, import_jsx_runtime29.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" })
8010
8130
  ]
8011
8131
  })
8012
8132
  );
@@ -8015,14 +8135,14 @@ PaginationEllipsis.displayName = "PaginationEllipsis";
8015
8135
 
8016
8136
  // src/components/popover.tsx
8017
8137
  var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
8018
- var React53 = __toESM(require("react"), 1);
8019
- var import_jsx_runtime30 = require("react/jsx-runtime");
8138
+ var React54 = __toESM(require("react"), 1);
8139
+ var import_jsx_runtime32 = require("react/jsx-runtime");
8020
8140
  var Popover = PopoverPrimitive.Root;
8021
8141
  var PopoverTrigger = PopoverPrimitive.Trigger;
8022
8142
  var PopoverAnchor = PopoverPrimitive.Anchor;
8023
- var PopoverContent = React53.forwardRef((_a, ref) => {
8143
+ var PopoverContent = React54.forwardRef((_a, ref) => {
8024
8144
  var _b = _a, { className, align = "center", sideOffset = 4 } = _b, props = __objRest(_b, ["className", "align", "sideOffset"]);
8025
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8145
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
8026
8146
  PopoverPrimitive.Content,
8027
8147
  __spreadValues({
8028
8148
  ref,
@@ -8039,11 +8159,11 @@ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
8039
8159
 
8040
8160
  // src/components/progress.tsx
8041
8161
  var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
8042
- var React54 = __toESM(require("react"), 1);
8043
- var import_jsx_runtime31 = require("react/jsx-runtime");
8044
- var Progress = React54.forwardRef((_a, ref) => {
8162
+ var React55 = __toESM(require("react"), 1);
8163
+ var import_jsx_runtime33 = require("react/jsx-runtime");
8164
+ var Progress = React55.forwardRef((_a, ref) => {
8045
8165
  var _b = _a, { className, value } = _b, props = __objRest(_b, ["className", "value"]);
8046
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
8166
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
8047
8167
  ProgressPrimitive.Root,
8048
8168
  __spreadProps(__spreadValues({
8049
8169
  ref,
@@ -8052,7 +8172,7 @@ var Progress = React54.forwardRef((_a, ref) => {
8052
8172
  className
8053
8173
  )
8054
8174
  }, props), {
8055
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
8175
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
8056
8176
  ProgressPrimitive.Indicator,
8057
8177
  {
8058
8178
  className: "h-full w-full flex-1 bg-primary transition-all",
@@ -8067,11 +8187,11 @@ Progress.displayName = ProgressPrimitive.Root.displayName;
8067
8187
  // src/components/radio-group.tsx
8068
8188
  var import_react_icons14 = require("@radix-ui/react-icons");
8069
8189
  var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
8070
- var React55 = __toESM(require("react"), 1);
8071
- var import_jsx_runtime32 = require("react/jsx-runtime");
8072
- var RadioGroup4 = React55.forwardRef((_a, ref) => {
8190
+ var React56 = __toESM(require("react"), 1);
8191
+ var import_jsx_runtime34 = require("react/jsx-runtime");
8192
+ var RadioGroup4 = React56.forwardRef((_a, ref) => {
8073
8193
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8074
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
8194
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
8075
8195
  RadioGroupPrimitive.Root,
8076
8196
  __spreadProps(__spreadValues({
8077
8197
  className: cn("grid gap-2", className)
@@ -8081,9 +8201,9 @@ var RadioGroup4 = React55.forwardRef((_a, ref) => {
8081
8201
  );
8082
8202
  });
8083
8203
  RadioGroup4.displayName = RadioGroupPrimitive.Root.displayName;
8084
- var RadioGroupItem = React55.forwardRef((_a, ref) => {
8204
+ var RadioGroupItem = React56.forwardRef((_a, ref) => {
8085
8205
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8086
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
8206
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
8087
8207
  RadioGroupPrimitive.Item,
8088
8208
  __spreadProps(__spreadValues({
8089
8209
  ref,
@@ -8092,7 +8212,7 @@ var RadioGroupItem = React55.forwardRef((_a, ref) => {
8092
8212
  className
8093
8213
  )
8094
8214
  }, props), {
8095
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime32.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" }) })
8096
8216
  })
8097
8217
  );
8098
8218
  });
@@ -8101,14 +8221,14 @@ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
8101
8221
  // src/components/resizable.tsx
8102
8222
  var import_react_icons15 = require("@radix-ui/react-icons");
8103
8223
  var ResizablePrimitive = __toESM(require("react-resizable-panels"), 1);
8104
- var import_jsx_runtime33 = require("react/jsx-runtime");
8224
+ var import_jsx_runtime35 = require("react/jsx-runtime");
8105
8225
  var ResizablePanelGroup = (_a) => {
8106
8226
  var _b = _a, {
8107
8227
  className
8108
8228
  } = _b, props = __objRest(_b, [
8109
8229
  "className"
8110
8230
  ]);
8111
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
8231
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
8112
8232
  ResizablePrimitive.Group,
8113
8233
  __spreadValues({
8114
8234
  className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className)
@@ -8124,7 +8244,7 @@ var ResizableHandle = (_a) => {
8124
8244
  "withHandle",
8125
8245
  "className"
8126
8246
  ]);
8127
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
8247
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
8128
8248
  ResizablePrimitive.Separator,
8129
8249
  __spreadProps(__spreadValues({
8130
8250
  className: cn(
@@ -8132,35 +8252,35 @@ var ResizableHandle = (_a) => {
8132
8252
  className
8133
8253
  )
8134
8254
  }, props), {
8135
- children: withHandle && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ (0, import_jsx_runtime33.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" }) })
8136
8256
  })
8137
8257
  );
8138
8258
  };
8139
8259
 
8140
8260
  // src/components/scroll-area.tsx
8141
8261
  var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
8142
- var React56 = __toESM(require("react"), 1);
8143
- var import_jsx_runtime34 = require("react/jsx-runtime");
8144
- var ScrollArea = React56.forwardRef((_a, ref) => {
8262
+ var React57 = __toESM(require("react"), 1);
8263
+ var import_jsx_runtime36 = require("react/jsx-runtime");
8264
+ var ScrollArea = React57.forwardRef((_a, ref) => {
8145
8265
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
8146
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
8266
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
8147
8267
  ScrollAreaPrimitive.Root,
8148
8268
  __spreadProps(__spreadValues({
8149
8269
  ref,
8150
8270
  className: cn("relative overflow-hidden", className)
8151
8271
  }, props), {
8152
8272
  children: [
8153
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
8154
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ScrollBar, {}),
8155
- /* @__PURE__ */ (0, import_jsx_runtime34.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, {})
8156
8276
  ]
8157
8277
  })
8158
8278
  );
8159
8279
  });
8160
8280
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
8161
- var ScrollBar = React56.forwardRef((_a, ref) => {
8281
+ var ScrollBar = React57.forwardRef((_a, ref) => {
8162
8282
  var _b = _a, { className, orientation = "vertical" } = _b, props = __objRest(_b, ["className", "orientation"]);
8163
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
8283
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
8164
8284
  ScrollAreaPrimitive.ScrollAreaScrollbar,
8165
8285
  __spreadProps(__spreadValues({
8166
8286
  ref,
@@ -8172,208 +8292,465 @@ var ScrollBar = React56.forwardRef((_a, ref) => {
8172
8292
  className
8173
8293
  )
8174
8294
  }, props), {
8175
- children: /* @__PURE__ */ (0, import_jsx_runtime34.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" })
8176
8296
  })
8177
8297
  );
8178
8298
  });
8179
8299
  ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
8180
8300
 
8181
8301
  // src/components/search-input.tsx
8182
- var import_react33 = __toESM(require("react"), 1);
8302
+ var React58 = __toESM(require("react"), 1);
8183
8303
  var import_use_debounce = require("use-debounce");
8184
- var import_jsx_runtime35 = require("react/jsx-runtime");
8185
- function SearchInput({
8186
- value = "",
8187
- placeholder,
8188
- className,
8189
- classNameDefault,
8190
- debounceTime = 750,
8191
- onSearch
8192
- }) {
8193
- const [searchTerm, setSearchTerm] = import_react33.default.useState(value != null ? value : "");
8194
- const debouncedSearch = (0, import_use_debounce.useDebouncedCallback)((nextValue) => {
8195
- onSearch(nextValue);
8196
- }, debounceTime);
8197
- import_react33.default.useEffect(() => {
8198
- setSearchTerm(value != null ? value : "");
8199
- }, [value]);
8200
- const handleChange = (event) => {
8201
- const nextValue = event.target.value;
8202
- setSearchTerm(nextValue);
8203
- debouncedSearch(nextValue);
8204
- };
8205
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
8206
- Input,
8207
- {
8208
- placeholder: placeholder || "Search...",
8209
- value: searchTerm,
8210
- onChange: handleChange,
8211
- className: cn("w-full md:max-w-sm", className),
8212
- classNameDefault
8213
- }
8214
- );
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
+ }
8215
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";
8216
8426
 
8217
8427
  // src/components/searchable-select.tsx
8218
- var React58 = __toESM(require("react"), 1);
8219
- var SelectPrimitive2 = __toESM(require("@radix-ui/react-select"), 1);
8428
+ var React59 = __toESM(require("react"), 1);
8220
8429
  var import_react_icons16 = require("@radix-ui/react-icons");
8221
- var import_jsx_runtime36 = require("react/jsx-runtime");
8430
+ var import_jsx_runtime38 = require("react/jsx-runtime");
8222
8431
  function normalizeText(value) {
8223
- 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();
8224
8433
  }
8225
- function SearchableSelect(_a) {
8226
- var _b = _a, {
8227
- items,
8228
- value,
8229
- defaultValue,
8230
- onValueChange,
8231
- placeholder = "Seleccionar opci\xF3n",
8232
- searchPlaceholder = "Buscar\u2026",
8233
- emptyText = "No hay resultados",
8234
- triggerClassName,
8235
- contentClassName,
8236
- itemClassName,
8237
- searchInputClassName
8238
- } = _b, rootProps = __objRest(_b, [
8239
- "items",
8240
- "value",
8241
- "defaultValue",
8242
- "onValueChange",
8243
- "placeholder",
8244
- "searchPlaceholder",
8245
- "emptyText",
8246
- "triggerClassName",
8247
- "contentClassName",
8248
- "itemClassName",
8249
- "searchInputClassName"
8250
- ]);
8251
- const [open, setOpen] = React58.useState(false);
8252
- const [query, setQuery] = React58.useState("");
8253
- const inputRef = React58.useRef(null);
8254
- const filteredItems = React58.useMemo(() => {
8255
- const normalizedQuery = normalizeText(query.trim());
8256
- if (!normalizedQuery) return items;
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);
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]);
8492
+ const filteredItems = React59.useMemo(() => {
8493
+ const query = normalizeText(inputValue);
8494
+ if (!query) return items;
8257
8495
  return items.filter((item) => {
8258
- var _a2, _b2;
8496
+ var _a;
8259
8497
  const haystack = normalizeText(
8260
- `${(_a2 = item.label) != null ? _a2 : ""} ${item.value} ${(_b2 = item.keywords) != null ? _b2 : ""}`
8498
+ `${getLabelText(item.label)} ${item.value} ${(_a = item.keywords) != null ? _a : ""}`
8261
8499
  );
8262
- return haystack.includes(normalizedQuery);
8500
+ return haystack.includes(query);
8263
8501
  });
8264
- }, [items, query]);
8265
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
8266
- SelectPrimitive2.Root,
8267
- __spreadProps(__spreadValues({
8268
- open,
8269
- onOpenChange: (nextOpen) => {
8270
- setOpen(nextOpen);
8271
- if (!nextOpen) setQuery("");
8272
- },
8273
- value,
8274
- defaultValue,
8275
- onValueChange: (nextValue) => {
8276
- onValueChange == null ? void 0 : onValueChange(
8277
- nextValue,
8278
- items.find((item) => item.value === nextValue)
8279
- );
8280
- 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;
8281
8515
  }
8282
- }, rootProps), {
8283
- children: [
8284
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
8285
- SelectPrimitive2.Trigger,
8286
- {
8287
- className: cn(
8288
- "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",
8289
- triggerClassName
8290
- ),
8291
- children: [
8292
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SelectPrimitive2.Value, { placeholder }),
8293
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SelectPrimitive2.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_icons16.CaretSortIcon, { className: "h-4 w-4 opacity-50" }) })
8294
- ]
8295
- }
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
8296
8678
  ),
8297
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SelectPrimitive2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
8298
- SelectPrimitive2.Content,
8679
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8680
+ "div",
8299
8681
  {
8300
- position: "popper",
8301
- className: cn(
8302
- "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",
8303
- contentClassName
8304
- ),
8305
- onCloseAutoFocus: (event) => {
8306
- event.preventDefault();
8307
- requestAnimationFrame(() => {
8308
- var _a2;
8309
- return (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
8310
- });
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();
8311
8687
  },
8312
- children: [
8313
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "border-b border-border bg-popover p-2", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "relative", children: [
8314
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
8315
- "input",
8316
- {
8317
- ref: inputRef,
8318
- value: query,
8319
- onChange: (event) => setQuery(event.target.value),
8320
- onKeyDown: (event) => {
8321
- if (event.key !== "Escape") event.stopPropagation();
8322
- },
8323
- placeholder: searchPlaceholder,
8324
- className: cn(
8325
- "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",
8326
- searchInputClassName
8327
- )
8328
- }
8329
- ),
8330
- query ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
8331
- "button",
8332
- {
8333
- type: "button",
8334
- "aria-label": "Limpiar b\xFAsqueda",
8335
- onClick: () => {
8336
- var _a2;
8337
- setQuery("");
8338
- (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
8339
- },
8340
- 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",
8341
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_icons16.Cross2Icon, { className: "h-3.5 w-3.5" })
8342
- }
8343
- ) : null
8344
- ] }) }),
8345
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SelectPrimitive2.Viewport, { className: "max-h-80 p-1", children: filteredItems.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "px-3 py-2 text-sm text-muted-foreground", children: emptyText }) : filteredItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
8346
- 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",
8347
8696
  {
8348
- value: item.value,
8349
- 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
+ },
8350
8714
  className: cn(
8351
- "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",
8352
8720
  itemClassName
8353
8721
  ),
8354
8722
  children: [
8355
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SelectPrimitive2.ItemText, { children: item.label }),
8356
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SelectPrimitive2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime36.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
8357
8731
  ]
8358
8732
  },
8359
8733
  item.value
8360
- )) })
8361
- ]
8734
+ );
8735
+ })
8362
8736
  }
8363
- ) })
8364
- ]
8365
- })
8366
- );
8737
+ )
8738
+ }
8739
+ )
8740
+ ] });
8367
8741
  }
8742
+ var SearchableSelect = React59.memo(
8743
+ SearchableSelectBase
8744
+ );
8368
8745
 
8369
8746
  // src/components/separator.tsx
8370
8747
  var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
8371
- var React59 = __toESM(require("react"), 1);
8372
- var import_jsx_runtime37 = require("react/jsx-runtime");
8373
- var Separator6 = React59.forwardRef(
8748
+ var React60 = __toESM(require("react"), 1);
8749
+ var import_jsx_runtime39 = require("react/jsx-runtime");
8750
+ var Separator6 = React60.forwardRef(
8374
8751
  (_a, ref) => {
8375
8752
  var _b = _a, { className, orientation = "horizontal", decorative = true } = _b, props = __objRest(_b, ["className", "orientation", "decorative"]);
8376
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
8753
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8377
8754
  SeparatorPrimitive.Root,
8378
8755
  __spreadValues({
8379
8756
  ref,
@@ -8394,15 +8771,15 @@ Separator6.displayName = SeparatorPrimitive.Root.displayName;
8394
8771
  var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
8395
8772
  var import_react_icons17 = require("@radix-ui/react-icons");
8396
8773
  var import_class_variance_authority7 = require("class-variance-authority");
8397
- var React60 = __toESM(require("react"), 1);
8398
- var import_jsx_runtime38 = require("react/jsx-runtime");
8774
+ var React61 = __toESM(require("react"), 1);
8775
+ var import_jsx_runtime40 = require("react/jsx-runtime");
8399
8776
  var Sheet = SheetPrimitive.Root;
8400
8777
  var SheetTrigger = SheetPrimitive.Trigger;
8401
8778
  var SheetClose = SheetPrimitive.Close;
8402
8779
  var SheetPortal = SheetPrimitive.Portal;
8403
- var SheetOverlay = React60.forwardRef((_a, ref) => {
8780
+ var SheetOverlay = React61.forwardRef((_a, ref) => {
8404
8781
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8405
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8782
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
8406
8783
  SheetPrimitive.Overlay,
8407
8784
  __spreadProps(__spreadValues({
8408
8785
  className: cn(
@@ -8431,11 +8808,11 @@ var sheetVariants = (0, import_class_variance_authority7.cva)(
8431
8808
  }
8432
8809
  }
8433
8810
  );
8434
- var SheetContent = React60.forwardRef((_a, ref) => {
8811
+ var SheetContent = React61.forwardRef((_a, ref) => {
8435
8812
  var _b = _a, { side = "right", className, children } = _b, props = __objRest(_b, ["side", "className", "children"]);
8436
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(SheetPortal, { children: [
8437
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SheetOverlay, {}),
8438
- /* @__PURE__ */ (0, import_jsx_runtime38.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)(
8439
8816
  SheetPrimitive.Content,
8440
8817
  __spreadProps(__spreadValues({
8441
8818
  ref,
@@ -8443,9 +8820,9 @@ var SheetContent = React60.forwardRef((_a, ref) => {
8443
8820
  }, props), {
8444
8821
  children: [
8445
8822
  children,
8446
- /* @__PURE__ */ (0, import_jsx_runtime38.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: [
8447
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_icons17.Cross2Icon, { className: "h-4 w-4" }),
8448
- /* @__PURE__ */ (0, import_jsx_runtime38.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" })
8449
8826
  ] })
8450
8827
  ]
8451
8828
  })
@@ -8459,7 +8836,7 @@ var SheetHeader = (_a) => {
8459
8836
  } = _b, props = __objRest(_b, [
8460
8837
  "className"
8461
8838
  ]);
8462
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8839
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
8463
8840
  "div",
8464
8841
  __spreadValues({
8465
8842
  className: cn(
@@ -8476,7 +8853,7 @@ var SheetFooter = (_a) => {
8476
8853
  } = _b, props = __objRest(_b, [
8477
8854
  "className"
8478
8855
  ]);
8479
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8856
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
8480
8857
  "div",
8481
8858
  __spreadValues({
8482
8859
  className: cn(
@@ -8487,9 +8864,9 @@ var SheetFooter = (_a) => {
8487
8864
  );
8488
8865
  };
8489
8866
  SheetFooter.displayName = "SheetFooter";
8490
- var SheetTitle = React60.forwardRef((_a, ref) => {
8867
+ var SheetTitle = React61.forwardRef((_a, ref) => {
8491
8868
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8492
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8869
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
8493
8870
  SheetPrimitive.Title,
8494
8871
  __spreadValues({
8495
8872
  ref,
@@ -8498,9 +8875,9 @@ var SheetTitle = React60.forwardRef((_a, ref) => {
8498
8875
  );
8499
8876
  });
8500
8877
  SheetTitle.displayName = SheetPrimitive.Title.displayName;
8501
- var SheetDescription = React60.forwardRef((_a, ref) => {
8878
+ var SheetDescription = React61.forwardRef((_a, ref) => {
8502
8879
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8503
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8880
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
8504
8881
  SheetPrimitive.Description,
8505
8882
  __spreadValues({
8506
8883
  ref,
@@ -8511,14 +8888,14 @@ var SheetDescription = React60.forwardRef((_a, ref) => {
8511
8888
  SheetDescription.displayName = SheetPrimitive.Description.displayName;
8512
8889
 
8513
8890
  // src/components/skeleton.tsx
8514
- var import_jsx_runtime39 = require("react/jsx-runtime");
8891
+ var import_jsx_runtime41 = require("react/jsx-runtime");
8515
8892
  function Skeleton(_a) {
8516
8893
  var _b = _a, {
8517
8894
  className
8518
8895
  } = _b, props = __objRest(_b, [
8519
8896
  "className"
8520
8897
  ]);
8521
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8898
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
8522
8899
  "div",
8523
8900
  __spreadValues({
8524
8901
  className: cn("animate-pulse rounded-md bg-primary/10", className)
@@ -8528,11 +8905,11 @@ function Skeleton(_a) {
8528
8905
 
8529
8906
  // src/components/slider.tsx
8530
8907
  var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
8531
- var React61 = __toESM(require("react"), 1);
8532
- var import_jsx_runtime40 = require("react/jsx-runtime");
8533
- var Slider = React61.forwardRef((_a, ref) => {
8908
+ var React62 = __toESM(require("react"), 1);
8909
+ var import_jsx_runtime42 = require("react/jsx-runtime");
8910
+ var Slider = React62.forwardRef((_a, ref) => {
8534
8911
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8535
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
8912
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
8536
8913
  SliderPrimitive.Root,
8537
8914
  __spreadProps(__spreadValues({
8538
8915
  ref,
@@ -8542,8 +8919,8 @@ var Slider = React61.forwardRef((_a, ref) => {
8542
8919
  )
8543
8920
  }, props), {
8544
8921
  children: [
8545
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
8546
- /* @__PURE__ */ (0, import_jsx_runtime40.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" })
8547
8924
  ]
8548
8925
  })
8549
8926
  );
@@ -8553,11 +8930,11 @@ Slider.displayName = SliderPrimitive.Root.displayName;
8553
8930
  // src/components/sonner.tsx
8554
8931
  var import_next_themes = require("next-themes");
8555
8932
  var import_sonner = require("sonner");
8556
- var import_jsx_runtime41 = require("react/jsx-runtime");
8933
+ var import_jsx_runtime43 = require("react/jsx-runtime");
8557
8934
  var ToasterSonner = (_a) => {
8558
8935
  var props = __objRest(_a, []);
8559
8936
  const { theme = "system" } = (0, import_next_themes.useTheme)();
8560
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
8937
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8561
8938
  import_sonner.Toaster,
8562
8939
  __spreadValues({
8563
8940
  theme,
@@ -8576,11 +8953,11 @@ var ToasterSonner = (_a) => {
8576
8953
 
8577
8954
  // src/components/switch.tsx
8578
8955
  var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
8579
- var React62 = __toESM(require("react"), 1);
8580
- var import_jsx_runtime42 = require("react/jsx-runtime");
8581
- var Switch = React62.forwardRef((_a, ref) => {
8956
+ var React63 = __toESM(require("react"), 1);
8957
+ var import_jsx_runtime44 = require("react/jsx-runtime");
8958
+ var Switch = React63.forwardRef((_a, ref) => {
8582
8959
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8583
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8960
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8584
8961
  SwitchPrimitives.Root,
8585
8962
  __spreadProps(__spreadValues({
8586
8963
  className: cn(
@@ -8589,7 +8966,7 @@ var Switch = React62.forwardRef((_a, ref) => {
8589
8966
  )
8590
8967
  }, props), {
8591
8968
  ref,
8592
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8969
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8593
8970
  SwitchPrimitives.Thumb,
8594
8971
  {
8595
8972
  className: cn(
@@ -8603,12 +8980,12 @@ var Switch = React62.forwardRef((_a, ref) => {
8603
8980
  Switch.displayName = SwitchPrimitives.Root.displayName;
8604
8981
 
8605
8982
  // src/components/table.tsx
8606
- var React63 = __toESM(require("react"), 1);
8607
- var import_jsx_runtime43 = require("react/jsx-runtime");
8608
- var Table = React63.forwardRef(
8983
+ var React64 = __toESM(require("react"), 1);
8984
+ var import_jsx_runtime45 = require("react/jsx-runtime");
8985
+ var Table = React64.forwardRef(
8609
8986
  (_a, ref) => {
8610
8987
  var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
8611
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: cn("relative w-full overflow-visible", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime43.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)(
8612
8989
  "table",
8613
8990
  __spreadValues({
8614
8991
  ref,
@@ -8618,14 +8995,14 @@ var Table = React63.forwardRef(
8618
8995
  }
8619
8996
  );
8620
8997
  Table.displayName = "Table";
8621
- var TableHeader = React63.forwardRef((_a, ref) => {
8998
+ var TableHeader = React64.forwardRef((_a, ref) => {
8622
8999
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8623
- return /* @__PURE__ */ (0, import_jsx_runtime43.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));
8624
9001
  });
8625
9002
  TableHeader.displayName = "TableHeader";
8626
- var TableBody = React63.forwardRef((_a, ref) => {
9003
+ var TableBody = React64.forwardRef((_a, ref) => {
8627
9004
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8628
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
9005
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8629
9006
  "tbody",
8630
9007
  __spreadValues({
8631
9008
  ref,
@@ -8634,9 +9011,9 @@ var TableBody = React63.forwardRef((_a, ref) => {
8634
9011
  );
8635
9012
  });
8636
9013
  TableBody.displayName = "TableBody";
8637
- var TableFooter = React63.forwardRef((_a, ref) => {
9014
+ var TableFooter = React64.forwardRef((_a, ref) => {
8638
9015
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8639
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
9016
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8640
9017
  "tfoot",
8641
9018
  __spreadValues({
8642
9019
  ref,
@@ -8648,9 +9025,9 @@ var TableFooter = React63.forwardRef((_a, ref) => {
8648
9025
  );
8649
9026
  });
8650
9027
  TableFooter.displayName = "TableFooter";
8651
- var TableRow = React63.forwardRef((_a, ref) => {
9028
+ var TableRow = React64.forwardRef((_a, ref) => {
8652
9029
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8653
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
9030
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8654
9031
  "tr",
8655
9032
  __spreadValues({
8656
9033
  ref,
@@ -8662,9 +9039,9 @@ var TableRow = React63.forwardRef((_a, ref) => {
8662
9039
  );
8663
9040
  });
8664
9041
  TableRow.displayName = "TableRow";
8665
- var TableHead = React63.forwardRef((_a, ref) => {
9042
+ var TableHead = React64.forwardRef((_a, ref) => {
8666
9043
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8667
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
9044
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8668
9045
  "th",
8669
9046
  __spreadValues({
8670
9047
  ref,
@@ -8676,9 +9053,9 @@ var TableHead = React63.forwardRef((_a, ref) => {
8676
9053
  );
8677
9054
  });
8678
9055
  TableHead.displayName = "TableHead";
8679
- var TableCell = React63.forwardRef((_a, ref) => {
9056
+ var TableCell = React64.forwardRef((_a, ref) => {
8680
9057
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8681
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
9058
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8682
9059
  "td",
8683
9060
  __spreadValues({
8684
9061
  ref,
@@ -8690,9 +9067,9 @@ var TableCell = React63.forwardRef((_a, ref) => {
8690
9067
  );
8691
9068
  });
8692
9069
  TableCell.displayName = "TableCell";
8693
- var TableCaption = React63.forwardRef((_a, ref) => {
9070
+ var TableCaption = React64.forwardRef((_a, ref) => {
8694
9071
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8695
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
9072
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8696
9073
  "caption",
8697
9074
  __spreadValues({
8698
9075
  ref,
@@ -8704,12 +9081,12 @@ TableCaption.displayName = "TableCaption";
8704
9081
 
8705
9082
  // src/components/tabs.tsx
8706
9083
  var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
8707
- var React64 = __toESM(require("react"), 1);
8708
- var import_jsx_runtime44 = require("react/jsx-runtime");
9084
+ var React65 = __toESM(require("react"), 1);
9085
+ var import_jsx_runtime46 = require("react/jsx-runtime");
8709
9086
  var Tabs = TabsPrimitive.Root;
8710
- var TabsList = React64.forwardRef((_a, ref) => {
9087
+ var TabsList = React65.forwardRef((_a, ref) => {
8711
9088
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8712
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
9089
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8713
9090
  TabsPrimitive.List,
8714
9091
  __spreadValues({
8715
9092
  ref,
@@ -8721,9 +9098,9 @@ var TabsList = React64.forwardRef((_a, ref) => {
8721
9098
  );
8722
9099
  });
8723
9100
  TabsList.displayName = TabsPrimitive.List.displayName;
8724
- var TabsTrigger = React64.forwardRef((_a, ref) => {
9101
+ var TabsTrigger = React65.forwardRef((_a, ref) => {
8725
9102
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8726
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
9103
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8727
9104
  TabsPrimitive.Trigger,
8728
9105
  __spreadValues({
8729
9106
  ref,
@@ -8735,9 +9112,9 @@ var TabsTrigger = React64.forwardRef((_a, ref) => {
8735
9112
  );
8736
9113
  });
8737
9114
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
8738
- var TabsContent = React64.forwardRef((_a, ref) => {
9115
+ var TabsContent = React65.forwardRef((_a, ref) => {
8739
9116
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8740
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
9117
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8741
9118
  TabsPrimitive.Content,
8742
9119
  __spreadValues({
8743
9120
  ref,
@@ -8751,12 +9128,12 @@ var TabsContent = React64.forwardRef((_a, ref) => {
8751
9128
  TabsContent.displayName = TabsPrimitive.Content.displayName;
8752
9129
 
8753
9130
  // src/components/textarea.tsx
8754
- var React65 = __toESM(require("react"), 1);
8755
- var import_jsx_runtime45 = require("react/jsx-runtime");
8756
- var Textarea = React65.forwardRef(
9131
+ var React66 = __toESM(require("react"), 1);
9132
+ var import_jsx_runtime47 = require("react/jsx-runtime");
9133
+ var Textarea = React66.forwardRef(
8757
9134
  (_a, ref) => {
8758
9135
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8759
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
9136
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
8760
9137
  "textarea",
8761
9138
  __spreadValues({
8762
9139
  className: cn(
@@ -8774,12 +9151,12 @@ Textarea.displayName = "Textarea";
8774
9151
  var import_react_icons18 = require("@radix-ui/react-icons");
8775
9152
  var ToastPrimitives = __toESM(require("@radix-ui/react-toast"), 1);
8776
9153
  var import_class_variance_authority8 = require("class-variance-authority");
8777
- var React66 = __toESM(require("react"), 1);
8778
- var import_jsx_runtime46 = require("react/jsx-runtime");
9154
+ var React67 = __toESM(require("react"), 1);
9155
+ var import_jsx_runtime48 = require("react/jsx-runtime");
8779
9156
  var ToastProvider = ToastPrimitives.Provider;
8780
- var ToastViewport = React66.forwardRef((_a, ref) => {
9157
+ var ToastViewport = React67.forwardRef((_a, ref) => {
8781
9158
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8782
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
9159
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
8783
9160
  ToastPrimitives.Viewport,
8784
9161
  __spreadValues({
8785
9162
  ref,
@@ -8805,9 +9182,9 @@ var toastVariants = (0, import_class_variance_authority8.cva)(
8805
9182
  }
8806
9183
  }
8807
9184
  );
8808
- var Toast = React66.forwardRef((_a, ref) => {
9185
+ var Toast = React67.forwardRef((_a, ref) => {
8809
9186
  var _b = _a, { className, variant } = _b, props = __objRest(_b, ["className", "variant"]);
8810
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
9187
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
8811
9188
  ToastPrimitives.Root,
8812
9189
  __spreadValues({
8813
9190
  ref,
@@ -8816,9 +9193,9 @@ var Toast = React66.forwardRef((_a, ref) => {
8816
9193
  );
8817
9194
  });
8818
9195
  Toast.displayName = ToastPrimitives.Root.displayName;
8819
- var ToastAction = React66.forwardRef((_a, ref) => {
9196
+ var ToastAction = React67.forwardRef((_a, ref) => {
8820
9197
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8821
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
9198
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
8822
9199
  ToastPrimitives.Action,
8823
9200
  __spreadValues({
8824
9201
  ref,
@@ -8830,9 +9207,9 @@ var ToastAction = React66.forwardRef((_a, ref) => {
8830
9207
  );
8831
9208
  });
8832
9209
  ToastAction.displayName = ToastPrimitives.Action.displayName;
8833
- var ToastClose = React66.forwardRef((_a, ref) => {
9210
+ var ToastClose = React67.forwardRef((_a, ref) => {
8834
9211
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8835
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
9212
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
8836
9213
  ToastPrimitives.Close,
8837
9214
  __spreadProps(__spreadValues({
8838
9215
  ref,
@@ -8842,14 +9219,14 @@ var ToastClose = React66.forwardRef((_a, ref) => {
8842
9219
  ),
8843
9220
  "toast-close": ""
8844
9221
  }, props), {
8845
- children: /* @__PURE__ */ (0, import_jsx_runtime46.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" })
8846
9223
  })
8847
9224
  );
8848
9225
  });
8849
9226
  ToastClose.displayName = ToastPrimitives.Close.displayName;
8850
- var ToastTitle = React66.forwardRef((_a, ref) => {
9227
+ var ToastTitle = React67.forwardRef((_a, ref) => {
8851
9228
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8852
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
9229
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
8853
9230
  ToastPrimitives.Title,
8854
9231
  __spreadValues({
8855
9232
  ref,
@@ -8858,9 +9235,9 @@ var ToastTitle = React66.forwardRef((_a, ref) => {
8858
9235
  );
8859
9236
  });
8860
9237
  ToastTitle.displayName = ToastPrimitives.Title.displayName;
8861
- var ToastDescription = React66.forwardRef((_a, ref) => {
9238
+ var ToastDescription = React67.forwardRef((_a, ref) => {
8862
9239
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8863
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
9240
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
8864
9241
  ToastPrimitives.Description,
8865
9242
  __spreadValues({
8866
9243
  ref,
@@ -8871,7 +9248,7 @@ var ToastDescription = React66.forwardRef((_a, ref) => {
8871
9248
  ToastDescription.displayName = ToastPrimitives.Description.displayName;
8872
9249
 
8873
9250
  // src/components/use-toast.ts
8874
- var React67 = __toESM(require("react"), 1);
9251
+ var React68 = __toESM(require("react"), 1);
8875
9252
  var TOAST_LIMIT = 1;
8876
9253
  var TOAST_REMOVE_DELAY = 1e6;
8877
9254
  var count = 0;
@@ -8966,8 +9343,8 @@ function toast(_a) {
8966
9343
  };
8967
9344
  }
8968
9345
  function useToast() {
8969
- const [state, setState] = React67.useState(memoryState);
8970
- React67.useEffect(() => {
9346
+ const [state, setState] = React68.useState(memoryState);
9347
+ React68.useEffect(() => {
8971
9348
  listeners.push(setState);
8972
9349
  return () => {
8973
9350
  const index = listeners.indexOf(setState);
@@ -8983,30 +9360,30 @@ function useToast() {
8983
9360
  }
8984
9361
 
8985
9362
  // src/components/toaster.tsx
8986
- var import_jsx_runtime47 = require("react/jsx-runtime");
9363
+ var import_jsx_runtime49 = require("react/jsx-runtime");
8987
9364
  function Toaster() {
8988
9365
  const { toasts } = useToast();
8989
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(ToastProvider, { children: [
9366
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(ToastProvider, { children: [
8990
9367
  toasts.map(function(_a) {
8991
9368
  var _b = _a, { id, title, description, action } = _b, props = __objRest(_b, ["id", "title", "description", "action"]);
8992
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Toast, __spreadProps(__spreadValues({}, props), { children: [
8993
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "grid gap-1", children: [
8994
- title && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ToastTitle, { children: title }),
8995
- description && /* @__PURE__ */ (0, import_jsx_runtime47.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 })
8996
9373
  ] }),
8997
9374
  action,
8998
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ToastClose, {})
9375
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ToastClose, {})
8999
9376
  ] }), id);
9000
9377
  }),
9001
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ToastViewport, {})
9378
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ToastViewport, {})
9002
9379
  ] });
9003
9380
  }
9004
9381
 
9005
9382
  // src/components/toggle.tsx
9006
9383
  var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
9007
9384
  var import_class_variance_authority9 = require("class-variance-authority");
9008
- var React68 = __toESM(require("react"), 1);
9009
- var import_jsx_runtime48 = require("react/jsx-runtime");
9385
+ var React69 = __toESM(require("react"), 1);
9386
+ var import_jsx_runtime50 = require("react/jsx-runtime");
9010
9387
  var toggleVariants = (0, import_class_variance_authority9.cva)(
9011
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",
9012
9389
  {
@@ -9027,9 +9404,9 @@ var toggleVariants = (0, import_class_variance_authority9.cva)(
9027
9404
  }
9028
9405
  }
9029
9406
  );
9030
- var Toggle = React68.forwardRef((_a, ref) => {
9407
+ var Toggle = React69.forwardRef((_a, ref) => {
9031
9408
  var _b = _a, { className, variant, size } = _b, props = __objRest(_b, ["className", "variant", "size"]);
9032
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
9409
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9033
9410
  TogglePrimitive.Root,
9034
9411
  __spreadValues({
9035
9412
  ref,
@@ -9041,29 +9418,29 @@ Toggle.displayName = TogglePrimitive.Root.displayName;
9041
9418
 
9042
9419
  // src/components/toggle-group.tsx
9043
9420
  var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
9044
- var React69 = __toESM(require("react"), 1);
9045
- var import_jsx_runtime49 = require("react/jsx-runtime");
9046
- var ToggleGroupContext = React69.createContext({
9421
+ var React70 = __toESM(require("react"), 1);
9422
+ var import_jsx_runtime51 = require("react/jsx-runtime");
9423
+ var ToggleGroupContext = React70.createContext({
9047
9424
  size: "default",
9048
9425
  variant: "default"
9049
9426
  });
9050
- var ToggleGroup = React69.forwardRef((_a, ref) => {
9427
+ var ToggleGroup = React70.forwardRef((_a, ref) => {
9051
9428
  var _b = _a, { className, variant, size, children } = _b, props = __objRest(_b, ["className", "variant", "size", "children"]);
9052
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9429
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
9053
9430
  ToggleGroupPrimitive.Root,
9054
9431
  __spreadProps(__spreadValues({
9055
9432
  ref,
9056
9433
  className: cn("flex items-center justify-center gap-1", className)
9057
9434
  }, props), {
9058
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
9435
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
9059
9436
  })
9060
9437
  );
9061
9438
  });
9062
9439
  ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
9063
- var ToggleGroupItem = React69.forwardRef((_a, ref) => {
9440
+ var ToggleGroupItem = React70.forwardRef((_a, ref) => {
9064
9441
  var _b = _a, { className, children, variant, size } = _b, props = __objRest(_b, ["className", "children", "variant", "size"]);
9065
- const context = React69.useContext(ToggleGroupContext);
9066
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
9442
+ const context = React70.useContext(ToggleGroupContext);
9443
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
9067
9444
  ToggleGroupPrimitive.Item,
9068
9445
  __spreadProps(__spreadValues({
9069
9446
  ref,
@@ -9083,14 +9460,14 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
9083
9460
 
9084
9461
  // src/components/tooltip.tsx
9085
9462
  var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
9086
- var React70 = __toESM(require("react"), 1);
9087
- var import_jsx_runtime50 = require("react/jsx-runtime");
9463
+ var React71 = __toESM(require("react"), 1);
9464
+ var import_jsx_runtime52 = require("react/jsx-runtime");
9088
9465
  var TooltipProvider = TooltipPrimitive.Provider;
9089
9466
  var Tooltip = TooltipPrimitive.Root;
9090
9467
  var TooltipTrigger = TooltipPrimitive.Trigger;
9091
- var TooltipContent = React70.forwardRef((_a, ref) => {
9468
+ var TooltipContent = React71.forwardRef((_a, ref) => {
9092
9469
  var _b = _a, { className, sideOffset = 4 } = _b, props = __objRest(_b, ["className", "sideOffset"]);
9093
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
9470
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
9094
9471
  TooltipPrimitive.Content,
9095
9472
  __spreadValues({
9096
9473
  ref,
@@ -9105,10 +9482,10 @@ var TooltipContent = React70.forwardRef((_a, ref) => {
9105
9482
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
9106
9483
 
9107
9484
  // src/components/ui/input.tsx
9108
- var React71 = __toESM(require("react"), 1);
9109
- var import_lucide_react7 = require("lucide-react");
9110
- var import_jsx_runtime51 = require("react/jsx-runtime");
9111
- var UiInput = React71.forwardRef(
9485
+ var React72 = __toESM(require("react"), 1);
9486
+ var import_lucide_react8 = require("lucide-react");
9487
+ var import_jsx_runtime53 = require("react/jsx-runtime");
9488
+ var UiInput = React72.forwardRef(
9112
9489
  (_a, ref) => {
9113
9490
  var _b = _a, {
9114
9491
  label,
@@ -9133,12 +9510,12 @@ var UiInput = React71.forwardRef(
9133
9510
  "invalid",
9134
9511
  "className"
9135
9512
  ]);
9136
- const generatedId = React71.useId();
9513
+ const generatedId = React72.useId();
9137
9514
  const inputId = htmlFormItemId != null ? htmlFormItemId : generatedId;
9138
9515
  const messageId = `${inputId}-message`;
9139
9516
  const hasError = Boolean(errorMessage || invalid);
9140
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cn("w-full space-y-1.5", containerClassName), children: [
9141
- label ? /* @__PURE__ */ (0, import_jsx_runtime51.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)(
9142
9519
  Label3,
9143
9520
  {
9144
9521
  className: cn(
@@ -9148,9 +9525,9 @@ var UiInput = React71.forwardRef(
9148
9525
  ),
9149
9526
  htmlFor: inputId,
9150
9527
  children: [
9151
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: label }),
9152
- requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
9153
- import_lucide_react7.Asterisk,
9528
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: label }),
9529
+ requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9530
+ import_lucide_react8.Asterisk,
9154
9531
  {
9155
9532
  "aria-hidden": "true",
9156
9533
  className: cn(
@@ -9162,7 +9539,7 @@ var UiInput = React71.forwardRef(
9162
9539
  ]
9163
9540
  }
9164
9541
  ) : null,
9165
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
9542
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9166
9543
  Input,
9167
9544
  __spreadProps(__spreadValues({}, inputProps), {
9168
9545
  ref,
@@ -9173,7 +9550,7 @@ var UiInput = React71.forwardRef(
9173
9550
  className
9174
9551
  })
9175
9552
  ),
9176
- errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
9553
+ errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9177
9554
  "p",
9178
9555
  {
9179
9556
  id: messageId,
@@ -9187,8 +9564,8 @@ var UiInput = React71.forwardRef(
9187
9564
  UiInput.displayName = "UiInput";
9188
9565
 
9189
9566
  // src/components/ui/select.tsx
9190
- var React72 = __toESM(require("react"), 1);
9191
- var import_lucide_react8 = require("lucide-react");
9567
+ var React73 = __toESM(require("react"), 1);
9568
+ var import_lucide_react9 = require("lucide-react");
9192
9569
 
9193
9570
  // src/types/select.ts
9194
9571
  var selectVariants = {
@@ -9203,7 +9580,7 @@ var selectVariants = {
9203
9580
  var variants2 = selectVariants;
9204
9581
 
9205
9582
  // src/components/ui/select.tsx
9206
- var import_jsx_runtime52 = require("react/jsx-runtime");
9583
+ var import_jsx_runtime54 = require("react/jsx-runtime");
9207
9584
  function UiSelect({
9208
9585
  label,
9209
9586
  placeholder,
@@ -9226,7 +9603,7 @@ function UiSelect({
9226
9603
  errorMessage,
9227
9604
  htmlFormItemId
9228
9605
  }) {
9229
- const generatedId = React72.useId();
9606
+ const generatedId = React73.useId();
9230
9607
  const triggerId = htmlFormItemId != null ? htmlFormItemId : generatedId;
9231
9608
  const messageId = `${triggerId}-message`;
9232
9609
  const hasError = Boolean(errorMessage);
@@ -9243,8 +9620,8 @@ function UiSelect({
9243
9620
  };
9244
9621
  const specialFlushed = variant === "flushed" ? size === "sm" ? "h-9 text-sm" : size === "lg" ? "h-11 text-base" : "h-10 text-sm" : "";
9245
9622
  const specialLink = variant === "link" ? "text-sm" : "";
9246
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: cn("w-full space-y-1.5", selectClassName), children: [
9247
- label ? /* @__PURE__ */ (0, import_jsx_runtime52.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)(
9248
9625
  Label3,
9249
9626
  {
9250
9627
  className: cn(
@@ -9254,9 +9631,9 @@ function UiSelect({
9254
9631
  ),
9255
9632
  htmlFor: triggerId,
9256
9633
  children: [
9257
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: label }),
9258
- requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
9259
- import_lucide_react8.Asterisk,
9634
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children: label }),
9635
+ requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
9636
+ import_lucide_react9.Asterisk,
9260
9637
  {
9261
9638
  "aria-hidden": "true",
9262
9639
  className: cn(
@@ -9268,7 +9645,7 @@ function UiSelect({
9268
9645
  ]
9269
9646
  }
9270
9647
  ) : null,
9271
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
9648
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
9272
9649
  Select2,
9273
9650
  {
9274
9651
  value,
@@ -9276,7 +9653,7 @@ function UiSelect({
9276
9653
  onValueChange: onChange,
9277
9654
  disabled,
9278
9655
  children: [
9279
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
9656
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
9280
9657
  SelectTrigger,
9281
9658
  {
9282
9659
  id: triggerId,
@@ -9289,10 +9666,10 @@ function UiSelect({
9289
9666
  hasError && "border-destructive ring-destructive focus:ring-destructive/40",
9290
9667
  className
9291
9668
  ),
9292
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectValue, { placeholder })
9669
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(SelectValue, { placeholder })
9293
9670
  }
9294
9671
  ),
9295
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectContent, { className: contentClassName, children: children != null ? children : items == null ? void 0 : items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime52.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)(
9296
9673
  SelectItem,
9297
9674
  {
9298
9675
  value: item.value,
@@ -9305,7 +9682,7 @@ function UiSelect({
9305
9682
  ]
9306
9683
  }
9307
9684
  ),
9308
- errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
9685
+ errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
9309
9686
  "p",
9310
9687
  {
9311
9688
  id: messageId,
@@ -9317,10 +9694,10 @@ function UiSelect({
9317
9694
  }
9318
9695
 
9319
9696
  // src/components/ui/ui-checkbox.tsx
9320
- var React73 = __toESM(require("react"), 1);
9321
- var import_lucide_react9 = require("lucide-react");
9322
- var import_jsx_runtime53 = require("react/jsx-runtime");
9323
- var UiCheckbox = React73.forwardRef(
9697
+ var React74 = __toESM(require("react"), 1);
9698
+ var import_lucide_react10 = require("lucide-react");
9699
+ var import_jsx_runtime55 = require("react/jsx-runtime");
9700
+ var UiCheckbox = React74.forwardRef(
9324
9701
  (_a, ref) => {
9325
9702
  var _b = _a, {
9326
9703
  label,
@@ -9352,7 +9729,7 @@ var UiCheckbox = React73.forwardRef(
9352
9729
  "className"
9353
9730
  ]);
9354
9731
  const hasError = Boolean(errorMessage || invalid);
9355
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: cn("w-full", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
9732
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: cn("w-full", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
9356
9733
  "div",
9357
9734
  {
9358
9735
  className: cn(
@@ -9361,7 +9738,7 @@ var UiCheckbox = React73.forwardRef(
9361
9738
  contentClassName
9362
9739
  ),
9363
9740
  children: [
9364
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9741
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
9365
9742
  Checkbox,
9366
9743
  __spreadValues({
9367
9744
  ref,
@@ -9370,8 +9747,8 @@ var UiCheckbox = React73.forwardRef(
9370
9747
  className: cn("mt-0.5", className)
9371
9748
  }, checkboxProps)
9372
9749
  ),
9373
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "min-w-0 flex-1", children: [
9374
- label ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
9750
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "min-w-0 flex-1", children: [
9751
+ label ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
9375
9752
  Label3,
9376
9753
  {
9377
9754
  htmlFor: htmlFormItemId,
@@ -9382,9 +9759,9 @@ var UiCheckbox = React73.forwardRef(
9382
9759
  labelClassName
9383
9760
  ),
9384
9761
  children: [
9385
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: label }),
9386
- requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9387
- import_lucide_react9.Asterisk,
9762
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: label }),
9763
+ requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
9764
+ import_lucide_react10.Asterisk,
9388
9765
  {
9389
9766
  "aria-hidden": "true",
9390
9767
  className: cn(
@@ -9396,7 +9773,7 @@ var UiCheckbox = React73.forwardRef(
9396
9773
  ]
9397
9774
  }
9398
9775
  ) : null,
9399
- description ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9776
+ description ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
9400
9777
  "p",
9401
9778
  {
9402
9779
  className: cn(
@@ -9406,7 +9783,7 @@ var UiCheckbox = React73.forwardRef(
9406
9783
  children: description
9407
9784
  }
9408
9785
  ) : null,
9409
- errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9786
+ errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
9410
9787
  "p",
9411
9788
  {
9412
9789
  className: cn(
@@ -9425,26 +9802,26 @@ var UiCheckbox = React73.forwardRef(
9425
9802
  UiCheckbox.displayName = "UiCheckbox";
9426
9803
 
9427
9804
  // src/hooks/use-sidebar.tsx
9428
- var import_react34 = require("react");
9429
- var import_jsx_runtime54 = require("react/jsx-runtime");
9430
- 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)({
9431
9808
  isMinimized: false,
9432
9809
  toggle: () => {
9433
9810
  }
9434
9811
  });
9435
- var useSidebar = () => (0, import_react34.useContext)(SidebarContext);
9812
+ var useSidebar = () => (0, import_react33.useContext)(SidebarContext);
9436
9813
  var SidebarProvider = ({
9437
9814
  children
9438
9815
  }) => {
9439
- const [isMinimized, setIsMinimized] = (0, import_react34.useState)(false);
9816
+ const [isMinimized, setIsMinimized] = (0, import_react33.useState)(false);
9440
9817
  const toggle = () => {
9441
9818
  setIsMinimized(!isMinimized);
9442
9819
  };
9443
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(SidebarContext.Provider, { value: { isMinimized, toggle }, children });
9820
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SidebarContext.Provider, { value: { isMinimized, toggle }, children });
9444
9821
  };
9445
9822
 
9446
9823
  // src/shared/alert-modal.tsx
9447
- var import_jsx_runtime55 = require("react/jsx-runtime");
9824
+ var import_jsx_runtime57 = require("react/jsx-runtime");
9448
9825
  var AlertModal = ({
9449
9826
  isOpen,
9450
9827
  onClose,
@@ -9457,7 +9834,7 @@ var AlertModal = ({
9457
9834
  className,
9458
9835
  children
9459
9836
  }) => {
9460
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
9837
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
9461
9838
  Modal,
9462
9839
  {
9463
9840
  title,
@@ -9465,9 +9842,9 @@ var AlertModal = ({
9465
9842
  isOpen,
9466
9843
  onClose,
9467
9844
  className,
9468
- children: children ? children : /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex w-full items-center justify-end space-x-2 pt-6", children: [
9469
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Button, { disabled: loading, variant: "outline", onClick: onClose, children: cancelText }),
9470
- /* @__PURE__ */ (0, import_jsx_runtime55.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)(
9471
9848
  Button,
9472
9849
  {
9473
9850
  disabled: loading,
@@ -9483,32 +9860,32 @@ var AlertModal = ({
9483
9860
  };
9484
9861
 
9485
9862
  // src/shared/breadcrumbs.tsx
9486
- var import_lucide_react10 = require("lucide-react");
9487
- var import_react35 = require("react");
9488
- var import_jsx_runtime56 = require("react/jsx-runtime");
9863
+ var import_lucide_react11 = require("lucide-react");
9864
+ var import_react34 = require("react");
9865
+ var import_jsx_runtime58 = require("react/jsx-runtime");
9489
9866
  function Breadcrumbs({
9490
9867
  items,
9491
9868
  className,
9492
9869
  classNameList,
9493
- separator = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react10.Slash, {})
9870
+ separator = /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react11.Slash, {})
9494
9871
  }) {
9495
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Breadcrumb, { className, children: /* @__PURE__ */ (0, import_jsx_runtime56.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) => {
9496
9873
  var _a;
9497
9874
  const isLast = index === items.length - 1;
9498
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_react35.Fragment, { children: [
9499
- !isLast ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(BreadcrumbLink, { href: (_a = item.link) != null ? _a : "#", children: item.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(BreadcrumbPage, { children: item.title }) }),
9500
- !isLast ? /* @__PURE__ */ (0, import_jsx_runtime56.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
9501
9878
  ] }, `${item.title}-${index}`);
9502
9879
  }) }) });
9503
9880
  }
9504
9881
 
9505
9882
  // src/shared/data-table.tsx
9506
- var import_react36 = require("react");
9883
+ var import_react35 = require("react");
9507
9884
  var import_framer_motion = require("framer-motion");
9508
9885
  var import_react_icons19 = require("@radix-ui/react-icons");
9509
9886
  var import_react_table = require("@tanstack/react-table");
9510
- var import_lucide_react11 = require("lucide-react");
9511
- var import_jsx_runtime57 = require("react/jsx-runtime");
9887
+ var import_lucide_react12 = require("lucide-react");
9888
+ var import_jsx_runtime59 = require("react/jsx-runtime");
9512
9889
  var ACCENT_COLOR = {
9513
9890
  primary: "var(--primary)",
9514
9891
  emerald: "#10b981",
@@ -9745,7 +10122,7 @@ function DataTable({
9745
10122
  const safePageCount = Math.max(pageCount != null ? pageCount : 1, 1);
9746
10123
  const pageIndex = Math.min(Math.max(page - 1, 0), safePageCount - 1);
9747
10124
  const pageSize = Math.max(perPage, 1);
9748
- const paginationState = (0, import_react36.useMemo)(
10125
+ const paginationState = (0, import_react35.useMemo)(
9749
10126
  () => ({ pageIndex, pageSize }),
9750
10127
  [pageIndex, pageSize]
9751
10128
  );
@@ -9762,7 +10139,7 @@ function DataTable({
9762
10139
  autoResetPageIndex: false
9763
10140
  });
9764
10141
  const clickable = !!onClick;
9765
- const pageKey = (0, import_react36.useMemo)(
10142
+ const pageKey = (0, import_react35.useMemo)(
9766
10143
  () => `${pageIndex}-${pageSize}-${data.length}`,
9767
10144
  [pageIndex, pageSize, data.length]
9768
10145
  );
@@ -9777,7 +10154,7 @@ function DataTable({
9777
10154
  onPageSizeChange == null ? void 0 : onPageSizeChange(size);
9778
10155
  onPageChange == null ? void 0 : onPageChange(1);
9779
10156
  };
9780
- const ui = (0, import_react36.useMemo)(() => {
10157
+ const ui = (0, import_react35.useMemo)(() => {
9781
10158
  var _a;
9782
10159
  const builtIn = (_a = DATA_TABLE_TEMPLATES[template]) != null ? _a : DATA_TABLE_TEMPLATES.neo;
9783
10160
  return mergeSlots(DATA_TABLE_TEMPLATES.neo, builtIn, classNames);
@@ -9786,16 +10163,16 @@ function DataTable({
9786
10163
  const accentOn = !!dtAccent;
9787
10164
  const dataAccent = accentOn ? "on" : "off";
9788
10165
  const headerIsSticky = stickyHeader && !headerScroll;
9789
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
10166
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
9790
10167
  "div",
9791
10168
  {
9792
10169
  "data-accent": dataAccent,
9793
10170
  className: cn(ui.root, heightClassName),
9794
10171
  style: accentOn ? { "--dt-accent": dtAccent } : void 0,
9795
10172
  children: [
9796
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(ScrollArea, { className: "h-full", children: [
9797
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "relative w-max min-w-full", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Table, { className: cn(ui.table), children: [
9798
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TableHeader, { className: cn(ui.thead), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TableRow, { className: cn(ui.trHead), children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime57.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)(
9799
10176
  TableHead,
9800
10177
  {
9801
10178
  className: cn(
@@ -9809,7 +10186,7 @@ function DataTable({
9809
10186
  },
9810
10187
  header.id
9811
10188
  )) }, headerGroup.id)) }),
9812
- animate ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_framer_motion.AnimatePresence, { mode: "wait", initial: false, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
10189
+ animate ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_framer_motion.AnimatePresence, { mode: "wait", initial: false, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
9813
10190
  import_framer_motion.motion.tbody,
9814
10191
  {
9815
10192
  className: cn(ui.tbody),
@@ -9817,7 +10194,7 @@ function DataTable({
9817
10194
  animate: { opacity: 1, y: 0 },
9818
10195
  exit: { opacity: 0, y: -6 },
9819
10196
  transition: { duration: 0.18 },
9820
- children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
10197
+ children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
9821
10198
  TableRow,
9822
10199
  {
9823
10200
  "data-accent": dataAccent,
@@ -9827,13 +10204,13 @@ function DataTable({
9827
10204
  ui.tr,
9828
10205
  clickable ? ui.trClickable : void 0
9829
10206
  ),
9830
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime57.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)(
9831
10208
  cell.column.columnDef.cell,
9832
10209
  cell.getContext()
9833
10210
  ) }, cell.id))
9834
10211
  },
9835
10212
  row.id
9836
- )) : emptyData || /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
10213
+ )) : emptyData || /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
9837
10214
  TableCell,
9838
10215
  {
9839
10216
  colSpan: columns.length,
@@ -9846,7 +10223,7 @@ function DataTable({
9846
10223
  ) })
9847
10224
  },
9848
10225
  pageKey
9849
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TableBody, { className: cn(ui.tbody), children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime57.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)(
9850
10227
  TableRow,
9851
10228
  {
9852
10229
  "data-accent": dataAccent,
@@ -9856,13 +10233,13 @@ function DataTable({
9856
10233
  ui.tr,
9857
10234
  clickable ? ui.trClickable : void 0
9858
10235
  ),
9859
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime57.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)(
9860
10237
  cell.column.columnDef.cell,
9861
10238
  cell.getContext()
9862
10239
  ) }, cell.id))
9863
10240
  },
9864
10241
  row.id
9865
- )) : emptyData || /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
10242
+ )) : emptyData || /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
9866
10243
  TableCell,
9867
10244
  {
9868
10245
  colSpan: columns.length,
@@ -9874,11 +10251,11 @@ function DataTable({
9874
10251
  }
9875
10252
  ) }) })
9876
10253
  ] }) }),
9877
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ScrollBar, { orientation: "horizontal" })
10254
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ScrollBar, { orientation: "horizontal" })
9878
10255
  ] }) }),
9879
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: cn(ui.footer), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: cn(ui.footerInner), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-[1fr_auto] sm:items-center", children: [
9880
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: cn(ui.metaWrap), children: [
9881
- isRowsSelected && /* @__PURE__ */ (0, import_jsx_runtime57.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: [
9882
10259
  table.getFilteredSelectedRowModel().rows.length,
9883
10260
  " ",
9884
10261
  ofLabel,
@@ -9887,36 +10264,36 @@ function DataTable({
9887
10264
  " ",
9888
10265
  rowsSelectedLabel
9889
10266
  ] }),
9890
- typeof totalRows === "number" && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { children: [
10267
+ typeof totalRows === "number" && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
9891
10268
  "Total: ",
9892
10269
  totalRows,
9893
10270
  " registros"
9894
10271
  ] })
9895
10272
  ] }),
9896
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: cn(ui.controlsWrap), children: [
9897
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center gap-2", children: [
9898
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: cn(ui.pageSizeLabel), children: rowPerPageLabel }),
9899
- /* @__PURE__ */ (0, import_jsx_runtime57.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)(
9900
10277
  Select2,
9901
10278
  {
9902
10279
  value: `${pageSize}`,
9903
10280
  onValueChange: (v) => changePageSize(Number(v)),
9904
10281
  children: [
9905
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
10282
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
9906
10283
  SelectTrigger,
9907
10284
  {
9908
10285
  "data-accent": dataAccent,
9909
10286
  className: cn(ui.pageSizeTrigger),
9910
- children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectValue, { placeholder: `${pageSize}` })
10287
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectValue, { placeholder: `${pageSize}` })
9911
10288
  }
9912
10289
  ),
9913
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectContent, { side: "top", children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, import_jsx_runtime57.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)) })
9914
10291
  ]
9915
10292
  }
9916
10293
  )
9917
10294
  ] }),
9918
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center gap-2", children: [
9919
- /* @__PURE__ */ (0, import_jsx_runtime57.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: [
9920
10297
  pageLabel,
9921
10298
  " ",
9922
10299
  pageIndex + 1,
@@ -9925,7 +10302,7 @@ function DataTable({
9925
10302
  " ",
9926
10303
  safePageCount
9927
10304
  ] }),
9928
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
10305
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
9929
10306
  Button,
9930
10307
  {
9931
10308
  "data-accent": dataAccent,
@@ -9934,10 +10311,10 @@ function DataTable({
9934
10311
  className: cn("hidden lg:flex", ui.navButton),
9935
10312
  onClick: () => goToPage(0),
9936
10313
  disabled: pageIndex === 0,
9937
- children: /* @__PURE__ */ (0, import_jsx_runtime57.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" })
9938
10315
  }
9939
10316
  ),
9940
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
10317
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
9941
10318
  Button,
9942
10319
  {
9943
10320
  "data-accent": dataAccent,
@@ -9946,10 +10323,10 @@ function DataTable({
9946
10323
  className: cn(ui.navButton),
9947
10324
  onClick: () => goToPage(pageIndex - 1),
9948
10325
  disabled: pageIndex === 0,
9949
- children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react11.ChevronLeft, { className: "h-4 w-4" })
10326
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react12.ChevronLeft, { className: "h-4 w-4" })
9950
10327
  }
9951
10328
  ),
9952
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
10329
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
9953
10330
  Button,
9954
10331
  {
9955
10332
  "data-accent": dataAccent,
@@ -9958,10 +10335,10 @@ function DataTable({
9958
10335
  className: cn(ui.navButton),
9959
10336
  onClick: () => goToPage(pageIndex + 1),
9960
10337
  disabled: pageIndex + 1 >= safePageCount,
9961
- children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react11.ChevronRight, { className: "h-4 w-4" })
10338
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react12.ChevronRight, { className: "h-4 w-4" })
9962
10339
  }
9963
10340
  ),
9964
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
10341
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
9965
10342
  Button,
9966
10343
  {
9967
10344
  "data-accent": dataAccent,
@@ -9970,11 +10347,11 @@ function DataTable({
9970
10347
  className: cn("hidden lg:flex", ui.navButton),
9971
10348
  onClick: () => goToPage(safePageCount - 1),
9972
10349
  disabled: pageIndex + 1 >= safePageCount,
9973
- children: /* @__PURE__ */ (0, import_jsx_runtime57.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" })
9974
10351
  }
9975
10352
  )
9976
10353
  ] }),
9977
- /* @__PURE__ */ (0, import_jsx_runtime57.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: [
9978
10355
  pageLabel,
9979
10356
  " ",
9980
10357
  pageIndex + 1,
@@ -9991,7 +10368,7 @@ function DataTable({
9991
10368
  }
9992
10369
 
9993
10370
  // src/shared/data-table-skeleton.tsx
9994
- var import_jsx_runtime58 = require("react/jsx-runtime");
10371
+ var import_jsx_runtime60 = require("react/jsx-runtime");
9995
10372
  function DataTableSkeleton({
9996
10373
  columnCount,
9997
10374
  rowCount = 10,
@@ -9999,31 +10376,31 @@ function DataTableSkeleton({
9999
10376
  filterableColumnCount = 0,
10000
10377
  showViewOptions = true
10001
10378
  }) {
10002
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "w-full space-y-3 overflow-auto", children: [
10003
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex w-full items-center justify-between space-x-2 overflow-auto p-1", children: [
10004
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex flex-1 items-center space-x-2 space-y-4", children: [
10005
- searchableColumnCount > 0 ? Array.from({ length: searchableColumnCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Skeleton, { className: "h-10 w-37.5 lg:w-62.5" }, i)) : null,
10006
- filterableColumnCount > 0 ? Array.from({ length: filterableColumnCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime58.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
10007
10384
  ] }),
10008
- showViewOptions ? /* @__PURE__ */ (0, import_jsx_runtime58.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
10009
10386
  ] }),
10010
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "rounded-md border", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Table, { children: [
10011
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableHeader, { children: Array.from({ length: 1 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) }),
10012
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableBody, { children: Array.from({ length: rowCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime58.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)) })
10013
10390
  ] }) }),
10014
- /* @__PURE__ */ (0, import_jsx_runtime58.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: [
10015
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Skeleton, { className: "h-8 w-40" }) }),
10016
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex flex-col items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8", children: [
10017
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center space-x-2", children: [
10018
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Skeleton, { className: "h-8 w-24" }),
10019
- /* @__PURE__ */ (0, import_jsx_runtime58.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" })
10020
10397
  ] }),
10021
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex w-25 items-center justify-center text-sm font-medium", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Skeleton, { className: "h-8 w-20" }) }),
10022
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center space-x-2", children: [
10023
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Skeleton, { className: "hidden size-8 lg:block" }),
10024
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Skeleton, { className: "size-8" }),
10025
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Skeleton, { className: "size-8" }),
10026
- /* @__PURE__ */ (0, import_jsx_runtime58.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" })
10027
10404
  ] })
10028
10405
  ] })
10029
10406
  ] })
@@ -10032,7 +10409,7 @@ function DataTableSkeleton({
10032
10409
 
10033
10410
  // src/shared/dropzone.tsx
10034
10411
  var import_react_dropzone = require("react-dropzone");
10035
- var import_jsx_runtime59 = require("react/jsx-runtime");
10412
+ var import_jsx_runtime61 = require("react/jsx-runtime");
10036
10413
  function Dropzone({
10037
10414
  label,
10038
10415
  onChange,
@@ -10055,9 +10432,9 @@ function Dropzone({
10055
10432
  },
10056
10433
  accept
10057
10434
  }, options));
10058
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: cn("space-y-2", className), children: [
10059
- label && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: cn("font-medium", labelClassName), children: label }),
10060
- /* @__PURE__ */ (0, import_jsx_runtime59.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)(
10061
10438
  "div",
10062
10439
  __spreadProps(__spreadValues({}, getRootProps()), {
10063
10440
  className: cn(
@@ -10066,12 +10443,12 @@ function Dropzone({
10066
10443
  dropzoneClassName
10067
10444
  ),
10068
10445
  children: [
10069
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("input", __spreadValues({}, getInputProps())),
10070
- /* @__PURE__ */ (0, import_jsx_runtime59.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 })
10071
10448
  ]
10072
10449
  })
10073
10450
  ),
10074
- value && value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("ul", { className: cn("text-sm text-gray-700 space-y-1", valueClassName), children: value.map((file, idx) => /* @__PURE__ */ (0, import_jsx_runtime59.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: [
10075
10452
  "\u2022 ",
10076
10453
  file.name
10077
10454
  ] }, idx)) })
@@ -10080,10 +10457,10 @@ function Dropzone({
10080
10457
 
10081
10458
  // src/shared/fileupload.tsx
10082
10459
  var import_react_icons20 = require("@radix-ui/react-icons");
10083
- var import_lucide_react12 = require("lucide-react");
10084
- var import_react37 = require("react");
10460
+ var import_lucide_react13 = require("lucide-react");
10461
+ var import_react36 = require("react");
10085
10462
  var import_react_dropzone2 = require("react-dropzone");
10086
- var import_jsx_runtime60 = require("react/jsx-runtime");
10463
+ var import_jsx_runtime62 = require("react/jsx-runtime");
10087
10464
  function FileUpload({
10088
10465
  onChange,
10089
10466
  value = [],
@@ -10099,18 +10476,18 @@ function FileUpload({
10099
10476
  onChange(acceptedFiles);
10100
10477
  }
10101
10478
  }, options));
10102
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: cn("flex items-center justify-center", className), children: /* @__PURE__ */ (0, import_jsx_runtime60.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)(
10103
10480
  "div",
10104
10481
  {
10105
10482
  className: cn(
10106
10483
  "relative h-36 w-36 overflow-hidden rounded-full bg-gray-200 shadow-2xl",
10107
10484
  classNameContent
10108
10485
  ),
10109
- children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", __spreadProps(__spreadValues({}, getRootProps({ className: "dropzone cursor-pointer" })), { children: [
10110
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("input", __spreadValues({}, getInputProps())),
10111
- value.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ImagePreview, { file: value[0] }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react_icons20.AvatarIcon, { className: "h-36 w-36 text-gray-100" }),
10112
- /* @__PURE__ */ (0, import_jsx_runtime60.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: [
10113
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react12.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" }),
10114
10491
  label
10115
10492
  ] })
10116
10493
  ] }))
@@ -10118,15 +10495,15 @@ function FileUpload({
10118
10495
  ) });
10119
10496
  }
10120
10497
  function ImagePreview({ file }) {
10121
- const [objectUrl, setObjectUrl] = (0, import_react37.useState)(null);
10122
- (0, import_react37.useEffect)(() => {
10498
+ const [objectUrl, setObjectUrl] = (0, import_react36.useState)(null);
10499
+ (0, import_react36.useEffect)(() => {
10123
10500
  const url = URL.createObjectURL(file);
10124
10501
  setObjectUrl(url);
10125
10502
  return () => {
10126
10503
  URL.revokeObjectURL(url);
10127
10504
  };
10128
10505
  }, [file]);
10129
- return objectUrl ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
10506
+ return objectUrl ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
10130
10507
  "img",
10131
10508
  {
10132
10509
  src: objectUrl,
@@ -10137,23 +10514,23 @@ function ImagePreview({ file }) {
10137
10514
  }
10138
10515
 
10139
10516
  // src/shared/heading.tsx
10140
- var import_jsx_runtime61 = require("react/jsx-runtime");
10517
+ var import_jsx_runtime63 = require("react/jsx-runtime");
10141
10518
  function Heading({ title, description, className }) {
10142
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className, children: [
10143
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "text-lg font-bold tracking-tight text-primary sm:text-3xl", children: title }),
10144
- /* @__PURE__ */ (0, import_jsx_runtime61.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 })
10145
10522
  ] });
10146
10523
  }
10147
10524
 
10148
10525
  // src/shared/page-head.tsx
10149
10526
  var import_react_helmet_next = require("react-helmet-next");
10150
- var import_jsx_runtime62 = require("react/jsx-runtime");
10527
+ var import_jsx_runtime64 = require("react/jsx-runtime");
10151
10528
  function PageHead({ title = "shadcn-ui-react" }) {
10152
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react_helmet_next.Helmet, { children: /* @__PURE__ */ (0, import_jsx_runtime62.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 }) });
10153
10530
  }
10154
10531
 
10155
10532
  // src/shared/pagination-section.tsx
10156
- var import_jsx_runtime63 = require("react/jsx-runtime");
10533
+ var import_jsx_runtime65 = require("react/jsx-runtime");
10157
10534
  function PaginationSection({
10158
10535
  totalPosts,
10159
10536
  postsPerPage,
@@ -10191,17 +10568,17 @@ function PaginationSection({
10191
10568
  }
10192
10569
  };
10193
10570
  const renderPages = () => {
10194
- const renderedPages = activePages.map((page, idx) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
10571
+ const renderedPages = activePages.map((page, idx) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
10195
10572
  PaginationItem,
10196
10573
  {
10197
10574
  className: currentPage === page ? "rounded-md bg-primary" : "",
10198
- children: /* @__PURE__ */ (0, import_jsx_runtime63.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 })
10199
10576
  },
10200
10577
  idx
10201
10578
  ));
10202
10579
  if (activePages[0] > 1) {
10203
10580
  renderedPages.unshift(
10204
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
10581
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
10205
10582
  PaginationEllipsis,
10206
10583
  {
10207
10584
  onClick: () => setCurrentPage(activePages[0] - 1)
@@ -10212,7 +10589,7 @@ function PaginationSection({
10212
10589
  }
10213
10590
  if (activePages[activePages.length - 1] < pageNumbers.length) {
10214
10591
  renderedPages.push(
10215
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
10592
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
10216
10593
  PaginationEllipsis,
10217
10594
  {
10218
10595
  onClick: () => setCurrentPage(activePages[activePages.length - 1] + 1)
@@ -10223,21 +10600,21 @@ function PaginationSection({
10223
10600
  }
10224
10601
  return renderedPages;
10225
10602
  };
10226
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "p-4", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Pagination, { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(PaginationContent, { children: [
10227
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(PaginationItem, { children: [
10228
- /* @__PURE__ */ (0, import_jsx_runtime63.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)(
10229
10606
  PaginationPreviousLast,
10230
10607
  {
10231
10608
  onClick: handlePrevPageLast,
10232
10609
  size: void 0
10233
10610
  }
10234
10611
  ),
10235
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(PaginationPrevious, { onClick: handlePrevPage, size: void 0 })
10612
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(PaginationPrevious, { onClick: handlePrevPage, size: void 0 })
10236
10613
  ] }),
10237
10614
  renderPages(),
10238
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(PaginationItem, { children: [
10239
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(PaginationNext, { onClick: handleNextPage, size: void 0 }),
10240
- /* @__PURE__ */ (0, import_jsx_runtime63.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 })
10241
10618
  ] })
10242
10619
  ] }) }) });
10243
10620
  }
@@ -10361,7 +10738,9 @@ function PaginationSection({
10361
10738
  FormControl,
10362
10739
  FormDescription,
10363
10740
  FormField,
10741
+ FormFieldContext,
10364
10742
  FormItem,
10743
+ FormItemContext,
10365
10744
  FormLabel,
10366
10745
  FormMessage,
10367
10746
  FormSelect,
@@ -10489,14 +10868,17 @@ function PaginationSection({
10489
10868
  badgeVariants,
10490
10869
  buttonVariants,
10491
10870
  cn,
10871
+ getDefaultOptionLabel,
10872
+ getDefaultOptionValue,
10873
+ getErrorMessage,
10874
+ getNextEnabledIndex,
10492
10875
  iconButtonVariants,
10493
- inputVariants,
10494
10876
  navigationMenuTriggerStyle,
10877
+ normalizeSearchText,
10495
10878
  reducer,
10496
10879
  toast,
10497
10880
  toggleVariants,
10498
10881
  useFormField,
10499
10882
  useSidebar,
10500
- useToast,
10501
- variants
10883
+ useToast
10502
10884
  });