shadcn-ui-react 0.3.7 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -167,6 +167,7 @@ __export(index_exports, {
167
167
  FormItem: () => FormItem,
168
168
  FormLabel: () => FormLabel,
169
169
  FormMessage: () => FormMessage,
170
+ FormSelect: () => FormSelect,
170
171
  Heading: () => Heading,
171
172
  HoverCard: () => HoverCard,
172
173
  HoverCardContent: () => HoverCardContent,
@@ -283,12 +284,14 @@ __export(index_exports, {
283
284
  badgeVariants: () => badgeVariants,
284
285
  buttonVariants: () => buttonVariants,
285
286
  cn: () => cn,
287
+ inputVariants: () => inputVariants,
286
288
  navigationMenuTriggerStyle: () => navigationMenuTriggerStyle,
287
289
  reducer: () => reducer,
288
290
  toast: () => toast,
289
291
  toggleVariants: () => toggleVariants,
290
292
  useFormField: () => useFormField,
291
- useToast: () => useToast
293
+ useToast: () => useToast,
294
+ variants: () => variants
292
295
  });
293
296
  module.exports = __toCommonJS(index_exports);
294
297
 
@@ -5756,56 +5759,121 @@ var Form = ({
5756
5759
  };
5757
5760
 
5758
5761
  // src/components/Form/form-field.tsx
5759
- var import_react_hook_form2 = require("react-hook-form");
5760
5762
  var import_react33 = __toESM(require("react"), 1);
5761
-
5762
- // src/components/Label/label.tsx
5763
- var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
5764
- var import_class_variance_authority4 = require("class-variance-authority");
5765
- var React41 = __toESM(require("react"), 1);
5766
- var import_jsx_runtime17 = require("react/jsx-runtime");
5767
- var labelVariants = (0, import_class_variance_authority4.cva)(
5768
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-label"
5769
- );
5770
- var Label3 = React41.forwardRef((_a, ref) => {
5771
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5772
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5773
- LabelPrimitive.Root,
5774
- __spreadValues({
5775
- ref,
5776
- className: cn(labelVariants(), className)
5777
- }, props)
5778
- );
5779
- });
5780
- Label3.displayName = LabelPrimitive.Root.displayName;
5781
-
5782
- // src/components/Form/form-field.tsx
5763
+ var import_react_hook_form2 = require("react-hook-form");
5783
5764
  var import_react_slot3 = require("@radix-ui/react-slot");
5765
+ var import_lucide_react3 = require("lucide-react");
5784
5766
 
5785
5767
  // src/components/input.tsx
5786
- var React42 = __toESM(require("react"), 1);
5787
- var import_jsx_runtime18 = require("react/jsx-runtime");
5788
- var Input = React42.forwardRef(
5768
+ var React41 = __toESM(require("react"), 1);
5769
+ var import_lucide_react2 = require("lucide-react");
5770
+ var import_jsx_runtime17 = require("react/jsx-runtime");
5771
+ var Input = React41.forwardRef(
5789
5772
  (_a, ref) => {
5790
- var _b = _a, { className, classNameDefault, type } = _b, props = __objRest(_b, ["className", "classNameDefault", "type"]);
5791
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5792
- "input",
5793
- __spreadValues({
5794
- type,
5795
- className: classNameDefault ? cn(
5796
- "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
5797
- className
5798
- ) : className,
5799
- ref
5800
- }, props)
5801
- );
5773
+ var _b = _a, {
5774
+ className,
5775
+ variant = "outline",
5776
+ size = "md",
5777
+ leading,
5778
+ trailing,
5779
+ invalid = false,
5780
+ disabled
5781
+ } = _b, props = __objRest(_b, [
5782
+ "className",
5783
+ "variant",
5784
+ "size",
5785
+ "leading",
5786
+ "trailing",
5787
+ "invalid",
5788
+ "disabled"
5789
+ ]);
5790
+ const base = "block w-full bg-transparent text-foreground placeholder:text-muted-foreground outline-none transition disabled:opacity-50 disabled:cursor-not-allowed";
5791
+ const sizeCls = size === "sm" ? "h-9 px-3 text-sm" : size === "lg" ? "h-12 px-5 text-base" : "h-11 px-4 text-sm";
5792
+ const variants2 = {
5793
+ 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",
5794
+ 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",
5795
+ ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
5796
+ 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",
5797
+ flushed: (
5798
+ // sin bordes laterales/superior, solo inferior; sin sombras ni radios
5799
+ "rounded-none border-0 border-b border-input px-0 shadow-none focus:border-b-2 focus:border-primary focus:ring-0"
5800
+ ),
5801
+ unstyled: (
5802
+ // sin estilos, útil para inputs embebidos o controles muy custom
5803
+ "border-0 shadow-none focus:ring-0"
5804
+ ),
5805
+ link: (
5806
+ // aspecto tipo enlace: inline height-auto, sin paddings ni borde
5807
+ "border-0 p-0 h-auto shadow-none bg-transparent text-primary underline-offset-4 focus:underline focus:ring-0"
5808
+ )
5809
+ };
5810
+ const errorCls = invalid ? "border-destructive focus:border-destructive focus:ring-destructive/20" : "";
5811
+ const iconPadLeft = leading && variant !== "flushed" && variant !== "link" ? size === "lg" ? "pl-12" : "pl-10" : "";
5812
+ const iconPadRight = trailing && variant !== "flushed" && variant !== "link" ? size === "lg" ? "pr-12" : "pr-10" : "";
5813
+ const specialSizeForFlushed = variant === "flushed" ? size === "sm" ? "h-9 text-sm" : size === "lg" ? "h-12 text-base" : "h-11 text-sm" : "";
5814
+ const specialSizeForLink = variant === "link" ? "text-sm" : "";
5815
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: cn("relative", disabled && "opacity-80"), children: [
5816
+ leading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5817
+ "span",
5818
+ {
5819
+ className: cn(
5820
+ "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 opacity-60",
5821
+ size === "lg" ? "text-[1.15rem]" : "text-[1rem]",
5822
+ // no desplazamos visualmente en variantes sin padding
5823
+ variant === "flushed" || variant === "link" ? "hidden" : ""
5824
+ ),
5825
+ children: leading
5826
+ }
5827
+ ) : null,
5828
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5829
+ "input",
5830
+ __spreadValues({
5831
+ ref,
5832
+ "aria-invalid": invalid || void 0,
5833
+ disabled,
5834
+ className: cn(
5835
+ base,
5836
+ variants2[variant],
5837
+ variant === "flushed" ? specialSizeForFlushed : variant === "link" ? specialSizeForLink : sizeCls,
5838
+ errorCls,
5839
+ iconPadLeft,
5840
+ iconPadRight,
5841
+ className
5842
+ )
5843
+ }, props)
5844
+ ),
5845
+ trailing ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5846
+ "span",
5847
+ {
5848
+ className: cn(
5849
+ "absolute right-3 top-1/2 -translate-y-1/2 opacity-70",
5850
+ size === "lg" ? "text-[1.15rem]" : "text-[1rem]",
5851
+ variant === "flushed" || variant === "link" ? "hidden" : ""
5852
+ ),
5853
+ children: trailing
5854
+ }
5855
+ ) : null
5856
+ ] });
5802
5857
  }
5803
5858
  );
5804
5859
  Input.displayName = "Input";
5860
+ Input.displayName = "Input";
5805
5861
 
5806
5862
  // src/components/Form/form-field.tsx
5807
- var import_lucide_react2 = require("lucide-react");
5808
- var import_jsx_runtime19 = require("react/jsx-runtime");
5863
+ var import_jsx_runtime18 = require("react/jsx-runtime");
5864
+ var inputVariants = {
5865
+ 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",
5866
+ 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",
5867
+ ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
5868
+ 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",
5869
+ // sin bordes laterales/superior, solo inferior; sin sombras ni radios
5870
+ flushed: "rounded-none border-0 border-b border-input px-0 shadow-none focus:border-b-2 focus:border-primary focus:ring-0",
5871
+ // sin estilos, útil para inputs embebidos o controles muy custom
5872
+ unstyled: "border-0 shadow-none focus:ring-0",
5873
+ // aspecto tipo enlace: inline height-auto, sin paddings ni borde
5874
+ link: "border-0 p-0 h-auto shadow-none bg-transparent text-primary underline-offset-4 focus:underline focus:ring-0"
5875
+ };
5876
+ var variants = inputVariants;
5809
5877
  var FormFieldContext = import_react33.default.createContext(
5810
5878
  null
5811
5879
  );
@@ -5816,11 +5884,13 @@ var FormField = (_a) => {
5816
5884
  label,
5817
5885
  placeholder,
5818
5886
  requiredLabel,
5819
- className = "px-4 py-6 shadow-inner drop-shadow-xl",
5887
+ className,
5820
5888
  classNameDefault,
5821
5889
  labelClassName,
5822
5890
  messageClassName,
5823
5891
  requiredLabelClassName,
5892
+ variant = "outline",
5893
+ size = "md",
5824
5894
  rules,
5825
5895
  shouldUnregister,
5826
5896
  defaultValue,
@@ -5836,6 +5906,8 @@ var FormField = (_a) => {
5836
5906
  "labelClassName",
5837
5907
  "messageClassName",
5838
5908
  "requiredLabelClassName",
5909
+ "variant",
5910
+ "size",
5839
5911
  "rules",
5840
5912
  "shouldUnregister",
5841
5913
  "defaultValue",
@@ -5846,7 +5918,7 @@ var FormField = (_a) => {
5846
5918
  formState: { errors }
5847
5919
  } = (0, import_react_hook_form2.useFormContext)();
5848
5920
  const fieldError = (_a2 = errors[name]) == null ? void 0 : _a2.message;
5849
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FormFieldContext.Provider, { value: { name }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
5921
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FormFieldContext.Provider, { value: { name }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5850
5922
  import_react_hook_form2.Controller,
5851
5923
  {
5852
5924
  control,
@@ -5854,20 +5926,29 @@ var FormField = (_a) => {
5854
5926
  rules,
5855
5927
  shouldUnregister,
5856
5928
  defaultValue,
5857
- render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(FormItem, { children: [
5858
- label && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(FormLabel, { className: cn("flex items-center self-center gap-0", labelClassName), children: [
5859
- label,
5860
- requiredLabel && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
5861
- import_lucide_react2.Asterisk,
5862
- {
5863
- className: cn(
5864
- "h-3 w-3 text-red-500 ml-[1px]",
5865
- requiredLabelClassName
5929
+ render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(FormItem, { children: [
5930
+ label && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
5931
+ FormLabel,
5932
+ {
5933
+ className: cn(
5934
+ "flex items-center gap-0 self-center",
5935
+ labelClassName
5936
+ ),
5937
+ children: [
5938
+ label,
5939
+ requiredLabel && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5940
+ import_lucide_react3.Asterisk,
5941
+ {
5942
+ className: cn(
5943
+ "ml-[1px] h-3 w-3 text-red-500",
5944
+ requiredLabelClassName
5945
+ )
5946
+ }
5866
5947
  )
5867
- }
5868
- )
5869
- ] }),
5870
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
5948
+ ]
5949
+ }
5950
+ ),
5951
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5871
5952
  Input,
5872
5953
  __spreadProps(__spreadValues(__spreadValues({}, field), inputProps), {
5873
5954
  onChange: (e) => {
@@ -5875,11 +5956,11 @@ var FormField = (_a) => {
5875
5956
  onChange == null ? void 0 : onChange(e.target.value);
5876
5957
  },
5877
5958
  placeholder,
5878
- className,
5959
+ className: cn("bg-input px-[0.9rem] py-5", className),
5879
5960
  classNameDefault: classNameDefault != null ? classNameDefault : true
5880
5961
  })
5881
5962
  ) }),
5882
- fieldError && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FormMessage, { className: messageClassName, children: fieldError })
5963
+ fieldError && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FormMessage, { className: messageClassName, children: fieldError })
5883
5964
  ] })
5884
5965
  }
5885
5966
  ) });
@@ -5890,30 +5971,27 @@ var FormItemContext = import_react33.default.createContext(
5890
5971
  var FormItem = import_react33.default.forwardRef((_a, ref) => {
5891
5972
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5892
5973
  const id = import_react33.default.useId();
5893
- 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)) });
5974
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", __spreadValues({ ref, className: cn("space-y-2", className) }, props)) });
5894
5975
  });
5895
5976
  FormItem.displayName = "FormItem";
5896
- var FormLabel = import_react33.default.forwardRef((_a, ref) => {
5897
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5898
- const { error, formItemId } = useFormField();
5899
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
5900
- Label3,
5901
- __spreadValues({
5902
- ref,
5903
- className: cn(error && "text-destructive", className),
5904
- htmlFor: formItemId
5905
- }, props)
5906
- );
5907
- });
5908
- FormLabel.displayName = "FormLabel";
5909
5977
  var useFormField = () => {
5910
5978
  const fieldContext = import_react33.default.useContext(FormFieldContext);
5911
5979
  const itemContext = import_react33.default.useContext(FormItemContext);
5912
5980
  const { getFieldState, formState } = (0, import_react_hook_form2.useFormContext)();
5981
+ if (!(itemContext == null ? void 0 : itemContext.id)) {
5982
+ const id2 = import_react33.default.useId();
5983
+ return {
5984
+ id: id2,
5985
+ formItemId: `${id2}-form-item`,
5986
+ formDescriptionId: `${id2}-form-item-description`,
5987
+ formMessageId: `${id2}-form-item-message`,
5988
+ error: null
5989
+ };
5990
+ }
5913
5991
  if (!fieldContext) {
5914
5992
  const { id: id2 } = itemContext;
5915
5993
  return {
5916
- id: itemContext.id,
5994
+ id: id2,
5917
5995
  formItemId: `${id2}-form-item`,
5918
5996
  formDescriptionId: `${id2}-form-item-description`,
5919
5997
  formMessageId: `${id2}-form-item-message`,
@@ -5921,9 +5999,6 @@ var useFormField = () => {
5921
5999
  };
5922
6000
  }
5923
6001
  const fieldState = getFieldState(fieldContext.name, formState);
5924
- if (!fieldContext) {
5925
- throw new Error("useFormField should be used within <FormField>");
5926
- }
5927
6002
  const { id } = itemContext;
5928
6003
  return __spreadValues({
5929
6004
  id,
@@ -5933,10 +6008,23 @@ var useFormField = () => {
5933
6008
  formMessageId: `${id}-form-item-message`
5934
6009
  }, fieldState);
5935
6010
  };
6011
+ var FormLabel = import_react33.default.forwardRef((_a, ref) => {
6012
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6013
+ const { error, formItemId } = useFormField();
6014
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6015
+ Label3,
6016
+ __spreadValues({
6017
+ ref,
6018
+ className: cn(error && "text-destructive", className),
6019
+ htmlFor: formItemId
6020
+ }, props)
6021
+ );
6022
+ });
6023
+ FormLabel.displayName = "FormLabel";
5936
6024
  var FormControl = import_react33.default.forwardRef((_a, ref) => {
5937
6025
  var props = __objRest(_a, []);
5938
6026
  const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
5939
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6027
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5940
6028
  import_react_slot3.Slot,
5941
6029
  __spreadValues({
5942
6030
  ref,
@@ -5950,12 +6038,12 @@ FormControl.displayName = "FormControl";
5950
6038
  var FormDescription = import_react33.default.forwardRef((_a, ref) => {
5951
6039
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5952
6040
  const { formDescriptionId } = useFormField();
5953
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6041
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5954
6042
  "p",
5955
6043
  __spreadValues({
5956
6044
  ref,
5957
6045
  id: formDescriptionId,
5958
- className: cn("text-[0.8rem] text-muted-foreground", className)
6046
+ className: cn("text-muted-foreground text-[0.8rem]", className)
5959
6047
  }, props)
5960
6048
  );
5961
6049
  });
@@ -5963,32 +6051,193 @@ FormDescription.displayName = "FormDescription";
5963
6051
  var FormMessage = import_react33.default.forwardRef((_a, ref) => {
5964
6052
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
5965
6053
  const { error, formMessageId } = useFormField();
5966
- const body = error ? String(error == null ? void 0 : error.message) : children;
5967
- if (!body) {
5968
- return null;
5969
- }
5970
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6054
+ const body = error ? error == null ? void 0 : error.message : children;
6055
+ if (!body) return null;
6056
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5971
6057
  "p",
5972
6058
  __spreadProps(__spreadValues({
5973
6059
  ref,
5974
6060
  id: formMessageId,
5975
- className: cn("text-[0.8rem] font-medium text-destructive", className)
6061
+ className: cn("text-destructive text-[0.8rem] font-medium", className)
5976
6062
  }, props), {
5977
6063
  children: body
5978
6064
  })
5979
6065
  );
5980
6066
  });
5981
6067
  FormMessage.displayName = "FormMessage";
6068
+ var FormSelect = ({
6069
+ name,
6070
+ control,
6071
+ rules,
6072
+ shouldUnregister,
6073
+ defaultValue,
6074
+ placeholder,
6075
+ label,
6076
+ requiredLabel,
6077
+ className,
6078
+ contentClassName,
6079
+ labelClassName,
6080
+ messageClassName,
6081
+ requiredLabelClassName,
6082
+ items,
6083
+ children,
6084
+ onChange,
6085
+ disabled,
6086
+ size = "md",
6087
+ variant = "outline",
6088
+ invalid,
6089
+ searchable = false,
6090
+ searchPlaceholder = "Buscar\u2026"
6091
+ }) => {
6092
+ var _a;
6093
+ const {
6094
+ formState: { errors }
6095
+ } = (0, import_react_hook_form2.useFormContext)();
6096
+ const triggerBase = "relative inline-flex w-full items-center justify-between outline-none transition disabled:opacity-50 disabled:cursor-not-allowed text-foreground placeholder:text-muted-foreground ring-offset-background";
6097
+ const sizeTrigger = {
6098
+ sm: "h-9 px-3 text-sm",
6099
+ md: "h-11 px-4 text-sm",
6100
+ lg: "h-12 px-5 text-base"
6101
+ };
6102
+ const errorCls = invalid ? "ring-destructive focus:ring-destructive/40 border-destructive" : "";
6103
+ const specialFlushed = variant === "flushed" ? size === "sm" ? "h-9 text-sm" : size === "lg" ? "h-12 text-base" : "h-11 text-sm" : "";
6104
+ const specialLink = variant === "link" ? "text-sm" : "";
6105
+ const contentBase = "bg-popover text-popover-foreground border border-border rounded-md shadow-md";
6106
+ const itemSize = {
6107
+ sm: "h-8 text-sm",
6108
+ md: "h-9 text-sm",
6109
+ lg: "h-10 text-base"
6110
+ };
6111
+ const fieldError = (_a = errors[name]) == null ? void 0 : _a.message;
6112
+ const [query, setQuery] = import_react33.default.useState("");
6113
+ const getOptionText = import_react33.default.useCallback((opt) => {
6114
+ var _a2;
6115
+ if (typeof opt.label === "string") return opt.label.toLowerCase();
6116
+ const extra = typeof ((_a2 = opt == null ? void 0 : opt.data) == null ? void 0 : _a2.search) === "string" ? opt.data.search.toLowerCase() : "";
6117
+ return `${opt.value}${extra}`.toLowerCase();
6118
+ }, []);
6119
+ const searchRef = import_react33.default.useRef(null);
6120
+ const filteredItems = import_react33.default.useMemo(() => {
6121
+ if (!items) return items;
6122
+ if (!searchable || !query.trim()) return items;
6123
+ const q = query.trim().toLowerCase();
6124
+ return items.filter((opt) => getOptionText(opt).includes(q));
6125
+ }, [items, searchable, query, getOptionText]);
6126
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FormFieldContext.Provider, { value: { name }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6127
+ import_react_hook_form2.Controller,
6128
+ {
6129
+ control,
6130
+ name,
6131
+ rules,
6132
+ shouldUnregister,
6133
+ defaultValue,
6134
+ render: ({ field }) => {
6135
+ var _a2, _b, _c;
6136
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(FormItem, { children: [
6137
+ label && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
6138
+ FormLabel,
6139
+ {
6140
+ className: cn("flex items-center gap-0", labelClassName),
6141
+ children: [
6142
+ label,
6143
+ requiredLabel && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6144
+ import_lucide_react3.Asterisk,
6145
+ {
6146
+ className: cn(
6147
+ "ml-[4px] h-3 w-3 text-red-500",
6148
+ requiredLabelClassName
6149
+ )
6150
+ }
6151
+ )
6152
+ ]
6153
+ }
6154
+ ),
6155
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
6156
+ Select2,
6157
+ {
6158
+ value: (_a2 = field.value) != null ? _a2 : "",
6159
+ onValueChange: (v) => {
6160
+ field.onChange(v);
6161
+ onChange == null ? void 0 : onChange(v);
6162
+ },
6163
+ disabled,
6164
+ children: [
6165
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6166
+ SelectTrigger,
6167
+ {
6168
+ className: cn(
6169
+ triggerBase,
6170
+ variants[variant],
6171
+ variant === "flushed" ? specialFlushed : variant === "link" ? specialLink : sizeTrigger[size],
6172
+ errorCls,
6173
+ className
6174
+ ),
6175
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectValue, { placeholder })
6176
+ }
6177
+ ) }),
6178
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
6179
+ SelectContent,
6180
+ {
6181
+ className: cn(contentBase, contentClassName),
6182
+ onCloseAutoFocus: (e) => {
6183
+ e.preventDefault();
6184
+ requestAnimationFrame(() => {
6185
+ var _a3;
6186
+ return (_a3 = searchRef.current) == null ? void 0 : _a3.focus();
6187
+ });
6188
+ },
6189
+ children: [
6190
+ searchable && ((_b = items == null ? void 0 : items.length) != null ? _b : 0) > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "border-border bg-popover sticky top-0 border-b p-2", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6191
+ "input",
6192
+ {
6193
+ ref: searchRef,
6194
+ autoFocus: true,
6195
+ value: query,
6196
+ onChange: (e) => setQuery(e.target.value),
6197
+ placeholder: searchPlaceholder,
6198
+ className: cn(
6199
+ "border-input bg-input focus:ring-primary/20 w-full rounded-md border px-3 py-2 text-sm outline-none focus:ring-2"
6200
+ ),
6201
+ onKeyDown: (e) => {
6202
+ if (e.key !== "Escape") e.stopPropagation();
6203
+ },
6204
+ onPointerDown: (e) => e.stopPropagation(),
6205
+ onClick: (e) => e.stopPropagation()
6206
+ }
6207
+ ) }),
6208
+ children && !searchable ? children : (_c = filteredItems != null ? filteredItems : items) == null ? void 0 : _c.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6209
+ SelectItem,
6210
+ {
6211
+ value: opt.value,
6212
+ disabled: opt.disabled,
6213
+ className: cn(itemSize[size]),
6214
+ children: opt.label
6215
+ },
6216
+ opt.value
6217
+ ))
6218
+ ]
6219
+ }
6220
+ )
6221
+ ]
6222
+ }
6223
+ ),
6224
+ fieldError && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FormMessage, { className: messageClassName, children: fieldError })
6225
+ ] });
6226
+ }
6227
+ }
6228
+ ) });
6229
+ };
6230
+ FormSelect.displayName = "FormSelect";
5982
6231
 
5983
6232
  // src/components/hover-card.tsx
5984
6233
  var HoverCardPrimitive = __toESM(require("@radix-ui/react-hover-card"), 1);
5985
- var React44 = __toESM(require("react"), 1);
5986
- var import_jsx_runtime20 = require("react/jsx-runtime");
6234
+ var React43 = __toESM(require("react"), 1);
6235
+ var import_jsx_runtime19 = require("react/jsx-runtime");
5987
6236
  var HoverCard = HoverCardPrimitive.Root;
5988
6237
  var HoverCardTrigger = HoverCardPrimitive.Trigger;
5989
- var HoverCardContent = React44.forwardRef((_a, ref) => {
6238
+ var HoverCardContent = React43.forwardRef((_a, ref) => {
5990
6239
  var _b = _a, { className, align = "center", sideOffset = 4 } = _b, props = __objRest(_b, ["className", "align", "sideOffset"]);
5991
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6240
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
5992
6241
  HoverCardPrimitive.Content,
5993
6242
  __spreadValues({
5994
6243
  ref,
@@ -6004,46 +6253,46 @@ var HoverCardContent = React44.forwardRef((_a, ref) => {
6004
6253
  HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
6005
6254
 
6006
6255
  // src/components/icons.tsx
6007
- var import_lucide_react3 = require("lucide-react");
6256
+ var import_lucide_react4 = require("lucide-react");
6008
6257
  var IconsApp = {
6009
- dashboard: import_lucide_react3.LayoutDashboardIcon,
6010
- logo: import_lucide_react3.Command,
6011
- login: import_lucide_react3.LogIn,
6012
- close: import_lucide_react3.X,
6013
- profile: import_lucide_react3.User2Icon,
6014
- spinner: import_lucide_react3.Loader2,
6015
- kanban: import_lucide_react3.CircuitBoardIcon,
6016
- chevronLeft: import_lucide_react3.ChevronLeft,
6017
- chevronRight: import_lucide_react3.ChevronRight,
6018
- trash: import_lucide_react3.Trash,
6019
- employee: import_lucide_react3.UserX2Icon,
6020
- post: import_lucide_react3.FileText,
6021
- page: import_lucide_react3.File,
6022
- media: import_lucide_react3.Image,
6023
- settings: import_lucide_react3.Settings,
6024
- billing: import_lucide_react3.CreditCard,
6025
- ellipsis: import_lucide_react3.MoreVertical,
6026
- add: import_lucide_react3.Plus,
6027
- warning: import_lucide_react3.AlertTriangle,
6028
- user: import_lucide_react3.User,
6029
- arrowRight: import_lucide_react3.ArrowRight,
6030
- help: import_lucide_react3.HelpCircle,
6031
- pizza: import_lucide_react3.Pizza,
6032
- sun: import_lucide_react3.SunMedium,
6033
- moon: import_lucide_react3.Moon,
6034
- laptop: import_lucide_react3.Laptop,
6035
- check: import_lucide_react3.Check
6258
+ dashboard: import_lucide_react4.LayoutDashboardIcon,
6259
+ logo: import_lucide_react4.Command,
6260
+ login: import_lucide_react4.LogIn,
6261
+ close: import_lucide_react4.X,
6262
+ profile: import_lucide_react4.User2Icon,
6263
+ spinner: import_lucide_react4.Loader2,
6264
+ kanban: import_lucide_react4.CircuitBoardIcon,
6265
+ chevronLeft: import_lucide_react4.ChevronLeft,
6266
+ chevronRight: import_lucide_react4.ChevronRight,
6267
+ trash: import_lucide_react4.Trash,
6268
+ employee: import_lucide_react4.UserX2Icon,
6269
+ post: import_lucide_react4.FileText,
6270
+ page: import_lucide_react4.File,
6271
+ media: import_lucide_react4.Image,
6272
+ settings: import_lucide_react4.Settings,
6273
+ billing: import_lucide_react4.CreditCard,
6274
+ ellipsis: import_lucide_react4.MoreVertical,
6275
+ add: import_lucide_react4.Plus,
6276
+ warning: import_lucide_react4.AlertTriangle,
6277
+ user: import_lucide_react4.User,
6278
+ arrowRight: import_lucide_react4.ArrowRight,
6279
+ help: import_lucide_react4.HelpCircle,
6280
+ pizza: import_lucide_react4.Pizza,
6281
+ sun: import_lucide_react4.SunMedium,
6282
+ moon: import_lucide_react4.Moon,
6283
+ laptop: import_lucide_react4.Laptop,
6284
+ check: import_lucide_react4.Check
6036
6285
  };
6037
6286
  var Icons = IconsApp;
6038
6287
 
6039
6288
  // src/components/input-otp.tsx
6040
6289
  var import_react_icons9 = require("@radix-ui/react-icons");
6041
6290
  var import_input_otp = require("input-otp");
6042
- var React45 = __toESM(require("react"), 1);
6043
- var import_jsx_runtime21 = require("react/jsx-runtime");
6044
- var InputOTP = React45.forwardRef((_a, ref) => {
6291
+ var React44 = __toESM(require("react"), 1);
6292
+ var import_jsx_runtime20 = require("react/jsx-runtime");
6293
+ var InputOTP = React44.forwardRef((_a, ref) => {
6045
6294
  var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
6046
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6295
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6047
6296
  import_input_otp.OTPInput,
6048
6297
  __spreadValues({
6049
6298
  ref,
@@ -6056,16 +6305,16 @@ var InputOTP = React45.forwardRef((_a, ref) => {
6056
6305
  );
6057
6306
  });
6058
6307
  InputOTP.displayName = "InputOTP";
6059
- var InputOTPGroup = React45.forwardRef((_a, ref) => {
6308
+ var InputOTPGroup = React44.forwardRef((_a, ref) => {
6060
6309
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6061
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", __spreadValues({ ref, className: cn("flex items-center", className) }, props));
6310
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", __spreadValues({ ref, className: cn("flex items-center", className) }, props));
6062
6311
  });
6063
6312
  InputOTPGroup.displayName = "InputOTPGroup";
6064
- var InputOTPSlot = React45.forwardRef((_a, ref) => {
6313
+ var InputOTPSlot = React44.forwardRef((_a, ref) => {
6065
6314
  var _b = _a, { index, className } = _b, props = __objRest(_b, ["index", "className"]);
6066
- const inputOTPContext = React45.useContext(import_input_otp.OTPInputContext);
6315
+ const inputOTPContext = React44.useContext(import_input_otp.OTPInputContext);
6067
6316
  const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
6068
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
6317
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
6069
6318
  "div",
6070
6319
  __spreadProps(__spreadValues({
6071
6320
  ref,
@@ -6077,18 +6326,38 @@ var InputOTPSlot = React45.forwardRef((_a, ref) => {
6077
6326
  }, props), {
6078
6327
  children: [
6079
6328
  char,
6080
- hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "animate-caret-blink h-4 w-px bg-foreground duration-1000" }) })
6329
+ hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "animate-caret-blink h-4 w-px bg-foreground duration-1000" }) })
6081
6330
  ]
6082
6331
  })
6083
6332
  );
6084
6333
  });
6085
6334
  InputOTPSlot.displayName = "InputOTPSlot";
6086
- var InputOTPSeparator = React45.forwardRef((_a, ref) => {
6335
+ var InputOTPSeparator = React44.forwardRef((_a, ref) => {
6087
6336
  var props = __objRest(_a, []);
6088
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", __spreadProps(__spreadValues({ ref, role: "separator" }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_icons9.DashIcon, {}) }));
6337
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", __spreadProps(__spreadValues({ ref, role: "separator" }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_icons9.DashIcon, {}) }));
6089
6338
  });
6090
6339
  InputOTPSeparator.displayName = "InputOTPSeparator";
6091
6340
 
6341
+ // src/components/Label/label.tsx
6342
+ var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
6343
+ var import_class_variance_authority4 = require("class-variance-authority");
6344
+ var React45 = __toESM(require("react"), 1);
6345
+ var import_jsx_runtime21 = require("react/jsx-runtime");
6346
+ var labelVariants = (0, import_class_variance_authority4.cva)(
6347
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-label"
6348
+ );
6349
+ var Label3 = React45.forwardRef((_a, ref) => {
6350
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
6351
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6352
+ LabelPrimitive.Root,
6353
+ __spreadValues({
6354
+ ref,
6355
+ className: cn(labelVariants(), className)
6356
+ }, props)
6357
+ );
6358
+ });
6359
+ Label3.displayName = LabelPrimitive.Root.displayName;
6360
+
6092
6361
  // src/components/menubar.tsx
6093
6362
  var import_react_icons10 = require("@radix-ui/react-icons");
6094
6363
  var MenubarPrimitive = __toESM(require("@radix-ui/react-menubar"), 1);
@@ -6417,7 +6686,7 @@ NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayN
6417
6686
  // src/components/pagination.tsx
6418
6687
  var import_react_icons12 = require("@radix-ui/react-icons");
6419
6688
  var React48 = __toESM(require("react"), 1);
6420
- var import_lucide_react4 = require("lucide-react");
6689
+ var import_lucide_react5 = require("lucide-react");
6421
6690
  var import_jsx_runtime25 = require("react/jsx-runtime");
6422
6691
  var Pagination = (_a) => {
6423
6692
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
@@ -6486,7 +6755,7 @@ var PaginationPreviousLast = (_a) => {
6486
6755
  className: cn("gap-1 pl-2.5", className)
6487
6756
  }, props), {
6488
6757
  children: [
6489
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react4.ChevronLeft, { className: "h-4 w-4" }),
6758
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react5.ChevronLeft, { className: "h-4 w-4" }),
6490
6759
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", children: "Previous Last" })
6491
6760
  ]
6492
6761
  })
@@ -6550,7 +6819,7 @@ var PaginationNextLast = (_a) => {
6550
6819
  }, props), {
6551
6820
  children: [
6552
6821
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", children: "Next Last" }),
6553
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react4.ChevronRight, { className: "h-4 w-4" })
6822
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react5.ChevronRight, { className: "h-4 w-4" })
6554
6823
  ]
6555
6824
  })
6556
6825
  );
@@ -7668,13 +7937,13 @@ var AlertModal = ({
7668
7937
  };
7669
7938
 
7670
7939
  // src/shared/breadcrumbs.tsx
7671
- var import_lucide_react5 = require("lucide-react");
7940
+ var import_lucide_react6 = require("lucide-react");
7672
7941
  var import_react35 = require("react");
7673
7942
  var import_jsx_runtime47 = require("react/jsx-runtime");
7674
7943
  function Breadcrumbs({ items, className, classNameList }) {
7675
7944
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Breadcrumb, { className, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbList, { className: classNameList, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react35.Fragment, { children: [
7676
7945
  index !== items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbLink, { href: item.link, children: item.title }) }),
7677
- index < items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbSeparator, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react5.Slash, {}) }),
7946
+ index < items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbSeparator, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react6.Slash, {}) }),
7678
7947
  index === items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbPage, { children: item.title })
7679
7948
  ] }, item.title)) }) });
7680
7949
  }
@@ -7683,7 +7952,7 @@ function Breadcrumbs({ items, className, classNameList }) {
7683
7952
  var import_react36 = __toESM(require("react"), 1);
7684
7953
  var import_react_icons18 = require("@radix-ui/react-icons");
7685
7954
  var import_react_table = require("@tanstack/react-table");
7686
- var import_lucide_react6 = require("lucide-react");
7955
+ var import_lucide_react7 = require("lucide-react");
7687
7956
  var import_jsx_runtime48 = require("react/jsx-runtime");
7688
7957
  function DataTable({
7689
7958
  columns,
@@ -7736,13 +8005,13 @@ function DataTable({
7736
8005
  }
7737
8006
  }, [pagination]);
7738
8007
  return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
7739
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "rounded-md border", children: [
7740
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Table, { className: cn("relative", tableClassName), children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableHeader, { className: headerClassName, children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableRow, { className: rowClassName, children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableHead, { className: headerClassName, children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
7741
- header.column.columnDef.header,
7742
- header.getContext()
7743
- ) }, header.id)) }, headerGroup.id)) }) }),
7744
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(ScrollArea, { className: "h-[calc(80vh-220px)] md:h-[calc(80dvh-80px)]", children: [
7745
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Table, { className: cn("relative", tableClassName), children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableBody, { className: bodyClassName, children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
8008
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: cn("rounded-md border", className), children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(ScrollArea, { className: "h-[calc(80vh-220px)] md:h-[calc(80dvh-80px)]", children: [
8009
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Table, { className: cn("relative", tableClassName), children: [
8010
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableHeader, { className: headerClassName, children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableRow, { className: rowClassName, children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableHead, { className: headerClassName, children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
8011
+ header.column.columnDef.header,
8012
+ header.getContext()
8013
+ ) }, header.id)) }, headerGroup.id)) }),
8014
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableBody, { className: bodyClassName, children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7746
8015
  TableRow,
7747
8016
  {
7748
8017
  "data-state": row.getIsSelected() ? "selected" : void 0,
@@ -7761,48 +8030,10 @@ function DataTable({
7761
8030
  className: "h-24 text-center",
7762
8031
  children: "No results."
7763
8032
  }
7764
- ) }) }) }),
7765
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ScrollBar, { orientation: "horizontal" })
7766
- ] })
7767
- ] }),
7768
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
7769
- ScrollArea,
7770
- {
7771
- className: cn(
7772
- "h-[calc(80vh-220px)] rounded-md border md:h-[calc(80dvh-80px)]",
7773
- className
7774
- ),
7775
- children: [
7776
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Table, { className: cn("relative", tableClassName), children: [
7777
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableHeader, { className: headerClassName, children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableRow, { className: rowClassName, children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableHead, { className: headerClassName, children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
7778
- header.column.columnDef.header,
7779
- header.getContext()
7780
- ) }, header.id)) }, headerGroup.id)) }),
7781
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableBody, { className: bodyClassName, children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7782
- TableRow,
7783
- {
7784
- "data-state": row.getIsSelected() ? "selected" : void 0,
7785
- onClick: () => onClickItem(row.original),
7786
- className: rowClassName,
7787
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableCell, { className: cellClassName, children: (0, import_react_table.flexRender)(
7788
- cell.column.columnDef.cell,
7789
- cell.getContext()
7790
- ) }, cell.id))
7791
- },
7792
- row.id
7793
- )) : emptyData || /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7794
- TableCell,
7795
- {
7796
- colSpan: columns.length,
7797
- className: "h-24 text-center",
7798
- children: "No results."
7799
- }
7800
- ) }) })
7801
- ] }),
7802
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ScrollBar, { orientation: "horizontal" })
7803
- ]
7804
- }
7805
- ),
8033
+ ) }) })
8034
+ ] }),
8035
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ScrollBar, { orientation: "horizontal" })
8036
+ ] }) }),
7806
8037
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col items-center justify-end gap-2 space-x-2 py-4 sm:flex-row", children: [
7807
8038
  /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
7808
8039
  isRowsSelected ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "text-muted-foreground flex-1 text-sm", children: [
@@ -7872,7 +8103,7 @@ function DataTable({
7872
8103
  pageIndex: pagination.pageIndex - 1
7873
8104
  })),
7874
8105
  disabled: pagination.pageIndex === 0,
7875
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react6.ChevronLeftIcon, { className: "h-4 w-4" })
8106
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react7.ChevronLeftIcon, { className: "h-4 w-4" })
7876
8107
  }
7877
8108
  ),
7878
8109
  /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
@@ -7885,7 +8116,7 @@ function DataTable({
7885
8116
  pageIndex: pagination.pageIndex + 1
7886
8117
  })),
7887
8118
  disabled: pagination.pageIndex + 1 >= pageCount,
7888
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react6.ChevronRightIcon, { className: "h-4 w-4" })
8119
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react7.ChevronRightIcon, { className: "h-4 w-4" })
7889
8120
  }
7890
8121
  ),
7891
8122
  /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
@@ -7947,7 +8178,7 @@ function DataTableSkeleton({
7947
8178
 
7948
8179
  // src/shared/fileupload.tsx
7949
8180
  var import_react_icons19 = require("@radix-ui/react-icons");
7950
- var import_lucide_react7 = require("lucide-react");
8181
+ var import_lucide_react8 = require("lucide-react");
7951
8182
  var import_react37 = require("react");
7952
8183
  var import_react_dropzone = require("react-dropzone");
7953
8184
  var import_jsx_runtime50 = require("react/jsx-runtime");
@@ -7978,7 +8209,7 @@ function FileUpload({
7978
8209
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("input", __spreadValues({}, getInputProps())),
7979
8210
  value && !!value.length ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ImagePreview, { file: value[0] }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_icons19.AvatarIcon, { className: "h-36 w-36 text-gray-100" }),
7980
8211
  /* @__PURE__ */ (0, import_jsx_runtime50.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: [
7981
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react7.CameraIcon, { className: "h-4 w-4 text-muted-foreground" }),
8212
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react8.CameraIcon, { className: "h-4 w-4 text-muted-foreground" }),
7982
8213
  label
7983
8214
  ] })
7984
8215
  ] }))
@@ -8269,6 +8500,7 @@ function Dropzone({
8269
8500
  FormItem,
8270
8501
  FormLabel,
8271
8502
  FormMessage,
8503
+ FormSelect,
8272
8504
  Heading,
8273
8505
  HoverCard,
8274
8506
  HoverCardContent,
@@ -8385,10 +8617,12 @@ function Dropzone({
8385
8617
  badgeVariants,
8386
8618
  buttonVariants,
8387
8619
  cn,
8620
+ inputVariants,
8388
8621
  navigationMenuTriggerStyle,
8389
8622
  reducer,
8390
8623
  toast,
8391
8624
  toggleVariants,
8392
8625
  useFormField,
8393
- useToast
8626
+ useToast,
8627
+ variants
8394
8628
  });